Changeset View
Standalone View
src/dolphinmainwindow.h
Show All 16 Lines | |||||
17 | * along with this program; if not, write to the * | 17 | * along with this program; if not, write to the * | ||
18 | * Free Software Foundation, Inc., * | 18 | * Free Software Foundation, Inc., * | ||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||
20 | ***************************************************************************/ | 20 | ***************************************************************************/ | ||
21 | 21 | | |||
22 | #ifndef DOLPHIN_MAINWINDOW_H | 22 | #ifndef DOLPHIN_MAINWINDOW_H | ||
23 | #define DOLPHIN_MAINWINDOW_H | 23 | #define DOLPHIN_MAINWINDOW_H | ||
24 | 24 | | |||
25 | #include "dolphintabwidget.h" | ||||
25 | #include <config-baloo.h> | 26 | #include <config-baloo.h> | ||
26 | #include <kio/fileundomanager.h> | 27 | #include <kio/fileundomanager.h> | ||
27 | #include <ksortablelist.h> | 28 | #include <ksortablelist.h> | ||
28 | #include <kxmlguiwindow.h> | 29 | #include <kxmlguiwindow.h> | ||
29 | 30 | | |||
30 | #include <QIcon> | 31 | #include <QIcon> | ||
31 | #include <QList> | 32 | #include <QList> | ||
32 | #include <QPointer> | 33 | #include <QPointer> | ||
Show All 9 Lines | |||||
42 | class KFileItem; | 43 | class KFileItem; | ||
43 | class KFileItemList; | 44 | class KFileItemList; | ||
44 | class KJob; | 45 | class KJob; | ||
45 | class KNewFileMenu; | 46 | class KNewFileMenu; | ||
46 | class QToolButton; | 47 | class QToolButton; | ||
47 | class QIcon; | 48 | class QIcon; | ||
48 | class PlacesPanel; | 49 | class PlacesPanel; | ||
49 | class TerminalPanel; | 50 | class TerminalPanel; | ||
50 | 51 | | |||
elvisangelaccio: This is a bit weird, never seen forward declarations used for an enum. Why not just `#include… | |||||
We could, I was just trying to minimize the amounts of includes in the header file, I guess that is also the reason for the other forward declarations? One of the arguments for using enum class is specifically that you can forward declare it, it is technically also possible with an unscoped enumeration but you can't do it in all situations. hallas: We could, I was just trying to minimize the amounts of includes in the header file, I guess… | |||||
Those are fine because you don't need to include the whole header if you just need a pointer to the object. elvisangelaccio: > We could, I was just trying to minimize the amounts of includes in the header file, I guess… | |||||
51 | /** | 52 | /** | ||
52 | * @short Main window for Dolphin. | 53 | * @short Main window for Dolphin. | ||
53 | * | 54 | * | ||
54 | * Handles the menus, toolbars and Dolphin views. | 55 | * Handles the menus, toolbars and Dolphin views. | ||
55 | */ | 56 | */ | ||
56 | class DolphinMainWindow: public KXmlGuiWindow | 57 | class DolphinMainWindow: public KXmlGuiWindow | ||
57 | { | 58 | { | ||
58 | Q_OBJECT | 59 | Q_OBJECT | ||
▲ Show 20 Lines • Show All 263 Lines • ▼ Show 20 Line(s) | 158 | private slots: | |||
322 | * Opens a new view with the current URL that is part of a tab and | 323 | * Opens a new view with the current URL that is part of a tab and | ||
323 | * activates it. | 324 | * activates it. | ||
324 | */ | 325 | */ | ||
325 | void openNewActivatedTab(); | 326 | void openNewActivatedTab(); | ||
326 | 327 | | |||
327 | /** | 328 | /** | ||
328 | * Opens a new tab in the background showing the URL \a url. | 329 | * Opens a new tab in the background showing the URL \a url. | ||
329 | */ | 330 | */ | ||
330 | void openNewTab(const QUrl& url); | 331 | void openNewTab(const QUrl& url, DolphinTabWidget::TabPlacement tabPlacement); | ||
332 | | ||||
333 | /** | ||||
334 | * Opens a new tab and places it after the current tab | ||||
335 | */ | ||||
336 | void openNewTabAfterCurrentTab(const QUrl& url); | ||||
337 | | ||||
338 | /** | ||||
339 | * Opens a new tab and places it as the last tab | ||||
340 | */ | ||||
341 | void openNewTabAfterLastTab(const QUrl& url); | ||||
331 | 342 | | |||
332 | /** | 343 | /** | ||
333 | * Opens the selected folder in a new tab. | 344 | * Opens the selected folder in a new tab. | ||
334 | */ | 345 | */ | ||
335 | void openInNewTab(); | 346 | void openInNewTab(); | ||
336 | 347 | | |||
337 | /** | 348 | /** | ||
338 | * Opens the selected folder in a new window. | 349 | * Opens the selected folder in a new window. | ||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |
This is a bit weird, never seen forward declarations used for an enum. Why not just #include "dolphintabwidget.h" ?