Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cloud Refactor - Add Account Wizard WIP
.. committing the work in progress .. still needs to be completed, but for technical reasons I am pushing now to get into the master repository.
- Loading branch information
1 parent
ad97fbe
commit 097f9ed
Showing
18 changed files
with
587 additions
and
6 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/* | ||
* Copyright (c) 2017 Mark Liversedge (liversedge@gmail.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. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., 51 | ||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#ifndef _AddCloudWizard_h | ||
#define _AddCloudWizard_h | ||
|
||
#include "GoldenCheetah.h" | ||
#include "Context.h" | ||
#include "CloudService.h" | ||
#include "Serial.h" | ||
#include "Settings.h" | ||
|
||
#include <QWizard> | ||
#include <QFormLayout> | ||
#include <QHeaderView> | ||
#include <QProgressBar> | ||
#include <QFileDialog> | ||
#include <QCommandLinkButton> | ||
|
||
class AddCloudWizard : public QWizard | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
AddCloudWizard(Context *context); | ||
QSize sizeHint() const { return QSize(600,650); } | ||
|
||
Context *context; | ||
bool done; // have we finished? | ||
|
||
// what type of services did we say we wanted | ||
int type; | ||
|
||
// which service have we selected? | ||
QString service; | ||
|
||
// this is cloned for our context | ||
CloudService *cloudService; | ||
|
||
public slots: | ||
|
||
signals: | ||
|
||
private slots: | ||
|
||
}; | ||
|
||
class AddClass : public QWizardPage | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
AddClass(AddCloudWizard *); | ||
bool validate() const { return false; } | ||
bool isComplete() const { return false; } | ||
int nextId() const { return 10; } | ||
|
||
public slots: | ||
void clicked(int); | ||
|
||
private: | ||
AddCloudWizard *wizard; | ||
QSignalMapper *mapper; | ||
}; | ||
|
||
class AddService : public QWizardPage | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
AddService(AddCloudWizard *); | ||
void initializePage(); | ||
bool validate() const { return false; } | ||
bool isComplete() const { return false; } | ||
int nextId() const { return 20; } | ||
|
||
public slots: | ||
void clicked(QString); | ||
|
||
private: | ||
AddCloudWizard *wizard; | ||
QSignalMapper *mapper; | ||
QWidget *buttons; | ||
QVBoxLayout *buttonlayout; | ||
QScrollArea *scrollarea; | ||
}; | ||
|
||
class AddAuth : public QWizardPage | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
AddAuth(AddCloudWizard *); | ||
|
||
public slots: | ||
void initializePage(); | ||
bool validatePage(); | ||
int nextId() const { return 30; } | ||
|
||
//void doAuth(); | ||
|
||
private: | ||
AddCloudWizard *wizard; | ||
}; | ||
|
||
class AddSettings : public QWizardPage | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
AddSettings(AddCloudWizard *); | ||
void initializePage(); | ||
bool validatePage(); | ||
int nextId() const { return 90; } | ||
|
||
public slots: | ||
|
||
private: | ||
AddCloudWizard *wizard; | ||
}; | ||
|
||
class AddFinish : public QWizardPage | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
AddFinish(AddCloudWizard *); | ||
void initializePage(); | ||
//bool validatePage(); | ||
bool isCommitPage() { return true; } | ||
|
||
private: | ||
AddCloudWizard *wizard; | ||
|
||
}; | ||
|
||
#endif // _AddCloudWizard_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters