Still works...
This commit is contained in:
@@ -71,7 +71,7 @@ namespace XQAppData
|
||||
insert( "icn29Dummy", QApplication::style()->standardIcon(QStyle::SP_BrowserReload));
|
||||
insert( "icn30Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveFDIcon));
|
||||
insert( "icn31Dummy", QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation));
|
||||
insert( "icn32Dummy", QApplication::style()->standardIcon(QStyle::SP_BrowserStop));
|
||||
insert( "BrowserStop", QApplication::style()->standardIcon(QStyle::SP_BrowserStop));
|
||||
insert( "icn33Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveHDIcon));
|
||||
insert( "icn34Dummy", QApplication::style()->standardIcon(QStyle::SP_MessageBoxQuestion));
|
||||
insert( "icn35Dummy", QApplication::style()->standardIcon(QStyle::SP_CommandLink));
|
||||
@@ -249,3 +249,5 @@ namespace XQAppData
|
||||
}
|
||||
*/
|
||||
}; // namespace XQAppData
|
||||
|
||||
|
||||
|
@@ -32,7 +32,7 @@ XQChildModel::XQChildModel( QObject *parent )
|
||||
|
||||
|
||||
//! erzeugt die basisstruktur des models.
|
||||
|
||||
/*
|
||||
void XQChildModel::initModel(const QString& modelName)
|
||||
{
|
||||
|
||||
@@ -84,16 +84,17 @@ void XQChildModel::initModel(const QString& modelName)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// empty row:
|
||||
XQNodePtr contentNode = XQNode::make_node( sheetNode->tag_name() );
|
||||
XQItemList emptyRow = _itemFactory.makeEmptyRow( contentNode, sheetNode );
|
||||
appendRow( emptyRow );
|
||||
*/
|
||||
// XQNodePtr contentNode = XQNode::make_node( sheetNode->tag_name() );
|
||||
// XQItemList emptyRow = _itemFactory.makeEmptyRow( contentNode, sheetNode );
|
||||
// appendRow( emptyRow );
|
||||
|
||||
|
||||
} // for
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//! erzegut den sichtbaren inhalt des models aus einem root-datenknoten.
|
||||
|
@@ -29,13 +29,10 @@ public:
|
||||
explicit XQChildModel(QObject *parent = nullptr);
|
||||
virtual ~XQChildModel() = default;
|
||||
|
||||
void initModel(const QString& modelName) override;
|
||||
void setContent(const XQNodePtr& contentRoot );
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
//void setupViewProperties() override;
|
||||
void initContextMenu() override;
|
||||
|
||||
|
@@ -34,29 +34,6 @@ XQMainModel::XQMainModel(QObject *parent )
|
||||
|
||||
}
|
||||
|
||||
//! initialisiert dieses model über den namen.
|
||||
|
||||
void XQMainModel::initModel(const QString& modelName)
|
||||
{
|
||||
|
||||
// model rootnode finden -> <DocumentTreeModel>
|
||||
XQNodePtr modelSheet = _itemFactory.findModelSheet( modelName ); // throws
|
||||
|
||||
// #1: über alle sections
|
||||
for( auto& section : modelSheet->children() )
|
||||
{
|
||||
// #2: (optionalen) header erzeugen
|
||||
const XQNodePtr header = section->find_child_by_tag_name( "Header");
|
||||
if( header )
|
||||
{
|
||||
XQItemList list = _itemFactory.makeHeader( header );
|
||||
Q_ASSERT(!list.isEmpty());
|
||||
addSection(list, section );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! erzeugt einen eintrag in der baum-übersicht.
|
||||
|
||||
@@ -79,7 +56,7 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
return newTreeentry;
|
||||
}
|
||||
}
|
||||
throw XQException( "createTreeEntry: main model should not be emtpy!" );
|
||||
throw XQException( "createTreeEntry: main model should not be empty!" );
|
||||
}
|
||||
|
||||
//! leere default implementation
|
||||
|
@@ -32,7 +32,6 @@ public:
|
||||
explicit XQMainModel(QObject *parent = nullptr);
|
||||
virtual ~XQMainModel() = default;
|
||||
|
||||
void initModel(const QString& modelName) override;
|
||||
XQItem* createTreeEntry( XQNodePtr contentNode );
|
||||
|
||||
public slots:
|
||||
|
Reference in New Issue
Block a user