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
88ec2e2a
Commit
88ec2e2a
authored
Sep 27, 2019
by
Marcus Nordenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt_xtt_qt: change placement of operator window in accordance to opplace object
parent
5c2ccbaa
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 @
88ec2e2a
...
...
@@ -159,7 +159,6 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
toplevel->setWindowFlags(Qt::CustomizeWindowHint);
CoWowQt::SetWindowIcon(toplevel);
QRect xtt_monitor_geometry = QApplication::desktop()->screenGeometry();
pwr_tFileName fname;
dcli_translate_filename(fname, "$pwr_exe/xtt_alarm_active.png");
...
...
@@ -383,11 +382,11 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
if (sup_vect.size() > 10) {
padding1 = 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) {
padding1 = 8;
padding2 = 5;
buttonwidth = (
xtt_
monitor_geometry.width() - 350) / sup_vect.size()
buttonwidth = (monitor_geometry.width() - 350) / sup_vect.size()
- 2 * padding2;
} else {
padding1 = 8;
...
...
@@ -479,8 +478,8 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
toplevel->activate_aalarm_decr();
}
toplevel->resize(
xtt_
monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR);
toplevel->move(
0
, 0);
toplevel->resize(monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR);
toplevel->move(
monitor_geometry.x()
, 0);
wow = new CoWowQt(toplevel);
sup_timerid = wow->timer_new();
...
...
@@ -810,6 +809,16 @@ int OpQt::configure(char* opplace_str)
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
for (i = 0;
i < sizeof(opplace_p->FastAvail) / sizeof(opplace_p->FastAvail[0]);
...
...
xtt/lib/xtt/qt/xtt_op_qt.h
View file @
88ec2e2a
...
...
@@ -97,6 +97,7 @@ public:
char
a_alarm_moretext
[
5
][
256
];
char
b_alarm_moretext
[
256
];
int
text_size
;
QRect
monitor_geometry
;
CoWowFocusTimerQt
poptimer
;
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