#include <costunitmodel.h>
Inherits AbstractModel.
Public Member Functions | |
CostUnitModel (Settings &set, uint id, uint type, QString name, QObject *parent=0) | |
void | setModified (bool) |
bool | isModified () |
int | rowCount (const QModelIndex &parent) const |
int | columnCount (const QModelIndex &parent) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
QList< QStringList > | getList () |
void | clear () |
virtual QDomElement | documentNode () |
virtual bool | loadDocument (const QDomElement file) |
void | setProduct (QString textProductName, QString textDirectCosts, QString textMarkup, QString textCommission, QString textTradeDiscount, QString textDiscount, QString textSalesTax) |
void | setAdditionalCharges (QList< int > costcentres) |
void | setCostUnitProduct (CostUnitProduct *product) |
CostUnitProduct * | product () |
Definition at line 12 of file costunitmodel.h.
CostUnitModel::CostUnitModel | ( | Settings & | set, | |
uint | id, | |||
uint | type, | |||
QString | name, | |||
QObject * | parent = 0 | |||
) |
Definition at line 4 of file costunitmodel.cpp.
void CostUnitModel::clear | ( | ) |
Definition at line 323 of file costunitmodel.cpp.
int CostUnitModel::columnCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 158 of file costunitmodel.cpp.
QVariant CostUnitModel::data | ( | const QModelIndex & | index, | |
int | role | |||
) | const |
QDomElement CostUnitModel::documentNode | ( | ) | [virtual] |
Reimplemented from AbstractModel.
Definition at line 11 of file costunitmodel.cpp.
Qt::ItemFlags CostUnitModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 314 of file costunitmodel.cpp.
QList< QStringList > CostUnitModel::getList | ( | ) |
Definition at line 332 of file costunitmodel.cpp.
QVariant CostUnitModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role | |||
) | const |
Definition at line 164 of file costunitmodel.cpp.
bool CostUnitModel::insertRows | ( | int | position, | |
int | rows, | |||
const QModelIndex & | index = QModelIndex() | |||
) |
Definition at line 257 of file costunitmodel.cpp.
bool CostUnitModel::isModified | ( | ) |
Definition at line 337 of file costunitmodel.cpp.
bool CostUnitModel::loadDocument | ( | const QDomElement | file | ) | [virtual] |
Reimplemented from AbstractModel.
Definition at line 60 of file costunitmodel.cpp.
CostUnitProduct* CostUnitModel::product | ( | ) | [inline] |
bool CostUnitModel::removeRows | ( | int | position, | |
int | rows, | |||
const QModelIndex & | index = QModelIndex() | |||
) |
int CostUnitModel::rowCount | ( | const QModelIndex & | parent | ) | const |
void CostUnitModel::setAdditionalCharges | ( | QList< int > | costcentres | ) |
Definition at line 347 of file costunitmodel.cpp.
void CostUnitModel::setCostUnitProduct | ( | CostUnitProduct * | product | ) | [inline] |
Definition at line 39 of file costunitmodel.h.
bool CostUnitModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) |
void CostUnitModel::setModified | ( | bool | b | ) |
void CostUnitModel::setProduct | ( | QString | textProductName, | |
QString | textDirectCosts, | |||
QString | textMarkup, | |||
QString | textCommission, | |||
QString | textTradeDiscount, | |||
QString | textDiscount, | |||
QString | textSalesTax | |||
) |
Definition at line 357 of file costunitmodel.cpp.