diff options
| author | vovanec <vovanec@90c681e8-e032-0410-971d-27865f9a5e38> | 2007-07-01 19:55:47 +0000 |
|---|---|---|
| committer | vovanec <vovanec@90c681e8-e032-0410-971d-27865f9a5e38> | 2007-07-01 19:55:47 +0000 |
| commit | 8cbd1444b5f766b0cd03e953defc126311a8d915 (patch) | |
| tree | 52f7265b4715989b2d7fc2886fc62908c4605517 | |
| parent | 5ab0f82f0d26060c7066e8bf2e3600327bb0768a (diff) | |
| download | qmmp-8cbd1444b5f766b0cd03e953defc126311a8d915.tar.gz qmmp-8cbd1444b5f766b0cd03e953defc126311a8d915.tar.bz2 qmmp-8cbd1444b5f766b0cd03e953defc126311a8d915.zip | |
addurl dialog
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@20 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/addurldialog.cpp | 20 | ||||
| -rw-r--r-- | src/addurldialog.h | 24 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 8 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 | ||||
| -rw-r--r-- | src/mediafile.cpp | 2 | ||||
| -rw-r--r-- | src/playlist.cpp | 7 | ||||
| -rw-r--r-- | src/src.pro | 4 |
7 files changed, 65 insertions, 1 deletions
diff --git a/src/addurldialog.cpp b/src/addurldialog.cpp index f59dad7ac..6746a2de1 100644 --- a/src/addurldialog.cpp +++ b/src/addurldialog.cpp @@ -1,3 +1,23 @@ +/*************************************************************************** + * Copyright (C) 2006 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + #include "addurldialog.h" #include "playlistmodel.h" diff --git a/src/addurldialog.h b/src/addurldialog.h index 943e3869f..86a065703 100644 --- a/src/addurldialog.h +++ b/src/addurldialog.h @@ -1,3 +1,23 @@ +/*************************************************************************** + * Copyright (C) 2006 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + #ifndef ADDURLDIALOG_H #define ADDURLDIALOG_H @@ -8,6 +28,10 @@ class PlayListModel; +/** + @author Vladimir Kuznetsov <vovanec@gmail.com> + */ + class AddUrlDialog : public QDialog , private Ui::AddUrlDialog { Q_OBJECT diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 645bbecdb..4f2174646 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -42,6 +42,7 @@ #include "tcpserver.h" #include "jumptotrackdialog.h" #include "aboutdialog.h" +#include <addurldialog.h> MainWindow::MainWindow(const QStringList& args, QWidget *parent) : QMainWindow(parent) @@ -675,3 +676,10 @@ void MainWindow::handleCloseRequest() } + +void MainWindow::addUrl( ) +{ + AddUrlDialog::popup(this,m_playListModel); +} + + diff --git a/src/mainwindow.h b/src/mainwindow.h index 751f20939..cece1afcf 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -94,6 +94,7 @@ private slots: void showSettings(); void addDir(); void addFile(); + void addUrl(); void updateEQ(); void updatePreset(); void updateSkin(); diff --git a/src/mediafile.cpp b/src/mediafile.cpp index 305f4c32d..38bdcc1d6 100644 --- a/src/mediafile.cpp +++ b/src/mediafile.cpp @@ -34,7 +34,7 @@ MediaFile::MediaFile(QString path) QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat ); QString format = settings.value("PlayList/title_format", "%p - %t").toString(); bool use_meta = settings.value ("PlayList/load_metadata", TRUE).toBool(); - if (use_meta && m_tag && !m_tag->isEmpty()) + if (use_meta && m_tag && !m_tag->isEmpty() && !path.startsWith("http://")) { m_year = m_tag->year(); //m_title = m_tag->artist()+" - "+m_tag->title(); diff --git a/src/playlist.cpp b/src/playlist.cpp index d65debb85..63f11f50f 100644 --- a/src/playlist.cpp +++ b/src/playlist.cpp @@ -139,6 +139,13 @@ void PlayList::createActions() m_addMenu->addAction ( addDirAct ); connect ( addDirAct, SIGNAL ( triggered() ), parent(), SLOT ( addDir () ) ); m_actions << addDirAct; + + QAction *addUrlAct = new QAction ( tr ( "&Add Url" ),this ); + addUrlAct->setShortcut ( tr ( "U" ) ); + m_addMenu->addAction ( addUrlAct ); + connect ( addUrlAct, SIGNAL ( triggered() ), parent(), SLOT ( addUrl () ) ); + m_actions << addDirAct; + //remove menu QAction *remSelAct = new QAction ( tr ( "&Remove Selected" ),this ); remSelAct->setShortcut ( tr ( "Del" ) ); diff --git a/src/src.pro b/src/src.pro index 908b0a133..9db9ac694 100644 --- a/src/src.pro +++ b/src/src.pro @@ -132,3 +132,7 @@ script.files += ../bin/qmmp script.path = /bin target.path = /bin INSTALLS += target script + +HEADERS += addurldialog.h +SOURCES += addurldialog.cpp +FORMS += addurldialog.ui |
