mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2025-01-15 17:02:06 +08:00
35ee984d72
Details: * Improved unsafe C-style macros inheritance approach to the project-wide DEFINES: it is unspecified in which order source files are being preprocessed ones, so in singleapplication.cpp the class might be inherent of default-specified base, while in main.cpp this can be a user-provided QAPPLICATION_CLASS definition. * Replace Qt's pseudo-keywords to more library-independent counterparts ('emit -> Q_EMIT', etc) * Indentation fixes (80 character column-width) * Rearragned #include statements: from most platform-independen to more app-specific. * Fixed some grammar typos. * README.md updated respectively.
37 lines
680 B
C++
37 lines
680 B
C++
#ifndef SINGLE_APPLICATION_H
|
|
#define SINGLE_APPLICATION_H
|
|
#include <QtCore/QtGlobal>
|
|
|
|
#include QT_STRINGIFY(QAPPLICATION_CLASS)
|
|
|
|
class SingleApplicationPrivate;
|
|
|
|
/**
|
|
* @brief The SingleApplication class handles multipe instances of the same Application
|
|
* @see QApplication
|
|
*/
|
|
class SingleApplication : public QAPPLICATION_CLASS
|
|
{
|
|
Q_OBJECT
|
|
Q_DECLARE_PRIVATE(SingleApplication)
|
|
|
|
typedef QAPPLICATION_CLASS app_t;
|
|
|
|
public:
|
|
explicit SingleApplication(int&, char *[]);
|
|
~SingleApplication();
|
|
|
|
Q_SIGNALS:
|
|
void showUp();
|
|
|
|
private Q_SLOTS:
|
|
void slotConnectionEstablished();
|
|
|
|
private:
|
|
SingleApplicationPrivate *d_ptr;
|
|
|
|
|
|
};
|
|
|
|
#endif // SINGLE_APPLICATION_H
|