void IrcUserModel::setChannel(IrcChannel* channel) { Q_D(IrcUserModel); if (d->channel != channel) { beginResetModel(); if (d->channel) IrcChannelPrivate::get(d->channel)->userModels.removeOne(this); d->channel = channel; QList<IrcUser*> users; if (d->channel) { IrcChannelPrivate::get(d->channel)->userModels.append(this); if (d->sortMethod == Irc::SortByActivity) users = IrcChannelPrivate::get(d->channel)->activeUsers; else users = IrcChannelPrivate::get(d->channel)->userList; } const bool reset = false; d->setUsers(users, reset); endResetModel(); emit channelChanged(channel); } }
void PodcastChannel::setIsRefreshing(bool refreshing) { if (m_isRefreshing != refreshing) { m_isRefreshing = refreshing; emit channelChanged(); } }
void AnalogPin::setChannel(int c) { if(c>=0 && c<16 && d->channel != c) { d->channel = c; emit channelChanged(c); } }
void PodcastChannel::setUnplayedEpisodes(int unplayed) { if (unplayed != m_unplayedEpisodes) { m_unplayedEpisodes = unplayed; emit channelChanged(); } }
void ListView::setChannel(IrcChannel* channel) { if (d.model->channel() != channel) { d.model->setChannel(channel); emit channelChanged(channel); } }
void triton::setData(QString str) { QRegExp rx; QStringList lst=str.split("\n"); for(int i=2;i<lst.count()-3;i++) { rx.setPattern("(.*)\\;\\ name"); rx.indexIn(lst[i]); if(channels[rx.cap( 1 )]->setChData(lst[i])) { emit channelChanged(channels[rx.cap( 1 )]); } } /* QMap<QString,channel*>::const_iterator i = channels.constBegin(); channel *ch; while(i!=channels.constEnd()) { ch=i.value(); if(ch->isEnabled()) qDebug()<<ch->getID()<<ch->getName()<<ch->getTmprt(); i++; }*/ }
ChannelWidget::ChannelWidget(QWidget *parent) : QWidget(parent), ui(new Ui::ChannelWidget), doubanfm(DoubanFM::getInstance()) { ui->setupUi(this); ui->nextButton->raise(); ui->prevButton->raise(); connect(&doubanfm, SIGNAL(receivedChannels(QList<DoubanChannel>)), this, SLOT(setChannels(QList<DoubanChannel>))); doubanfm.getChannels(); timer = new QTimer(this); connect(timer, &QTimer::timeout, [=] () { qDebug() << "Switch to channel" << channels[ui->slider->currentIndex()].name; emit channelChanged(channels[ui->slider->currentIndex()].channel_id); }); connect(ui->slider, &HorizontalSlider::scrollFinished, [this] () { channel = channels[ui->slider->currentIndex()].channel_id; if (timer && timer->isActive()) timer->stop(); timer->setSingleShot(true); timer->start(2000); }); QSettings settings("QDoubanFM", "QDoubanFM"); settings.beginGroup("General"); channel = settings.value("channel", 1).toInt(); if (!doubanfm.hasLogin() && channel == -3) channel = 1; settings.endGroup(); connect(&doubanfm, &DoubanFM::logoffSucceed, [this] () { if (ui->slider->currentIndex() == 0){ ui->slider->currentObject()->setStyleSheet(DARK_STYLE); ui->slider->scrollToIndex(1); ui->slider->currentObject()->setStyleSheet(HIGHTLIGHT_STYLE); } else { doubanfm.getNewPlayList(channel); } qDebug() << "Logoff successfully. Refreshing playlist"; }); connect(this, SIGNAL(channelChanged(qint32)), &DoubanPlayer::getInstance(), SLOT(setChannel(qint32))); }
void PodcastChannel::setIsDownloading(bool downloading) { if (downloading != m_isDownloading) { m_isDownloading = downloading; emit channelChanged(); emit downloadingChanged(); } }
SessionChildItem::SessionChildItem(SessionItem* parent) : AbstractSessionItem(parent), m_parent(parent), m_usermodel(0) { setSession(parent->session()); m_usermodel = new UserModel(session()); connect(this, SIGNAL(titleChanged(QString)), SIGNAL(channelChanged())); connect(this, SIGNAL(titleChanged(QString)), m_usermodel, SLOT(setChannel(QString))); }
void ChannelStrip::instrumentListPopupItemClicked ( QAction *action ) { if (!action) return; QVariant data = action->data(); if (data.isValid() && !m_pChannel->instrumentFile().isEmpty()) { m_pChannel->loadInstrument(m_pChannel->instrumentFile(), data.toInt()); emit channelChanged(this); } }
// Channel mute slot. bool ChannelStrip::channelMute ( bool bMute ) { if (m_pChannel == NULL) return false; // Invoke the channel mute method. bool bResult = m_pChannel->setChannelMute(bMute); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; }
// Channel setup dialog slot. bool ChannelStrip::channelSetup (void) { if (m_pChannel == NULL) return false; // Invoke the channel setup dialog. const bool bResult = m_pChannel->channelSetup(this); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; }
// Channel solo slot. bool ChannelStrip::channelSolo ( bool bSolo ) { if (m_pChannel == NULL) return false; // Invoke the channel solo method. bool bResult = m_pChannel->setChannelSolo(bSolo); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; }
// Channel reset slot. bool ChannelStrip::channelReset (void) { if (m_pChannel == NULL) return false; // Invoke the channel reset method. bool bResult = m_pChannel->channelReset(); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; }
void QHtspDvrEntryModel::_addRow(QHtspDvrEntry *dvrEntry) { int rows = rowCount() - 1; beginInsertRows(QModelIndex(), rows, rows); endInsertRows(); connect(dvrEntry, SIGNAL(idChanged()), this, SLOT(_updateId())); connect(dvrEntry, SIGNAL(channelChanged()), this, SLOT(_updateChannel())); connect(dvrEntry, SIGNAL(stateChanged()), this, SLOT(_updateState())); connect(dvrEntry, SIGNAL(startChanged()), this, SLOT(_updateStart())); connect(dvrEntry, SIGNAL(stopChanged()), this, SLOT(_updateStop())); connect(dvrEntry, SIGNAL(titleChanged()), this, SLOT(_updateTitle())); if(dvrEntry->channel()) connect(dvrEntry->channel(), SIGNAL(nameChanged()), this, SLOT(_updateChannel())); }
void QHtspDvrEntryModel::_removeRow(QHtspDvrEntry *dvrEntry) { disconnect(dvrEntry, SIGNAL(idChanged()), this, SLOT(_updateId())); disconnect(dvrEntry, SIGNAL(channelChanged()), this, SLOT(_updateChannel())); disconnect(dvrEntry, SIGNAL(stateChanged()), this, SLOT(_updateState())); disconnect(dvrEntry, SIGNAL(startChanged()), this, SLOT(_updateStart())); disconnect(dvrEntry, SIGNAL(stopChanged()), this, SLOT(_updateStop())); disconnect(dvrEntry, SIGNAL(titleChanged()), this, SLOT(_updateTitle())); if(dvrEntry->channel()) disconnect(dvrEntry->channel(), SIGNAL(nameChanged()), this, SLOT(_updateChannel())); int row = m_dvrEntries->indexOf(dvrEntry); beginRemoveRows(QModelIndex(), row, row); endRemoveRows(); }
/****************************************************************************** * Add new channels * * @param pNbChannels the number of new channels ******************************************************************************/ void Qtfe::addChannels( int pNbChannels ) { // Iterate through number of channels for ( int i = 0; i < pNbChannels; ++i ) { // Create a channel and store it QtfeChannel* channel = new QtfeChannel( this ); _channels.push_back( channel ); // Add it to main widget _transferFunctionGroupBox->layout()->addWidget( channel ); // Do connection(s) QObject::connect( channel, SIGNAL( channelChanged() ), this, SLOT( onChannelChanged() ) ); } }
//! Recreate the channel popup menu for a given number of channel void ProcessingPluginDialog::recreateChannelMenu(int extendedChannelCount) { int channelCount = dataSourceInputCount + extendedChannelCount; channelChooserMenu.clear(); channelChooserAct.resize(channelCount); for (unsigned channel = 0; channel < (unsigned)channelCount; channel++) { QAction *action = new QAction(channelNumberToString(channel), this); action->setData(QVariant(channel)); action->setCheckable(true); connect(action, SIGNAL(triggered()), this, SLOT(channelChanged())); channelChooserGroup.addAction(action); channelChooserMenu.addAction(action); channelChooserAct[channel] = action; } }
// Volume change slot. void ChannelStrip::volumeChanged ( int iVolume ) { if (m_pChannel == NULL) return; // Avoid recursion. if (m_iDirtyChange > 0) return; // Convert and clip. float fVolume = (float) iVolume / 100.0f; if (fVolume < 0.001f) fVolume = 0.0f; // Update the GUI elements. if (m_pChannel->setVolume(fVolume)) { updateChannelVolume(); emit channelChanged(this); } }
void DkTransferToolBar::applyImageMode(int mode) { // At first check if the right mode is already set. If so, don't do nothing. if (mode == imageMode) return; if (imageMode == mode_invalid_format) { enableToolBar(true); emit channelChanged(0); } imageMode = mode; if (imageMode == mode_invalid_format) { enableToolBar(false); return; } enableTFCheckBox->setEnabled(true); disconnect(channelComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changeChannel(int))); channelComboBox->clear(); if (mode == mode_gray) { channelComboBox->addItem(tr("Gray")); } else if (mode == mode_rgb) { channelComboBox->addItem(tr("RGB")); channelComboBox->addItem(tr("Red")); channelComboBox->addItem(tr("Green")); channelComboBox->addItem(tr("Blue")); } channelComboBox->setCurrentIndex(0); connect(channelComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changeChannel(int))); };
int Controller::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QToolBox::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: channelChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: velocityChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: base_octaveChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: transposeChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 4: enableEdit((*reinterpret_cast< bool(*)>(_a[1]))); break; case 5: durationChanged((*reinterpret_cast< QAction*(*)>(_a[1]))); break; case 6: pauseFlag((*reinterpret_cast< int(*)>(_a[1]))); break; case 7: dotEnable((*reinterpret_cast< bool(*)>(_a[1]))); break; case 8: setCurrentChannel((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: setCurrentVelocity((*reinterpret_cast< int(*)>(_a[1]))); break; case 10: setCurrentBase_octave((*reinterpret_cast< int(*)>(_a[1]))); break; case 11: setCurrentTranspose((*reinterpret_cast< int(*)>(_a[1]))); break; case 12: setCurrentSpeed((*reinterpret_cast< int(*)>(_a[1]))); break; case 13: setCurrentMeter((*reinterpret_cast< Meter(*)>(_a[1]))); break; case 14: setCurrentKey((*reinterpret_cast< int(*)>(_a[1]))); break; case 15: on_btn_note_dot_clicked((*reinterpret_cast< bool(*)>(_a[1]))); break; case 16: on_btn_run_clicked(); break; case 17: on_slider_speed_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 18: on_slider_meter_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 19: on_slider_key_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 20: on_slider_transpose_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 21: on_slider_base_octave_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 22: on_slider_channel_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 23: on_slider_velocity_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 24: durationCheck((*reinterpret_cast< int(*)>(_a[1]))); break; case 25: pauseCheck((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } _id -= 26; } return _id; }
doubanFM::doubanFM(QWidget *parent) : QWidget(parent), ui(new Ui::doubanFM) { qDebug() << Q_FUNC_INFO; ui->setupUi(this); currentSongIndex = 0; pauseState = false; _channelListWidget = new channelList(this); _channelListWidget->setchannelId(currentChannelId); _channelListWidget->move(-_channelListWidget->getInvisibleWidth(),this->geometry().y()); _pauseMaskWidget = new pauseMaskWidget(this); _pauseMaskWidget->move(250,0); _pauseMaskWidget->setVisible(false); _loginwidget = new doubanLogin(this); _loginwidget->move(this->geometry().x(),-_loginwidget->geometry().height()); _mediaObject = new Phonon::MediaObject(this); _audioOutput = new Phonon::AudioOutput(this); Phonon::createPath(_mediaObject,_audioOutput); ui->seekSlider->setMediaObject(_mediaObject); albumImageManager = new QNetworkAccessManager(this); _mydouban = new Douban(this); readSettings(); qDebug() << "read setting" << _mydouban->hasLogin(); if(_mydouban->hasLogin()) { ui->userLoginButton->setToolTip(tr("click to logout")); ui->userLabel->setText(_mydouban->getDoubanUser().name); } else { ui->userLoginButton->setToolTip(tr("click to login")); ui->userLabel->setText(tr("Logout")); } nextShortCut = new QxtGlobalShortcut(QKeySequence("Alt+s"),this); pauseShortCut = new QxtGlobalShortcut(QKeySequence("Alt+p"),this); rateShortCut = new QxtGlobalShortcut(QKeySequence("Alt+r"),this); trashShortCut = new QxtGlobalShortcut(QKeySequence("Alt+t"),this); connect(nextShortCut,SIGNAL(activated()),this,SLOT(onSkipButtonClicked())); connect(pauseShortCut,SIGNAL(activated()),this,SLOT(onPauseButtonClicked())); connect(rateShortCut,SIGNAL(activated()),this,SLOT(onRateButtonClicked())); connect(trashShortCut,SIGNAL(activated()),this,SLOT(onTrashButtonClicked())); //connect the mainwidget signals and the slots connect(ui->volumeSlider,SIGNAL(valueChanged(int)),this,SLOT(onVolumneChange(int))); connect(ui->pauseButton,SIGNAL(clicked()),this,SLOT(onPauseButtonClicked())); connect(ui->userLoginButton,SIGNAL(clicked()),this,SLOT(onLoginButtonClicked())); connect(_mediaObject,SIGNAL(tick(qint64)),this,SLOT(playTick(qint64))); connect(albumImageManager,SIGNAL(finished(QNetworkReply*)),this,SLOT(receiveAlbumImage(QNetworkReply*))); connect(this,SIGNAL(albumImageRequest(QString)),this,SLOT(onAlbumImage(QString))); connect(ui->rateSongButton,SIGNAL(clicked()),this,SLOT(onRateButtonClicked())); connect(ui->nextSongButton,SIGNAL(clicked()),this,SLOT(onSkipButtonClicked())); connect(ui->byeSongButton,SIGNAL(clicked()),this,SLOT(onTrashButtonClicked())); connect(_mediaObject,SIGNAL(currentSourceChanged(Phonon::MediaSource)),this,SLOT(sourceChanged(Phonon::MediaSource))); connect(_mediaObject,SIGNAL(stateChanged(Phonon::State,Phonon::State)),this,SLOT(stateChanged(Phonon::State,Phonon::State))); // connect the mainwidget signals and the slots of other widget connect(this,SIGNAL(sendlogoutRequest()),_mydouban,SLOT(logoutRequest())); connect(this,SIGNAL(sendSongListRequest(qint32,quint32,double)),_mydouban,SLOT(newSongListRequest(qint32,quint32,double))); connect(this,SIGNAL(sendSkipSongRequest(qint32,quint32,double)),_mydouban,SLOT(skipSongRequest(qint32,quint32,double))); connect(this,SIGNAL(sendRateSongRequest(qint32,quint32,double,bool)),_mydouban,SLOT(rateSongRequest(qint32,quint32,double,bool))); connect(this,SIGNAL(sendEndSongRequest(qint32,quint32,double)),_mydouban,SLOT(endSongRequest(qint32,quint32,double))); connect(this,SIGNAL(sendByeSongRequest(qint32,quint32,double)),_mydouban,SLOT(byeSongRequest(qint32,quint32,double))); // connect the signals of other widget and the mainwidget slot connect(_mydouban,SIGNAL(loginSucceed(DoubanUser)),this,SLOT(loginSucceed(DoubanUser))); connect(_mydouban,SIGNAL(sendSongList(QList<DoubanFMSong>)),this,SLOT(receiveSongList(QList<DoubanFMSong>))); connect(_mydouban,SIGNAL(sendRateSong(bool)),this,SLOT(receiveRateSong(bool))); connect(_mydouban,SIGNAL(sendSkipSong(bool)),this,SLOT(receiveSkipSong(bool))); connect(_mydouban,SIGNAL(sendByeSong(bool)),this,SLOT(receiveByeSong(bool))); connect(_mydouban,SIGNAL(sendEndSong(bool)),this,SLOT(receiveEndSong(bool))); connect(_mydouban,SIGNAL(sendChannelList(QList<DoubanChannel>,bool)),this,SLOT(receiveChannelList(QList<DoubanChannel>,bool))); connect(_mydouban,SIGNAL(sendLogoutSucceed(bool)),this,SLOT(logoutSucceed(bool))); connect(_pauseMaskWidget,SIGNAL(mousePressed()),this,SLOT(pauseMaskWidgetPressed())); connect(_channelListWidget,SIGNAL(channelChanged(qint32)),this,SLOT(receiveChannelChange(qint32))); //connect the other widget signal and slots connect(_mydouban,SIGNAL(captchaImageLoad(QPixmap)),_loginwidget,SLOT(onCaptchaImageLoad(QPixmap))); connect(_mydouban,SIGNAL(loginFailed(QString)),_loginwidget,SLOT(onLoginFailed(QString))); connect(_mydouban,SIGNAL(sendChannelList(QList<DoubanChannel>,bool)),_channelListWidget,SLOT(onReceiveChannelList(QList<DoubanChannel>,bool))); connect(_loginwidget,SIGNAL(loginRequest(QString,QString,QString)),_mydouban,SLOT(loginRequest(QString,QString,QString))); _mydouban->channelListRequest(); }
void SixColorSliders::greenChannelChanged(int value) { emit channelChanged(QString("green"), value); }
void AbstractCommand::setChannel(int channel) { this->channel = channel; emit channelChanged(this->channel); }
void DkTransferToolBar::changeChannel(int index) { emit channelChanged(index); }
void SixColorSliders::blueChannelChanged(int value) { emit channelChanged(QString("blue"), value); }
void SixColorSliders::magentaChannelChanged(int value) { emit channelChanged(QString("magenta"), value); }
void SixColorSliders::yellowChannelChanged(int value) { emit channelChanged(QString("yellow"), value); }
void SixColorSliders::cyanChannelChanged(int value) { emit channelChanged(QString("cyan"), value); }
void MainWindow::on_channelsBox_currentIndexChanged(QString channelName ) { emit channelChanged(channelName); }