Improve Multi Plot icons

This commit is contained in:
Gaute Lindkvist 2020-06-09 14:45:26 +02:00
parent e58b42f537
commit 4190c747d3
12 changed files with 28 additions and 20 deletions

View File

@ -29,7 +29,7 @@
#include "RiuPlotMainWindowTools.h"
#include "cafPdmUiComboBoxEditor.h"
#include "cafPdmUiPushButtonEditor.h"
#include "cafPdmUiToolButtonEditor.h"
#include <QPaintDevice>
#include <QRegularExpression>
@ -82,9 +82,10 @@ RimMultiPlot::RimMultiPlot()
CAF_PDM_InitFieldNoDefault( &m_majorTickmarkCount, "MajorTickmarkCount", "Major Tickmark Count", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_subTitleFontSize, "SubTitleFontSize", "Sub Plot Title Font Size", "", "", "" );
m_subTitleFontSize = caf::FontTools::RelativeSize::Large;
CAF_PDM_InitField( &m_pagePreviewMode, "PagePreviewMode", false, "Page Preview Mode", "", "", "" );
m_pagePreviewMode.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
m_pagePreviewMode.uiCapability()->setUiEditorTypeName( caf::PdmUiToolButtonEditor::uiEditorTypeName() );
m_pagePreviewMode.uiCapability()->setUiIconFromResourceString( ":/PagePreview16x16.png" );
m_viewer = nullptr;
@ -643,7 +644,6 @@ void RimMultiPlot::uiOrderingForMultiPlotLayout( QString uiConfigName, caf::PdmU
uiOrdering.add( &m_columnCount );
uiOrdering.add( &m_rowsPerPage );
uiOrdering.add( &m_majorTickmarkCount );
uiOrdering.add( &m_pagePreviewMode );
}
//--------------------------------------------------------------------------------------------------
@ -658,23 +658,27 @@ QList<caf::PdmOptionItemInfo> RimMultiPlot::calculateValueOptions( const caf::Pd
{
for ( size_t i = 0; i < ColumnCountEnum::size(); ++i )
{
ColumnCount enumVal = ColumnCountEnum::fromIndex( i );
if ( enumVal == ColumnCount::COLUMNS_UNLIMITED )
{
QString iconPath( ":/ColumnsUnlimited.png" );
options.push_back( caf::PdmOptionItemInfo( ColumnCountEnum::uiText( enumVal ),
enumVal,
false,
caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
}
else
{
QString iconPath = QString( ":/Columns%1.png" ).arg( static_cast<int>( enumVal ) );
options.push_back( caf::PdmOptionItemInfo( ColumnCountEnum::uiText( enumVal ),
enumVal,
false,
caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
}
ColumnCount enumVal = ColumnCountEnum::fromIndex( i );
QString columnCountString = ( enumVal == ColumnCount::COLUMNS_UNLIMITED )
? "Unlimited"
: QString( "%1" ).arg( static_cast<int>( enumVal ) );
QString iconPath = QString( ":/Columns%1.png" ).arg( columnCountString );
options.push_back( caf::PdmOptionItemInfo( ColumnCountEnum::uiText( enumVal ),
enumVal,
false,
caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
}
}
if ( fieldNeedingOptions == &m_rowsPerPage )
{
for ( size_t i = 0; i < RowCountEnum::size(); ++i )
{
RowCount enumVal = RowCountEnum::fromIndex( i );
QString iconPath = QString( ":/Rows%1.png" ).arg( static_cast<int>( enumVal ) );
options.push_back( caf::PdmOptionItemInfo( RowCountEnum::uiText( enumVal ),
enumVal,
false,
caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
}
}
else if ( fieldNeedingOptions == &m_subTitleFontSize || fieldNeedingOptions == &m_axisTitleFontSize ||

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -113,6 +113,10 @@
<file>ReplaceCase16x16.png</file>
<file>ReservoirSurface16x16.png</file>
<file>ReservoirSurfaces16x16.png</file>
<file>Rows1.png</file>
<file>Rows2.png</file>
<file>Rows3.png</file>
<file>Rows4.png</file>
<file>RightAxis16x16.png</file>
<file>Ruler24x24.png</file>
<file>RulerPoly24x24.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB