Commit ebd75d4b by NitefullWind

1. 新增"关于"菜单可查看版本信息。 2. 取消支付窗口输入框中按回车键支付(避免扫枪后支付)。

parent 5cd7d40a
...@@ -43,7 +43,8 @@ SOURCES += main.cpp\ ...@@ -43,7 +43,8 @@ SOURCES += main.cpp\
fmsetting.cpp \ fmsetting.cpp \
windows/fmvipsetting.cpp \ windows/fmvipsetting.cpp \
task/taskconfirmrecharge.cpp \ task/taskconfirmrecharge.cpp \
windows/fmconfirmwnd.cpp windows/fmconfirmwnd.cpp \
windows/fmaboutwnd.cpp
HEADERS += \ HEADERS += \
task/fmtask.h \ task/fmtask.h \
...@@ -78,7 +79,8 @@ HEADERS += \ ...@@ -78,7 +79,8 @@ HEADERS += \
fmsetting.h \ fmsetting.h \
windows/fmvipsetting.h \ windows/fmvipsetting.h \
task/taskconfirmrecharge.h \ task/taskconfirmrecharge.h \
windows/fmconfirmwnd.h windows/fmconfirmwnd.h \
windows/fmaboutwnd.h
FORMS += \ FORMS += \
windows/forms/fmloading.ui \ windows/forms/fmloading.ui \
...@@ -89,7 +91,8 @@ FORMS += \ ...@@ -89,7 +91,8 @@ FORMS += \
windows/forms/fmvippanel.ui \ windows/forms/fmvippanel.ui \
windows/forms/fmnumpad.ui \ windows/forms/fmnumpad.ui \
windows/forms/fmvipsetting.ui \ windows/forms/fmvipsetting.ui \
windows/forms/fmconfirmwnd.ui windows/forms/fmconfirmwnd.ui \
windows/forms/fmaboutwnd.ui
INCLUDEPATH += ../FMVipDC/ ./task ./windows ./backup INCLUDEPATH += ../FMVipDC/ ./task ./windows ./backup
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "fmvipsetting.h" #include "fmvipsetting.h"
#include "taskothers.h" #include "taskothers.h"
#include "fmprinter.h" #include "fmprinter.h"
#include "fmaboutwnd.h"
FMVipDispatcher::FMVipDispatcher(QObject *parent) : FMVipDispatcher::FMVipDispatcher(QObject *parent) :
QObject(parent), QObject(parent),
...@@ -165,6 +166,9 @@ void FMVipDispatcher::createSysIcon() ...@@ -165,6 +166,9 @@ void FMVipDispatcher::createSysIcon()
auto settingAction = new QAction("设置", this); auto settingAction = new QAction("设置", this);
connect(settingAction, SIGNAL(triggered(bool)), this, SLOT(onSetting())); connect(settingAction, SIGNAL(triggered(bool)), this, SLOT(onSetting()));
menu->addAction(settingAction); menu->addAction(settingAction);
auto aboutAction = new QAction("关于", this);
connect(aboutAction, SIGNAL(triggered(bool)), this, SLOT(onAbout()));
menu->addAction(aboutAction);
auto quitAction = new QAction("退出", this); auto quitAction = new QAction("退出", this);
connect(quitAction, SIGNAL(triggered(bool)), this, SLOT(onQuit())); connect(quitAction, SIGNAL(triggered(bool)), this, SLOT(onQuit()));
menu->addAction(quitAction); menu->addAction(quitAction);
...@@ -193,6 +197,12 @@ void FMVipDispatcher::onSetting() ...@@ -193,6 +197,12 @@ void FMVipDispatcher::onSetting()
settingWnd.exec(); settingWnd.exec();
} }
void FMVipDispatcher::onAbout()
{
FMAboutWnd aboutWnd;
aboutWnd.About();
}
void FMVipDispatcher::onConfirmRechageTimeOut() void FMVipDispatcher::onConfirmRechageTimeOut()
{ {
if(!backupReqObj.empty()) { if(!backupReqObj.empty()) {
......
...@@ -44,6 +44,7 @@ public slots: ...@@ -44,6 +44,7 @@ public slots:
void onDoTask(); void onDoTask();
void onQuit(); void onQuit();
void onSetting(); void onSetting();
void onAbout();
void onCheckSocket(); void onCheckSocket();
void onDisconnected(); void onDisconnected();
......
...@@ -16,5 +16,6 @@ ...@@ -16,5 +16,6 @@
<file>num_del.png</file> <file>num_del.png</file>
<file>img_logo.png</file> <file>img_logo.png</file>
<file>FreemudPOS.ico</file> <file>FreemudPOS.ico</file>
<file>fm-icon.png</file>
</qresource> </qresource>
</RCC> </RCC>
#include "fmaboutwnd.h"
#include "ui_fmaboutwnd.h"
#include <QFile>
FMAboutWnd::FMAboutWnd(FMVipWnd *parent) :
FMVipWnd(parent),
ui(new Ui::FMAboutWnd)
{
ui->setupUi(this);
}
FMAboutWnd::~FMAboutWnd()
{
delete ui;
}
void FMAboutWnd::About()
{
QString versionInfo;
QFile versionFile(qApp->applicationDirPath() + "/version.dat");
bool isOk = versionFile.open(QIODevice::ReadOnly);
if(isOk) {
QTextStream in(&versionFile);
versionInfo = in.readLine();
} else {
versionInfo = "未知";
}
versionFile.close();
ui->version_lab->setText("版本:" + versionInfo);
this->exec();
}
void FMAboutWnd::on_close_btn_clicked()
{
this->close();
}
#ifndef FMABOUNTWND_H
#define FMABOUNTWND_H
#include "fmvipwnd.h"
namespace Ui {
class FMAboutWnd;
}
class FMAboutWnd : public FMVipWnd
{
Q_OBJECT
public:
explicit FMAboutWnd(FMVipWnd *parent = 0);
~FMAboutWnd();
void About();
private slots:
void on_close_btn_clicked();
private:
Ui::FMAboutWnd *ui;
};
#endif // FMABOUNTWND_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FMAboutWnd</class>
<widget class="QWidget" name="FMAboutWnd">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>290</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>425</width>
<height>290</height>
</size>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="windowTitle">
<string>FMConfirmwnd</string>
</property>
<property name="styleSheet">
<string notr="true">
#FMAboutWnd{
min-width: 425px; min-height: 290;
border-image:url(&quot;:/alert_bg.png&quot;);
background: transparent;
font: normal 22px &quot;Microsoft YaHei&quot;;
}
QPushButton
{
max-width: 180px; max-height: 45px;
color: rgb(255, 255, 255);
border-radius: 3px;
font: normal 22px &quot;Microsoft YaHei&quot;
}
#close_btn
{
background-color: rgb(221, 88, 51);
}
QPushButton:pressed
{
color: rgb(161, 161, 161);
border-radius: 3px;
}
QLabel
{
font: normal 18px &quot;Microsoft YaHei&quot;;
}
#title_lab
{
font: bold 22px &quot;Microsoft YaHei&quot;;
}
#icon_lab
{
image: url(:/fm-icon.png);
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>20</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>20</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<property name="horizontalSpacing">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>10</number>
</property>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QLabel" name="version_lab">
<property name="text">
<string>版本:v1.0(2017-06-06 06:06:06)</string>
</property>
</widget>
</item>
<item row="2" column="0" rowspan="2">
<widget class="QLabel" name="icon_lab">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="title_lab">
<property name="text">
<string>关于FMVIP</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="name_lab">
<property name="text">
<string>程序:非码会员(老乡鸡)客户端</string>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QPushButton" name="close_btn">
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>关闭</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
...@@ -928,12 +928,12 @@ font: 13px &quot;微软雅黑&quot;; ...@@ -928,12 +928,12 @@ font: 13px &quot;微软雅黑&quot;;
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<tabstops> <tabstops>
<tabstop>pay_edit</tabstop> <tabstop>pay_edit</tabstop>
<tabstop>pay_btn</tabstop>
<tabstop>coupon_next_btn</tabstop> <tabstop>coupon_next_btn</tabstop>
<tabstop>coupon_page</tabstop> <tabstop>coupon_page</tabstop>
<tabstop>coupon_prev_btn</tabstop> <tabstop>coupon_prev_btn</tabstop>
<tabstop>close_btn</tabstop>
<tabstop>pay_key</tabstop> <tabstop>pay_key</tabstop>
<tabstop>close_btn</tabstop>
<tabstop>pay_btn</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment