53 lines
1.0 KiB
C
Raw Normal View History

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>
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
{
Q_OBJECT
2022-08-02 09:36:22 +02:00
public:
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:
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;
int m_currentIndex;
2021-09-24 14:47:56 +02:00
};