Commit 1d44a3c8 authored by Àlex Fiestas's avatar Àlex Fiestas
Browse files

Prepare the create interface to be used, connecting and creating slots

parent 064b8417
......@@ -19,6 +19,8 @@
#include "create.h"
#include "ui_types.h"
#include <QtCore/QDebug>
#include <QtGui/QWidget>
Create::Create(QWidget* parent)
......@@ -36,10 +38,37 @@ Create::~Create()
QWidget* Create::widget()
{
m_form = new Ui::createForm();
if (!m_form) {
m_form = new Ui::createForm();
}
QWidget *widget = new QWidget(m_parent);
m_form->setupUi(widget);
QMetaObject::invokeMethod(this, "stablishConnections", Qt::QueuedConnection);
return widget;
}
void Create::stablishConnections()
{
connect(m_form->googleBtn, SIGNAL(clicked(bool)), this, SLOT(startGoogle()));
connect(m_form->facebookBtn, SIGNAL(clicked(bool)), this, SLOT(startFacebook()));
connect(m_form->liveBtn, SIGNAL(clicked(bool)), this, SLOT(startLive()));
}
void Create::startGoogle()
{
qDebug() << "Staring Google auth";
}
void Create::startFacebook()
{
qWarning("FAcebook not implemented yet");
}
void Create::startLive()
{
qWarning("Live not implemented yet");
}
......@@ -34,6 +34,12 @@ Q_OBJECT
QWidget* widget();
private Q_SLOTS:
void stablishConnections();
void startGoogle();
void startFacebook();
void startLive();
private:
QWidget *m_parent;
Ui::createForm *m_form;
......
......@@ -30,12 +30,14 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCommandLinkButton" name="commandLinkButton">
<widget class="QCommandLinkButton" name="googleBtn">
<property name="text">
<string>Google Account</string>
</property>
<property name="icon">
<iconset theme="im-google-talk"/>
<iconset theme="im-google-talk">
<normaloff/>
</iconset>
</property>
<property name="iconSize">
<size>
......@@ -46,12 +48,14 @@
</widget>
</item>
<item>
<widget class="QCommandLinkButton" name="commandLinkButton_2">
<widget class="QCommandLinkButton" name="facebookBtn">
<property name="text">
<string>Facebook</string>
</property>
<property name="icon">
<iconset theme="im-facebook"/>
<iconset theme="im-facebook">
<normaloff/>
</iconset>
</property>
<property name="iconSize">
<size>
......@@ -62,12 +66,14 @@
</widget>
</item>
<item>
<widget class="QCommandLinkButton" name="commandLinkButton_3">
<widget class="QCommandLinkButton" name="liveBtn">
<property name="text">
<string>MSN Live</string>
<string>Live</string>
</property>
<property name="icon">
<iconset theme="im-msn"/>
<iconset theme="im-msn">
<normaloff/>
</iconset>
</property>
<property name="iconSize">
<size>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment