File: pimdataexporterwindow.h

package info (click to toggle)
pim-data-exporter 4%3A24.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,552 kB
  • sloc: cpp: 13,291; xml: 182; makefile: 6; sh: 3
file content (68 lines) | stat: -rw-r--r-- 2,365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
   SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>

   SPDX-License-Identifier: GPL-2.0-or-later
*/

#pragma once
#include "utils.h"
#include <KXmlGuiWindow>
class LogWidget;
class KRecentFilesMenu;
class QAction;
class QCommandLineParser;
class PimDataBackupRestoreUI;
class PimDataTrayIcon;
class PimDataExporterWindow : public KXmlGuiWindow
{
    Q_OBJECT
public:
    explicit PimDataExporterWindow(QWidget *parent = nullptr);
    ~PimDataExporterWindow() override;
    void handleCommandLine(const QCommandLineParser &parser);

private:
    void slotBackupData();
    void slotRestoreData();
    void slotAddInfo(const QString &info);
    void slotAddError(const QString &info);
    void slotAddTitle(const QString &info);
    void slotAddEndLine();
    void slotSaveLog();
    void slotShowStructureInfos();
    void slotRestoreFile(const QUrl &url);
    void slotShowArchiveInformations();
    void slotUpdateActions(bool inAction);
    void slotShowBackupFinishDialogInformation();
    void slotJobFailed();
    void slotJobFinished();
    void slotShowCurrentArchiveInformations();
    void slotAddResourceToSync(const QString &name, const QString &identifier);
    void slotFullSyncFinished();
    void slotFullSyncInstanceDone(const QString &identifier);
    void slotFullSyncInstanceFailed(const QString &identifier);
    void slotRestoreDone();
    void slotConfigure();

private:
    void initializeBackupRestoreUi();
    void backupData(const QString &filename = QString(), const QString &templateFile = QString());
    void loadData(const QString &filename = QString(), const QString &templateFile = QString());
    void setupActions(bool canZipFile);
    void showFinishInformation();
    void importDone();
    QString mLastArchiveFileName;
    bool mInProgress = false;
    // Name, identifier
    QHash<QString, QString> mNeedToSyncResources;
    LogWidget *const mLogWidget;
    KRecentFilesMenu *mRecentFilesMenu = nullptr;
    QAction *mBackupAction = nullptr;
    QAction *mRestoreAction = nullptr;
    QAction *mSaveLogAction = nullptr;
    QAction *mArchiveStructureInfo = nullptr;
    QAction *mShowArchiveInformationsAction = nullptr;
    QAction *mShowArchiveInformationsAboutCurrentArchiveAction = nullptr;
    PimDataBackupRestoreUI *mPimDataBackupRestoreUI = nullptr;
    PimDataTrayIcon *mTrayIcon = nullptr;
};