[Horus] Simulator refactoring. This one should be nice :)
This commit is contained in:
@@ -8,12 +8,27 @@ SimulatorDialogHorus::SimulatorDialogHorus(QWidget * parent, SimulatorInterface
|
||||
SimulatorDialog(parent, simulator, flags),
|
||||
ui(new Ui::SimulatorDialogHorus)
|
||||
{
|
||||
QPolygon polygon;
|
||||
|
||||
lcdWidth = 480;
|
||||
lcdHeight = 270;
|
||||
lcdDepth = 16;
|
||||
|
||||
initUi<Ui::SimulatorDialogHorus>(ui);
|
||||
|
||||
polygon.setPoints(6, 68, 83, 28, 45, 51, 32, 83, 32, 105, 45, 68, 83);
|
||||
ui->rightbuttons->addArea(polygon, Qt::Key_Up, "9xcursup.png");
|
||||
polygon.setPoints(6, 74, 90, 114, 51, 127, 80, 127, 106, 114, 130, 74, 90);
|
||||
ui->rightbuttons->addArea(polygon, Qt::Key_Right, "9xcursmin.png");
|
||||
polygon.setPoints(6, 68, 98, 28, 137, 51, 151, 83, 151, 105, 137, 68, 98);
|
||||
ui->rightbuttons->addArea(polygon, Qt::Key_Down, "9xcursdown.png");
|
||||
polygon.setPoints(6, 80, 90, 20, 51, 7, 80, 7, 106, 20, 130, 80, 90);
|
||||
ui->rightbuttons->addArea(polygon, Qt::Key_Left, "9xcursplus.png");
|
||||
ui->rightbuttons->addArea(5, 148, 39, 182, Qt::Key_Print, "9xcursphoto.png");
|
||||
|
||||
ui->leftbuttons->addArea(25, 60, 71, 81, Qt::Key_PageUp, "9xmenumenu.png");
|
||||
ui->leftbuttons->addArea(25, 117, 71, 139, Qt::Key_Escape, "9xmenuexit.png");
|
||||
|
||||
// install simulator TRACE hook
|
||||
simulator->installTraceHook(traceCb);
|
||||
|
||||
@@ -34,8 +49,8 @@ SimulatorDialogHorus::SimulatorDialogHorus(QWidget * parent, SimulatorInterface
|
||||
ui->trimVL_U->setText(QString::fromUtf8(upArrow));
|
||||
ui->trimVL_D->setText(QString::fromUtf8(downArrow));
|
||||
|
||||
connect(ui->cursor, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
|
||||
connect(ui->menu, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
|
||||
connect(ui->leftbuttons, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
|
||||
connect(ui->rightbuttons, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
|
||||
connect(ui->trimHR_L, SIGNAL(pressed()), this, SLOT(onTrimPressed()));
|
||||
connect(ui->trimHR_R, SIGNAL(pressed()), this, SLOT(onTrimPressed()));
|
||||
connect(ui->trimVR_U, SIGNAL(pressed()), this, SLOT(onTrimPressed()));
|
||||
@@ -103,9 +118,10 @@ void SimulatorDialogHorus::getValues()
|
||||
buttonPressed == Qt::Key_PageUp,
|
||||
buttonPressed == Qt::Key_Escape,
|
||||
buttonPressed == Qt::Key_Enter,
|
||||
buttonPressed == Qt::Key_PageDown,
|
||||
buttonPressed == Qt::Key_Plus,
|
||||
buttonPressed == Qt::Key_Minus
|
||||
buttonPressed == Qt::Key_Up,
|
||||
buttonPressed == Qt::Key_Down,
|
||||
buttonPressed == Qt::Key_Right,
|
||||
buttonPressed == Qt::Key_Left
|
||||
},
|
||||
|
||||
middleButtonPressed,
|
||||
|
||||
Reference in New Issue
Block a user