Adapts a table to a Qt item model.  
 More...
#include <vtkQtTableModelAdapter.h>
 | 
|   | vtkQtTableModelAdapter (QObject *parent=0) | 
|   | 
|   | vtkQtTableModelAdapter (vtkTable *table, QObject *parent=0) | 
|   | 
|   | ~vtkQtTableModelAdapter () | 
|   | 
| virtual void  | SetKeyColumnName (const char *name) | 
|   | 
| virtual void  | SetColorColumnName (const char *name) | 
|   | 
| void  | SetIconIndexColumnName (const char *name) | 
|   | 
| void  | SetDecorationLocation (int s) | 
|   | 
| void  | SetDecorationStrategy (int s) | 
|   | 
| bool  | GetSplitMultiComponentColumns () const  | 
|   | 
| void  | SetSplitMultiComponentColumns (bool value) | 
|   | 
| virtual bool  | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) | 
|   | 
| virtual QMimeData *  | mimeData (const QModelIndexList &indexes) const  | 
|   | 
| virtual QStringList  | mimeTypes () const  | 
|   | 
| Qt::DropActions  | supportedDropActions () const  | 
|   | 
| void  | SetIconSheet (QImage sheet) | 
|   | 
| void  | SetIconSize (int w, int h) | 
|   | 
| void  | SetIconSheetSize (int w, int h) | 
|   | 
 | 
| virtual void  | SetVTKDataObject (vtkDataObject *data) | 
|   | 
| virtual vtkDataObject *  | GetVTKDataObject () const  | 
|   | 
 | 
| virtual vtkSelection *  | QModelIndexListToVTKIndexSelection (const QModelIndexList qmil) const  | 
|   | 
| virtual QItemSelection  | VTKIndexSelectionToQItemSelection (vtkSelection *vtksel) const  | 
|   | 
 | 
| void  | setTable (vtkTable *table) | 
|   | 
| vtkTable *  | table () const  | 
|   | 
| QVariant  | data (const QModelIndex &index, int role=Qt::DisplayRole) const  | 
|   | 
| bool  | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) | 
|   | 
| Qt::ItemFlags  | flags (const QModelIndex &index) const  | 
|   | 
| QVariant  | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const  | 
|   | 
| QModelIndex  | index (int row, int column, const QModelIndex &parent=QModelIndex()) const  | 
|   | 
| QModelIndex  | parent (const QModelIndex &index) const  | 
|   | 
| int  | rowCount (const QModelIndex &parent=QModelIndex()) const  | 
|   | 
| int  | columnCount (const QModelIndex &parent=QModelIndex()) const  | 
|   | 
|   | vtkQtAbstractModelAdapter (QObject *p) | 
|   | 
| void  | reset () | 
|   | 
| void  | beginResetModel () | 
|   | 
| void  | endResetModel () | 
|   | 
| virtual void  | SetViewType (int type) | 
|   | 
| virtual int  | GetViewType () | 
|   | 
| virtual void  | SetKeyColumn (int col) | 
|   | 
| virtual int  | GetKeyColumn () | 
|   | 
| virtual void  | SetColorColumn (int col) | 
|   | 
| virtual int  | GetColorColumn () | 
|   | 
| virtual void  | SetDataColumnRange (int c1, int c2) | 
|   | 
Adapts a table to a Qt item model. 
vtkQtTableModelAdapter is a QAbstractItemModel with a vtkTable as its underlying data model.
- See also
 - vtkQtAbstractModelAdapter vtkQtTreeModelAdapter
 
- Tests:
 - vtkQtTableModelAdapter (Tests) 
 
Definition at line 47 of file vtkQtTableModelAdapter.h.
 
      
        
          | vtkQtTableModelAdapter::vtkQtTableModelAdapter  | 
          ( | 
          QObject *  | 
          parent = 0 | ) | 
           | 
        
      
 
 
      
        
          | vtkQtTableModelAdapter::vtkQtTableModelAdapter  | 
          ( | 
          vtkTable *  | 
          table,  | 
        
        
           | 
           | 
          QObject *  | 
          parent = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
      
        
          | vtkQtTableModelAdapter::~vtkQtTableModelAdapter  | 
          ( | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | virtual void vtkQtTableModelAdapter::SetVTKDataObject  | 
          ( | 
          vtkDataObject *  | 
          data | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | virtual vtkDataObject* vtkQtTableModelAdapter::GetVTKDataObject  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | virtual vtkSelection* vtkQtTableModelAdapter::QModelIndexListToVTKIndexSelection  | 
          ( | 
          const QModelIndexList  | 
          qmil | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | virtual QItemSelection vtkQtTableModelAdapter::VTKIndexSelectionToQItemSelection  | 
          ( | 
          vtkSelection *  | 
          vtksel | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | virtual void vtkQtTableModelAdapter::SetKeyColumnName  | 
          ( | 
          const char *  | 
          name | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Set/Get the key column. The key column is used as the row headers in a table view, and as the first column in a tree view. Set to -1 for no key column. The default is no key column. 
Implements vtkQtAbstractModelAdapter.
 
 
  
  
      
        
          | virtual void vtkQtTableModelAdapter::SetColorColumnName  | 
          ( | 
          const char *  | 
          name | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Set/Get the column storing the rgba color values for each row. The color column is used as the row headers in a table view, and as the first column in a tree view. Set to -1 for no key column. The default is no key column. 
Implements vtkQtAbstractModelAdapter.
 
 
      
        
          | void vtkQtTableModelAdapter::SetIconIndexColumnName  | 
          ( | 
          const char *  | 
          name | ) | 
           | 
        
      
 
 
      
        
          | void vtkQtTableModelAdapter::SetDecorationLocation  | 
          ( | 
          int  | 
          s | ) | 
           | 
        
      
 
Specify how to color rows if colors are provided by SetColorColumnName(). Default is the vertical header. 
 
 
      
        
          | void vtkQtTableModelAdapter::SetDecorationStrategy  | 
          ( | 
          int  | 
          s | ) | 
           | 
        
      
 
Specify how to color rows if colors are provided by SetColorColumnName(). Default is the vertical header. 
 
 
      
        
          | bool vtkQtTableModelAdapter::GetSplitMultiComponentColumns  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
      
        
          | void vtkQtTableModelAdapter::SetSplitMultiComponentColumns  | 
          ( | 
          bool  | 
          value | ) | 
           | 
        
      
 
 
      
        
          | void vtkQtTableModelAdapter::setTable  | 
          ( | 
          vtkTable *  | 
          table | ) | 
           | 
        
      
 
Set up the model based on the current table. 
 
 
  
  
      
        
          | vtkTable* vtkQtTableModelAdapter::table  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
      
        
          | QVariant vtkQtTableModelAdapter::data  | 
          ( | 
          const QModelIndex &  | 
          index,  | 
        
        
           | 
           | 
          int  | 
          role = Qt::DisplayRole  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | bool vtkQtTableModelAdapter::setData  | 
          ( | 
          const QModelIndex &  | 
          index,  | 
        
        
           | 
           | 
          const QVariant &  | 
          value,  | 
        
        
           | 
           | 
          int  | 
          role = Qt::EditRole  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | Qt::ItemFlags vtkQtTableModelAdapter::flags  | 
          ( | 
          const QModelIndex &  | 
          index | ) | 
           const | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | QVariant vtkQtTableModelAdapter::headerData  | 
          ( | 
          int  | 
          section,  | 
        
        
           | 
           | 
          Qt::Orientation  | 
          orientation,  | 
        
        
           | 
           | 
          int  | 
          role = Qt::DisplayRole  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | QModelIndex vtkQtTableModelAdapter::index  | 
          ( | 
          int  | 
          row,  | 
        
        
           | 
           | 
          int  | 
          column,  | 
        
        
           | 
           | 
          const QModelIndex &  | 
          parent = QModelIndex()  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | QModelIndex vtkQtTableModelAdapter::parent  | 
          ( | 
          const QModelIndex &  | 
          index | ) | 
           const | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | int vtkQtTableModelAdapter::rowCount  | 
          ( | 
          const QModelIndex &  | 
          parent = QModelIndex() | ) | 
           const | 
        
      
 
Set up the model based on the current table. 
 
 
      
        
          | int vtkQtTableModelAdapter::columnCount  | 
          ( | 
          const QModelIndex &  | 
          parent = QModelIndex() | ) | 
           const | 
        
      
 
Set up the model based on the current table. 
 
 
  
  
      
        
          | virtual bool vtkQtTableModelAdapter::dropMimeData  | 
          ( | 
          const QMimeData *  | 
          data,  | 
         
        
           | 
           | 
          Qt::DropAction  | 
          action,  | 
         
        
           | 
           | 
          int  | 
          row,  | 
         
        
           | 
           | 
          int  | 
          column,  | 
         
        
           | 
           | 
          const QModelIndex &  | 
          parent  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | virtual QMimeData* vtkQtTableModelAdapter::mimeData  | 
          ( | 
          const QModelIndexList &  | 
          indexes | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | virtual QStringList vtkQtTableModelAdapter::mimeTypes  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
      
        
          | Qt::DropActions vtkQtTableModelAdapter::supportedDropActions  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
      
        
          | void vtkQtTableModelAdapter::SetIconSheet  | 
          ( | 
          QImage  | 
          sheet | ) | 
           | 
        
      
 
 
      
        
          | void vtkQtTableModelAdapter::SetIconSize  | 
          ( | 
          int  | 
          w,  | 
        
        
           | 
           | 
          int  | 
          h  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
      
        
          | void vtkQtTableModelAdapter::SetIconSheetSize  | 
          ( | 
          int  | 
          w,  | 
        
        
           | 
           | 
          int  | 
          h  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
  
  
      
        
          | void vtkQtTableModelAdapter::selectionDropped  | 
          ( | 
          vtkSelection *  | 
           | ) | 
           | 
         
       
   | 
  
signal   | 
  
 
 
The documentation for this class was generated from the following file: