diff -r 96c8e6860e0c -r 11f9124c1cca attributedialog.cpp --- a/attributedialog.cpp Tue Dec 04 12:32:56 2007 +0000 +++ b/attributedialog.cpp Mon Aug 04 10:43:06 2008 +0000 @@ -58,15 +58,47 @@ void AttributeDialog::setTable (AttributeTable *t) { table=t; - updateTable(); } void AttributeDialog::setBranch (BranchObj *bo) { branch=bo; - updateTable(); } +void AttributeDialog::setMode (const AttributeDialogMode &m) +{ + mode=m; + + QString title; + if (mode==Definition) + title= QApplication::translate("Attribute Dialog","AttributeDialog - Edit definitions", 0, QApplication::UnicodeUTF8); + else + title= QApplication::translate("Attribute Dialog","AttributeDialog - Edit %1", 0, QApplication::UnicodeUTF8).arg("objname"); + setWindowTitle(title); +} + +void AttributeDialog::updateTable() +{ + if (table) + { + // Update list of keys and values + QStringList keyList=table->getKeys(); + AttributeWidget *aw; + for (int i=0; isetKey (keyList.at(i) ); + // FIXME aw->setValues (table->getValues (keyList.at(i) )); + aw->show(); + tableLayout->addWidget (aw); + } + + // Update attributes in dialog from data in selected branch + + // TODO + } + +} void AttributeDialog::addKey() { AttributeWidget *aw1=new AttributeWidget (this); @@ -83,27 +115,4 @@ return; } -void AttributeDialog::updateTable() -{ - if (table) - { - // Update list of keys and values - QStringList keyList=table->getKeys(); - AttributeWidget *aw; - int i; - for (i=0; isetKey (keyList.at(i) ); - aw->setValues (table->getValues (keyList.at(i) )); - aw->show(); - tableLayout->addWidget (aw); - } - // Update attributes in dialog from data in selected branch - - // TODO - } - -} -