Пример #1
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
   showFullScreen();
   startInfo = new StartDialog(this);
   
   testArea = new TestEnv(numTargets,200,20,this);
   QObject::connect(testArea, SIGNAL(emitHit(const int&)), this, SLOT(setRem(const int&)));
   QObject::connect(testArea, SIGNAL(emitError(const int&)), this, SLOT(setErr(const int&)));
   QObject::connect(testArea, SIGNAL(emitFinish()), this, SLOT(startTests()));
   QObject::connect(testArea, SIGNAL(retResults(const int&, const int&, const double&)), this, SLOT(saveResults(const int&, const int&, const double&)));

   testArea2 = new TestEnv(numTargets,200,20,this);
   QObject::connect(testArea2, SIGNAL(emitHit(const int&)), this, SLOT(setRem(const int&)));
   QObject::connect(testArea2, SIGNAL(emitError(const int&)), this, SLOT(setErr(const int&)));
   QObject::connect(testArea2, SIGNAL(emitFinish()), this, SLOT(startTests()));
   QObject::connect(testArea2, SIGNAL(retResults(const int&, const int&, const double&)), this, SLOT(saveResults(const int&, const int&, const double&)));

   QHBoxLayout *layout = new QHBoxLayout();
   layout->addWidget(testArea);
   layout->addWidget(testArea2);

   QWidget *temp = new QWidget();
   temp->setLayout(layout);
   setCentralWidget(temp);
   
   createDock();
   getInfo();
   loadCursors();
   displayInformation();
   startTests();
}
Пример #2
0
// The loop function is called in an endless loop
void loop()
{
	//horloge
	displayDate();
	displayTimeDigit();

	//if (update == ON) {
    	//informations
    	getData();
    	storeData();
    	displayInformation();
    //}
    delay(500);
}
Пример #3
0
ViewFacility::ViewFacility(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::ViewFacility)
{
    ui->setupUi(this);

    connect(ui->DisplayButton, SIGNAL(clicked()),this,SLOT(displayInformation()));


    QVector<int> facilities = DataStorage::getAllFacilities();
    for(int i=0; i< facilities.size();i++)
     {
            QString facilName = DataStorage::getFacilityName(facilities.at(i));
            ui->comboBox_facilities->addItem(facilName);
     }

}