Quark
0.1
|
A non-parameterized abstract base class for Quark table models. More...
#include <AbstractTableModelBase.h++>
Public Types | |
enum | Option { None = 0, Sorted = 1 << 0, ReverseSorted = 1 << 2 } |
Model options. More... | |
Public Member Functions | |
Q_DECLARE_FLAGS (Options, Option) | |
virtual | ~AbstractTableModelBase () |
Destructor. More... | |
void | setEditable (bool editable) |
Sets the editability of the model. More... | |
bool | isEditable () const |
Tests the editability of the model. More... | |
bool | isSorted () const |
Tests if the model is a sorted model. More... | |
int | fieldCount () const |
Returns the number of fields in the model. More... | |
const Field & | getField (int field) const |
Returns the specified field of the model. More... | |
QString | getFieldName (int field) const |
Returns the name of the specified field. More... | |
Static Public Attributes | |
static const int | DescriptionRole |
An item's description role. More... | |
static const int | SortRole |
An item's sort role. More... | |
Protected Member Functions | |
AbstractTableModelBase (Options options=0, QObject *parent=NULL) | |
Constructs an AbstractTableModelBase with the given options. More... | |
Field & | addField (const QString &name) |
Adds a new field to the model. More... | |
A non-parameterized abstract base class for Quark table models.
This class should not be subclassed directly.
enum Option |
|
virtual |
Destructor.
|
protected |
Constructs an AbstractTableModelBase with the given options.
|
protected |
Adds a new field to the model.
name | The name of the field. This will be used as the header label for the corresponding column. |
int fieldCount | ( | ) | const |
Returns the number of fields in the model.
const Field& getField | ( | int | field | ) | const |
Returns the specified field of the model.
QString getFieldName | ( | int | field | ) | const |
Returns the name of the specified field.
|
inline |
Tests the editability of the model.
bool isSorted | ( | ) | const |
Tests if the model is a sorted model.
Q_DECLARE_FLAGS | ( | Options | , |
Option | |||
) |
|
inline |
Sets the editability of the model.
|
static |
An item's description role.
|
static |
An item's sort role.