-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathSelectItemsPopup.h
More file actions
44 lines (30 loc) · 882 Bytes
/
SelectItemsPopup.h
File metadata and controls
44 lines (30 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SELECTITEMS_H
#define SELECTITEMS_H
#include <QDialog>
#include <QModelIndex>
#include <string>
#include <vector>
class QAbstractButton;
namespace Ui {
class SelectItemsPopup;
}
class SelectItemsPopup : public QDialog
{
Q_OBJECT
public:
explicit SelectItemsPopup(const std::vector<std::string>& available, const std::vector<std::string>& selected = {}, QWidget* parent = nullptr);
~SelectItemsPopup() override;
std::vector<std::string> selectedItems() const;
private slots:
void buttonBoxClicked(QAbstractButton* button);
void selectItem(const QModelIndex& idx = QModelIndex());
void unselectItem(const QModelIndex& idx = QModelIndex());
void moveItemUp();
void moveItemDown();
protected:
void resizeEvent(QResizeEvent* ev) override;
private:
Ui::SelectItemsPopup* ui;
void moveCurrentItem(bool down);
};
#endif