Changeset View
Changeset View
Standalone View
Standalone View
krusader/DiskUsage/dulistview.h
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 97 | DUListViewItem(DiskUsage *diskUsageIn, File *fileIn, QTreeWidgetItem * parent, QTreeWidgetItem * after, | |||
---|---|---|---|---|---|
115 | 115 | | |||
116 | setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless); | 116 | setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless); | ||
117 | diskUsage->addProperty(file, "ListView-Ref", this); | 117 | diskUsage->addProperty(file, "ListView-Ref", this); | ||
118 | } | 118 | } | ||
119 | ~DUListViewItem() override { | 119 | ~DUListViewItem() override { | ||
120 | diskUsage->removeProperty(file, "ListView-Ref"); | 120 | diskUsage->removeProperty(file, "ListView-Ref"); | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE { | 123 | bool operator<(const QTreeWidgetItem &other) const override { | ||
124 | int column = treeWidget() ? treeWidget()->sortColumn() : 0; | 124 | int column = treeWidget() ? treeWidget()->sortColumn() : 0; | ||
125 | 125 | | |||
126 | if (text(0) == "..") | 126 | if (text(0) == "..") | ||
127 | return true; | 127 | return true; | ||
128 | 128 | | |||
129 | const auto *compWith = dynamic_cast< const DUListViewItem * >(&other); | 129 | const auto *compWith = dynamic_cast< const DUListViewItem * >(&other); | ||
130 | if (compWith == nullptr) | 130 | if (compWith == nullptr) | ||
131 | return false; | 131 | return false; | ||
Show All 35 Lines | 165 | public slots: | |||
167 | void slotChanged(File *); | 167 | void slotChanged(File *); | ||
168 | void slotDeleted(File *); | 168 | void slotDeleted(File *); | ||
169 | void slotRightClicked(QTreeWidgetItem *, const QPoint &); | 169 | void slotRightClicked(QTreeWidgetItem *, const QPoint &); | ||
170 | void slotExpanded(QTreeWidgetItem *); | 170 | void slotExpanded(QTreeWidgetItem *); | ||
171 | 171 | | |||
172 | protected: | 172 | protected: | ||
173 | DiskUsage *diskUsage; | 173 | DiskUsage *diskUsage; | ||
174 | 174 | | |||
175 | void mouseDoubleClickEvent(QMouseEvent * e) Q_DECL_OVERRIDE; | 175 | void mouseDoubleClickEvent(QMouseEvent * e) override; | ||
176 | void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; | 176 | void keyPressEvent(QKeyEvent *e) override; | ||
177 | 177 | | |||
178 | private: | 178 | private: | ||
179 | void addDirectory(Directory *dirEntry, QTreeWidgetItem *parent); | 179 | void addDirectory(Directory *dirEntry, QTreeWidgetItem *parent); | ||
180 | bool doubleClicked(QTreeWidgetItem * item); | 180 | bool doubleClicked(QTreeWidgetItem * item); | ||
181 | }; | 181 | }; | ||
182 | 182 | | |||
183 | #endif /* __DU_LISTVIEW_H__ */ | 183 | #endif /* __DU_LISTVIEW_H__ */ | ||
184 | 184 | |