add swipe gesture

This commit is contained in:
xueyan hu
2022-01-18 16:40:18 +08:00
parent 61e5d547f8
commit 437423dd00
9 changed files with 215 additions and 116 deletions

View File

@@ -13,6 +13,8 @@ namespace Ui {
}
class GUIMessageDialog;
class QTabWidget;
class QGestureEvent;
class QSwipeGesture;
class MainWindow : public QMainWindow
@@ -28,13 +30,17 @@ public:
void requestLogin();
QTextEdit* getEdit();
void debugConsoleOn();
public slots:
void triggerError(const QString&);
void grabGestures(const QList<Qt::GestureType>& gestures);
public slots:
void triggerError(const QString&);
protected:
void changeEvent(QEvent* event);
bool event(QEvent* event) override;
private:
bool gestureEvent(QGestureEvent* event);
void swipeTriggered(QSwipeGesture*);
void loadStyleSheet(const QString& sheetName);
cJSON* json_root = nullptr;