File indexing completed on 2024-05-19 04:50:18
0001 /**************************************************************************************** 0002 * Copyright (c) 2006,2007 Nikolaj Hald Nielsen <nhn@kde.org> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #ifndef MAGNATUNEDOWNLOADDIALOG_H 0018 #define MAGNATUNEDOWNLOADDIALOG_H 0019 0020 #include "ui_MagnatuneDownloadDialogBase.h" 0021 #include "MagnatuneDownloadInfo.h" 0022 0023 #include <qmap.h> 0024 0025 0026 /** 0027 Dialog for choosing download format and location. Also displays additional info from Magnatune.com. 0028 0029 @author Nikolaj Hald Nielsen <nhn@kde.org> 0030 */ 0031 class MagnatuneDownloadDialog : public QDialog, public Ui::magnatuneDownloadDialogBase 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 /** 0037 * Overridden constructor. 0038 * @param parent Pointer to the parent QWidget. 0039 * @param fl Additional dialog flags. 0040 */ 0041 explicit MagnatuneDownloadDialog( QWidget* parent = nullptr, Qt::WindowFlags fl = {} ); 0042 0043 /** 0044 * Destructor 0045 */ 0046 ~MagnatuneDownloadDialog(); 0047 /*$PUBLIC_FUNCTIONS$*/ 0048 0049 /** 0050 * Sets the current download info 0051 * @param info The MagnatuneDownloadInfo class containing the information abut the 0052 * download to display 0053 */ 0054 void setDownloadInfo(const MagnatuneDownloadInfo &info ); 0055 0056 Q_SIGNALS: 0057 0058 /** 0059 * Signal emitted when all needed info has been gathered and handler 0060 * should start album download. 0061 * @param completedInfo A DownloadInfo object containing all needed information 0062 */ 0063 void downloadAlbum( const MagnatuneDownloadInfo &completedInfo ); 0064 0065 public Q_SLOTS: 0066 /*$PUBLIC_SLOTS$*/ 0067 0068 protected: 0069 /*$PROTECTED_FUNCTIONS$*/ 0070 MagnatuneDownloadInfo m_currentDownloadInfo; 0071 0072 protected Q_SLOTS: 0073 /*$PROTECTED_SLOTS$*/ 0074 /** 0075 * Slot for receiving notification when the download button is clicked. 0076 */ 0077 void downloadButtonClicked(); 0078 0079 }; 0080 0081 #endif 0082