32class LIBDTKWIDGETSHARED_EXPORT
DApplication :
public QApplication,
public DTK_CORE_NAMESPACE::DObject
36 Q_PROPERTY(
bool visibleMenuShortcutText READ visibleMenuShortcutText WRITE setVisibleMenuShortcutText)
37 Q_PROPERTY(
bool visibleMenuCheckboxWidget READ visibleMenuCheckboxWidget WRITE setVisibleMenuCheckboxWidget)
38 Q_PROPERTY(
bool visibleMenuIcon READ visibleMenuIcon WRITE setVisibleMenuIcon)
39 Q_PROPERTY(
bool autoActivateWindows READ autoActivateWindows WRITE setAutoActivateWindows)
40 Q_PROPERTY(QString applicationCreditsFile READ applicationCreditsFile WRITE setApplicationCreditsFile)
41 Q_PROPERTY(QByteArray applicationCreditsContent READ applicationCreditsContent WRITE setApplicationCreditsContent)
42 Q_PROPERTY(QString licensePath READ licensePath WRITE setLicensePath)
45 static
DApplication *globalApplication(
int &argc,
char **argv);
53#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
54 D_DECL_DEPRECATED QString theme()
const;
55 D_DECL_DEPRECATED
void setTheme(
const QString &theme);
59 void setOOMScoreAdj(
const int score);
62 bool setSingleInstance(
const QString &key);
63 bool setSingleInstance(
const QString &key, SingleScope singleScope);
65 bool loadTranslator(QList<QLocale> localeFallback = QList<QLocale>() << QLocale::system());
67#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
69 D_DECL_DEPRECATED
static bool loadDXcbPlugin();
71 static bool isDXcbPlatform();
74 static int buildDtkVersion();
76 static int runtimeDtkVersion();
79 static void registerDDESession();
81 static void customQtThemeConfigPathByUserHome(
const QString &home);
82 static void customQtThemeConfigPath(
const QString &path);
83 static QString customizedQtThemeConfigPath();
86 QString productName()
const;
87 void setProductName(
const QString &productName);
89 const QIcon &productIcon()
const;
90 void setProductIcon(
const QIcon &productIcon);
92 QString applicationLicense()
const;
93 void setApplicationLicense(
const QString &license);
95 QString applicationDescription()
const;
96 void setApplicationDescription(
const QString &description);
98 QString applicationHomePage()
const;
99 void setApplicationHomePage(
const QString &link);
101 QString applicationAcknowledgementPage()
const;
102 void setApplicationAcknowledgementPage(
const QString &link);
104 bool applicationAcknowledgementVisible()
const;
105 void setApplicationAcknowledgementVisible(
bool visible);
113 bool visibleMenuShortcutText()
const;
114 void setVisibleMenuShortcutText(
bool value);
116 bool visibleMenuCheckboxWidget()
const;
117 void setVisibleMenuCheckboxWidget(
bool value);
119 bool visibleMenuIcon()
const;
120 void setVisibleMenuIcon(
bool value);
122 bool autoActivateWindows()
const;
123 void setAutoActivateWindows(
bool autoActivateWindows);
126 void acclimatizeVirtualKeyboard(QWidget *window);
127 void ignoreVirtualKeyboard(QWidget *window);
128 bool isAcclimatizedVirtualKeyboard(QWidget *window)
const;
130 QString applicationCreditsFile()
const;
131 void setApplicationCreditsFile(
const QString &file);
133 QByteArray applicationCreditsContent()
const;
134 void setApplicationCreditsContent(
const QByteArray &content);
136 QString licensePath()
const;
137 void setLicensePath(
const QString &path);
140 static inline QString buildVersion(
const QString &fallbackVersion)
142 QString autoVersion = DAPPLICATION_XSTRING(VERSION);
143 if (autoVersion.isEmpty()) {
144 autoVersion = fallbackVersion;
149 static inline QString buildVersion(
const QString &fallbackVersion)
151 return fallbackVersion;
168 virtual void handleHelpAction();
169 virtual void handleAboutAction();
170 virtual void handleQuitAction();
173 bool notify(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
179 D_PRIVATE_SLOT(
void _q_onNewInstanceStarted())
180 D_PRIVATE_SLOT(
void _q_panWindowContentsForVirtualKeyboard())
181 D_PRIVATE_SLOT(
void _q_resizeWindowContentsForVirtualKeyboard())
182 D_PRIVATE_SLOT(
void _q_sizeModeChanged())