File indexing completed on 2024-12-22 04:15:11

0001 /*
0002  *  SPDX-FileCopyrightText: 2023 Srirupa Datta <srirupa.sps@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef PAGE_BUNDLE_SAVER_H
0007 #define PAGE_BUNDLE_SAVER_H
0008 
0009 #include <QWizardPage>
0010 #include <KoResourceBundle.h>
0011 #include "KisBundleStorage.h"
0012 
0013 
0014 namespace Ui {
0015 class PageBundleSaver;
0016 }
0017 
0018 class PageBundleSaver : public QWizardPage
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit PageBundleSaver(KoResourceBundleSP bundle = nullptr, QWidget *parent = nullptr);
0024     ~PageBundleSaver();
0025 
0026     QString saveLocation() const;
0027     void showWarning();
0028     void removeWarning();
0029 
0030 private Q_SLOTS:
0031     void selectSaveLocation();
0032 
0033 public Q_SLOTS:
0034     void onCountUpdated();
0035     void onTagsUpdated();
0036 
0037 private:
0038     Ui::PageBundleSaver *m_ui;
0039     KoResourceBundleSP m_bundle;
0040     QMap<QString, int> m_count;
0041     QSet<QString> m_loaded_tags;
0042     QMap<QString, int> m_loaded_count;
0043     QString m_resourceCount;
0044     QString m_tags;
0045     KisBundleStorage *m_bundleStorage;
0046 };
0047 
0048 #endif // PAGE_BUNDLE_SAVER_H