diff options
Diffstat (limited to 'utils/regtools')
-rw-r--r-- | utils/regtools/qeditor/utils.cpp | 8 | ||||
-rw-r--r-- | utils/regtools/qeditor/utils.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/utils/regtools/qeditor/utils.cpp b/utils/regtools/qeditor/utils.cpp index 748a989512..ada52fd07a 100644 --- a/utils/regtools/qeditor/utils.cpp +++ b/utils/regtools/qeditor/utils.cpp | |||
@@ -1042,7 +1042,7 @@ void YRegDisplayItemEditor::paintEvent(QPaintEvent *event) | |||
1042 | Q_UNUSED(event); | 1042 | Q_UNUSED(event); |
1043 | QPainter painter(this); | 1043 | QPainter painter(this); |
1044 | /* reuse delegate code to paint */ | 1044 | /* reuse delegate code to paint */ |
1045 | QStyleOptionViewItemV4 opt = m_display->viewOptions(); | 1045 | QStyleOptionViewItem opt = m_display->viewOptions(); |
1046 | opt.state |= QStyle::State_HasFocus | QStyle::State_Selected | QStyle::State_Active; | 1046 | opt.state |= QStyle::State_HasFocus | QStyle::State_Selected | QStyle::State_Active; |
1047 | opt.displayAlignment = Qt::AlignHCenter | Qt::AlignVCenter; | 1047 | opt.displayAlignment = Qt::AlignHCenter | Qt::AlignVCenter; |
1048 | opt.rect = rect(); | 1048 | opt.rect = rect(); |
@@ -1060,9 +1060,9 @@ YRegDisplayItemDelegate::YRegDisplayItemDelegate(QObject *parent) | |||
1060 | { | 1060 | { |
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | void YRegDisplayItemDelegate::MyPaint(QPainter *painter, const QStyleOptionViewItemV4& option) const | 1063 | void YRegDisplayItemDelegate::MyPaint(QPainter *painter, const QStyleOptionViewItem& option) const |
1064 | { | 1064 | { |
1065 | QStyleOptionViewItemV4 opt = option; | 1065 | QStyleOptionViewItem opt = option; |
1066 | painter->save(); | 1066 | painter->save(); |
1067 | // draw everything rotated, requires careful manipulation of the | 1067 | // draw everything rotated, requires careful manipulation of the |
1068 | // rects involved | 1068 | // rects involved |
@@ -1077,7 +1077,7 @@ void YRegDisplayItemDelegate::MyPaint(QPainter *painter, const QStyleOptionViewI | |||
1077 | void YRegDisplayItemDelegate::paint(QPainter *painter, | 1077 | void YRegDisplayItemDelegate::paint(QPainter *painter, |
1078 | const QStyleOptionViewItem& option, const QModelIndex& index) const | 1078 | const QStyleOptionViewItem& option, const QModelIndex& index) const |
1079 | { | 1079 | { |
1080 | QStyleOptionViewItemV4 opt = option; | 1080 | QStyleOptionViewItem opt = option; |
1081 | // default alignment is centered unless specified | 1081 | // default alignment is centered unless specified |
1082 | opt.displayAlignment = Qt::AlignHCenter | Qt::AlignVCenter; | 1082 | opt.displayAlignment = Qt::AlignHCenter | Qt::AlignVCenter; |
1083 | initStyleOption(&opt, index); | 1083 | initStyleOption(&opt, index); |
diff --git a/utils/regtools/qeditor/utils.h b/utils/regtools/qeditor/utils.h index 83992274b7..b9755cf3c3 100644 --- a/utils/regtools/qeditor/utils.h +++ b/utils/regtools/qeditor/utils.h | |||
@@ -443,7 +443,7 @@ public: | |||
443 | YRegDisplayItemDelegate(QObject *parent = 0); | 443 | YRegDisplayItemDelegate(QObject *parent = 0); |
444 | virtual void paint(QPainter *painter, const QStyleOptionViewItem& option, | 444 | virtual void paint(QPainter *painter, const QStyleOptionViewItem& option, |
445 | const QModelIndex& index) const; | 445 | const QModelIndex& index) const; |
446 | virtual void MyPaint(QPainter *painter, const QStyleOptionViewItemV4& option) const; | 446 | virtual void MyPaint(QPainter *painter, const QStyleOptionViewItem& option) const; |
447 | virtual QSize sizeHint(const QStyleOptionViewItem& option, | 447 | virtual QSize sizeHint(const QStyleOptionViewItem& option, |
448 | const QModelIndex& index) const; | 448 | const QModelIndex& index) const; |
449 | /* don't bother using the item factory and such, we only use this delegate | 449 | /* don't bother using the item factory and such, we only use this delegate |