TabbedSetOfTreeEditors.h
Go to the documentation of this file.
1 #ifndef _DBUTILS_GUI_TABBEDSETOFTREEEDITORS_H
2 #define _DBUTILS_GUI_TABBEDSETOFTREEEDITORS_H
3 
4 #include <DatabaseUtils/GUI/Changeable.h>
5 #include <DatabaseUtils/GUI/Storeable.h>
6 #include <QtGui/QTabWidget>
7 
8 namespace dbutils {
9 namespace gui {
10 
11 /**
12  * Class for displaying the tabs that make up the graphical
13  * configuration editor.
14  *
15  * @author Kurt Biery
16  * @version $Revision: 1.6.14.1 $ $Date: 2019/09/27 00:07:04 $
17  */
18 
19 class TabbedSetOfTreeEditors : public QTabWidget, public Changeable,
20  public Storeable
21 {
22  Q_OBJECT
23 
24  public:
25 
26  TabbedSetOfTreeEditors(const std::string& subsystemName,
27  const std::string& configType,
28  const std::vector<std::string>& tableDefinitionList,
29  QWidget *parent = 0);
30 
31  bool loadData(const dbutils::daqconfig::IDSpec& idSpec);
32  bool hasChanges() const;
33  bool saveChanges(const dbutils::daqconfig::IDSpec& oldGlobalIdSpec,
34  const dbutils::daqconfig::IDSpec& newGlobalIdSpec,
36  newGlobalNameSpec);
37  bool addInitialRow();
38 
39  void isTopLevel(bool setting = true) {_isTopLevel = setting;}
40 
41  public slots:
42 
44  void reactToDataSave();
45 
46  signals:
47 
48  void aChangeWasMade();
49  void dataWasSaved();
50 
51  private:
52 
55  std::vector<std::string> _tableDefinitionList;
57 };
58 
59 } // end of namespace gui
60 } // end of namespace dbutils
61 
62 #endif
TabbedSetOfTreeEditors(const std::string &subsystemName, const std::string &configType, const std::vector< std::string > &tableDefinitionList, QWidget *parent=0)
bool loadData(const dbutils::daqconfig::IDSpec &idSpec)
bool saveChanges(const dbutils::daqconfig::IDSpec &oldGlobalIdSpec, const dbutils::daqconfig::IDSpec &newGlobalIdSpec, const dbutils::daqconfig::GlobalNameSpec &newGlobalNameSpec)
std::vector< std::string > _tableDefinitionList
enum BeamMode string