--- mess
This commit is contained in:
@@ -127,6 +127,7 @@ void XQMainWindow::initMainWindow()
|
||||
loadDocument( c_DocumentFileName1 );
|
||||
//loadDocumentQML( c_DocumentFileName2 );
|
||||
//loadDocument( c_DocumentFileName2 );
|
||||
//loadDocument( c_DocumentFileName3 );
|
||||
|
||||
qDebug() << " --- all here: " << XQNode::s_Count;
|
||||
|
||||
@@ -299,7 +300,6 @@ void XQMainWindow::onChildViewTabClicked( int idx )
|
||||
|
||||
void XQMainWindow::onSectionCreated( const XQModelSection& section )
|
||||
{
|
||||
//qDebug() << " --- XXX section created: " << section.contentType() << ":" << section.sheetRootNode()->to_string();
|
||||
if( _currentProjectItem )
|
||||
{
|
||||
_mainModel.addSectionItem( section, _currentProjectItem );
|
||||
@@ -312,10 +312,31 @@ void XQMainWindow::onSectionCreated( const XQModelSection& section )
|
||||
void XQMainWindow::onSectionToggled( const XQModelSection& section )
|
||||
{
|
||||
qDebug() << " --- XXX section toggled: " << section.contentType() << ":" << section.sheetRootNode()->to_string();
|
||||
if( _currentProjectItem )
|
||||
{
|
||||
|
||||
qDebug() << " --- XXX section toggled 2: " << _currentProjectItem->text();
|
||||
for (int row = 0; row < _currentProjectItem->rowCount(); ++row)
|
||||
{
|
||||
QStandardItem* child = _currentProjectItem->child(row);
|
||||
qDebug() << " --- XXX section toggled 3: " << child->text();
|
||||
if (child->text() == section.contentType() )
|
||||
{
|
||||
// rekursion vermeiden
|
||||
_currentProjectItem->model()->blockSignals( true );
|
||||
bool checked = (child->checkState() == Qt::Checked);
|
||||
qDebug() << " --- XXX section toggled 4: " << child->text() << " ->" << checked;
|
||||
child->setCheckState( checked ? Qt::Unchecked :Qt::Checked );
|
||||
_currentProjectItem->model()->blockSignals( false );
|
||||
_mainTreeView->repaint();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! firz
|
||||
//! aktiviert das tab, das zum dokument mit dem schlüssel 'key' gehört.
|
||||
|
||||
void XQMainWindow::setChildTabByName( const QString& key )
|
||||
{
|
||||
|
Reference in New Issue
Block a user