OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
recordbuttonbar.hpp
Go to the documentation of this file.
1 #ifndef CSV_WORLD_RECORDBUTTONBAR_H
2 #define CSV_WORLD_RECORDBUTTONBAR_H
3 
4 #include <QWidget>
5 
6 #include "../../model/world/universalid.hpp"
7 
8 class QToolButton;
9 class QModelIndex;
10 
11 namespace CSMWorld
12 {
13  class IdTable;
14  class CommandDispatcher;
15 }
16 
17 namespace CSMPrefs
18 {
19  class Setting;
20 }
21 
22 namespace CSVWorld
23 {
24  class TableBottomBox;
25 
36  class RecordButtonBar : public QWidget
37  {
38  Q_OBJECT
39 
44  QToolButton *mPrevButton;
45  QToolButton *mNextButton;
46  QToolButton *mCloneButton;
47  QToolButton *mAddButton;
48  QToolButton *mDeleteButton;
49  QToolButton *mRevertButton;
50  bool mLocked;
51 
52  private:
53 
55 
56  void updatePrevNextButtons();
57 
58  public:
59 
61  CSMWorld::IdTable& table, TableBottomBox *bottomBox = 0,
62  CSMWorld::CommandDispatcher *commandDispatcher = 0, QWidget *parent = 0);
63 
64  void setEditLock (bool locked);
65 
66  public slots:
67 
69 
70  private slots:
71 
72  void settingChanged (const CSMPrefs::Setting *setting);
73 
74  void cloneRequest();
75 
76  void nextId();
77 
78  void prevId();
79 
80  void rowNumberChanged (const QModelIndex& parent, int start, int end);
81 
82  signals:
83 
84  void showPreview();
85 
86  void viewRecord();
87 
88  void switchToRow (int row);
89  };
90 }
91 
92 #endif
QToolButton * mPrevButton
Definition: recordbuttonbar.hpp:44
void updateModificationButtons()
Definition: recordbuttonbar.cpp:13
static const struct @2 signals[]
Definition: idtable.hpp:15
void nextId()
Definition: recordbuttonbar.cpp:173
void settingChanged(const CSMPrefs::Setting *setting)
Definition: recordbuttonbar.cpp:153
void setEditLock(bool locked)
Definition: recordbuttonbar.cpp:141
void rowNumberChanged(const QModelIndex &parent, int start, int end)
Definition: recordbuttonbar.cpp:203
void cloneRequest()
Definition: recordbuttonbar.cpp:159
Button bar for use in dialogue-type subviews.
Definition: recordbuttonbar.hpp:36
void universalIdChanged(const CSMWorld::UniversalId &id)
Definition: recordbuttonbar.cpp:147
QToolButton * mRevertButton
Definition: recordbuttonbar.hpp:49
Definition: tablebottombox.hpp:23
RecordButtonBar(const CSMWorld::UniversalId &id, CSMWorld::IdTable &table, TableBottomBox *bottomBox=0, CSMWorld::CommandDispatcher *commandDispatcher=0, QWidget *parent=0)
Definition: recordbuttonbar.cpp:49
CSMWorld::IdTable & mTable
Definition: recordbuttonbar.hpp:41
Definition: commanddispatcher.hpp:20
QToolButton * mDeleteButton
Definition: recordbuttonbar.hpp:48
void updatePrevNextButtons()
Definition: recordbuttonbar.cpp:26
Definition: setting.hpp:22
CSMWorld::UniversalId mId
Definition: recordbuttonbar.hpp:40
TableBottomBox * mBottom
Definition: recordbuttonbar.hpp:42
CSMWorld::CommandDispatcher * mCommandDispatcher
Definition: recordbuttonbar.hpp:43
QToolButton * mCloneButton
Definition: recordbuttonbar.hpp:46
void prevId()
Definition: recordbuttonbar.cpp:188
bool mLocked
Definition: recordbuttonbar.hpp:50
QToolButton * mAddButton
Definition: recordbuttonbar.hpp:47
QToolButton * mNextButton
Definition: recordbuttonbar.hpp:45
Definition: universalid.hpp:12