...
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "QLoginDialog.h"
|
||||
#include "../../system/system_util.h"
|
||||
|
||||
QLoginDialog::QLoginDialog( QWidget * parent )
|
||||
: QDialog( parent )
|
||||
@@ -21,13 +22,34 @@ void QLoginDialog::init()
|
||||
|
||||
void QLoginDialog::initData()
|
||||
{
|
||||
returnCode = EXIT;
|
||||
|
||||
systemUserName = QString::fromStdWString(getUserName());
|
||||
}
|
||||
|
||||
void QLoginDialog::initSignal()
|
||||
{
|
||||
connect(ui.pButtonOK, SIGNAL(clicked()), this, SLOT(onOK()));
|
||||
connect(ui.pButtonExit, SIGNAL(clicked()), this, SLOT(onExit()));
|
||||
}
|
||||
|
||||
void QLoginDialog::initWidgets()
|
||||
{
|
||||
setLayout( ui.pLayoutMain );
|
||||
|
||||
ui.pEditSystemUserName->setText(systemUserName);
|
||||
}
|
||||
|
||||
void QLoginDialog::onOK()
|
||||
{
|
||||
returnCode = OK;
|
||||
|
||||
this->close();
|
||||
}
|
||||
|
||||
void QLoginDialog::onExit()
|
||||
{
|
||||
returnCode = EXIT;
|
||||
|
||||
this->close();
|
||||
}
|
||||
|
@@ -11,12 +11,26 @@ public:
|
||||
QLoginDialog(QWidget *parent = Q_NULLPTR);
|
||||
~QLoginDialog();
|
||||
|
||||
typedef enum { OK, EXIT } ReturnCode;
|
||||
|
||||
ReturnCode getReturnCode() const
|
||||
{
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
protected Q_SLOTS:
|
||||
void init();
|
||||
void initData();
|
||||
void initSignal();
|
||||
void initWidgets();
|
||||
|
||||
void onOK();
|
||||
void onExit();
|
||||
|
||||
private:
|
||||
Ui::QLoginDialog ui;
|
||||
ReturnCode returnCode;
|
||||
QString systemUserName;
|
||||
QString cpicUserName;
|
||||
QString cpicP13;
|
||||
};
|
||||
|
@@ -25,7 +25,12 @@
|
||||
<property name="windowTitle">
|
||||
<string>猜猜你是谁~~~~</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normalon>:/QMainFrame/Resources/CPIC透明.png</normalon>
|
||||
</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -88,7 +93,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<widget class="QLineEdit" name="pEditSystemUserName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
@@ -135,7 +140,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<widget class="QLineEdit" name="pEditUserName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
@@ -182,7 +187,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<widget class="QLineEdit" name="pEditStaffPost">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
|
Reference in New Issue
Block a user