major 'firzifikation'
This commit is contained in:
@@ -144,7 +144,7 @@ XQItem::XQItem(XQItemType* itemType, const QString *content, const XQNodePtr& co
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
XQItem::XQItem(const XQItem& other)
|
||||
: QStandardItem( other )
|
||||
{
|
||||
@@ -152,17 +152,22 @@ XQItem::XQItem(const XQItem& other)
|
||||
// die data() struktur
|
||||
}
|
||||
|
||||
XQItem& XQItem::operator=(const XQItem& other)
|
||||
{
|
||||
if( this != &other)
|
||||
{
|
||||
// kopiert data()
|
||||
this->QStandardItem::operator=( other );
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
*/
|
||||
|
||||
//! firz
|
||||
|
||||
XQItem::~XQItem()
|
||||
{
|
||||
// fixed choices lebt im item type, also
|
||||
// im parent
|
||||
|
||||
//QAbstractItemModel* model = fixedChoices();
|
||||
//if( model )
|
||||
// delete model;
|
||||
}
|
||||
|
||||
|
||||
@@ -178,12 +183,13 @@ XQItem* XQItem::clone() const
|
||||
}
|
||||
|
||||
|
||||
//! firz
|
||||
//! false für ein ungültiges item. 'ungültig' heisst hier, dass nur ein
|
||||
//! mockup-itemtype gesetzt ist.
|
||||
|
||||
bool XQItem::isValid() const
|
||||
{
|
||||
// fragwürdig
|
||||
return QStandardItem::data( XQItem::ItemTypeRole ).value<XQItemType*>() != nullptr;
|
||||
XQItemType* dummyType = XQItemType::staticItemType();
|
||||
return QStandardItem::data( XQItem::ItemTypeRole ).value<XQItemType*>() != dummyType;
|
||||
}
|
||||
|
||||
|
||||
@@ -429,12 +435,14 @@ QString XQItem::fixedChoicesToString() const
|
||||
}
|
||||
|
||||
//! setzt das auswahl-model für read-only comboboxes
|
||||
|
||||
void XQItem::setfixedChoices( QStandardItemModel* newModel )
|
||||
{
|
||||
setData( QVariant::fromValue(newModel), XQItem::FixedChoicesRole);
|
||||
}
|
||||
|
||||
//! true, wenn 'ich' ein header item bin
|
||||
|
||||
bool XQItem::isHeaderStyle()
|
||||
{
|
||||
return renderStyle() == XQItem::HeaderStyle;
|
||||
@@ -442,6 +450,7 @@ bool XQItem::isHeaderStyle()
|
||||
|
||||
|
||||
//! gibt den namen der datarole zurück
|
||||
|
||||
QString XQItem::dataRoleName(int role)
|
||||
{
|
||||
if( role < XQItem::NoRole && model() )
|
||||
@@ -451,6 +460,7 @@ QString XQItem::dataRoleName(int role)
|
||||
|
||||
//! angespasste variante von qstandarditem::setData. geteilte attribute
|
||||
//! werden vom xqitemtype geholt
|
||||
|
||||
QVariant XQItem::data(int role ) const
|
||||
{
|
||||
//emitDataChanged()
|
||||
|
Reference in New Issue
Block a user