2017-07-21 18:21:34 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the 3-clause BSD License
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
#include "DynamicConstraintsPage.h"
|
2017-07-21 18:21:34 +02:00
|
|
|
#include "FlowLayoutPage.h"
|
|
|
|
#include "LinearLayoutPage.h"
|
2019-05-10 07:33:41 +02:00
|
|
|
#include "GridLayoutPage.h"
|
2017-07-21 18:21:34 +02:00
|
|
|
#include "StackLayoutPage.h"
|
2019-07-09 10:16:04 +02:00
|
|
|
#include "TestRectangle.h"
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
#include <SkinnyFont.h>
|
|
|
|
#include <SkinnyShortcut.h>
|
|
|
|
|
|
|
|
#include <QskFocusIndicator.h>
|
2018-08-03 08:15:28 +02:00
|
|
|
#include <QskObjectCounter.h>
|
2017-07-21 18:21:34 +02:00
|
|
|
#include <QskTabView.h>
|
2018-08-03 08:15:28 +02:00
|
|
|
#include <QskWindow.h>
|
2019-07-09 10:16:04 +02:00
|
|
|
#include <QskQml.h>
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
#include <QGuiApplication>
|
|
|
|
|
|
|
|
int main( int argc, char* argv[] )
|
|
|
|
{
|
|
|
|
#ifdef ITEM_STATISTICS
|
|
|
|
QskObjectCounter counter( true );
|
|
|
|
#endif
|
2019-07-09 10:16:04 +02:00
|
|
|
QskQml::registerTypes();
|
|
|
|
qmlRegisterType< TestRectangle >( "Test", 1, 0, "TestRectangle" );
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
QGuiApplication app( argc, argv );
|
|
|
|
|
|
|
|
SkinnyFont::init( &app );
|
|
|
|
SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts );
|
|
|
|
|
2019-02-26 21:49:39 +01:00
|
|
|
auto tabView = new QskTabView();
|
2019-05-10 07:33:41 +02:00
|
|
|
|
2017-07-21 18:21:34 +02:00
|
|
|
tabView->setMargins( 10 );
|
2019-04-17 16:33:17 +02:00
|
|
|
tabView->setTabPosition( Qsk::Left );
|
2020-08-10 14:30:52 +02:00
|
|
|
tabView->setAutoFitTabs( true );
|
|
|
|
|
2019-05-10 07:33:41 +02:00
|
|
|
tabView->addTab( "Grid Layout", new GridLayoutPage() );
|
2017-07-21 18:21:34 +02:00
|
|
|
tabView->addTab( "Flow Layout", new FlowLayoutPage() );
|
|
|
|
tabView->addTab( "Linear Layout", new LinearLayoutPage() );
|
2019-07-09 13:51:47 +02:00
|
|
|
tabView->addTab( "Dynamic\nConstraints", new DynamicConstraintsPage() );
|
2017-07-21 18:21:34 +02:00
|
|
|
tabView->addTab( "Stack Layout", new StackLayoutPage() );
|
|
|
|
|
2019-07-09 10:16:04 +02:00
|
|
|
tabView->setCurrentIndex( 0 );
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|