comparison include/gui/widgets/sidebar.h @ 46:d0adc4aedfc8

*: update... this commit: 1. consolidates dark theme stuff to dark_theme.cpp 2. creates a new widgets folder to store all of our custom widgets 3. creates the list settings page in the information dialog, although much of it is nonfunctional: it doesn't save, and the status doesn't even get filled in... we'll fix this later!
author Paper <mrpapersonic@gmail.com>
date Sat, 23 Sep 2023 01:02:15 -0400
parents
children b7a1c0010ffd
comparison
equal deleted inserted replaced
45:4b05bc7668eb 46:d0adc4aedfc8
1 #ifndef __gui__sidebar_h
2 #define __gui__sidebar_h
3 #include <QItemSelectionModel>
4 #include <QListWidget>
5 #include <QListWidgetItem>
6 class SideBar : public QListWidget {
7 Q_OBJECT
8
9 public:
10 SideBar(QWidget* parent = nullptr);
11 QListWidgetItem* AddItem(QString name, QIcon icon = QIcon());
12 QListWidgetItem* AddSeparator();
13 bool IndexIsSeparator(QModelIndex index) const;
14 static QIcon CreateIcon(const char* file);
15
16 signals:
17 void CurrentItemChanged(int index);
18
19 protected:
20 virtual void mouseMoveEvent(QMouseEvent* event) override;
21 QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index,
22 const QEvent* event) const override;
23 int RemoveSeparatorsFromIndex(int index);
24 };
25 #endif // __gui__sidebar_h