Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmPOS
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
zhenfei.zhang
fmPOS
Commits
4e8b65c5
Commit
4e8b65c5
authored
Sep 17, 2018
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
为各核销界面添加拖动功能;修复一个指针判空bug
parent
6222412f
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
212 additions
and
23 deletions
+212
-23
fmp_redeem/consumokdialog.cpp
+23
-2
fmp_redeem/consumokdialog.h
+9
-1
fmp_redeem/consumptiondialog.cpp
+32
-4
fmp_redeem/consumptiondialog.h
+8
-1
fmp_redeem/consumptiondialog.ui
+4
-4
fmp_redeem/couponkeypad.cpp
+25
-1
fmp_redeem/couponkeypad.h
+9
-1
fmp_redeem/errcodedialog.cpp
+24
-0
fmp_redeem/errcodedialog.h
+9
-1
fmp_redeem/fmp_redeem.cpp
+5
-2
fmp_redeem/scanningdialog.cpp
+25
-5
fmp_redeem/scanningdialog.h
+8
-1
fmp_redeem/storedialog.cpp
+24
-0
fmp_redeem/storedialog.h
+7
-0
No files found.
fmp_redeem/consumokdialog.cpp
View file @
4e8b65c5
...
@@ -29,4 +29,26 @@ void ConsumOkDialog::showConsumOk(const QString& act_name, const QString& code_n
...
@@ -29,4 +29,26 @@ void ConsumOkDialog::showConsumOk(const QString& act_name, const QString& code_n
v
.
ui
->
labTime
->
setText
(
time_name
);
v
.
ui
->
labTime
->
setText
(
time_name
);
v
.
ui
->
labCodeName
->
setText
(
code_name
);
v
.
ui
->
labCodeName
->
setText
(
code_name
);
v
.
exec
();
v
.
exec
();
}
}
\ No newline at end of file
void
ConsumOkDialog
::
mousePressEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
movePosition
=
e
->
globalPos
()
-
pos
();
return
QDialog
::
mousePressEvent
(
e
);
}
void
ConsumOkDialog
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
if
(
mouse_pressed
&&
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
e
->
globalPos
()
-
movePosition
).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
move
(
e
->
globalPos
()
-
movePosition
);
movePosition
=
e
->
globalPos
()
-
pos
();
}
return
QDialog
::
mouseMoveEvent
(
e
);
}
void
ConsumOkDialog
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
}
fmp_redeem/consumokdialog.h
View file @
4e8b65c5
#ifndef CONSUMOKDIALOG_H
#
ifndef
CONSUMOKDIALOG_H
#define CONSUMOKDIALOG_H
#define CONSUMOKDIALOG_H
#include <QDialog>
#include <QDialog>
#include <QMouseEvent>
namespace
Ui
{
namespace
Ui
{
class
ConsumOkDialog
;
class
ConsumOkDialog
;
...
@@ -16,8 +17,15 @@ public:
...
@@ -16,8 +17,15 @@ public:
~
ConsumOkDialog
();
~
ConsumOkDialog
();
static
void
showConsumOk
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
static
void
showConsumOk
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
protected
:
void
mousePressEvent
(
QMouseEvent
*
e
);
void
mouseMoveEvent
(
QMouseEvent
*
e
);
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
private
:
private
:
Ui
::
ConsumOkDialog
*
ui
;
Ui
::
ConsumOkDialog
*
ui
;
bool
mouse_pressed
;
QPoint
movePosition
;
};
};
#endif // CONSUMOKDIALOG_H
#endif // CONSUMOKDIALOG_H
fmp_redeem/consumptiondialog.cpp
View file @
4e8b65c5
...
@@ -20,10 +20,13 @@ ConsumptionDialog::ConsumptionDialog(QWidget * parent, Qt::WindowFlags f) :
...
@@ -20,10 +20,13 @@ ConsumptionDialog::ConsumptionDialog(QWidget * parent, Qt::WindowFlags f) :
ConsumptionDialog
::~
ConsumptionDialog
()
ConsumptionDialog
::~
ConsumptionDialog
()
{
{
if
(
timer
->
isActive
())
if
(
timer
)
timer
->
stop
();
{
timer
->
deleteLater
();
if
(
timer
->
isActive
())
timer
=
Q_NULLPTR
;
timer
->
stop
();
timer
->
deleteLater
();
timer
=
Q_NULLPTR
;
}
delete
ui
;
delete
ui
;
}
}
...
@@ -105,4 +108,28 @@ void ConsumptionDialog::setData(const QString& act_name, const QString& code_nam
...
@@ -105,4 +108,28 @@ void ConsumptionDialog::setData(const QString& act_name, const QString& code_nam
ui
->
labCodeName
->
setText
(
code_name
);
ui
->
labCodeName
->
setText
(
code_name
);
ui
->
labActName
->
setText
(
act_name
);
ui
->
labActName
->
setText
(
act_name
);
ui
->
labTime
->
setText
(
time_name
);
ui
->
labTime
->
setText
(
time_name
);
}
void
ConsumptionDialog
::
mousePressEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
movePosition
=
e
->
globalPos
()
-
pos
();
return
QDialog
::
mousePressEvent
(
e
);
}
void
ConsumptionDialog
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
if
(
mouse_pressed
&&
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
e
->
globalPos
()
-
movePosition
).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
move
(
e
->
globalPos
()
-
movePosition
);
movePosition
=
e
->
globalPos
()
-
pos
();
}
return
QDialog
::
mouseMoveEvent
(
e
);
}
void
ConsumptionDialog
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
false
;
return
QDialog
::
mouseReleaseEvent
(
e
);
}
}
\ No newline at end of file
fmp_redeem/consumptiondialog.h
View file @
4e8b65c5
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <QDialog>
#include <QDialog>
#include <QTimer>
#include <QTimer>
class
WorkObject
;
#include <QMouseEvent>
namespace
Ui
{
namespace
Ui
{
class
ConsumptionDialog
;
class
ConsumptionDialog
;
...
@@ -26,6 +26,11 @@ public:
...
@@ -26,6 +26,11 @@ public:
private
slots
:
private
slots
:
void
OnTimeout
();
void
OnTimeout
();
protected
:
void
mousePressEvent
(
QMouseEvent
*
e
);
void
mouseMoveEvent
(
QMouseEvent
*
e
);
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
signals
:
signals
:
void
sgBtnOk
();
void
sgBtnOk
();
void
sgBtnCannel
();
void
sgBtnCannel
();
...
@@ -33,6 +38,8 @@ signals:
...
@@ -33,6 +38,8 @@ signals:
private
:
private
:
Ui
::
ConsumptionDialog
*
ui
;
Ui
::
ConsumptionDialog
*
ui
;
QTimer
*
timer
;
QTimer
*
timer
;
bool
mouse_pressed
;
QPoint
movePosition
;
};
};
#endif // CONSUMPTIONDIALOG_H
#endif // CONSUMPTIONDIALOG_H
fmp_redeem/consumptiondialog.ui
View file @
4e8b65c5
...
@@ -161,9 +161,9 @@
...
@@ -161,9 +161,9 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
105
</y>
<y>
30
</y>
<width>
330
</width>
<width>
330
</width>
<height>
8
0
</height>
<height>
15
0
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
...
@@ -175,14 +175,14 @@
...
@@ -175,14 +175,14 @@
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
330
</width>
<width>
330
</width>
<height>
8
0
</height>
<height>
15
0
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
查询中...
</string>
<string>
查询中...
</string>
</property>
</property>
<property
name=
"alignment"
>
<property
name=
"alignment"
>
<set>
Qt::Align
Center
</set>
<set>
Qt::Align
HCenter|Qt::AlignTop
</set>
</property>
</property>
</widget>
</widget>
<widget
class=
"QLabel"
name=
"labTime"
>
<widget
class=
"QLabel"
name=
"labTime"
>
...
...
fmp_redeem/couponkeypad.cpp
View file @
4e8b65c5
#include "couponkeypad.h"
#
include
"couponkeypad.h"
#include "ui_couponkeypad.h"
#include "ui_couponkeypad.h"
CouponKeypad
::
CouponKeypad
(
QWidget
*
parent
,
Qt
::
WindowFlags
f
)
:
CouponKeypad
::
CouponKeypad
(
QWidget
*
parent
,
Qt
::
WindowFlags
f
)
:
...
@@ -52,4 +52,27 @@ void CouponKeypad::onDigitClicked()
...
@@ -52,4 +52,27 @@ void CouponKeypad::onDigitClicked()
{
{
QPushButton
*
btn
=
qobject_cast
<
QPushButton
*>
(
sender
());
QPushButton
*
btn
=
qobject_cast
<
QPushButton
*>
(
sender
());
ui
->
text
->
setText
(
ui
->
text
->
text
()
+
btn
->
text
());
ui
->
text
->
setText
(
ui
->
text
->
text
()
+
btn
->
text
());
}
void
CouponKeypad
::
mousePressEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
movePosition
=
e
->
globalPos
()
-
pos
();
return
QDialog
::
mousePressEvent
(
e
);
}
void
CouponKeypad
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
if
(
mouse_pressed
&&
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
e
->
globalPos
()
-
movePosition
).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
move
(
e
->
globalPos
()
-
movePosition
);
movePosition
=
e
->
globalPos
()
-
pos
();
}
return
QDialog
::
mouseMoveEvent
(
e
);
}
void
CouponKeypad
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
false
;
}
}
\ No newline at end of file
fmp_redeem/couponkeypad.h
View file @
4e8b65c5
#ifndef COUPONKEYPAD_H
#
ifndef
COUPONKEYPAD_H
#define COUPONKEYPAD_H
#define COUPONKEYPAD_H
#include <QDialog>
#include <QDialog>
#include <QMouseEvent>
namespace
Ui
{
namespace
Ui
{
class
CouponKeypad
;
class
CouponKeypad
;
...
@@ -21,12 +22,19 @@ public slots:
...
@@ -21,12 +22,19 @@ public slots:
void
on_btnDelete_clicked
();
void
on_btnDelete_clicked
();
void
on_btnClear_clicked
();
void
on_btnClear_clicked
();
void
onDigitClicked
();
void
onDigitClicked
();
protected
:
void
mousePressEvent
(
QMouseEvent
*
e
);
void
mouseMoveEvent
(
QMouseEvent
*
e
);
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
public
:
public
:
QString
code
;
QString
code
;
private
:
private
:
Ui
::
CouponKeypad
*
ui
;
Ui
::
CouponKeypad
*
ui
;
bool
mouse_pressed
;
QPoint
movePosition
;
};
};
#endif // COUPONKEYPAD_H
#endif // COUPONKEYPAD_H
fmp_redeem/errcodedialog.cpp
View file @
4e8b65c5
...
@@ -92,3 +92,26 @@ void ErrCodeDialog::showForMismatch(const QString &coupon, const QString &mess,
...
@@ -92,3 +92,26 @@ void ErrCodeDialog::showForMismatch(const QString &coupon, const QString &mess,
v
.
exec
();
v
.
exec
();
}
}
void
ErrCodeDialog
::
mousePressEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
movePosition
=
e
->
globalPos
()
-
pos
();
return
QDialog
::
mousePressEvent
(
e
);
}
void
ErrCodeDialog
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
if
(
mouse_pressed
&&
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
e
->
globalPos
()
-
movePosition
).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
move
(
e
->
globalPos
()
-
movePosition
);
movePosition
=
e
->
globalPos
()
-
pos
();
}
return
QDialog
::
mouseMoveEvent
(
e
);
}
void
ErrCodeDialog
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
false
;
}
\ No newline at end of file
fmp_redeem/errcodedialog.h
View file @
4e8b65c5
#ifndef ERRCODEDIALOG_H
#
ifndef
ERRCODEDIALOG_H
#define ERRCODEDIALOG_H
#define ERRCODEDIALOG_H
#include <QDialog>
#include <QDialog>
#include <QMouseEvent>
namespace
Ui
{
namespace
Ui
{
class
ErrCodeDialog
;
class
ErrCodeDialog
;
...
@@ -20,8 +21,15 @@ public:
...
@@ -20,8 +21,15 @@ public:
static
void
showForErr
(
const
QString
&
coupon
,
const
QString
&
mess
,
QWidget
*
parent
=
0
);
static
void
showForErr
(
const
QString
&
coupon
,
const
QString
&
mess
,
QWidget
*
parent
=
0
);
static
void
showForMismatch
(
const
QString
&
coupon
,
const
QString
&
mess
,
QWidget
*
parent
=
0
);
static
void
showForMismatch
(
const
QString
&
coupon
,
const
QString
&
mess
,
QWidget
*
parent
=
0
);
protected
:
void
mousePressEvent
(
QMouseEvent
*
e
);
void
mouseMoveEvent
(
QMouseEvent
*
e
);
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
private
:
private
:
Ui
::
ErrCodeDialog
*
ui
;
Ui
::
ErrCodeDialog
*
ui
;
bool
mouse_pressed
;
QPoint
movePosition
;
};
};
#endif // ERRCODEDIALOG_H
#endif // ERRCODEDIALOG_H
fmp_redeem/fmp_redeem.cpp
View file @
4e8b65c5
...
@@ -300,7 +300,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
...
@@ -300,7 +300,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
transactions
.
append
(
transaction
);
transactions
.
append
(
transaction
);
_redeem_json
[
"transactions"
]
=
transactions
;
_redeem_json
[
"transactions"
]
=
transactions
;
}
}
if
(
couponType
==
1
){
//代金券
else
if
(
couponType
==
1
){
//代金券
QJsonObject
transaction
;
QJsonObject
transaction
;
transaction
[
"code"
]
=
coupon
;
transaction
[
"code"
]
=
coupon
;
transaction
[
"ebcode"
]
=
ebcode
;
transaction
[
"ebcode"
]
=
ebcode
;
...
@@ -310,7 +310,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
...
@@ -310,7 +310,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
_redeem_json
[
"transactions"
]
=
transactions
;
_redeem_json
[
"transactions"
]
=
transactions
;
}
}
if
(
couponType
==
3
){
//折扣券
else
if
(
couponType
==
3
){
//折扣券
QJsonObject
transaction
;
QJsonObject
transaction
;
transaction
[
"code"
]
=
coupon
;
transaction
[
"code"
]
=
coupon
;
transaction
[
"ebcode"
]
=
ebcode
;
transaction
[
"ebcode"
]
=
ebcode
;
...
@@ -318,6 +318,9 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
...
@@ -318,6 +318,9 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
transactions
.
append
(
transaction
);
transactions
.
append
(
transaction
);
_redeem_json
[
"transactions"
]
=
transactions
;
_redeem_json
[
"transactions"
]
=
transactions
;
}
}
else
{
FMP_DEBUG
()
<<
"unknown coupon type"
;
}
QByteArray
reqData
=
QJsonDocument
(
_redeem_json
).
toJson
();
QByteArray
reqData
=
QJsonDocument
(
_redeem_json
).
toJson
();
reqData
=
CheckSendArray
(
reqData
);
reqData
=
CheckSendArray
(
reqData
);
...
...
fmp_redeem/scanningdialog.cpp
View file @
4e8b65c5
...
@@ -11,11 +11,8 @@ ScanningDialog::ScanningDialog(QWidget * parent, Qt::WindowFlags f) :
...
@@ -11,11 +11,8 @@ ScanningDialog::ScanningDialog(QWidget * parent, Qt::WindowFlags f) :
ui
(
new
Ui
::
ScanningDialog
)
ui
(
new
Ui
::
ScanningDialog
)
{
{
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
//setGeometry(0, 0, 350, 470);
setWindowTitle
(
QString
::
fromLocal8Bit
(
"非码卡券"
));
setWindowTitle
(
QString
::
fromLocal8Bit
(
"非码卡券"
));
setWindowFlags
(
windowFlags
()
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
FramelessWindowHint
);
setWindowFlags
(
windowFlags
()
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
FramelessWindowHint
);
//setWindowFlags(Qt::FramelessWindowHint);
//setAutoFillBackground(false); //这个不设置的话就背景变黑
setAttribute
(
Qt
::
WA_TranslucentBackground
,
true
);
setAttribute
(
Qt
::
WA_TranslucentBackground
,
true
);
setAttribute
(
Qt
::
WA_QuitOnClose
,
false
);
setAttribute
(
Qt
::
WA_QuitOnClose
,
false
);
...
@@ -79,7 +76,6 @@ void ScanningDialog::onClose()
...
@@ -79,7 +76,6 @@ void ScanningDialog::onClose()
void
ScanningDialog
::
timeOut
()
void
ScanningDialog
::
timeOut
()
{
{
qDebug
()
<<
"activateWindow"
;
FMP_DEBUG
()
<<
"activateWindow"
;
FMP_DEBUG
()
<<
"activateWindow"
;
HWND
hForeWnd
=
::
GetForegroundWindow
();
HWND
hForeWnd
=
::
GetForegroundWindow
();
DWORD
dwForeID
=
::
GetWindowThreadProcessId
(
hForeWnd
,
NULL
);
DWORD
dwForeID
=
::
GetWindowThreadProcessId
(
hForeWnd
,
NULL
);
...
@@ -101,4 +97,27 @@ void ScanningDialog::timeOut()
...
@@ -101,4 +97,27 @@ void ScanningDialog::timeOut()
ScanningDialog
::~
ScanningDialog
()
ScanningDialog
::~
ScanningDialog
()
{
{
delete
ui
;
delete
ui
;
}
void
ScanningDialog
::
mousePressEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
movePosition
=
e
->
globalPos
()
-
pos
();
return
QDialog
::
mousePressEvent
(
e
);
}
void
ScanningDialog
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
if
(
mouse_pressed
&&
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
e
->
globalPos
()
-
movePosition
).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
move
(
e
->
globalPos
()
-
movePosition
);
movePosition
=
e
->
globalPos
()
-
pos
();
}
return
QDialog
::
mouseMoveEvent
(
e
);
}
void
ScanningDialog
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
false
;
}
}
\ No newline at end of file
fmp_redeem/scanningdialog.h
View file @
4e8b65c5
#ifndef SCANNINGDIALOG_H
#
ifndef
SCANNINGDIALOG_H
#define SCANNINGDIALOG_H
#define SCANNINGDIALOG_H
#include <QDialog>
#include <QDialog>
...
@@ -21,6 +21,11 @@ public:
...
@@ -21,6 +21,11 @@ public:
protected
:
protected
:
void
keyPressEvent
(
QKeyEvent
*
e
);
void
keyPressEvent
(
QKeyEvent
*
e
);
protected
:
void
mousePressEvent
(
QMouseEvent
*
e
);
void
mouseMoveEvent
(
QMouseEvent
*
e
);
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
private
slots
:
private
slots
:
void
animationEnd
();
void
animationEnd
();
...
@@ -35,6 +40,8 @@ private:
...
@@ -35,6 +40,8 @@ private:
Ui
::
ScanningDialog
*
ui
;
Ui
::
ScanningDialog
*
ui
;
QPropertyAnimation
*
scanningBar
;
QPropertyAnimation
*
scanningBar
;
bool
animationUp
;
bool
animationUp
;
bool
mouse_pressed
;
QPoint
movePosition
;
};
};
#endif // SCANNINGDIALOG_H
#endif // SCANNINGDIALOG_H
fmp_redeem/storedialog.cpp
View file @
4e8b65c5
...
@@ -135,3 +135,26 @@ void StoreDialog::CloseKeyBoard()
...
@@ -135,3 +135,26 @@ void StoreDialog::CloseKeyBoard()
keyboard
->
HideKeyBoard
();
keyboard
->
HideKeyBoard
();
this
->
reject
();
this
->
reject
();
}
}
void
StoreDialog
::
mousePressEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
true
;
movePosition
=
e
->
globalPos
()
-
pos
();
return
QDialog
::
mousePressEvent
(
e
);
}
void
StoreDialog
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
if
(
mouse_pressed
&&
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
e
->
globalPos
()
-
movePosition
).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
move
(
e
->
globalPos
()
-
movePosition
);
movePosition
=
e
->
globalPos
()
-
pos
();
}
return
QDialog
::
mouseMoveEvent
(
e
);
}
void
StoreDialog
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
mouse_pressed
=
false
;
}
\ No newline at end of file
fmp_redeem/storedialog.h
View file @
4e8b65c5
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define STOREDIALOG_H
#define STOREDIALOG_H
#include <QDialog>
#include <QDialog>
#include <QMouseEvent>
namespace
Ui
{
namespace
Ui
{
class
StoreDialog
;
class
StoreDialog
;
...
@@ -17,6 +18,10 @@ public:
...
@@ -17,6 +18,10 @@ public:
protected
:
protected
:
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
event
);
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
event
);
void
mousePressEvent
(
QMouseEvent
*
e
);
void
mouseMoveEvent
(
QMouseEvent
*
e
);
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
private
slots
:
private
slots
:
void
ShowKeyBoard
();
void
ShowKeyBoard
();
...
@@ -33,6 +38,8 @@ public:
...
@@ -33,6 +38,8 @@ public:
private
:
private
:
Ui
::
StoreDialog
*
ui
;
Ui
::
StoreDialog
*
ui
;
bool
_is_show
;
bool
_is_show
;
bool
mouse_pressed
;
QPoint
movePosition
;
};
};
#endif // STOREDIALOG_H
#endif // STOREDIALOG_H
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