wrecked it on purpose.

This commit is contained in:
2025-08-21 22:40:33 +02:00
parent 306a68f6c9
commit b6299be24b
6 changed files with 22 additions and 142 deletions

View File

@@ -123,7 +123,7 @@ void XQMainWindow::initMainWindow()
_mainModelView.initModel( c_MainModelName );
// #2. load demo data
//loadDocument( c_DocumentFileName1 );
loadDocument( c_DocumentFileName1 );
//loadDocument( c_DocumentFileName2 );
qDebug() << " --- all here: " << XQNode::s_Count;
@@ -265,13 +265,14 @@ void XQMainWindow::onTreeItemClicked(const QModelIndex& index )
XQNodePtr ptr = variant.value<XQNodePtr>();
/*
QString key = entry.attribute(c_ProjectID);
qDebug() << " --- FIRZ: key: " << key;
bool isThere = _documentStore.contains(key);
if( isThere)
_tabWidget->setCurrentWidget( _documentStore[key].modelView->treeTable() );
*/
}
@@ -279,9 +280,9 @@ void XQMainWindow::onTreeItemClicked(const QModelIndex& index )
void XQMainWindow::onTabClicked( int index )
{
const QString& key = _documentStore[index].treeItem->attribute( c_ProjectID );
qDebug() << " ---- tab clicked: " << index << " : " << _documentStore[index].friendlyName << ": " << key;
_mainTreeView->setCurrentIndex( _documentStore[index].treeItem->index() );
//const QString& key = _documentStore[index].treeItem->attribute( c_ProjectID );
qDebug() << " ---- tab clicked: " << index << " : " << _documentStore[index].friendlyName;// << ": " << key;
//_mainTreeView->setCurrentIndex( _documentStore[index].treeItem->index() );
}
void XQMainWindow::onSectionCreated( const XQModelSection& section )
@@ -347,8 +348,8 @@ void XQMainWindow::loadDocument( const QString& fileName )
childModel->setTreeTable(childTreeView);
// neuen eintrag im übsichts-baum erzeugen
_currentProjectItem = _mainModelView.addProjectItem( contentRoot );
_documentStore.addDocument( fileName, pTitle, _currentProjectItem, childModel );
//_currentProjectItem = _mainModelView.addProjectItem( contentRoot );
//_documentStore.addDocument( fileName, pTitle, _currentProjectItem, childModel );
qDebug() << " --- ZZZ und jetzt:";