mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Load comments, log, and definitions.
This commit is contained in:
parent
3b270c3e9e
commit
a76a6b6e85
2 changed files with 24 additions and 0 deletions
|
@ -43,6 +43,8 @@ bool GeorgesTypDialog::load( const QString &fileName )
|
||||||
|
|
||||||
m_pvt->typ = dynamic_cast< NLGEORGES::CType* >( utyp );
|
m_pvt->typ = dynamic_cast< NLGEORGES::CType* >( utyp );
|
||||||
|
|
||||||
|
loadTyp();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,3 +73,24 @@ void GeorgesTypDialog::log( const QString &msg )
|
||||||
m_ui.logEdit->appendPlainText( logMsg );
|
m_ui.logEdit->appendPlainText( logMsg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GeorgesTypDialog::loadTyp()
|
||||||
|
{
|
||||||
|
m_ui.logEdit->setPlainText( m_pvt->typ->Header.Log.c_str() );
|
||||||
|
m_ui.commentEdit->setPlainText( m_pvt->typ->Header.Comments.c_str() );
|
||||||
|
|
||||||
|
std::vector< NLGEORGES::CType::CDefinition >::iterator itr = m_pvt->typ->Definitions.begin();
|
||||||
|
while( itr != m_pvt->typ->Definitions.end() )
|
||||||
|
{
|
||||||
|
NLGEORGES::CType::CDefinition &def = *itr;
|
||||||
|
|
||||||
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
|
item->setText( 0, def.Label.c_str() );
|
||||||
|
item->setText( 1, def.Value.c_str() );
|
||||||
|
m_ui.tree->addTopLevelItem( item );
|
||||||
|
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ private Q_SLOTS:
|
||||||
private:
|
private:
|
||||||
void setupConnections();
|
void setupConnections();
|
||||||
void log( const QString &msg );
|
void log( const QString &msg );
|
||||||
|
void loadTyp();
|
||||||
|
|
||||||
Ui::GeorgesTypDialog m_ui;
|
Ui::GeorgesTypDialog m_ui;
|
||||||
GeorgesTypDialogPvt *m_pvt;
|
GeorgesTypDialogPvt *m_pvt;
|
||||||
|
|
Loading…
Reference in a new issue