Welcome to mirror list, hosted at ThFree Co, Russian Federation.

owncloudwizard.h « wizard « src - github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cac61be9cc9fb7d02cfea2d4d11ec47d64af8a0c (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
 * Copyright (C) by Klaas Freitag <freitag@owncloud.com>
 * Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 */

#ifndef MIRALL_OWNCLOUD_WIZARD_H
#define MIRALL_OWNCLOUD_WIZARD_H

#include <QWizard>

#include "wizard/owncloudwizardcommon.h"

namespace Mirall {

class OwncloudSetupPage;
class OwncloudHttpCredsPage;
class OwncloudShibbolethCredsPage;
class OwncloudAdvancedSetupPage;
class OwncloudWizardResultPage;
class AbstractCredentials;
class AbstractCredentialsWizardPage;

class OwncloudWizard: public QWizard
{
    Q_OBJECT
public:

    enum LogType {
      LogPlain,
      LogParagraph
    };

    OwncloudWizard(QWidget *parent = 0);

    void setOCUrl( const QString& );

    void setupCustomMedia( QVariant, QLabel* );
    QString ocUrl() const;
    QString localFolder() const;

    void enableFinishOnResultWidget(bool enable);

    void displayError( const QString& );
    void setMultipleFoldersExist( bool );
    void setConfigExists( bool );
    bool configExists();
    void successfulStep();
    void setAuthType(WizardCommon::AuthType type);
    AbstractCredentials* getCredentials() const;

public slots:
    void setRemoteFolder( const QString& );
    void appendToConfigurationLog( const QString& msg, LogType type = LogParagraph );
    void slotCurrentPageChanged( int );

signals:
    void clearPendingRequests();
    void determineAuthType(const QString&);
    void connectToOCUrl( const QString& );
    void createLocalAndRemoteFolders(const QString&, const QString&);

private:
    OwncloudSetupPage* _setupPage;
    OwncloudHttpCredsPage* _httpCredsPage;
    OwncloudShibbolethCredsPage* _shibbolethCredsPage;
    OwncloudAdvancedSetupPage* _advancedSetupPage;
    OwncloudWizardResultPage* _resultPage;
    AbstractCredentialsWizardPage* _credentialsPage;

    QString _configFile;
    QString _oCUser;
    QStringList _setupLog;
    bool _configExists;
};

} // ns Mirall

#endif