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
07427a46
Commit
07427a46
authored
Oct 08, 2019
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master'
parents
c44f18f0
e8a986ab
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
808 additions
and
649 deletions
+808
-649
src/exp/inc/src/pwrp_rules.mk
src/exp/inc/src/pwrp_rules.mk
+3
-3
src/wbl/pwrb/src/pwrb_c_opplace.wb_load
src/wbl/pwrb/src/pwrb_c_opplace.wb_load
+47
-35
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+4
-6
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
+697
-576
xtt/lib/xtt/gtk/xtt_op_gtk.h
xtt/lib/xtt/gtk/xtt_op_gtk.h
+1
-0
xtt/lib/xtt/qt/xtt_op_qt.cqt
xtt/lib/xtt/qt/xtt_op_qt.cqt
+55
-29
xtt/lib/xtt/qt/xtt_op_qt.h
xtt/lib/xtt/qt/xtt_op_qt.h
+1
-0
No files found.
src/exp/inc/src/pwrp_rules.mk
View file @
07427a46
...
@@ -36,7 +36,7 @@ $(pwrp_obj)/%.o : %.c
...
@@ -36,7 +36,7 @@ $(pwrp_obj)/%.o : %.c
($(pwrp_obj)/%.o)
:
%.c
($(pwrp_obj)/%.o)
:
%.c
@
echo
"cc ar
$(
notdir
$(source)
)
"
@
echo
"cc ar
$(
notdir
$(source)
)
"
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
-c
-o
$%
$(source)
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
-c
-o
$%
$(source)
@
ar
-Ur
$(target)
$%
@
ar
rU
$(target)
$%
$(pwrp_obj)/%.o
:
%.cpp
$(pwrp_obj)/%.o
:
%.cpp
@
echo
"cc
$(
notdir
$(source)
)
"
@
echo
"cc
$(
notdir
$(source)
)
"
...
@@ -45,7 +45,7 @@ $(pwrp_obj)/%.o : %.cpp
...
@@ -45,7 +45,7 @@ $(pwrp_obj)/%.o : %.cpp
($(pwrp_obj)/%.o)
:
%.cpp
($(pwrp_obj)/%.o)
:
%.cpp
@
echo
"cc ar
$(
notdir
$(source)
)
"
@
echo
"cc ar
$(
notdir
$(source)
)
"
@
$(cxx)
$(cxxflags)
$(csetos)
$(cinc)
-c
-o
$%
$(source)
@
$(cxx)
$(cxxflags)
$(csetos)
$(cinc)
-c
-o
$%
$(source)
@
ar
-Ur
$(target)
$%
@
ar
rU
$(target)
$%
$(pwrp_obj)/%.o
:
%.for
$(pwrp_obj)/%.o
:
%.for
@
echo
"fortran77
$(
notdir
$(source)
)
"
@
echo
"fortran77
$(
notdir
$(source)
)
"
...
@@ -54,7 +54,7 @@ $(pwrp_obj)/%.o : %.for
...
@@ -54,7 +54,7 @@ $(pwrp_obj)/%.o : %.for
($(pwrp_obj)/%.o)
:
%.for
($(pwrp_obj)/%.o)
:
%.for
@
echo
"fortran77 ar
$(
notdir
$(source)
)
"
@
echo
"fortran77 ar
$(
notdir
$(source)
)
"
@
$(f77)
$(f77flags)
$(f77inc)
-c
-o
$%
$(source)
@
$(f77)
$(f77flags)
$(f77inc)
-c
-o
$%
$(source)
@
ar
-Ur
$(target)
$%
@
ar
rU
$(target)
$%
$(pwrp_inc)/%.h
:
%.msg
$(pwrp_inc)/%.h
:
%.msg
@
echo
"Msg to h
$(source)
"
@
echo
"Msg to h
$(source)
"
...
...
src/wbl/pwrb/src/pwrb_c_opplace.wb_load
View file @
07427a46
...
@@ -99,10 +99,10 @@ SObject pwrb:Class
...
@@ -99,10 +99,10 @@ SObject pwrb:Class
EndBody
EndBody
EndObject
EndObject
!/**
!/**
! Specifies on which
monitor
the operator dialogue will
! Specifies on which
display
the operator dialogue will
! take place.
! take place.
! If the operator communication is run on the local node
! If the operator communication is run on the local node
! and the display is to be displayed on the own
monitor
! and the display is to be displayed on the own
display
! ('default display') the Display attribute ought to be
! ('default display') the Display attribute ought to be
! left blank.
! left blank.
!*/
!*/
...
@@ -246,7 +246,7 @@ SObject pwrb:Class
...
@@ -246,7 +246,7 @@ SObject pwrb:Class
! in respective node. In each node the message handler
! in respective node. In each node the message handler
! has its own skyline of events (also named MaxNoOfEvents)
! has its own skyline of events (also named MaxNoOfEvents)
! defined by a MessageHandler object. In principle, the
! defined by a MessageHandler object. In principle, the
! User object's skyline of events should be selected as
å
! User object's skyline of events should be selected as
�
! MaxNoOfEvents, added up over MaxNoOfEvents in the
! MaxNoOfEvents, added up over MaxNoOfEvents in the
! MessageHandler objects in all nodes throughout the
! MessageHandler objects in all nodes throughout the
! ProviewR system, or make it simple and assign the
! ProviewR system, or make it simple and assign the
...
@@ -356,6 +356,17 @@ SObject pwrb:Class
...
@@ -356,6 +356,17 @@ SObject pwrb:Class
Body SysBody
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndBody
EndObject
!/**
! Override on what monitor the operator panel will show up. Default 0
! will use the primary monitor of the system. A value of 1 selects the first
! monitor and so on and so forth.
!*/
Object Monitor $Attribute 53
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags = 0
EndBody
EndObject
EndObject
EndObject
EndObject
Object Template OpPlace
Object Template OpPlace
...
@@ -366,6 +377,7 @@ SObject pwrb:Class
...
@@ -366,6 +377,7 @@ SObject pwrb:Class
Attr OpWindEventNameSegments = 2
Attr OpWindEventNameSegments = 2
Attr MaxNoOfAlarms = 200
Attr MaxNoOfAlarms = 200
Attr MaxNoOfEvents = 500
Attr MaxNoOfEvents = 500
Attr Monitor = 0
EndBody
EndBody
EndObject
EndObject
Object FastAvail $ReferenceList
Object FastAvail $ReferenceList
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
07427a46
...
@@ -16115,18 +16115,16 @@ int GePopupMenu::action(grow_tObject object, glow_tEvent event)
...
@@ -16115,18 +16115,16 @@ int GePopupMenu::action(grow_tObject object, glow_tEvent event)
int
x
,
y
;
int
x
,
y
;
int
reference
=
0
;
int
reference
=
0
;
if
(
ref_object
[
0
]
==
'&'
)
{
dyn
->
parse_attr_name
(
ref_object
,
parsed_name
,
&
inverted
,
&
attr_type
,
&
attr_size
);
if
(
parsed_name
[
0
]
==
'&'
)
{
// Refobject starting with '&' indicates reference
// Refobject starting with '&' indicates reference
pwr_tAName
refname
;
pwr_tAName
refname
;
dyn
->
parse_attr_name
(
strncpy
(
refname
,
parsed_name
,
sizeof
(
refname
));
ref_object
,
refname
,
&
inverted
,
&
attr_type
,
&
attr_size
);
sts
=
dyn
->
graph
->
get_reference_name
(
refname
,
parsed_name
);
sts
=
dyn
->
graph
->
get_reference_name
(
refname
,
parsed_name
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
))
break
;
break
;
// reference = 1;
}
else
{
}
else
{
dyn
->
parse_attr_name
(
ref_object
,
parsed_name
,
&
inverted
,
&
attr_type
,
&
attr_size
);
if
(
inverted
)
// Old syntax for reference
if
(
inverted
)
// Old syntax for reference
reference
=
1
;
reference
=
1
;
}
}
...
...
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
View file @
07427a46
This diff is collapsed.
Click to expand it.
xtt/lib/xtt/gtk/xtt_op_gtk.h
View file @
07427a46
...
@@ -93,6 +93,7 @@ public:
...
@@ -93,6 +93,7 @@ public:
GdkColor
green_color
;
GdkColor
green_color
;
GdkColor
gray_color
;
GdkColor
gray_color
;
GdkColor
white_color
;
GdkColor
white_color
;
GdkRectangle
monitor_geometry
;
int
a_height
;
int
a_height
;
int
a_exist
[
5
];
int
a_exist
[
5
];
int
a_active
[
5
];
int
a_active
[
5
];
...
...
xtt/lib/xtt/qt/xtt_op_qt.cqt
View file @
07427a46
...
@@ -145,7 +145,7 @@ void ClickableFrame::mousePressEvent(QMouseEvent* event) {
...
@@ -145,7 +145,7 @@ void ClickableFrame::mousePressEvent(QMouseEvent* event) {
}
}
OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
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)
text_size(12)
{
{
pwr_tStatus sts;
pwr_tStatus sts;
...
@@ -159,7 +159,6 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
...
@@ -159,7 +159,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();
pwr_tFileName fname;
pwr_tFileName fname;
dcli_translate_filename(fname, "$pwr_exe/xtt_alarm_active.png");
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)
...
@@ -383,11 +382,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;
...
@@ -465,22 +464,14 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
...
@@ -465,22 +464,14 @@ OpQt::OpQt(void* op_parent_ctx, char* opplace, pwr_tStatus* status)
aalarm_box[3]->setVisible(false);
aalarm_box[3]->setVisible(false);
aalarm_box[4]->setVisible(false);
aalarm_box[4]->setVisible(false);
balarm_box->setVisible(false);
balarm_box->setVisible(false);
decr_button->setVisible(false);
//
decr_button->setVisible(false);
if (layout_mask & pwr_mOpWindLayoutMask_HideCloseButton) {
if (layout_mask & pwr_mOpWindLayoutMask_HideCloseButton) {
tools_close->setVisible(false);
tools_close->setVisible(false);
functions_close->setVisible(false);
functions_close->setVisible(false);
}
}
if (a_height == 5) {
toplevel->resize(monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR + (a_height - 3) * OP_HEIGHT_INC);
toplevel->activate_aalarm_decr();
toplevel->move(monitor_geometry.x(), 0);
}
if (a_height == 4) {
toplevel->activate_aalarm_decr();
toplevel->activate_aalarm_decr();
}
toplevel->resize(xtt_monitor_geometry.width(), OP_HEIGHT_MIN + OP_HEIGHT_STATUSBAR);
toplevel->move(0, 0);
wow = new CoWowQt(toplevel);
wow = new CoWowQt(toplevel);
sup_timerid = wow->timer_new();
sup_timerid = wow->timer_new();
...
@@ -810,6 +801,16 @@ int OpQt::configure(char* opplace_str)
...
@@ -810,6 +801,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]);
...
@@ -885,6 +886,7 @@ int OpQt::configure(char* opplace_str)
...
@@ -885,6 +886,7 @@ int OpQt::configure(char* opplace_str)
}
}
// Create the application buttons
// Create the application buttons
int showRow[5] = {1, 1, 1, 0, 0};
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]);
i++) {
i++) {
...
@@ -902,21 +904,29 @@ int OpQt::configure(char* opplace_str)
...
@@ -902,21 +904,29 @@ int OpQt::configure(char* opplace_str)
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]);
i++) {
i++) {
if (
(i == 0) || ((i + 1) % 5 == 0)
) {
if (
i % 5 == 0
) {
funcbox[
(i + 1)
/ 5] = layout_to_widget(new QHBoxLayout());
funcbox[
i
/ 5] = layout_to_widget(new QHBoxLayout());
appl_form->addWidget(funcbox[
(i + 1)
/ 5]);
appl_form->addWidget(funcbox[
i
/ 5]);
}
}
if (cdh_ObjidIsNotNull(button_aref[i].Objid)) {
if (cdh_ObjidIsNotNull(button_aref[i].Objid)) {
int i2 = (int)(i / 5);
showRow[i / 5] = 1;
add_expanding(funcbox[i2]->layout(), appl_buttons[i]);
add_expanding(funcbox[i / 5]->layout(), appl_buttons[i]);
if (i >= 15) {
a_height = i2 + 1;
}
}
}
}
}
appl_form->addStretch(1);
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;
return XNAV__SUCCESS;
}
}
...
@@ -973,13 +983,18 @@ void OpQtWidget::activate_aalarm_incr()
...
@@ -973,13 +983,18 @@ void OpQtWidget::activate_aalarm_incr()
+ ((op->layout_mask & pwr_mOpWindLayoutMask_HideStatusBar) ? 0 : 1)
+ ((op->layout_mask & pwr_mOpWindLayoutMask_HideStatusBar) ? 0 : 1)
* OP_HEIGHT_STATUSBAR;
* OP_HEIGHT_STATUSBAR;
if (op->a_height
=
= 3) {
if (op->a_height
>
= 3) {
op->decr_button->setVisible(true);
op->decr_button->setVisible(true);
} else if (op->a_height == 4) {
}
if (op->a_height >= 4) {
op->funcbox[3]->setVisible(true);
op->funcbox[3]->setVisible(true);
} else if (op->a_height == 5) {
}
if (op->a_height >= 5) {
op->funcbox[4]->setVisible(true);
op->funcbox[4]->setVisible(true);
}
}
for (int i = 2; i < 5; i++) {
for (int i = 2; i < 5; i++) {
if (i < op->a_height) {
if (i < op->a_height) {
if (op->a_exist[i]) {
if (op->a_exist[i]) {
...
@@ -988,6 +1003,8 @@ void OpQtWidget::activate_aalarm_incr()
...
@@ -988,6 +1003,8 @@ void OpQtWidget::activate_aalarm_incr()
}
}
}
}
}
}
resize(width, height);
resize(width, height);
}
}
...
@@ -1005,13 +1022,22 @@ void OpQtWidget::activate_aalarm_decr()
...
@@ -1005,13 +1022,22 @@ void OpQtWidget::activate_aalarm_decr()
+ ((op->layout_mask & pwr_mOpWindLayoutMask_HideStatusBar) ? 0 : 1)
+ ((op->layout_mask & pwr_mOpWindLayoutMask_HideStatusBar) ? 0 : 1)
* OP_HEIGHT_STATUSBAR;
* OP_HEIGHT_STATUSBAR;
if (op->a_height
=
= 2) {
if (op->a_height
<
= 2) {
op->decr_button->setVisible(false);
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);
op->funcbox[3]->setVisible(false);
} else if (op->a_height == 4) {
}
if (op->a_height <= 4) {
op->funcbox[4]->setVisible(false);
op->funcbox[4]->setVisible(false);
}
}
for (int i = 2; i < 5; i++) {
for (int i = 2; i < 5; i++) {
if (i >= op->a_height) {
if (i >= op->a_height) {
if (op->a_exist[i]) {
if (op->a_exist[i]) {
...
...
xtt/lib/xtt/qt/xtt_op_qt.h
View file @
07427a46
...
@@ -97,6 +97,7 @@ public:
...
@@ -97,6 +97,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