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 MAGNATUNE_REDOWNLOAD_DIALOG_H
0018 #define MAGNATUNE_REDOWNLOAD_DIALOG_H
0019 
0020 #include "ui_MagnatuneRedownloadDialogBase.h"
0021 
0022 #include "MagnatuneDownloadInfo.h"
0023 
0024 #include <QStringList>
0025 
0026 class MagnatuneRedownloadDialog : public QDialog, public Ui::magnatuneReDownloadDialogBase
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031     explicit MagnatuneRedownloadDialog( QWidget* parent = nullptr, const char* name = nullptr, bool modal = false, Qt::WindowFlags fl = {} );
0032     ~MagnatuneRedownloadDialog();
0033     /*$PUBLIC_FUNCTIONS$*/
0034 
0035     void setRedownloadItems( const QStringList &items );
0036     void setRedownloadItems(const QList<MagnatuneDownloadInfo> &previousPurchases );
0037 
0038 Q_SIGNALS:
0039 
0040 //     void redownload( const QString &downloadInfoFileName );
0041     void redownload( const MagnatuneDownloadInfo &info );
0042     void cancelled();
0043 
0044 public Q_SLOTS:
0045     /*$PUBLIC_SLOTS$*/
0046 
0047 protected:
0048     QMap <QTreeWidgetItem*, MagnatuneDownloadInfo> m_infoMap;
0049 
0050 protected Q_SLOTS:
0051     /*$PROTECTED_SLOTS$*/
0052     void slotRedownload();
0053     void selectionChanged();
0054     void reject() override;
0055 
0056 };
0057 
0058 #endif
0059