2021-09-24 14:47:56 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QskControl.h>
|
|
|
|
#include <QskPanGestureRecognizer.h>
|
2022-08-02 09:36:22 +02:00
|
|
|
#include <QskStackBox.h>
|
2021-09-24 14:47:56 +02:00
|
|
|
|
|
|
|
#include <QQuickWindow>
|
|
|
|
|
2022-12-22 18:15:04 +01:00
|
|
|
class MenuBar;
|
2021-09-24 14:47:56 +02:00
|
|
|
class QskBox;
|
|
|
|
class QskLinearBox;
|
2022-08-02 09:36:22 +02:00
|
|
|
|
|
|
|
class Cube : public QskStackBox
|
|
|
|
{
|
2022-12-22 18:15:04 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
2022-08-02 09:36:22 +02:00
|
|
|
public:
|
2022-12-22 18:15:04 +01:00
|
|
|
enum {
|
|
|
|
Left,
|
|
|
|
Front,
|
|
|
|
Right,
|
|
|
|
Back,
|
|
|
|
Top,
|
|
|
|
Bottom
|
|
|
|
} Position;
|
|
|
|
|
2022-08-02 09:36:22 +02:00
|
|
|
explicit Cube( QQuickItem* parent = nullptr );
|
|
|
|
void startAnimation( Qsk::Direction direction );
|
|
|
|
};
|
2021-09-24 14:47:56 +02:00
|
|
|
|
|
|
|
class MainItem : public QskControl
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainItem( QQuickItem* parent = nullptr );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool gestureFilter( QQuickItem*, QEvent* ) override final;
|
|
|
|
void gestureEvent( QskGestureEvent* ) override final;
|
|
|
|
|
|
|
|
private:
|
2022-12-22 18:15:04 +01:00
|
|
|
void switchToPage( const int index );
|
|
|
|
|
|
|
|
MenuBar* m_mainMenuBar;
|
|
|
|
MenuBar* m_otherMenuBar;
|
2022-08-02 09:36:22 +02:00
|
|
|
Cube* m_cube;
|
2021-09-24 14:47:56 +02:00
|
|
|
QskLinearBox* m_mainLayout;
|
2022-07-14 14:43:21 +02:00
|
|
|
QskLinearBox* m_otherLayout;
|
2021-09-24 14:47:56 +02:00
|
|
|
QskPanGestureRecognizer m_panRecognizer;
|
2022-12-22 18:15:04 +01:00
|
|
|
int m_currentIndex;
|
2021-09-24 14:47:56 +02:00
|
|
|
};
|