diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-09-15 22:45:20 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-09-15 22:45:20 +0000 |
| commit | ad93adc50b21179c082da72c63812a2316587277 (patch) | |
| tree | 3bdf05aa754d356cbdb75b3a15a0567c56909717 /src/qmmpui | |
| parent | 456a92e807dbd69c828683a5ff557af07cabc1d0 (diff) | |
| download | qmmp-ad93adc50b21179c082da72c63812a2316587277.tar.gz qmmp-ad93adc50b21179c082da72c63812a2316587277.tar.bz2 qmmp-ad93adc50b21179c082da72c63812a2316587277.zip | |
prepare for cover editor implementation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8295 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/qmmpui/covereditor.cpp | 27 | ||||
| -rw-r--r-- | src/qmmpui/covereditor_p.h | 44 | ||||
| -rw-r--r-- | src/qmmpui/detailsdialog.cpp | 12 | ||||
| -rw-r--r-- | src/qmmpui/forms/covereditor.ui | 94 | ||||
| -rw-r--r-- | src/qmmpui/qmmpui.pro | 9 |
6 files changed, 181 insertions, 7 deletions
diff --git a/src/qmmpui/CMakeLists.txt b/src/qmmpui/CMakeLists.txt index 501f6deb8..87e2d5b9a 100644 --- a/src/qmmpui/CMakeLists.txt +++ b/src/qmmpui/CMakeLists.txt @@ -56,6 +56,7 @@ SET(libqmmpui_SRCS columneditor.cpp metadatahelper.cpp coverviewer.cpp + covereditor.cpp ) SET(libqmmpui_HDRS @@ -122,6 +123,7 @@ SET(libqmmpui_UIS forms/aboutdialog.ui forms/addurldialog.ui forms/columneditor.ui + forms/covereditor.ui ) QT5_WRAP_UI(libqmmpui_UIS_H ${libqmmpui_UIS}) diff --git a/src/qmmpui/covereditor.cpp b/src/qmmpui/covereditor.cpp new file mode 100644 index 000000000..c6f59acea --- /dev/null +++ b/src/qmmpui/covereditor.cpp @@ -0,0 +1,27 @@ +/*************************************************************************** + * Copyright (C) 2018 by Ilya Kotov * + * forkotov02@ya.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., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include "covereditor_p.h" + +CoverEditor::CoverEditor(QWidget *parent) : + QWidget(parent) +{ + m_ui.setupUi(this); +} diff --git a/src/qmmpui/covereditor_p.h b/src/qmmpui/covereditor_p.h new file mode 100644 index 000000000..5ccbc25ae --- /dev/null +++ b/src/qmmpui/covereditor_p.h @@ -0,0 +1,44 @@ +/*************************************************************************** + * Copyright (C) 2018 by Ilya Kotov * + * forkotov02@ya.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., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef COVEREDITOR_P_H +#define COVEREDITOR_P_H + +#include <QWidget> +#include "ui_covereditor.h" + +/** + @internal + @author Ilya Kotov <forkotov02@ya.ru> +*/ + +class CoverEditor : public QWidget +{ + Q_OBJECT +public: + explicit CoverEditor(QWidget *parent = 0); + + +private: + Ui::CoverEditor m_ui; + +}; + +#endif // COVEREDITOR_P_H diff --git a/src/qmmpui/detailsdialog.cpp b/src/qmmpui/detailsdialog.cpp index ce91b49b3..c9cacd6a9 100644 --- a/src/qmmpui/detailsdialog.cpp +++ b/src/qmmpui/detailsdialog.cpp @@ -31,7 +31,7 @@ #include "metadataformatter.h" #include "playlisttrack.h" #include "tageditor_p.h" -#include "coverviewer_p.h" +#include "covereditor_p.h" #include "detailsdialog.h" DetailsDialog::DetailsDialog(QList<PlayListTrack *> tracks, QWidget *parent) @@ -170,13 +170,17 @@ void DetailsDialog::updatePage() qDeleteAll(infoList); infoList.clear(); - QPixmap cover = MetaDataManager::instance()->getCover(m_info.path()); - if(!cover.isNull()) + //QPixmap cover = MetaDataManager::instance()->getCover(m_info.path()); + /*if(!cover.isNull()) { CoverViewer *coverViewer = new CoverViewer(this); coverViewer->setPixmap(cover); m_ui->tabWidget->addTab(coverViewer, tr("Cover")); - } + }*/ + + CoverEditor *coverEditor = new CoverEditor(this); + m_ui->tabWidget->addTab(coverEditor, tr("Cover")); + if(m_info.path().contains("://")) //URL { diff --git a/src/qmmpui/forms/covereditor.ui b/src/qmmpui/forms/covereditor.ui new file mode 100644 index 000000000..8282a9e1d --- /dev/null +++ b/src/qmmpui/forms/covereditor.ui @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CoverEditor</class> + <widget class="QWidget" name="CoverEditor"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>451</width> + <height>382</height> + </rect> + </property> + <property name="windowTitle"> + <string notr="true">Cover Editor</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0" rowspan="5"> + <widget class="QFrame" name="frame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Source</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QRadioButton" name="radioButton"> + <property name="text"> + <string>File</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="radioButton_2"> + <property name="text"> + <string>Tag</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="pushButton"> + <property name="text"> + <string>Load</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="pushButton_2"> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="pushButton_3"> + <property name="text"> + <string>Save as...</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>150</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/qmmpui/qmmpui.pro b/src/qmmpui/qmmpui.pro index 018654cab..f8b44d392 100644 --- a/src/qmmpui/qmmpui.pro +++ b/src/qmmpui/qmmpui.pro @@ -73,7 +73,8 @@ HEADERS += general.h \ metadatahelper_p.h \ coverviewer_p.h \ metadataformattermenu.h \ - qmmpui_export.h + qmmpui_export.h \ + covereditor_p.h SOURCES += general.cpp \ playlistparser.cpp \ @@ -112,7 +113,8 @@ SOURCES += general.cpp \ playlistheadermodel.cpp \ metadatahelper.cpp \ coverviewer.cpp \ - metadataformattermenu.cpp + metadataformattermenu.cpp \ + covereditor.cpp FORMS += forms/detailsdialog.ui \ forms/tageditor.ui \ @@ -121,7 +123,8 @@ FORMS += forms/detailsdialog.ui \ forms/configdialog.ui \ forms/aboutdialog.ui \ forms/addurldialog.ui \ - forms/columneditor.ui + forms/columneditor.ui \ + forms/covereditor.ui unix:DESTDIR = . RESOURCES += translations/libqmmpui_locales.qrc \ |
