AddRemoveList.hpp
1 #pragma once
2 #include <QListWidget>
3 
4 #include <score_lib_base_export.h>
5 
6 #include <verdigris>
7 namespace score
8 {
9 class SCORE_LIB_BASE_EXPORT AddRemoveList : public QListWidget
10 {
11  W_OBJECT(AddRemoveList)
12 public:
13  AddRemoveList(const QString& root, const QStringList& data, QWidget* parent);
14 
15  void on_itemChanged(QListWidgetItem* item);
16  void fix(int k);
17 
18  void replaceContent(const QStringList& values);
19  QStringList content() const noexcept;
20  bool sameContent(const QStringList& values);
21 
22  void on_add(const QString& name);
23  void on_remove();
24  void setCount(int i);
25 
26  void changed() E_SIGNAL(SCORE_LIB_BASE_EXPORT, changed)
27 
28  static void sanitize(AddRemoveList* changed, const AddRemoveList* other);
29 
30 private:
31  QString m_root;
32  int m_editing = 0;
33 };
34 }
Definition: AddRemoveList.hpp:10
Base toolkit upon which the software is built.
Definition: Application.cpp:90