2019-06-20 12:02:28 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
2023-04-06 09:23:37 +02:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2019-06-20 12:02:28 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2022-07-14 18:50:17 +02:00
|
|
|
#include "Dashboard.h"
|
2017-07-25 21:34:27 +02:00
|
|
|
#include "SkinFactory.h"
|
2017-07-25 07:24:27 +02:00
|
|
|
|
2020-12-13 19:38:46 +01:00
|
|
|
#include <SkinnyShortcut.h>
|
|
|
|
|
2022-07-14 18:50:17 +02:00
|
|
|
#include <QskWindow.h>
|
2018-01-03 11:57:05 +01:00
|
|
|
#include <QskSkinManager.h>
|
2020-12-18 16:32:54 +01:00
|
|
|
#include <QskObjectCounter.h>
|
2017-07-25 07:24:27 +02:00
|
|
|
|
2022-07-14 18:50:17 +02:00
|
|
|
#include <QskGraphic.h>
|
|
|
|
#include <QskGraphicIO.h>
|
|
|
|
#include <QskGraphicLabel.h>
|
|
|
|
|
2017-07-25 07:24:27 +02:00
|
|
|
#include <QGuiApplication>
|
|
|
|
|
2022-07-14 18:50:17 +02:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
class Window : public QskWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Window()
|
2023-02-28 15:49:42 +01:00
|
|
|
{
|
2022-07-14 18:50:17 +02:00
|
|
|
setAutoLayoutChildren( true );
|
|
|
|
|
|
|
|
const QImage image( QStringLiteral( ":/images/background.jpg" ) );
|
|
|
|
|
|
|
|
auto backgroundImage = new QskGraphicLabel( contentItem() );
|
|
|
|
backgroundImage->setGraphic( QskGraphic::fromImage( image ) );
|
|
|
|
backgroundImage->setFillMode( QskGraphicLabel::Stretch );
|
|
|
|
|
|
|
|
(void ) new Dashboard( contentItem() );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-25 10:47:40 +02:00
|
|
|
int main( int argc, char** argv )
|
2017-07-25 07:24:27 +02:00
|
|
|
{
|
2020-12-18 16:32:54 +01:00
|
|
|
#ifdef ITEM_STATISTICS
|
|
|
|
QskObjectCounter counter( true );
|
|
|
|
#endif
|
|
|
|
|
2020-12-13 19:38:46 +01:00
|
|
|
qskSkinManager->setPluginPaths( QStringList() ); // no skin plugins
|
|
|
|
qskSkinManager->registerFactory( QStringLiteral( "sample" ), new SkinFactory() );
|
2017-07-25 07:24:27 +02:00
|
|
|
|
2018-01-03 11:57:05 +01:00
|
|
|
QGuiApplication app( argc, argv );
|
2017-07-25 07:24:27 +02:00
|
|
|
|
2020-12-13 19:38:46 +01:00
|
|
|
SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts );
|
2017-07-26 13:21:10 +02:00
|
|
|
|
2022-07-14 18:50:17 +02:00
|
|
|
Window window;
|
2020-12-13 19:38:46 +01:00
|
|
|
window.show();
|
2017-07-25 10:47:40 +02:00
|
|
|
|
2017-07-25 07:24:27 +02:00
|
|
|
return app.exec();
|
|
|
|
}
|