summaryrefslogtreecommitdiff
path: root/src/modlistview.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-27 16:04:49 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:14 +0100
commit44103ef737090dd74666f98fc6953d40d36adbd4 (patch)
tree9db679e52337f2cebd53aa8253241977b6571675 /src/modlistview.h
parent064caa6ef49f09eb286e04e3b5673bfc1c540c1d (diff)
Disable auto-collapsing after delay.
Diffstat (limited to 'src/modlistview.h')
-rw-r--r--src/modlistview.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/modlistview.h b/src/modlistview.h
index 6cd114b0..982591a3 100644
--- a/src/modlistview.h
+++ b/src/modlistview.h
@@ -10,15 +10,27 @@ class ModListView : public QTreeView
Q_OBJECT
public:
explicit ModListView(QWidget *parent = 0);
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void setModel(QAbstractItemModel *model);
+ void setModel(QAbstractItemModel *model) override;
+
signals:
void dropModeUpdate(bool dropOnRows);
-
+
public slots:
+
+protected:
+
+ // replace the auto-expand timer from QTreeView to avoid
+ // auto-collapsing
+ QBasicTimer openTimer;
+
+ void timerEvent(QTimerEvent* event) override;
+ void dragMoveEvent(QDragMoveEvent* event) override;
+ void dragEnterEvent(QDragEnterEvent* event) override;
+
private:
ViewMarkingScrollBar *m_Scrollbar;
+
};
#endif // MODLISTVIEW_H