Load comments, log, and definitions.

This commit is contained in:
dfighter1985 2014-09-02 23:00:32 +02:00
parent 2279c765b6
commit 71e03176e6
2 changed files with 24 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -23,6 +23,7 @@ private Q_SLOTS:
private:
void setupConnections();
void log( const QString &msg );
void loadTyp();
Ui::GeorgesTypDialog m_ui;
GeorgesTypDialogPvt *m_pvt;