diff options
| -rw-r--r-- | pica-client/accountswindow.cpp | 4 | ||||
| -rw-r--r-- | pica-client/dialogs/addaccountdialog.cpp | 2 | ||||
| -rw-r--r-- | pica-client/dialogs/registeraccountdialog.cpp | 35 | ||||
| -rw-r--r-- | pica-client/dialogs/registeraccountdialog.h | 30 | ||||
| -rw-r--r-- | pica-client/pica-client.pro | 6 | ||||
| -rwxr-xr-x | tests/ca/serial | 2 | ||||
| -rwxr-xr-x | tests/ca/serial.old | 2 | ||||
| -rwxr-xr-x | tests/ca/testnet_cert_index_db.txt | 2 | ||||
| -rwxr-xr-x | tests/ca/testnet_cert_index_db.txt.old | 2 |
9 files changed, 79 insertions, 6 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 diff --git a/tests/ca/serial b/tests/ca/serial index a7920ec..5265f75 100755 --- a/tests/ca/serial +++ b/tests/ca/serial @@ -1 +1 @@ -0344 +0346 diff --git a/tests/ca/serial.old b/tests/ca/serial.old index 80a1bb5..5f43550 100755 --- a/tests/ca/serial.old +++ b/tests/ca/serial.old @@ -1 +1 @@ -0343 +0345 diff --git a/tests/ca/testnet_cert_index_db.txt b/tests/ca/testnet_cert_index_db.txt index d82140a..cd743af 100755 --- a/tests/ca/testnet_cert_index_db.txt +++ b/tests/ca/testnet_cert_index_db.txt @@ -11,3 +11,5 @@ V 220810093130Z 0340 unknown /CN=15#fifteen V 220810112929Z 0341 unknown /CN=16#sixteen V 220810192705Z 0342 unknown /CN=123#tester V 220810192754Z 0343 unknown /CN=123#tester +V 220821074303Z 0344 unknown /CN=30000#tester +V 220821074335Z 0345 unknown /CN=30001#tester diff --git a/tests/ca/testnet_cert_index_db.txt.old b/tests/ca/testnet_cert_index_db.txt.old index 6e898f0..babcc3a 100755 --- a/tests/ca/testnet_cert_index_db.txt.old +++ b/tests/ca/testnet_cert_index_db.txt.old @@ -10,3 +10,5 @@ V 220627211901Z 033F unknown /C=GE/ST=Georgia/O=\xD1\x82\xD0\xB5\xD1\x81\xD1\x8 V 220810093130Z 0340 unknown /CN=15#fifteen V 220810112929Z 0341 unknown /CN=16#sixteen V 220810192705Z 0342 unknown /CN=123#tester +V 220810192754Z 0343 unknown /CN=123#tester +V 220821074303Z 0344 unknown /CN=30000#tester |
