X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/0cee94ce82ccb82afd0c4e22d77e251276e7a447..e9bd295b:/src/dolphinnavigatorswidgetaction.h diff --git a/src/dolphinnavigatorswidgetaction.h b/src/dolphinnavigatorswidgetaction.h index 804996532..d33482201 100644 --- a/src/dolphinnavigatorswidgetaction.h +++ b/src/dolphinnavigatorswidgetaction.h @@ -31,7 +31,8 @@ class QPushButton; * The secondary side only exists for split view and is created by * createSecondaryUrlNavigator() when necessary. * - Each side is a QWidget which I call NavigatorWidget with a QHBoxLayout. - * - Each NavigatorWidget consists an UrlNavigator, an emptyTrashButton and spacing. + * - Each NavigatorWidget consists an UrlNavigator, an emptyTrashButton, a + * networkFolderButton, and spacing. * - Only the primary navigatorWidget has leading spacing. Both have trailing spacing. * The spacing is there to align the UrlNavigator with its DolphinViewContainer. */ @@ -56,7 +57,7 @@ public: * This method should preferably only be called when: * - Split view is activated in the active tab * OR - * - A switch to a tab that is already in split view mode is occuring + * - A switch to a tab that is already in split view mode is occurring */ void createSecondaryUrlNavigator(); @@ -91,7 +92,7 @@ protected: * this method always returns the same widget and reparents it. * You normally don't have to use this method directly because * QWidgetAction::requestWidget() is used to obtain the navigatorsWidget - * and to steal it from whereever it was prior. + * and to steal it from wherever it was prior. * @param parent the new parent of the navigatorsWidget. */ QWidget *createWidget(QWidget *parent) override; @@ -127,6 +128,20 @@ private: */ QPushButton *newEmptyTrashButton(const DolphinUrlNavigator *urlNavigator, QWidget *parent) const; + /** + * Used to retrieve the networkFolderButtons for the navigatorWidgets on + * both sides. + */ + QPushButton *networkFolderButton(Side side); + + /** + * Creates a new add "network folder" button. + * @param urlNavigator Only when this UrlNavigator shows the remote directory + * will the button be visible. + * @param parent The object that should be the button's parent. + */ + QPushButton *newNetworkFolderButton(const DolphinUrlNavigator *urlNavigator, QWidget *parent) const; + enum Position { Leading, Trailing @@ -201,6 +216,12 @@ private: }; ViewGeometriesHelper m_viewGeometriesHelper; + + /** + * Used to check if the window has been resized. + * @see ViewGeometriesHelper::eventFilter() for why this is needed. + */ + int m_previousWindowWidth = -1; }; #endif // DOLPHINNAVIGATORSWIDGETACTION_H