|
swift
|
List model. More...
Public Types | |
| using | ContainerType = T |
| Container type. | |
| using | ObjectType = typename T::value_type |
| Container element type. | |
Public Types inherited from QAbstractItemModel | |
| enum | CheckIndexOption |
| enum | LayoutChangeHint |
Public Types inherited from QObject | |
| enum | TimerId |
Public Member Functions | |
| ~CListModelBase ()=default | |
| Destructor. | |
| virtual bool | isValidIndex (const QModelIndex &index) const |
| Valid index (in range) | |
| const ContainerType & | container () const |
| Used container data. | |
| const ContainerType & | containerFiltered () const |
| Used container data. | |
| const ContainerType & | containerOrFilteredContainer (bool *filtered=nullptr) const |
| Full container or cached filtered container as approproiate. | |
| bool | setInContainer (const QModelIndex &index, const ObjectType &obj) |
| Simple set of data in container, using class is responsible for firing signals etc. More... | |
| virtual int | update (const ContainerType &container, bool sort=true) |
| Update by new container. More... | |
| virtual swift::misc::CWorker * | updateAsync (const ContainerType &container, bool sort=true) |
| Asynchronous update. | |
| virtual void | updateContainerMaybeAsync (const ContainerType &container, bool sort=true) |
| Update by new container. | |
| virtual void | update (const QModelIndex &index, const ObjectType &object) |
| Update single element. | |
| virtual void | update (int rowIndex, const ObjectType &object) |
| Update single element. | |
| virtual void | moveItems (const ContainerType &items, int position) |
| Move items to position, normally called from dropMimeData. More... | |
| virtual const ObjectType & | at (const QModelIndex &index) const |
| Object at row position. | |
| void | sort () |
| Sort by given sort order. More... | |
| void | resort () |
| Sort by given sort order. More... | |
| void | truncate (int maxNumber, bool forceSort=false) |
| Truncate to given number. | |
| ContainerType | sortContainerByColumn (const ContainerType &container, int column, Qt::SortOrder order) const |
| Sort container by given column / order. This is used by sort() but als for asynchronous updates in the views. More... | |
| virtual void | push_back (const ObjectType &object) |
| Similar to ContainerType::push_back. | |
| virtual void | push_back (const ContainerType &container) |
| Similar to ContainerType::push_back. | |
| virtual void | insert (const ObjectType &object) |
| Similar to ContainerType::insert here inserts at first position. | |
| virtual void | insert (const ContainerType &container) |
| Similar to ContainerType::insert here inserts at first position. | |
| virtual void | remove (const ObjectType &object) |
| Remove object. | |
| template<class K0 , class V0 , class... KeysValues> | |
| int | removeIf (K0 k0, V0 v0, KeysValues... keysValues) |
| Remove elements matching some particular key/value pair(s). More... | |
| virtual void | clear () |
| Clear the list. | |
| virtual bool | isEmpty () const |
| Empty? | |
| bool | hasFilter () const |
| Filter available. | |
| void | removeFilter () |
| Remove filter. | |
| void | takeFilterOwnership (std::unique_ptr< IModelFilter< ContainerType >> &filter) |
| Set the filter. | |
| void | setSelectionModel (swift::gui::models::ISelectionModel< ContainerType > *selectionModel) |
| Set the selection model. | |
Functions from QStandardItemModel | |
| QVariant | data (const QModelIndex &index, int role) const |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) final |
| QMimeData * | mimeData (const QModelIndexList &indexes) const final |
| void | sort (int column, Qt::SortOrder order) final |
| int | rowCount (const QModelIndex &parentIndex=QModelIndex()) const final |
| bool | canDropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const final |
| bool | dropMimeData (const QMimeData *mimeData, Qt::DropAction action, int row, int column, const QModelIndex &parent) final |
Functions from CListModelBaseNonTemplate | |
| QJsonObject | toJson (bool selectedOnly=false) const |
| Convert to JSON. More... | |
| QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented, bool selectedOnly=false) const |
| Convert to JSON string. More... | |
| bool | isOrderable () const |
| Orderable, normally use a container swift::misc::IOrderableList. More... | |
Public Member Functions inherited from swift::gui::models::CListModelBaseNonTemplate | |
| ~CListModelBaseNonTemplate ()=default | |
| Destructor. | |
| virtual swift::misc::CPropertyIndex | columnToPropertyIndex (int column) const |
| Column to property index. | |
| virtual int | propertyIndexToColumn (const swift::misc::CPropertyIndex &propertyIndex) const |
| Property index to column number. | |
| virtual swift::misc::CPropertyIndex | modelIndexToPropertyIndex (const QModelIndex &index) const |
| Index to property index. | |
| virtual void | setSortColumn (int column) |
| Set sort column. | |
| void | setNoSorting () |
| Disable sorting. | |
| void | sortByPropertyIndex (const swift::misc::CPropertyIndex &propertyIndex, Qt::SortOrder order=Qt::AscendingOrder) |
| Sort by index. | |
| virtual bool | setSortColumnByPropertyIndex (const swift::misc::CPropertyIndex &propertyIndex) |
| Set column for sorting. More... | |
| virtual bool | setSorting (const swift::misc::CPropertyIndex &propertyIndex, Qt::SortOrder order=Qt::AscendingOrder) |
| Sorting. | |
| virtual int | getSortColumn () const |
| Get sort column property index. | |
| swift::misc::CPropertyIndex | getSortProperty () const |
| Sorted by property. | |
| virtual bool | hasValidSortColumn () const |
| Has valid sort column? | |
| virtual Qt::SortOrder | getSortOrder () const |
| Get sort order. | |
| void | markDestroyed () |
| Mark as about to be destroyed, normally marked from view. | |
| bool | isModelDestroyed () |
| Model about to be destroyed? | |
| virtual void | clearHighlighting () |
| Remove all highlighting. | |
| virtual bool | hasHighlightedRows () const |
| Has highlighted rows? | |
| void | setDropActions (Qt::DropActions dropActions) |
| Drop actions. | |
| void | emitDataChanged (int startRowIndex, int endRowIndex) |
| Send signal that data have been changed. More... | |
| const CColumns & | getColumns () const |
| The columns. | |
| bool | endsWithEmptyColumn () const |
| Using void column at the end? | |
| int | columnCount (const QModelIndex &modelIndex=QModelIndex()) const final |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const final |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const final |
| QModelIndex | parent (const QModelIndex &child) const final |
| Qt::ItemFlags | flags (const QModelIndex &index) const final |
| Qt::DropActions | supportedDragActions () const final |
| Qt::DropActions | supportedDropActions () const final |
| QStringList | mimeTypes () const final |
Public Member Functions inherited from QStandardItemModel | |
| QBindable< int > | bindableSortRole () |
| QList< QStandardItem * > | takeColumn (int column) |
| QList< QStandardItem * > | takeRow (int row) |
| QStandardItem * | takeHorizontalHeaderItem (int column) |
| QStandardItem * | takeItem (int row, int column) |
| QStandardItem * | takeVerticalHeaderItem (int row) |
| QStandardItemModel (QObject *parent) | |
| QStandardItemModel (int rows, int columns, QObject *parent) | |
| virtual bool | clearItemData (const QModelIndex &index) override |
| bool | insertColumn (int column, const QModelIndex &parent) |
| virtual bool | insertColumns (int column, int count, const QModelIndex &parent) override |
| bool | insertRow (int row, const QModelIndex &parent) |
| virtual bool | insertRows (int row, int count, const QModelIndex &parent) override |
| virtual bool | removeColumns (int column, int count, const QModelIndex &parent) override |
| virtual bool | removeRows (int row, int count, const QModelIndex &parent) override |
| virtual bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) override |
| virtual bool | setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles) override |
| void | appendColumn (const QList< QStandardItem * > &items) |
| void | appendRow (QStandardItem *item) |
| void | appendRow (const QList< QStandardItem * > &items) |
| void | clear () |
| void | insertColumn (int column, const QList< QStandardItem * > &items) |
| void | insertRow (int row, QStandardItem *item) |
| void | insertRow (int row, const QList< QStandardItem * > &items) |
| void | itemChanged (QStandardItem *item) |
| void | setColumnCount (int columns) |
| void | setHorizontalHeaderItem (int column, QStandardItem *item) |
| void | setHorizontalHeaderLabels (const QStringList &labels) |
| void | setItem (int row, QStandardItem *item) |
| void | setItem (int row, int column, QStandardItem *item) |
| void | setItemPrototype (const QStandardItem *item) |
| void | setItemRoleNames (const QHash< int, QByteArray > &roleNames) |
| void | setRowCount (int rows) |
| void | setSortRole (int role) |
| void | setVerticalHeaderItem (int row, QStandardItem *item) |
| void | setVerticalHeaderLabels (const QStringList &labels) |
| virtual QHash< int, QByteArray > | roleNames () const const override |
| QList< QStandardItem * > | findItems (const QString &text, Qt::MatchFlags flags, int column) const const |
| virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const const override |
| QModelIndex | indexFromItem (const QStandardItem *item) const const |
| QStandardItem * | horizontalHeaderItem (int column) const const |
| QStandardItem * | invisibleRootItem () const const |
| QStandardItem * | item (int row, int column) const const |
| QStandardItem * | itemFromIndex (const QModelIndex &index) const const |
| QStandardItem * | verticalHeaderItem (int row) const const |
| virtual bool | hasChildren (const QModelIndex &parent) const const override |
| const QStandardItem * | itemPrototype () const const |
| int | sortRole () const const |
| virtual void | multiData (const QModelIndex &index, QModelRoleDataSpan roleDataSpan) const const override |
Public Member Functions inherited from QAbstractItemModel | |
| QAbstractItemModel (QObject *parent) | |
| bool | insertColumn (int column, const QModelIndex &parent) |
| bool | insertRow (int row, const QModelIndex &parent) |
| bool | moveColumn (const QModelIndex &sourceParent, int sourceColumn, const QModelIndex &destinationParent, int destinationChild) |
| virtual bool | moveColumns (const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) |
| bool | moveRow (const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild) |
| virtual bool | moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) |
| bool | removeColumn (int column, const QModelIndex &parent) |
| bool | removeRow (int row, const QModelIndex &parent) |
| virtual bool | submit () |
| void | columnsAboutToBeInserted (const QModelIndex &parent, int first, int last) |
| void | columnsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) |
| void | columnsAboutToBeRemoved (const QModelIndex &parent, int first, int last) |
| void | columnsInserted (const QModelIndex &parent, int first, int last) |
| void | columnsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) |
| void | columnsRemoved (const QModelIndex &parent, int first, int last) |
| void | dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles) |
| virtual void | fetchMore (const QModelIndex &parent) |
| void | headerDataChanged (Qt::Orientation orientation, int first, int last) |
| void | layoutAboutToBeChanged (const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint) |
| void | layoutChanged (const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint) |
| void | modelAboutToBeReset () |
| void | modelReset () |
| virtual void | revert () |
| void | rowsAboutToBeInserted (const QModelIndex &parent, int start, int end) |
| void | rowsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) |
| void | rowsAboutToBeRemoved (const QModelIndex &parent, int first, int last) |
| void | rowsInserted (const QModelIndex &parent, int first, int last) |
| void | rowsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) |
| void | rowsRemoved (const QModelIndex &parent, int first, int last) |
| virtual QModelIndex | buddy (const QModelIndex &index) const const |
| virtual QModelIndex | sibling (int row, int column, const QModelIndex &index) const const |
| virtual QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const const |
| virtual QSize | span (const QModelIndex &index) const const |
| virtual bool | canFetchMore (const QModelIndex &parent) const const |
| bool | checkIndex (const QModelIndex &index, QAbstractItemModel::CheckIndexOptions options) const const |
| bool | hasIndex (int row, int column, const QModelIndex &parent) const const |
Public Member Functions inherited from QObject | |
| QBindable< QString > | bindableObjectName () |
| QObject (QObject *parent) | |
| QT_NO_CONTEXTLESS_CONNECT QT_NO_CONTEXTLESS_CONNECT | |
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO (Name, Value) | |
| Q_EMIT Q_EMIT | |
| Q_ENUM (...) | |
| Q_ENUMS (...) | |
| Q_ENUM_NS (...) | |
| Q_FLAG (...) | |
| Q_FLAGS (...) | |
| Q_FLAG_NS (...) | |
| Q_GADGET Q_GADGET | |
| Q_GADGET_EXPORT (EXPORT_MACRO) | |
| Q_INTERFACES (...) | |
| Q_INVOKABLE Q_INVOKABLE | |
| Q_MOC_INCLUDE Q_MOC_INCLUDE | |
| Q_NAMESPACE Q_NAMESPACE | |
| Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
| Q_OBJECT Q_OBJECT | |
| Q_PROPERTY (...) | |
| Q_REVISION Q_REVISION | |
| Q_SET_OBJECT_NAME (Object) | |
| Q_SIGNAL Q_SIGNAL | |
| Q_SIGNALS Q_SIGNALS | |
| Q_SLOT Q_SLOT | |
| Q_SLOTS Q_SLOTS | |
| T | qobject_cast (QObject *object) |
| T | qobject_cast (const QObject *object) |
| bool | blockSignals (bool block) |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| bool | moveToThread (QThread *targetThread) |
| bool | setProperty (const char *name, QVariant &&value) |
| bool | setProperty (const char *name, const QVariant &value) |
| int | startTimer (int interval, Qt::TimerType timerType) |
| int | startTimer (std::chrono::nanoseconds interval, Qt::TimerType timerType) |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| void | installEventFilter (QObject *filterObj) |
| void | killTimer (Qt::TimerId id) |
| void | killTimer (int id) |
| void | objectNameChanged (const QString &objectName) |
| void | removeEventFilter (QObject *obj) |
| void | setObjectName (QAnyStringView name) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| QList< QByteArray > | dynamicPropertyNames () const const |
| QList< T > | findChildren (QAnyStringView name, Qt::FindChildOptions options) const const |
| QList< T > | findChildren (Qt::FindChildOptions options) const const |
| QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
| QObject * | parent () const const |
| QString | objectName () const const |
| QThread * | thread () const const |
| QVariant | property (const char *name) const const |
| T | findChild (QAnyStringView name, Qt::FindChildOptions options) const const |
| T | findChild (Qt::FindChildOptions options) const const |
| bool | disconnect (const QObject *receiver, const char *method) const const |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
| bool | inherits (const char *className) const const |
| bool | isQuickItemType () const const |
| bool | isWidgetType () const const |
| bool | isWindowType () const const |
| bool | signalsBlocked () const const |
| virtual const QMetaObject * | metaObject () const const |
| const QObjectList & | children () const const |
| void | dumpObjectInfo () const const |
| void | dumpObjectTree () const const |
Public Member Functions inherited from swift::gui::CDropBase | |
| virtual | ~CDropBase ()=default |
| Dtor. | |
| void | setAcceptedMetaTypeIds (const QList< int > &ids) |
| Accepted ids. | |
| void | addAcceptedMetaTypeId (int id) |
| Accepted ids. | |
| virtual bool | isDropAllowed () const |
| Drop allowed? | |
| virtual bool | isJsonFileDropAllowed () const |
| File drop allowed? | |
| virtual void | allowDrop (bool allowed) |
| Drop allowed. | |
| virtual void | allowJsonFileDrop (bool allow) |
| Allow JSON file drop. | |
| bool | acceptDrop (const QMimeData *mime) const |
| Accept drop? | |
| swift::misc::CVariant | toCVariant (const QMimeData *mime) const |
| Mime data to CVariant (normally encapsulating a value object) | |
Protected Member Functions | |
| CListModelBase (const QString &translationContext, QObject *parent=nullptr) | |
| Constructor. | |
| void | updateFilteredContainer () |
| Update filtered container. | |
| void | emitModelDataChanged () |
| Model changed. | |
Base class overrides | |
| void | onDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomLeft, const QVector< int > &roles) |
| Feedback when QStandardItemModel::dataChanged was called. More... | |
| void | onChangedDigest () |
| Feedback when QStandardItemModel::dataChanged was called. More... | |
Protected Member Functions inherited from swift::gui::models::CListModelBaseNonTemplate | |
| CListModelBaseNonTemplate (const QString &translationContext, QObject *parent=nullptr) | |
| Constructor. More... | |
Protected Member Functions inherited from QAbstractItemModel | |
| bool | beginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) |
| bool | beginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) |
| void | beginInsertColumns (const QModelIndex &parent, int first, int last) |
| void | beginInsertRows (const QModelIndex &parent, int first, int last) |
| void | beginRemoveColumns (const QModelIndex &parent, int first, int last) |
| void | beginRemoveRows (const QModelIndex &parent, int first, int last) |
| void | beginResetModel () |
| void | changePersistentIndex (const QModelIndex &from, const QModelIndex &to) |
| void | changePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to) |
| void | endInsertColumns () |
| void | endInsertRows () |
| void | endMoveColumns () |
| void | endMoveRows () |
| void | endRemoveColumns () |
| void | endRemoveRows () |
| void | endResetModel () |
| virtual void | resetInternalData () |
| QModelIndex | createIndex (int row, int column, const void *ptr) const const |
| QModelIndex | createIndex (int row, int column, quintptr id) const const |
| QModelIndexList | persistentIndexList () const const |
Protected Member Functions inherited from QObject | |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const QMetaMethod &signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const QMetaMethod &signal) |
| virtual void | timerEvent (QTimerEvent *event) |
| QObject * | sender () const const |
| bool | isSignalConnected (const QMetaMethod &signal) const const |
| int | receivers (const char *signal) const const |
| int | senderSignalIndex () const const |
Protected Member Functions inherited from swift::gui::CDropBase | |
| CDropBase ()=default | |
| Ctor. | |
Protected Attributes | |
| ContainerType | m_container |
| used container | |
| ContainerType | m_containerFiltered |
| cache for filtered container data | |
| std::unique_ptr< IModelFilter< ContainerType > > | m_filter |
| used filter | |
| ISelectionModel< ContainerType > * | m_selectionModel = nullptr |
| selection model | |
Protected Attributes inherited from swift::gui::models::CListModelBaseNonTemplate | |
| CColumns | m_columns |
| columns metadata | |
| int | m_sortColumn { -1 } |
| currently sorted column | |
| bool | m_modelDestroyed = false |
| Qt::SortOrder | m_sortOrder { Qt::AscendingOrder } |
| sort order (asc/desc) | |
| Qt::DropActions | m_dropActions = Qt::IgnoreAction |
| drop actions | |
| swift::misc::CPropertyIndexList | m_sortTieBreakers |
| how column values are sorted if equal, if no value is given this is random | |
Additional Inherited Members | |
Signals inherited from swift::gui::models::CListModelBaseNonTemplate | |
| void | asyncUpdateFinished () |
| Asynchronous update finished. | |
| void | modelDataChanged (int count, bool withFilter) |
| Data changed. More... | |
| void | modelDataChangedDigest (int count, bool withFilter) |
| Data changed, digest version. | |
| void | changed () |
| Model has been changed Triggered with each change, for performance consider using changedDigest. | |
| void | changedDigest () |
| Model has been changed, digest signal. | |
| void | objectChanged (const swift::misc::CVariant &object, const swift::misc::CPropertyIndex &changedIndex) |
| Template free information, that object changed. | |
Static Public Member Functions inherited from QObject | |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| bool | disconnect (const QMetaObject::Connection &connection) |
| bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
Public Attributes inherited from QAbstractItemModel | |
| typedef | CheckIndexOptions |
| NoOption | |
| IndexIsValid | |
| DoNotUseParent | |
| ParentIsInvalid | |
| NoLayoutChangeHint | |
| VerticalSortHint | |
| HorizontalSortHint | |
Public Attributes inherited from QObject | |
| typedef | QObjectList |
| Invalid | |
Static Public Attributes inherited from swift::gui::models::CListModelBaseNonTemplate | |
| static constexpr int | asyncThreshold = 50 |
| Number of elements when to use asynchronous updates. | |
Properties inherited from QStandardItemModel | |
| sortRole | |
Properties inherited from QObject | |
| objectName | |
List model.
Definition at line 34 of file listmodelbase.h.
|
finalvirtual |
Reimplemented from QAbstractItemModel.
Definition at line 36 of file listmodelbase.cpp.
|
virtual |
Reimplemented from QStandardItemModel.
Reimplemented in swift::gui::models::CTextMessageListModel, swift::gui::models::CStatusMessageListModel, swift::gui::models::CListModelDbObjects< T, K, false >, swift::gui::models::CListModelDbObjects< swift::misc::aviation::CAirlineIcaoCodeList, int, true >, swift::gui::models::CListModelDbObjects< swift::misc::CCountryList, QString, true >, swift::gui::models::CListModelDbObjects< swift::misc::aviation::CAircraftCategoryList, int, true >, swift::gui::models::CListModelDbObjects< swift::misc::aviation::CAircraftIcaoCodeList, int, true >, swift::gui::models::CListModelDbObjects< swift::misc::aviation::CLiveryList, int, true >, swift::gui::models::CListModelCallsignObjects< swift::misc::simulation::CInterpolationSetupList, false >, swift::gui::models::CListModelCallsignObjects< swift::misc::aviation::CAtcStationList, true >, and swift::gui::models::CListModelCallsignObjects< swift::misc::simulation::CSimulatedAircraftList, true >.
Definition at line 79 of file listmodelbase.cpp.
|
finalvirtual |
Reimplemented from QStandardItemModel.
Definition at line 49 of file listmodelbase.cpp.
|
virtual |
Orderable, normally use a container swift::misc::IOrderableList.
Implements swift::gui::models::CListModelBaseNonTemplate.
Definition at line 586 of file listmodelbase.cpp.
|
finalvirtual |
Reimplemented from QStandardItemModel.
Definition at line 543 of file listmodelbase.cpp.
|
virtual |
Move items to position, normally called from dropMimeData.
Reimplemented in swift::gui::models::COrderableListModelDbObjects< T, K, UseCompare >, swift::gui::models::COrderableListModelDbObjects< swift::misc::simulation::CAircraftModelList, int, true >, and swift::gui::models::COrderableListModelDbObjects< swift::misc::simulation::CDistributorList, QString, true >.
Definition at line 462 of file listmodelbase.cpp.
|
protectedvirtual |
Feedback when QStandardItemModel::dataChanged was called.
Implements swift::gui::models::CListModelBaseNonTemplate.
Definition at line 454 of file listmodelbase.cpp.
|
protectedvirtual |
Feedback when QStandardItemModel::dataChanged was called.
Implements swift::gui::models::CListModelBaseNonTemplate.
Definition at line 443 of file listmodelbase.cpp.
|
inline |
Remove elements matching some particular key/value pair(s).
| k0 | A pointer to a member function of T. |
| v0 | A value to compare against the value returned by k0. |
| keysValues | Zero or more additional pairs of { pointer to member function of T, value to compare it against }. |
Definition at line 162 of file listmodelbase.h.
| void swift::gui::models::CListModelBase< T, UseCompare >::resort |
Sort by given sort order.
Definition at line 476 of file listmodelbase.cpp.
|
finalvirtual |
Reimplemented from QStandardItemModel.
Definition at line 29 of file listmodelbase.cpp.
|
finalvirtual |
Reimplemented from QStandardItemModel.
Definition at line 112 of file listmodelbase.cpp.
| bool swift::gui::models::CListModelBase< T, UseCompare >::setInContainer | ( | const QModelIndex & | index, |
| const ObjectType & | obj | ||
| ) |
Simple set of data in container, using class is responsible for firing signals etc.
Definition at line 144 of file listmodelbase.cpp.
| void swift::gui::models::CListModelBase< T, UseCompare >::sort |
Sort by given sort order.
Definition at line 470 of file listmodelbase.cpp.
|
finalvirtual |
Reimplemented from QStandardItemModel.
Definition at line 483 of file listmodelbase.cpp.
| CListModelBase< T, UseCompare >::ContainerType swift::gui::models::CListModelBase< T, UseCompare >::sortContainerByColumn | ( | const ContainerType & | container, |
| int | column, | ||
| Qt::SortOrder | order | ||
| ) | const |
Sort container by given column / order. This is used by sort() but als for asynchronous updates in the views.
| container | used list |
| column | column inder |
| order | sort order (ascending / descending) |
Definition at line 514 of file listmodelbase.cpp.
|
virtual |
Convert to JSON.
Implements swift::gui::models::CListModelBaseNonTemplate.
Definition at line 570 of file listmodelbase.cpp.
|
virtual |
Convert to JSON string.
Implements swift::gui::models::CListModelBaseNonTemplate.
Definition at line 578 of file listmodelbase.cpp.
|
virtual |
Update by new container.
Reimplemented in swift::gui::models::COrderableListModelDbObjects< T, K, UseCompare >, swift::gui::models::COrderableListModelDbObjects< swift::misc::simulation::CAircraftModelList, int, true >, and swift::gui::models::COrderableListModelDbObjects< swift::misc::simulation::CDistributorList, QString, true >.
Definition at line 154 of file listmodelbase.cpp.