OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extendedcommandconfigurator.hpp
Go to the documentation of this file.
1 #ifndef CSVWORLD_EXTENDEDCOMMANDCONFIGURATOR_HPP
2 #define CSVWORLD_EXTENDEDCOMMANDCONFIGURATOR_HPP
3 
4 #include <map>
5 
6 #include <QWidget>
7 
8 #include "../../model/world/universalid.hpp"
9 
10 class QPushButton;
11 class QGroupBox;
12 class QCheckBox;
13 class QLabel;
14 class QHBoxLayout;
15 
16 namespace CSMDoc
17 {
18  class Document;
19 }
20 
21 namespace CSMWorld
22 {
23  class CommandDispatcher;
24  class Data;
25 }
26 
27 namespace CSVWorld
28 {
30  {
31  Q_OBJECT
32 
33  public:
35 
36  private:
37  typedef std::map<QCheckBox *, CSMWorld::UniversalId> CheckBoxMap;
38 
39  QPushButton *mPerformButton;
40  QPushButton *mCancelButton;
41  QGroupBox *mTypeGroup;
45 
49  std::vector<std::string> mSelectedIds;
50 
51  bool mEditLock;
52 
53  void setupGroupLayout();
54  void setupCheckBoxes(const std::vector<CSMWorld::UniversalId> &types);
55  void lockWidgets(bool locked);
56 
57  public:
59  const CSMWorld::UniversalId &id,
60  QWidget *parent = 0);
61 
62  void configure(Mode mode, const std::vector<std::string> &selectedIds);
63  void setEditLock(bool locked);
64 
65  protected:
66  virtual void resizeEvent(QResizeEvent *event);
67 
68  private slots:
70  void checkBoxStateChanged(int state);
71  void dataIdListChanged();
72 
73  signals:
74  void done();
75  };
76 }
77 
78 #endif
void checkBoxStateChanged(int state)
Definition: extendedcommandconfigurator.cpp:197
void lockWidgets(bool locked)
Definition: extendedcommandconfigurator.cpp:159
Definition: extendedcommandconfigurator.hpp:34
static const struct @2 signals[]
std::vector< std::string > mSelectedIds
Definition: extendedcommandconfigurator.hpp:49
Mode mMode
Definition: extendedcommandconfigurator.hpp:46
CSMWorld::Data & mData
Definition: extendedcommandconfigurator.hpp:48
void setupCheckBoxes(const std::vector< CSMWorld::UniversalId > &types)
Definition: extendedcommandconfigurator.cpp:122
int mNumChecked
Definition: extendedcommandconfigurator.hpp:44
void setupGroupLayout()
Definition: extendedcommandconfigurator.cpp:84
void setEditLock(bool locked)
Definition: extendedcommandconfigurator.cpp:69
void configure(Mode mode, const std::vector< std::string > &selectedIds)
Definition: extendedcommandconfigurator.cpp:53
Definition: extendedcommandconfigurator.hpp:34
int mNumUsedCheckBoxes
Definition: extendedcommandconfigurator.hpp:43
Definition: extendedcommandconfigurator.hpp:29
void dataIdListChanged()
Definition: extendedcommandconfigurator.cpp:214
Mode
Definition: extendedcommandconfigurator.hpp:34
CSMWorld::CommandDispatcher * mCommandDispatcher
Definition: extendedcommandconfigurator.hpp:47
Definition: commanddispatcher.hpp:20
Definition: data.hpp:77
CheckBoxMap mTypeCheckBoxes
Definition: extendedcommandconfigurator.hpp:42
Definition: document.hpp:57
Definition: extendedcommandconfigurator.hpp:34
void performExtendedCommand()
Definition: extendedcommandconfigurator.cpp:171
QPushButton * mCancelButton
Definition: extendedcommandconfigurator.hpp:40
QPushButton * mPerformButton
Definition: extendedcommandconfigurator.hpp:39
std::map< QCheckBox *, CSMWorld::UniversalId > CheckBoxMap
Definition: extendedcommandconfigurator.hpp:37
ExtendedCommandConfigurator(CSMDoc::Document &document, const CSMWorld::UniversalId &id, QWidget *parent=0)
Definition: extendedcommandconfigurator.cpp:16
bool mEditLock
Definition: extendedcommandconfigurator.hpp:51
QGroupBox * mTypeGroup
Definition: extendedcommandconfigurator.hpp:41
virtual void resizeEvent(QResizeEvent *event)
Definition: extendedcommandconfigurator.cpp:78
Definition: universalid.hpp:12