Exemple #1
0
/**
  * Constructor of this class.
  *
  * @param QWidget pointer to parent object. By default the value is NULL.
  */
ResultDialog::ResultDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ResultDialog)
{
    ui->setupUi(this);

    helpAccelerationDialog = NULL;

    timeAxelLength = 10;
    resultString = "";
    speedList << "0" << "10" << "20" << "30" << "40" << "50" << "60" << "70" << "80" << "90" << "100" ;
    timeList << "0" << "1" << "2" << "3" << "4" << "5" << "6" << "7" << "8" << "9" << "10" << "11"
             << "12" << "13" << "14" << "15" << "16" << "17" << "18" << "19" << "20";
    this->diagramGapStem = DIAGRAMGAP100KMH;
    this->diagramGapHorizontal = DIAGRAMGAP20S;
    for (int i = 0; i < 11; i++)
    {
        timeArray[i] = 0;
    }

    //Clear info label
    ui->labelInfoToUser->setText("");

    if (loginSaved())
    {
        ui->pushButtonSend->setEnabled(true);
    }
    else
    {
        ui->pushButtonSend->setEnabled(false);
        ui->labelInfoToUser->setText("You're not logged! Please register or log in and accelerate again.");
    }
}
Exemple #2
0
void MainWindow::setUsernameToMainPanel()
{
    if (loginSaved())
    {
        this->setWindowTitle("SpeedFreak - " + settingsDialog->getUserName());
    }
    else
    {
        this->setWindowTitle("SpeedFreak - Not logged");
    }
}