mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Adjustments for release
* #9681 Disable auto plot title check box when typing a custom name The Auto Plot Title check box is not possible to click on using the mouse. A useful workaround is to disable the check box when the user enter a custom name in the name field. * #10361 Make sure all objects change color when selecting curve color Add support for direct change of all selected curve objects when changing color * Use title as first field in group to avoid Qt checkbox not reacting to mouse click * #9681 Disable auto name when name is changed in sub plot * #10344 Surfaces: Add option to exclude inactive cells * #10369 Use one color for bars in tornado plot * Update license info
This commit is contained in:
@@ -353,9 +353,10 @@ void RiuGroupedBarChartBuilder::addBarEntry( const QString& majorTickText,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGroupedBarChartBuilder::setLegendColorMap( const std::map<QString, QColor>& legendColors )
|
||||
void RiuGroupedBarChartBuilder::setBarColor( const QColor& color )
|
||||
{
|
||||
m_legendColors = legendColors;
|
||||
m_useBarColor = true;
|
||||
m_barColor = color;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -654,15 +655,11 @@ void RiuGroupedBarChartBuilder::addBarChartToPlot( QwtPlot* plot, Qt::Orientatio
|
||||
int idx = 0;
|
||||
for ( const auto& legendToBarPointsPair : legendToBarPointsMap )
|
||||
{
|
||||
QColor legendColor = RiaColorTables::categoryPaletteColors().cycledQColor( idx );
|
||||
QColor color = RiaColorTables::categoryPaletteColors().cycledQColor( idx );
|
||||
|
||||
auto legendColorPairIt = m_legendColors.find( legendToBarPointsPair.first );
|
||||
if ( legendColorPairIt != m_legendColors.end() )
|
||||
{
|
||||
legendColor = legendColorPairIt->second;
|
||||
}
|
||||
if ( m_useBarColor ) color = m_barColor;
|
||||
|
||||
addQwtBarChart( plot, legendToBarPointsPair.second, legendToBarPointsPair.first, legendColor, barOrientation );
|
||||
addQwtBarChart( plot, legendToBarPointsPair.second, legendToBarPointsPair.first, color, barOrientation );
|
||||
idx++;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QColor>
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
@@ -27,7 +28,6 @@
|
||||
#include <set>
|
||||
|
||||
class QwtPlot;
|
||||
class QColor;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
const QString& barText,
|
||||
const double value );
|
||||
|
||||
void setLegendColorMap( const std::map<QString, QColor>& legendColors );
|
||||
void setBarColor( const QColor& color );
|
||||
|
||||
void addBarChartToPlot( QwtPlot* plot, Qt::Orientation orientation, int maxBarCount = -1 );
|
||||
void setLabelFontSize( int labelPointSize );
|
||||
@@ -85,8 +85,10 @@ private:
|
||||
bool operator<( const BarEntry& other ) const;
|
||||
};
|
||||
|
||||
std::multiset<BarEntry> m_sortedBarEntries;
|
||||
std::map<QString, QColor> m_legendColors;
|
||||
bool m_isSortingByMaxValueInGroups;
|
||||
int m_labelPointSize;
|
||||
std::multiset<BarEntry> m_sortedBarEntries;
|
||||
bool m_isSortingByMaxValueInGroups;
|
||||
int m_labelPointSize;
|
||||
|
||||
bool m_useBarColor = false;
|
||||
QColor m_barColor;
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "RimPlotWindow.h"
|
||||
|
||||
#include "RiuDraggableOverlayFrame.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
#include "RiuPlotObjectPicker.h"
|
||||
@@ -1095,7 +1096,8 @@ std::pair<int, int> RiuMultiPlotPage::findAvailableRowAndColumn( int startRow, i
|
||||
void RiuMultiPlotPage::applyLook()
|
||||
{
|
||||
QPalette newPalette( palette() );
|
||||
newPalette.setColor( QPalette::Window, Qt::white );
|
||||
auto backgroundColor = RiuGuiTheme::getColorByVariableName( "mainBackgroundColor" );
|
||||
newPalette.setColor( QPalette::Window, backgroundColor );
|
||||
setPalette( newPalette );
|
||||
|
||||
setAutoFillBackground( true );
|
||||
|
||||
Reference in New Issue
Block a user