aboutsummaryrefslogtreecommitdiff
path: root/libs/installer_bsplugins/src/GUI/ListDialog.h
blob: 8cd2373fb001817810fbf25b6ac0be1a0dc77528 (plain)
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
#ifndef GUI_LISTDIALOG_H
#define GUI_LISTDIALOG_H

#include "IGeometrySettings.h"

#include <QDialog>

namespace Ui
{
class ListDialog;
}

namespace GUI
{

class ListDialog : public QDialog
{
  Q_OBJECT

public:
  ListDialog(IGeometrySettings<QDialog>& settings, QWidget* parent = nullptr);
  ~ListDialog() noexcept;

  // also saves and restores geometry
  //
  int exec() override;

  void setChoices(QStringList choices);
  [[nodiscard]] QString getChoice() const;

public slots:
  void on_filterEdit_textChanged(QString filter);

private:
  Ui::ListDialog* ui;
  IGeometrySettings<QDialog>& m_Settings;
  QStringList m_Choices;
};

}  // namespace GUI

#endif  // GUI_LISTDIALOG_H