/*! \brief Constructor */ CalenDayView::CalenDayView(MCalenServices &services) : CalenNativeView(services), mContentScrollArea(NULL), mContentWidget(NULL), mHourScrollArea(NULL), mVLayout(NULL), mMainContainer(NULL), mDocLoader(NULL), mIsLaunching(true), mSettingsManager(NULL), mRegionalInfoKey(XQSettingsKey::TargetCentralRepository, KCRUidCalendar, KCalendarShowRegionalInfo), mServices(services), mRegionalInfoGroupBox(NULL), mGoToTodayMenuAction(NULL), mBg(NULL), mGesturesAbsorber(NULL) { setupMenu(); // Create model manager mModelManager = new CalenDayModelManager(mServices, true, this); mSettingsManager = new XQSettingsManager(this); mSettingsManager->startMonitoring(mRegionalInfoKey); //setup Back functionality, launch the month view only when it is // the first view if (ECalenMonthView == mServices.getFirstView()) { HbAction* action = new HbAction(Hb::BackNaviAction, this); setNavigationAction(action); // Connect to the signal triggered by clicking on back button. connect(action, SIGNAL(triggered()), this, SLOT(onBack())); } HbStyleLoader::registerFilePath(":/calendayhourelement.css"); HbStyleLoader::registerFilePath(":/calendayhourelement.widgetml"); HbStyleLoader::registerFilePath(":/calendayitem.css"); HbStyleLoader::registerFilePath(":/calendayitem.widgetml"); HbStyleLoader::registerFilePath(":/calendayeventspane.css"); HbStyleLoader::registerFilePath(":/calendayhourscrollarea.css"); }
fileList::fileList(QWidget *parent) : QWidget(parent) { ui.setupUi(this); pReader = new WavReader; pIqReader = new WavReader; pIqWriter = new WavWriter; connect(pIqReader, SIGNAL(isStart(bool)), this, SLOT(onStart(bool))); ui.twList->horizontalHeader()->setStretchLastSection(true); ui.twList->setSelectionMode(QAbstractItemView::SingleSelection); connect(ui.twList, SIGNAL(cellDoubleClicked (int, int)), this, SLOT(onTwDoubleClick(int, int))); lastRow = 1; loopMode = 0; isPlayed = false; isRecorded = false; isPause = false; connect(ui.pbAddFile, SIGNAL(clicked()), this, SLOT(onAddFile())); connect(ui.pbDelFile, SIGNAL(clicked()), this, SLOT(onDelFile())); connect(ui.pbRec, SIGNAL(clicked()), this, SLOT(onRec())); connect(ui.pbPlay, SIGNAL(clicked()), this, SLOT(onPlay())); connect(ui.pbPause, SIGNAL(clicked()), this, SLOT(onPause())); connect(ui.pbStop, SIGNAL(clicked()), this, SLOT(onStop())); connect(ui.pbBack, SIGNAL(clicked()), this, SLOT(onBack())); connect(ui.pbLoop, SIGNAL(clicked(bool)), this, SLOT(onLoop(bool))); ui.pbPause->setEnabled(false); }
IntroWidget::IntroWidget(QWidget *parent) : TWidget(parent) , _a_stage(animation(this, &IntroWidget::step_stage)) , _a_show(animation(this, &IntroWidget::step_show)) , _back(this, st::setClose) { setGeometry(QRect(0, st::titleHeight, App::wnd()->width(), App::wnd()->height() - st::titleHeight)); connect(&_back, SIGNAL(clicked()), this, SLOT(onBack())); _back.hide(); _countryForReg = psCurrentCountry(); MTP::send(MTPhelp_GetNearestDc(), rpcDone(&IntroWidget::gotNearestDC)); _stepHistory.push_back(new IntroStart(this)); _back.raise(); connect(parent, SIGNAL(resized(const QSize&)), this, SLOT(onParentResize(const QSize&))); show(); setFocus(); cSetPasswordRecovered(false); _back.move(st::setClosePos.x(), st::setClosePos.y()); #ifndef TDESKTOP_DISABLE_AUTOUPDATE Sandbox::startUpdateCheck(); #endif }
bool IntroCode::codeSubmitFail(const RPCError &error) { stopCheck(); code.setDisabled(false); const QString &err = error.type(); if (err == "PHONE_NUMBER_INVALID" || err == "PHONE_CODE_EXPIRED") { // show error onBack(); return true; } else if (err == "PHONE_CODE_EMPTY" || err == "PHONE_CODE_INVALID") { showError(lang(lng_bad_code)); code.setFocus(); return true; } else if (err == "PHONE_NUMBER_UNOCCUPIED") { // success, need to signUp intro()->setCode(sentCode); intro()->onIntroNext(); return true; } if (QRegularExpression("^FLOOD_WAIT_(\\d+)$").match(err).hasMatch()) { showError(lang(lng_flood_error)); code.setFocus(); return true; } if (cDebug()) { // internal server error showError(err + ": " + error.description()); } else { showError(lang(lng_server_error)); } code.setFocus(); return false; }
void OsuScreenBackable::onKeyDown(KeyboardEvent &e) { OsuScreen::onKeyDown(e); if (!m_bVisible || e.isConsumed()) return; if (e == KEY_ESCAPE || e == (KEYCODE)OsuKeyBindings::GAME_PAUSE.getInt()) onBack(); e.consume(); }
void IntroWidget::keyPressEvent(QKeyEvent *e) { if (_a_show.animating() || _a_stage.animating()) return; if (e->key() == Qt::Key_Escape) { if (step()->hasBack()) { onBack(); } } else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return || e->key() == Qt::Key_Space) { onStepSubmit(); } }
PhMediaPanel::PhMediaPanel(QWidget *parent) : QWidget(parent), ui(new Ui::PhMediaPanel), _clock(NULL), _firstFrame(0), _mediaLength(0) { ui->setupUi(this); //Buttons Init ui->_playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); connect(ui->_playButton, SIGNAL(clicked()), this, SLOT(onPlayPause())); ui->_fastForwardButton->setIcon(style()->standardIcon(QStyle::SP_MediaSeekForward)); connect(ui->_fastForwardButton, SIGNAL(clicked()), this, SLOT(onFastForward())); ui->_fastRewindButton->setIcon(style()->standardIcon(QStyle::SP_MediaSeekBackward)); connect(ui->_fastRewindButton, SIGNAL(clicked()), this, SLOT(onRewind())); ui->_backButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward)); connect(ui->_backButton, SIGNAL(clicked()), this, SLOT(onBack())); ui->_nextFrameButton->setIcon(style()->standardIcon(QStyle::SP_ArrowForward)); connect(ui->_nextFrameButton, SIGNAL(clicked()), this, SLOT(onNextFrame())); ui->_previousFrameButton->setIcon(style()->standardIcon(QStyle::SP_ArrowBack)); connect(ui->_previousFrameButton, SIGNAL(clicked()), this, SLOT(onPreviousFrame())); connect(ui->_slider, SIGNAL(sliderMoved(int)), this, SLOT(onSliderChanged(int))); //Combobox Init ui->_rateSelectionBox->addItem("23.98 fps"); ui->_rateSelectionBox->addItem("24 fps"); ui->_rateSelectionBox->addItem("25 fps"); ui->_rateSelectionBox->addItem("29.97 fps"); connect(ui->_rateSelectionBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onTCTypeComboChanged())); ui->_playButton->setDefault(true); }
Widget::Widget(QWidget *parent, PeerData *peer) : Window::SectionWidget(parent) , _scroll(this, st::setScroll) , _inner(this, peer) , _fixedBar(this, peer) , _fixedBarShadow(this, st::shadowColor) { _fixedBar->move(0, 0); _fixedBar->resizeToWidth(width()); _fixedBar->show(); _fixedBarShadow->setMode(ToggleableShadow::Mode::HiddenFast); _fixedBarShadow->raise(); updateAdaptiveLayout(); _scroll->setOwnedWidget(_inner); _scroll->move(0, _fixedBar->height()); _scroll->show(); connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll())); connect(_inner, SIGNAL(cancelled()), _fixedBar, SLOT(onBack())); }
int Stage::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: sendDataToKnx((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break; case 1: exit((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 2: quit(); break; case 3: DisplayMainScreen(); break; case 4: onBack(); break; case 5: UpdateScreen((*reinterpret_cast< QString(*)>(_a[1]))); break; case 6: onUiValueChange((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break; case 7: onDataFromKnx((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 8: onExit((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: onQuit(); break; default: ; } _id -= 10; } return _id; }
void pdp::MainWindow::setupUi() { // Add back button QPushButton* back = new QPushButton(QIcon(":/common/res/common/back.png"), QApplication::translate("MainWindow", "Zur\303\274ck", 0, QApplication::UnicodeUTF8)); ui_main.tabWidget->setCornerWidget(back, Qt::TopRightCorner); QObject::connect(back, SIGNAL(clicked()), this, SLOT(onBack())); // Add the "start" tab. new pdp::Home(this->ui_main.tabWidget, this); // Creates progressDialog m_progressDialog = new QProgressDialog("", QString(), 0, 100, this); m_progressDialog->setMinimumDuration(0); //m_progressDialog->setWindowModality(Qt::WindowModal); // Correction of automatic segmentation via 3d interactive segmentation m_NumberOfInstancesOfThreeDEditing = 0; QMenu *menuWerkzeug; menuWerkzeug = new QMenu(ui_main.menubar); menuWerkzeug->setObjectName(QString::fromUtf8("menuWerkzeug")); menuWerkzeug->setTitle(QApplication::translate("MainWindow", "Werkzeug", 0, QApplication::UnicodeUTF8)); ui_main.menubar->addMenu(menuWerkzeug); QAction *actionThreeDEditing = new QAction(this); actionThreeDEditing->setObjectName(QString::fromUtf8("actionThreeDEditing")); actionThreeDEditing->setIconText("3DEditing"); QIcon icn_menu; icn_menu.addFile(":/threeDEditing/res/threeDEditing/Rubber-32.png"); actionThreeDEditing->setIcon(icn_menu); menuWerkzeug->addAction(actionThreeDEditing); QObject::connect(actionThreeDEditing, SIGNAL(triggered()), this, SLOT(CreateThreeDEditing())); // AutoRun if(AUTO_IMPORT == 1) CreateThreeDEditing(); }
MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), loginWindow_(NULL), connectWindow_(NULL), serverListWindow_(0), timer_(NULL), settingsMenu_(0), connected_(0), getServers_(NULL) { QCoreApplication::setOrganizationName("CPPP"); QCoreApplication::setApplicationName("VPNht"); ui.setupUi(this); setWindowTitle("VPN.ht " + QString(VERSION)); g_openVPNConnection = new OpenVPNConnectorQt(this); if (!g_openVPNConnection->installHelper(SERVICE_NAME)) { QMessageBox::information(this, "VPNht", "Failed to install helper for program. Please contact support."); QTimer::singleShot(1, this, SLOT(close())); return; } #if defined Q_OS_MAC //setAttribute(Qt::WA_QuitOnClose, false); #endif trayIcon_ = new QSystemTrayIcon(this); trayMenu_ = new QMenu(this); actConnect_ = new QAction("Connect", this); actDisconnect_ = new QAction("Disconnect", this); actHelp_ = new QAction("Help", this); actLiveChat_ = new QAction("Live chat", this); actExit_ = new QAction("Quit", this); trayMenu_->addAction(actConnect_); trayMenu_->addAction(actDisconnect_); trayMenu_->addSeparator(); trayMenu_->addAction(actHelp_); trayMenu_->addAction(actLiveChat_); trayMenu_->addAction(actExit_); trayIcon_->setContextMenu(trayMenu_); trayIcon_->hide(); setTrayStatusDisconnected(false); settingsMenu_ = new QMenu(this); settingsMenu_->addAction("Settings", this, SLOT(onSettings())); settingsMenu_->addAction("Status", this, SLOT(onStatus())); settingsMenu_->addAction("Help", this, SLOT(onHelp())); settingsMenu_->addAction("Proxy", this, SLOT(onProxy())); settingsMenu_->addAction("Show logs", this, SLOT(onShowLogs())); settingsMenu_->addAction("Logout", this, SLOT(onReturnToSignUp())); settingsMenu_->setStyleSheet(ctxMenuStyle); loginWindow_ = new LoginWindow(this); ui.verticalLayout->addWidget(loginWindow_); loginWindow_->loadSettings(); loginWindow_->hide(); connect(loginWindow_, SIGNAL(signedIn(QString, QString)), SLOT(onSignIn(QString, QString))); waitWindow_ = new WaitWindow(this); ui.verticalLayout->addWidget(waitWindow_); settingsWindow_ = new SettingsWindow(settingsMenu_, this); connect(settingsWindow_, SIGNAL(back()), SLOT(onBack())); ui.verticalLayout->addWidget(settingsWindow_); settingsWindow_->hide(); connectWindow_ = new ConnectWindow(settingsMenu_, this); connect(connectWindow_, SIGNAL(serverList()), SLOT(onServerList())); connect(connectWindow_, SIGNAL(connected()), SLOT(onConnected())); ui.verticalLayout->addWidget(connectWindow_); ui.verticalLayout->addWidget(connectWindow_); connectWindow_->hide(); serverListWindow_ = new ServerListWindow(this); connect(serverListWindow_, SIGNAL(serverSelected(const QString &)), this, SLOT( onChangeServer(const QString &) )); ui.verticalLayout->addWidget(serverListWindow_); serverListWindow_->hide(); proxySettingsWindow_ = new ProxySettingsWindow(settingsMenu_, this); connect(proxySettingsWindow_, SIGNAL(back()), SLOT(onBack())); ui.verticalLayout->addWidget(proxySettingsWindow_); proxySettingsWindow_->hide(); // tray action connect(actConnect_, SIGNAL(triggered()), connectWindow_, SLOT(onClickConnect())); connect(actDisconnect_, SIGNAL(triggered()), connectWindow_, SLOT(onClickConnect())); connect(actHelp_, SIGNAL(triggered()), SLOT(onActHelp())); connect(actLiveChat_, SIGNAL(triggered()), SLOT(onLiveChat())); connect(actExit_, SIGNAL(triggered()), SLOT(onExit())); #if defined Q_OS_WIN connect(trayIcon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT( onTrayActivated(QSystemTrayIcon::ActivationReason) )); #endif QSettings settings; if (settings.value("savePass", "true").toString() == "true") { QString username = settings.value("login", "").toString(); QString password = settings.value("password", "").toString(); if (!username.isEmpty() && !password.isEmpty()) { adjustSize(); setFixedSize(size()); skipLoginScreen(username, password); } else { waitWindow_->hide(); loginWindow_->show(); adjustSize(); setFixedSize(size()); } } else { waitWindow_->hide(); loginWindow_->show(); adjustSize(); setFixedSize(size()); } }