Git commit ea3674f0b9c0007132712ece35bf98aa66876a08 by Alex Fiestas. Committed on 17/04/2012 at 15:20. Pushed by mklapetek into branch 'master'. Added connection page, does nothing atm C +12 -46 connecting.cpp [from: owncloud.cpp - 052% similarity] C +16 -51 connecting.h [from: owncloud.cpp - 051% similarity] A +93 -0 connecting.ui M +3 -0 owncloud.cpp http://commits.kde.org/kaccounts-providers/ea3674f0b9c0007132712ece35bf98aa= 66876a08 diff --git a/owncloud.cpp b/connecting.cpp similarity index 52% copy from owncloud.cpp copy to connecting.cpp index 19841d0..e98b065 100644 --- a/owncloud.cpp +++ b/connecting.cpp @@ -16,60 +16,26 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1= 301, USA * *************************************************************************= ************/ = +#include "connecting.h" #include "owncloud.h" -#include "basicinfo.h" +#include = -#include -#include -#include - -OwnCloudWizard::OwnCloudWizard(QWidget* parent, Qt::WindowFlags flags): QW= izard(parent, flags) -{ - BasicInfo *basicInfo =3D new BasicInfo(this); - - addPage(basicInfo); - - setButton(QWizard::BackButton, new KPushButton(KStandardGuiItem::back(= KStandardGuiItem::UseRTL))); - setButton(QWizard::NextButton, new KPushButton(KStandardGuiItem::forwa= rd(KStandardGuiItem::UseRTL))); - setButton(QWizard::FinishButton, new KPushButton(KStandardGuiItem::app= ly())); - setButton(QWizard::CancelButton, new KPushButton(KStandardGuiItem::can= cel())); - - //We do not want "Forward" as text - setButtonText(QWizard::NextButton, i18nc("Action to go to the next pag= e on the wizard", "Next")); - setButtonText(QWizard::FinishButton, i18nc("Action to finish the wizar= d", "Finish")); -} - -OwnCloudWizard::~OwnCloudWizard() -{ - -} - -void OwnCloudWizard::setUsername(const QString& username) +Connecting::Connecting(OwnCloudWizard* parent) + : QWizardPage(parent) + , m_wizard(parent) { - m_username =3D username; + setupUi(this); + KPixmapSequenceOverlayPainter *painter =3D new KPixmapSequenceOverlayP= ainter(this); + painter->setWidget(working); + painter->start(); } = -void OwnCloudWizard::setPassword(const QString& password) +Connecting::~Connecting() { - m_password =3D password; -} = -void OwnCloudWizard::setServer(const KUrl& server) -{ - m_server =3D server; } = -const QString OwnCloudWizard::username() const +void Connecting::initializePage() { - return m_username; + server->setText(m_wizard->server().host()); } - -const QString OwnCloudWizard::password() const -{ - return m_password; -} - -const KUrl OwnCloudWizard::server() const -{ - return m_server; -} \ No newline at end of file diff --git a/owncloud.cpp b/connecting.h similarity index 51% copy from owncloud.cpp copy to connecting.h index 19841d0..ce94586 100644 --- a/owncloud.cpp +++ b/connecting.h @@ -16,60 +16,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1= 301, USA * *************************************************************************= ************/ = -#include "owncloud.h" -#include "basicinfo.h" +#ifndef CONNECTING_H +#define CONNECTING_H = -#include -#include -#include +#include "ui_connecting.h" = -OwnCloudWizard::OwnCloudWizard(QWidget* parent, Qt::WindowFlags flags): QW= izard(parent, flags) -{ - BasicInfo *basicInfo =3D new BasicInfo(this); - - addPage(basicInfo); - - setButton(QWizard::BackButton, new KPushButton(KStandardGuiItem::back(= KStandardGuiItem::UseRTL))); - setButton(QWizard::NextButton, new KPushButton(KStandardGuiItem::forwa= rd(KStandardGuiItem::UseRTL))); - setButton(QWizard::FinishButton, new KPushButton(KStandardGuiItem::app= ly())); - setButton(QWizard::CancelButton, new KPushButton(KStandardGuiItem::can= cel())); - - //We do not want "Forward" as text - setButtonText(QWizard::NextButton, i18nc("Action to go to the next pag= e on the wizard", "Next")); - setButtonText(QWizard::FinishButton, i18nc("Action to finish the wizar= d", "Finish")); -} +#include +#include = -OwnCloudWizard::~OwnCloudWizard() +class OwnCloudWizard; +class Connecting : public QWizardPage, Ui::Connecting { + Q_OBJECT + public: + explicit Connecting(OwnCloudWizard *parent); + virtual ~Connecting(); = -} - -void OwnCloudWizard::setUsername(const QString& username) -{ - m_username =3D username; -} - -void OwnCloudWizard::setPassword(const QString& password) -{ - m_password =3D password; -} + virtual void initializePage(); + private: + OwnCloudWizard *m_wizard; +}; = -void OwnCloudWizard::setServer(const KUrl& server) -{ - m_server =3D server; -} - -const QString OwnCloudWizard::username() const -{ - return m_username; -} - -const QString OwnCloudWizard::password() const -{ - return m_password; -} - -const KUrl OwnCloudWizard::server() const -{ - return m_server; -} \ No newline at end of file +#endif //CONNECTING_H \ No newline at end of file diff --git a/connecting.ui b/connecting.ui new file mode 100644 index 0000000..a480422 --- /dev/null +++ b/connecting.ui @@ -0,0 +1,93 @@ + + + Connecting + + + + 0 + 0 + 400 + 300 + + + + + + + + + + 0 + 0 + + + + + 22 + 22 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + + 0 + 0 + + + + Connecting to: + + + + + + + + 0 + 0 + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/owncloud.cpp b/owncloud.cpp index 19841d0..022f47e 100644 --- a/owncloud.cpp +++ b/owncloud.cpp @@ -18,6 +18,7 @@ = #include "owncloud.h" #include "basicinfo.h" +#include "connecting.h" = #include #include @@ -26,8 +27,10 @@ OwnCloudWizard::OwnCloudWizard(QWidget* parent, Qt::WindowFlags flags): QW= izard(parent, flags) { BasicInfo *basicInfo =3D new BasicInfo(this); + Connecting *connecting =3D new Connecting(this); = addPage(basicInfo); + addPage(connecting); = setButton(QWizard::BackButton, new KPushButton(KStandardGuiItem::back(= KStandardGuiItem::UseRTL))); setButton(QWizard::NextButton, new KPushButton(KStandardGuiItem::forwa= rd(KStandardGuiItem::UseRTL)));