Changeset View
Changeset View
Standalone View
Standalone View
src/panels/places/placespanel.h
Show All 36 Lines | |||||
37 | class PlacesPanel : public Panel | 37 | class PlacesPanel : public Panel | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | 40 | | |||
41 | public: | 41 | public: | ||
42 | explicit PlacesPanel(QWidget* parent); | 42 | explicit PlacesPanel(QWidget* parent); | ||
43 | ~PlacesPanel() override; | 43 | ~PlacesPanel() override; | ||
44 | void proceedWithTearDown(); | 44 | void proceedWithTearDown(); | ||
45 | QAction* actionShowAllPlaces(); | ||||
elvisangelaccio: Please create the action/checkbox in `DolphinMainWindow` and just add a public slot here in the… | |||||
45 | 46 | | |||
46 | signals: | 47 | signals: | ||
47 | void placeActivated(const QUrl& url); | 48 | void placeActivated(const QUrl& url); | ||
48 | void placeMiddleClicked(const QUrl& url); | 49 | void placeMiddleClicked(const QUrl& url); | ||
49 | void errorMessage(const QString& error); | 50 | void errorMessage(const QString& error); | ||
50 | void storageTearDownRequested(const QString& mountPath); | 51 | void storageTearDownRequested(const QString& mountPath); | ||
51 | void storageTearDownExternallyRequested(const QString& mountPath); | 52 | void storageTearDownExternallyRequested(const QString& mountPath); | ||
52 | 53 | | |||
53 | protected: | 54 | protected: | ||
This signal is a bit confusing. I'd prefer using: void hiddenCountChanged(int hiddenCount); since it's how you are actually using it. elvisangelaccio: This signal is a bit confusing. I'd prefer using:
void hiddenCountChanged(int hiddenCount)… | |||||
54 | bool urlChanged() override; | 55 | bool urlChanged() override; | ||
55 | void showEvent(QShowEvent* event) override; | 56 | void showEvent(QShowEvent* event) override; | ||
56 | 57 | | |||
57 | public slots: | 58 | public slots: | ||
58 | void readSettings() override; | 59 | void readSettings() override; | ||
59 | 60 | | |||
The slotXXX prefix is usually used for private slots. We can just call it showHiddenEntries(). elvisangelaccio: The `slotXXX` prefix is usually used for private slots. We can just call it `showHiddenEntries… | |||||
60 | private slots: | 61 | private slots: | ||
61 | void slotItemActivated(int index); | 62 | void slotItemActivated(int index); | ||
62 | void slotItemMiddleClicked(int index); | 63 | void slotItemMiddleClicked(int index); | ||
63 | void slotItemContextMenuRequested(int index, const QPointF& pos); | 64 | void slotItemContextMenuRequested(int index, const QPointF& pos); | ||
64 | void slotViewContextMenuRequested(const QPointF& pos); | 65 | void slotViewContextMenuRequested(const QPointF& pos); | ||
65 | void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event); | 66 | void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event); | ||
66 | void slotItemDropEventStorageSetupDone(int index, bool success); | 67 | void slotItemDropEventStorageSetupDone(int index, bool success); | ||
67 | void slotAboveItemDropEvent(int index, QGraphicsSceneDragDropEvent* event); | 68 | void slotAboveItemDropEvent(int index, QGraphicsSceneDragDropEvent* event); | ||
Show All 20 Lines | 86 | private: | |||
88 | PlacesView* m_view; | 89 | PlacesView* m_view; | ||
89 | 90 | | |||
90 | QUrl m_storageSetupFailedUrl; | 91 | QUrl m_storageSetupFailedUrl; | ||
91 | Qt::MouseButton m_triggerStorageSetupButton; | 92 | Qt::MouseButton m_triggerStorageSetupButton; | ||
92 | 93 | | |||
93 | int m_itemDropEventIndex; | 94 | int m_itemDropEventIndex; | ||
94 | QMimeData* m_itemDropEventMimeData; | 95 | QMimeData* m_itemDropEventMimeData; | ||
95 | QDropEvent* m_itemDropEvent; | 96 | QDropEvent* m_itemDropEvent; | ||
97 | QAction* m_showAllAction; | ||||
96 | }; | 98 | }; | ||
97 | 99 | | |||
98 | #endif // PLACESPANEL_H | 100 | #endif // PLACESPANEL_H |
Please create the action/checkbox in DolphinMainWindow and just add a public slot here in the panel.