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
00065 class KFILE_EXPORT KUrlNavigator : public QWidget
00066 {
00067 Q_OBJECT
00068
00069 public:
00077 KUrlNavigator(KFilePlacesModel* placesModel, const KUrl& url, QWidget* parent);
00078 virtual ~KUrlNavigator();
00079
00081 const KUrl& url() const;
00082
00087 KUrl uncommittedUrl() const;
00088
00098 KUrl url(int index) const;
00099
00108 bool goBack();
00109
00118 bool goForward();
00119
00127 bool goUp();
00128
00136 void goHome();
00137
00142 void setHomeUrl(const QString& homeUrl);
00143
00150 void setUrlEditable(bool editable);
00151
00157 bool isUrlEditable() const;
00158
00168 void setShowFullPath(bool show);
00169
00174 bool showFullPath() const;
00175
00185 void setActive(bool active);
00186
00191 bool isActive() const;
00192
00199 void setPlacesSelectorVisible(bool visible);
00200
00202 bool isPlacesSelectorVisible() const;
00203
00205 int historySize() const;
00206
00213 int historyIndex() const;
00214
00219 const KUrl& savedRootUrl() const;
00220
00225 QPoint savedPosition() const;
00226
00231 KUrlComboBox* editor() const;
00232
00237 void setCustomProtocols(const QStringList &protocols);
00238
00242 QStringList customProtocols() const;
00243
00244 public Q_SLOTS:
00250 void setUrl(const KUrl& url);
00251
00256 void requestActivation();
00257
00264 void saveRootUrl(const KUrl& url);
00265
00275 void savePosition(int x, int y);
00276
00277
00278 void setFocus();
00279
00280 Q_SIGNALS:
00285 void activated();
00286
00292 void urlChanged(const KUrl& url);
00293
00298 void editableStateChanged(bool editable);
00299
00304 void historyChanged();
00305
00310
00311
00312 void urlsDropped(const KUrl::List& urls,
00313 const KUrl& destination);
00314
00322 void urlsDropped(const KUrl& destination, QDropEvent* event);
00323
00327 void returnPressed();
00328
00329 protected:
00330
00331
00332
00333
00334
00335 virtual void keyReleaseEvent(QKeyEvent* event);
00336
00337
00338
00339
00340
00341
00342 virtual void mouseReleaseEvent(QMouseEvent* event);
00343
00344
00345 virtual void resizeEvent(QResizeEvent* event);
00346
00347 virtual bool eventFilter(QObject* watched, QEvent* event);
00348
00349 private:
00350 Q_PRIVATE_SLOT(d, void slotReturnPressed(const QString& text))
00351 Q_PRIVATE_SLOT(d, void slotReturnPressed())
00352 Q_PRIVATE_SLOT(d, void slotRemoteHostActivated())
00353 Q_PRIVATE_SLOT(d, void slotProtocolChanged(const QString& protocol))
00354 Q_PRIVATE_SLOT(d, void switchView())
00355 Q_PRIVATE_SLOT(d, void dropUrls(const KUrl& destination, QDropEvent*))
00356 Q_PRIVATE_SLOT(d, void openPathSelectorMenu())
00357 Q_PRIVATE_SLOT(d, void updateButtonVisibility())
00358 Q_PRIVATE_SLOT(d, void switchToBreadcrumbMode())
00359 Q_PRIVATE_SLOT(d, void updateContent())
00360
00361 private:
00362 class Private;
00363 Private* const d;
00364
00365 Q_DISABLE_COPY(KUrlNavigator)
00366 };
00367
00368 #endif