File indexing completed on 2022-09-27 16:29:02

0001 /**
0002  * SPDX-FileCopyrightText: (C) 2003 by Sébastien Laoût <slaout@linux62.org>
0003  * SPDX-License-Identifier: GPL-2.0-or-later
0004  */
0005 
0006 #ifndef APPLICATION_H
0007 #define APPLICATION_H
0008 
0009 #include <KDBusService>
0010 #include <QApplication>
0011 
0012 /**
0013  * @class Application
0014  * @brief Base application
0015  * @author Sébastien Laoût <slaout@linux62.org>
0016  */
0017 class Application : public QApplication
0018 {
0019 public:
0020     Application(int &argc, char **argv);
0021     ~Application() override;
0022     void tryLoadFile(const QStringList &args, const QString &workingDir); //!< Open a file passed as command line argument
0023 private Q_SLOTS:
0024     /// Activate program window if duplicate instance is started, load file from args
0025     void onActivateRequested(const QStringList &args, const QString &workingDir);
0026 
0027 private:
0028     KDBusService m_service;
0029 };
0030 
0031 #endif // APPLICATION_H