myEye = QPixmap( 16, 16 );
myEye.fill( Qt::black );
}
-
- // Set the supported drag actions for the items in the model
- setSupportedDragActions( Qt::MoveAction | Qt::CopyAction );
}
/**
*/
void HYDROGUI_ListModel::setObjects( const Object2VisibleList& theObjects )
{
+ beginResetModel();
myObjects = theObjects;
-
- reset();
+ endResetModel();
}
/**
*/
void HYDROGUI_ListModel::addObject( const Object2Visible& theObject )
{
+ beginResetModel();
myObjects << theObject;
-
- reset();
+ endResetModel();
}
/**
}
}
+ beginResetModel();
myObjects.removeAll(anItem);
-
- reset();
+ endResetModel();
}
return Qt::MoveAction | Qt::CopyAction;
}
+/**
+*/
+Qt::DropActions HYDROGUI_ListModel::supportedDragActions() const
+{
+ // Set the supported drag actions for the items in the model
+ return Qt::MoveAction | Qt::CopyAction;
+}
+
/**
Get list of ids by the list model indexes.
@param theIsToSort defines if the list of ids should be sorted in ascending order
void HYDROGUI_ListModel::undoLastMove()
{
+ beginResetModel();
myObjects = myPrevObjects;
- reset();
+ endResetModel();
}