KFile
kfileplacesview.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 #ifndef KFILEPLACESVIEW_H
00020 #define KFILEPLACESVIEW_H
00021
00022 #include <kfile_export.h>
00023
00024 #include <QtGui/QListView>
00025
00026 #include <kurl.h>
00027
00028 class QResizeEvent;
00029 class QContextMenuEvent;
00030
00034 class KFILE_EXPORT KFilePlacesView : public QListView
00035 {
00036 Q_OBJECT
00037 public:
00038 KFilePlacesView(QWidget *parent = 0);
00039 ~KFilePlacesView();
00040
00050 void setDropOnPlaceEnabled(bool enabled);
00051 bool isDropOnPlaceEnabled() const;
00052
00059 void setAutoResizeItemsEnabled(bool enabled);
00060 bool isAutoResizeItemsEnabled() const;
00061
00062 public Q_SLOTS:
00063 void setUrl(const KUrl &url);
00064 void setShowAll(bool showAll);
00065 virtual QSize sizeHint() const;
00066 virtual void setModel(QAbstractItemModel *model);
00067
00068 protected:
00069 virtual void keyPressEvent(QKeyEvent *event);
00070 virtual void contextMenuEvent(QContextMenuEvent *event);
00071 virtual void resizeEvent(QResizeEvent *event);
00072 virtual void showEvent(QShowEvent *event);
00073 virtual void hideEvent(QHideEvent *event);
00074 virtual void dragEnterEvent(QDragEnterEvent *event);
00075 virtual void dragLeaveEvent(QDragLeaveEvent *event);
00076 virtual void dragMoveEvent(QDragMoveEvent *event);
00077 virtual void dropEvent(QDropEvent *event);
00078 virtual void paintEvent(QPaintEvent *event);
00079
00080 protected Q_SLOTS:
00081 void rowsInserted(const QModelIndex &parent, int start, int end);
00082 void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
00083
00084 Q_SIGNALS:
00085 void urlChanged(const KUrl &url);
00086
00092 void urlsDropped(const KUrl &dest, QDropEvent *event, QWidget *parent);
00093
00094 private:
00095 Q_PRIVATE_SLOT(d, void adaptItemSize())
00096 Q_PRIVATE_SLOT(d, void _k_placeClicked(const QModelIndex &))
00097 Q_PRIVATE_SLOT(d, void _k_placeEntered(const QModelIndex &))
00098 Q_PRIVATE_SLOT(d, void _k_placeLeft(const QModelIndex &))
00099 Q_PRIVATE_SLOT(d, void _k_storageSetupDone(const QModelIndex &, bool))
00100 Q_PRIVATE_SLOT(d, void _k_adaptItemsUpdate(qreal))
00101 Q_PRIVATE_SLOT(d, void _k_itemAppearUpdate(qreal))
00102 Q_PRIVATE_SLOT(d, void _k_itemDisappearUpdate(qreal))
00103 Q_PRIVATE_SLOT(d, void _k_enableSmoothItemResizing())
00104 Q_PRIVATE_SLOT(d, void _k_trashUpdated(KJob *))
00105 Q_PRIVATE_SLOT(d, void _k_capacityBarFadeValueChanged())
00106 Q_PRIVATE_SLOT(d, void _k_triggerDevicePolling())
00107
00108 class Private;
00109 Private * const d;
00110 friend class Private;
00111 };
00112
00113 #endif