ukui-touch-settings-plugin/touchscreen-settings/touchscreen.h

66 lines
1.4 KiB
C++

#ifndef TOUCHSCREEN_H
#define TOUCHSCREEN_H
#include "gesturewidget.h"
#include <QWidget>
#include <QMovie>
#include <QGSettings>
#include <QVector>
//#include <QMediaPlayer>
//#include <QVideoWidget>
//#include <QMediaPlaylist>
namespace Ui {
class TouchScreen;
}
enum class screenGestureType
{
bottomEdgeSwipe,
topEdgeSwipe,
rightEdgeSwipe,
fourFingersSwipeDown,
fourFingersHorizontalSwipe,
unknown
};
class TouchScreen : public QWidget
{
Q_OBJECT
public:
explicit TouchScreen(QWidget *parent = nullptr);
~TouchScreen();
bool eventFilter(QObject *watched, QEvent *event);
private:
///
/// \brief 监听图标主题的变化,图标主题改变后修改播放按钮的图标
///
void monitorIconThemeChange();
public slots:
// void startVideo1();
// void mediaStatusChanged(QMediaPlayer::MediaStatus status);
// void stateChanged(QMediaPlayer::State state);
void stopGif();
signals:
void iconThemeChangedSignal();
private:
Ui::TouchScreen *ui;
quint32 m_cycleNum;
void initUI();
void loadGif();
void playGif(screenGestureType type);
QMovie *m_movie;
QVector<gestureWidget *> m_gestureArray;
QGSettings *m_iconThemeGSettings;
// void loadVideo();
// videoWidget *m_videoWidget;
// QMediaPlayer *player;
// QVideoWidget *videoWidget;
// QMediaPlaylist *medialist;
};
#endif // TOUCHSCREEN_H