File indexing completed on 2024-12-22 04:45:57

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 #include "importexportdata/importexportutils.h"
0009 #include "libruqolawidgets_private_export.h"
0010 #include <QWizardPage>
0011 class QLabel;
0012 class KMessageWidget;
0013 class QPlainTextEdit;
0014 class LIBRUQOLAWIDGETS_TESTS_EXPORT ExportDataFinishPage : public QWizardPage
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit ExportDataFinishPage(QWidget *parent = nullptr);
0019     ~ExportDataFinishPage() override;
0020     void setListAccounts(const QVector<ImportExportUtils::AccountImportExportInfo> &newListAccounts);
0021     void exportAccounts();
0022 
0023     [[nodiscard]] bool isComplete() const override;
0024 
0025 private:
0026     [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString generateExportZipFileName() const;
0027     LIBRUQOLAWIDGETS_NO_EXPORT void slotExportDone();
0028     LIBRUQOLAWIDGETS_NO_EXPORT void slotExportFailed(const QString &msg);
0029     LIBRUQOLAWIDGETS_NO_EXPORT void slotExportInfo(const QString &msg);
0030     QVector<ImportExportUtils::AccountImportExportInfo> mListAccounts;
0031     QLabel *const mInfos;
0032     KMessageWidget *const mMessageWidget;
0033     QPlainTextEdit *const mDetails;
0034     bool mExportDone = false;
0035 };