diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-12-15 22:44:17 +0100 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-12-15 22:44:17 +0100 |
| commit | 94c4834bbbcda9ef71ec8d5ff080b41374d8e7c0 (patch) | |
| tree | a424068bce4a0374335f77bbf74a2d5c052118ca /utils/regtools/qeditor/utils.h | |
| parent | 3b3d9bf725a5b04e4cd9bc4254fbd2594b518e89 (diff) | |
| download | rockbox-94c4834bbbcda9ef71ec8d5ff080b41374d8e7c0.zip rockbox-94c4834bbbcda9ef71ec8d5ff080b41374d8e7c0.tar.gz rockbox-94c4834bbbcda9ef71ec8d5ff080b41374d8e7c0.tar.bz2 rockbox-94c4834bbbcda9ef71ec8d5ff080b41374d8e7c0.tar.xz | |
Revert "regtools/qeditor: use the new model, drop unused code"
This reverts commit 3b3d9bf725a5b04e4cd9bc4254fbd2594b518e89.
Gerrit did crap on this one.
Diffstat (limited to 'utils/regtools/qeditor/utils.h')
| -rw-r--r-- | utils/regtools/qeditor/utils.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/utils/regtools/qeditor/utils.h b/utils/regtools/qeditor/utils.h index 6612ce2..9700102 100644 --- a/utils/regtools/qeditor/utils.h +++ b/utils/regtools/qeditor/utils.h @@ -149,20 +149,9 @@ Q_DECLARE_METATYPE(SocFieldCachedValue) class SocFieldCachedItemDelegate : public QStyledItemDelegate { public: - enum DisplayMode - { - DisplayValueAndName, /* "value (name)" or "value" if no name */ - DisplayName, /* "name" or "value" if no name */ - DisplayValue, /* "value" */ - }; - SocFieldCachedItemDelegate(QObject *parent = 0):QStyledItemDelegate(parent) {} - virtual QString displayText(const QVariant& value, const QLocale& locale) const; - void SetMode(DisplayMode mode) { m_mode = mode; } - DisplayMode GetMode() const { return m_mode; } -protected: - DisplayMode m_mode; + virtual QString displayText(const QVariant& value, const QLocale& locale) const; }; class SocFieldCachedEditor : public SocFieldEditor @@ -214,12 +203,21 @@ private: mutable QSize m_size; }; -class GrowingTableView : public QTableView +class GrowingTextEdit : public QTextEdit +{ + Q_OBJECT +public: + GrowingTextEdit(QWidget *parent = 0); + +protected slots: + void TextChanged(); +}; + +class GrowingTableWidget : public QTableWidget { Q_OBJECT public: - GrowingTableView(QWidget *parent = 0); - virtual void setModel(QAbstractItemModel *model); + GrowingTableWidget(QWidget *parent = 0); protected slots: void DataChanged(const QModelIndex& tl, const QModelIndex& br); |