Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/classFieldConcatModel.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:37:07 2014
Кодировка:

Поисковые слова: п п п п п п п п п п п п
Stellarium: FieldConcatModel Class Reference
Stellarium 0.12.3
List of all members | Public Member Functions
FieldConcatModel Class Reference

Allows for concatinating fields from a model for disply. More...

#include <FieldConcatModel.hpp>

Public Member Functions

 FieldConcatModel (QSqlTableModel *backingModel, QStringList fieldNames, QString seperationString=" | ", QObject *parent=0)
 the default constructor More...
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QString displayStringForRecord (QSqlRecord &record) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
int idForDisplayString (QString displayString)
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
void setFilter (const QString &filter)
 

Detailed Description

Allows for concatinating fields from a model for disply.

This class allows a table model to concatinate fields for the purpose of display. Qt widgets that accept default Qt models allow the user to specify which column's value to use for display purposes, but only one column can be used. Here, the user can provide a list of column - field - names to use, as well as a string to use to seperate the columns. As this model is intended for list and combo box selection, it is read-only. If any of the fields values are invalid or empty, they are skipped in the concatination operation, and the seperator as well.

Author
Timothy Reaves

Definition at line 39 of file FieldConcatModel.hpp.

Constructor & Destructor Documentation

FieldConcatModel::FieldConcatModel ( QSqlTableModel *  backingModel,
QStringList  fieldNames,
QString  seperationString = " | ",
QObject *  parent = 0 
)

the default constructor

Parameters
backingModelthe model this modul uses as a source of data.
fieldNamesa list of the names of the fields to be concatinated. The fields are used in the order they are in the list.
seperationStringthe string used to seperate the fields values. Defaults to " | ".
parentthe parent of this object.

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