Commit 45385d1b by ss.dai

完成界面所有的样式,悬浮窗的提示

parent 8ecd043e
...@@ -32,6 +32,7 @@ bool FlowControl::_GetStoreInfo() ...@@ -32,6 +32,7 @@ bool FlowControl::_GetStoreInfo()
result = FmPlugin::GetInstance().GetStoreInfo(m_storeId, m_posId, m_cashierId, m_bDate, error); result = FmPlugin::GetInstance().GetStoreInfo(m_storeId, m_posId, m_cashierId, m_bDate, error);
QLOG_INFO() << QString("get storeInfo finsh. [result:%1][msg:%2][storeId:%3,posId:%4,cashierId:%5,bdate:%6]") QLOG_INFO() << QString("get storeInfo finsh. [result:%1][msg:%2][storeId:%3,posId:%4,cashierId:%5,bdate:%6]")
.arg(result).arg(error, m_storeId, m_posId, m_cashierId, m_bDate.toString("yyyy-MM-dd")); .arg(result).arg(error, m_storeId, m_posId, m_cashierId, m_bDate.toString("yyyy-MM-dd"));
if(!result) if(!result)
{ {
emit showAlert(AlertForm::ERROR, "获取门店信息失败!"); emit showAlert(AlertForm::ERROR, "获取门店信息失败!");
...@@ -47,7 +48,8 @@ bool FlowControl::_Login() ...@@ -47,7 +48,8 @@ bool FlowControl::_Login()
QJsonObject sendJson; QJsonObject sendJson;
QJsonObject recvJson; QJsonObject recvJson;
sendJson = DataManger::GetInstance().GetLoginData(m_storeId, SERVER_PASSWORD, m_posId, m_cashierId); // TODO
sendJson = DataManger::GetInstance().GetLoginData(/*m_storeId*/"fm9999", SERVER_PASSWORD, m_posId, m_cashierId);
emit showAlert(AlertForm::LOADING, "正在登录......"); emit showAlert(AlertForm::LOADING, "正在登录......");
QLOG_INFO() << QString("[---login---][requestData:%1]").arg(_GetJsonStr(sendJson)); QLOG_INFO() << QString("[---login---][requestData:%1]").arg(_GetJsonStr(sendJson));
......
...@@ -34,7 +34,6 @@ void ConfigManger::SetSqlConnectInfo(const ConfigManger::SqlConnectInfo &info) ...@@ -34,7 +34,6 @@ void ConfigManger::SetSqlConnectInfo(const ConfigManger::SqlConnectInfo &info)
m_userConfig->setValue(INI_USERNAME, info.username); m_userConfig->setValue(INI_USERNAME, info.username);
m_userConfig->setValue(INI_PASSWORD, info.password); m_userConfig->setValue(INI_PASSWORD, info.password);
m_userConfig->setValue(INI_DATABASE, info.database); m_userConfig->setValue(INI_DATABASE, info.database);
return;
} }
QUrl ConfigManger::GetServerUrl() QUrl ConfigManger::GetServerUrl()
...@@ -42,5 +41,35 @@ QUrl ConfigManger::GetServerUrl() ...@@ -42,5 +41,35 @@ QUrl ConfigManger::GetServerUrl()
return m_config->value(INI_SERVER).toUrl(); return m_config->value(INI_SERVER).toUrl();
} }
QString ConfigManger::GetPrinterName()
{
return m_userConfig->value(INI_PRINTERNAME).toString();
}
void ConfigManger::SetPrinterName(const QString &printer)
{
m_userConfig->setValue(INI_PRINTERNAME, printer);
}
QPoint ConfigManger::GetFloatInitPostion()
{
return m_userConfig->value(INI_FLOATPOSTION, QPoint(20, 20)).toPoint();
}
void ConfigManger::setFloatInitPostion(const QPoint &postion)
{
m_userConfig->setValue(INI_FLOATPOSTION, postion);
}
int ConfigManger::GetBlinkInterval()
{
return m_userConfig->value(INI_BLINKINTERVAL).toFloat()*1000;
}
int ConfigManger::GetSoundInterval()
{
return m_userConfig->value(INI_SOUNDINTERVAL).toFloat()*1000;
}
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <QSettings> #include <QSettings>
#include <QUrl> #include <QUrl>
#include <QPoint>
class ConfigManger class ConfigManger
{ {
...@@ -28,12 +29,42 @@ public: ...@@ -28,12 +29,42 @@ public:
* 参数:连接信息 * 参数:连接信息
* 返回:NULL * 返回:NULL
* */ * */
void SetSqlConnectInfo(const SqlConnectInfo&); void SetSqlConnectInfo(const SqlConnectInfo& info);
/* 功能:取服务器地址 /* 功能:取服务器地址
* 参数:NULL * 参数:NULL
* 返回:服务器地址 * 返回:服务器地址
* */ * */
QUrl GetServerUrl(); QUrl GetServerUrl();
/* 功能:读取打印机名称
* 参数:NULL
* 返回:服务器地址
* */
QString GetPrinterName();
/* 功能:设置打印机名称
* 参数:打印机名称
* 返回:NULL
* */
void SetPrinterName(const QString& printer);
/* 功能:读取悬浮窗坐标
* 参数:NULL
* 返回:服务器地址
* */
QPoint GetFloatInitPostion();
/* 功能:设置悬浮窗坐标
* 参数:NULL
* 返回:服务器地址
* */
void setFloatInitPostion(const QPoint& postion);
/* 功能:获取悬浮窗闪烁间隔时长
* 参数:NULL
* 返回:间隔时长
* */
int GetBlinkInterval();
/* 功能:获取播放声音间隔时长
* 参数:NULL
* 返回:间隔时长
* */
int GetSoundInterval();
private: private:
ConfigManger(); ConfigManger();
......
...@@ -52,6 +52,7 @@ QJsonObject DataManger::GetPullDeliverData(const QString &storeId, const QString ...@@ -52,6 +52,7 @@ QJsonObject DataManger::GetPullDeliverData(const QString &storeId, const QString
rObj.insert(JSON_STOREID, storeId); rObj.insert(JSON_STOREID, storeId);
rObj.insert(JSON_CHANNEL, channelCode); rObj.insert(JSON_CHANNEL, channelCode);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -65,6 +66,7 @@ QJsonObject DataManger::GetConfirmOrderData(const QString &orderId, const QStrin ...@@ -65,6 +66,7 @@ QJsonObject DataManger::GetConfirmOrderData(const QString &orderId, const QStrin
cObj.insert(JSON_DELIVERYPHONE, deliverPhone); cObj.insert(JSON_DELIVERYPHONE, deliverPhone);
rObj.insert(JSON_ORDER, cObj); rObj.insert(JSON_ORDER, cObj);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -76,6 +78,7 @@ QJsonObject DataManger::GetRefuseOrderData(int refuseCode, const QString &orderI ...@@ -76,6 +78,7 @@ QJsonObject DataManger::GetRefuseOrderData(int refuseCode, const QString &orderI
cObj.insert(JSON_REASONCODE, refuseCode); cObj.insert(JSON_REASONCODE, refuseCode);
rObj.insert(JSON_ORDER, cObj); rObj.insert(JSON_ORDER, cObj);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -86,6 +89,7 @@ QJsonObject DataManger::GetSendOrderData(const QString &orderId) ...@@ -86,6 +89,7 @@ QJsonObject DataManger::GetSendOrderData(const QString &orderId)
cObj.insert(JSON_ORDERID, orderId); cObj.insert(JSON_ORDERID, orderId);
rObj.insert(JSON_ORDER, cObj); rObj.insert(JSON_ORDER, cObj);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -96,6 +100,7 @@ QJsonObject DataManger::GetCompleteOrderData(const QString &orderId) ...@@ -96,6 +100,7 @@ QJsonObject DataManger::GetCompleteOrderData(const QString &orderId)
cObj.insert(JSON_ORDERID, orderId); cObj.insert(JSON_ORDERID, orderId);
rObj.insert(JSON_ORDER, cObj); rObj.insert(JSON_ORDER, cObj);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -107,6 +112,7 @@ QJsonObject DataManger::GetRefundOrderData(const QString &reason, const QString ...@@ -107,6 +112,7 @@ QJsonObject DataManger::GetRefundOrderData(const QString &reason, const QString
cObj.insert(JSON_REASON, reason); cObj.insert(JSON_REASON, reason);
rObj.insert(JSON_ORDER, cObj); rObj.insert(JSON_ORDER, cObj);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -118,5 +124,6 @@ QJsonObject DataManger::GetRefuseRefundData(const QString &reason, const QString ...@@ -118,5 +124,6 @@ QJsonObject DataManger::GetRefuseRefundData(const QString &reason, const QString
cObj.insert(JSON_REASON, reason); cObj.insert(JSON_REASON, reason);
rObj.insert(JSON_ORDER, cObj); rObj.insert(JSON_ORDER, cObj);
rObj.insert(JSON_TOKEN, m_token); rObj.insert(JSON_TOKEN, m_token);
rObj.insert(JSON_POSVERSION, APP_VERSION);
return rObj; return rObj;
} }
...@@ -45,9 +45,17 @@ void AlertForm::SetContent(AlertForm::Type type, const QString &msg) ...@@ -45,9 +45,17 @@ void AlertForm::SetContent(AlertForm::Type type, const QString &msg)
void AlertForm::_Init() void AlertForm::_Init()
{ {
this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint); setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
this->setModal(true); this->setModal(true);
// 初始化Gif动画
m_movie = new QMovie(this);
m_movie->setFileName(":loading.gif");
ui->alertLabIng->setMovie(m_movie);
ui->alertLabIng->setScaledContents(true);
m_movie->start();
ui->alertLabOk->hide(); ui->alertLabOk->hide();
ui->alertLabIng->hide(); ui->alertLabIng->hide();
ui->alertLabError->hide(); ui->alertLabError->hide();
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// 通知窗口 // 通知窗口
#include <QDialog> #include <QDialog>
#include <QMovie>
namespace Ui { namespace Ui {
class AlertForm; class AlertForm;
...@@ -31,6 +32,9 @@ public: ...@@ -31,6 +32,9 @@ public:
private: private:
Ui::AlertForm *ui; Ui::AlertForm *ui;
// 动画对象
QMovie *m_movie;
/* 功能:初始化 /* 功能:初始化
* 参数:NULL * 参数:NULL
* 返回:NULL * 返回:NULL
......
...@@ -31,14 +31,32 @@ ...@@ -31,14 +31,32 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QWidget" name="alertWdg" native="true"> <widget class="QWidget" name="alertWdg" native="true">
<layout class="QVBoxLayout" name="verticalLayout" stretch="2,2,1"> <layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,0">
<property name="spacing"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
<property name="topMargin">
<number>25</number>
</property>
<property name="bottomMargin">
<number>25</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="alertLabError"> <widget class="QLabel" name="alertLabError">
<property name="minimumSize">
<size>
<width>68</width>
<height>68</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>68</width>
<height>68</height>
</size>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
...@@ -46,6 +64,18 @@ ...@@ -46,6 +64,18 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="alertLabOk"> <widget class="QLabel" name="alertLabOk">
<property name="minimumSize">
<size>
<width>68</width>
<height>68</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>68</width>
<height>68</height>
</size>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
...@@ -53,6 +83,18 @@ ...@@ -53,6 +83,18 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="alertLabIng"> <widget class="QLabel" name="alertLabIng">
<property name="minimumSize">
<size>
<width>68</width>
<height>68</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>68</width>
<height>68</height>
</size>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
...@@ -79,8 +121,8 @@ ...@@ -79,8 +121,8 @@
<widget class="QPushButton" name="alertBtnOk"> <widget class="QPushButton" name="alertBtnOk">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>20</width> <width>80</width>
<height>10</height> <height>40</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
......
...@@ -29,17 +29,10 @@ void DbsetForm::_Init() ...@@ -29,17 +29,10 @@ void DbsetForm::_Init()
ConfigManger::SqlConnectInfo info; ConfigManger::SqlConnectInfo info;
info = ConfigManger::GetInstance().GetSqlConnectInfo(); info = ConfigManger::GetInstance().GetSqlConnectInfo();
ui->dbsetLab0->setText(tr("数据库IP:"));
ui->dbsetEdt0->setText(info.host); ui->dbsetEdt0->setText(info.host);
ui->dbsetLab1->setText(tr("用户名:"));
ui->dbsetEdt1->setText(info.username); ui->dbsetEdt1->setText(info.username);
ui->dbsetLab2->setText(tr("密码:"));
ui->dbsetEdt2->setText(info.password); ui->dbsetEdt2->setText(info.password);
ui->dbsetLab3->setText(tr("数据库名:"));
ui->dbsetEdt3->setText(info.database); ui->dbsetEdt3->setText(info.database);
ui->dbsetLabError->setText(tr("请输入正确信息!"));
ui->dbsetBtnOk->setText(tr("连接"));
ui->dbsetBtnCancle->setText(tr("退出"));
ui->dbsetLabError->hide(); ui->dbsetLabError->hide();
ui->dbsetPgb0->hide(); ui->dbsetPgb0->hide();
......
...@@ -35,17 +35,29 @@ ...@@ -35,17 +35,29 @@
<property name="spacing"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
<property name="leftMargin">
<number>25</number>
</property>
<property name="topMargin">
<number>30</number>
</property>
<property name="rightMargin">
<number>25</number>
</property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>20</number> <number>10</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>15</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
<item> <item>
<widget class="QLabel" name="dbsetLab0"> <widget class="QLabel" name="dbsetLab0">
<property name="text"> <property name="text">
<string/> <string>数据库地址:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -53,7 +65,14 @@ ...@@ -53,7 +65,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="dbsetEdt0"/> <widget class="QLineEdit" name="dbsetEdt0">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -62,7 +81,7 @@ ...@@ -62,7 +81,7 @@
<item> <item>
<widget class="QLabel" name="dbsetLab1"> <widget class="QLabel" name="dbsetLab1">
<property name="text"> <property name="text">
<string/> <string>数据库用户:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -70,7 +89,14 @@ ...@@ -70,7 +89,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="dbsetEdt1"/> <widget class="QLineEdit" name="dbsetEdt1">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -79,7 +105,7 @@ ...@@ -79,7 +105,7 @@
<item> <item>
<widget class="QLabel" name="dbsetLab2"> <widget class="QLabel" name="dbsetLab2">
<property name="text"> <property name="text">
<string/> <string>数据库密码:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -87,7 +113,14 @@ ...@@ -87,7 +113,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="dbsetEdt2"/> <widget class="QLineEdit" name="dbsetEdt2">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -96,7 +129,7 @@ ...@@ -96,7 +129,7 @@
<item> <item>
<widget class="QLabel" name="dbsetLab3"> <widget class="QLabel" name="dbsetLab3">
<property name="text"> <property name="text">
<string/> <string>数据库库名:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -104,7 +137,14 @@ ...@@ -104,7 +137,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="dbsetEdt3"/> <widget class="QLineEdit" name="dbsetEdt3">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -117,22 +157,34 @@ ...@@ -117,22 +157,34 @@
</property> </property>
<item> <item>
<widget class="QLabel" name="dbsetLabError"> <widget class="QLabel" name="dbsetLabError">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::WheelFocus</enum> <enum>Qt::WheelFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string/> <string>请输入正确信息!</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QProgressBar" name="dbsetPgb0"> <widget class="QProgressBar" name="dbsetPgb0">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>5</height>
</size>
</property>
<property name="maximum"> <property name="maximum">
<number>0</number> <number>0</number>
</property> </property>
...@@ -166,7 +218,7 @@ ...@@ -166,7 +218,7 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string/> <string>连 接</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -194,7 +246,7 @@ ...@@ -194,7 +246,7 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string/> <string>退 出</string>
</property> </property>
</widget> </widget>
</item> </item>
......
#include "detailForm.h"
#include "ui_detailForm.h"
DetailForm::DetailForm(QWidget *parent) :
QDialog(parent),
ui(new Ui::DetailForm)
{
ui->setupUi(this);
}
DetailForm::~DetailForm()
{
delete ui;
}
#ifndef DETAILFORM_H
#define DETAILFORM_H
#include <QDialog>
namespace Ui {
class DetailForm;
}
class DetailForm : public QDialog
{
Q_OBJECT
public:
explicit DetailForm(QWidget *parent = 0);
~DetailForm();
private:
Ui::DetailForm *ui;
};
#endif // DETAILFORM_H
<ui version="4.0">
<class>DetailForm</class>
<widget class="QDialog" name="DetailForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
</widget>
<resources/>
<connections/>
</ui>
#include "floatForm.h"
#include "ui_floatForm.h"
#include <QPixmap>
#include "DTools/configManger.h"
#include "preDefine.h"
#include "QsLog.h"
FloatForm::FloatForm(QWidget *parent) :
QDialog(parent),
ui(new Ui::FloatForm)
{
ui->setupUi(this);
m_bReminding = false;
QPixmap imgNormal(":float_normal.png");
m_imgNormalSize = imgNormal.size();
QPixmap imgRemind(":float_remind.png");
m_imgRemindSize = imgRemind.size();
m_animation.setTargetObject(this);
m_animation.setPropertyName("windowOpacity");
m_animation.setDuration(ConfigManger::GetInstance().GetBlinkInterval());
m_animation.setEasingCurve(QEasingCurve::InOutSine);
m_raiseTimer.setInterval(2000);
connect(&m_raiseTimer, &QTimer::timeout, this, &FloatForm::raise);
_Init();
}
FloatForm::~FloatForm()
{
delete ui;
}
void FloatForm::mouseMoveEvent(QMouseEvent *event)
{
if ((event->buttons()==Qt::LeftButton) && m_bMousePress)
{
QPoint moveAmount = event->globalPos() - m_lastMousePos;
m_absMove += moveAmount;
move(pos() + moveAmount);
m_lastMousePos = event->globalPos();
m_bMouseMove = true;
}
}
void FloatForm::mousePressEvent(QMouseEvent *event)
{
if (event->button()==Qt::LeftButton)
{
m_bMousePress = true;
m_lastMousePos = event->globalPos();
m_absMove = QPoint(0,0);
}
}
void FloatForm::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button()==Qt::LeftButton)
{
m_bMousePress = false;
}
int x = m_absMove.x();
int y = m_absMove.y();
if(!m_bMouseMove || (((x>-10)&&(x<10))&&((y>-10)&&(y<10))))
{
hide();
m_raiseTimer.stop();
emit showMainForm();
}
m_bMouseMove = false;
ConfigManger::GetInstance().setFloatInitPostion(event->globalPos());
}
void FloatForm::_Init()
{
setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Tool);
setAttribute(Qt::WA_TranslucentBackground);
setFixedSize(m_imgNormalSize);
setStyleSheet("#floatWdg{ border-image: url(:float_normal.png); }");
move(ConfigManger::GetInstance().GetFloatInitPostion());
}
void FloatForm::_Blink()
{
QEventLoop loop;
connect(&m_animation, &QPropertyAnimation::finished, &loop, &QEventLoop::quit);
m_animation.setStartValue(1);
m_animation.setEndValue(0);
m_animation.start();
loop.exec();
this->setFixedSize(m_imgRemindSize);
ui->floatWdg->setStyleSheet("#floatWdg{ border-image: url(:float_remind.png)}");
m_animation.setStartValue(0);
m_animation.setEndValue(1);
m_animation.start();
loop.exec();
m_animation.setStartValue(1);
m_animation.setEndValue(0);
m_animation.start();
loop.exec();
this->setFixedSize(m_imgNormalSize);
ui->floatWdg->setStyleSheet("#floatWdg{ border-image: url(:float_normal.png)}");
m_animation.setStartValue(0);
m_animation.setEndValue(1);
m_animation.start();
loop.exec();
if(m_bReminding)
{
QTimer::singleShot(ConfigManger::GetInstance().GetBlinkInterval(), this, &FloatForm::_Blink);
}
}
void FloatForm::_PlayWav()
{
QSound::play(m_remindWav);
if(m_bReminding)
{
QTimer::singleShot(m_wavPlayInterval, this, &FloatForm::_PlayWav);
}
}
void FloatForm::onStartRemind(int type)
{
switch(type)
{
case 0:
m_remindWav = QString("%1/wav/msg.wav").arg(QApplication::applicationDirPath());
// 加上音频的时长
m_wavPlayInterval = ConfigManger::GetInstance().GetSoundInterval() + VALUE_NEWORDERTIME;
break;
case 1:
m_remindWav = QString("%1/wav/msg1.wav").arg(QApplication::applicationDirPath());
m_wavPlayInterval = ConfigManger::GetInstance().GetSoundInterval() + VALUE_REFUNDORDERTIME;
break;
}
if(m_bReminding)
{
return;
}else
{
m_bReminding = true;
}
_Blink();
_PlayWav();
}
void FloatForm::onStopRemind()
{
m_bReminding = false;
}
void FloatForm::onShow()
{
show();
m_raiseTimer.start();
}
#ifndef FLOATFORM_H
#define FLOATFORM_H
#include <QDialog>
#include <QMouseEvent>
#include <QTimer>
#include <QSize>
#include <QPropertyAnimation>
#include <QSound>
namespace Ui {
class FloatForm;
}
class FloatForm : public QDialog
{
Q_OBJECT
public:
explicit FloatForm(QWidget *parent = 0);
~FloatForm();
protected:
void mouseMoveEvent(QMouseEvent * event);
void mousePressEvent(QMouseEvent * event);
void mouseReleaseEvent(QMouseEvent * event);
private:
Ui::FloatForm *ui;
// 记录左键按下去后是否移动过
bool m_bMouseMove;
// 记录左键是否按下去
bool m_bMousePress;
// 拖动前鼠标坐标
QPoint m_lastMousePos;
// 此次拖动一共移动的距离
QPoint m_absMove;
// 记录正常状态图片的大小
QSize m_imgNormalSize;
// 记录提示状态图片的大小
QSize m_imgRemindSize;
// 记录是否正在提示
bool m_bReminding;
// 闪烁动画
QPropertyAnimation m_animation;
// 记录音频文件
QString m_remindWav;
// 声音的间隔
int m_wavPlayInterval;
// 置顶定时器
QTimer m_raiseTimer;
/* 功能:初始化
* 参数:NULL
* 返回:NULL
* */
void _Init();
private slots:
/* 功能:闪烁
* 参数:NULL
* 返回:NULL
* */
void _Blink();
/* 功能:声音
* 参数:NULL
* 返回:NULL
* */
void _PlayWav();
signals:
/* 功能:通知主窗口显示
* 参数:NULL
* 返回:NULL
* */
void showMainForm();
public slots:
/* 功能:开启提示
* 参数:[1]提示类型 0新订单1申请退款
* 返回:NULL
* */
void onStartRemind(int type);
/* 功能:关闭提示
* 参数:NULL
* 返回:NULL
* */
void onStopRemind();
/* 功能:显示窗口
* 参数:NULL
* 返回:NULL
* */
void onShow();
};
#endif // FLOATFORM_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FloatForm</class>
<widget class="QDialog" name="FloatForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWidget" name="floatWdg" native="true"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
#------------------------------------------------- #-------------------------------------------------
QT += core gui network QT += core gui network printsupport multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
...@@ -29,7 +29,10 @@ SOURCES += main.cpp\ ...@@ -29,7 +29,10 @@ SOURCES += main.cpp\
Model/productObject.cpp \ Model/productObject.cpp \
DTools/util.cpp \ DTools/util.cpp \
Model/cashierObject.cpp \ Model/cashierObject.cpp \
pickForm.cpp pickForm.cpp \
settingForm.cpp \
floatForm.cpp \
detailForm.cpp
HEADERS += \ HEADERS += \
mainForm.h \ mainForm.h \
...@@ -46,12 +49,18 @@ HEADERS += \ ...@@ -46,12 +49,18 @@ HEADERS += \
Model/productObject.h \ Model/productObject.h \
DTools/util.h \ DTools/util.h \
Model/cashierObject.h \ Model/cashierObject.h \
pickForm.h pickForm.h \
settingForm.h \
floatForm.h \
detailForm.h
FORMS += mainForm.ui \ FORMS += mainForm.ui \
alertForm.ui \ alertForm.ui \
dbsetForm.ui \ dbsetForm.ui \
pickForm.ui pickForm.ui \
settingForm.ui \
floatForm.ui \
detailForm.ui
RC_FILE += fmTakeaway.rc RC_FILE += fmTakeaway.rc
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "preDefine.h" #include "preDefine.h"
#include "dbsetForm.h" #include "dbsetForm.h"
#include "Control/flowControl.h" #include "Control/flowControl.h"
#include "floatForm.h"
using namespace QsLogging; using namespace QsLogging;
...@@ -69,7 +70,12 @@ int main(int argc, char *argv[]) ...@@ -69,7 +70,12 @@ int main(int argc, char *argv[])
return -1; return -1;
} }
FloatForm f;
MainForm w; MainForm w;
QObject::connect(&w, &MainForm::showFloatForm, &f, &FloatForm::onShow);
QObject::connect(&w, &MainForm::startRemind, &f, &FloatForm::onStartRemind);
QObject::connect(&w, &MainForm::stopRemind, &f, &FloatForm::onStopRemind);
QObject::connect(&f, &FloatForm::showMainForm, &w, &MainForm::show);
w.MyShow(); w.MyShow();
return a.exec(); return a.exec();
......
...@@ -31,6 +31,7 @@ MainForm::MainForm(QWidget *parent) : ...@@ -31,6 +31,7 @@ MainForm::MainForm(QWidget *parent) :
qRegisterMetaType<AlertForm::Type>("AlertForm::Type"); qRegisterMetaType<AlertForm::Type>("AlertForm::Type");
// 连接信号槽 // 连接信号槽
connect(&m_timeTimer, &QTimer::timeout, this, &MainForm::onSetCurrentTime);
connect(this, &MainForm::flowStart, &FlowControl::GetInstance(), &FlowControl::onFlowStart); connect(this, &MainForm::flowStart, &FlowControl::GetInstance(), &FlowControl::onFlowStart);
connect(this, &MainForm::processOrder, &FlowControl::GetInstance(), &FlowControl::onProcessOrder); connect(this, &MainForm::processOrder, &FlowControl::GetInstance(), &FlowControl::onProcessOrder);
connect(this, &MainForm::getOnDutyCashiers, &FlowControl::GetInstance(), &FlowControl::onGetOnDutyCashiers); connect(this, &MainForm::getOnDutyCashiers, &FlowControl::GetInstance(), &FlowControl::onGetOnDutyCashiers);
...@@ -45,6 +46,9 @@ MainForm::MainForm(QWidget *parent) : ...@@ -45,6 +46,9 @@ MainForm::MainForm(QWidget *parent) :
// 初始化界面 // 初始化界面
_Init(); _Init();
// 开启时间定时器
m_timeTimer.start(1000);
} }
MainForm::~MainForm() MainForm::~MainForm()
...@@ -62,6 +66,8 @@ void MainForm::MyShow() ...@@ -62,6 +66,8 @@ void MainForm::MyShow()
m_pickForm = new PickForm(this); m_pickForm = new PickForm(this);
connect(m_pickForm, &PickForm::updateCashier, this, &MainForm::onUpdateCashier); connect(m_pickForm, &PickForm::updateCashier, this, &MainForm::onUpdateCashier);
m_settingForm = new SettingForm(this);
emit flowStart(); emit flowStart();
return; return;
} }
...@@ -76,8 +82,8 @@ void MainForm::_Init() ...@@ -76,8 +82,8 @@ void MainForm::_Init()
// 初始化表 // 初始化表
int scales6[] = {3, 4, 2, 3, 3, 3}; int scales6[] = {3, 4, 2, 3, 3, 3};
int scales5[] = {3, 6, 2, 3, 4}; int scales5[] = {3, 6, 2, 3, 3};
int tableWidth = this->width() - 70; int tableWidth = this->width() - 75;
foreach(QTableWidget *table, m_tableList) foreach(QTableWidget *table, m_tableList)
{ {
table->hide(); table->hide();
...@@ -95,7 +101,8 @@ void MainForm::_Init() ...@@ -95,7 +101,8 @@ void MainForm::_Init()
table->setColumnWidth(i, tableWidth*scales6[i]/21); table->setColumnWidth(i, tableWidth*scales6[i]/21);
} }
} }
table->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
table->horizontalHeader()->setFixedHeight(30);
} }
// 默认选中【新订单】 // 默认选中【新订单】
...@@ -104,20 +111,29 @@ void MainForm::_Init() ...@@ -104,20 +111,29 @@ void MainForm::_Init()
ui->mainBtnNew->setEnabled(false); ui->mainBtnNew->setEnabled(false);
m_prevBtn = ui->mainBtnNew; m_prevBtn = ui->mainBtnNew;
m_prevTable = ui->mainTableNew; m_prevTable = ui->mainTableNew;
// 门店营业状态详情暂时屏蔽
// TODO
ui->mainBtnOpeDetails->hide();
}
void MainForm::onSetCurrentTime()
{
ui->mainSlabTime->setText(QDateTime::currentDateTime().toString("yyyy年MM月dd日 hh:mm:ss"));
} }
void MainForm::onMainTabBtnClicked() void MainForm::onMainTabBtnClicked()
{ {
_RevertBtnTable(); _RevertBtnTable();
QPushButton *btn = (QPushButton*)sender(); QPushButton *btn = (QPushButton*)sender();
QTableWidget *table = findChild<QTableWidget*>(btn->property("tableName").toString()); m_currentTable = findChild<QTableWidget*>(btn->property("tableName").toString());
table->show(); m_currentTable->show();
btn->setChecked(true); btn->setChecked(true);
btn->setEnabled(false); btn->setEnabled(false);
m_prevBtn = btn; m_prevBtn = btn;
m_prevTable = table; m_prevTable = m_currentTable;
} }
void MainForm::onMainProcBtnClicked() void MainForm::onMainProcBtnClicked()
...@@ -131,6 +147,17 @@ void MainForm::on_mainBtnCashier_clicked() ...@@ -131,6 +147,17 @@ void MainForm::on_mainBtnCashier_clicked()
emit getOnDutyCashiers(); emit getOnDutyCashiers();
} }
void MainForm::on_mainBtnSet_clicked()
{
m_settingForm->show();
}
void MainForm::on_mainBtnHide_clicked()
{
hide();
showFloatForm();
}
void MainForm::onUpdateCashier(const CashierObject &cashier) void MainForm::onUpdateCashier(const CashierObject &cashier)
{ {
ui->mainLabCashier->setText(cashier.name); ui->mainLabCashier->setText(cashier.name);
...@@ -255,6 +282,8 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus) ...@@ -255,6 +282,8 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus)
QWidget *pWdg = new QWidget(table); QWidget *pWdg = new QWidget(table);
QHBoxLayout *hLayout = new QHBoxLayout(pWdg); QHBoxLayout *hLayout = new QHBoxLayout(pWdg);
QPushButton * pBtn = new QPushButton(pWdg); QPushButton * pBtn = new QPushButton(pWdg);
QPixmap btnImg(":btnCommon_normal.png");
pBtn->setFixedSize(btnImg.size());
pBtn->setFocusPolicy(Qt::NoFocus); pBtn->setFocusPolicy(Qt::NoFocus);
pBtn->setObjectName("mainProcBtn"); pBtn->setObjectName("mainProcBtn");
pBtn->setProperty("orderId", orderObject->order_id); pBtn->setProperty("orderId", orderObject->order_id);
...@@ -271,6 +300,18 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus) ...@@ -271,6 +300,18 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus)
QString btnText = QString("%1(%2)").arg(tabBtn->property("name").toString()).arg(table->rowCount()); QString btnText = QString("%1(%2)").arg(tabBtn->property("name").toString()).arg(table->rowCount());
tabBtn->setText(btnText); tabBtn->setText(btnText);
// 检测是否需要提示
if(ui->mainTableNew->rowCount() > 0)
{
emit startRemind(0);
}else if(ui->mainTableRefund->rowCount() > 0)
{
emit startRemind(1);
}else
{
emit stopRemind();
}
_SetTablesSortEnable(true); _SetTablesSortEnable(true);
} }
...@@ -285,3 +326,13 @@ void MainForm::onShowCashierPickForm(const QList<CashierObject> &cashiers) ...@@ -285,3 +326,13 @@ void MainForm::onShowCashierPickForm(const QList<CashierObject> &cashiers)
m_pickForm->SetCashiersInfo(cashiers); m_pickForm->SetCashiersInfo(cashiers);
m_pickForm->show(); m_pickForm->show();
} }
void MainForm::on_mainBtnUp_clicked()
{
m_currentTable->scrollToTop();
}
void MainForm::on_mainBtnDown_clicked()
{
m_currentTable->scrollToBottom();
}
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include "Model/orderObject.h" #include "Model/orderObject.h"
#include "Model/deliverObject.h" #include "Model/deliverObject.h"
#include "pickForm.h" #include "pickForm.h"
#include "settingForm.h"
#include <QTimer>
namespace Ui { namespace Ui {
class MainForm; class MainForm;
...@@ -28,6 +30,8 @@ public: ...@@ -28,6 +30,8 @@ public:
private: private:
Ui::MainForm *ui; Ui::MainForm *ui;
// 时间定时器
QTimer m_timeTimer;
// 记录上一次选中的表单和按钮 // 记录上一次选中的表单和按钮
QPushButton *m_prevBtn; QPushButton *m_prevBtn;
...@@ -40,6 +44,11 @@ private: ...@@ -40,6 +44,11 @@ private:
AlertForm *m_alertForm; AlertForm *m_alertForm;
// 人员选择窗口 // 人员选择窗口
PickForm *m_pickForm; PickForm *m_pickForm;
// 设置窗口
SettingForm *m_settingForm;
// 当前选中的表
QTableWidget *m_currentTable;
/* 功能:还原按钮和表 /* 功能:还原按钮和表
* 参数:NULL * 参数:NULL
...@@ -73,6 +82,21 @@ signals: ...@@ -73,6 +82,21 @@ signals:
* 返回:NULL * 返回:NULL
* */ * */
void getOnDutyCashiers(); void getOnDutyCashiers();
/* 功能:通知悬浮窗显示
* 参数:NULL
* 返回:NULL
* */
void showFloatForm();
/* 功能:开始提示
* 参数:[1]提示类型 0新订单1退款申请
* 返回:NULL
* */
void startRemind(int type);
/* 功能:停止提示
* 参数:NULL
* 返回:NULL
* */
void stopRemind();
private slots: private slots:
/* 功能:初始化 /* 功能:初始化
...@@ -80,6 +104,11 @@ private slots: ...@@ -80,6 +104,11 @@ private slots:
* 返回:NULL * 返回:NULL
* */ * */
void _Init(); void _Init();
/* 功能:设置当前时间
* 参数:NULL
* 返回:NULL
* */
void onSetCurrentTime();
/* 功能:Tab页按钮点击对应动作 /* 功能:Tab页按钮点击对应动作
* 参数:NULL * 参数:NULL
* 返回:NULL * 返回:NULL
...@@ -95,6 +124,26 @@ private slots: ...@@ -95,6 +124,26 @@ private slots:
* 返回:NULL * 返回:NULL
* */ * */
void on_mainBtnCashier_clicked(); void on_mainBtnCashier_clicked();
/* 功能:设置按钮对应动作
* 参数:NULL
* 返回:NULL
* */
void on_mainBtnSet_clicked();
/* 功能:隐藏按钮对应动作
* 参数:NULL
* 返回:NULL
* */
void on_mainBtnHide_clicked();
/* 功能:上翻按钮对应动作
* 参数:NULL
* 返回:NULL
* */
void on_mainBtnUp_clicked();
/* 功能:下翻按钮对应动作
* 参数:NULL
* 返回:NULL
* */
void on_mainBtnDown_clicked();
public slots: public slots:
/* 功能:隐藏通知窗口 /* 功能:隐藏通知窗口
......
...@@ -69,6 +69,7 @@ void PickForm::_Init() ...@@ -69,6 +69,7 @@ void PickForm::_Init()
{ {
setWindowFlags(windowFlags()|Qt::FramelessWindowHint); setWindowFlags(windowFlags()|Qt::FramelessWindowHint);
setGeometry(((QWidget*)parent())->geometry()); setGeometry(((QWidget*)parent())->geometry());
setAttribute(Qt::WA_TranslucentBackground);
setModal(true); setModal(true);
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <QDebug> #include <QDebug>
#define APP_THEME "deaufult" #define APP_THEME "deaufult"
#define APP_VERSION "1.20160802.01" #define APP_VERSION "1.20160802.01" //TODO
#define SERVER_PASSWORD "posoperator@freemud.cn" #define SERVER_PASSWORD "posoperator@freemud.cn"
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
#define INI_PASSWORD "SqlServer/password" #define INI_PASSWORD "SqlServer/password"
#define INI_DATABASE "SqlServer/database" #define INI_DATABASE "SqlServer/database"
#define INI_SERVER "FmServer/url" #define INI_SERVER "FmServer/url"
#define INI_PRINTERNAME "Printer/name"
#define INI_FLOATPOSTION "Float/postion"
#define INI_FLOATOPACITY "Float/opacity"
#define INI_BLINKINTERVAL "Float/blinkInterval"
#define INI_SOUNDINTERVAL "Float/soundInterval"
#define JSON_REQTYPE "reqtype" #define JSON_REQTYPE "reqtype"
#define JSON_CURRENTUSER "current_user" #define JSON_CURRENTUSER "current_user"
...@@ -72,6 +77,10 @@ ...@@ -72,6 +77,10 @@
#define VALUE_NETTIMEOUT 10000 #define VALUE_NETTIMEOUT 10000
// 默认重新尝试登录的时间 // 默认重新尝试登录的时间
#define VALUE_RELOGINTIME 20000 #define VALUE_RELOGINTIME 20000
// 新订单提示音音频时长
#define VALUE_NEWORDERTIME 3000 //TODO
// 需退款提示音音频时长
#define VALUE_REFUNDORDERTIME 5000 //TODO
// 拒绝退款理由 // 拒绝退款理由
#define VALUE_REFUSEREFUND_REASON "拒绝退款" #define VALUE_REFUSEREFUND_REASON "拒绝退款"
......
#include "settingForm.h"
#include "ui_settingForm.h"
#include "preDefine.h"
#include "DTools/configManger.h"
#include <QPrinterInfo>
#include <QSound>
SettingForm::SettingForm(QWidget *parent) :
QDialog(parent),
ui(new Ui::SettingForm)
{
ui->setupUi(this);
// 初始化打印机选项
QString printer = ConfigManger::GetInstance().GetPrinterName();
QStringList printerList = QPrinterInfo::availablePrinterNames();
for(int i=0; i<printerList.count(); i++)
{
QString name = printerList[i];
ui->settingCbxPrinter->addItem(name);
if(!name.compare(printer))
{
ui->settingCbxPrinter->setCurrentIndex(i);
}
}
_Init();
}
SettingForm::~SettingForm()
{
delete ui;
}
void SettingForm::_Init()
{
setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
setModal(true);
}
void SettingForm::on_settingCbxPrinter_currentIndexChanged(const QString &text)
{
ConfigManger::GetInstance().SetPrinterName(text);
}
void SettingForm::on_settingBtnPrintTest_clicked()
{
}
void SettingForm::on_settingBtnSoundTest_clicked()
{
QSound::play(QString("%1/wav/msg.wav").arg(QApplication::applicationDirPath()));
}
#ifndef SETTINGFORM_H
#define SETTINGFORM_H
#include <QDialog>
namespace Ui {
class SettingForm;
}
class SettingForm : public QDialog
{
Q_OBJECT
public:
explicit SettingForm(QWidget *parent = 0);
~SettingForm();
private:
Ui::SettingForm *ui;
/* 功能:初始化
* 参数:NULL
* 返回:NULL
* */
void _Init();
private slots:
/* 功能:处理打印机选择
* 参数:NULL
* 返回:NULL
* */
void on_settingCbxPrinter_currentIndexChanged(const QString &text);
/* 功能:处理打印测试按钮点击
* 参数:NULL
* 返回:NULL
* */
void on_settingBtnPrintTest_clicked();
/* 功能:处理声音测试按钮点击
* 参数:NULL
* 返回:NULL
* */
void on_settingBtnSoundTest_clicked();
};
#endif // SETTINGFORM_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingForm</class>
<widget class="QDialog" name="SettingForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>335</width>
<height>250</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWidget" name="settingWdg" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>20</number>
</property>
<property name="leftMargin">
<number>15</number>
</property>
<property name="topMargin">
<number>30</number>
</property>
<property name="rightMargin">
<number>15</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
<property name="spacing">
<number>15</number>
</property>
<item>
<widget class="QLabel" name="settingSlabPrinter">
<property name="text">
<string>打印机:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="settingCbxPrinter">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_5">
<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="settingBtnPrintTest">
<property name="minimumSize">
<size>
<width>90</width>
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>打印测试</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<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="settingBtnSoundTest">
<property name="minimumSize">
<size>
<width>90</width>
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>声音测试</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<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>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>20</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<item>
<widget class="QPushButton" name="settingBtnOk">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>确 定</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>settingBtnOk</sender>
<signal>clicked()</signal>
<receiver>SettingForm</receiver>
<slot>hide()</slot>
<hints>
<hint type="sourcelabel">
<x>417</x>
<y>355</y>
</hint>
<hint type="destinationlabel">
<x>420</x>
<y>563</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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