File indexing completed on 2023-12-03 08:26:46
0001 /*************************************************************************** 0002 * Copyright (C) 2009 Matthias Fuchs <mat69@gmx.net> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the * 0016 * Free Software Foundation, Inc., * 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 0018 ***************************************************************************/ 0019 0020 #ifndef DRAGDLG_H 0021 #define DRAGDLG_H 0022 0023 #include "../../core/basedialog.h" 0024 #include "ui_commondata.h" 0025 #include "ui_dragdlg.h" 0026 0027 class QCheckBox; 0028 class QSortFilterProxyModel; 0029 class UrlWidget; 0030 0031 namespace KGetMetalink 0032 { 0033 class CommonData; 0034 class Resources; 0035 } 0036 0037 class DragDlg : public KGetSaveSizeDialog 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 DragDlg(KGetMetalink::Resources *resources, 0043 KGetMetalink::CommonData *commonData, 0044 QSortFilterProxyModel *countrySort, 0045 QSortFilterProxyModel *languageSort, 0046 QWidget *parent = nullptr); 0047 0048 Q_SIGNALS: 0049 /** 0050 * The types the user want to be checked and if partial checksums should be created 0051 * @note emitted whenever the dialog is closed, so might be empty 0052 */ 0053 void usedTypes(const QStringList &types, bool createPartial); 0054 0055 private Q_SLOTS: 0056 /** 0057 * Called when the dialog is finished, to Q_EMIT usedTypes 0058 */ 0059 void slotFinished(); 0060 0061 private: 0062 UrlWidget *m_urlWidget; 0063 KGetMetalink::Resources *m_resources; 0064 KGetMetalink::CommonData *m_commonData; 0065 QList<QCheckBox *> m_checkBoxes; 0066 Ui::DragDlg ui; 0067 Ui::CommonData uiData; 0068 }; 0069 0070 #endif