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
94 bool isStoreApplication();
95
96 static void verifyMetatypeRegistration();
97
98 KisExtendedModifiersMapperPluginInterface* extendedModifiersPluginInterface();
99
100#ifdef Q_OS_ANDROID
101 KisAndroidDonations *androidDonations();
102 KisAndroidScaling *androidScaling();
103#endif
104
105public Q_SLOTS:
106
107 void executeRemoteArguments(QByteArray message, KisMainWindow *mainWindow);
108 void remoteArguments(const QString &message);
109 void fileOpenRequested(const QString & url);
110 void setSplashScreenLoadingText(const QString&);
111
112private Q_SLOTS:
113 void slotSetLongPress(bool enabled);
114
115private:
117 void checkAutosaveFiles();
118 bool createNewDocFromTemplate(const QString &fileName, KisMainWindow *m_mainWindow);
119 void resetConfig();
120
121private:
122 class Private;
123 QScopedPointer<Private> d;
124 class ResetStarting;
125 friend class ResetStarting;
126};
127
128#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 ...