┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/urlnavigator.h
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-03-27 19:05:46 +0000
committerDavid Faure <[email protected]>2007-03-27 19:05:46 +0000
commit3546be263253a3982077122fb861ebfb64d7de1d (patch)
tree3ed32ddfd8326dd7de1694e4ce670b0b43ad9d8b /src/urlnavigator.h
parent85bc196887fbed01187e3830cd28c2500cb01cb2 (diff)
One more step towards kdelibs: d-pointer-ify, including moving all members, all private methods, and all private slots, to the private class.
svn path=/trunk/KDE/kdebase/apps/; revision=647233
Diffstat (limited to 'src/urlnavigator.h')
-rw-r--r--src/urlnavigator.h89
1 files changed, 10 insertions, 79 deletions
diff --git a/src/urlnavigator.h b/src/urlnavigator.h
index 8a1d2512d..15b683576 100644
--- a/src/urlnavigator.h
+++ b/src/urlnavigator.h
@@ -25,22 +25,9 @@
#include <kurl.h>
#include <QWidget>
#include <QList>
-#include <QLinkedList>
class KBookmarkManager;
-class QHBoxLayout;
-class QLabel;
-class QLineEdit;
class QMouseEvent;
-class QToolButton;
-
-class KUrl;
-class KFileItem;
-class KUrlComboBox;
-
-class BookmarkSelector;
-class UrlNavigatorButton;
-class ProtocolCombo;
/**
* @brief Navigation bar which contains the current shown URL.
@@ -168,7 +155,7 @@ public:
* Returns true, if the URL navigator is in the active mode.
* @see UrlNavigator::setActive()
*/
- bool isActive() const { return m_active; }
+ bool isActive() const;
/**
* Sets whether or not to show hidden files in lists
@@ -178,7 +165,7 @@ public:
/**
* Returns true if the URL navigator is set to show hidden files
*/
- bool showHiddenFiles() { return m_showHiddenFiles; }
+ bool showHiddenFiles() const; // TODO rename, looks like a verb
/**
* Handles the dropping of the URLs \a urls to the given
@@ -247,74 +234,18 @@ protected:
*/
virtual void mouseReleaseEvent(QMouseEvent* event);
-private slots:
- void slotReturnPressed(const QString& text);
- void slotUrlActivated(const KUrl& url);
- void slotRemoteHostActivated();
- void slotProtocolChanged(const QString& protocol);
- void slotRedirection(const KUrl&, const KUrl&);
-
- /**
- * Switches the navigation bar between the breadcrumb view and the
- * traditional view (see setUrlEditable()) and is connected to the clicked signal
- * of the navigation bar button.
- */
- void switchView();
-
private:
- /**
- * Allows to edit the Url of the navigation bar if \a editable
- * is true. If \a editable is false, each part of
- * the Url is presented by a button for a fast navigation.
- */
- void setUrlEditable(bool editable);
-
- /**
- * Updates the history element with the current file item
- * and the contents position.
- */
- void updateHistoryElem();
- void updateContent();
-
- /**
- * Updates all buttons to have one button for each part of the
- * path \a path. Existing buttons, which are available by m_navButtons,
- * are reused if possible. If the path is longer, new buttons will be
- * created, if the path is shorter, the remaining buttons will be deleted.
- * @param startIndex Start index of path part (/), where the buttons
- * should be created for each following part.
- */
- void updateButtons(const QString& path, int startIndex);
-
- /**
- * Deletes all URL navigator buttons. m_navButtons is
- * empty after this operation.
- */
- void deleteButtons();
-
- /**
- * Appends the widget at the end of the URL navigator. It is assured
- * that the filler widget remains as last widget to fill the remaining
- * width.
- */
- void appendWidget(QWidget* widget);
+ Q_PRIVATE_SLOT(d, void slotReturnPressed(const QString& text))
+ Q_PRIVATE_SLOT(d, void slotRemoteHostActivated())
+ Q_PRIVATE_SLOT(d, void slotProtocolChanged(const QString& protocol))
+ Q_PRIVATE_SLOT(d, void switchView())
+ //Q_PRIVATE_SLOT(d, void slotRedirection(const KUrl&, const KUrl&))
private:
- bool m_active;
- bool m_showHiddenFiles;
- int m_historyIndex;
-
- QHBoxLayout* m_layout;
+ class Private;
+ Private* const d;
- QList<HistoryElem> m_history;
- QToolButton* m_toggleButton;
- BookmarkSelector* m_bookmarkSelector;
- KUrlComboBox* m_pathBox;
- ProtocolCombo* m_protocols;
- QLabel* m_protocolSeparator;
- QLineEdit* m_host;
- QLinkedList<UrlNavigatorButton*> m_navButtons;
- QWidget* m_filler;
+ Q_DISABLE_COPY( UrlNavigator )
};
#endif