Reintroduce CDEStyle to progress bar in 3D view

* Only works for Qt4
This commit is contained in:
Gaute Lindkvist 2018-12-04 15:20:47 +01:00
parent 9d4bcd457d
commit 1bab754b26
2 changed files with 14 additions and 0 deletions

View File

@ -63,6 +63,9 @@
#include "cvfRendering.h"
#include "cvfScene.h"
#if QT_VERSION < 0x050000
#include <QCDEStyle>
#endif
#include <QLabel>
#include <QMouseEvent>
#include <QProgressBar>
@ -156,6 +159,10 @@ RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent)
m_animationProgress->setTextVisible(true);
m_animationProgress->setAlignment(Qt::AlignCenter);
#if QT_VERSION < 0x050000
m_progressBarStyle = new QCDEStyle();
m_animationProgress->setStyle(m_progressBarStyle);
#endif
m_showAnimProgress = false;
// Histogram
@ -210,6 +217,9 @@ RiuViewer::~RiuViewer()
delete m_infoLabel;
delete m_animationProgress;
delete m_histogramWidget;
#if QT_VERSION < 0x050000
delete m_progressBarStyle;
#endif
delete m_gridBoxGenerator;
}

View File

@ -38,6 +38,7 @@ class RiuViewerCommands;
class RivGridBoxGenerator;
class RivWindowEdgeAxesOverlayItem;
class QCDEStyle;
class QLabel;
class QProgressBar;
@ -155,6 +156,9 @@ private:
bool m_showAnimProgress;
RiuSimpleHistogramWidget* m_histogramWidget;
bool m_showHistogram;
#if QT_VERSION < 0x050000
QCDEStyle* m_progressBarStyle;
#endif
cvf::ref<cvf::OverlayAxisCross> m_axisCross;
bool m_showAxisCross;