feat: 添加数据库操作类;添加多语言;添加添加交易界面

master
Laixingyu 3 years ago
parent 49f615c68a
commit e125abae5c

@ -10,14 +10,21 @@ CONFIG += c++11
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
db/xsqlexcute.cpp \
main.cpp \
mainwindow.cpp
mainwindow.cpp \
model/tradetablemodel.cpp \
widget/addtradedialog.cpp
HEADERS += \
mainwindow.h
db/xsqlexcute.h \
mainwindow.h \
model/tradetablemodel.h \
widget/addtradedialog.h
FORMS += \
mainwindow.ui
mainwindow.ui \
widget/addtradedialog.ui
win32-msvc2010 {
SPEC = win32-msvc2010
@ -35,6 +42,7 @@ CONFIG(debug, debug|release) {
DESTDIR = $$PWD/$$SP_V/release
}
TRANSLATIONS += treasurefinder_zh_CN.ts
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin

@ -0,0 +1,87 @@
/***
*
* sql
*/
#include "xsqlexcute.h"
XSqlExcute* XSqlExcute::g_pSqlExc = NULL;
QMutex XSqlExcute::m_mutex;
XSqlExcute::XSqlExcute(QObject *parent) : QObject(parent)
{
}
XSqlExcute* XSqlExcute::instance()
{
if (g_pSqlExc == NULL)
{
QMutexLocker locker(&m_mutex); // 加锁
if (g_pSqlExc == NULL)
{
g_pSqlExc = new XSqlExcute();
}
}
return g_pSqlExc;
}
bool XSqlExcute::openMysql(const QString& hostName,const QString& databaseName,const QString& userName,const QString& password,const QString& connectionName)
{
if(QSqlDatabase::contains(connectionName))
{
return true;
}
else
{
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL",connectionName);
db.setHostName(hostName);
db.setDatabaseName(databaseName);
db.setUserName(userName);
db.setPassword(password);
return db.open();
}
}
bool XSqlExcute::closeMysql(const QString& connectionName)
{
if(QSqlDatabase::contains(connectionName))
QSqlDatabase::removeDatabase(connectionName);
return true;
}
bool XSqlExcute::excuteSQL(const QString& sql,const QString& connectionName)
{
QSqlQuery q(QSqlDatabase::database(connectionName));
return q.exec(sql);
}
//查询
QSqlQuery XSqlExcute::query(const QString& sql,const QString& connectionName)
{
QSqlQuery q(QSqlDatabase::database(connectionName));
q.exec(sql);
return q;
}
QSqlRecord XSqlExcute::record(const QString& sql,const QString& connectionName)
{
QSqlQuery q(QSqlDatabase::database(connectionName));
q.exec(sql);
QSqlRecord r = q.record();
return r;
}
//事务
void XSqlExcute::transaction(const QString& connectionName)
{
QSqlDatabase::database(connectionName).transaction();
}
void XSqlExcute::commit(const QString& connectionName)
{
QSqlDatabase::database(connectionName).commit();
}
void XSqlExcute::rollback(const QString& connectionName)
{
QSqlDatabase::database(connectionName).rollback();
}

@ -0,0 +1,40 @@
#ifndef XSQLEXCUTE_H
#define XSQLEXCUTE_H
#include <QObject>
#include <QMutex>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlRecord>
class XSqlExcute : public QObject
{
Q_OBJECT
public:
explicit XSqlExcute(QObject *parent = nullptr);
static XSqlExcute* instance();
bool openMysql(const QString& hostName,const QString& databaseName,const QString& userName,const QString& password,const QString& connectionName);
bool closeMysql(const QString& connectionName);
//执行语句
bool excuteSQL(const QString& sql,const QString& connectionName);
//查询
QSqlQuery query(const QString& sql,const QString& connectionName);
QSqlRecord record(const QString& sql,const QString& connectionName);
//事务
void transaction(const QString& connectionName);
void commit(const QString& connectionName);
void rollback(const QString& connectionName);
signals:
private:
// explicit XSqlExcute(QObject *parent = nullptr);
private:
static XSqlExcute* g_pSqlExc;
static QMutex m_mutex;
QSqlDatabase db;
};
#endif // XSQLEXCUTE_H

@ -1,11 +1,21 @@
#include "mainwindow.h"
#include <QApplication>
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QApplication app(argc, argv);
QString appDir = QApplication::applicationDirPath();
QTranslator translator;
QString transPath = appDir + QLatin1String("/languages/") + "treasurefinder_zh_CN.qm";
if (translator.load(transPath))
{
app.installTranslator(&translator);
}
MainWindow w;
w.show();
return a.exec();
return app.exec();
}

@ -2,18 +2,17 @@
#include "ui_mainwindow.h"
#include <QSqlDatabase>
#include <QDebug>
#include "widget/addtradedialog.h"
#include "model/tradetablemodel.h"
#include <QStandardItemModel>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
// QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL");
// db.setHostName("acidalia");
// db.setDatabaseName("customdb");
// db.setUserName("mojito");
// db.setPassword("J0a1m8");
// bool ok = db.open();
this->setWindowTitle("mojin");
InitTradeTable();
QStringList dbs = QSqlDatabase::drivers();
qDebug() << __FUNCTION__ << dbs;
}
@ -23,3 +22,44 @@ MainWindow::~MainWindow()
delete ui;
}
void MainWindow::InitTradeTable()
{
// m_pTradesModel = new TradeTableModel(ui->tradeTableView);
// m_pTradesModel->setColumnCount(3);
// m_pTradesModel->setHeaderData(0,Qt::Horizontal,"名称");
// m_pTradesModel->setHeaderData(1,Qt::Horizontal,QDate::currentDate().toString("yyyy-MM-dd"));
// m_pTradesModel->setHeaderData(2,Qt::Horizontal,QDate::currentDate().addDays(-1).toString("yyyy-MM-dd"));
// ui->tradeTableView->setModel(m_pTradesModel);
//日期 星期 名称 操作 价格 数量 当前持仓 操作时涨跌 操作后当日收盘情况 当日操作盈亏情况 当日操作盈亏比例 当日合计盈亏 当日合计盈亏比例 账户净资产 账户当日盈亏 账户当日盈亏比例 盈亏(卖出时计算) 盈亏比例(卖出时计算) 备注
QStringList heanders = QStringList() << tr("date") << tr("week") << tr("name") << tr("operate") << tr("operateprice") << tr("volume")
<< tr("remainig") << tr("operatechange") << tr("close") << tr("operateprofit") << tr("totalprofit")
<< tr("finalprofit") << tr("remark");
m_pTradeStandardModel = new QStandardItemModel(ui->tradeTableView);
m_pTradeStandardModel->setColumnCount(heanders.count());
for(int i = 0 ; i < heanders.count(); i++)
{
m_pTradeStandardModel->setHeaderData(i,Qt::Horizontal,heanders[i]);
}
ui->tradeTableView->setModel(m_pTradeStandardModel);
}
void MainWindow::on_addTrade_pushButton_clicked()
{
AddTradeDialog ad;
ad.setWindowTitle("添加记录");
ad.exec();
for (int row = 0; row < 4; ++row)
{
m_pTradeStandardModel->insertRow(row);
for (int column = 0; column < 3; ++column) {
QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column));
m_pTradeStandardModel->setItem(row, column, item);
}
}
}

@ -7,6 +7,8 @@ QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class TradeTableModel;
class QStandardItemModel;
class MainWindow : public QMainWindow
{
Q_OBJECT
@ -15,7 +17,15 @@ public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
void InitTradeTable();
private slots:
void on_addTrade_pushButton_clicked();
private:
Ui::MainWindow *ui;
// TradeTableModel* m_pTradesModel;
QStandardItemModel* m_pTradeStandardModel;
};
#endif // MAINWINDOW_H

@ -39,36 +39,119 @@
<attribute name="title">
<string>交易记录</string>
</attribute>
<widget class="QTableView" name="tableView">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>741</width>
<height>761</height>
</rect>
</property>
</widget>
<widget class="QTabWidget" name="tabWidget_2">
<property name="geometry">
<rect>
<x>780</x>
<y>50</y>
<width>601</width>
<height>271</height>
</rect>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
</widget>
</widget>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>周</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>月</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_3">
<property name="text">
<string> 季</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_4">
<property name="text">
<string>年</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_5">
<property name="text">
<string> 所有日期</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="radioButton_6">
<property name="text">
<string>自定</string>
</property>
</widget>
</item>
<item>
<widget class="QDateEdit" name="dateEdit"/>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string> 至</string>
</property>
</widget>
</item>
<item>
<widget class="QDateEdit" name="dateEdit_2"/>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>确定</string>
</property>
</widget>
</item>
</layout>
</item>
<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="QLabel" name="label_3">
<property name="text">
<string>20231209-20231209</string>
</property>
</widget>
</item>
<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="addTrade_pushButton">
<property name="text">
<string> 添加记录</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QTableView" name="tradeTableView"/>
</item>
</layout>
</widget>
</widget>
</item>

@ -0,0 +1,80 @@
#include "tradetablemodel.h"
TradeTableModel::TradeTableModel(QObject *parent)
: QAbstractTableModel(parent)
{
}
QVariant TradeTableModel::headerData(int section, Qt::Orientation orientation, int role) const
{
// FIXME: Implement me!
// return QVariant();
if(role == Qt::DisplayRole && orientation == Qt::Horizontal)
return headerDatas[section];
return QVariant();
// return QAbstractTableModel::headerData(section,orientation,role);
}
bool TradeTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value,
int role /*= Qt::EditRole*/)
{
headerDatas[section] = value.toString();
return true;
}
int TradeTableModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid())
return 0;
return m_datas.count();
// FIXME: Implement me!
}
int TradeTableModel::columnCount(const QModelIndex &parent) const
{
if (parent.isValid())
return 0;
return m_nColumnCount;
// FIXME: Implement me!
}
QVariant TradeTableModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
return QVariant();
int row = index.row();
int column = index.column();
switch (role)
{
case Qt::DisplayRole:
return m_datas[row][column];
}
// if (role != Qt::DisplayRole)
// return QVariant();
// return m_datas[row][column];
return QVariant();
}
void TradeTableModel::addData(int row,int column,QString data)
{
if(m_nColumnCount <= column)
m_nColumnCount = column;
if(m_datas.count() <= row)
{
QList<QString> columns;
for(int c = 0 ; c < m_nColumnCount ; c++)
{
columns.append("");
}
columns[column] = data;
m_datas.append(columns);
}
else
{
m_datas[row][column] = data;
}
}

@ -0,0 +1,33 @@
#ifndef TRADETABLEMODEL_H
#define TRADETABLEMODEL_H
#include <QAbstractTableModel>
class TradeTableModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit TradeTableModel(QObject *parent = nullptr);
// Header:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value,
int role = Qt::EditRole) override;
// Basic functionality:
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
void setColumnCount(int count){m_nColumnCount = count;}
void addData(int row,int column,QString data);
private:
QMap<int,QString> headerDatas;
QList<QList<QString> > m_datas;
QList<QString> m_headers;
int m_nColumnCount = 0;
};
#endif // TRADETABLEMODEL_H

@ -0,0 +1,277 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>AddTradeDialog</name>
<message>
<location filename="widget/addtradedialog.ui" line="14"/>
<source>Dialog</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="24"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="30"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="40"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="50"/>
<location filename="widget/addtradedialog.ui" line="246"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="60"/>
<location filename="widget/addtradedialog.ui" line="256"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="70"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="77"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="87"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="97"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="107"/>
<location filename="widget/addtradedialog.ui" line="266"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="139"/>
<location filename="widget/addtradedialog.ui" line="295"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="146"/>
<location filename="widget/addtradedialog.ui" line="302"/>
<source>CANCEL</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="159"/>
<location filename="widget/addtradedialog.ui" line="226"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="169"/>
<location filename="widget/addtradedialog.ui" line="216"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="179"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="189"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="199"/>
<location filename="widget/addtradedialog.ui" line="236"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="widget/addtradedialog.ui" line="210"/>
<source></source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="mainwindow.ui" line="14"/>
<source>MainWindow</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="25"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="30"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="35"/>
<source> </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="40"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="48"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="55"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="62"/>
<source> </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="69"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="76"/>
<source> </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="85"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="95"/>
<source> </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="105"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="116"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="123"/>
<source>20231209-20231209</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="143"/>
<source> </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="162"/>
<location filename="mainwindow.ui" line="165"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="36"/>
<source>date</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="36"/>
<source>week</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="36"/>
<source>name</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="36"/>
<source>operate</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="36"/>
<source>operateprice</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="36"/>
<source>volume</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="37"/>
<source>remainig</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="37"/>
<source>operatechange</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="37"/>
<source>close</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="37"/>
<source>operateprofit</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="37"/>
<source>totalprofit</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="38"/>
<source>finalprofit</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="38"/>
<source>remark</source>
<translatorcomment></translatorcomment>
<translation></translation>
</message>
</context>
</TS>

@ -0,0 +1,40 @@
#include "addtradedialog.h"
#include "ui_addtradedialog.h"
#include <QSqlDatabase>
#include <QSqlError>
#include <QMessageBox>
#include <QDebug>
AddTradeDialog::AddTradeDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AddTradeDialog)
{
ui->setupUi(this);
}
AddTradeDialog::~AddTradeDialog()
{
delete ui;
}
void AddTradeDialog::on_pushButton_OK_clicked()
{
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL","192");
db.setHostName("192.168.0.222");
db.setPort(3306);
db.setDatabaseName("mojin");
db.setUserName("root");
db.setPassword("1qazse42W3");
bool ret = db.open();
if(ret)
{
QMessageBox::about(this,"OPEN MYSQL","suc");
}
else
{
QMessageBox::about(this,"OPEN MYSQL","failed");
qDebug() << __FUNCTION__ << db.lastError();
}
this->accept();
}

@ -0,0 +1,25 @@
#ifndef ADDTRADEDIALOG_H
#define ADDTRADEDIALOG_H
#include <QDialog>
namespace Ui {
class AddTradeDialog;
}
class AddTradeDialog : public QDialog
{
Q_OBJECT
public:
explicit AddTradeDialog(QWidget *parent = nullptr);
~AddTradeDialog();
private slots:
void on_pushButton_OK_clicked();
private:
Ui::AddTradeDialog *ui;
};
#endif // ADDTRADEDIALOG_H

@ -0,0 +1,320 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AddTradeDialog</class>
<widget class="QDialog" name="AddTradeDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>694</width>
<height>475</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="AddTrade">
<attribute name="title">
<string>添加记录</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="4">
<widget class="QLabel" name="label_5">
<property name="text">
<string>成交数量</string>
</property>
</widget>
</item>
<item row="2" column="5" colspan="2">
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>成交价格</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="QLineEdit" name="lineEdit_3"/>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_8">
<property name="text">
<string>成交金额</string>
</property>
</widget>
</item>
<item row="3" column="5" colspan="2">
<widget class="QLineEdit" name="lineEdit_6"/>
</item>
<item row="3" column="7">
<widget class="QLabel" name="label_9">
<property name="text">
<string>剩余金额</string>
</property>
</widget>
</item>
<item row="3" column="8" colspan="2">
<widget class="QLineEdit" name="lineEdit_7"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>佣金</string>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QLabel" name="label_11">
<property name="text">
<string>印花税</string>
</property>
</widget>
</item>
<item row="4" column="5" colspan="2">
<widget class="QLineEdit" name="lineEdit_5"/>
</item>
<item row="4" column="7">
<widget class="QLabel" name="label_12">
<property name="text">
<string>过户费</string>
</property>
</widget>
</item>
<item row="4" column="8" colspan="2">
<widget class="QLineEdit" name="lineEdit_8"/>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="label_13">
<property name="text">
<string>其他费用</string>
</property>
</widget>
</item>
<item row="5" column="2" colspan="2">
<widget class="QLineEdit" name="lineEdit_9"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>交易备注</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="9">
<widget class="QPlainTextEdit" name="plainTextEdit"/>
</item>
<item row="7" column="0" colspan="10">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</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="pushButton_OK">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>CANCEL</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="2" colspan="2">
<widget class="QLineEdit" name="lineEdit_4"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>交易类型</string>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="QComboBox" name="comboBox_3"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>日期</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QDateEdit" name="dateEdit"/>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_2">
<property name="text">
<string>证券名称</string>
</property>
</widget>
</item>
<item row="1" column="5" colspan="2">
<widget class="QComboBox" name="comboBox"/>
</item>
<item row="2" column="7">
<widget class="QLabel" name="label_6">
<property name="text">
<string>剩余数量</string>
</property>
</widget>
</item>
<item row="2" column="8" colspan="2">
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item row="1" column="7">
<widget class="QLabel" name="label_3">
<property name="text">
<string>证券代码</string>
</property>
</widget>
</item>
<item row="1" column="8" colspan="2">
<widget class="QComboBox" name="comboBox_2"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="Transfer">
<attribute name="title">
<string>转账</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,3,1,3,1,3">
<item row="0" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>日期</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDateEdit" name="dateEdit_2"/>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_18">
<property name="text">
<string>交易类型</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QComboBox" name="comboBox_4"/>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_20">
<property name="text">
<string>证券代码</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QComboBox" name="comboBox_5"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>成交金额</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_11"/>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_16">
<property name="text">
<string>剩余金额</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="lineEdit_10"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>交易备注</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="6">
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<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>
<item>
<widget class="QPushButton" name="pushButton_3">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_4">
<property name="text">
<string>CANCEL</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="1" colspan="5">
<widget class="QPlainTextEdit" name="plainTextEdit_2"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Loading…
Cancel
Save