Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
FlatProxyModel Class Reference

#include </tmp/quassel/src/uisupport/flatproxymodel.h>

Collaboration diagram for FlatProxyModel:

Classes

class  _RangeRect
class  SourceItem

Public Slots

void linkTest () const
void completenessTest () const

Public Member Functions

 FlatProxyModel (QObject *parent=0)
virtual QModelIndex mapFromSource (const QModelIndex &sourceIndex) const
virtual QModelIndex mapToSource (const QModelIndex &proxyIndex) const
virtual QItemSelection mapSelectionFromSource (const QItemSelection &sourceSelection) const
virtual QItemSelection mapSelectionToSource (const QItemSelection &proxySelection) const
virtual void setSourceModel (QAbstractItemModel *sourceModel)
virtual QModelIndex index (int row, int column, const QModelIndex &parent) const
virtual QModelIndex parent (const QModelIndex &index) const
virtual int rowCount (const QModelIndex &index) const
virtual int columnCount (const QModelIndex &index) const

Private Slots

void on_columnsAboutToBeInserted (const QModelIndex &parent, int start, int end)
void on_columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
void on_columnsInserted (const QModelIndex &parent, int start, int end)
void on_columnsRemoved (const QModelIndex &parent, int start, int end)
void on_dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
void on_layoutAboutToBeChanged ()
void on_layoutChanged ()
void on_modelAboutToBeReset ()
void on_rowsAboutToBeInserted (const QModelIndex &parent, int start, int end)
void on_rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
void on_rowsInserted (const QModelIndex &parent, int start, int end)
void on_rowsRemoved (const QModelIndex &parent, int start, int end)

Private Member Functions

void insertSubTree (const QModelIndex &source_idx, bool emitInsert=true)
SourceIteminsertSubTreeHelper (SourceItem *parentItem, SourceItem *lastItem_, const QModelIndex &source_idx)
void removeSubTree (const QModelIndex &source_idx, bool emitRemove=true)
SourceItemsourceToInternal (const QModelIndex &sourceIndex) const
void checkChildCount (const QModelIndex &index, const SourceItem *item, int &pos) const

Private Attributes

QList< int > _childCount
SourceItem_rootSourceItem

Detailed Description

Definition at line 26 of file flatproxymodel.h.

Constructor & Destructor Documentation

FlatProxyModel ( QObject *  parent = 0)

Definition at line 26 of file flatproxymodel.cpp.

Member Function Documentation

QModelIndex mapFromSource ( const QModelIndex &  sourceIndex) const
virtual

Definition at line 33 of file flatproxymodel.cpp.

References FlatProxyModel::SourceItem::pos(), and sourceToInternal().

QModelIndex mapToSource ( const QModelIndex &  proxyIndex) const
virtual
QItemSelection mapSelectionToSource ( const QItemSelection &  proxySelection) const
virtual
QModelIndex index ( int  row,
int  column,
const QModelIndex &  parent 
) const
virtual
QModelIndex parent ( const QModelIndex &  index) const
virtual
int rowCount ( const QModelIndex &  index) const
virtual
int columnCount ( const QModelIndex &  index) const
virtual

Definition at line 417 of file flatproxymodel.cpp.

void completenessTest ( ) const
slot

Definition at line 657 of file flatproxymodel.cpp.

References _rootSourceItem, and checkChildCount().

void on_columnsAboutToBeInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot

Definition at line 446 of file flatproxymodel.cpp.

Referenced by setSourceModel().

void on_columnsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot

Definition at line 453 of file flatproxymodel.cpp.

Referenced by setSourceModel().

void on_columnsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot

Definition at line 460 of file flatproxymodel.cpp.

Referenced by setSourceModel().

void on_columnsRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot

Definition at line 469 of file flatproxymodel.cpp.

Referenced by setSourceModel().

void on_dataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
privateslot
void on_layoutAboutToBeChanged ( )
privateslot

Definition at line 493 of file flatproxymodel.cpp.

References removeSubTree().

Referenced by setSourceModel().

void on_layoutChanged ( )
privateslot

Definition at line 500 of file flatproxymodel.cpp.

References insertSubTree().

Referenced by setSourceModel().

void on_modelAboutToBeReset ( )
inlineprivateslot

Definition at line 63 of file flatproxymodel.h.

Referenced by setSourceModel().

void on_rowsAboutToBeInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot
void on_rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot
void on_rowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot

Definition at line 565 of file flatproxymodel.cpp.

References _rootSourceItem, rowCount(), and sourceToInternal().

Referenced by setSourceModel().

FlatProxyModel::SourceItem * insertSubTreeHelper ( SourceItem parentItem,
SourceItem lastItem_,
const QModelIndex &  source_idx 
)
private
void checkChildCount ( const QModelIndex &  index,
const SourceItem item,
int &  pos 
) const
private

Member Data Documentation

QList<int> _childCount
private

Definition at line 72 of file flatproxymodel.h.


The documentation for this class was generated from the following files: