From 3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sat, 17 Sep 2011 03:03:23 +0200 Subject: preparing for library package --- libsowatch/metawatchsimulatorform.cpp | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 libsowatch/metawatchsimulatorform.cpp (limited to 'libsowatch/metawatchsimulatorform.cpp') diff --git a/libsowatch/metawatchsimulatorform.cpp b/libsowatch/metawatchsimulatorform.cpp new file mode 100644 index 0000000..f2323bd --- /dev/null +++ b/libsowatch/metawatchsimulatorform.cpp @@ -0,0 +1,82 @@ +#include "metawatchsimulatorform.h" +#include "ui_metawatchsimulatorform.h" + +using namespace sowatch; + +MetaWatchSimulatorForm::MetaWatchSimulatorForm(QWidget* parent) : + QWidget(parent), + ui(new Ui::MetaWatchSimulatorForm) +{ + ui->setupUi(this); +} + +MetaWatchSimulatorForm::~MetaWatchSimulatorForm() +{ + delete ui; +} + +void MetaWatchSimulatorForm::refreshScreen(const QPixmap& pixmap) +{ + ui->lblDisplay->setPixmap(pixmap); + ui->lblDisplay->update(); +} + +void MetaWatchSimulatorForm::btnAPressed() +{ + emit buttonPressed(0); +} + +void MetaWatchSimulatorForm::btnAReleased() +{ + emit buttonReleased(0); +} + +void MetaWatchSimulatorForm::btnBPressed() +{ + emit buttonPressed(1); +} + +void MetaWatchSimulatorForm::btnBReleased() +{ + emit buttonReleased(1); +} + +void MetaWatchSimulatorForm::btnCPressed() +{ + emit buttonPressed(2); +} + +void MetaWatchSimulatorForm::btnCReleased() +{ + emit buttonReleased(2); +} + +void MetaWatchSimulatorForm::btnDPressed() +{ + emit buttonPressed(3); +} + +void MetaWatchSimulatorForm::btnDReleased() +{ + emit buttonReleased(3); +} + +void MetaWatchSimulatorForm::btnEPressed() +{ + emit buttonPressed(4); +} + +void MetaWatchSimulatorForm::btnEReleased() +{ + emit buttonReleased(4); +} + +void MetaWatchSimulatorForm::btnFPressed() +{ + emit buttonPressed(5); +} + +void MetaWatchSimulatorForm::btnFReleased() +{ + emit buttonReleased(5); +} -- cgit v1.2.3