/** * Creating needed connections */ void MainWindow::createConnections() { connect(ui->leSearch, SIGNAL(returnPressed()), this, SLOT(searchAudio())); connect(playerControls, SIGNAL(play()), player, SLOT(play())); connect(playerControls, SIGNAL(pause()), player, SLOT(pause())); connect(playerControls, SIGNAL(volumeChanged(int)), player, SLOT(setVolume(int))); connect(playerControls, SIGNAL(playPositionChanged(qint64)), player, SLOT(setPosition(qint64))); connect(player, SIGNAL(positionChanged(qint64)), playerControls, SLOT(setPlayPosition(qint64))); connect(player, SIGNAL(durationChanged(qint64)), playerControls, SLOT(setAudioLength(qint64))); connect(player, SIGNAL(volumeChanged(int)), playerControls, SLOT(setVolume(int))); connect(player, SIGNAL(stateChanged(QMediaPlayer::State)), playerControls, SLOT(setState(QMediaPlayer::State))); connect(playlist, SIGNAL(titleChange(QString)), playerControls, SLOT(setTitle(QString))); connect(playerControls, SIGNAL(previous()), playlist, SLOT(previous())); connect(playerControls, SIGNAL(next()), playlist, SLOT(next())); connect(playerControls, SIGNAL(configure()), this, SLOT(showSettingsDialog())); connect(vkaudio, SIGNAL(statusChanged(QString, int)), this->statusBar(), SLOT(showMessage(QString,int))); connect(ui->tvSongs, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(playAudio())); connect(ui->tvSongs, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showSongsContextMenu(QPoint))); connect(ui->tvPlaylists, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showPlaylistsContextMenu(QPoint))); }
void GraphicsDataItem::setTitle(const QString &title) { d_ptr->title = title; Q_EMIT titleChange(); }