HacServer::HacServer(QObject *parent) : QObject(parent) { qDebug() << "HacServer::HacServer"; // init qws server server = QWSServer::instance(); QScreen *screen = QScreen::instance(); server->setMaxWindowRect(QRect(WINDOW_X, WINDOW_Y, WINDOW_W, WINDOW_H)); // init status bar statusBar = new StatusBar; connect(statusBar, SIGNAL(homeClicked()), this, SLOT(OnHomeClicked())); connect(statusBar, SIGNAL(backClicked()), this, SLOT(OnBackClicked())); connect(statusBar, SIGNAL(clockClicked()), this, SLOT(OnClockClicked())); statusBar->setGeometry(STATUSBAR_X, STATUSBAR_Y, STATUSBAR_W, STATUSBAR_H); statusBar->show(); // init auto start applications QProcess *myApp = new QProcess; myApp->setProcessChannelMode(QProcess::ForwardedChannels); myApp->start(APP_HAC01_BIN); myApp->waitForStarted(); }
void HelpViewer::setupConnections() { connect(previous, SIGNAL(clicked()), this, SLOT(previousClicked())); connect(next, SIGNAL(clicked()), this, SLOT(nextClicked())); connect(home, SIGNAL(clicked()), this, SLOT(homeClicked())); connect(viewer, SIGNAL(backwardAvailable(bool)), this, SLOT(backwardAvailable(bool))); connect(viewer, SIGNAL(forwardAvailable(bool)), this, SLOT(forwardAvailable(bool))); connect(helpEngine->contentWidget(), SIGNAL(linkActivated(const QUrl&)), viewer, SLOT(setSource(const QUrl&))); connect(viewer, SIGNAL(sourceChanged(const QUrl&)), this, SLOT(sourceChanged(const QUrl&))); }
void HeaderWidget::emitSignal(int id) { switch (id) { case 1: emit backClicked(); break; case 2: emit homeClicked(); break; case 3: emit logoutClicked(); break; } }
void NavigationBarWidget::initialize() { // Connecting necessary Signals to Slots connect(iSlidingTimer, SIGNAL(timeout()), this, SLOT(slideTick())); connect(ui.SlidePushButton, SIGNAL(clicked()), this, SLOT(propagateSlideClicked())); connect(ui.SlidePushButton, SIGNAL(clicked()), this, SLOT(slide())); // Attaching Signals and Slots for Zooming connect(ui.ZoomInPushButton, SIGNAL(clicked()), this, SLOT(zoomIn())); connect(ui.ZoomOutPushButton, SIGNAL(clicked()), this, SLOT(zoomOut())); // Connecting internal Signals with external ones, for encapsulation connect(ui.BackPushButton, SIGNAL(clicked()), this, SIGNAL(backClicked())); connect(ui.ForwardPushButton, SIGNAL(clicked()), this, SIGNAL(forwardClicked())); connect(ui.HomePushButton, SIGNAL(clicked()), this, SIGNAL(homeClicked())); connect(ui.ZoomSlider, SIGNAL(valueChanged(int)), this, SIGNAL(zoomLevelChanged(int))); }
HelpBrowser::HelpBrowser(QWidget* parent) : QWidget(parent) { view = new HelpView(mscore->helpEngine()); toolbar = new QWidget; toolbar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QVBoxLayout* l = new QVBoxLayout; l->addWidget(toolbar); l->addWidget(view); setLayout(l); QHBoxLayout* bl = new QHBoxLayout; QToolButton* home = new QToolButton; home->setIcon(QIcon(*icons[int(Icons::goHome_ICON)])); bl->addWidget(home); connect(home, SIGNAL(clicked()), SLOT(homeClicked())); bl->addStretch(2); QToolButton* previous = new QToolButton; previous->setIcon(QIcon(*icons[int(Icons::goPrevious_ICON)])); bl->addWidget(previous); connect(previous, SIGNAL(clicked()), view, SLOT(backward())); connect(view, SIGNAL(backwardAvailable(bool)), previous, SLOT(setEnabled(bool))); QToolButton* next = new QToolButton; next->setIcon(QIcon(*icons[int(Icons::goNext_ICON)])); bl->addWidget(next); connect(next, SIGNAL(clicked()), view, SLOT(forward())); connect(view, SIGNAL(forwardAvailable(bool)), next, SLOT(setEnabled(bool))); bl->addStretch(10); view->document()->setDefaultStyleSheet( preferences.globalStyle == MuseScoreStyleType::DARK ? cssDark : css); toolbar->setLayout(bl); }