SVN_SILENT made messages (after extraction)
[kdepim.git] / storageservicemanager / storageservicepage.h
blob185d43f3b8f170489a30249f1c449cbdf14857f3
1 /*
2 Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
21 #ifndef STORAGESERVICEPAGE_H
22 #define STORAGESERVICEPAGE_H
24 #include <QWidget>
25 #include "pimcommon/storageservice/storageserviceabstract.h"
26 #include "storageservicemanagerutil.h"
27 #include "pimcommon/storageservice/widgets/storageservicetreewidget.h"
29 namespace PimCommon
31 class StorageServiceAbstract;
32 class StorageServiceProgressWidget;
33 class StorageServiceProgressIndicator;
35 class StorageServiceWarning;
36 class StorageServiceTreeWidget;
37 class StorageServiceNavigationButtons;
38 class StorageServicePage : public QWidget
40 Q_OBJECT
41 public:
42 explicit StorageServicePage(const QString &serviceName, PimCommon::StorageServiceAbstract *storageService, QWidget *parent = Q_NULLPTR);
43 ~StorageServicePage();
45 void authenticate();
46 void createFolder();
48 void accountInfo();
49 void uploadFile();
50 void deleteFile();
51 PimCommon::StorageServiceAbstract::Capabilities capabilities() const;
52 QString serviceName() const;
53 bool hasUploadDownloadProgress() const;
54 void setNetworkIsDown(bool state);
55 void refreshList();
56 void showLog();
57 void downloadFile();
58 bool listFolderWasLoaded() const;
59 void logout();
61 PimCommon::StorageServiceTreeWidget::ItemType itemTypeSelected() const;
63 void deleteItem();
64 void renameItem();
65 Q_SIGNALS:
66 void updateIcon(const QIcon &pix, StorageServicePage *page);
67 void updateStatusBarMessage(const QString &msg);
68 void listFileWasInitialized();
69 void selectionChanged();
71 public Q_SLOTS:
72 void slotUploadFile();
74 private Q_SLOTS:
75 void slotDownloadFile();
76 void slotAccountInfoDone(const QString &serviceName, const PimCommon::AccountInfo &accountInfo);
77 void slotUploadFileDone(const QString &serviceName, const QString &fileName);
78 void slotuploadDownloadFileProgress(const QString &serviceName, qint64 done, qint64 total);
79 void slotShareLinkDone(const QString &serviceName, const QString &link);
80 void slotAuthenticationFailed(const QString &serviceName, const QString &error);
81 void slotAuthenticationDone(const QString &serviceName);
82 void slotActionFailed(const QString &serviceName, const QString &error);
83 void slotProgressStateChanged(bool state);
84 void slotUpdatePixmap(const QPixmap &pix);
85 void slotListFolderDone(const QString &serviceName, const QVariant &data);
86 void slotCreateFolderDone(const QString &serviceName, const QString &folder);
87 void slotDeleteFolderDone(const QString &serviceName, const QString &folder);
88 void slotDeleteFileDone(const QString &serviceName, const QString &filename);
89 void slotRenameFolderDone(const QString &serviceName, const QString &fileName);
90 void slotRenameFileDone(const QString &serviceName, const QString &fileName);
91 void slotMoveFileDone(const QString &serviceName, const QString &filename);
92 void slotMoveFolderDone(const QString &serviceName, const QString &filename);
93 void slotCopyFileDone(const QString &serviceName, const QString &filename);
94 void slotCopyFolderDone(const QString &serviceName, const QString &filename);
95 void slotDownloadFileDone(const QString &serviceName, const QString &filename);
96 void slotUploadFileFailed(const QString &serviceName, const QString &filename);
97 void slotDownloadFileFailed(const QString &serviceName, const QString &filename);
98 void slotGoHome();
99 void slotChangeFolder(const QString &previousCurrentFolder, const QString &previousParentFolder);
100 void slotChangeUrl(const InformationUrl &info);
102 private:
103 bool verifyService(const QString &serviceName);
104 inline void updateList(const QString &serviceName);
105 void connectStorageService();
106 QString mServiceName;
107 PimCommon::StorageServiceAbstract *mStorageService;
108 StorageServiceTreeWidget *mTreeWidget;
109 PimCommon::StorageServiceProgressIndicator *mProgressIndicator;
110 StorageServiceWarning *mStorageServiceWarning;
111 StorageServiceNavigationButtons *mStorageServiceNavigationBar;
112 PimCommon::StorageServiceProgressWidget *mProgressWidget;
115 #endif // STORAGESERVICEPAGE_H