summaryrefslogtreecommitdiffstats
path: root/pica-client
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-07-19 20:04:37 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-07-19 20:04:37 +0000
commitf190872a4ab94577d1d9db343c0ca7643f40eae6 (patch)
treea73b441340607e97f93145fdfc6cb728faaf2ada /pica-client
parentcfc254c538e57927e651f0192688f8445d8656bf (diff)
downloadpica-pica-f190872a4ab94577d1d9db343c0ca7643f40eae6.tar.gz
pica-pica-f190872a4ab94577d1d9db343c0ca7643f40eae6.zip
RegisterAccountDialog
git-svn-id: svn://localhost/project_picapica/trunk@149 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client')
-rw-r--r--pica-client/accountswindow.cpp4
-rw-r--r--pica-client/dialogs/addaccountdialog.cpp2
-rw-r--r--pica-client/dialogs/registeraccountdialog.cpp35
-rw-r--r--pica-client/dialogs/registeraccountdialog.h30
-rw-r--r--pica-client/pica-client.pro6
5 files changed, 73 insertions, 4 deletions
diff --git a/pica-client/accountswindow.cpp b/pica-client/accountswindow.cpp
index 151e366..afd84a3 100644
--- a/pica-client/accountswindow.cpp
+++ b/pica-client/accountswindow.cpp
@@ -3,6 +3,7 @@
#include "mainwindow.h"
#include "globals.h"
#include "dialogs/addaccountdialog.h"
+#include "dialogs/registeraccountdialog.h"
#include "../PICA_client.h"
#include "skynet.h"
#include <QRegExp>
@@ -107,7 +108,8 @@ void AccountsWindow::login_click()
void AccountsWindow::register_click()
{
-
+ RegisterAccountDialog d;
+ d.exec();
}
void AccountsWindow::add_click()
diff --git a/pica-client/dialogs/addaccountdialog.cpp b/pica-client/dialogs/addaccountdialog.cpp
index 86849d4..f554caf 100644
--- a/pica-client/dialogs/addaccountdialog.cpp
+++ b/pica-client/dialogs/addaccountdialog.cpp
@@ -53,7 +53,7 @@ AddAccountDialog::AddAccountDialog(QWidget *parent) :
connect(bt_browse_cert,SIGNAL(clicked()),this,SLOT(browse_cert()));
connect(bt_browse_pkey,SIGNAL(clicked()),this,SLOT(browse_pkey()));
-
+ setLayout(grid);
}
void AddAccountDialog::OK()
diff --git a/pica-client/dialogs/registeraccountdialog.cpp b/pica-client/dialogs/registeraccountdialog.cpp
new file mode 100644
index 0000000..b091a5f
--- /dev/null
+++ b/pica-client/dialogs/registeraccountdialog.cpp
@@ -0,0 +1,35 @@
+#include "registeraccountdialog.h"
+#include <QVBoxLayout>
+
+RegisterAccountDialog::RegisterAccountDialog(QWidget *parent) :
+ QDialog(parent)
+{
+ QVBoxLayout *layout = new QVBoxLayout(this);
+
+ QLabel *lbNickname = new QLabel(tr("Name:"));
+ nickname = new QLineEdit();
+ btRegister = new QPushButton(tr("Register"));
+ lbStatus = new QLabel();
+ btOK = new QPushButton(tr("OK"));
+
+ layout->addWidget(lbNickname);
+ layout->addWidget(nickname);
+ layout->addWidget(btRegister);
+ layout->addWidget(lbStatus);
+ layout->addWidget(btOK);
+
+ setLayout(layout);
+
+ connect(btOK, SIGNAL(clicked()), this, SLOT(OK()));
+ connect(btRegister, SIGNAL(clicked()), this, SLOT(Register()));
+}
+
+void RegisterAccountDialog::OK()
+{
+ done(0);
+}
+
+void RegisterAccountDialog::Register()
+{
+
+}
diff --git a/pica-client/dialogs/registeraccountdialog.h b/pica-client/dialogs/registeraccountdialog.h
new file mode 100644
index 0000000..e1a8fd5
--- /dev/null
+++ b/pica-client/dialogs/registeraccountdialog.h
@@ -0,0 +1,30 @@
+#ifndef REGISTERACCOUNTDIALOG_H
+#define REGISTERACCOUNTDIALOG_H
+
+#include <QDialog>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QLabel>
+
+class RegisterAccountDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ explicit RegisterAccountDialog(QWidget *parent = 0);
+ QString GetCertFilename();
+ QString GetPkeyFilename();
+
+private:
+ QPushButton *btOK;
+ QPushButton *btRegister;
+ QLineEdit *nickname;
+ QLabel *lbStatus;
+
+signals:
+
+public slots:
+ void OK();
+ void Register();
+};
+
+#endif // REGISTERACCOUNTDIALOG_H
diff --git a/pica-client/pica-client.pro b/pica-client/pica-client.pro
index 30c401e..4b431d2 100644
--- a/pica-client/pica-client.pro
+++ b/pica-client/pica-client.pro
@@ -28,7 +28,8 @@ SOURCES += main.cpp\
picasystray.cpp \
picaactioncenter.cpp \
dialogs/viewcertdialog.cpp \
- dialogs/forgedcertdialog.cpp
+ dialogs/forgedcertdialog.cpp \
+ dialogs/registeraccountdialog.cpp
HEADERS += mainwindow.h \
chatwindow.h \
@@ -50,7 +51,8 @@ HEADERS += mainwindow.h \
dialogs/viewcertdialog.h \
dialogs/forgedcertdialog.h \
../PICA_common.h \
- ../PICA_proto.h
+ ../PICA_proto.h \
+ dialogs/registeraccountdialog.h
DEFINES = PICA_MULTITHREADED