Qt 4.8
Public Functions | Properties | List of all members
QRowsRemoval Struct Reference

Public Functions

bool contains (QModelIndex parent, int row)
 
 QRowsRemoval (const QModelIndex &parent_source, int start, int end)
 
 QRowsRemoval ()
 

Properties

int end
 
QModelIndex parent_source
 
int start
 

Detailed Description

Definition at line 117 of file qsortfilterproxymodel.cpp.

Constructors and Destructors

◆ QRowsRemoval() [1/2]

QRowsRemoval::QRowsRemoval ( const QModelIndex parent_source,
int  start,
int  end 
)
inline

Definition at line 119 of file qsortfilterproxymodel.cpp.

119  : parent_source(parent_source), start(start), end(end)
120  {
121  }

◆ QRowsRemoval() [2/2]

QRowsRemoval::QRowsRemoval ( )
inline

Definition at line 123 of file qsortfilterproxymodel.cpp.

123  : start(-1), end(-1)
124  {
125  }

Functions

◆ contains()

bool QRowsRemoval::contains ( QModelIndex  parent,
int  row 
)
inline

Definition at line 127 of file qsortfilterproxymodel.cpp.

128  {
129  do {
130  if (parent == parent_source)
131  return row >= start && row <= end;
132  row = parent.row();
133  parent = parent.parent();
134  } while (row >= 0);
135  return false;
136  }
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
int row() const
Returns the row this model index refers to.

Properties

◆ end

int QRowsRemoval::end
private

Definition at line 140 of file qsortfilterproxymodel.cpp.

◆ parent_source

QModelIndex QRowsRemoval::parent_source
private

Definition at line 138 of file qsortfilterproxymodel.cpp.

◆ start

int QRowsRemoval::start
private

Definition at line 139 of file qsortfilterproxymodel.cpp.


The documentation for this struct was generated from the following file: