diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 8 | ||||
| -rw-r--r-- | src/mainwindow.h | 7 | ||||
| -rw-r--r-- | src/mediafile.cpp | 6 | ||||
| -rw-r--r-- | src/mediafile.h | 1 |
4 files changed, 17 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2d13f7000..36d672175 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -131,6 +131,8 @@ MainWindow::MainWindow(const QStringList& args, QWidget *parent) SLOT(showOutputState(const OutputState&))); connect(m_core, SIGNAL(decoderStateChanged(const DecoderState&)), SLOT(showDecoderState(const DecoderState&))); + connect(m_core, SIGNAL(titleChanged(const QString&)), + SLOT(changeTitle(const QString&))); connect ( m_skin, SIGNAL ( skinChanged() ), this, SLOT ( updateSkin() ) ); updateEQ(); @@ -369,6 +371,12 @@ void MainWindow::showDecoderState(const DecoderState &st) } } +void MainWindow::changeTitle(const QString &title) +{ + m_playlist->currentItem()->changeTitle(title); + m_playlist->listWidget()->updateList(); +} + void MainWindow::closeEvent ( QCloseEvent *) { writeSettings(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 54b98f6e3..0647f09a6 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -88,6 +88,7 @@ protected: private slots: void showOutputState(const OutputState&); void showDecoderState(const DecoderState&); + void changeTitle(const QString&); void clear(); void startSeek(); void endSeek(); @@ -98,17 +99,13 @@ private slots: void updateEQ(); void updatePreset(); void updateSkin(); - void forward(); void backward(); - void jumpToFile(); - void toggleVisibility(); void trayActivated(QSystemTrayIcon::ActivationReason); void about(); - - void handleCloseRequest(); + void handleCloseRequest(); private: void readSettings(); diff --git a/src/mediafile.cpp b/src/mediafile.cpp index 8d309dffb..9f2908685 100644 --- a/src/mediafile.cpp +++ b/src/mediafile.cpp @@ -130,3 +130,9 @@ void MediaFile::readMetadata() else m_title = m_path.startsWith("http://") ? m_path: m_path.section('/',-1); } + +void MediaFile::changeTitle(const QString &newtitle) +{ + m_title = newtitle; +} + diff --git a/src/mediafile.h b/src/mediafile.h index 3e6fb9f43..78fbd620f 100644 --- a/src/mediafile.h +++ b/src/mediafile.h @@ -48,6 +48,7 @@ public: bool isCurrent(); void setCurrent(bool); void updateTags(const FileTag*); + void changeTitle(const QString&); private: |
