1 #ifndef CSV_PREFS_CONTEXTMENULIST_H 2 #define CSV_PREFS_CONTEXTMENULIST_H 3 4 #include <QListWidget> 5 6 class QContextMenuEvent; 7 class QMouseEvent; 8 9 namespace CSVPrefs 10 { 11 class ContextMenuList : public QListWidget 12 { 13 Q_OBJECT 14 15 public: 16 17 ContextMenuList(QWidget* parent = nullptr); 18 19 protected: 20 21 void contextMenuEvent(QContextMenuEvent* e) override; 22 23 void mousePressEvent(QMouseEvent* e) override; 24 25 private slots: 26 27 void resetCategory(); 28 29 void resetAll(); 30 }; 31 } 32 33 #endif 34