| 
    Wt
    4.0.0
    
   | 
 
A read-only wrapper for a source model. More...
#include <Wt/WReadOnlyProxyModel.h>

Public Member Functions | |
| WReadOnlyProxyModel () | |
| Constructor.  | |
| virtual WModelIndex | mapFromSource (const WModelIndex &sourceIndex) const override | 
| Maps a source model index to the proxy model.  More... | |
| virtual WModelIndex | mapToSource (const WModelIndex &proxyIndex) const override | 
| Maps a proxy model index to the source model.  More... | |
| virtual int | columnCount (const WModelIndex &parent=WModelIndex()) const override | 
| Returns the number of columns.  More... | |
| virtual int | rowCount (const WModelIndex &parent=WModelIndex()) const override | 
| Returns the number of rows.  More... | |
| virtual WModelIndex | parent (const WModelIndex &index) const override | 
| Returns the parent for a model index.  More... | |
| virtual WModelIndex | index (int row, int column, const WModelIndex &parent=WModelIndex()) const override | 
| Returns the child index for the given row and column.  More... | |
| virtual bool | setData (const WModelIndex &index, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit) override | 
Always returns false and has no effect.  More... | |
| virtual bool | setItemData (const WModelIndex &index, const DataMap &values) override | 
Always returns false and has no effect.  More... | |
| virtual bool | setHeaderData (int section, Orientation orientation, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit) override | 
Always returns false and has no effect.  More... | |
| virtual bool | insertColumns (int column, int count, const WModelIndex &parent) override | 
Always returns false and has no effect.  More... | |
| virtual bool | removeColumns (int column, int count, const WModelIndex &parent) override | 
Always returns false and has no effect.  More... | |
| virtual void | dropEvent (const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent) override | 
| Has no effect.  More... | |
  Public Member Functions inherited from Wt::WAbstractProxyModel | |
| WAbstractProxyModel () | |
| Constructor.  | |
| virtual void | setSourceModel (const std::shared_ptr< WAbstractItemModel > &sourceModel) | 
| Sets the source model.  More... | |
| std::shared_ptr< WAbstractItemModel > | sourceModel () const | 
| Returns the source model.  More... | |
| virtual cpp17::any | data (const WModelIndex &index, ItemDataRole role=ItemDataRole::Display) const override | 
| Returns the data at a specific model index.  More... | |
| virtual cpp17::any | headerData (int section, Orientation orientation=Orientation::Horizontal, ItemDataRole role=ItemDataRole::Display) const override | 
| Returns the row or column header data.  More... | |
| virtual WFlags< ItemFlag > | flags (const WModelIndex &index) const override | 
| Returns the flags for an item.  More... | |
| virtual WFlags< HeaderFlag > | headerFlags (int section, Orientation orientation=Orientation::Horizontal) const override | 
| Returns the flags for a header.  More... | |
| virtual std::string | mimeType () const override | 
| Returns a mime-type for dragging a set of indexes.  More... | |
| virtual std::vector< std::string > | acceptDropMimeTypes () const override | 
| Returns a list of mime-types that could be accepted for a drop event.  More... | |
| virtual void * | toRawIndex (const WModelIndex &index) const override | 
| Converts a model index to a raw pointer that remains valid while the model's layout is changed.  More... | |
| virtual WModelIndex | fromRawIndex (void *rawIndex) const override | 
| Converts a raw pointer to a model index.  More... | |
  Public Member Functions inherited from Wt::WAbstractItemModel | |
| WAbstractItemModel () | |
| Creates a new data model.  | |
| virtual bool | hasChildren (const WModelIndex &index) const | 
| Returns if there are children at an index.  More... | |
| virtual DataMap | itemData (const WModelIndex &index) const | 
| Returns all data at a specific index.  More... | |
| virtual WModelIndexList | match (const WModelIndex &start, ItemDataRole role, const cpp17::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchFlag::StartsWith|MatchFlag::Wrap)) const | 
| Returns an index list for data items that match.  More... | |
| cpp17::any | data (int row, int column, ItemDataRole role=ItemDataRole::Display, const WModelIndex &parent=WModelIndex()) const | 
| Returns the data item at the given column and row.  More... | |
| virtual bool | hasIndex (int row, int column, const WModelIndex &parent=WModelIndex()) const | 
| Returns if an index at the given position is valid (i.e. falls within the column-row bounds).  More... | |
| virtual bool | insertRows (int row, int count, const WModelIndex &parent=WModelIndex()) | 
| Inserts one or more rows.  More... | |
| virtual bool | removeRows (int row, int count, const WModelIndex &parent=WModelIndex()) | 
| Removes rows.  More... | |
| bool | setHeaderData (int section, const cpp17::any &value) | 
| Sets column header data.  More... | |
| virtual void | sort (int column, SortOrder order=SortOrder::Ascending) | 
| Sorts the model according to a particular column.  More... | |
| virtual void | expandColumn (int column) | 
| Expands a column.  More... | |
| virtual void | collapseColumn (int column) | 
| Collapses a column.  More... | |
| bool | insertColumn (int column, const WModelIndex &parent=WModelIndex()) | 
| Inserts one column.  More... | |
| bool | insertRow (int row, const WModelIndex &parent=WModelIndex()) | 
| Inserts one row.  More... | |
| bool | removeColumn (int column, const WModelIndex &parent=WModelIndex()) | 
| Removes one column.  More... | |
| bool | removeRow (int row, const WModelIndex &parent=WModelIndex()) | 
| Removes one row.  More... | |
| bool | setData (int row, int column, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit, const WModelIndex &parent=WModelIndex()) | 
| Sets data at the given row and column.  More... | |
| virtual Signal< WModelIndex, int, int > & | columnsAboutToBeInserted () | 
| Signal emitted before a number of columns will be inserted.  More... | |
| virtual Signal< WModelIndex, int, int > & | columnsAboutToBeRemoved () | 
| Signal emitted before a number of columns will be removed.  More... | |
| virtual Signal< WModelIndex, int, int > & | columnsInserted () | 
| Signal emitted after a number of columns were inserted.  More... | |
| virtual Signal< WModelIndex, int, int > & | columnsRemoved () | 
| Signal emitted after a number of columns were removed.  More... | |
| virtual Signal< WModelIndex, int, int > & | rowsAboutToBeInserted () | 
| Signal emitted before a number of rows will be inserted.  More... | |
| virtual Signal< WModelIndex, int, int > & | rowsAboutToBeRemoved () | 
| Signal emitted before a number of rows will be removed.  More... | |
| virtual Signal< WModelIndex, int, int > & | rowsInserted () | 
| Signal emitted after a number of rows were inserted.  More... | |
| virtual Signal< WModelIndex, int, int > & | rowsRemoved () | 
| Signal emitted after a number of rows were removed.  More... | |
| virtual Signal< WModelIndex, WModelIndex > & | dataChanged () | 
| Signal emitted when some data was changed.  More... | |
| virtual Signal< Orientation, int, int > & | headerDataChanged () | 
| Signal emitted when some header data was changed.  More... | |
| virtual Signal & | layoutAboutToBeChanged () | 
| Signal emitted when the layout is about to be changed.  More... | |
| virtual Signal & | layoutChanged () | 
| Signal emitted when the layout is changed.  More... | |
| virtual Signal & | modelReset () | 
| Signal emitted when the model was reset.  More... | |
  Public Member Functions inherited from Wt::WObject | |
| void | addChild (std::unique_ptr< WObject > child) | 
| Add a child WObject whose lifetime is determined by this WObject.  | |
| template<typename Child > | |
| Child * | addChild (std::unique_ptr< Child > child) | 
| Add a child WObject, returning a raw pointer.  More... | |
| std::unique_ptr< WObject > | removeChild (WObject *child) | 
| Remove a child WObject, so its lifetime is no longer determined by this WObject.  | |
| virtual const std::string | id () const | 
| Returns the (unique) identifier for this object.  More... | |
| virtual void | setObjectName (const std::string &name) | 
| Sets an object name.  More... | |
| virtual std::string | objectName () const | 
| Returns the object name.  More... | |
| void | resetLearnedSlots () | 
| Resets learned stateless slot implementations.  More... | |
| template<class T > | |
| void | resetLearnedSlot (void(T::*method)()) | 
| Resets a learned stateless slot implementation.  More... | |
| template<class T > | |
| WStatelessSlot * | implementStateless (void(T::*method)()) | 
| Declares a slot to be stateless and learn client-side behaviour on first invocation.  More... | |
| template<class T > | |
| WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) | 
| Declares a slot to be stateless and learn client-side behaviour in advance.  More... | |
| void | isNotStateless () | 
| Marks the current function as not stateless.  More... | |
| template<class T > | |
| WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) | 
| Provides a JavaScript implementation for a method.  More... | |
  Public Member Functions inherited from Wt::Core::observable | |
| observable () | |
| Default constructor.  | |
| virtual | ~observable () | 
| Destructor.  More... | |
| template<typename... Args, typename C > | |
| auto | bindSafe (void(C::*method)(Args...)) | 
| Protects a method call against object destruction.  More... | |
| template<typename... Args, typename C > | |
| auto | bindSafe (void(C::*method)(Args...) const) const | 
| Protects a const method call against object destruction.  More... | |
| template<typename Function > | |
| auto | bindSafe (const Function &function) | 
| Protects a function against object destruction.  More... | |
Additional Inherited Members | |
  Public Types inherited from Wt::WAbstractItemModel | |
| typedef std::map< ItemDataRole, cpp17::any > | DataMap | 
| Data map.  More... | |
  Public Types inherited from Wt::WObject | |
| typedef void(WObject::* | Method) () | 
| Typedef for a WObject method without arguments.  | |
  Protected Types inherited from Wt::WAbstractProxyModel | |
| typedef std::map< WModelIndex, BaseItem * > | ItemMap | 
| A map for items.  More... | |
  Protected Member Functions inherited from Wt::WAbstractProxyModel | |
| WModelIndex | createSourceIndex (int row, int column, void *ptr) const | 
| Create a source model index.  More... | |
| void | startShiftModelIndexes (const WModelIndex &sourceParent, int start, int count, ItemMap &items) | 
| Utility methods to shift items in an item map.  More... | |
  Protected Member Functions inherited from Wt::WAbstractItemModel | |
| void | reset () | 
| Resets the model and invalidate any data.  More... | |
| WModelIndex | createIndex (int row, int column, void *ptr) const | 
| Creates a model index for the given row and column.  More... | |
| WModelIndex | createIndex (int row, int column,::uint64_t id) const | 
| Creates a model index for the given row and column.  More... | |
| void | beginInsertColumns (const WModelIndex &parent, int first, int last) | 
| Method to be called before inserting columns.  More... | |
| void | beginInsertRows (const WModelIndex &parent, int first, int last) | 
| Method to be called before inserting rows.  More... | |
| void | beginRemoveColumns (const WModelIndex &parent, int first, int last) | 
| Method to be called before removing columns.  More... | |
| void | beginRemoveRows (const WModelIndex &parent, int first, int last) | 
| Method to be called before removing rows.  More... | |
| void | endInsertColumns () | 
| Method to be called after inserting columns.  More... | |
| void | endInsertRows () | 
| Method to be called after inserting rows.  More... | |
| void | endRemoveColumns () | 
| Method to be called after removing columns.  More... | |
| void | endRemoveRows () | 
| Method to be called after removing rows.  More... | |
  Protected Member Functions inherited from Wt::WObject | |
| virtual WStatelessSlot * | getStateless (Method method) | 
| On-demand stateless slot implementation.  More... | |
A read-only wrapper for a source model.
This is a simple proxy model which provides a read-only view on a source model. This is convenient for situations where you want to share a common read-only source model between different sessions.
      
  | 
  overridevirtual | 
Returns the number of columns.
This returns the column count of the source model.
Implements Wt::WAbstractItemModel.
      
  | 
  overridevirtual | 
Has no effect.
Reimplemented from Wt::WAbstractProxyModel.
      
  | 
  overridevirtual | 
Returns the child index for the given row and column.
Returns the index in the source model.
Implements Wt::WAbstractItemModel.
      
  | 
  overridevirtual | 
Always returns false and has no effect. 
Reimplemented from Wt::WAbstractProxyModel.
      
  | 
  overridevirtual | 
Maps a source model index to the proxy model.
Returns the sourceIndex unmodified.
Implements Wt::WAbstractProxyModel.
      
  | 
  overridevirtual | 
Maps a proxy model index to the source model.
Returns the proxyIndex unmodified.
Implements Wt::WAbstractProxyModel.
      
  | 
  overridevirtual | 
Returns the parent for a model index.
Returns the parent of the given index in the source model.
Implements Wt::WAbstractItemModel.
      
  | 
  overridevirtual | 
Always returns false and has no effect. 
Reimplemented from Wt::WAbstractProxyModel.
      
  | 
  overridevirtual | 
Returns the number of rows.
This returns the row count of the source model.
Implements Wt::WAbstractItemModel.
      
  | 
  overridevirtual | 
Always returns false and has no effect. 
Reimplemented from Wt::WAbstractProxyModel.
      
  | 
  overridevirtual | 
Always returns false and has no effect. 
Reimplemented from Wt::WAbstractItemModel.
      
  | 
  overridevirtual | 
Always returns false and has no effect. 
Reimplemented from Wt::WAbstractProxyModel.
 1.8.11