separate screen handling shit to a specialized class

This commit is contained in:
Arisotura
2020-05-24 23:16:56 +02:00
parent f69f3fcb7a
commit 16252a85e7
4 changed files with 140 additions and 97 deletions

View File

@ -64,7 +64,24 @@ private:
};
class MainWindowPanel : public QWidget
class ScreenHandler
{
protected:
void screenSetupLayout(int w, int h);
QSize screenGetMinSize();
void screenOnMousePress(QMouseEvent* event);
void screenOnMouseRelease(QMouseEvent* event);
void screenOnMouseMove(QMouseEvent* event);
float screenMatrix[2][6];
bool touching;
};
class MainWindowPanel : public QWidget, public ScreenHandler
{
Q_OBJECT
@ -88,9 +105,8 @@ private slots:
void onScreenLayoutChanged();
private:
QImage* screen[2];
QImage screen[2];
QTransform screenTrans[2];
bool touching;
};