attributedialog.h
author insilmaril
Fri Feb 01 15:28:36 2008 +0000 (2008-02-01)
changeset 667 1eb1c030c3ae
parent 626 96c8e6860e0c
permissions -rw-r--r--
Added brasilian translation by Amadeu Júnior
     1 #ifndef ATTRIBUTEDIALOG_H
     2 #define ATTRIBUTEDIALOG_H
     3 
     4 #include "attribute.h"
     5 #include "branchobj.h"
     6 
     7 #include <QDialog>
     8 #include <QCloseEvent>
     9 #include <QtGui/QHBoxLayout>
    10 #include <QtGui/QPushButton>
    11 #include <QtGui/QSpacerItem>
    12 #include <QtGui/QVBoxLayout>
    13 
    14 
    15 /*! \brief Set the dialog mode  */
    16 enum AttributeDialogMode {
    17 	Definition,	//!< Edit attribute definitions (AttributeDef)
    18 	Object		//!< Edit attributes of OrnamentedObj
    19 };
    20 
    21 class AttributeDialog:public QDialog
    22 {
    23 	Q_OBJECT 
    24 public:
    25 	AttributeDialog (QWidget *parent=0 );
    26 	void setTable (AttributeTable *table=0);
    27 	void setBranch (BranchObj *bo);
    28 	void setMode (const AttributeDialogMode &m);
    29 	void updateTable();
    30 signals:
    31 	void windowClosed();
    32 private slots:
    33 	void addKey();
    34 protected:
    35 	void closeEvent(QCloseEvent*);
    36 private:
    37 	QVBoxLayout *vboxLayout;
    38 	QVBoxLayout *tableLayout;
    39     QHBoxLayout *hboxLayout;
    40     QPushButton *addButton;
    41     QSpacerItem *spacerItem;
    42     QPushButton *closeButton;
    43 
    44 	AttributeDialogMode mode;
    45 	AttributeTable *table;
    46 	BranchObj *branch;
    47 };
    48 
    49 #endif