-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit eb9efbd
Showing
88 changed files
with
18,190 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "Add_win.h" | ||
#include "myapi.h" | ||
#include "msgbox.h" | ||
Add_win::Add_win(QWidget *parent) | ||
: QDialog(parent) | ||
{ | ||
ui.setupUi(this); | ||
ui.add_auth->setItemData(0, "user"); | ||
ui.add_auth->setItemData(1, "admin"); | ||
connect( | ||
ui.btnOK, SIGNAL(clicked(bool)), this, SLOT(OnBtnOKClicked(bool)) | ||
); | ||
connect( | ||
ui.btnCancel, SIGNAL(clicked(bool)), this, SLOT(OnBtnCancelClicked(bool)) | ||
); | ||
} | ||
|
||
Add_win::~Add_win() | ||
{ | ||
} | ||
|
||
int Add_win::OnBtnOKClicked(bool clicked) | ||
{ | ||
QString sname = ui.add_name->text(); | ||
QString spwd = ui.add_pwd->text(); | ||
QString sauth = ui.add_auth->itemData(ui.add_auth->currentIndex()).toString(); | ||
accept(); | ||
int ret = Add_API(sname.toStdWString(),spwd.toStdWString(),sauth.toStdWString()); | ||
msgbox msg; | ||
msg.setlabel(ret); | ||
msg.exec(); | ||
return 0; | ||
} | ||
int Add_win::OnBtnCancelClicked(bool clicked) | ||
{ | ||
reject(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include <QDialog> | ||
#include "ui_Add_win.h" | ||
|
||
class Add_win : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
Add_win(QWidget *parent = Q_NULLPTR); | ||
~Add_win(); | ||
|
||
private slots: | ||
int OnBtnOKClicked(bool clicked); | ||
int OnBtnCancelClicked(bool clicked); | ||
|
||
private: | ||
Ui::Add_win ui; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Add_win</class> | ||
<widget class="QDialog" name="Add_win"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>399</width> | ||
<height>292</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Add_win</string> | ||
</property> | ||
<widget class="QWidget" name=""> | ||
<property name="geometry"> | ||
<rect> | ||
<x>30</x> | ||
<y>30</y> | ||
<width>341</width> | ||
<height>231</height> | ||
</rect> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
<item> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>姓名</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLineEdit" name="add_name"/> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
<item> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="text"> | ||
<string>密码</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLineEdit" name="add_pwd"/> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout_4"> | ||
<item> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string>权限</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QComboBox" name="add_auth"> | ||
<item> | ||
<property name="text"> | ||
<string>用户</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>管理员</string> | ||
</property> | ||
</item> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnOK"> | ||
<property name="text"> | ||
<string>确认</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnCancel"> | ||
<property name="text"> | ||
<string>取消</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="horizontalSpacer_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
</widget> | ||
<layoutdefault spacing="6" margin="11"/> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "Del_win.h" | ||
|
||
Del_win::Del_win(QWidget *parent) | ||
: QDialog(parent) | ||
{ | ||
ui.setupUi(this); | ||
connect( | ||
ui.btnOK, SIGNAL(clicked(bool)), this, SLOT(OnBtnOKClicked(bool)) | ||
); | ||
connect( | ||
ui.btnCancel, SIGNAL(clicked(bool)), this, SLOT(OnBtnCancelClicked(bool)) | ||
); | ||
} | ||
|
||
Del_win::~Del_win() | ||
{ | ||
} | ||
|
||
int Del_win::OnBtnOKClicked(bool clicked) | ||
{ | ||
accept(); | ||
return 0; | ||
} | ||
int Del_win::OnBtnCancelClicked(bool clicked) | ||
{ | ||
reject(); | ||
return 0; | ||
} | ||
|
||
void Del_win::set_label_num(int num) | ||
{ | ||
ui.del_label_num->setText(QString::number(num)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include <QDialog> | ||
#include "ui_Del_win.h" | ||
|
||
class Del_win : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
Del_win(QWidget *parent = Q_NULLPTR); | ||
~Del_win(); | ||
void set_label_num(int num); | ||
|
||
private slots: | ||
int OnBtnOKClicked(bool clicked); | ||
int OnBtnCancelClicked(bool clicked); | ||
private: | ||
Ui::Del_win ui; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Del_win</class> | ||
<widget class="QDialog" name="Del_win"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>416</width> | ||
<height>204</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>警告</string> | ||
</property> | ||
<widget class="QWidget" name=""> | ||
<property name="geometry"> | ||
<rect> | ||
<x>70</x> | ||
<y>60</y> | ||
<width>261</width> | ||
<height>41</height> | ||
</rect> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>您确定要删除选中的</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="del_label_num"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="text"> | ||
<string>0</string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>个用户吗?</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<widget class="QWidget" name=""> | ||
<property name="geometry"> | ||
<rect> | ||
<x>60</x> | ||
<y>130</y> | ||
<width>289</width> | ||
<height>30</height> | ||
</rect> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnOK"> | ||
<property name="text"> | ||
<string>确认</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnCancel"> | ||
<property name="text"> | ||
<string>取消</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="horizontalSpacer_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</widget> | ||
</widget> | ||
<layoutdefault spacing="6" margin="11"/> | ||
<resources/> | ||
<connections/> | ||
</ui> |
Oops, something went wrong.