File indexing completed on 2024-05-05 05:50:41

0001 /*
0002     SPDX-FileCopyrightText: 2007 Henrique Pinto <henrique.pinto@kdemail.net>
0003     SPDX-FileCopyrightText: 2008 Harald Hvaal <haraldhv@stud.ntnu.no>
0004 
0005     SPDX-License-Identifier: BSD-2-Clause
0006 */
0007 
0008 #ifndef EXTRACTIONDIALOG_H
0009 #define EXTRACTIONDIALOG_H
0010 
0011 #include "kerfuffle_export.h"
0012 
0013 #include <QDialog>
0014 #include <QUrl>
0015 
0016 #include <KFileWidget>
0017 
0018 namespace Kerfuffle
0019 {
0020 class KERFUFFLE_EXPORT ExtractionDialog : public QDialog
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit ExtractionDialog(QWidget *parent = nullptr);
0025     ~ExtractionDialog() override;
0026 
0027     void setShowSelectedFiles(bool);
0028     void setExtractToSubfolder(bool);
0029     void setPreservePaths(bool);
0030     void batchModeOption();
0031     void setOpenDestinationFolderAfterExtraction(bool);
0032     void setCloseAfterExtraction(bool);
0033     void setAutoSubfolder(bool value);
0034 
0035     bool extractAllFiles() const;
0036     bool openDestinationAfterExtraction() const;
0037     bool closeAfterExtraction() const;
0038     bool extractToSubfolder() const;
0039     bool autoSubfolders() const;
0040     bool preservePaths() const;
0041     QUrl destinationDirectory() const;
0042     QString subfolder() const;
0043 
0044 public Q_SLOTS:
0045     void setBusyGui();
0046     void setReadyGui();
0047     void setSubfolder(const QString &subfolder);
0048     void setCurrentUrl(const QUrl &url);
0049     void restoreWindowSize();
0050 
0051 private Q_SLOTS:
0052     void writeSettings();
0053     void slotAccepted();
0054 
0055 private:
0056     void loadSettings();
0057 
0058     class ExtractionDialogUI *m_ui;
0059     KFileWidget *fileWidget;
0060 };
0061 }
0062 
0063 #endif // EXTRACTIONDIALOG_H