2023-04-13 17:19:36 +02:00
|
|
|
/******************************************************************************
|
2023-05-12 14:26:24 +02:00
|
|
|
* QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH
|
2023-04-13 17:19:36 +02:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#include "QskWindowsSkinFactory.h"
|
|
|
|
#include "QskWindowsSkin.h"
|
|
|
|
|
|
|
|
static const QString windowsLightSkinName = QStringLiteral( "Windows Light" );
|
|
|
|
static const QString windowsDarkSkinName = QStringLiteral( "Windows Dark" );
|
|
|
|
|
|
|
|
QskWindowsSkinFactory::QskWindowsSkinFactory( QObject* parent )
|
|
|
|
: QskSkinFactory( parent )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
QskWindowsSkinFactory::~QskWindowsSkinFactory()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
QStringList QskWindowsSkinFactory::skinNames() const
|
|
|
|
{
|
|
|
|
return { windowsLightSkinName, windowsDarkSkinName };
|
|
|
|
}
|
|
|
|
|
|
|
|
QskSkin* QskWindowsSkinFactory::createSkin( const QString& skinName )
|
|
|
|
{
|
|
|
|
if ( QString::compare( skinName, windowsLightSkinName, Qt::CaseInsensitive ) == 0 )
|
|
|
|
{
|
|
|
|
QskWindowsTheme theme( QskWindowsTheme::Light );
|
|
|
|
return new QskWindowsSkin( theme );
|
|
|
|
}
|
|
|
|
else if ( QString::compare( skinName, windowsDarkSkinName, Qt::CaseInsensitive ) == 0 )
|
|
|
|
{
|
|
|
|
QskWindowsTheme theme( QskWindowsTheme::Dark );
|
|
|
|
return new QskWindowsSkin( theme );
|
|
|
|
}
|
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "moc_QskWindowsSkinFactory.cpp"
|