From 05f464d9ac2ccd471cd2c95db6596ca5378ec574 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 1 Jan 2010 21:47:06 +0000 Subject: removed unused code git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1466 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/covermanager/CMakeLists.txt | 3 - src/plugins/General/covermanager/covermanager.cpp | 12 +- src/plugins/General/covermanager/covermanager.pro | 28 ++- src/plugins/General/covermanager/coverwidget.cpp | 5 +- src/plugins/General/covermanager/coverwindow.cpp | 34 ---- src/plugins/General/covermanager/coverwindow.h | 39 ---- src/plugins/General/covermanager/coverwindow.ui | 230 ---------------------- 7 files changed, 24 insertions(+), 327 deletions(-) delete mode 100644 src/plugins/General/covermanager/coverwindow.cpp delete mode 100644 src/plugins/General/covermanager/coverwindow.h delete mode 100644 src/plugins/General/covermanager/coverwindow.ui (limited to 'src') diff --git a/src/plugins/General/covermanager/CMakeLists.txt b/src/plugins/General/covermanager/CMakeLists.txt index 1b32f03c2..5c7d7e2de 100644 --- a/src/plugins/General/covermanager/CMakeLists.txt +++ b/src/plugins/General/covermanager/CMakeLists.txt @@ -32,14 +32,12 @@ link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) SET(libcovermanager_SRCS coverwidget.cpp covermanager.cpp - coverwindow.cpp covermanagerfactory.cpp ) SET(libcovermanager_MOC_HDRS coverwidget.h covermanager.h - coverwindow.h covermanagerfactory.h ) @@ -53,7 +51,6 @@ QT4_WRAP_CPP(libcovermanager_MOC_SRCS ${libcovermanager_MOC_HDRS}) SET(libcovermanager_UIS - coverwindow.ui ) QT4_WRAP_UI(libcovermanager_UIS_H ${libcovermanager_UIS}) diff --git a/src/plugins/General/covermanager/covermanager.cpp b/src/plugins/General/covermanager/covermanager.cpp index ab4303c8e..b5d149cbf 100644 --- a/src/plugins/General/covermanager/covermanager.cpp +++ b/src/plugins/General/covermanager/covermanager.cpp @@ -19,12 +19,14 @@ ***************************************************************************/ #include +#include #include #include #include #include #include -#include "coverwindow.h" +#include +#include "coverwidget.h" #include "covermanager.h" CoverManager::CoverManager(QObject *parent) : General(parent) @@ -40,9 +42,11 @@ void CoverManager::showWindow() QList items = MediaPlayer::instance()->playListManager()->selectedPlayList()->getSelectedItems(); if (!items.isEmpty()) { - if (items.at(0)->url().contains("://")) - return; - CoverWindow *w = new CoverWindow(items.at(0), qApp->activeWindow ()); + CoverWidget *w = new CoverWidget(qApp->activeWindow ()); + w->setFixedSize(400,400); + QPixmap pix = MetaDataManager::instance()->getCover(items.at(0)->url()); + w->setPixmap(pix); + w->setWindowTitle(items.at(0)->artist() + " - " + items.at(0)->album()); w->show(); } } diff --git a/src/plugins/General/covermanager/covermanager.pro b/src/plugins/General/covermanager/covermanager.pro index d084eaada..e618330c0 100644 --- a/src/plugins/General/covermanager/covermanager.pro +++ b/src/plugins/General/covermanager/covermanager.pro @@ -7,18 +7,16 @@ unix:QMAKE_LIBDIR += ../../../../lib win32:QMAKE_LIBDIR += ../../../../bin TARGET = $$PLUGINS_PREFIX/General/covermanager unix:QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libcovermanager.so - TRANSLATIONS = translations/covermanager_plugin_cs.ts \ -translations/covermanager_plugin_de.ts \ -translations/covermanager_plugin_zh_CN.ts \ -translations/covermanager_plugin_zh_TW.ts \ -translations/covermanager_plugin_ru.ts \ -translations/covermanager_plugin_pl.ts \ -translations/covermanager_plugin_uk_UA.ts \ -translations/covermanager_plugin_it.ts \ -translations/covermanager_plugin_tr.ts \ -translations/covermanager_plugin_lt.ts - + translations/covermanager_plugin_de.ts \ + translations/covermanager_plugin_zh_CN.ts \ + translations/covermanager_plugin_zh_TW.ts \ + translations/covermanager_plugin_ru.ts \ + translations/covermanager_plugin_pl.ts \ + translations/covermanager_plugin_uk_UA.ts \ + translations/covermanager_plugin_it.ts \ + translations/covermanager_plugin_tr.ts \ + translations/covermanager_plugin_lt.ts RESOURCES = translations/translations.qrc unix { isEmpty(LIB_DIR):LIB_DIR = /lib @@ -27,17 +25,15 @@ unix { } HEADERS += covermanagerfactory.h \ coverwidget.h \ - covermanager.h \ - coverwindow.h + covermanager.h win32:HEADERS += ../../../../src/qmmpui/general.h SOURCES += covermanagerfactory.cpp \ coverwidget.cpp \ - covermanager.cpp \ - coverwindow.cpp + covermanager.cpp QT += network INCLUDEPATH += ../../../ unix:LIBS += -lqmmpui \ -lqmmp win32:LIBS += -lqmmpui0 \ -lqmmp0 -FORMS += coverwindow.ui +FORMS += diff --git a/src/plugins/General/covermanager/coverwidget.cpp b/src/plugins/General/covermanager/coverwidget.cpp index 28e4e8b91..56f2b0436 100644 --- a/src/plugins/General/covermanager/coverwidget.cpp +++ b/src/plugins/General/covermanager/coverwidget.cpp @@ -25,7 +25,10 @@ CoverWidget::CoverWidget(QWidget *parent) : QWidget(parent) -{} +{ + setWindowFlags(Qt::Window); + setAttribute(Qt::WA_DeleteOnClose, TRUE); +} CoverWidget::~CoverWidget() {} diff --git a/src/plugins/General/covermanager/coverwindow.cpp b/src/plugins/General/covermanager/coverwindow.cpp deleted file mode 100644 index 5bec3c497..000000000 --- a/src/plugins/General/covermanager/coverwindow.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 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 -#include -#include "coverwindow.h" - -CoverWindow::CoverWindow(PlayListItem *item, QWidget *parent) : QDialog(parent) -{ - ui.setupUi(this); - setWindowFlags(Qt::Dialog); - setAttribute(Qt::WA_DeleteOnClose); - setAttribute(Qt::WA_QuitOnClose, FALSE); - ui.coverWidget->setPixmap(MetaDataManager::instance()->getCover(item->url())); - ui.albumEdit->setText(item->album()); - ui.artistEdit->setText(item->artist()); -} diff --git a/src/plugins/General/covermanager/coverwindow.h b/src/plugins/General/covermanager/coverwindow.h deleted file mode 100644 index 98bef1806..000000000 --- a/src/plugins/General/covermanager/coverwindow.h +++ /dev/null @@ -1,39 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 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 COVERWINDOW_H -#define COVERWINDOW_H - -#include -#include "ui_coverwindow.h" - -class PlayListItem; - -class CoverWindow : public QDialog -{ -Q_OBJECT -public: - CoverWindow(PlayListItem *item, QWidget *parent); - -private: - Ui::CoverWindow ui; -}; - -#endif // COVERWINDOW_H diff --git a/src/plugins/General/covermanager/coverwindow.ui b/src/plugins/General/covermanager/coverwindow.ui deleted file mode 100644 index 90987e647..000000000 --- a/src/plugins/General/covermanager/coverwindow.ui +++ /dev/null @@ -1,230 +0,0 @@ - - - CoverWindow - - - - 0 - 0 - 356 - 389 - - - - - 0 - 0 - - - - Cover Manager - - - false - - - false - - - - QLayout::SetFixedSize - - - 6 - - - 6 - - - 6 - - - - - - - Album: - - - - - - - - - - Artist: - - - - - - - - - - - - - - - 0 - 0 - - - - Preview - - - - - - - 1 - 1 - - - - - 250 - 250 - - - - - 250 - 250 - - - - - 220 - 220 - - - - - - - - - - - false - - - Open - - - - - - - false - - - Download - - - - - - - false - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - Save as... - - - - - - - - - Qt::Horizontal - - - - 128 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Close|QDialogButtonBox::Save - - - - - - - - CoverWidget - QWidget -
coverwidget.h
- 1 -
-
- - - - buttonBox - rejected() - CoverWindow - reject() - - - 349 - 382 - - - 286 - 274 - - - - -
-- cgit v1.2.3-13-gbd6f