X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7787f080678ffd428b269acd8db370a8c0026b37..d6c086ad04:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index c05fc34ad..1734d4ad4 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -22,16 +22,16 @@ #ifndef DOLPHIN_MAINWINDOW_H #define DOLPHIN_MAINWINDOW_H +#include "dolphintabwidget.h" #include - #include #include #include -#include -#include +#include #include #include +#include typedef KIO::FileUndoManager::CommandType CommandType; @@ -47,9 +47,7 @@ class KNewFileMenu; class QToolButton; class QIcon; class PlacesPanel; -#ifndef Q_OS_WIN class TerminalPanel; -#endif /** * @short Main window for Dolphin. @@ -60,11 +58,10 @@ class DolphinMainWindow: public KXmlGuiWindow { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.MainWindow") - Q_PROPERTY(int id READ getId SCRIPTABLE true) public: DolphinMainWindow(); - virtual ~DolphinMainWindow(); + ~DolphinMainWindow() override; /** * Returns the currently active view. @@ -104,11 +101,6 @@ public slots: */ void pasteIntoFolder(); - /** - * Returns the main window ID used through DBus. - */ - int getId() const; - /** * Implementation of the MainWindowAdaptor/QDBusAbstractAdaptor interface. * Inform all affected dolphin components (panels, views) of an URL @@ -152,16 +144,16 @@ signals: protected: /** @see QWidget::showEvent() */ - virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent* event) override; /** @see QMainWindow::closeEvent() */ - virtual void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent* event) override; /** @see KMainWindow::saveProperties() */ - virtual void saveProperties(KConfigGroup& group) Q_DECL_OVERRIDE; + void saveProperties(KConfigGroup& group) override; /** @see KMainWindow::readProperties() */ - virtual void readProperties(const KConfigGroup& group) Q_DECL_OVERRIDE; + void readProperties(const KConfigGroup& group) override; private slots: /** @@ -261,6 +253,12 @@ private slots: */ void togglePanelLockState(); + /** + * Is invoked if the Terminal panel got visible/invisible and takes care + * that the active view has the focus if the Terminal panel is invisible. + */ + void slotTerminalPanelVisibilityChanged(); + /** Goes back one step of the URL history. */ void goBack(); @@ -330,7 +328,17 @@ private slots: /** * Opens a new tab in the background showing the URL \a url. */ - void openNewTab(const QUrl& url); + void openNewTab(const QUrl& url, DolphinTabWidget::TabPlacement tabPlacement); + + /** + * Opens a new tab and places it after the current tab + */ + void openNewTabAfterCurrentTab(const QUrl& url); + + /** + * Opens a new tab and places it as the last tab + */ + void openNewTabAfterLastTab(const QUrl& url); /** * Opens the selected folder in a new tab. @@ -342,6 +350,11 @@ private slots: */ void openInNewWindow(); + /** + * Show the target of the selected symlink + */ + void showTarget(); + /** * Indicates in the statusbar that the execution of the command \a command * has been finished. @@ -410,10 +423,9 @@ private slots: void tabCountChanged(int count); /** - * Sets the window caption to url.fileName() if this is non-empty, - * "/" if the URL is "file:///", and url.protocol() otherwise. + * Updates the Window Title with the caption from the active view container */ - void setUrlAsCaption(const QUrl& url); + void updateWindowTitle(); /** * This slot is called when the user requested to unmount a removable media @@ -499,14 +511,13 @@ private: { public: UndoUiInterface(); - virtual ~UndoUiInterface(); - virtual void jobError(KIO::Job* job) Q_DECL_OVERRIDE; + ~UndoUiInterface() override; + void jobError(KIO::Job* job) override; }; KNewFileMenu* m_newFileMenu; DolphinTabWidget* m_tabWidget; DolphinViewContainer* m_activeViewContainer; - int m_id; DolphinViewActionHandler* m_actionHandler; DolphinRemoteEncoding* m_remoteEncoding; @@ -518,9 +529,7 @@ private: KIO::Job* m_lastHandleUrlStatJob; -#ifndef Q_OS_WIN TerminalPanel* m_terminalPanel; -#endif PlacesPanel* m_placesPanel; bool m_tearDownFromPlacesRequested; }; @@ -535,10 +544,5 @@ inline KNewFileMenu* DolphinMainWindow::newFileMenu() const return m_newFileMenu; } -inline int DolphinMainWindow::getId() const -{ - return m_id; -} - #endif // DOLPHIN_MAINWINDOW_H