code for unused skins removed

This commit is contained in:
Uwe Rathmann 2018-05-09 08:47:33 +02:00
parent 60a4f2ff1f
commit c3cd365b68

View File

@ -1,18 +1,9 @@
#include "SkinFactory.h"
#include "DefaultSkin.h"
#include "OtherSkin.h"
#include "SoundControl.h"
#include <QskSetup.h>
#include <QskSkinTransition.h>
#include <QskColorFilter.h>
#include <QskTextLabel.h>
#include <QskPushButton.h>
#include <QskSeparator.h>
#include <QskBoxBorderMetrics.h>
#include <squiek/QskSquiekSkin.h>
#include <material/QskMaterialSkin.h>
QStringList SkinFactory::skinNames() const
{
@ -27,63 +18,6 @@ QskSkin* SkinFactory::createSkin( const QString& skinName )
if ( skinName == "OtherSkin" )
return new OtherSkin( skinName );
if ( skinName == "SquiekSkin" )
{
auto skin = new QskSquiekSkin();
const QColor themeColor( "FireBrick" );
QColor overlayColor( "SlateGray");
overlayColor.setAlpha( 200 );
skin->setGradient( SoundControl::Overlay, overlayColor );
QskColorFilter filter;
filter.addColorSubstitution( Qt::white, themeColor.rgb() );
skin->setGraphicFilter( SkinFactory::Indicator, filter );
filter.addColorSubstitution( Qt::white, QColor( "CornflowerBlue" ).rgb() );
skin->setGraphicFilter( SkinFactory::Vehicle, filter );
skin->setSkinHint( SoundControl::MarkerControl | QskAspect::GraphicRole, SkinFactory::Indicator );
skin->setSkinHint( SoundControl::Vehicle | QskAspect::GraphicRole, SkinFactory::Vehicle );
skin->setGradient( SoundControl::Marker, themeColor );
skin->setBoxBorderMetrics( SoundControl::Marker, 1 );
skin->setBoxShape( SoundControl::Marker, 6 );
skin->setColor( QskTextLabel::Text, "PeachPuff" );
skin->setGradient( QskPushButton::Text, themeColor );
return skin;
}
if ( skinName == "MaterialSkin" )
{
auto skin = new QskMaterialSkin();
const QColor themeColor( "Tan" );
QColor overlayColor = themeColor;
overlayColor.setAlpha( 200 );
skin->setGradient( SoundControl::Overlay, overlayColor );
QskColorFilter filter;
filter.addColorSubstitution( Qt::white, QColor( "SaddleBrown" ).rgb() );
skin->setGraphicFilter( SkinFactory::Indicator, filter );
skin->setSkinHint( SoundControl::MarkerControl | QskAspect::GraphicRole, SkinFactory::Indicator );
skin->setBoxBorderMetrics( SoundControl::Marker, 1 );
skin->setBoxShape( SoundControl::Marker, 8 );
skin->setGradient( SoundControl::Marker, QColor( "SaddleBrown" ) );
skin->setGradient( SoundControl::CrossHair, QColor( "Sienna" ) );
skin->setColor( QskTextLabel::Text, "SaddleBrown" );
skin->setGradient( QskSeparator::Panel, QColor( "Sienna" ) );
return skin;
}
return nullptr;
}
@ -100,11 +34,11 @@ void SkinFactory::rotateSkin()
int index = names.indexOf( qskSetup->skinName() );
index = ( index + 1 ) % names.size();
QskSkin* oldSkin = qskSetup->skin();
auto oldSkin = qskSetup->skin();
if ( oldSkin->parent() == qskSetup )
oldSkin->setParent( nullptr ); // otherwise setSkin deletes it
QskSkin* newSkin = qskSetup->setSkin( names[ index ] );
auto newSkin = qskSetup->setSkin( names[ index ] );
QskSkinTransition transition;