Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
488e2a65
Commit
488e2a65
authored
Jan 07, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Removed old debug prints.
parent
c25dd394
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
11 additions
and
119 deletions
+11
-119
profibus/exe/profinet_viewer/qt/profinet_viewer_qt.cpp
profibus/exe/profinet_viewer/qt/profinet_viewer_qt.cpp
+1
-1
sev/exe/sev_xtt/qt/sev_xtt_qt.cpp
sev/exe/sev_xtt/qt/sev_xtt_qt.cpp
+0
-3
sev/exe/sev_xtt/qt/xtt_tbl_qt.cqt
sev/exe/sev_xtt/qt/xtt_tbl_qt.cqt
+0
-1
sev/exe/sev_xtt/qt/xtt_tblnav_qt.cpp
sev/exe/sev_xtt/qt/xtt_tblnav_qt.cpp
+0
-1
wb/exe/wb/qt/wb_qt.cpp
wb/exe/wb/qt/wb_qt.cpp
+0
-6
wb/exe/wb/qt/wb_qt.h
wb/exe/wb/qt/wb_qt.h
+1
-1
wb/lib/wb/qt/wb_bckwnav_qt.cpp
wb/lib/wb/qt/wb_bckwnav_qt.cpp
+0
-2
wb/lib/wb/qt/wb_expwnav_qt.cpp
wb/lib/wb/qt/wb_expwnav_qt.cpp
+0
-2
wb/lib/wb/qt/wb_wge_qt.cqt
wb/lib/wb/qt/wb_wge_qt.cqt
+0
-2
wb/lib/wb/qt/wb_wtt_qt.cqt
wb/lib/wb/qt/wb_wtt_qt.cqt
+0
-1
wb/lib/wb/qt/wb_xcrr_qt.cqt
wb/lib/wb/qt/wb_xcrr_qt.cqt
+0
-2
xtt/exe/co_help/qt/co_help_qt.cpp
xtt/exe/co_help/qt/co_help_qt.cpp
+0
-1
xtt/exe/pwr_rtmon/qt/pwr_rtmon_qt.cpp
xtt/exe/pwr_rtmon/qt/pwr_rtmon_qt.cpp
+2
-2
xtt/exe/rt_statusmon/qt/rt_statusmon_qt.cpp
xtt/exe/rt_statusmon/qt/rt_statusmon_qt.cpp
+4
-4
xtt/exe/rt_xtt_cmd/qt/rt_xtt_cmd_qt.cpp
xtt/exe/rt_xtt_cmd/qt/rt_xtt_cmd_qt.cpp
+2
-2
xtt/exe/wb_ge/qt/wb_ge_qt.cpp
xtt/exe/wb_ge/qt/wb_ge_qt.cpp
+1
-1
xtt/lib/cow/qt/cow_logwnav_qt.cpp
xtt/lib/cow/qt/cow_logwnav_qt.cpp
+0
-2
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+0
-1
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+0
-53
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+0
-31
No files found.
profibus/exe/profinet_viewer/qt/profinet_viewer_qt.cpp
View file @
488e2a65
...
@@ -85,7 +85,7 @@ int main(int argc, char* argv[])
...
@@ -85,7 +85,7 @@ int main(int argc, char* argv[])
viewer
=
new
PnViewerQt
(
"Profinet Viewer"
,
dev_name
,
&
sts
);
viewer
=
new
PnViewerQt
(
"Profinet Viewer"
,
dev_name
,
&
sts
);
}
catch
(
co_error
&
e
)
{
}
catch
(
co_error
&
e
)
{
printf
(
"** Exception: %s
\n
"
,
e
.
what
().
c_str
());
printf
(
"** Exception: %s
\n
"
,
e
.
what
().
c_str
());
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
// Create help window
// Create help window
...
...
sev/exe/sev_xtt/qt/sev_xtt_qt.cpp
View file @
488e2a65
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
void
tbl_close_cb
(
void
*
tbl
)
void
tbl_close_cb
(
void
*
tbl
)
{
{
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
...
@@ -77,7 +76,6 @@ int main(int argc, char* argv[])
...
@@ -77,7 +76,6 @@ int main(int argc, char* argv[])
sevcli_init
(
&
sts
,
&
sevcli
);
sevcli_init
(
&
sts
,
&
sevcli
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
printf
(
"Sev client init error %u
\n
"
,
sts
);
printf
(
"Sev client init error %u
\n
"
,
sts
);
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
...
@@ -88,7 +86,6 @@ int main(int argc, char* argv[])
...
@@ -88,7 +86,6 @@ int main(int argc, char* argv[])
sevcli_get_itemlist
(
&
sts
,
sevcli
,
&
items
,
&
itemcnt
);
sevcli_get_itemlist
(
&
sts
,
sevcli
,
&
items
,
&
itemcnt
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
printf
(
"Sev client get itemlist error %u
\n
"
,
sts
);
printf
(
"Sev client get itemlist error %u
\n
"
,
sts
);
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
...
...
sev/exe/sev_xtt/qt/xtt_tbl_qt.cqt
View file @
488e2a65
...
@@ -57,7 +57,6 @@ void XttTblQt::message(char severity, const char* message)
...
@@ -57,7 +57,6 @@ void XttTblQt::message(char severity, const char* message)
void XttTblQtWidget::closeEvent(QCloseEvent* event)
void XttTblQtWidget::closeEvent(QCloseEvent* event)
{
{
debug_print("XttTblQtWidget::closeEvent\n");
if (tbl->close_cb) {
if (tbl->close_cb) {
(tbl->close_cb)(tbl);
(tbl->close_cb)(tbl);
} else {
} else {
...
...
sev/exe/sev_xtt/qt/xtt_tblnav_qt.cpp
View file @
488e2a65
...
@@ -47,7 +47,6 @@ TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
...
@@ -47,7 +47,6 @@ TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tStatus
*
status
)
pwr_tStatus
*
status
)
:
TblNav
(
xn_parent_ctx
,
xn_itemlist
,
xn_item_cnt
,
status
)
:
TblNav
(
xn_parent_ctx
,
xn_itemlist
,
xn_item_cnt
,
status
)
{
{
debug_print
(
"creating a scrolledbrowwidgetqt
\n
"
);
form_widget
form_widget
=
scrolledbrowwidgetqt_new
(
TblNav
::
init_brow_cb
,
this
,
&
brow_widget
);
=
scrolledbrowwidgetqt_new
(
TblNav
::
init_brow_cb
,
this
,
&
brow_widget
);
...
...
wb/exe/wb/qt/wb_qt.cpp
View file @
488e2a65
...
@@ -81,7 +81,6 @@ int main(int argc, char* argv[])
...
@@ -81,7 +81,6 @@ int main(int argc, char* argv[])
setDebug
(
1
);
setDebug
(
1
);
if
(
argc
>=
2
&&
streq
(
argv
[
1
],
"-m"
))
{
if
(
argc
>=
2
&&
streq
(
argv
[
1
],
"-m"
))
{
wb_erep
::
printMethods
();
wb_erep
::
printMethods
();
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
...
@@ -321,8 +320,3 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
...
@@ -321,8 +320,3 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
QTimer
::
singleShot
(
100
,
wow
->
object
,
SLOT
(
DisplayWarranty
()));
QTimer
::
singleShot
(
100
,
wow
->
object
,
SLOT
(
DisplayWarranty
()));
}
}
}
}
WbQt
::~
WbQt
()
{
debug_print
(
"Shutting down...
\n
"
);
}
wb/exe/wb/qt/wb_qt.h
View file @
488e2a65
...
@@ -47,8 +47,8 @@ public:
...
@@ -47,8 +47,8 @@ public:
QWidget
*
mainwindow
;
QWidget
*
mainwindow
;
WbQt
(
int
argc
,
char
*
argv
[]);
WbQt
(
int
argc
,
char
*
argv
[]);
~
WbQt
()
{}
virtual
~
WbQt
();
Wtt
*
wtt_new
(
const
char
*
name
,
const
char
*
iconname
,
ldh_tWBContext
wbctx
,
Wtt
*
wtt_new
(
const
char
*
name
,
const
char
*
iconname
,
ldh_tWBContext
wbctx
,
pwr_tVolumeId
volid
,
ldh_tVolume
volctx
,
wnav_sStartMenu
*
root_menu
,
pwr_tVolumeId
volid
,
ldh_tVolume
volctx
,
wnav_sStartMenu
*
root_menu
,
pwr_tStatus
*
status
);
pwr_tStatus
*
status
);
...
...
wb/lib/wb/qt/wb_bckwnav_qt.cpp
View file @
488e2a65
...
@@ -46,7 +46,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
...
@@ -46,7 +46,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
ldh_tSession
l_ldhses
,
wb_bck_list
*
l_list
,
int
l_editmode
,
QWidget
**
w
)
ldh_tSession
l_ldhses
,
wb_bck_list
*
l_list
,
int
l_editmode
,
QWidget
**
w
)
:
WbBckWNav
(
l_parent_ctx
,
l_ldhses
,
l_list
,
l_editmode
)
:
WbBckWNav
(
l_parent_ctx
,
l_ldhses
,
l_list
,
l_editmode
)
{
{
debug_print
(
"creating a scrolledbrowwidgetqt
\n
"
);
form_widget
form_widget
=
scrolledbrowwidgetqt_new
(
WbBckWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
=
scrolledbrowwidgetqt_new
(
WbBckWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
...
@@ -56,7 +55,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
...
@@ -56,7 +55,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbBckWNavQt
::~
WbBckWNavQt
()
WbBckWNavQt
::~
WbBckWNavQt
()
{
{
debug_print
(
"WbBckWNavQt::~WbBckWNavQt
\n
"
);
delete
brow
;
delete
brow
;
form_widget
->
close
();
form_widget
->
close
();
}
}
...
...
wb/lib/wb/qt/wb_expwnav_qt.cpp
View file @
488e2a65
...
@@ -46,7 +46,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
...
@@ -46,7 +46,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
ldh_tSession
l_ldhses
,
int
l_type
,
int
l_editmode
,
QWidget
**
w
)
ldh_tSession
l_ldhses
,
int
l_type
,
int
l_editmode
,
QWidget
**
w
)
:
WbExpWNav
(
l_parent_ctx
,
l_ldhses
,
l_type
,
l_editmode
)
:
WbExpWNav
(
l_parent_ctx
,
l_ldhses
,
l_type
,
l_editmode
)
{
{
debug_print
(
"creating a scrolledbrowwidgetqt
\n
"
);
form_widget
form_widget
=
scrolledbrowwidgetqt_new
(
WbExpWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
=
scrolledbrowwidgetqt_new
(
WbExpWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
...
@@ -56,7 +55,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
...
@@ -56,7 +55,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbExpWNavQt
::~
WbExpWNavQt
()
WbExpWNavQt
::~
WbExpWNavQt
()
{
{
debug_print
(
"WbExpWNavQt::~WbExpWNavQt
\n
"
);
delete
brow
;
delete
brow
;
form_widget
->
close
();
form_widget
->
close
();
}
}
...
...
wb/lib/wb/qt/wb_wge_qt.cqt
View file @
488e2a65
...
@@ -158,7 +158,6 @@ void WGeQt::set_size(int width, int height)
...
@@ -158,7 +158,6 @@ void WGeQt::set_size(int width, int height)
void WGeQt::set_subwindow_release()
void WGeQt::set_subwindow_release()
{
{
subwindow_release = 1;
subwindow_release = 1;
debug_print("Shutting down...\n");
QApplication::exit();
QApplication::exit();
}
}
...
@@ -171,7 +170,6 @@ void WGeQtWidget::closeEvent(QCloseEvent* event)
...
@@ -171,7 +170,6 @@ void WGeQtWidget::closeEvent(QCloseEvent* event)
{
{
if (ge->modal) {
if (ge->modal) {
ge->terminated = 1;
ge->terminated = 1;
debug_print("Shutting down...\n");
QApplication::exit();
QApplication::exit();
} else {
} else {
delete ge;
delete ge;
...
...
wb/lib/wb/qt/wb_wtt_qt.cqt
View file @
488e2a65
...
@@ -2324,7 +2324,6 @@ WttQt::~WttQt()
...
@@ -2324,7 +2324,6 @@ WttQt::~WttQt()
delete toplevel;
delete toplevel;
if (!close_cb) {
if (!close_cb) {
debug_print("Shutting down...\n");
exit(0);
exit(0);
}
}
}
}
...
...
wb/lib/wb/qt/wb_xcrr_qt.cqt
View file @
488e2a65
...
@@ -99,7 +99,6 @@ void WCrrQt::print()
...
@@ -99,7 +99,6 @@ void WCrrQt::print()
void WCrrQtWidget::closeEvent(QCloseEvent* event)
void WCrrQtWidget::closeEvent(QCloseEvent* event)
{
{
debug_print("WCrrQtWidget::closeEvent\n");
if (crr->close_cb) {
if (crr->close_cb) {
(crr->close_cb)(crr->parent_ctx, crr);
(crr->close_cb)(crr->parent_ctx, crr);
} else {
} else {
...
@@ -118,7 +117,6 @@ WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
...
@@ -118,7 +117,6 @@ WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
int* xa_sts)
int* xa_sts)
: WCrr(xa_parent_ctx, xa_ldhses, xa_objar, xa_advanced_user, xa_sts)
: WCrr(xa_parent_ctx, xa_ldhses, xa_objar, xa_advanced_user, xa_sts)
{
{
debug_print("\n");
int sts;
int sts;
char* namep;
char* namep;
int size;
int size;
...
...
xtt/exe/co_help/qt/co_help_qt.cpp
View file @
488e2a65
...
@@ -51,7 +51,6 @@ void close_cb(void* ctx, void* xhelp)
...
@@ -51,7 +51,6 @@ void close_cb(void* ctx, void* xhelp)
{
{
((
CoXHelpQt
*
)
xhelp
)
->
toplevel
->
close
();
((
CoXHelpQt
*
)
xhelp
)
->
toplevel
->
close
();
delete
help
;
delete
help
;
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
...
...
xtt/exe/pwr_rtmon/qt/pwr_rtmon_qt.cpp
View file @
488e2a65
...
@@ -66,7 +66,7 @@ static void rtmon_close_cb(void* ctx)
...
@@ -66,7 +66,7 @@ static void rtmon_close_cb(void* ctx)
{
{
delete
rtmon
;
delete
rtmon
;
delete
xhelp
;
delete
xhelp
;
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
...
@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
...
@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
fprintf
(
stderr
,
"%s "
,
argv
[
i
]);
fprintf
(
stderr
,
"%s "
,
argv
[
i
]);
if
(
streq
(
argv
[
i
],
"-h"
))
{
if
(
streq
(
argv
[
i
],
"-h"
))
{
usage
();
usage
();
debug_print
(
"
\n
Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
else
if
(
streq
(
argv
[
i
],
"--display"
)
&&
i
+
1
<
argc
)
{
}
else
if
(
streq
(
argv
[
i
],
"--display"
)
&&
i
+
1
<
argc
)
{
strncpy
(
display
,
argv
[
i
+
1
],
sizeof
(
display
));
strncpy
(
display
,
argv
[
i
+
1
],
sizeof
(
display
));
}
}
...
...
xtt/exe/rt_statusmon/qt/rt_statusmon_qt.cpp
View file @
488e2a65
...
@@ -66,7 +66,7 @@ static void statusmon_close(void* ctx)
...
@@ -66,7 +66,7 @@ static void statusmon_close(void* ctx)
{
{
delete
nl
;
delete
nl
;
delete
xhelp
;
delete
xhelp
;
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
...
@@ -82,14 +82,14 @@ int main(int argc, char* argv[])
...
@@ -82,14 +82,14 @@ int main(int argc, char* argv[])
fprintf
(
stderr
,
"%s "
,
argv
[
i
]);
fprintf
(
stderr
,
"%s "
,
argv
[
i
]);
if
(
streq
(
argv
[
i
],
"-h"
))
{
if
(
streq
(
argv
[
i
],
"-h"
))
{
usage
();
usage
();
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
else
if
(
streq
(
argv
[
i
],
"-l"
)
&&
i
+
1
<
argc
)
{
}
else
if
(
streq
(
argv
[
i
],
"-l"
)
&&
i
+
1
<
argc
)
{
strncpy
(
language
,
argv
[
i
+
1
],
sizeof
(
language
));
strncpy
(
language
,
argv
[
i
+
1
],
sizeof
(
language
));
Lng
::
set
(
language
);
Lng
::
set
(
language
);
}
else
if
(
streq
(
argv
[
i
],
"-m"
))
{
}
else
if
(
streq
(
argv
[
i
],
"-m"
))
{
if
(
argc
==
i
)
{
if
(
argc
==
i
)
{
usage
();
usage
();
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
if
(
streq
(
argv
[
i
+
1
],
"1"
))
{
if
(
streq
(
argv
[
i
+
1
],
"1"
))
{
mode
=
nodelist_eMode_Status1
;
mode
=
nodelist_eMode_Status1
;
...
@@ -103,7 +103,7 @@ int main(int argc, char* argv[])
...
@@ -103,7 +103,7 @@ int main(int argc, char* argv[])
mode
=
nodelist_eMode_Status5
;
mode
=
nodelist_eMode_Status5
;
}
else
{
}
else
{
usage
();
usage
();
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
i
++
;
i
++
;
}
else
if
(
streq
(
argv
[
i
],
"-e"
))
{
}
else
if
(
streq
(
argv
[
i
],
"-e"
))
{
...
...
xtt/exe/rt_xtt_cmd/qt/rt_xtt_cmd_qt.cpp
View file @
488e2a65
...
@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
...
@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
switch
(
argv
[
i
][
1
])
{
switch
(
argv
[
i
][
1
])
{
case
'h'
:
case
'h'
:
XttCmd
::
usage
();
XttCmd
::
usage
();
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
case
'q'
:
case
'q'
:
// Quiet
// Quiet
quiet
=
1
;
quiet
=
1
;
...
@@ -121,7 +121,7 @@ int main(int argc, char* argv[])
...
@@ -121,7 +121,7 @@ int main(int argc, char* argv[])
sts
=
gdh_Init
(
"rt_xtt_cmd"
);
sts
=
gdh_Init
(
"rt_xtt_cmd"
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
printf
(
"Unable to connect to database
\n
"
);
printf
(
"Unable to connect to database
\n
"
);
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
QApplication
app
(
argc
,
argv
);
QApplication
app
(
argc
,
argv
);
...
...
xtt/exe/wb_ge/qt/wb_ge_qt.cpp
View file @
488e2a65
...
@@ -96,7 +96,7 @@ int main(int argc, char* argv[])
...
@@ -96,7 +96,7 @@ int main(int argc, char* argv[])
if
(
streq
(
argv
[
i
],
"-l"
))
{
if
(
streq
(
argv
[
i
],
"-l"
))
{
if
(
i
+
1
>=
argc
)
{
if
(
i
+
1
>=
argc
)
{
usage
();
usage
();
debug_print
(
"Shutting down...
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
Lng
::
set
(
argv
[
i
+
1
]);
Lng
::
set
(
argv
[
i
+
1
]);
i
++
;
i
++
;
...
...
xtt/lib/cow/qt/cow_logwnav_qt.cpp
View file @
488e2a65
...
@@ -45,7 +45,6 @@ CoLogWNavQt::CoLogWNavQt(
...
@@ -45,7 +45,6 @@ CoLogWNavQt::CoLogWNavQt(
void
*
l_parent_ctx
,
QWidget
*
l_parent_wid
,
int
l_show_item
,
QWidget
**
w
)
void
*
l_parent_ctx
,
QWidget
*
l_parent_wid
,
int
l_show_item
,
QWidget
**
w
)
:
CoLogWNav
(
l_parent_ctx
,
l_show_item
)
:
CoLogWNav
(
l_parent_ctx
,
l_show_item
)
{
{
debug_print
(
"creating a scrolledbrowwidgetqt
\n
"
);
form_widget
form_widget
=
scrolledbrowwidgetqt_new
(
CoLogWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
=
scrolledbrowwidgetqt_new
(
CoLogWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
...
@@ -55,7 +54,6 @@ CoLogWNavQt::CoLogWNavQt(
...
@@ -55,7 +54,6 @@ CoLogWNavQt::CoLogWNavQt(
CoLogWNavQt
::~
CoLogWNavQt
()
CoLogWNavQt
::~
CoLogWNavQt
()
{
{
debug_print
(
"CoLogWNavQt::~CoLogWNavQt
\n
"
);
delete
brow
;
delete
brow
;
form_widget
->
close
();
form_widget
->
close
();
}
}
...
...
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
488e2a65
...
@@ -749,7 +749,6 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
...
@@ -749,7 +749,6 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
void CoWowModalDialogQt::destroy(bool destroyWindow, bool destroySubWindows)
void CoWowModalDialogQt::destroy(bool destroyWindow, bool destroySubWindows)
{
{
debug_print("Not shutting down...\n");
setResult(wow_eModalDialogReturn_Deleted);
setResult(wow_eModalDialogReturn_Deleted);
QDialog::destroy(destroyWindow, destroySubWindows);
QDialog::destroy(destroyWindow, destroySubWindows);
}
}
...
...
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
488e2a65
...
@@ -253,7 +253,6 @@ FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
...
@@ -253,7 +253,6 @@ FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
int FlowDrawQt::init_nav(QWidget* nav_widget, void* flow_ctx)
int FlowDrawQt::init_nav(QWidget* nav_widget, void* flow_ctx)
{
{
// debug_print("init_nav\n");
assert(dynamic_cast<QtScrollWidgetFlow*>(nav_widget) != NULL);
assert(dynamic_cast<QtScrollWidgetFlow*>(nav_widget) != NULL);
nav_window = dynamic_cast<QtScrollWidgetFlow*>(nav_widget);
nav_window = dynamic_cast<QtScrollWidgetFlow*>(nav_widget);
nav_window_canvas = &(((QtScrollWidgetFlow*)nav_window)->image);
nav_window_canvas = &(((QtScrollWidgetFlow*)nav_window)->image);
...
@@ -288,8 +287,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -288,8 +287,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
switch (event->type()) {
switch (event->type()) {
case QEvent::KeyPress: {
case QEvent::KeyPress: {
QKeyEvent* keyEvent = ((QKeyEvent*)event);
QKeyEvent* keyEvent = ((QKeyEvent*)event);
// debug_print("event_handler: KeyPress key=%s\n",
// QKeySequence(keyEvent->key()).toString().toAscii().data());
switch (keyEvent->key()) {
switch (keyEvent->key()) {
case Qt::Key_Return:
case Qt::Key_Return:
...
@@ -353,9 +350,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -353,9 +350,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
}
}
case QEvent::MouseButtonPress: {
case QEvent::MouseButtonPress: {
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
/* debug_print("event_handler: MouseButtonPress button=%d, x=%d, y=%d,
globalX=%d, globalY=%d\n", mouseEvent->button(), mouseEvent->x(),
mouseEvent->y(), mouseEvent->globalX(), mouseEvent->globalY()); */
switch (mouseEvent->button()) {
switch (mouseEvent->button()) {
case Qt::LeftButton:
case Qt::LeftButton:
ctx->event_handler(
ctx->event_handler(
...
@@ -430,7 +424,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -430,7 +424,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
event_timer(ctx, mouseEvent, target);
event_timer(ctx, mouseEvent, target);
return 1;
return 1;
} else {
} else {
// debug_print("event_handler: MouseButtonPress from timer\n");
/* Press event, callback from timer */
/* Press event, callback from timer */
button_pressed = 0;
button_pressed = 0;
button_clicked_and_pressed = 0;
button_clicked_and_pressed = 0;
...
@@ -489,8 +482,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -489,8 +482,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
}
}
case QEvent::MouseButtonRelease: {
case QEvent::MouseButtonRelease: {
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
// debug_print("event_handler: MouseButtonRelease button=%d\n",
// mouseEvent->button());
button1_pressed = 0;
button1_pressed = 0;
button2_pressed = 0;
button2_pressed = 0;
button3_pressed = 0;
button3_pressed = 0;
...
@@ -734,7 +725,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -734,7 +725,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
case QEvent::FocusOut:
case QEvent::FocusOut:
break;
break;
case QEvent::Wheel: {
case QEvent::Wheel: {
// debug_print("event_handler: Wheel\n");
QWheelEvent* wheelEvent = ((QWheelEvent*)event);
QWheelEvent* wheelEvent = ((QWheelEvent*)event);
if (wheelEvent->delta() > 0) {
if (wheelEvent->delta() > 0) {
sts = ctx->event_handler(flow_eEvent_ScrollUp, 0, 0, 0, 0);
sts = ctx->event_handler(flow_eEvent_ScrollUp, 0, 0, 0, 0);
...
@@ -750,8 +740,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -750,8 +740,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
switch (event->type()) {
switch (event->type()) {
case QEvent::MouseButtonPress: {
case QEvent::MouseButtonPress: {
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
// debug_print("event_handler: MouseButtonPress button=%d\n",
// mouseEvent->button());
switch (mouseEvent->button()) {
switch (mouseEvent->button()) {
case Qt::LeftButton: // Button1
case Qt::LeftButton: // Button1
button1_pressed = 1;
button1_pressed = 1;
...
@@ -773,8 +761,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -773,8 +761,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
}
}
case QEvent::MouseButtonRelease: {
case QEvent::MouseButtonRelease: {
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
QMouseEvent* mouseEvent = ((QMouseEvent*)event);
// debug_print("event_handler: MouseButtonRelease button=%d\n",
// mouseEvent->button());
switch (mouseEvent->button()) {
switch (mouseEvent->button()) {
case Qt::LeftButton: // Button1
case Qt::LeftButton: // Button1
button1_pressed = 0;
button1_pressed = 0;
...
@@ -804,7 +790,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
...
@@ -804,7 +790,6 @@ int FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
break;
break;
}
}
case QEvent::MouseMove: {
case QEvent::MouseMove: {
// debug_print("event_handler: MouseMove\n");
QPoint pos = QCursor::pos();
QPoint pos = QCursor::pos();
if (button1_pressed || button2_pressed || button3_pressed) {
if (button1_pressed || button2_pressed || button3_pressed) {
sts = ctx->event_handler_nav(
sts = ctx->event_handler_nav(
...
@@ -857,10 +842,8 @@ int FlowDrawQt::rect_helper(FlowCtx* ctx, int painter_type, int size, int x,
...
@@ -857,10 +842,8 @@ int FlowDrawQt::rect_helper(FlowCtx* ctx, int painter_type, int size, int x,
unique_ptr<QPainter> painter = get_painter(painter_type, size, nav);
unique_ptr<QPainter> painter = get_painter(painter_type, size, nav);
if (fill) {
if (fill) {
// debug_print("fillRect [%d, %d, %d, %d] painter_type=%d, with color %s\n", x, y, width, height, painter_type, qPrintable(painter->brush().color().name()));
painter->fillRect(x, y, width, height, painter->brush());
painter->fillRect(x, y, width, height, painter->brush());
} else {
} else {
// debug_print("drawRect [%d, %d, %d, %d] pen %s brush %s\n", x, y, width, height, qPrintable(painter->pen().color().name()), qPrintable(painter->brush().color().name()));
painter->setBrush(Qt::NoBrush);
painter->setBrush(Qt::NoBrush);
painter->drawRect(x, y, width, height);
painter->drawRect(x, y, width, height);
}
}
...
@@ -926,14 +909,10 @@ int FlowDrawQt::triangle_helper(FlowCtx* ctx, int painter_type, int size, int x,
...
@@ -926,14 +909,10 @@ int FlowDrawQt::triangle_helper(FlowCtx* ctx, int painter_type, int size, int x,
poly[3] = QPoint(x, y + height);
poly[3] = QPoint(x, y + height);
if (fill) {
if (fill) {
// debug_print("fillTriangle (%d, %d) (%d, %d) (%d, %d)\n", x, y + height, x
// + width / 2, y, x + width, y + height);
QPainterPath path;
QPainterPath path;
path.addPolygon(poly);
path.addPolygon(poly);
painter->fillPath(path, painter->brush());
painter->fillPath(path, painter->brush());
} else {
} else {
// debug_print("drawTriangle (%d, %d) (%d, %d) (%d, %d)\n", x, y + height, x
// + width / 2, y, x + width, y + height);
painter->setBrush(Qt::NoBrush);
painter->setBrush(Qt::NoBrush);
painter->drawPolygon(poly);
painter->drawPolygon(poly);
}
}
...
@@ -1008,7 +987,6 @@ int FlowDrawQt::arrow_helper(FlowCtx* ctx, int painter_type, int size, int x1,
...
@@ -1008,7 +987,6 @@ int FlowDrawQt::arrow_helper(FlowCtx* ctx, int painter_type, int size, int x1,
QPainterPath path;
QPainterPath path;
path.addPolygon(poly);
path.addPolygon(poly);
// debug_print("arrow (%d, %d) (%d, %d) (%d, %d)\n", x1, y1, x2, y2, x3, y3);
painter->fillPath(path, painter->brush());
painter->fillPath(path, painter->brush());
return 1;
return 1;
...
@@ -1063,7 +1041,6 @@ int FlowDrawQt::arc_helper(FlowCtx* ctx, int painter_type, int size, int x,
...
@@ -1063,7 +1041,6 @@ int FlowDrawQt::arc_helper(FlowCtx* ctx, int painter_type, int size, int x,
unique_ptr<QPainter> painter = get_painter(painter_type, size, nav);
unique_ptr<QPainter> painter = get_painter(painter_type, size, nav);
painter->setBrush(Qt::NoBrush);
painter->setBrush(Qt::NoBrush);
// debug_print("arc [%d, %d, %d, %d], %d, %d\n", x, y, width, height, angle1, angle2);
painter->drawArc(x, y, width, height, angle1 * 16, angle2 * 16);
painter->drawArc(x, y, width, height, angle1 * 16, angle2 * 16);
return 1;
return 1;
...
@@ -1122,7 +1099,6 @@ int FlowDrawQt::line_helper(FlowCtx* ctx, int painter_type, int size, int x1,
...
@@ -1122,7 +1099,6 @@ int FlowDrawQt::line_helper(FlowCtx* ctx, int painter_type, int size, int x1,
}
}
unique_ptr<QPainter> painter = get_painter(painter_type, size, nav);
unique_ptr<QPainter> painter = get_painter(painter_type, size, nav);
// debug_print("line (%d, %d) (%d, %d)\n", x1, y1, x2, y2);
painter->drawLine(x1, y1, x2, y2);
painter->drawLine(x1, y1, x2, y2);
return 1;
return 1;
...
@@ -1191,12 +1167,10 @@ int FlowDrawQt::text_pango_helper(FlowCtx* ctx, int x, int y, char* text,
...
@@ -1191,12 +1167,10 @@ int FlowDrawQt::text_pango_helper(FlowCtx* ctx, int x, int y, char* text,
int height = rect.height();
int height = rect.height();
if (erase_rect > 0) {
if (erase_rect > 0) {
// debug_print("eraseRect [%d,%d,%d,%d]\n", x, ROUND(y - 0.8 * height), rect.width() + 1, ROUND(height * (erase_rect / 10.0)));
painter->eraseRect(x, ROUND(y - 0.8 * height), rect.width() + 1, ROUND(height * (erase_rect / 10.0)));
painter->eraseRect(x, ROUND(y - 0.8 * height), rect.width() + 1, ROUND(height * (erase_rect / 10.0)));
}
}
if (erase_rect < 12) {
if (erase_rect < 12) {
// debug_print("drawText %s at [%d,%d,%d,%d]\n", text, x, ROUND(y - 0.8 * height), rect.width(), height);
painter->drawText(x, ROUND(y - 0.8 * height), rect.width(), height, Qt::TextDontClip, str, &rect);
painter->drawText(x, ROUND(y - 0.8 * height), rect.width(), height, Qt::TextDontClip, str, &rect);
}
}
...
@@ -1264,7 +1238,6 @@ int FlowDrawQt::nav_text_helper(FlowCtx* ctx, flow_eDrawType painter_type,
...
@@ -1264,7 +1238,6 @@ int FlowDrawQt::nav_text_helper(FlowCtx* ctx, flow_eDrawType painter_type,
}
}
unique_ptr<QPainter> painter = get_painter(painter_type, size, true);
unique_ptr<QPainter> painter = get_painter(painter_type, size, true);
// debug_print("drawText %s at (%d, %d)\n", text, x, y);
painter->drawText(x, y, QString::fromLocal8Bit(text, len));
painter->drawText(x, y, QString::fromLocal8Bit(text, len));
return 1;
return 1;
...
@@ -1360,9 +1333,6 @@ int FlowDrawQt::pixmap_inverse(FlowCtx* ctx, int x, int y,
...
@@ -1360,9 +1333,6 @@ int FlowDrawQt::pixmap_inverse(FlowCtx* ctx, int x, int y,
{
{
unique_ptr<QPainter> painter = get_painter(flow_eDrawType_LineErase, idx);
unique_ptr<QPainter> painter = get_painter(flow_eDrawType_LineErase, idx);
// debug_print("pixmap_inverse fillRect [%d, %d, %d, %d] with color %s\n", x,
// y, pdata->width, pdata->height,
// painter->brush().color().name().toAscii().data());
painter->fillRect(x, y, pdata->width, pdata->height, painter->brush());
painter->fillRect(x, y, pdata->width, pdata->height, painter->brush());
}
}
...
@@ -1372,9 +1342,6 @@ int FlowDrawQt::pixmap_inverse(FlowCtx* ctx, int x, int y,
...
@@ -1372,9 +1342,6 @@ int FlowDrawQt::pixmap_inverse(FlowCtx* ctx, int x, int y,
painter->setClipRegion(clipRegion.translated(x, y));
painter->setClipRegion(clipRegion.translated(x, y));
painter->setClipping(true);
painter->setClipping(true);
// debug_print("pixmap_inverse fillRect [%d, %d, %d, %d] with color %s using
// mask\n", x, y, pdata->width, pdata->height,
// painter->brush().color().name().toAscii().data());
painter->fillRect(x, y, pdata->width, pdata->height, painter->brush());
painter->fillRect(x, y, pdata->width, pdata->height, painter->brush());
return 1;
return 1;
...
@@ -1390,8 +1357,6 @@ int FlowDrawQt::pixmap_erase(FlowCtx* ctx, int x, int y,
...
@@ -1390,8 +1357,6 @@ int FlowDrawQt::pixmap_erase(FlowCtx* ctx, int x, int y,
}
}
unique_ptr<QPainter> painter = get_painter(painter_type, idx);
unique_ptr<QPainter> painter = get_painter(painter_type, idx);
// debug_print("pixmap_erase [%d, %d, %d, %d]\n", x, y, pdata->width,
// pdata->height);
painter->eraseRect(x, y, pdata->width, pdata->height);
painter->eraseRect(x, y, pdata->width, pdata->height);
return 1;
return 1;
...
@@ -1411,8 +1376,6 @@ int FlowDrawQt::nav_pixmap(FlowCtx* ctx, int x, int y,
...
@@ -1411,8 +1376,6 @@ int FlowDrawQt::nav_pixmap(FlowCtx* ctx, int x, int y,
pms = (draw_sPixmap*)pixmaps;
pms = (draw_sPixmap*)pixmaps;
unique_ptr<QPainter> painter = get_painter(painter_type, idx);
unique_ptr<QPainter> painter = get_painter(painter_type, idx);
// debug_print("nav_pixmap [%d, %d, %d, %d]\n", x, y, pdata->width,
// pdata->height);
painter->drawPixmap(x, y, pdata->width, pdata->height, pms->pixmap[idx]);
painter->drawPixmap(x, y, pdata->width, pdata->height, pms->pixmap[idx]);
return 1;
return 1;
...
@@ -1428,8 +1391,6 @@ int FlowDrawQt::nav_pixmap_erase(FlowCtx* ctx, int x, int y,
...
@@ -1428,8 +1391,6 @@ int FlowDrawQt::nav_pixmap_erase(FlowCtx* ctx, int x, int y,
}
}
unique_ptr<QPainter> painter = get_painter(painter_type, idx);
unique_ptr<QPainter> painter = get_painter(painter_type, idx);
// debug_print("nav_pixmap_erase [%d, %d, %d, %d]\n", x, y, pdata->width,
// pdata->height);
painter->eraseRect(x, y, pdata->width, pdata->height);
painter->eraseRect(x, y, pdata->width, pdata->height);
return 1;
return 1;
...
@@ -1467,7 +1428,6 @@ int FlowDrawQt::image(FlowCtx* ctx, int x, int y, int width, int height,
...
@@ -1467,7 +1428,6 @@ int FlowDrawQt::image(FlowCtx* ctx, int x, int y, int width, int height,
painter->setClipping(true);
painter->setClipping(true);
}
}
// debug_print("image [%d, %d, %d, %d]\n", x, y, width, height);
painter->drawImage(QRect(x, y, width, height), *((QImage*)image));
painter->drawImage(QRect(x, y, width, height), *((QImage*)image));
return 1;
return 1;
...
@@ -1482,7 +1442,6 @@ void FlowDrawQt::clear(FlowCtx* ctx)
...
@@ -1482,7 +1442,6 @@ void FlowDrawQt::clear(FlowCtx* ctx)
unique_ptr<QPainter> painter = new QPainter(window_canvas);
unique_ptr<QPainter> painter = new QPainter(window_canvas);
painter->setBackground(QBrush(background));
painter->setBackground(QBrush(background));
// debug_print("clear color=%s\n", painter->background().color().name().toAscii().data());
painter->eraseRect(window_canvas->rect());
painter->eraseRect(window_canvas->rect());
}
}
...
@@ -1495,7 +1454,6 @@ void FlowDrawQt::nav_clear(FlowCtx* ctx)
...
@@ -1495,7 +1454,6 @@ void FlowDrawQt::nav_clear(FlowCtx* ctx)
unique_ptr<QPainter> painter = new QPainter(nav_window_canvas);
unique_ptr<QPainter> painter = new QPainter(nav_window_canvas);
painter->setBackground(QBrush(background));
painter->setBackground(QBrush(background));
// debug_print("nav_clear color=%s\n\n", painter->background().color().name().toAscii().data());
painter->eraseRect(nav_window_canvas->rect());
painter->eraseRect(nav_window_canvas->rect());
}
}
...
@@ -1507,8 +1465,6 @@ void FlowDrawQt::get_window_size(FlowCtx* ctx, int* width, int* height)
...
@@ -1507,8 +1465,6 @@ void FlowDrawQt::get_window_size(FlowCtx* ctx, int* width, int* height)
void FlowDrawQt::get_nav_window_size(FlowCtx* ctx, int* width, int* height)
void FlowDrawQt::get_nav_window_size(FlowCtx* ctx, int* width, int* height)
{
{
// debug_print("get_nav_window_size, nav_window == NULL ? %d\n", (nav_window
// == NULL));
*width = nav_window->width();
*width = nav_window->width();
*height = nav_window->height();
*height = nav_window->height();
}
}
...
@@ -1654,8 +1610,6 @@ void FlowDrawQt::copy_area(FlowCtx* ctx, int x, int y)
...
@@ -1654,8 +1610,6 @@ void FlowDrawQt::copy_area(FlowCtx* ctx, int x, int y)
return;
return;
}
}
// debug_print("copy_area: x=%d, y=%d\n", x, y);
QPixmap screenShot = QPixmap::grabWidget(window);
QPixmap screenShot = QPixmap::grabWidget(window);
unique_ptr<QPainter> painter = get_painter(flow_eDrawType_Line, 3);
unique_ptr<QPainter> painter = get_painter(flow_eDrawType_Line, 3);
if (x >= 0 && y >= 0) {
if (x >= 0 && y >= 0) {
...
@@ -1711,13 +1665,11 @@ void FlowDrawQt::clear_area(
...
@@ -1711,13 +1665,11 @@ void FlowDrawQt::clear_area(
unique_ptr<QPainter> painter = new QPainter(window_canvas);
unique_ptr<QPainter> painter = new QPainter(window_canvas);
painter->setBackground(QBrush(background));
painter->setBackground(QBrush(background));
// debug_print("clear_area [%d, %d, %d, %d], color=%s\n", ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, painter->background().color().name().toAscii().data());
painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
}
}
void FlowDrawQt::set_inputfocus(FlowCtx* ctx)
void FlowDrawQt::set_inputfocus(FlowCtx* ctx)
{
{
// debug_print("set_inputfocus\n");
window->setFocus(Qt::OtherFocusReason);
window->setFocus(Qt::OtherFocusReason);
}
}
...
@@ -1730,8 +1682,6 @@ void FlowDrawQt::set_white_background(FlowCtx* ctx)
...
@@ -1730,8 +1682,6 @@ void FlowDrawQt::set_white_background(FlowCtx* ctx)
{
{
background = flow_allocate_color(this, "white");
background = flow_allocate_color(this, "white");
// debug_print("set_white_background\n");
QPalette pal;
QPalette pal;
pal.setColor(QPalette::Background, background);
pal.setColor(QPalette::Background, background);
toplevel->setAutoFillBackground(true);
toplevel->setAutoFillBackground(true);
...
@@ -1757,7 +1707,6 @@ void FlowDrawQt::image_scale(float scale, flow_tImImage orig_im,
...
@@ -1757,7 +1707,6 @@ void FlowDrawQt::image_scale(float scale, flow_tImImage orig_im,
if (*im) {
if (*im) {
delete ((QImage*)*im);
delete ((QImage*)*im);
}
}
// debug_print("image_scale\n");
*im = new QImage(((QImage*)orig_im)->scaled(width, height));
*im = new QImage(((QImage*)orig_im)->scaled(width, height));
}
}
...
@@ -1771,8 +1720,6 @@ int FlowDrawQt::image_load(const char* imagefile, float scale, float nav_scale,
...
@@ -1771,8 +1720,6 @@ int FlowDrawQt::image_load(const char* imagefile, float scale, float nav_scale,
strcpy(filename, imagefile);
strcpy(filename, imagefile);
// debug_print("image_load %s\n", imagefile);
// Look for file in $pwrp_exe, $pwr_doc/en_us/orm and $pwr_exe
// Look for file in $pwrp_exe, $pwr_doc/en_us/orm and $pwr_exe
for (int i = 0; i < 3; i++) {
for (int i = 0; i < 3; i++) {
switch (i) {
switch (i) {
...
...
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
488e2a65
...
@@ -906,10 +906,8 @@ int GlowDrawQt::rect_helper(GlowWind* wind, int painter_type, int size, int x,
...
@@ -906,10 +906,8 @@ int GlowDrawQt::rect_helper(GlowWind* wind, int painter_type, int size, int x,
}
}
if (fill) {
if (fill) {
// debug_print("fillRect [%d, %d, %d, %d] painter_type=%d, with color %s\n", x, y, width, height, painter_type, qPrintable(painter->brush().color().name()));
painter->fillRect(x, y, width, height, painter->brush());
painter->fillRect(x, y, width, height, painter->brush());
} else {
} else {
// debug_print("drawRect [%d, %d, %d, %d]\n", x, y, width, height);
painter->setBrush(Qt::NoBrush);
painter->setBrush(Qt::NoBrush);
painter->drawRect(x, y, width, height);
painter->drawRect(x, y, width, height);
}
}
...
@@ -955,7 +953,6 @@ int GlowDrawQt::arrow_helper(GlowWind* wind, int painter_type, int size, int x1,
...
@@ -955,7 +953,6 @@ int GlowDrawQt::arrow_helper(GlowWind* wind, int painter_type, int size, int x1,
QPainterPath path;
QPainterPath path;
path.addPolygon(poly);
path.addPolygon(poly);
// debug_print("arrow (%d, %d) (%d, %d) (%d, %d)\n", x1, y1, x2, y2, x3, y3);
painter->fillPath(path, painter->brush());
painter->fillPath(path, painter->brush());
return 1;
return 1;
...
@@ -1008,10 +1005,8 @@ int GlowDrawQt::arc_helper(GlowWind* wind, int painter_type, int size, int x,
...
@@ -1008,10 +1005,8 @@ int GlowDrawQt::arc_helper(GlowWind* wind, int painter_type, int size, int x,
}
}
if (fill) {
if (fill) {
// debug_print("pie [%d, %d, %d, %d], %d, %d\n", x, y, width, height, angle1, angle2);
painter->drawPie(x, y, width, height, angle1 * 16, angle2 * 16);
painter->drawPie(x, y, width, height, angle1 * 16, angle2 * 16);
} else {
} else {
// debug_print("arc [%d, %d, %d, %d], %d, %d\n", x, y, width, height, angle1, angle2);
painter->setBrush(Qt::NoBrush);
painter->setBrush(Qt::NoBrush);
painter->drawArc(x, y, width, height, angle1 * 16, angle2 * 16);
painter->drawArc(x, y, width, height, angle1 * 16, angle2 * 16);
}
}
...
@@ -1142,7 +1137,6 @@ int GlowDrawQt::line_helper(GlowWind* wind, int painter_type, int size, int x1,
...
@@ -1142,7 +1137,6 @@ int GlowDrawQt::line_helper(GlowWind* wind, int painter_type, int size, int x1,
painter->setPen(pen);
painter->setPen(pen);
}
}
// debug_print("line (%d, %d) (%d, %d)\n", x1, y1, x2, y2);
painter->drawLine(x1, y1, x2, y2);
painter->drawLine(x1, y1, x2, y2);
return 1;
return 1;
...
@@ -1207,7 +1201,6 @@ int GlowDrawQt::polyline_helper(GlowWind* wind, int painter_type, int size,
...
@@ -1207,7 +1201,6 @@ int GlowDrawQt::polyline_helper(GlowWind* wind, int painter_type, int size,
int cnt;
int cnt;
unique_ptr<QPoint[]> qpoints = points_to_qt_points_curve(wind, points, point_cnt, &cnt);
unique_ptr<QPoint[]> qpoints = points_to_qt_points_curve(wind, points, point_cnt, &cnt);
painter->setBrush(Qt::NoBrush);
painter->setBrush(Qt::NoBrush);
// debug_print("polyline painter_type=%d, fill=%d, point_cnt=%d\n", painter_type, fill, point_cnt);
painter->drawPolyline(qpoints.get(), cnt);
painter->drawPolyline(qpoints.get(), cnt);
}
}
...
@@ -1278,7 +1271,6 @@ int GlowDrawQt::text(GlowWind* wind, int x, int y, char* text, int len,
...
@@ -1278,7 +1271,6 @@ int GlowDrawQt::text(GlowWind* wind, int x, int y, char* text, int len,
QRect rect
QRect rect
= painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len));
= painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len));
// debug_print("text %s on %d,%d\n", text, x, y);
painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip,
painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip,
QString::fromLocal8Bit(text, len));
QString::fromLocal8Bit(text, len));
...
@@ -1310,7 +1302,6 @@ int GlowDrawQt::text_cursor(GlowWind* wind, int x, int y, char* text, int len,
...
@@ -1310,7 +1302,6 @@ int GlowDrawQt::text_cursor(GlowWind* wind, int x, int y, char* text, int len,
set_clip(w, painter);
set_clip(w, painter);
}
}
// debug_print("cursor %d,%d to %d,%d\n", x + width, y + descent, x + width, y - height + descent);
painter->drawLine(x + width, y + descent, x + width, y - height + descent);
painter->drawLine(x + width, y + descent, x + width, y - height + descent);
return 1;
return 1;
...
@@ -1352,7 +1343,6 @@ int GlowDrawQt::text_erase(GlowWind* wind, int x, int y, char* text, int len,
...
@@ -1352,7 +1343,6 @@ int GlowDrawQt::text_erase(GlowWind* wind, int x, int y, char* text, int len,
QRect rect
QRect rect
= painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len));
= painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len));
// debug_print("textErase %s on %d,%d\n", text, x, y);
painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip,
painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip,
QString::fromLocal8Bit(text, len));
QString::fromLocal8Bit(text, len));
...
@@ -1410,7 +1400,6 @@ int GlowDrawQt::image_helper(GlowWind* wind, int x, int y, int width,
...
@@ -1410,7 +1400,6 @@ int GlowDrawQt::image_helper(GlowWind* wind, int x, int y, int width,
set_clip(w, painter);
set_clip(w, painter);
}
}
// debug_print("image [%d, %d, %d, %d]\n", x, y, width, height);
if (d) {
if (d) {
painter->drawImage(QPoint(x, y), *((QImage*)image));
painter->drawImage(QPoint(x, y), *((QImage*)image));
} else {
} else {
...
@@ -1637,8 +1626,6 @@ void GlowDrawQt::copy_area(GlowWind* wind, int x, int y)
...
@@ -1637,8 +1626,6 @@ void GlowDrawQt::copy_area(GlowWind* wind, int x, int y)
window_height = ctx->navw.window_height;
window_height = ctx->navw.window_height;
}
}
// debug_print("copy_area [%d, %d, %d, %d]\n", x, y, window_width, window_height);
unique_ptr<QPainter> painterBuffer
unique_ptr<QPainter> painterBuffer
= get_painter(w->buffer, this, glow_eDrawType_Line, 3);
= get_painter(w->buffer, this, glow_eDrawType_Line, 3);
if (x >= 0 && y >= 0) {
if (x >= 0 && y >= 0) {
...
@@ -1691,8 +1678,6 @@ void GlowDrawQt::clear_area(
...
@@ -1691,8 +1678,6 @@ void GlowDrawQt::clear_area(
unique_ptr<QPainter> painter = new QPainter(w->buffer);
unique_ptr<QPainter> painter = new QPainter(w->buffer);
painter->setBackground(QBrush(background));
painter->setBackground(QBrush(background));
// debug_print("clear_area [%d, %d, %d, %d], color=%s\n", ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, qPrintable(painter->background().color().name()));
painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
}
}
...
@@ -1780,8 +1765,6 @@ void GlowDrawQt::set_background(GlowWind* wind, glow_eDrawType drawtype,
...
@@ -1780,8 +1765,6 @@ void GlowDrawQt::set_background(GlowWind* wind, glow_eDrawType drawtype,
delete w->background_pixmap;
delete w->background_pixmap;
}
}
// debug_print("set_background\n");
w->background_pixmap = new QPixmap(QPixmap::fromImage(*((QImage*)image)));
w->background_pixmap = new QPixmap(QPixmap::fromImage(*((QImage*)image)));
w->background_pixmap_width = pixmap_width;
w->background_pixmap_width = pixmap_width;
w->background_pixmap_height = pixmap_height;
w->background_pixmap_height = pixmap_height;
...
@@ -2256,8 +2239,6 @@ void GlowDrawQt::image_copy(glow_tImImage orig_image, glow_tImImage* image)
...
@@ -2256,8 +2239,6 @@ void GlowDrawQt::image_copy(glow_tImImage orig_image, glow_tImImage* image)
delete ((QImage*)*image);
delete ((QImage*)*image);
}
}
// debug_print("image_copy\n");
*image = new QImage(((QImage*)orig_image)->copy());
*image = new QImage(((QImage*)orig_image)->copy());
}
}
...
@@ -2269,8 +2250,6 @@ void GlowDrawQt::image_rotate(
...
@@ -2269,8 +2250,6 @@ void GlowDrawQt::image_rotate(
QTransform trans;
QTransform trans;
trans.rotate(drot);
trans.rotate(drot);
// debug_print("image_rotate\n");
QImage* im = new QImage(((QImage*)*image)->transformed(trans));
QImage* im = new QImage(((QImage*)*image)->transformed(trans));
delete ((QImage*)*image);
delete ((QImage*)*image);
*image = (glow_tImImage)im;
*image = (glow_tImImage)im;
...
@@ -2278,8 +2257,6 @@ void GlowDrawQt::image_rotate(
...
@@ -2278,8 +2257,6 @@ void GlowDrawQt::image_rotate(
void GlowDrawQt::image_flip_vertical(glow_tImImage* image)
void GlowDrawQt::image_flip_vertical(glow_tImImage* image)
{
{
// debug_print("image_flip_vertical\n");
QImage* im = new QImage(((QImage*)*image)->mirrored());
QImage* im = new QImage(((QImage*)*image)->mirrored());
delete ((QImage*)*image);
delete ((QImage*)*image);
*image = (glow_tImImage)im;
*image = (glow_tImImage)im;
...
@@ -2287,8 +2264,6 @@ void GlowDrawQt::image_flip_vertical(glow_tImImage* image)
...
@@ -2287,8 +2264,6 @@ void GlowDrawQt::image_flip_vertical(glow_tImImage* image)
void GlowDrawQt::image_flip_horizontal(glow_tImImage* image)
void GlowDrawQt::image_flip_horizontal(glow_tImImage* image)
{
{
// debug_print("image_flip_horizontal\n");
QImage* im = new QImage(((QImage*)*image)->mirrored(true, false));
QImage* im = new QImage(((QImage*)*image)->mirrored(true, false));
delete ((QImage*)*image);
delete ((QImage*)*image);
*image = (glow_tImImage)im;
*image = (glow_tImImage)im;
...
@@ -2298,8 +2273,6 @@ int GlowDrawQt::image_scale(int width, int height, glow_tImImage orig_im,
...
@@ -2298,8 +2273,6 @@ int GlowDrawQt::image_scale(int width, int height, glow_tImImage orig_im,
glow_tImImage* im, glow_tImData* im_data, glow_tPixmap* im_pixmap,
glow_tImImage* im, glow_tImData* im_data, glow_tPixmap* im_pixmap,
glow_tPixmap* im_mask)
glow_tPixmap* im_mask)
{
{
// debug_print("image_scale\n");
if (width == ((QImage*)*im)->width() && height == ((QImage*)*im)->height()) {
if (width == ((QImage*)*im)->width() && height == ((QImage*)*im)->height()) {
return 0;
return 0;
}
}
...
@@ -2372,8 +2345,6 @@ void GlowDrawQt::image_pixel_iter(glow_tImImage orig_image,
...
@@ -2372,8 +2345,6 @@ void GlowDrawQt::image_pixel_iter(glow_tImImage orig_image,
int rgb_width;
int rgb_width;
int rowstride;
int rowstride;
// debug_print("image_pixel_iter\n");
if (orig_image) {
if (orig_image) {
if (image && *image != orig_image) {
if (image && *image != orig_image) {
delete ((QImage*)*image);
delete ((QImage*)*image);
...
@@ -2984,7 +2955,6 @@ int GlowDrawQt::text_qt(GlowWind* wind, int x, int y, char* text, int len,
...
@@ -2984,7 +2955,6 @@ int GlowDrawQt::text_qt(GlowWind* wind, int x, int y, char* text, int len,
px = x;
px = x;
py = (int)(y - (1.0 - FONT_DESCENT) * height);
py = (int)(y - (1.0 - FONT_DESCENT) * height);
}
}
// debug_print("textQt %s on %d,%d with color %s, painter_type=%d, color=%d\n", text, px, py, qPrintable(painter->pen().color().name()), painter_type, color);
painter->drawText(px, py, rect.width(), rect.height(), Qt::TextDontClip, str);
painter->drawText(px, py, rect.width(), rect.height(), Qt::TextDontClip, str);
return 1;
return 1;
...
@@ -3053,7 +3023,6 @@ int GlowDrawQt::text_erase_qt(GlowWind* wind, int x, int y, char* text, int len,
...
@@ -3053,7 +3023,6 @@ int GlowDrawQt::text_erase_qt(GlowWind* wind, int x, int y, char* text, int len,
set_clip(w, painter);
set_clip(w, painter);
}
}
// debug_print("textEraseQt %s on %d,%d\n", text, px, py);
painter->fillRect(px, py, pw, ph, painter->brush());
painter->fillRect(px, py, pw, ph, painter->brush());
return 1;
return 1;
...
...
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