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
b0ef4d54
Commit
b0ef4d54
authored
Sep 27, 2019
by
Marcus Nordenberg
Committed by
Claes Sjöfors
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt_xtt_qt: change placement of operator window in accordance to opplace object
parent
d16e5a1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
xtt/lib/xtt/qt/xtt_op_qt.cqt
xtt/lib/xtt/qt/xtt_op_qt.cqt
+14
-5
xtt/lib/xtt/qt/xtt_op_qt.h
xtt/lib/xtt/qt/xtt_op_qt.h
+1
-0
No files found.
xtt/lib/xtt/qt/xtt_op_qt.cqt
View file @
b0ef4d54
...
@@ -154,7 +154,6 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
...
@@ -154,7 +154,6 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
toplevel->setWindowFlags(Qt::CustomizeWindowHint);
toplevel->setWindowFlags(Qt::CustomizeWindowHint);
CoWowQt::SetWindowIcon(toplevel);
CoWowQt::SetWindowIcon(toplevel);
QRect xtt_monitor_geometry = QApplication::desktop()->screenGeometry();
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 5; i++) {
aalarm_active[i] = new_image_label(toplevel, "$pwr_exe/xtt_alarm_active.png");
aalarm_active[i] = new_image_label(toplevel, "$pwr_exe/xtt_alarm_active.png");
...
@@ -378,11 +377,11 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
...
@@ -378,11 +377,11 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
if (sup_vect.size() > 10) {
if (sup_vect.size() > 10) {
padding1 = 0;
padding1 = 0;
padding2 = 0;
padding2 = 0;
buttonwidth = (
xtt_
monitor_geometry.width() - 350) / sup_vect.size();
buttonwidth = (monitor_geometry.width() - 350) / sup_vect.size();
} else if (sup_vect.size() > 6) {
} else if (sup_vect.size() > 6) {
padding1 = 8;
padding1 = 8;
padding2 = 5;
padding2 = 5;
buttonwidth = (
xtt_
monitor_geometry.width() - 350) / sup_vect.size()
buttonwidth = (monitor_geometry.width() - 350) / sup_vect.size()
- 2 * padding2;
- 2 * padding2;
} else {
} else {
padding1 = 8;
padding1 = 8;
...
@@ -476,8 +475,8 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
...
@@ -476,8 +475,8 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
toplevel->activate_aalarm_decr();
toplevel->activate_aalarm_decr();
}
}
toplevel->resize(
xtt_
monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR);
toplevel->resize(monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR);
toplevel->move(
0
, 0);
toplevel->move(
monitor_geometry.x()
, 0);
wow = new CoWowQt(toplevel);
wow = new CoWowQt(toplevel);
sup_timerid = wow->timer_new();
sup_timerid = wow->timer_new();
...
@@ -819,6 +818,16 @@ int OpQt::configure(char* opplace_str)
...
@@ -819,6 +818,16 @@ int OpQt::configure(char* opplace_str)
start_jop = 1;
start_jop = 1;
}
}
int numberOfMonitors = QApplication::desktop()->screenCount();
int monitor = opplace_p->Monitor;
if (monitor > numberOfMonitors || monitor < 0) monitor = 0;
if (monitor == 0) monitor = QApplication::desktop()->primaryScreen();
else monitor = opplace_p->Monitor - 1;
monitor_geometry = QApplication::desktop()->screenGeometry(monitor);
// Examine Graph objects
// Examine Graph objects
for (i = 0;
for (i = 0;
i < sizeof(opplace_p->FastAvail) / sizeof(opplace_p->FastAvail[0]);
i < sizeof(opplace_p->FastAvail) / sizeof(opplace_p->FastAvail[0]);
...
...
xtt/lib/xtt/qt/xtt_op_qt.h
View file @
b0ef4d54
...
@@ -100,6 +100,7 @@ public:
...
@@ -100,6 +100,7 @@ public:
char
a_alarm_moretext
[
5
][
256
];
char
a_alarm_moretext
[
5
][
256
];
char
b_alarm_moretext
[
256
];
char
b_alarm_moretext
[
256
];
int
text_size
;
int
text_size
;
QRect
monitor_geometry
;
CoWowFocusTimerQt
poptimer
;
CoWowFocusTimerQt
poptimer
;
std
::
vector
<
OpCmd
>
cmd_vect
;
std
::
vector
<
OpCmd
>
cmd_vect
;
...
...
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