Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Application.h')
-rw-r--r--src/gui/Application.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/Application.h b/src/gui/Application.h
index 9a3ef756b..9f694f8c3 100644
--- a/src/gui/Application.h
+++ b/src/gui/Application.h
@@ -31,6 +31,8 @@ class OSEventFilter;
class QLockFile;
class QSocketNotifier;
+constexpr int RESTART_EXITCODE = -1;
+
class Application : public QApplication
{
Q_OBJECT
@@ -39,11 +41,16 @@ public:
Application(int& argc, char** argv);
~Application() override;
+ void applyTheme();
+
bool event(QEvent* event) override;
bool isAlreadyRunning() const;
+ bool isDarkTheme() const;
bool sendFileNamesToRunningInstance(const QStringList& fileNames);
+ void restart();
+
signals:
void openFile(const QString& filename);
void anotherInstanceStarted();
@@ -68,6 +75,7 @@ private:
static int unixSignalSocket[2];
#endif
bool m_alreadyRunning;
+ bool m_darkTheme = false;
QLockFile* m_lockFile;
QLocalServer m_lockServer;
QString m_socketName;
@@ -76,4 +84,6 @@ private:
#endif
};
+#define kpxcApp qobject_cast<Application*>(Application::instance())
+
#endif // KEEPASSX_APPLICATION_H