Krita Source Code Documentation
Loading...
Searching...
No Matches
KisApplication.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org>
3 * SPDX-FileCopyrightText: 2012 Boudewijn Rempt <boud@valdyas.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#ifndef KIS_APPLICATION_H
9#define KIS_APPLICATION_H
10
11#include <QScopedPointer>
13#include "kritaui_export.h"
14
15class KisMainWindow;
16class KisApplicationPrivate;
17class QWidget;
22
24
37class KRITAUI_EXPORT KisApplication : public QtSingleApplication
38{
39 Q_OBJECT
40
41public:
46 explicit KisApplication(const QString &key, int &argc, char **argv);
47
51 ~KisApplication() override;
52
64 virtual bool start(const KisApplicationArguments &args);
65
66 bool event(QEvent *event) override;
67
73 void askResetConfig();
74
80 void setSplashScreen(QWidget *splash);
81 void hideSplashScreen();
82
84 bool notify(QObject *receiver, QEvent *event) override;
85
86 void addResourceTypes();
87 bool registerResources();
88 void loadPlugins();
89 void initializeGlobals(const KisApplicationArguments &args);
90 void processPostponedSynchronizationEvents();
91
93 bool isStoreApplication();
94
95 static void verifyMetatypeRegistration();
96
97 KisExtendedModifiersMapperPluginInterface* extendedModifiersPluginInterface();
98
99#ifdef Q_OS_ANDROID
100 KisAndroidDonations *androidDonations();
101#endif
102
103public Q_SLOTS:
104
105 void executeRemoteArguments(QByteArray message, KisMainWindow *mainWindow);
106 void remoteArguments(const QString &message);
107 void fileOpenRequested(const QString & url);
108 void setSplashScreenLoadingText(const QString&);
109
110private Q_SLOTS:
111 void slotSetLongPress(bool enabled);
112
113private:
115 void checkAutosaveFiles();
116 bool createNewDocFromTemplate(const QString &fileName, KisMainWindow *m_mainWindow);
117 void resetConfig();
118
119private:
120 class Private;
121 QScopedPointer<Private> d;
122 class ResetStarting;
123 friend class ResetStarting;
124};
125
126#endif
Base class for the Krita app.
QScopedPointer< Private > d
Main window for Krita.
The QtSingleApplication class provides an API to detect and communicate with running instances of an ...