Changeset View
Changeset View
Standalone View
Standalone View
src/dolphinsinglewindow.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2019 by intika <intika@librefox.org> * | ||||
3 | * Copyright (C) 2018 by intika <intika@librefox.org> * | ||||
4 | * Copyright (C) 2016 by Fady S. Ghatas <fady@titrias.com> * | ||||
5 | * * | ||||
6 | * This program is free software; you can redistribute it and/or modify * | ||||
7 | * it under the terms of the GNU General Public License as published by * | ||||
8 | * the Free Software Foundation; either version 2 of the License, or * | ||||
9 | * (at your option) any later version. * | ||||
10 | * * | ||||
11 | * This program is distributed in the hope that it will be useful, * | ||||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||||
14 | * GNU General Public License for more details. * | ||||
15 | * * | ||||
16 | * You should have received a copy of the GNU General Public License * | ||||
17 | * along with this program; if not, write to the * | ||||
18 | * Free Software Foundation, Inc., * | ||||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||||
20 | ***************************************************************************/ | ||||
21 | | ||||
22 | #ifndef DOLPHIN_SINGLEWINDOW_H | ||||
23 | #define DOLPHIN_SINGLEWINDOW_H | ||||
24 | | ||||
25 | #include "dolphinmainwindow.h" | ||||
26 | #include "global.h" | ||||
27 | #include <QApplication> | ||||
28 | #include <QIcon> | ||||
29 | #include <QList> | ||||
30 | #include <QLocalServer> | ||||
31 | #include <QLocalSocket> | ||||
32 | #include <QObject> | ||||
33 | #include <QPointer> | ||||
34 | #include <QUrl> | ||||
35 | #include <QWidget> | ||||
36 | #include <QtNetwork/QLocalServer> | ||||
37 | #include <kxmlguiwindow.h> | ||||
38 | | ||||
39 | /** | ||||
40 | * @short Single window for Dolphin. | ||||
41 | * | ||||
42 | * Handles the menus, toolbars and Dolphin views. | ||||
43 | */ | ||||
44 | class DolphinSingleWindow : public DolphinMainWindow { | ||||
45 | Q_OBJECT | ||||
46 | Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.SingleWindow") | ||||
47 | Q_PROPERTY(int id READ getId SCRIPTABLE true) | ||||
48 | | ||||
49 | public: | ||||
50 | DolphinSingleWindow(); | ||||
51 | virtual ~DolphinSingleWindow(); | ||||
52 | QLocalServer *server; | ||||
53 | QString serverName; | ||||
54 | static DolphinSingleWindow *window; | ||||
55 | static DolphinSingleWindow *getWindow(); | ||||
56 | /** | ||||
57 | * Open the list of urls in the single instance window | ||||
58 | * @param urls URLs of directories to open. | ||||
59 | */ | ||||
60 | static void open(QList<QUrl> urls); | ||||
61 | /** | ||||
62 | * Create new Server that can receive new tab creation requests. | ||||
63 | */ | ||||
64 | void createNewServer(); | ||||
65 | | ||||
66 | public slots: | ||||
67 | /** | ||||
68 | * Server Event Listener | ||||
69 | */ | ||||
70 | void hookLocalConnection(); | ||||
71 | }; | ||||
72 | #endif // DOLPHIN_SINGLEWINDOW_H | ||||
73 | No newline at end of file |