加入登录窗口
This commit is contained in:
		@@ -28,12 +28,14 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\source\main.cpp" />
 | 
			
		||||
    <ClCompile Include="..\..\..\source\system\system_util.cpp" />
 | 
			
		||||
    <ClCompile Include="..\..\..\source\test\test.cpp" />
 | 
			
		||||
    <ClCompile Include="..\..\..\source\widgets\LoginWidget\QLoginDialog.cpp" />
 | 
			
		||||
    <ClCompile Include="..\..\..\source\Widgets\MainFrame\QMainFrame.cpp" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <QtRcc Include="..\..\..\source\resource.qrc" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <QtUic Include="..\..\..\source\widgets\LoginWidget\QLoginDialog.ui" />
 | 
			
		||||
    <QtUic Include="..\..\..\source\Widgets\MainFrame\QMainFrame.ui" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
@@ -50,6 +52,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\source\db\ocilib\db_oper.h" />
 | 
			
		||||
    <ClInclude Include="..\..\..\source\system\system_util.h" />
 | 
			
		||||
    <ClInclude Include="..\..\..\source\test\test.h" />
 | 
			
		||||
    <QtMoc Include="..\..\..\source\widgets\LoginWidget\QLoginDialog.h" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <PropertyGroup Label="Globals">
 | 
			
		||||
    <ProjectGuid>{B12702AD-ABFB-343A-A199-8E24837244A3}</ProjectGuid>
 | 
			
		||||
@@ -125,6 +128,7 @@
 | 
			
		||||
      <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
 | 
			
		||||
      <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
 | 
			
		||||
      <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\source\widgets\LoginWidget;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <SubSystem>Console</SubSystem>
 | 
			
		||||
@@ -152,6 +156,7 @@
 | 
			
		||||
      <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
 | 
			
		||||
      <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
 | 
			
		||||
      <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\source\widgets\LoginWidget;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <SubSystem>Windows</SubSystem>
 | 
			
		||||
 
 | 
			
		||||
@@ -71,6 +71,9 @@
 | 
			
		||||
    <Filter Include="数据库\ocilib">
 | 
			
		||||
      <UniqueIdentifier>{e5f3c3be-5fe7-471e-8dc7-d5889f5f87d9}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\登录窗口">
 | 
			
		||||
      <UniqueIdentifier>{4aafaac0-1c39-407d-9701-175ad2e441c2}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ClCompile Include="..\..\..\source\main.cpp">
 | 
			
		||||
@@ -109,6 +112,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\source\db\ocilib\db_oper.cpp">
 | 
			
		||||
      <Filter>数据库\ocilib</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\source\widgets\LoginWidget\QLoginDialog.cpp">
 | 
			
		||||
      <Filter>窗口\登录窗口</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <QtRcc Include="..\..\..\source\resource.qrc">
 | 
			
		||||
@@ -119,11 +125,17 @@
 | 
			
		||||
    <QtUic Include="..\..\..\source\Widgets\MainFrame\QMainFrame.ui">
 | 
			
		||||
      <Filter>窗口\主窗口</Filter>
 | 
			
		||||
    </QtUic>
 | 
			
		||||
    <QtUic Include="..\..\..\source\widgets\LoginWidget\QLoginDialog.ui">
 | 
			
		||||
      <Filter>窗口\登录窗口</Filter>
 | 
			
		||||
    </QtUic>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <QtMoc Include="..\..\..\source\Widgets\MainFrame\QMainFrame.h">
 | 
			
		||||
      <Filter>窗口\主窗口</Filter>
 | 
			
		||||
    </QtMoc>
 | 
			
		||||
    <QtMoc Include="..\..\..\source\widgets\LoginWidget\QLoginDialog.h">
 | 
			
		||||
      <Filter>窗口\登录窗口</Filter>
 | 
			
		||||
    </QtMoc>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Image Include="..\..\..\source\car_dealer_util.ico">
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,132 @@
 | 
			
		||||
/****************************************************************************
 | 
			
		||||
** Meta object code from reading C++ file 'QLoginDialog.h'
 | 
			
		||||
**
 | 
			
		||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.1)
 | 
			
		||||
**
 | 
			
		||||
** WARNING! All changes made in this file will be lost!
 | 
			
		||||
*****************************************************************************/
 | 
			
		||||
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include "../../../../../../source/widgets/LoginWidget/QLoginDialog.h"
 | 
			
		||||
#include <QtCore/qbytearray.h>
 | 
			
		||||
#include <QtCore/qmetatype.h>
 | 
			
		||||
#if !defined(Q_MOC_OUTPUT_REVISION)
 | 
			
		||||
#error "The header file 'QLoginDialog.h' doesn't include <QObject>."
 | 
			
		||||
#elif Q_MOC_OUTPUT_REVISION != 67
 | 
			
		||||
#error "This file was generated using the moc from 5.13.1. It"
 | 
			
		||||
#error "cannot be used with the include files from this version of Qt."
 | 
			
		||||
#error "(The moc has changed too much.)"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
QT_BEGIN_MOC_NAMESPACE
 | 
			
		||||
QT_WARNING_PUSH
 | 
			
		||||
QT_WARNING_DISABLE_DEPRECATED
 | 
			
		||||
struct qt_meta_stringdata_QLoginDialog_t {
 | 
			
		||||
    QByteArrayData data[6];
 | 
			
		||||
    char stringdata0[51];
 | 
			
		||||
};
 | 
			
		||||
#define QT_MOC_LITERAL(idx, ofs, len) \
 | 
			
		||||
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
 | 
			
		||||
    qptrdiff(offsetof(qt_meta_stringdata_QLoginDialog_t, stringdata0) + ofs \
 | 
			
		||||
        - idx * sizeof(QByteArrayData)) \
 | 
			
		||||
    )
 | 
			
		||||
static const qt_meta_stringdata_QLoginDialog_t qt_meta_stringdata_QLoginDialog = {
 | 
			
		||||
    {
 | 
			
		||||
QT_MOC_LITERAL(0, 0, 12), // "QLoginDialog"
 | 
			
		||||
QT_MOC_LITERAL(1, 13, 4), // "init"
 | 
			
		||||
QT_MOC_LITERAL(2, 18, 0), // ""
 | 
			
		||||
QT_MOC_LITERAL(3, 19, 8), // "initData"
 | 
			
		||||
QT_MOC_LITERAL(4, 28, 10), // "initSignal"
 | 
			
		||||
QT_MOC_LITERAL(5, 39, 11) // "initWidgets"
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
    "QLoginDialog\0init\0\0initData\0initSignal\0"
 | 
			
		||||
    "initWidgets"
 | 
			
		||||
};
 | 
			
		||||
#undef QT_MOC_LITERAL
 | 
			
		||||
 | 
			
		||||
static const uint qt_meta_data_QLoginDialog[] = {
 | 
			
		||||
 | 
			
		||||
 // content:
 | 
			
		||||
       8,       // revision
 | 
			
		||||
       0,       // classname
 | 
			
		||||
       0,    0, // classinfo
 | 
			
		||||
       4,   14, // methods
 | 
			
		||||
       0,    0, // properties
 | 
			
		||||
       0,    0, // enums/sets
 | 
			
		||||
       0,    0, // constructors
 | 
			
		||||
       0,       // flags
 | 
			
		||||
       0,       // signalCount
 | 
			
		||||
 | 
			
		||||
 // slots: name, argc, parameters, tag, flags
 | 
			
		||||
       1,    0,   34,    2, 0x09 /* Protected */,
 | 
			
		||||
       3,    0,   35,    2, 0x09 /* Protected */,
 | 
			
		||||
       4,    0,   36,    2, 0x09 /* Protected */,
 | 
			
		||||
       5,    0,   37,    2, 0x09 /* Protected */,
 | 
			
		||||
 | 
			
		||||
 // slots: parameters
 | 
			
		||||
    QMetaType::Void,
 | 
			
		||||
    QMetaType::Void,
 | 
			
		||||
    QMetaType::Void,
 | 
			
		||||
    QMetaType::Void,
 | 
			
		||||
 | 
			
		||||
       0        // eod
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void QLoginDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
 | 
			
		||||
{
 | 
			
		||||
    if (_c == QMetaObject::InvokeMetaMethod) {
 | 
			
		||||
        auto *_t = static_cast<QLoginDialog *>(_o);
 | 
			
		||||
        Q_UNUSED(_t)
 | 
			
		||||
        switch (_id) {
 | 
			
		||||
        case 0: _t->init(); break;
 | 
			
		||||
        case 1: _t->initData(); break;
 | 
			
		||||
        case 2: _t->initSignal(); break;
 | 
			
		||||
        case 3: _t->initWidgets(); break;
 | 
			
		||||
        default: ;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    Q_UNUSED(_a);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QT_INIT_METAOBJECT const QMetaObject QLoginDialog::staticMetaObject = { {
 | 
			
		||||
    &QDialog::staticMetaObject,
 | 
			
		||||
    qt_meta_stringdata_QLoginDialog.data,
 | 
			
		||||
    qt_meta_data_QLoginDialog,
 | 
			
		||||
    qt_static_metacall,
 | 
			
		||||
    nullptr,
 | 
			
		||||
    nullptr
 | 
			
		||||
} };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const QMetaObject *QLoginDialog::metaObject() const
 | 
			
		||||
{
 | 
			
		||||
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void *QLoginDialog::qt_metacast(const char *_clname)
 | 
			
		||||
{
 | 
			
		||||
    if (!_clname) return nullptr;
 | 
			
		||||
    if (!strcmp(_clname, qt_meta_stringdata_QLoginDialog.stringdata0))
 | 
			
		||||
        return static_cast<void*>(this);
 | 
			
		||||
    return QDialog::qt_metacast(_clname);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int QLoginDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
 | 
			
		||||
{
 | 
			
		||||
    _id = QDialog::qt_metacall(_c, _id, _a);
 | 
			
		||||
    if (_id < 0)
 | 
			
		||||
        return _id;
 | 
			
		||||
    if (_c == QMetaObject::InvokeMetaMethod) {
 | 
			
		||||
        if (_id < 4)
 | 
			
		||||
            qt_static_metacall(this, _c, _id, _a);
 | 
			
		||||
        _id -= 4;
 | 
			
		||||
    } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
 | 
			
		||||
        if (_id < 4)
 | 
			
		||||
            *reinterpret_cast<int*>(_a[0]) = -1;
 | 
			
		||||
        _id -= 4;
 | 
			
		||||
    }
 | 
			
		||||
    return _id;
 | 
			
		||||
}
 | 
			
		||||
QT_WARNING_POP
 | 
			
		||||
QT_END_MOC_NAMESPACE
 | 
			
		||||
@@ -0,0 +1,194 @@
 | 
			
		||||
/********************************************************************************
 | 
			
		||||
** Form generated from reading UI file 'QLoginDialog.ui'
 | 
			
		||||
**
 | 
			
		||||
** Created by: Qt User Interface Compiler version 5.13.1
 | 
			
		||||
**
 | 
			
		||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
 | 
			
		||||
********************************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef UI_QLOGINDIALOG_H
 | 
			
		||||
#define UI_QLOGINDIALOG_H
 | 
			
		||||
 | 
			
		||||
#include <QtCore/QVariant>
 | 
			
		||||
#include <QtGui/QIcon>
 | 
			
		||||
#include <QtWidgets/QApplication>
 | 
			
		||||
#include <QtWidgets/QDialog>
 | 
			
		||||
#include <QtWidgets/QGridLayout>
 | 
			
		||||
#include <QtWidgets/QGroupBox>
 | 
			
		||||
#include <QtWidgets/QHBoxLayout>
 | 
			
		||||
#include <QtWidgets/QLabel>
 | 
			
		||||
#include <QtWidgets/QLineEdit>
 | 
			
		||||
#include <QtWidgets/QSpacerItem>
 | 
			
		||||
#include <QtWidgets/QToolButton>
 | 
			
		||||
#include <QtWidgets/QVBoxLayout>
 | 
			
		||||
#include <QtWidgets/QWidget>
 | 
			
		||||
 | 
			
		||||
QT_BEGIN_NAMESPACE
 | 
			
		||||
 | 
			
		||||
class Ui_QLoginDialog
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    QWidget *widget;
 | 
			
		||||
    QVBoxLayout *pLayoutMain;
 | 
			
		||||
    QHBoxLayout *horizontalLayout;
 | 
			
		||||
    QLabel *label;
 | 
			
		||||
    QGroupBox *groupBox;
 | 
			
		||||
    QGridLayout *gridLayout;
 | 
			
		||||
    QLabel *label_2;
 | 
			
		||||
    QLineEdit *lineEdit;
 | 
			
		||||
    QLabel *label_3;
 | 
			
		||||
    QLineEdit *lineEdit_2;
 | 
			
		||||
    QLabel *label_4;
 | 
			
		||||
    QLineEdit *lineEdit_3;
 | 
			
		||||
    QHBoxLayout *horizontalLayout_2;
 | 
			
		||||
    QSpacerItem *horizontalSpacer;
 | 
			
		||||
    QToolButton *pButtonExit;
 | 
			
		||||
    QToolButton *pButtonOK;
 | 
			
		||||
 | 
			
		||||
    void setupUi(QDialog *QLoginDialog)
 | 
			
		||||
    {
 | 
			
		||||
        if (QLoginDialog->objectName().isEmpty())
 | 
			
		||||
            QLoginDialog->setObjectName(QString::fromUtf8("QLoginDialog"));
 | 
			
		||||
        QLoginDialog->resize(350, 160);
 | 
			
		||||
        QLoginDialog->setMinimumSize(QSize(350, 160));
 | 
			
		||||
        QLoginDialog->setMaximumSize(QSize(350, 160));
 | 
			
		||||
        widget = new QWidget(QLoginDialog);
 | 
			
		||||
        widget->setObjectName(QString::fromUtf8("widget"));
 | 
			
		||||
        widget->setGeometry(QRect(0, 0, 349, 158));
 | 
			
		||||
        pLayoutMain = new QVBoxLayout(widget);
 | 
			
		||||
        pLayoutMain->setSpacing(6);
 | 
			
		||||
        pLayoutMain->setContentsMargins(11, 11, 11, 11);
 | 
			
		||||
        pLayoutMain->setObjectName(QString::fromUtf8("pLayoutMain"));
 | 
			
		||||
        pLayoutMain->setContentsMargins(5, 5, 5, 5);
 | 
			
		||||
        horizontalLayout = new QHBoxLayout();
 | 
			
		||||
        horizontalLayout->setSpacing(6);
 | 
			
		||||
        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
 | 
			
		||||
        label = new QLabel(widget);
 | 
			
		||||
        label->setObjectName(QString::fromUtf8("label"));
 | 
			
		||||
        label->setPixmap(QPixmap(QString::fromUtf8(":/QMainFrame/Resources/cat.png")));
 | 
			
		||||
 | 
			
		||||
        horizontalLayout->addWidget(label);
 | 
			
		||||
 | 
			
		||||
        groupBox = new QGroupBox(widget);
 | 
			
		||||
        groupBox->setObjectName(QString::fromUtf8("groupBox"));
 | 
			
		||||
        gridLayout = new QGridLayout(groupBox);
 | 
			
		||||
        gridLayout->setSpacing(6);
 | 
			
		||||
        gridLayout->setContentsMargins(11, 11, 11, 11);
 | 
			
		||||
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
 | 
			
		||||
        label_2 = new QLabel(groupBox);
 | 
			
		||||
        label_2->setObjectName(QString::fromUtf8("label_2"));
 | 
			
		||||
        label_2->setMinimumSize(QSize(85, 0));
 | 
			
		||||
        label_2->setMaximumSize(QSize(85, 16777215));
 | 
			
		||||
        label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
 | 
			
		||||
 | 
			
		||||
        gridLayout->addWidget(label_2, 0, 0, 1, 1);
 | 
			
		||||
 | 
			
		||||
        lineEdit = new QLineEdit(groupBox);
 | 
			
		||||
        lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
 | 
			
		||||
        lineEdit->setMinimumSize(QSize(120, 0));
 | 
			
		||||
        lineEdit->setMaximumSize(QSize(120, 16777215));
 | 
			
		||||
        lineEdit->setStyleSheet(QString::fromUtf8("border: 1px solid silver;"));
 | 
			
		||||
        lineEdit->setAlignment(Qt::AlignCenter);
 | 
			
		||||
        lineEdit->setReadOnly(true);
 | 
			
		||||
 | 
			
		||||
        gridLayout->addWidget(lineEdit, 0, 1, 1, 1);
 | 
			
		||||
 | 
			
		||||
        label_3 = new QLabel(groupBox);
 | 
			
		||||
        label_3->setObjectName(QString::fromUtf8("label_3"));
 | 
			
		||||
        label_3->setMinimumSize(QSize(85, 0));
 | 
			
		||||
        label_3->setMaximumSize(QSize(85, 16777215));
 | 
			
		||||
        label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
 | 
			
		||||
 | 
			
		||||
        gridLayout->addWidget(label_3, 1, 0, 1, 1);
 | 
			
		||||
 | 
			
		||||
        lineEdit_2 = new QLineEdit(groupBox);
 | 
			
		||||
        lineEdit_2->setObjectName(QString::fromUtf8("lineEdit_2"));
 | 
			
		||||
        lineEdit_2->setMinimumSize(QSize(120, 0));
 | 
			
		||||
        lineEdit_2->setMaximumSize(QSize(120, 16777215));
 | 
			
		||||
        lineEdit_2->setStyleSheet(QString::fromUtf8("border: 1px solid silver;"));
 | 
			
		||||
        lineEdit_2->setAlignment(Qt::AlignCenter);
 | 
			
		||||
        lineEdit_2->setReadOnly(true);
 | 
			
		||||
 | 
			
		||||
        gridLayout->addWidget(lineEdit_2, 1, 1, 1, 1);
 | 
			
		||||
 | 
			
		||||
        label_4 = new QLabel(groupBox);
 | 
			
		||||
        label_4->setObjectName(QString::fromUtf8("label_4"));
 | 
			
		||||
        label_4->setMinimumSize(QSize(85, 0));
 | 
			
		||||
        label_4->setMaximumSize(QSize(85, 16777215));
 | 
			
		||||
        label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
 | 
			
		||||
 | 
			
		||||
        gridLayout->addWidget(label_4, 2, 0, 1, 1);
 | 
			
		||||
 | 
			
		||||
        lineEdit_3 = new QLineEdit(groupBox);
 | 
			
		||||
        lineEdit_3->setObjectName(QString::fromUtf8("lineEdit_3"));
 | 
			
		||||
        lineEdit_3->setMinimumSize(QSize(120, 0));
 | 
			
		||||
        lineEdit_3->setMaximumSize(QSize(120, 16777215));
 | 
			
		||||
        lineEdit_3->setStyleSheet(QString::fromUtf8("border: 1px solid silver;"));
 | 
			
		||||
        lineEdit_3->setAlignment(Qt::AlignCenter);
 | 
			
		||||
        lineEdit_3->setReadOnly(true);
 | 
			
		||||
 | 
			
		||||
        gridLayout->addWidget(lineEdit_3, 2, 1, 1, 1);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        horizontalLayout->addWidget(groupBox);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        pLayoutMain->addLayout(horizontalLayout);
 | 
			
		||||
 | 
			
		||||
        horizontalLayout_2 = new QHBoxLayout();
 | 
			
		||||
        horizontalLayout_2->setSpacing(6);
 | 
			
		||||
        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
 | 
			
		||||
        horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 | 
			
		||||
 | 
			
		||||
        horizontalLayout_2->addItem(horizontalSpacer);
 | 
			
		||||
 | 
			
		||||
        pButtonExit = new QToolButton(widget);
 | 
			
		||||
        pButtonExit->setObjectName(QString::fromUtf8("pButtonExit"));
 | 
			
		||||
        QIcon icon;
 | 
			
		||||
        icon.addFile(QString::fromUtf8(":/QMainFrame/Resources/quit.png"), QSize(), QIcon::Normal, QIcon::On);
 | 
			
		||||
        pButtonExit->setIcon(icon);
 | 
			
		||||
        pButtonExit->setIconSize(QSize(32, 32));
 | 
			
		||||
        pButtonExit->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
 | 
			
		||||
 | 
			
		||||
        horizontalLayout_2->addWidget(pButtonExit);
 | 
			
		||||
 | 
			
		||||
        pButtonOK = new QToolButton(widget);
 | 
			
		||||
        pButtonOK->setObjectName(QString::fromUtf8("pButtonOK"));
 | 
			
		||||
        QIcon icon1;
 | 
			
		||||
        icon1.addFile(QString::fromUtf8(":/QMainFrame/Resources/ok.png"), QSize(), QIcon::Normal, QIcon::On);
 | 
			
		||||
        pButtonOK->setIcon(icon1);
 | 
			
		||||
        pButtonOK->setIconSize(QSize(32, 32));
 | 
			
		||||
        pButtonOK->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
 | 
			
		||||
 | 
			
		||||
        horizontalLayout_2->addWidget(pButtonOK);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        pLayoutMain->addLayout(horizontalLayout_2);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        retranslateUi(QLoginDialog);
 | 
			
		||||
 | 
			
		||||
        QMetaObject::connectSlotsByName(QLoginDialog);
 | 
			
		||||
    } // setupUi
 | 
			
		||||
 | 
			
		||||
    void retranslateUi(QDialog *QLoginDialog)
 | 
			
		||||
    {
 | 
			
		||||
        QLoginDialog->setWindowTitle(QCoreApplication::translate("QLoginDialog", "\347\214\234\347\214\234\344\275\240\346\230\257\350\260\201~~~~", nullptr));
 | 
			
		||||
        label->setText(QString());
 | 
			
		||||
        groupBox->setTitle(QCoreApplication::translate("QLoginDialog", "\344\272\272\345\221\230\344\277\241\346\201\257\357\274\232", nullptr));
 | 
			
		||||
        label_2->setText(QCoreApplication::translate("QLoginDialog", "\347\263\273\347\273\237\347\224\250\346\210\267\345\220\215\357\274\232", nullptr));
 | 
			
		||||
        label_3->setText(QCoreApplication::translate("QLoginDialog", "\344\272\272\345\221\230\345\220\215\347\247\260\357\274\232", nullptr));
 | 
			
		||||
        label_4->setText(QCoreApplication::translate("QLoginDialog", "\345\262\227\344\275\215\357\274\232", nullptr));
 | 
			
		||||
        pButtonExit->setText(QCoreApplication::translate("QLoginDialog", "\351\200\200\345\207\272", nullptr));
 | 
			
		||||
        pButtonOK->setText(QCoreApplication::translate("QLoginDialog", "\347\241\256\350\256\244", nullptr));
 | 
			
		||||
    } // retranslateUi
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
    class QLoginDialog: public Ui_QLoginDialog {};
 | 
			
		||||
} // namespace Ui
 | 
			
		||||
 | 
			
		||||
QT_END_NAMESPACE
 | 
			
		||||
 | 
			
		||||
#endif // UI_QLOGINDIALOG_H
 | 
			
		||||
@@ -154,10 +154,15 @@ void ImportCarDealerAchievementToOracle( std::string                         use
 | 
			
		||||
	OCI_Prepare( pStatement, szSqlImport );
 | 
			
		||||
 | 
			
		||||
	for ( auto iterAchievement = achievementVector.begin();
 | 
			
		||||
		iterAchievement != achievementVector.end();
 | 
			
		||||
		++iterAchievement )
 | 
			
		||||
	      iterAchievement != achievementVector.end();
 | 
			
		||||
	      ++iterAchievement )
 | 
			
		||||
	{
 | 
			
		||||
		
 | 
			
		||||
		string checkedAchievement = QString( "%1" ).arg( static_cast<double>(iterAchievement->getCheckedAchievement()) ).toStdString();
 | 
			
		||||
		string policyAmount       = QString( "%1" ).arg( iterAchievement->getPolicyAmount() ).toStdString();
 | 
			
		||||
		string cpicAmount         = QString( "%1" ).arg( iterAchievement->getCpicAmount() ).toStdString();
 | 
			
		||||
		string piccAmount         = QString( "%1" ).arg( iterAchievement->getPiccAmount() ).toStdString();
 | 
			
		||||
		string pinganAmount       = QString( "%1" ).arg( iterAchievement->getPinganAmount() ).toStdString();
 | 
			
		||||
		string othersAmount       = QString( "%1" ).arg( iterAchievement->getOthersAmount() ).toStdString();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,18 @@
 | 
			
		||||
#include <QtWidgets/QtWidgets>
 | 
			
		||||
#include <QtWidgets/QApplication>
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
#include "Widgets/MainFrame/QMainFrame.h"
 | 
			
		||||
#include "QLoginDialog.h"
 | 
			
		||||
#include "test/test.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
int main( int argc, char * argv[] )
 | 
			
		||||
{
 | 
			
		||||
	QApplication * pApp       = nullptr;
 | 
			
		||||
	QMainFrame *   pMainFrame = nullptr;
 | 
			
		||||
	int            returnCode = -1;
 | 
			
		||||
	QApplication * pApp         = nullptr;
 | 
			
		||||
	QMainFrame *   pMainFrame   = nullptr;
 | 
			
		||||
	QLoginDialog * pLoginDialog = nullptr;
 | 
			
		||||
	int            returnCode   = -1;
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
@@ -22,7 +27,24 @@ int main( int argc, char * argv[] )
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	test();
 | 
			
		||||
	//test();
 | 
			
		||||
 | 
			
		||||
	//return 1;
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		pLoginDialog = new QLoginDialog();
 | 
			
		||||
 | 
			
		||||
		pLoginDialog->exec();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( std::runtime_error error )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( nullptr,
 | 
			
		||||
		                       "错误!",
 | 
			
		||||
		                       error.what() );
 | 
			
		||||
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return 1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,33 @@
 | 
			
		||||
#include "QLoginDialog.h"
 | 
			
		||||
 | 
			
		||||
QLoginDialog::QLoginDialog( QWidget * parent )
 | 
			
		||||
	: QDialog( parent )
 | 
			
		||||
{
 | 
			
		||||
	ui.setupUi( this );
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QLoginDialog::~QLoginDialog()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginDialog::init()
 | 
			
		||||
{
 | 
			
		||||
	initData();
 | 
			
		||||
	initWidgets();
 | 
			
		||||
	initSignal();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginDialog::initData()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginDialog::initSignal()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginDialog::initWidgets()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( ui.pLayoutMain );
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,22 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <QDialog>
 | 
			
		||||
#include "ui_QLoginDialog.h"
 | 
			
		||||
 | 
			
		||||
class QLoginDialog : public QDialog
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QLoginDialog(QWidget *parent = Q_NULLPTR);
 | 
			
		||||
	~QLoginDialog();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initData();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
	void initWidgets();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Ui::QLoginDialog ui;
 | 
			
		||||
};
 | 
			
		||||
@@ -0,0 +1,281 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QLoginDialog</class>
 | 
			
		||||
 <widget class="QDialog" name="QLoginDialog">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>350</width>
 | 
			
		||||
    <height>160</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="minimumSize">
 | 
			
		||||
   <size>
 | 
			
		||||
    <width>350</width>
 | 
			
		||||
    <height>160</height>
 | 
			
		||||
   </size>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="maximumSize">
 | 
			
		||||
   <size>
 | 
			
		||||
    <width>350</width>
 | 
			
		||||
    <height>160</height>
 | 
			
		||||
   </size>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>猜猜你是谁~~~~</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>0</x>
 | 
			
		||||
     <y>0</y>
 | 
			
		||||
     <width>349</width>
 | 
			
		||||
     <height>158</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QVBoxLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item>
 | 
			
		||||
     <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QLabel" name="label">
 | 
			
		||||
        <property name="text">
 | 
			
		||||
         <string/>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="pixmap">
 | 
			
		||||
         <pixmap resource="../../resource.qrc">:/QMainFrame/Resources/cat.png</pixmap>
 | 
			
		||||
        </property>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
        <property name="title">
 | 
			
		||||
         <string>人员信息:</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_2">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>85</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>85</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>系统用户名:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="1">
 | 
			
		||||
          <widget class="QLineEdit" name="lineEdit">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>120</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>120</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">border: 1px solid silver;</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="readOnly">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_3">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>85</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>85</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>人员名称:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="1">
 | 
			
		||||
          <widget class="QLineEdit" name="lineEdit_2">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>120</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>120</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">border: 1px solid silver;</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="readOnly">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="2" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_4">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>85</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>85</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>岗位:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="2" column="1">
 | 
			
		||||
          <widget class="QLineEdit" name="lineEdit_3">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>120</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>120</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">border: 1px solid silver;</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="readOnly">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <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="QToolButton" name="pButtonExit">
 | 
			
		||||
        <property name="text">
 | 
			
		||||
         <string>退出</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="icon">
 | 
			
		||||
         <iconset>
 | 
			
		||||
          <normalon>:/QMainFrame/Resources/quit.png</normalon>
 | 
			
		||||
         </iconset>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="iconSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>32</width>
 | 
			
		||||
          <height>32</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="toolButtonStyle">
 | 
			
		||||
         <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
        </property>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QToolButton" name="pButtonOK">
 | 
			
		||||
        <property name="text">
 | 
			
		||||
         <string>确认</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="icon">
 | 
			
		||||
         <iconset>
 | 
			
		||||
          <normalon>:/QMainFrame/Resources/ok.png</normalon>
 | 
			
		||||
         </iconset>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="iconSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>32</width>
 | 
			
		||||
          <height>32</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="toolButtonStyle">
 | 
			
		||||
         <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
        </property>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="../../resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
		Reference in New Issue
	
	Block a user