major 'firzifikation'

This commit is contained in:
2025-08-07 10:39:42 +02:00
parent e7213c60b8
commit d70df0cbaa
21 changed files with 208 additions and 80 deletions

View File

@@ -127,8 +127,8 @@ void XQChildModel::initContextMenu()
// __fixme! add a menu title
_contextMenu->clear();
const QModelIndex& curIdx = _treeView->currentIndex();
bool hasSel = curIdx.isValid() && _treeView->selectionModel()->hasSelection();
const QModelIndex& curIdx = _treeTable->currentIndex();
bool hasSel = curIdx.isValid() && _treeTable->selectionModel()->hasSelection();
bool canPaste = _clipBoard.canPaste( curIdx );
_contextMenu->addAction( "icn11Dummy", "Undo", XQCommand::cmdUndo, _undoStack->canUndo() );

View File

@@ -64,9 +64,9 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
{
XQItem* newTreeentry = _itemFactory.makeContentItem( contentNode, section.sheetRootNode );
section.headerItem().appendRow( newTreeentry );
_treeView->expand( section.modelIndex );
_treeTable->expand( section.modelIndex );
// ??
_treeView->setCurrentIndex( section.modelIndex );
_treeTable->setCurrentIndex( section.modelIndex );
newTreeentry->setContentNode(contentNode);
emit xqItemCreated( newTreeentry );
return newTreeentry;

View File

@@ -70,7 +70,7 @@ void XQMainWindow::initMainWindow()
_mainTreeView->setCurrentIndex( item->index() );
// ... we set the current view to this node
if( _documentStore.contains( pID ) )
_tabWidget->setCurrentWidget( _documentStore[pID].modelView->treeView() );
_tabWidget->setCurrentWidget( _documentStore[pID].modelView->treeTable() );
} );
try
@@ -78,7 +78,7 @@ void XQMainWindow::initMainWindow()
// hand over undostack
_mainModelView.setUndoStack(&_undoStack);
// hand over left side navigation tree
_mainModelView.setTreeView(_mainTreeView);
_mainModelView.setTreeTable(_mainTreeView);
// #1. init the left side main tree view
_mainModelView.initModel( c_MainModelName );
@@ -203,7 +203,7 @@ void XQMainWindow::onTreeItemClicked(const QModelIndex& index )
QString key = entry.attribute(c_ProjectID);
if( _documentStore.contains(key) )
_tabWidget->setCurrentWidget( _documentStore[key].modelView->treeView() );
_tabWidget->setCurrentWidget( _documentStore[key].modelView->treeTable() );
}
@@ -259,7 +259,7 @@ void XQMainWindow::loadDocument( const QString& fileName )
// Den globalen undo-stack ...
childModel->setUndoStack(&_undoStack);
// und die TreeView übergeben
childModel->setTreeView(childTreeView);
childModel->setTreeTable(childTreeView);
// read the model data
childModel->setContent( contentRoot->first_child() );