2022-04-01 13:56:16 +02:00

67 lines
1.7 KiB
C++

/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#include "label/LabelPage.h"
#include "progressbar/ProgressBarPage.h"
#include "slider/SliderPage.h"
#include "switchbutton/SwitchButtonPage.h"
#include <SkinnyShortcut.h>
#include <SkinnyShapeProvider.h>
#include <QskFocusIndicator.h>
#include <QskObjectCounter.h>
#include <QskTabView.h>
#include <QskWindow.h>
#include <QGuiApplication>
namespace
{
class TabView : public QskTabView
{
public:
TabView( QQuickItem* parent = nullptr )
: QskTabView( parent )
{
setMargins( 10 );
setTabPosition( Qsk::Left );
setAutoFitTabs( true );
}
};
}
int main( int argc, char* argv[] )
{
#ifdef ITEM_STATISTICS
QskObjectCounter counter( true );
#endif
Qsk::addGraphicProvider( "shapes", new SkinnyShapeProvider() );
QGuiApplication app( argc, argv );
SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts );
auto tabView = new TabView();
tabView->addTab( "Labels", new LabelPage() );
tabView->addTab( "Sliders", new SliderPage() );
tabView->addTab( "Progress\nBars", new ProgressBarPage() );
tabView->addTab( "Switches", new SwitchButtonPage() );
QSize size( 800, 600 );
size = size.expandedTo( tabView->sizeHint().toSize() );
QskWindow window;
window.addItem( tabView );
window.addItem( new QskFocusIndicator() );
window.resize( size );
window.show();
return app.exec();
}