Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmtakeout
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
李定达
fmtakeout
Commits
6ea54e48
Commit
6ea54e48
authored
Oct 30, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.悬浮窗拖动范围限制;2.部分日志降级为debug;3.o2o打印模板丰富逻辑添加
parent
977e83b5
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
117 additions
and
33 deletions
+117
-33
takeout/base/DB/fm_database.cpp
+8
-8
takeout/base/Print/printDocument.cpp
+1
-1
takeout/base/Print/printlib.cpp
+8
-1
takeout/control/ordergetwork.cpp
+1
-1
takeout/control/ordergetwork.h
+1
-0
takeout/control/orderlocalizework.cpp
+5
-5
takeout/control/orderprintwork.cpp
+41
-1
takeout/control/orderpushwork.cpp
+6
-6
takeout/main.cpp
+1
-1
takeout/model/posorderpool.cpp
+1
-1
takeout/preDefine.h
+4
-0
takeout/takeout.rc
+4
-4
takeout/view/floatForm.cpp
+32
-1
takeout/view/floatForm.h
+1
-0
takeout/view/floatForm.ui
+3
-3
No files found.
takeout/base/DB/fm_database.cpp
View file @
6ea54e48
...
@@ -47,7 +47,7 @@ bool FMDataBase::creat(QString sql, QString tablename)
...
@@ -47,7 +47,7 @@ bool FMDataBase::creat(QString sql, QString tablename)
bool
flag
=
query
.
exec
(
sql
);
bool
flag
=
query
.
exec
(
sql
);
if
(
!
flag
)
if
(
!
flag
)
QLOG_
INFO
()
<<
query
.
lastError
();
QLOG_
ERROR
()
<<
query
.
lastError
();
return
flag
;
return
flag
;
}
}
...
@@ -64,7 +64,7 @@ bool FMDataBase::dlt(QString table, QString condition)
...
@@ -64,7 +64,7 @@ bool FMDataBase::dlt(QString table, QString condition)
bool
flag
=
query
.
exec
(
sql
);
bool
flag
=
query
.
exec
(
sql
);
if
(
!
flag
)
if
(
!
flag
)
QLOG_
INFO
()
<<
query
.
lastError
();
QLOG_
ERROR
()
<<
query
.
lastError
();
return
flag
;
return
flag
;
}
}
...
@@ -88,12 +88,12 @@ bool FMDataBase::insert(QString table, QVariantHash data)
...
@@ -88,12 +88,12 @@ bool FMDataBase::insert(QString table, QVariantHash data)
sql
=
QString
(
"insert into %1 ("
).
arg
(
table
)
+
columnnamelist
.
join
(
", "
)
+
") values ("
+
columnvaluelist
.
join
(
", "
)
+
")"
;
sql
=
QString
(
"insert into %1 ("
).
arg
(
table
)
+
columnnamelist
.
join
(
", "
)
+
") values ("
+
columnvaluelist
.
join
(
", "
)
+
")"
;
QLOG_
INFO
()
<<
"inset sql : "
<<
sql
;
QLOG_
DEBUG
()
<<
"inset sql : "
<<
sql
;
bool
flag
=
query
.
exec
(
sql
);
bool
flag
=
query
.
exec
(
sql
);
if
(
!
flag
)
if
(
!
flag
)
QLOG_
INFO
()
<<
query
.
lastError
();
QLOG_
ERROR
()
<<
query
.
lastError
();
return
flag
;
return
flag
;
}
}
...
@@ -115,12 +115,12 @@ bool FMDataBase::update(QString table, QVariantHash data, QString condition)
...
@@ -115,12 +115,12 @@ bool FMDataBase::update(QString table, QVariantHash data, QString condition)
sql
=
QString
(
"update %1 set "
).
arg
(
table
)
+
sql
+
" where "
+
condition
;
sql
=
QString
(
"update %1 set "
).
arg
(
table
)
+
sql
+
" where "
+
condition
;
QLOG_
INFO
()
<<
"update sql : "
<<
sql
;
QLOG_
DEBUG
()
<<
"update sql : "
<<
sql
;
bool
flag
=
query
.
exec
(
sql
);
bool
flag
=
query
.
exec
(
sql
);
if
(
!
flag
)
if
(
!
flag
)
QLOG_
INFO
()
<<
query
.
lastError
();
QLOG_
ERROR
()
<<
query
.
lastError
();
return
flag
;
return
flag
;
}
}
...
@@ -143,12 +143,12 @@ bool FMDataBase::find(QString table, QSqlQuery &query, QStringList keylist, QStr
...
@@ -143,12 +143,12 @@ bool FMDataBase::find(QString table, QSqlQuery &query, QStringList keylist, QStr
sql
+=
QString
(
" from %1 where "
).
arg
(
table
)
+
condition
;
sql
+=
QString
(
" from %1 where "
).
arg
(
table
)
+
condition
;
QLOG_
INFO
()
<<
"find sql : "
<<
sql
;
QLOG_
DEBUG
()
<<
"find sql : "
<<
sql
;
bool
flag
=
tmpquery
.
exec
(
sql
);
bool
flag
=
tmpquery
.
exec
(
sql
);
if
(
!
flag
)
if
(
!
flag
)
QLOG_
INFO
()
<<
tmpquery
.
lastError
();
QLOG_
ERROR
()
<<
tmpquery
.
lastError
();
query
=
tmpquery
;
query
=
tmpquery
;
...
...
takeout/base/Print/printDocument.cpp
View file @
6ea54e48
...
@@ -76,7 +76,7 @@ PrintDocument PrintDocument::ParseToDocument(const QString &content, bool &resul
...
@@ -76,7 +76,7 @@ PrintDocument PrintDocument::ParseToDocument(const QString &content, bool &resul
{
{
result
=
false
;
result
=
false
;
error
=
"lock of '<' or '>'"
;
error
=
"lock of '<' or '>'"
;
qDebug
()
<<
index
<<
"----------------------------------------"
;
//
qDebug()<<index<<"----------------------------------------";
return
PrintDocument
();
return
PrintDocument
();
}
}
}
}
...
...
takeout/base/Print/printlib.cpp
View file @
6ea54e48
...
@@ -100,7 +100,8 @@ void PrintLib::_PrintLab( OrderObject* order)
...
@@ -100,7 +100,8 @@ void PrintLib::_PrintLab( OrderObject* order)
QString
title
=
QString
(
" %2 %4/%5"
).
arg
(
datetime
,
QString
::
number
(
++
index
),
QString
::
number
(
allprod
));
QString
title
=
QString
(
" %2 %4/%5"
).
arg
(
datetime
,
QString
::
number
(
++
index
),
QString
::
number
(
allprod
));
QString
tmptitle
;
QString
tmptitle
;
if
(
QString
(
"saas"
).
compare
(
order
->
channel
)
==
0
)
{
if
(
order
->
order_type
==
3
||
order
->
order_type
==
4
||
order
->
order_type
==
5
)
if
(
order
->
order_type
==
3
||
order
->
order_type
==
4
||
order
->
order_type
==
5
)
{
{
tmptitle
=
QString
(
"
\xE9\x9D\x9E\xE7\xA0\x81\xE8\x87\xAA\xE6\x8F\x90
"
).
append
(
order
->
code
).
append
(
" "
).
append
(
title
);
tmptitle
=
QString
(
"
\xE9\x9D\x9E\xE7\xA0\x81\xE8\x87\xAA\xE6\x8F\x90
"
).
append
(
order
->
code
).
append
(
" "
).
append
(
title
);
...
@@ -113,6 +114,12 @@ void PrintLib::_PrintLab( OrderObject* order)
...
@@ -113,6 +114,12 @@ void PrintLib::_PrintLab( OrderObject* order)
{
{
tmptitle
=
QString
(
"
\xE9\x9D\x9E\xE7\xA0\x81\xE5\xA4\x96\xE5\x8D\x96
"
).
append
(
QString
::
number
(
order
->
order_index
)).
append
(
" "
).
append
(
title
);
tmptitle
=
QString
(
"
\xE9\x9D\x9E\xE7\xA0\x81\xE5\xA4\x96\xE5\x8D\x96
"
).
append
(
QString
::
number
(
order
->
order_index
)).
append
(
" "
).
append
(
title
);
}
}
}
else
{
QString
tmpstr
=
order
->
channel_name
;
tmptitle
=
tmpstr
.
append
(
QString
::
number
(
order
->
order_index
)).
append
(
" "
).
append
(
title
);;
}
QString
prodname
=
dish
->
name
;
QString
prodname
=
dish
->
name
;
...
...
takeout/control/ordergetwork.cpp
View file @
6ea54e48
...
@@ -513,7 +513,7 @@ void OrderGetWork::optOrder(const QJsonArray &orders)
...
@@ -513,7 +513,7 @@ void OrderGetWork::optOrder(const QJsonArray &orders)
if
(
_storeinfo
.
contains
(
LOGIN_STORE_PHONE
))
if
(
_storeinfo
.
contains
(
LOGIN_STORE_PHONE
))
orderObject
.
setStore_phone
(
_storeinfo
[
LOGIN_STORE_PHONE
].
toString
());
orderObject
.
setStore_phone
(
_storeinfo
[
LOGIN_STORE_PHONE
].
toString
());
QLOG_
INFO
()
<<
"----------------------------:"
<<
orderObject
.
delivery_time
;
QLOG_
DEBUG
()
<<
"----------------------------:"
<<
orderObject
.
delivery_time
;
//PosOrderPool::TryInsertOrder(orderObject);
//PosOrderPool::TryInsertOrder(orderObject);
POSTEVENTTYPE
(
PosEvent
::
s_inset_orderpool
,
orderObject
,
OrderObject
);
POSTEVENTTYPE
(
PosEvent
::
s_inset_orderpool
,
orderObject
,
OrderObject
);
...
...
takeout/control/ordergetwork.h
View file @
6ea54e48
...
@@ -204,6 +204,7 @@ private:
...
@@ -204,6 +204,7 @@ private:
data
.
insert
(
JSON_KEY_TIMESTAMP
,
timestamp
);
data
.
insert
(
JSON_KEY_TIMESTAMP
,
timestamp
);
//data.insert(JSON_KEY_TIMESTAMP, 0);
//data.insert(JSON_KEY_TIMESTAMP, 0);
data
.
insert
(
JSON_KEY_AUTOCONFIRM
,
autoconfirm
);
data
.
insert
(
JSON_KEY_AUTOCONFIRM
,
autoconfirm
);
data
.
insert
(
JSON_KEY_STOREUNIFYID
,
json
[
JSON_KEY_UNIFYID
].
toString
());
return
true
;
return
true
;
}
}
...
...
takeout/control/orderlocalizework.cpp
View file @
6ea54e48
...
@@ -77,7 +77,7 @@ void OrderLocalizeWork::deleteOrder(QString orderid)
...
@@ -77,7 +77,7 @@ void OrderLocalizeWork::deleteOrder(QString orderid)
else
else
{
{
bool
flag
=
db
.
dlt
(
DEFAULT_DBFORM
,
QString
(
DB_KEY_ORDERID
).
append
(
"='%1'"
).
arg
(
orderid
));
bool
flag
=
db
.
dlt
(
DEFAULT_DBFORM
,
QString
(
DB_KEY_ORDERID
).
append
(
"='%1'"
).
arg
(
orderid
));
QLOG_
INFO
()
<<
"delete order : "
<<
orderid
<<
"("
<<
flag
<<
")"
;
QLOG_
DEBUG
()
<<
"delete order : "
<<
orderid
<<
"("
<<
flag
<<
")"
;
}
}
}
}
...
@@ -103,16 +103,16 @@ void OrderLocalizeWork::otpOrder(QString orderid)
...
@@ -103,16 +103,16 @@ void OrderLocalizeWork::otpOrder(QString orderid)
if
(
!
query
.
next
())
if
(
!
query
.
next
())
{
{
QLOG_
INFO
()
<<
"insert new order"
<<
hash
;
QLOG_
DEBUG
()
<<
"insert new order"
<<
hash
;
bool
flag
=
db
.
insert
(
DEFAULT_DBFORM
,
hash
);
bool
flag
=
db
.
insert
(
DEFAULT_DBFORM
,
hash
);
QLOG_
WARN
()
<<
"insert new order : "
<<
orderid
<<
"("
<<
flag
<<
")"
;
QLOG_
DEBUG
()
<<
"insert new order : "
<<
orderid
<<
"("
<<
flag
<<
")"
;
}
}
else
else
{
{
//订单最后改变时间要同步到db
//订单最后改变时间要同步到db
QLOG_
INFO
()
<<
"update order"
<<
hash
;
QLOG_
DEBUG
()
<<
"update order"
<<
hash
;
bool
flag
=
db
.
update
(
DEFAULT_DBFORM
,
hash
,
QString
(
DB_KEY_ORDERID
).
append
(
"='%1'"
).
arg
(
orderid
));
bool
flag
=
db
.
update
(
DEFAULT_DBFORM
,
hash
,
QString
(
DB_KEY_ORDERID
).
append
(
"='%1'"
).
arg
(
orderid
));
QLOG_
WARN
()
<<
"update order : "
<<
orderid
<<
"("
<<
flag
<<
")"
;
QLOG_
DEBUG
()
<<
"update order : "
<<
orderid
<<
"("
<<
flag
<<
")"
;
}
}
}
}
takeout/control/orderprintwork.cpp
View file @
6ea54e48
...
@@ -56,6 +56,8 @@ bool orderprintwork::event(QEvent *e)
...
@@ -56,6 +56,8 @@ bool orderprintwork::event(QEvent *e)
int
prtwi
=
QSettings
(
prtinifile
,
QSettings
::
IniFormat
).
value
(
"Printer/PaperWidth"
,
0
).
toInt
();
int
prtwi
=
QSettings
(
prtinifile
,
QSettings
::
IniFormat
).
value
(
"Printer/PaperWidth"
,
0
).
toInt
();
if
(
QString
(
"saas"
).
compare
(
order
.
channel
,
Qt
::
CaseInsensitive
)
==
0
)
{
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
{
{
if
(
prtwi
<=
56
)
if
(
prtwi
<=
56
)
...
@@ -77,6 +79,25 @@ bool orderprintwork::event(QEvent *e)
...
@@ -77,6 +79,25 @@ bool orderprintwork::event(QEvent *e)
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
}
}
}
else
{
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
{
if
(
prtwi
<=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2O_TEMPLET
);
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2O80_TEMPLET
);
}
else
{
if
(
prtwi
<=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2OZZ_TEMPLET
);
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2OZZ80_TEMPLET
);
}
}
qDebug
()
<<
"+++++++++++++++++++++++++++"
<<
file
.
fileName
();
qDebug
()
<<
"+++++++++++++++++++++++++++"
<<
file
.
fileName
();
...
@@ -163,7 +184,8 @@ bool orderprintwork::event(QEvent *e)
...
@@ -163,7 +184,8 @@ bool orderprintwork::event(QEvent *e)
QFile
file
;
QFile
file
;
int
othprtw
=
QSettings
(
prtinifile
,
QSettings
::
IniFormat
).
value
(
"OtherPrinter/PaperWidth"
,
0
).
toInt
();
int
othprtw
=
QSettings
(
prtinifile
,
QSettings
::
IniFormat
).
value
(
"OtherPrinter/PaperWidth"
,
0
).
toInt
();
if
(
QString
(
"saas"
).
compare
(
order
.
channel
,
Qt
::
CaseInsensitive
)
==
0
)
{
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
{
{
if
(
othprtw
<=
56
)
if
(
othprtw
<=
56
)
...
@@ -185,6 +207,24 @@ bool orderprintwork::event(QEvent *e)
...
@@ -185,6 +207,24 @@ bool orderprintwork::event(QEvent *e)
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
}
}
}
else
{
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
{
if
(
prtwi
<=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2O_TEMPLET
);
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2O80_TEMPLET
);
}
else
{
if
(
prtwi
<=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2OZZ_TEMPLET
);
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTO2OZZ80_TEMPLET
);
}
}
qDebug
()
<<
"+++++++++++++++++++++++++++"
<<
file
.
fileName
();
qDebug
()
<<
"+++++++++++++++++++++++++++"
<<
file
.
fileName
();
...
...
takeout/control/orderpushwork.cpp
View file @
6ea54e48
...
@@ -129,7 +129,7 @@ bool OrderPushWork::connectTcpServer()
...
@@ -129,7 +129,7 @@ bool OrderPushWork::connectTcpServer()
_socket
->
addCaCertificates
(
qApp
->
applicationDirPath
()
+
"/"
+
"microwstest.sandload.cn.pem"
);
_socket
->
addCaCertificates
(
qApp
->
applicationDirPath
()
+
"/"
+
"microwstest.sandload.cn.pem"
);
QLOG_
INFO
()
<<
_socket
->
errorString
();
QLOG_
WARN
()
<<
_socket
->
errorString
();
_socket
->
ignoreSslErrors
();
_socket
->
ignoreSslErrors
();
...
@@ -138,7 +138,7 @@ bool OrderPushWork::connectTcpServer()
...
@@ -138,7 +138,7 @@ bool OrderPushWork::connectTcpServer()
_socket
->
setSslConfiguration
(
config
);
_socket
->
setSslConfiguration
(
config
);
QLOG_
INFO
()
<<
_socket
->
errorString
();
QLOG_
WARN
()
<<
_socket
->
errorString
();
_istimeout
=
true
;
_istimeout
=
true
;
...
@@ -158,7 +158,7 @@ bool OrderPushWork::connectTcpServer()
...
@@ -158,7 +158,7 @@ bool OrderPushWork::connectTcpServer()
loop
.
exec
();
loop
.
exec
();
}
}
QLOG_
INFO
()
<<
_socket
->
errorString
()
<<
_istimeout
;
QLOG_
WARN
()
<<
_socket
->
errorString
()
<<
_istimeout
;
return
!
_istimeout
;
return
!
_istimeout
;
}
}
...
@@ -225,7 +225,7 @@ bool OrderPushWork::loginTcpServer()
...
@@ -225,7 +225,7 @@ bool OrderPushWork::loginTcpServer()
QByteArray
head
=
_socket
->
read
(
sizeof
(
Data_Head
));
QByteArray
head
=
_socket
->
read
(
sizeof
(
Data_Head
));
QLOG_
INFO
()
<<
head
.
toHex
();
QLOG_
DEBUG
()
<<
head
.
toHex
();
quint32
len
=
0
;
quint32
len
=
0
;
int
cmd
=
-
1
;
int
cmd
=
-
1
;
...
@@ -291,9 +291,9 @@ void OrderPushWork::heartBeatTcpService()
...
@@ -291,9 +291,9 @@ void OrderPushWork::heartBeatTcpService()
continue
;
continue
;
}
}
QLOG_
INFO
()
<<
"tmplenandsynSeq : "
<<
tmplenandsynSeq
;
QLOG_
DEBUG
()
<<
"tmplenandsynSeq : "
<<
tmplenandsynSeq
;
QLOG_
INFO
()
<<
"cmd : "
<<
cmd
;
QLOG_
DEBUG
()
<<
"cmd : "
<<
cmd
;
if
(
cmd
==
COMMAND_HEARDBEAT
)
if
(
cmd
==
COMMAND_HEARDBEAT
)
{
{
...
...
takeout/main.cpp
View file @
6ea54e48
...
@@ -232,7 +232,7 @@ void InitLog()
...
@@ -232,7 +232,7 @@ void InitLog()
QDir
().
mkdir
(
logDir
);
QDir
().
mkdir
(
logDir
);
QsLogging
::
Logger
&
logger
=
QsLogging
::
Logger
::
instance
();
QsLogging
::
Logger
&
logger
=
QsLogging
::
Logger
::
instance
();
logger
.
setLoggingLevel
(
QsLogging
::
Debug
Level
);
logger
.
setLoggingLevel
(
QsLogging
::
Info
Level
);
QString
logPath
=
QString
(
"%1/%2"
).
arg
(
logDir
,
"takeout.log"
);
QString
logPath
=
QString
(
"%1/%2"
).
arg
(
logDir
,
"takeout.log"
);
QsLogging
::
DestinationPtr
fileDst
(
QsLogging
::
DestinationFactory
::
MakeFileDestination
(
QsLogging
::
DestinationPtr
fileDst
(
QsLogging
::
DestinationFactory
::
MakeFileDestination
(
logPath
,
QsLogging
::
EnableLogRotation
,
QsLogging
::
MaxSizeBytes
(
2
*
1024
*
1024
),
QsLogging
::
MaxOldLogCount
(
6
)));
logPath
,
QsLogging
::
EnableLogRotation
,
QsLogging
::
MaxSizeBytes
(
2
*
1024
*
1024
),
QsLogging
::
MaxOldLogCount
(
6
)));
...
...
takeout/model/posorderpool.cpp
View file @
6ea54e48
...
@@ -406,7 +406,7 @@ bool PosOrderPool::event(QEvent *e)
...
@@ -406,7 +406,7 @@ bool PosOrderPool::event(QEvent *e)
if
(
e
->
type
()
==
PosEvent
::
s_inset_orderpool
)
if
(
e
->
type
()
==
PosEvent
::
s_inset_orderpool
)
{
{
QLOG_
INFO
()
<<
"PosEvent::s_inset_orderpool : "
<<
QThread
::
currentThreadId
();
QLOG_
DEBUG
()
<<
"PosEvent::s_inset_orderpool : "
<<
QThread
::
currentThreadId
();
OrderObject
order
(
this
);
OrderObject
order
(
this
);
...
...
takeout/preDefine.h
View file @
6ea54e48
...
@@ -261,6 +261,10 @@
...
@@ -261,6 +261,10 @@
#define FILE_PRINTTAKE80_TEMPLET "printtemplettake80.txt"
#define FILE_PRINTTAKE80_TEMPLET "printtemplettake80.txt"
#define FILE_PRINTYY_TEMPLET "printtempletyy.txt"
#define FILE_PRINTYY_TEMPLET "printtempletyy.txt"
#define FILE_PRINTYY80_TEMPLET "printtempletyy80.txt"
#define FILE_PRINTYY80_TEMPLET "printtempletyy80.txt"
#define FILE_PRINTO2O_TEMPLET "printtempleto2o.txt"
#define FILE_PRINTO2O80_TEMPLET "printtempleto2o80.txt"
#define FILE_PRINTO2OZZ_TEMPLET "printtempleto2ozz.txt"
#define FILE_PRINTO2OZZ80_TEMPLET "printtempleto2ozz80.txt"
#define DEFAULT_PRINTF_MAIN_SESSION "Printer"
#define DEFAULT_PRINTF_MAIN_SESSION "Printer"
...
...
takeout/takeout.rc
View file @
6ea54e48
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
#include <winver.h>
#include <winver.h>
#endif
#endif
VS_VERSION_INFO VERSIONINFO
VS_VERSION_INFO VERSIONINFO
FILEVERSION
2,0,0,9
FILEVERSION
3,0,0,0
PRODUCTVERSION
2,0,0,9
PRODUCTVERSION
3,0,0,0
FILEFLAGSMASK 0x3fL
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
FILEFLAGS VS_FF_DEBUG
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "
2.0.0.9
"
VALUE "FileVersion", "
3.0.0.0
"
VALUE "InternalName", "FREEMUD"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "
2.0.0.9
"
VALUE "ProductVersion", "
3.0.0.0
"
END
END
END
END
BLOCK "VarFileInfo"
BLOCK "VarFileInfo"
...
...
takeout/view/floatForm.cpp
View file @
6ea54e48
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include <QByteArray>
#include <QByteArray>
#include <QJsonObject>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonDocument>
#include <QDesktopWidget>
#include <QPoint>
#include "event/fmapplication.h"
#include "event/fmapplication.h"
#include "event/posevent.h"
#include "event/posevent.h"
...
@@ -45,6 +47,8 @@ FloatForm::FloatForm(QWidget *parent) :
...
@@ -45,6 +47,8 @@ FloatForm::FloatForm(QWidget *parent) :
m_animation
.
setEasingCurve
(
QEasingCurve
::
InOutSine
);
m_animation
.
setEasingCurve
(
QEasingCurve
::
InOutSine
);
m_raiseTimer
.
setInterval
(
2000
);
m_raiseTimer
.
setInterval
(
2000
);
connect
(
&
m_raiseTimer
,
&
QTimer
::
timeout
,
this
,
&
FloatForm
::
raise
);
connect
(
&
m_raiseTimer
,
&
QTimer
::
timeout
,
this
,
&
FloatForm
::
raise
);
desktopSize
=
QApplication
::
desktop
()
->
screenGeometry
().
size
();
desktopSize
-=
QSize
(
242
,
100
);
_Init
();
_Init
();
}
}
...
@@ -165,7 +169,14 @@ void FloatForm::mouseMoveEvent(QMouseEvent *event)
...
@@ -165,7 +169,14 @@ void FloatForm::mouseMoveEvent(QMouseEvent *event)
{
{
QPoint
moveAmount
=
event
->
globalPos
()
-
m_lastMousePos
;
QPoint
moveAmount
=
event
->
globalPos
()
-
m_lastMousePos
;
m_absMove
+=
moveAmount
;
m_absMove
+=
moveAmount
;
move
(
pos
()
+
moveAmount
);
int
x
=
0
,
y
=
0
;
x
=
pos
().
x
()
+
moveAmount
.
x
();
y
=
pos
().
y
()
+
moveAmount
.
y
();
if
(
x
>
desktopSize
.
width
()){
x
=
desktopSize
.
width
();}
if
(
x
<
0
){
x
=
0
;}
if
(
y
>
desktopSize
.
height
()){
y
=
desktopSize
.
height
();}
if
(
y
<
0
){
y
=
0
;}
move
(
x
,
y
);
m_lastMousePos
=
event
->
globalPos
();
m_lastMousePos
=
event
->
globalPos
();
m_bMouseMove
=
true
;
m_bMouseMove
=
true
;
}
}
...
@@ -213,6 +224,26 @@ void FloatForm::_Init()
...
@@ -213,6 +224,26 @@ void FloatForm::_Init()
setStyleSheet
(
"#floatWdg{ border-image: url(:float_normal.png); }"
);
setStyleSheet
(
"#floatWdg{ border-image: url(:float_normal.png); }"
);
move
(
ConfigManger
::
GetInstance
().
GetFloatInitPostion
());
move
(
ConfigManger
::
GetInstance
().
GetFloatInitPostion
());
QPoint
pos
=
ConfigManger
::
GetInstance
().
GetFloatInitPostion
();
if
(
pos
.
x
()
<
0
)
{
pos
.
setX
(
0
);
}
if
(
pos
.
y
()
<
0
)
{
pos
.
setY
(
0
);
}
if
(
pos
.
x
()
>
desktopSize
.
width
())
{
pos
.
setX
(
desktopSize
.
width
());
}
if
(
pos
.
y
()
>
desktopSize
.
height
())
{
pos
.
setY
(
desktopSize
.
height
());
}
move
(
pos
);
}
}
void
FloatForm
::
_Blink
()
void
FloatForm
::
_Blink
()
...
...
takeout/view/floatForm.h
View file @
6ea54e48
...
@@ -28,6 +28,7 @@ protected:
...
@@ -28,6 +28,7 @@ protected:
void
mouseReleaseEvent
(
QMouseEvent
*
event
);
void
mouseReleaseEvent
(
QMouseEvent
*
event
);
private
:
private
:
QSize
desktopSize
;
Ui
::
FloatForm
*
ui
;
Ui
::
FloatForm
*
ui
;
// 记录左键按下去后是否移动过
// 记录左键按下去后是否移动过
bool
m_bMouseMove
;
bool
m_bMouseMove
;
...
...
takeout/view/floatForm.ui
View file @
6ea54e48
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
2
10
</width>
<width>
2
42
</width>
<height>
100
</height>
<height>
100
</height>
</rect>
</rect>
</property>
</property>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
2
10
</width>
<width>
2
42
</width>
<height>
100
</height>
<height>
100
</height>
</rect>
</rect>
</property>
</property>
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
2
10
</width>
<width>
2
42
</width>
<height>
100
</height>
<height>
100
</height>
</rect>
</rect>
</property>
</property>
...
...
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