Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 218 → Rev 219

/trunk/DBViewer/delegate.h
48,15 → 48,90
QString inctance; // òàáëèöà-õðàíèëèùå, îòêóäà áóäåì áðàòü ñïèñîê
QMap <QString, QString> items; // çäåñü áóäåì õðàíèòü ñâÿçàííûé ñïèñîê èìåò îáúåêòîâ è èõ èäåíòèôèêàòîðîâ ID
 
};
 
 
 
 
 
class FilterConditionDelegate : public QItemDelegate
{
Q_OBJECT
 
public:
FilterConditionDelegate(QObject *parent = 0);
 
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
 
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const;
 
void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option, const QModelIndex &index) const;
 
 
 
void setClassID(QString newClassID);
// void getItems(); // ïîëó÷àåì ñâÿçàííûé ñïèñîê
 
void setItems(QStringList new_items){items = new_items;}
 
 
private:
 
 
QString class_id; // òàáëèöà-õðàíèëèùå, îòêóäà áóäåì áðàòü ñïèñîê
// QMap <QString, QString> items; // çäåñü áóäåì õðàíèòü ñâÿçàííûé ñïèñîê èìåò îáúåêòîâ è èõ èäåíòèôèêàòîðîâ ID
QStringList items; // ñïèñîê
};
 
 
 
 
//! [0]
class FilterSpinBoxDelegate : public QItemDelegate
{
Q_OBJECT
 
public:
FilterSpinBoxDelegate(QObject *parent = 0);
 
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
 
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const;
 
void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option, const QModelIndex &index) const;
 
 
 
void setClassID(QString newClassID);
void getItems(); // ïîëó÷àåì ñâÿçàííûé ñïèñîê
 
 
 
 
private:
 
 
QString class_id; // òàáëèöà-õðàíèëèùå, îòêóäà áóäåì áðàòü ñïèñîê
QMap <QString, QString> items; // çäåñü áóäåì õðàíèòü ñâÿçàííûé ñïèñîê èìåò îáúåêòîâ è èõ èäåíòèôèêàòîðîâ ID
};
 
 
 
 
 
 
 
 
//! [0]
 
class MyDEDelegate : public QItemDelegate {
Q_OBJECT
public: