mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-18 05:11:41 +00:00
Load comments, log, and definitions.
This commit is contained in:
parent
2279c765b6
commit
71e03176e6
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 );
|
||||
|
||||
loadTyp();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -71,3 +73,24 @@ void GeorgesTypDialog::log( const QString &msg )
|
|||
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:
|
||||
void setupConnections();
|
||||
void log( const QString &msg );
|
||||
void loadTyp();
|
||||
|
||||
Ui::GeorgesTypDialog m_ui;
|
||||
GeorgesTypDialogPvt *m_pvt;
|
||||
|
|
Loading…
Reference in a new issue