Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmTakeaway
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shangshang.dai
FmTakeaway
Commits
e7c71abe
Commit
e7c71abe
authored
Oct 12, 2016
by
ss.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单店测试修改
parent
ef4b7163
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
7 deletions
+20
-7
fmPlugin/fmPlugin.cpp
+1
-0
fmTakeaway/floatForm.cpp
+6
-2
fmTakeaway/main.cpp
+3
-2
fmTakeaway/mainForm.cpp
+9
-2
fmTakeaway/preDefine.h
+1
-1
No files found.
fmPlugin/fmPlugin.cpp
View file @
e7c71abe
...
...
@@ -27,6 +27,7 @@ void FmPlugin::SetRemoteInfo(const QString &ip, int port)
bool
FmPlugin
::
DoOrderEntry
(
const
OrderObject
*
orderObject
,
QString
&
error
,
bool
bVerify
)
{
return
true
;
QTcpSocket
socket
;
// 连接
socket
.
connectToHost
(
m_host
,
m_port
);
...
...
fmTakeaway/floatForm.cpp
View file @
e7c71abe
...
...
@@ -25,7 +25,7 @@ FloatForm::FloatForm(QWidget *parent) :
m_raiseTimer
.
setInterval
(
2000
);
connect
(
&
m_raiseTimer
,
&
QTimer
::
timeout
,
this
,
&
FloatForm
::
raise
);
connect
(
&
m_mouseTimer
,
&
QTimer
::
timeout
,
this
,
&
FloatForm
::
restart
);
//
connect(&m_mouseTimer, &QTimer::timeout, this, &FloatForm::restart);
_Init
();
}
...
...
@@ -53,7 +53,11 @@ void FloatForm::mousePressEvent(QMouseEvent *event)
m_bMousePress
=
true
;
m_lastMousePos
=
event
->
globalPos
();
m_absMove
=
QPoint
(
0
,
0
);
m_mouseTimer
.
start
(
5000
);
//m_mouseTimer.start(5000);
}
if
(
event
->
button
()
==
Qt
::
RightButton
)
{
emit
restart
();
}
}
...
...
fmTakeaway/main.cpp
View file @
e7c71abe
...
...
@@ -15,6 +15,9 @@ using namespace QsLogging;
QString
g_appDir
;
QThread
sInfoThread
;
QThread
workThread
;
void
InitLogger
()
{
QString
logDir
=
QString
(
"%1/log"
).
arg
(
g_appDir
);
...
...
@@ -69,7 +72,6 @@ int main(int argc, char *argv[])
QLOG_INFO
()
<<
QString
(
"-------- fmTakeaway[%1] Start --------"
).
arg
(
APP_VERSION
);
// 将控制器移到工作线程
QThread
workThread
;
FlowControl
::
GetInstance
().
moveToThread
(
&
workThread
);
workThread
.
start
();
...
...
@@ -83,7 +85,6 @@ int main(int argc, char *argv[])
w
.
MyShow
();
// 将门店信息获取控制器移到工作线程
QThread
sInfoThread
;
SInfoControl
::
GetInstance
().
SetListenPort
(
ConfigManger
::
GetInstance
().
GetTcpServerPort
());
SInfoControl
::
GetInstance
().
moveToThread
(
&
sInfoThread
);
QObject
::
connect
(
&
sInfoThread
,
&
QThread
::
started
,
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
run
);
...
...
fmTakeaway/mainForm.cpp
View file @
e7c71abe
...
...
@@ -8,6 +8,10 @@
#include <QList>
#include <QMap>
#include <QProcess>
#include <QThread>
extern
QThread
sInfoThread
;
extern
QThread
workThread
;
MainForm
::
MainForm
(
QWidget
*
parent
)
:
QWidget
(
parent
),
...
...
@@ -90,7 +94,7 @@ void MainForm::MyShow()
m_resultForm
->
hide
();
connect
(
m_resultForm
,
&
QListWidget
::
itemClicked
,
this
,
&
MainForm
::
onSearchResultItemClicked
);
on_mainBtnHide_clicked
();
//
on_mainBtnHide_clicked();
return
;
}
...
...
@@ -98,6 +102,7 @@ void MainForm::MyShow()
void
MainForm
::
_Init
()
{
this
->
setWindowFlags
(
this
->
windowFlags
()
|
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
);
//this->showFullScreen();
// 显示托盘
m_tray
.
show
();
...
...
@@ -213,7 +218,9 @@ void MainForm::onShowSearchOrderResult(const QMap<QString,QString>& orderIdList)
void
MainForm
::
onrestart
()
{
qApp
->
quit
();
sInfoThread
.
terminate
();
workThread
.
terminate
();
qApp
->
exit
();
QProcess
::
startDetached
(
qApp
->
applicationFilePath
(),
QStringList
());
}
...
...
fmTakeaway/preDefine.h
View file @
e7c71abe
...
...
@@ -4,7 +4,7 @@
#include <QDebug>
#define APP_THEME "deaufult"
#define APP_VERSION "1.20160
802
.01" //TODO
#define APP_VERSION "1.20160
923
.01" //TODO
#define SERVER_PASSWORD "posoperator@freemud.cn"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment