remorked sections.
This commit is contained in:
@@ -175,24 +175,33 @@ void XQViewModel::addSection(const XQItemList& list, const XQNodePtr& sectionNod
|
||||
}
|
||||
|
||||
|
||||
//! SLOT, toggled die section mit dem 'sectionKey' (hier: contentType)
|
||||
|
||||
void XQViewModel::onToggleSection(const QString& sectionKey )
|
||||
{
|
||||
qDebug() << " --- onToggleSection: " << sectionKey;
|
||||
if( _sections.hasValidSection( sectionKey ) && _treeTable )
|
||||
{
|
||||
//const XQModelSection& section =_sections.sectionByKey(sectionKey);
|
||||
toggleSection( _sections.sectionByKey(sectionKey) );
|
||||
}
|
||||
|
||||
|
||||
//! toggled die gegebene model section.
|
||||
|
||||
void XQViewModel::toggleSection( const XQModelSection& section )
|
||||
{
|
||||
qDebug() << " --- toggleSection: " << section.contentType();
|
||||
if( section.isValid() && _treeTable )
|
||||
{
|
||||
XQSectionRange pos = _sections.sectionRange(section);
|
||||
//int fstRow = _sections.firstRow(index);
|
||||
//int lstRow = _sections.lastRow(index);
|
||||
//_treeTable->toggleRowsHidden(fstRow, lstRow);
|
||||
|
||||
// hier nicht!?
|
||||
//emit sectionToggled(section);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//! SLOT als weiterleitung vom SIGNAL itemchanged
|
||||
|
||||
@@ -463,7 +472,7 @@ void XQViewModel::cmdNew( const XQCommand& command )
|
||||
|
||||
|
||||
//...
|
||||
const XQModelSection& section = _sections.sectionByIndex( origin );
|
||||
const XQModelSection& section = _sections.sectionByRow( origin.row() );
|
||||
|
||||
// neue, leere zeile erzeugen ...
|
||||
XQItemList list =_itemFactory.makeRow( section.sheetRootNode(), newNode );
|
||||
@@ -489,14 +498,13 @@ void XQViewModel::cmdNewUndo( const XQCommand& command )
|
||||
|
||||
//! schaltet eine section sichtbar oder unsichtbar.
|
||||
|
||||
/*
|
||||
void XQViewModel::cmdToggleSection( const XQCommand& command )
|
||||
{
|
||||
const QModelIndex& index = command.originIndex();
|
||||
Q_ASSERT(index.isValid());
|
||||
toggleSection( _sections.sectionByIndex(index) );
|
||||
toggleSection( _sections.sectionByRow(index.row()) );
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//! gibt die treetable zurück
|
||||
|
||||
|
Reference in New Issue
Block a user