Changeset View
Changeset View
Standalone View
Standalone View
src/canvaswidget.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | 46 | | |||
47 | public Q_SLOTS: | 47 | public Q_SLOTS: | ||
48 | void newGame(); | 48 | void newGame(); | ||
49 | void showLine(const QString &line, int lineNumber); | 49 | void showLine(const QString &line, int lineNumber); | ||
50 | void putGift(const QString &gift, int times, const QString &pos); | 50 | void putGift(const QString &gift, int times, const QString &pos); | ||
51 | void updateBarDirection(); | 51 | void updateBarDirection(); | ||
52 | void startGame(); | 52 | void startGame(); | ||
53 | void updateCursor(); | 53 | void updateCursor(); | ||
54 | void resetCursor(); | | |||
55 | void resetMousePosition(); | 54 | void resetMousePosition(); | ||
56 | 55 | | |||
57 | protected: | 56 | protected: | ||
58 | void focusOutEvent(QFocusEvent *event) override; | 57 | void focusOutEvent(QFocusEvent *event) override; | ||
59 | void resizeEvent(QResizeEvent *event) override; | 58 | void resizeEvent(QResizeEvent *event) override; | ||
59 | bool event(QEvent *event) override; | ||||
60 | 60 | | |||
61 | private: | 61 | private: | ||
62 | //used when moving the bar with the keys | 62 | //used when moving the bar with the keys | ||
63 | int m_barDirection; | 63 | int m_barDirection; | ||
64 | 64 | | |||
65 | // used to track which direction keys are pressed between key events | 65 | // used to track which direction keys are pressed between key events | ||
66 | bool m_rightPressed; | 66 | bool m_rightPressed; | ||
67 | bool m_leftPressed; | 67 | bool m_leftPressed; | ||
68 | KgThemeProvider *m_provider; | 68 | KgThemeProvider *m_provider; | ||
69 | }; | 69 | }; | ||
70 | 70 | | |||
71 | #endif //CANVASWIDGET_H | 71 | #endif //CANVASWIDGET_H |