void MainWindow::createConnections() { connect(this, SIGNAL(windowWasShown()), this, SLOT(initUpdates()), Qt::ConnectionType(Qt::QueuedConnection | Qt::UniqueConnection)); connect(ui->tabs, SIGNAL(currentChanged(QWidget *)), this, SLOT(currentWidget(QWidget *))); connect(ui->tabs, SIGNAL(currentChanged(QWidget *)), _recorder, SLOT(currentWidget(QWidget *))); connect(_playlistTab, SIGNAL(changeTo(QWidget *)), ui->tabs, SLOT(setCurrentWidget(QWidget *))); connect(_scheduleTab, SIGNAL(changeTo(QWidget *)), ui->tabs, SLOT(setCurrentWidget(QWidget *))); connect(_showInfoTab, SIGNAL(changeTo(QWidget *)), ui->tabs, SLOT(setCurrentWidget(QWidget *))); connect(ui->actionSupport, SIGNAL(triggered()), this, SLOT(support())); connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(aboutTano())); connect(ui->actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(ui->actionLogoutExit, SIGNAL(triggered()), this, SLOT(exitLogout())); connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(exit())); connect(ui->actionTop, SIGNAL(triggered()), this, SLOT(top())); connect(ui->actionLite, SIGNAL(triggered()), this, SLOT(lite())); connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openPlaylist())); connect(ui->actionOpenFile, SIGNAL(triggered()), _mediaPlayer, SLOT(openFile())); connect(ui->actionOpenUrl, SIGNAL(triggered()), _mediaPlayer, SLOT(openUrl())); connect(ui->actionSchedule, SIGNAL(triggered()), this, SLOT(showSchedule())); connect(ui->actionScheduleCurrent, SIGNAL(triggered()), this, SLOT(showScheduleCurrent())); connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings())); connect(ui->actionSettingsShortcuts, SIGNAL(triggered()), this, SLOT(showSettingsShortcuts())); connect(ui->actionEditPlaylist, SIGNAL(triggered()), this, SLOT(showPlaylistEditor())); connect(ui->actionPlay, SIGNAL(triggered()), _mediaPlayer, SLOT(togglePause())); connect(ui->actionStop, SIGNAL(triggered()), this, SLOT(stop())); connect(ui->actionPreview, SIGNAL(triggered(bool)), this, SLOT(preview(bool))); connect(_playlistTab->playlist(), SIGNAL(itemSelected(Channel *)), this, SLOT(playChannel(Channel *))); connect(_previewTimer, SIGNAL(timeout()), ui->actionNext, SLOT(trigger())); if (_trayIcon) { connect(_trayIcon, SIGNAL(restoreClick()), this, SLOT(tray())); connect(ui->actionTray, SIGNAL(triggered()), this, SLOT(tray())); } connect(ui->actionFullscreen, SIGNAL(triggered(bool)), this, SLOT(toggleFullscreen(bool))); connect(ui->actionMute, SIGNAL(toggled(bool)), _mediaPlayer->osd(), SLOT(mute(bool))); connect(ui->actionVolumeDown, SIGNAL(triggered()), _mediaPlayer->osd(), SLOT(volumeDown())); connect(ui->actionVolumeUp, SIGNAL(triggered()), _mediaPlayer->osd(), SLOT(volumeUp())); #if defined(Q_OS_LINUX) if (_mediaPlayer->teletextEnabled()) { connect(ui->actionTeletext, SIGNAL(triggered(bool)), _mediaPlayer->osd(), SLOT(teletext(bool))); connect(ui->actionTeletext, SIGNAL(triggered(bool)), _mediaPlayer, SLOT(teletext(bool))); connect(_mediaPlayer->osd(), SIGNAL(teletextClicked()), ui->actionTeletext, SLOT(trigger())); }
OsdWidget::OsdWidget(QWidget *parent) : StyledBar(parent), ui(new Ui::OsdWidget), _current(""), _file(new NetworkDownload()) { ui->setupUi(this); setLightColored(true); setSingleRow(false); setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); _info = new InfoBarWidget(this); ui->controls->addWidget(_info); ui->logo->hide(); ui->teletext->hide(); ui->buttonBack->setProperty("extraframe", true); ui->buttonMute->setProperty("extraframe", true); ui->buttonNext->setProperty("extraframe", true); ui->buttonPlay->setProperty("extraframe", true); ui->buttonRecordNow->setProperty("extraframe", true); ui->buttonSnapshot->setProperty("extraframe", true); ui->buttonStop->setProperty("extraframe", true); ui->buttonTeletext->setProperty("extraframe", true); connect(_info, SIGNAL(open(QString)), this, SIGNAL(openLink(QString))); connect(ui->teletext, SIGNAL(valueChanged(int)), this, SIGNAL(teletextPage(int))); connect(ui->buttonBack, SIGNAL(clicked()), this, SIGNAL(backClicked())); connect(ui->buttonMute, SIGNAL(clicked()), this, SIGNAL(muteClicked())); connect(ui->buttonNext, SIGNAL(clicked()), this, SIGNAL(nextClicked())); connect(ui->buttonPlay, SIGNAL(clicked()), this, SIGNAL(playClicked())); connect(ui->buttonRecordNow, SIGNAL(clicked()), this, SIGNAL(recordNowClicked())); connect(ui->buttonSnapshot, SIGNAL(clicked()), this, SIGNAL(snapshotClicked())); connect(ui->buttonStop, SIGNAL(clicked()), this, SIGNAL(stopClicked())); connect(ui->buttonTeletext, SIGNAL(clicked()), this, SIGNAL(teletextClicked())); connect(_file, SIGNAL(file(QFile *)), this, SLOT(setLogo(QFile *))); }