Public Member Functions

UnitEditor Class Reference
[Editors]

Editor for units. More...

#include <projecteditor.h>

Inheritance diagram for UnitEditor:
Inheritance graph
[legend]
Collaboration diagram for UnitEditor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 UnitEditor (QWidget *parent=0)

Detailed Description

Editor for units.


Constructor & Destructor Documentation

UnitEditor::UnitEditor ( QWidget parent = 0  )  [inline]

                                    : MappedBaseEditor(parent) {
        setObjectName("UnitEditor");
        setWindowTitle("Unit editor");

        //set source
        setTable("tbl_units", "unit_name", Qt::AscendingOrder);

        // widget setup
        QLabel *name = new QLabel("&Name*:", this);
        QLabel *symbol = new QLabel("&Symbol*:", this);
        QLineEdit *nameEdit = new QLineEdit(this);
        QLineEdit *symbolEdit = new QLineEdit(this);
        name->setBuddy(nameEdit);
        symbol->setBuddy(symbolEdit);

        // add widgets
        addWidget(name, 0, 0, 1, 1);
        addWidget(nameEdit, 0, 1, 1, 1, "unit_name");
        addWidget(symbol, 1, 0, 1, 1);
        addWidget(symbolEdit, 1, 1, 1, 1, "unit_symbol");

        // setup connections
        connect(nameEdit, SIGNAL(textChanged(QString)), this, SLOT(updateButtons()));
        connect(symbolEdit, SIGNAL(textChanged(QString)), this, SLOT(updateButtons()));

        // update changes
        select();
    }


The documentation for this class was generated from the following file: