diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreeitemdelegate.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreeitemdelegate.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreeitemdelegate.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreeitemdelegate.h b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreeitemdelegate.h new file mode 100644 index 0000000..43eeac2 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreeitemdelegate.h @@ -0,0 +1,28 @@ +#ifndef DBTREEITEMDELEGATE_H +#define DBTREEITEMDELEGATE_H + +#include "guiSQLiteStudio_global.h" +#include <QStyledItemDelegate> + +class DbTreeItem; + +class GUI_API_EXPORT DbTreeItemDelegate : public QStyledItemDelegate +{ + Q_OBJECT + + public: + explicit DbTreeItemDelegate(QObject *parent = 0); + + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + + private: + void paintDb(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, DbTreeItem* item) const; + void paintChildCount(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, DbTreeItem* item) const; + void paintTableLabel(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, DbTreeItem* item) const; + void paintVirtualTableLabel(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index, DbTreeItem* item) const; + void paintSystemIndexLabel(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, DbTreeItem* item) const; + void paintLabel(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, DbTreeItem* item, const QString& label) const; +}; + +#endif // DBTREEITEMDELEGATE_H |
