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
5dcb0632
Commit
5dcb0632
authored
Jun 26, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed printing in QT
parent
279b1f38
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
32 additions
and
32 deletions
+32
-32
wb/lib/wb/qt/wb_bckw_qt.cqt
wb/lib/wb/qt/wb_bckw_qt.cqt
+2
-1
wb/lib/wb/qt/wb_expw_qt.cqt
wb/lib/wb/qt/wb_expw_qt.cqt
+2
-1
wb/lib/wb/qt/wb_foe_qt.cqt
wb/lib/wb/qt/wb_foe_qt.cqt
+2
-2
wb/lib/wb/qt/wb_watt_qt.cqt
wb/lib/wb/qt/wb_watt_qt.cqt
+1
-1
wb/lib/wb/qt/wb_xcrr_qt.cqt
wb/lib/wb/qt/wb_xcrr_qt.cqt
+1
-1
xtt/lib/cow/qt/cow_logw_qt.cqt
xtt/lib/cow/qt/cow_logw_qt.cqt
+1
-1
xtt/lib/cow/qt/cow_msgwindow_qt.cqt
xtt/lib/cow/qt/cow_msgwindow_qt.cqt
+1
-1
xtt/lib/cow/qt/cow_xhelp_qt.cqt
xtt/lib/cow/qt/cow_xhelp_qt.cqt
+1
-1
xtt/lib/flow/qt/flow_printdraw_qt.cpp
xtt/lib/flow/qt/flow_printdraw_qt.cpp
+18
-20
xtt/lib/xtt/qt/xtt_evlist_qt.cpp
xtt/lib/xtt/qt/xtt_evlist_qt.cpp
+1
-1
xtt/lib/xtt/qt/xtt_xatt_qt.cqt
xtt/lib/xtt/qt/xtt_xatt_qt.cqt
+1
-1
xtt/lib/xtt/qt/xtt_xcrr_qt.cqt
xtt/lib/xtt/qt/xtt_xcrr_qt.cqt
+1
-1
No files found.
wb/lib/wb/qt/wb_bckw_qt.cqt
View file @
5dcb0632
...
...
@@ -129,7 +129,8 @@ void WbBckWQt::print()
pwr_tStatus sts;
CoWowQt::CreateBrowPrintDialogQt(name, bckwnav->brow->ctx,
flow_eOrientation_Portrait, 1.0, this, &sts);
flow_eOrientation_Portrait, 1.0,
toplevel, &sts);
}
void WbBckWQtWidget::focusInEvent(QFocusEvent *event)
...
...
wb/lib/wb/qt/wb_expw_qt.cqt
View file @
5dcb0632
...
...
@@ -136,7 +136,8 @@ void WbExpWQt::print()
pwr_tStatus sts;
CoWowQt::CreateBrowPrintDialogQt(name, expwnav->brow->ctx,
flow_eOrientation_Portrait, 1.0, this, &sts);
flow_eOrientation_Portrait, 1.0, toplevel,
&sts);
}
void WbExpWQtWidget::focusInEvent(QFocusEvent *event)
...
...
wb/lib/wb/qt/wb_foe_qt.cqt
View file @
5dcb0632
...
...
@@ -97,8 +97,8 @@ void WFoeQtWidget::activate_printdialog()
{
pwr_tStatus sts;
CoWowQt::CreateFlowPrintDialogQt("PlcEditor", foe->gre->flow_ctx,
flow_eOrientation_Landscape, 1.0,
this,
&sts);
flow_eOrientation_Landscape, 1.0,
this,
&sts);
}
void WFoeQtWidget::activate_createobject()
...
...
wb/lib/wb/qt/wb_watt_qt.cqt
View file @
5dcb0632
...
...
@@ -194,7 +194,7 @@ void WAttQt::print(const char *title)
CoWowQt::CreateBrowPrintDialogQt(title, wattnav->brow->ctx,
flow_eOrientation_Portrait, 1.0,
(void *) this
, &sts);
toplevel
, &sts);
}
void WAttQt::change_value_close()
...
...
wb/lib/wb/qt/wb_xcrr_qt.cqt
View file @
5dcb0632
...
...
@@ -99,7 +99,7 @@ void WCrrQt::print()
CoWowQt::CreateBrowPrintDialogQt(title, xcrrnav->brow->ctx,
flow_eOrientation_Portrait, 1.0,
(void *) this
, &sts);
toplevel
, &sts);
}
void WCrrQtWidget::closeEvent(QCloseEvent *event)
...
...
xtt/lib/cow/qt/cow_logw_qt.cqt
View file @
5dcb0632
...
...
@@ -102,7 +102,7 @@ void CoLogWQt::print()
CoWowQt::CreateBrowPrintDialogQt(name, logwnav->brow->ctx,
flow_eOrientation_Portrait, 1.0,
(void *) this
, &sts);
toplevel
, &sts);
}
void CoLogWQtWidget::focusInEvent(QFocusEvent *event)
...
...
xtt/lib/cow/qt/cow_msgwindow_qt.cqt
View file @
5dcb0632
...
...
@@ -147,7 +147,7 @@ void MsgWindowQt::print()
CoWowQt::CreateBrowPrintDialogQt(title, msgnav->brow->ctx,
flow_eOrientation_Landscape, 1.4,
(void *) this
, &sts);
toplevel
, &sts);
}
void MsgWindowQtWidget::focusInEvent(QFocusEvent *event)
...
...
xtt/lib/cow/qt/cow_xhelp_qt.cqt
View file @
5dcb0632
...
...
@@ -174,7 +174,7 @@ void CoXHelpQt::print()
CoWowQt::CreateBrowPrintDialogQt(title, xhelpnav->brow->ctx,
flow_eOrientation_Portrait, 0.7,
(void *) this
, &sts);
toplevel
, &sts);
}
void CoXHelpQtWidget::closeEvent(QCloseEvent *event)
...
...
xtt/lib/flow/qt/flow_printdraw_qt.cpp
View file @
5dcb0632
...
...
@@ -57,6 +57,7 @@ FlowPrintDrawQt::FlowPrintDrawQt(void *context, const char *t, int p,
print_margin_x
=
10
;
print_margin_y
=
10
;
}
print_margin_x
=
print_margin_y
=
0
;
*
sts
=
1
;
}
...
...
@@ -77,6 +78,7 @@ int FlowPrintDrawQt::print_page(double ll_x, double ll_y, double ur_x,
print_margin_y
=
10
;
}
}
print_margin_x
=
print_margin_y
=
0
;
if
(
ur_x
-
ll_x
>
ur_y
-
ll_y
)
{
ctx
->
print_zoom_factor
=
730
/
(
ur_x
-
ll_x
);
...
...
@@ -104,7 +106,6 @@ int FlowPrintDrawQt::print_page(double ll_x, double ll_y, double ur_x,
sprintf
(
page_str
,
"Page %d"
,
page
+
1
);
painter
->
drawText
(
print_margin_x
+
width
-
90
,
print_margin_y
-
height
,
fl
(
page_str
));
painter
->
drawText
(
print_margin_x
,
print_margin_y
-
height
,
fl
(
title
));
}
...
...
@@ -134,6 +135,7 @@ int FlowPrintDrawQt::rect(double x, double y, double width, double height,
pen
.
setWidth
(
0.5
*
idx
);
painter
->
setPen
(
pen
);
painter
->
setBrush
(
Qt
::
NoBrush
);
painter
->
drawRect
(
print_margin_x
+
x
-
page_x
,
print_margin_y
+
y
-
page_y
,
width
,
height
);
...
...
@@ -143,27 +145,22 @@ int FlowPrintDrawQt::rect(double x, double y, double width, double height,
int
FlowPrintDrawQt
::
filled_rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
)
{
QBrush
brush
=
painter
->
brush
();
switch
(
type
)
{
case
flow_eDrawType_LineRed
:
brush
.
setColor
(
QColor
::
fromRgbF
(
1
,
0
,
0
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
1
,
0
,
0
)
));
break
;
case
flow_eDrawType_Green
:
brush
.
setColor
(
QColor
::
fromRgbF
(
0
,
1
,
0
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
0
,
1
,
0
)
));
break
;
case
flow_eDrawType_Yellow
:
brush
.
setColor
(
QColor
::
fromRgbF
(
1
,
1
,
0
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
1
,
1
,
0
)
));
break
;
case
flow_eDrawType_DarkGray
:
brush
.
setColor
(
QColor
::
fromRgbF
(
0.3
,
0.3
,
0.3
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
0.3
,
0.3
,
0.3
)
));
break
;
default:
brush
.
setColor
(
QColor
::
fromRgbF
(
0
,
0
,
0
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
0
,
0
,
0
)
));
}
painter
->
setBrush
(
brush
);
painter
->
fillRect
(
print_margin_x
+
x
-
page_x
,
print_margin_y
+
y
-
page_y
,
width
,
height
,
painter
->
brush
());
QPen
pen
=
QPen
(
QColor
::
fromRgbF
(
0
,
0
,
0
));
pen
.
setWidth
(
0.5
*
idx
);
...
...
@@ -251,16 +248,17 @@ int FlowPrintDrawQt::line(double x1, double y1, double x2, double y2,
int
FlowPrintDrawQt
::
text
(
double
x
,
double
y
,
char
*
text
,
int
len
,
flow_eDrawType
type
,
double
size
,
int
line
)
{
char
font
[
40
]
;
QFont
font
;
switch
(
type
)
{
case
flow_eDrawType_TextHelvetica
:
sprintf
(
font
,
"Lucida Sans %3.1f"
,
1.0
*
size
);
font
=
QFont
(
fl
(
"Lucida Sans"
),
-
1
);
break
;
case
flow_eDrawType_TextHelveticaBold
:
sprintf
(
font
,
"Lucida Sans Bold %3.1f"
,
1.0
*
size
);
font
=
QFont
(
fl
(
"Lucida Sans"
),
-
1
,
QFont
::
Bold
);
break
;
default:
;
}
font
.
setPointSizeF
(
size
);
char
*
s
;
for
(
s
=
text
;
*
s
;
s
++
)
{
...
...
@@ -272,14 +270,11 @@ int FlowPrintDrawQt::text(double x, double y, char *text, int len,
if
(
s
-
text
>
0
)
{
QString
textutf8
=
QString
::
fromLatin1
(
text
,
s
-
text
);
painter
->
setFont
(
fl
(
font
));
QBrush
target
=
painter
->
brush
();
target
.
setColor
(
QColor
::
fromRgbF
(
0
,
0
,
0
));
painter
->
setBrush
(
target
);
painter
->
setFont
(
font
);
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
0
,
0
,
0
)));
painter
->
drawText
(
print_margin_x
+
x
-
page_x
,
print_margin_y
+
y
-
page_y
-
0.8
/
1024
*
size
*
1093
+
0.4
/
1024
*
size
*
1093
*
line
,
textutf8
);
print_margin_y
+
y
-
page_y
,
textutf8
);
}
return
1
;
...
...
@@ -318,12 +313,15 @@ int FlowPrintDrawQt::arrow(double x1, double y1, double x2, double y2,
switch
(
type
)
{
case
flow_eDrawType_LineRed
:
painter
->
setPen
(
QColor
::
fromRgbF
(
1
,
0
,
0
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
1
,
0
,
0
)));
break
;
case
flow_eDrawType_LineGray
:
painter
->
setPen
(
QColor
::
fromRgbF
(
0.7
,
0.7
,
0.7
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
0.7
,
0.7
,
0.7
)));
break
;
default:
painter
->
setPen
(
QColor
::
fromRgbF
(
0
,
0
,
0
));
painter
->
setBrush
(
QBrush
(
QColor
::
fromRgbF
(
0
,
0
,
0
)));
break
;
}
...
...
xtt/lib/xtt/qt/xtt_evlist_qt.cpp
View file @
5dcb0632
...
...
@@ -117,7 +117,7 @@ void EvListQt::print(const char *title)
}
CoWowQt
::
CreateBrowPrintDialogQt
(
print_title
,
brow
->
ctx
,
flow_eOrientation_Landscape
,
1.0
,
0
,
&
sts
);
flow_eOrientation_Landscape
,
1.0
,
form_widget
,
&
sts
);
if
(
sts
==
WOW__PRINTDIALOGDISABLED
)
{
pwr_tFileName
filename
;
pwr_tCmd
cmd
;
...
...
xtt/lib/xtt/qt/xtt_xatt_qt.cqt
View file @
5dcb0632
...
...
@@ -302,7 +302,7 @@ void XAttQt::print()
CoWowQt::CreateBrowPrintDialogQt(title, xattnav->brow->ctx,
flow_eOrientation_Portrait, 1.0,
(void *) this
, &sts);
toplevel
, &sts);
}
void XAttQtWidget::closeEvent(QCloseEvent *event)
...
...
xtt/lib/xtt/qt/xtt_xcrr_qt.cqt
View file @
5dcb0632
...
...
@@ -97,7 +97,7 @@ void XCrrQt::print()
CoWowQt::CreateBrowPrintDialogQt(title, xcrrnav->brow->ctx,
flow_eOrientation_Portrait, 1.0,
(void *) this
, &sts);
toplevel
, &sts);
}
void XCrrQtWidget::closeEvent(QCloseEvent *event)
...
...
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