Changeset View
Changeset View
Standalone View
Standalone View
sidebar/tree_module/tree_module.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 46 | KonqSideBarTreeModule(QWidget *parent, | |||
---|---|---|---|---|---|
47 | const KConfigGroup &configGroup); | 47 | const KConfigGroup &configGroup); | ||
48 | virtual ~KonqSideBarTreeModule(); | 48 | virtual ~KonqSideBarTreeModule(); | ||
49 | 49 | | |||
50 | virtual QWidget *getWidget() override; | 50 | virtual QWidget *getWidget() override; | ||
51 | void handleURL(const QUrl &hand_url) override; | 51 | void handleURL(const QUrl &hand_url) override; | ||
52 | 52 | | |||
53 | private slots: | 53 | private slots: | ||
54 | void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); | 54 | void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); | ||
55 | void slotUpdateColWidth(); | ||||
55 | void slotKDirExpand_setRootIndex(); | 56 | void slotKDirExpand_setRootIndex(); | ||
56 | void slotKDirExpand_setSelection(const QModelIndex &index); | 57 | void slotKDirExpand_setSelection(const QModelIndex &index); | ||
57 | void customEvent(QEvent *ev) override; | 58 | void customEvent(QEvent *ev) override; | ||
58 | 59 | | |||
59 | private: | 60 | private: | ||
60 | void setSelection(const QUrl &target_url, bool do_openURLreq=true); | 61 | void setSelection(const QUrl &target_url, bool do_openURLreq=true); | ||
61 | void setSelectionIndex(const QModelIndex &index); | 62 | void setSelectionIndex(const QModelIndex &index); | ||
62 | QUrl getUrlFromIndex(const QModelIndex &index); | 63 | QUrl getUrlFromIndex(const QModelIndex &index); | ||
63 | QModelIndex resolveIndex(const QModelIndex &index); | 64 | QModelIndex resolveIndex(const QModelIndex &index); | ||
64 | const QModelIndex getIndexFromUrl(const QUrl &url); | 65 | QModelIndex getIndexFromUrl(const QUrl &url) const; | ||
65 | QUrl cleanupURL(const QUrl &url); | 66 | QUrl cleanupURL(const QUrl &url); | ||
66 | 67 | | |||
67 | QTreeView *treeView; | 68 | QTreeView *treeView; | ||
68 | QUrl m_lastURL; | 69 | QUrl m_lastURL; | ||
69 | QUrl m_initURL; | 70 | QUrl m_initURL; | ||
70 | bool m_ignoreHandle = false; | 71 | bool m_ignoreHandle = false; | ||
71 | 72 | | |||
72 | KDirModel *model; | 73 | KDirModel *model; | ||
73 | KDirSortFilterProxyModel *sorted_model; | 74 | KDirSortFilterProxyModel *sorted_model; | ||
74 | }; | 75 | }; | ||
75 | 76 | | |||
76 | #endif | 77 | #endif |