void TtbDialog::uploadToTtb() { // TODO: check for user/pw // TODO: ask for overwrite progressBar->setValue(0); requestSettings(); }
ContextMenu::ContextMenu(QWidget *parent) : QDialog(parent) { setWindowFlags(Qt::FramelessWindowHint | Qt::Widget); setAutoFillBackground(true); calendar = new QPushButton(); network = new QPushButton(); settings = new QPushButton(); quit = new QPushButton(); calendar->setIcon(QIcon(":calendar.png")); calendar->setToolTip(tr("Calendar")); network->setIcon(QIcon(":network.png")); network->setToolTip(tr("Network")); settings->setIcon(QIcon(":settings.png")); settings->setToolTip(tr("Settings")); quit->setIcon(QIcon(":quit.png")); quit->setToolTip(tr("Quit")); connect(calendar, SIGNAL(clicked()), this, SIGNAL(requestCalendar())); connect(network, SIGNAL(clicked()), this, SIGNAL(requestNetwork())); connect(settings, SIGNAL(clicked()), this, SIGNAL(requestSettings())); connect(quit, SIGNAL(clicked()), this, SIGNAL(requestQuit())); connect(calendar, SIGNAL(clicked()), this, SLOT(hide())); connect(network, SIGNAL(clicked()), this, SLOT(hide())); connect(settings, SIGNAL(clicked()), this, SLOT(hide())); QHBoxLayout *layout = new QHBoxLayout(); layout->addWidget(calendar); layout->addWidget(network); layout->addWidget(settings); layout->addWidget(quit); setModal(true); setBackgroundRole(QPalette::Window); setLayout(layout); }
void TrainingstagebuchUploader::upload() { uploadSuccessful = false; requestSettings(); if( !uploadSuccessful ){ parent->progressLabel->setText(tr("Error uploading to Trainingstagebuch.org")); } else { parent->progressLabel->setText(tr("successfully uploaded to Trainingstagebuch.org as %1") .arg(exerciseId)); ride->ride()->setTag("TtbExercise", exerciseId ); ride->setDirty(true); } }
bool Commands::config(void) { bool done = false; long ts = millis(); int diff = ts - mLastTS; if (diff >= 50) { switch (mCfgIdx) { case 0: setDate(); break; case 1: setTime(); break; case 2: requestStates(); break; case 3: requestSettings(); break; case 4: moveCamera(0, 0); break; case 5: enableVideoAutoRecording(0); break; case 6: enableVideoStreaming(0); done = true; break; } mCfgIdx++; mLastTS = ts; } return done; }