mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4085 3D view: Add check box for version info text
This commit is contained in:
@@ -115,6 +115,7 @@ RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent)
|
||||
m_versionInfoLabel->setFrameShape(QFrame::NoFrame);
|
||||
m_versionInfoLabel->setAlignment(Qt::AlignRight);
|
||||
m_versionInfoLabel->setText(QString("%1 v%2").arg(RI_APPLICATION_NAME, RiaApplication::getVersionStringApp(false)));
|
||||
m_showVersionInfo = true;
|
||||
|
||||
// Z scale label
|
||||
m_zScaleLabel = new QLabel();
|
||||
@@ -395,7 +396,7 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
|
||||
// yPos += m_histogramWidget->height() + margin;
|
||||
}
|
||||
|
||||
if (m_showInfoText) // Version Label
|
||||
if (m_showVersionInfo) // Version Label
|
||||
{
|
||||
QSize size(m_versionInfoLabel->sizeHint().width(), m_versionInfoLabel->sizeHint().height());
|
||||
QPoint pos(this->width() - size.width() - margin - edgeAxisFrameBorderWidth,
|
||||
@@ -478,6 +479,14 @@ void RiuViewer::showInfoText(bool enable)
|
||||
m_showInfoText = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::showVersionInfo(bool enable)
|
||||
{
|
||||
m_showVersionInfo = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void setEnableMask(unsigned int mask);
|
||||
|
||||
void showInfoText(bool enable);
|
||||
void showVersionInfo(bool enable);
|
||||
void setInfoText(QString text);
|
||||
|
||||
void hideZScaleCheckbox(bool hide);
|
||||
@@ -156,7 +157,8 @@ private:
|
||||
QRect m_infoLabelOverlayArea;
|
||||
|
||||
QLabel* m_versionInfoLabel;
|
||||
bool m_showInfoText;
|
||||
bool m_showInfoText;
|
||||
bool m_showVersionInfo;
|
||||
|
||||
QLabel* m_zScaleLabel;
|
||||
bool m_showZScaleLabel;
|
||||
|
||||
Reference in New Issue
Block a user