-
Notifications
You must be signed in to change notification settings - Fork 6
/
attributedialog.h
49 lines (42 loc) · 1.06 KB
/
attributedialog.h
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
43
44
45
46
47
48
49
#ifndef ATTRIBUTEDIALOG_H
#define ATTRIBUTEDIALOG_H
#include "attribute.h"
#include "branchobj.h"
#include <QDialog>
#include <QCloseEvent>
#include <QtGui/QHBoxLayout>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QVBoxLayout>
/*! \brief Set the dialog mode */
enum AttributeDialogMode {
Definition, //!< Edit attribute definitions (AttributeDef)
Object //!< Edit attributes of OrnamentedObj
};
class AttributeDialog:public QDialog
{
Q_OBJECT
public:
AttributeDialog (QWidget *parent=0 );
void setTable (AttributeTable *table=0);
void setBranch (BranchObj *bo);
void setMode (const AttributeDialogMode &m);
void updateTable();
signals:
void windowClosed();
private slots:
void addKey();
protected:
void closeEvent(QCloseEvent*);
private:
QVBoxLayout *vboxLayout;
QVBoxLayout *tableLayout;
QHBoxLayout *hboxLayout;
QPushButton *addButton;
QSpacerItem *spacerItem;
QPushButton *closeButton;
AttributeDialogMode mode;
AttributeTable *table;
BranchObj *branch;
};
#endif