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
503c02d7
Commit
503c02d7
authored
Sep 30, 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: show all available application buttons as default
parent
71cc522b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
25 deletions
+42
-25
xtt/lib/xtt/qt/xtt_op_qt.cqt
xtt/lib/xtt/qt/xtt_op_qt.cqt
+42
-25
No files found.
xtt/lib/xtt/qt/xtt_op_qt.cqt
View file @
503c02d7
...
...
@@ -135,7 +135,7 @@ void ClickableFrame::mousePressEvent(QMouseEvent* event) {
}
OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
: Op(op_parent_ctx, opplace, status), title_label(0), a_height(
2
),
: Op(op_parent_ctx, opplace, status), title_label(0), a_height(
5
),
text_size(12)
{
pwr_tStatus sts;
...
...
@@ -461,21 +461,13 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
aalarm_box[3]->setVisible(false);
aalarm_box[4]->setVisible(false);
balarm_box->setVisible(false);
decr_button->setVisible(false);
//
decr_button->setVisible(false);
if (layout_mask & pwr_mOpWindLayoutMask_HideCloseButton) {
tools_close->setVisible(false);
functions_close->setVisible(false);
}
if (a_height == 5) {
toplevel->activate_aalarm_decr();
}
if (a_height == 4) {
toplevel->activate_aalarm_decr();
toplevel->activate_aalarm_decr();
}
toplevel->resize(monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR);
toplevel->resize(monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR + (a_height - 3) * OP_HEIGHT_INC);
toplevel->move(monitor_geometry.x(), 0);
wow = new CoWowQt(toplevel);
...
...
@@ -903,6 +895,7 @@ int OpQt::configure(char* opplace_str)
}
// Create the application buttons
int showRow[5] = {1, 1, 1, 0, 0};
for (i = 0;
i < sizeof(opplace_p->FastAvail) / sizeof(opplace_p->FastAvail[0]);
i++) {
...
...
@@ -920,21 +913,29 @@ int OpQt::configure(char* opplace_str)
for (i = 0;
i < sizeof(opplace_p->FastAvail) / sizeof(opplace_p->FastAvail[0]);
i++) {
if (
(i == 0) || ((i + 1) % 5 == 0)
) {
funcbox[
(i + 1)
/ 5] = layout_to_widget(new QHBoxLayout());
appl_form->addWidget(funcbox[
(i + 1)
/ 5]);
if (
i % 5 == 0
) {
funcbox[
i
/ 5] = layout_to_widget(new QHBoxLayout());
appl_form->addWidget(funcbox[
i
/ 5]);
}
if (cdh_ObjidIsNotNull(button_aref[i].Objid)) {
int i2 = (int)(i / 5);
add_expanding(funcbox[i2]->layout(), appl_buttons[i]);
if (i >= 15) {
a_height = i2 + 1;
}
showRow[i / 5] = 1;
add_expanding(funcbox[i / 5]->layout(), appl_buttons[i]);
}
}
appl_form->addStretch(1);
// Start checking at the last row
for (int row = (sizeof(showRow) / sizeof(showRow[0])) - 1; row >= 0; row--)
{
if (showRow[row])
{
for (int height = a_height - 1; height > row; height--)
toplevel->activate_aalarm_decr();
break;
}
}
return XNAV__SUCCESS;
}
...
...
@@ -991,13 +992,18 @@ void OpQtWidget::activate_aalarm_incr()
+ ((op->layout_mask & pwr_mOpWindLayoutMask_HideStatusBar) ? 0 : 1)
* OP_HEIGHT_STATUSBAR;
if (op->a_height
=
= 3) {
if (op->a_height
>
= 3) {
op->decr_button->setVisible(true);
} else if (op->a_height == 4) {
}
if (op->a_height >= 4) {
op->funcbox[3]->setVisible(true);
} else if (op->a_height == 5) {
}
if (op->a_height >= 5) {
op->funcbox[4]->setVisible(true);
}
for (int i = 2; i < 5; i++) {
if (i < op->a_height) {
if (op->a_exist[i]) {
...
...
@@ -1010,6 +1016,8 @@ void OpQtWidget::activate_aalarm_incr()
}
}
}
resize(width, height);
}
...
...
@@ -1027,13 +1035,22 @@ void OpQtWidget::activate_aalarm_decr()
+ ((op->layout_mask & pwr_mOpWindLayoutMask_HideStatusBar) ? 0 : 1)
* OP_HEIGHT_STATUSBAR;
if (op->a_height
=
= 2) {
if (op->a_height
<
= 2) {
op->decr_button->setVisible(false);
} else if (op->a_height == 3) {
}
else
{
op->decr_button->setVisible(true);
}
if (op->a_height <= 3) {
op->funcbox[3]->setVisible(false);
} else if (op->a_height == 4) {
}
if (op->a_height <= 4) {
op->funcbox[4]->setVisible(false);
}
for (int i = 2; i < 5; i++) {
if (i >= op->a_height) {
if (op->a_exist[i]) {
...
...
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