KFile
kurlnavigator.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KURLNAVIGATOR_H
00023 #define KURLNAVIGATOR_H
00024
00025 #include <kfile_export.h>
00026
00027 #include <kurl.h>
00028 #include <QtGui/QWidget>
00029
00030 class KFilePlacesModel;
00031 class KUrlComboBox;
00032 class QMouseEvent;
00033
00061 class KFILE_EXPORT KUrlNavigator : public QWidget
00062 {
00063 Q_OBJECT
00064
00065 public:
00073 KUrlNavigator(KFilePlacesModel* placesModel, const KUrl& url, QWidget* parent);
00074 virtual ~KUrlNavigator();
00075
00077 const KUrl& url() const;
00078
00083 KUrl uncommittedUrl() const;
00084
00094 KUrl url(int index) const;
00095
00104 bool goBack();
00105
00114 bool goForward();
00115
00123 bool goUp();
00124
00132 void goHome();
00133
00138 void setHomeUrl(const QString& homeUrl);
00139
00146 void setUrlEditable(bool editable);
00147
00153 bool isUrlEditable() const;
00154
00164 void setActive(bool active);
00165
00170 bool isActive() const;
00171
00178 void setPlacesSelectorVisible(bool visible);
00179
00181 bool isPlacesSelectorVisible() const;
00182
00184 int historySize() const;
00185
00192 int historyIndex() const;
00193
00198 const KUrl& savedRootUrl() const;
00199
00204 QPoint savedPosition() const;
00205
00210 KUrlComboBox* editor() const;
00211
00216 void setCustomProtocols(const QStringList &protocols);
00217
00221 QStringList customProtocols() const;
00222
00223 public Q_SLOTS:
00229 void setUrl(const KUrl& url);
00230
00235 void requestActivation();
00236
00243 void saveRootUrl(const KUrl& url);
00244
00254 void savePosition(int x, int y);
00255
00256
00257 void setFocus();
00258
00259 Q_SIGNALS:
00264 void activated();
00265
00271 void urlChanged(const KUrl& url);
00272
00277 void editableStateChanged(bool editable);
00278
00283 void historyChanged();
00284
00289 void urlsDropped(const KUrl::List& urls,
00290 const KUrl& destination);
00291
00295 void returnPressed();
00296
00297 protected:
00298
00299
00300
00301
00302
00303 virtual void keyReleaseEvent(QKeyEvent* event);
00304
00305
00306
00307
00308
00309
00310 virtual void mouseReleaseEvent(QMouseEvent* event);
00311
00312
00313 virtual void resizeEvent(QResizeEvent* event);
00314
00315 private:
00316 Q_PRIVATE_SLOT(d, void slotReturnPressed(const QString& text))
00317 Q_PRIVATE_SLOT(d, void slotReturnPressed())
00318 Q_PRIVATE_SLOT(d, void slotRemoteHostActivated())
00319 Q_PRIVATE_SLOT(d, void slotProtocolChanged(const QString& protocol))
00320 Q_PRIVATE_SLOT(d, void switchView())
00321 Q_PRIVATE_SLOT(d, void dropUrls(const KUrl::List& list, const KUrl& destination))
00322 Q_PRIVATE_SLOT(d, void openPathSelectorMenu())
00323 Q_PRIVATE_SLOT(d, void updateButtonVisibility())
00324 Q_PRIVATE_SLOT(d, void switchToBreadcrumbMode())
00325 Q_PRIVATE_SLOT(d, void updateContent())
00326
00327 private:
00328 class Private;
00329 Private* const d;
00330
00331 Q_DISABLE_COPY(KUrlNavigator)
00332 };
00333
00334 #endif