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;
23
25
38class KRITAUI_EXPORT KisApplication : public QtSingleApplication
39{
40 Q_OBJECT
41
42public:
47 explicit KisApplication(const QString &key, int &argc, char **argv);
48
52 ~KisApplication() override;
53
65 virtual bool start(const KisApplicationArguments &args);
66
67 bool event(QEvent *event) override;
68
74 void askResetConfig();
75
81 void setSplashScreen(QWidget *splash);
82 void hideSplashScreen();
83
85 bool notify(QObject *receiver, QEvent *event) override;
86
87 void addResourceTypes();
88 bool registerResources();
89 void loadPlugins();
90 void initializeGlobals(const KisApplicationArguments &args);
91 void processPostponedSynchronizationEvents();
92
93#ifndef Q_OS_ANDROID
100 static bool isStoreApplication();
101#endif
102
103 static void verifyMetatypeRegistration();
104
105 KisExtendedModifiersMapperPluginInterface* extendedModifiersPluginInterface();
106
107#ifdef Q_OS_ANDROID
108 KisAndroidDonations *androidDonations();
109 KisAndroidScaling *androidScaling();
110#endif
111
112public Q_SLOTS:
113
114 void executeRemoteArguments(QByteArray message, KisMainWindow *mainWindow);
115 void remoteArguments(const QString &message);
116 void fileOpenRequested(const QString & url);
117 void setSplashScreenLoadingText(const QString&);
118
119private Q_SLOTS:
120 void slotSetLongPress(bool enabled);
121
122private:
124 void checkAutosaveFiles();
125 bool createNewDocFromTemplate(const QString &fileName, KisMainWindow *m_mainWindow);
126 void resetConfig();
127
128private:
129 class Private;
130 QScopedPointer<Private> d;
131 class ResetStarting;
132 friend class ResetStarting;
133};
134
135#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 ...