APservice/win02cpp

83 lines
2.0 KiB
Plaintext
Executable File

#include "win02.h"
T_win02::T_win02(hwinf *HWaccess, QWidget *parent) : QWidget(parent)
{
//setStyleSheet("background-color: yellow"); // geht aber schaut bescheiden aus
this->HWaccess=HWaccess;
// headline
QGridLayout *GeneralLayout = new QGridLayout();
QLabel *fileName1 = new QLabel(tr("win02"));
//GeneralLayout->addWidget(fileName1, 0, 0, 2, 0, Qt::AlignLeft); // Left Right HCenter Justify
// Top Bottm VCenter Baseline
GeneralLayout->addWidget(fileName1, 0, 0);
setLayout(GeneralLayout);
// HWaccess = new hwinf();
//HWaccess->dc_getTemperaturStr(); // just to see if access is allowed
myNextStep=0;
}
void T_win02::Nav_back(void)
{
myNextStep=1;
}
void T_win02::Nav_home(void)
{
}
void T_win02::Nav_next(void)
{
}
bool T_win02::work_ini(uint16_t *nextScreen, uint8_t *useNavi)
{
// one state of the vending/operating FSM
// called ONE time after selecting this state (initialization)
*nextScreen=0; // needed 0=no change
*useNavi=0; // bit1,2,3: use buttons next, home, back
myNextStep=0;
*useNavi=SWITCH_BACK_ON | SWITCH_HOME_OFF | SWITCH_NEXT_OFF;
return false;
}
bool T_win02::working(uint16_t *nextScreen, uint8_t *useNavi)
{
// one state of the vending/operating FSM
// called cyclic until this state changes intentionally to another state
// display informations for human operator, react on operators inputs or wait for payment media
// this->updateGui();
*nextScreen=0; // 0=no change
*useNavi=0; // bit1,2,3: use buttons next, home, back
if (myNextStep)
{
//qDebug()<<"fenster1 working: "<< myNextStep;
*nextScreen=WCS_SERVICE_MAIN;
myNextStep=0;
}
return true;
}
T_win02::~T_win02()
{
this->close();
}
void T_win02::updateGui(void)
{
}