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