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
a238e41c
Commit
a238e41c
authored
Sep 16, 2019
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master'
parents
937cd88e
ea8eddc5
Changes
28
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
12613 additions
and
6268 deletions
+12613
-6268
remote/exe/rs_remote_logg/src/rs_remote_logg.c
remote/exe/rs_remote_logg/src/rs_remote_logg.c
+3
-1
remote/wbl/remote/src/remote.wb_load
remote/wbl/remote/src/remote.wb_load
+6
-3
src/exp/com/src/pwrp_env.sh
src/exp/com/src/pwrp_env.sh
+2
-0
src/lib/rt/src/rt_gdh.c
src/lib/rt/src/rt_gdh.c
+10
-10
src/lib/rt/src/rt_gdh.h
src/lib/rt/src/rt_gdh.h
+8
-8
src/tools/bld/src/variables.mk
src/tools/bld/src/variables.mk
+1
-1
src/wbl/pwrb/src/pwrb_c_a_dsupcomp.wb_load
src/wbl/pwrb/src/pwrb_c_a_dsupcomp.wb_load
+0
-0
src/wbl/pwrb/src/pwrb_c_wbenvironment.wb_load
src/wbl/pwrb/src/pwrb_c_wbenvironment.wb_load
+1
-1
wb/lib/wb/qt/wb_foe_qt.cqt
wb/lib/wb/qt/wb_foe_qt.cqt
+1
-6
wb/lib/wb/qt/wb_nav_qt.cpp
wb/lib/wb/qt/wb_nav_qt.cpp
+9
-33
wb/lib/wb/qt/wb_nav_qt.h
wb/lib/wb/qt/wb_nav_qt.h
+1
-23
wb/lib/wb/qt/wb_pal_qt.cpp
wb/lib/wb/qt/wb_pal_qt.cpp
+7
-30
wb/lib/wb/qt/wb_pal_qt.h
wb/lib/wb/qt/wb_pal_qt.h
+1
-23
wb/lib/wb/qt/wb_wattnav_qt.cpp
wb/lib/wb/qt/wb_wattnav_qt.cpp
+2
-6
wb/lib/wb/qt/wb_wnav_qt.cqt
wb/lib/wb/qt/wb_wnav_qt.cqt
+66
-132
wb/lib/wb/qt/wb_wnav_qt.h
wb/lib/wb/qt/wb_wnav_qt.h
+1
-9
wb/lib/wb/src/wb_erep.h
wb/lib/wb/src/wb_erep.h
+1
-1
wb/lib/wb/src/wb_lfu.cpp
wb/lib/wb/src/wb_lfu.cpp
+1
-1
wb/lib/wb/src/wb_wnav_item.cpp
wb/lib/wb/src/wb_wnav_item.cpp
+1
-0
xtt/exp/ge/src/pwr_c_remoteconfig.pwg
xtt/exp/ge/src/pwr_c_remoteconfig.pwg
+157
-5934
xtt/exp/ge/src/pwr_c_remoteconfig_objects.pwg
xtt/exp/ge/src/pwr_c_remoteconfig_objects.pwg
+12311
-0
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+4
-26
xtt/lib/cow/qt/cow_wow_qt.h
xtt/lib/cow/qt/cow_wow_qt.h
+1
-1
xtt/lib/ge/qt/ge_qt.cqt
xtt/lib/ge/qt/ge_qt.cqt
+2
-12
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+3
-0
xtt/lib/glow/src/glow_growbarchart.cpp
xtt/lib/glow/src/glow_growbarchart.cpp
+6
-3
xtt/lib/xtt/qt/xtt_ge_qt.cqt
xtt/lib/xtt/qt/xtt_ge_qt.cqt
+1
-1
xtt/lib/xtt/qt/xtt_multiview_qt.cpp
xtt/lib/xtt/qt/xtt_multiview_qt.cpp
+6
-3
No files found.
remote/exe/rs_remote_logg/src/rs_remote_logg.c
View file @
a238e41c
...
...
@@ -116,6 +116,7 @@ static pwr_tStatus logg_print(logg_ctx loggctx, pwr_tUInt32 ident, char* msg);
static
pwr_tStatus
logg_get_message
(
logg_ctx
loggctx
,
pwr_tUInt32
*
ident
,
char
**
msg
);
static
pwr_tStatus
logg_init
(
logg_ctx
loggctx
);
static
pwr_tStatus
logg_free_message
(
void
);
/****************************************************************************
* Name: exit_hdlr()
...
...
@@ -443,7 +444,8 @@ static pwr_tStatus logg_get_message(
exit
(
0
);
}
}
logg_free_message
();
return
QCOM__QEMPTY
;
}
else
{
*
ident
=
*
(
pwr_tUInt32
*
)
remlogg_get
.
data
;
*
msg
=
(
char
*
)
remlogg_get
.
data
+
sizeof
(
pwr_tUInt32
);
...
...
remote/wbl/remote/src/remote.wb_load
View file @
a238e41c
! Generated by wb_print_wbl 03-SEP-2019 16:34:51.52
! Volume Remote
! Version V5.6.1
Volume Remote $ClassVolume 0.0.1.4
Body SysBody 01-JAN-1970 01:00:00.00
Attr NextOix = "_X163"
...
...
@@ -4565,11 +4568,11 @@ Volume Remote $ClassVolume 0.0.1.4
! The objid's are inserted by the remotehandler.
!*/
Object RemNodeObjects $Attribute 3 23-JAN-2018 17:01:41.00
Body SysBody 0
1-JAN-1970 01:00:00.00
Body SysBody 0
3-SEP-2019 16:34:40.67
Attr PgmName = "RemNodeObjects"
Attr Size =
2
00
Attr Size =
4
00
Attr Flags = 2066
Attr Elements =
25
Attr Elements =
50
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
EndObject
...
...
src/exp/com/src/pwrp_env.sh
View file @
a238e41c
...
...
@@ -660,6 +660,8 @@ Edit file \$pwrp_cnf/xtt_help.dat to write this description.
EOF
cp $proot/src/cnf/xtt_help.dat $proot/bld/common/load
# Create an empty directory database
echo "Creating directory database"
cat > $proot/src/db/directory.wb_load << EOF
...
...
src/lib/rt/src/rt_gdh.c
View file @
a238e41c
...
...
@@ -2503,7 +2503,7 @@ pwr_tStatus gdh_RenameObject(
*/
pwr_tStatus
gdh_SetObjectInfo
(
char
*
name
,
/**< The name of the object or object attribute.*/
c
onst
c
har
*
name
,
/**< The name of the object or object attribute.*/
void
*
bufp
,
/**< Pointer to the data. */
unsigned
int
bufsize
/**< The size in bytes of the data buffer. */
)
...
...
@@ -2616,7 +2616,7 @@ pwr_tStatus gdh_SetObjectInfo(
}
if
(
gdh_log_cb
&&
ODD
(
sts
))
gdh_log_cb
(
name
,
bufp
,
bufsize
);
gdh_log_cb
(
(
char
*
)
name
,
bufp
,
bufsize
);
if
(
ccpLocked
)
{
gdb_Lock
;
...
...
@@ -5411,7 +5411,7 @@ void gdh_GetStrDL(char* sp, /**< Direct link to string attribute */
* lck_Create(&sts, lck_eLock_Str).
*/
void
gdh_SetStrDL
(
char
*
sp
,
/**< Direct link to string attribute */
char
*
str
,
/**< String value to set */
c
onst
c
har
*
str
,
/**< String value to set */
int
size
/**< Size of string */
)
{
...
...
@@ -5429,7 +5429,7 @@ void gdh_SetStrDL(char* sp, /**< Direct link to string attribute */
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_GetObjectInfoTime
(
char
*
name
,
/**< Attribute name */
pwr_tStatus
gdh_GetObjectInfoTime
(
c
onst
c
har
*
name
,
/**< Attribute name */
pwr_tTime
*
time
/**< Receives the requested time */
)
{
...
...
@@ -5450,7 +5450,7 @@ pwr_tStatus gdh_GetObjectInfoTime(char* name, /**< Attribute name */
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_SetObjectInfoTime
(
char
*
name
,
/**< Attribute name */
pwr_tStatus
gdh_SetObjectInfoTime
(
c
onst
c
har
*
name
,
/**< Attribute name */
pwr_tTime
*
time
/**< Time to set */
)
{
...
...
@@ -5471,7 +5471,7 @@ pwr_tStatus gdh_SetObjectInfoTime(char* name, /**< Attribute name */
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_GetObjectInfoDeltaTime
(
char
*
name
,
/**< Attribute name */
pwr_tStatus
gdh_GetObjectInfoDeltaTime
(
c
onst
c
har
*
name
,
/**< Attribute name */
pwr_tDeltaTime
*
time
/**< Receives the requested time */
)
{
...
...
@@ -5492,7 +5492,7 @@ pwr_tStatus gdh_GetObjectInfoDeltaTime(char* name, /**< Attribute name */
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_SetObjectInfoDeltaTime
(
char
*
name
,
/**< Attribute name */
pwr_tStatus
gdh_SetObjectInfoDeltaTime
(
c
onst
c
har
*
name
,
/**< Attribute name */
pwr_tDeltaTime
*
time
/**< Time to set */
)
{
...
...
@@ -5513,7 +5513,7 @@ pwr_tStatus gdh_SetObjectInfoDeltaTime(char* name, /**< Attribute name */
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_GetObjectInfoStr
(
char
*
name
,
/**< Attribute name */
pwr_tStatus
gdh_GetObjectInfoStr
(
c
onst
c
har
*
name
,
/**< Attribute name */
char
*
str
,
/**< Receives the requested string */
int
size
/**< String size */
)
...
...
@@ -5535,8 +5535,8 @@ pwr_tStatus gdh_GetObjectInfoStr(char* name, /**< Attribute name */
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_SetObjectInfoStr
(
char
*
name
,
/**< Attribute name */
char
*
str
,
/**< String to set */
pwr_tStatus
gdh_SetObjectInfoStr
(
c
onst
c
har
*
name
,
/**< Attribute name */
c
onst
c
har
*
str
,
/**< String to set */
int
size
/**< String size */
)
{
...
...
src/lib/rt/src/rt_gdh.h
View file @
a238e41c
...
...
@@ -342,7 +342,7 @@ pwr_tStatus gdh_SetAlarmBlockLevel(
pwr_tStatus
gdh_SetAlarmLevel
(
pwr_tObjid
object
,
pwr_tUInt32
alarmLevel
);
pwr_tStatus
gdh_SetObjectInfo
(
char
*
attributeName
,
void
*
buffer
,
unsigned
int
sizeOfBuffer
);
c
onst
c
har
*
attributeName
,
void
*
buffer
,
unsigned
int
sizeOfBuffer
);
pwr_tStatus
gdh_SetObjectInfoAttrref
(
pwr_sAttrRef
*
attributeReference
,
void
*
buffer
,
unsigned
int
sizeOfBuffer
);
...
...
@@ -444,13 +444,13 @@ void gdh_SetTimeDL(pwr_tTime* atp, pwr_tTime* time);
void
gdh_GetDeltaTimeDL
(
pwr_tDeltaTime
*
dtp
,
pwr_tDeltaTime
*
time
);
void
gdh_SetDeltaTimeDL
(
pwr_tDeltaTime
*
dtp
,
pwr_tDeltaTime
*
time
);
void
gdh_GetStrDL
(
char
*
sp
,
char
*
str
,
int
size
);
void
gdh_SetStrDL
(
char
*
sp
,
char
*
str
,
int
size
);
pwr_tStatus
gdh_GetObjectInfoTime
(
char
*
name
,
pwr_tTime
*
time
);
pwr_tStatus
gdh_SetObjectInfoTime
(
char
*
name
,
pwr_tTime
*
time
);
pwr_tStatus
gdh_GetObjectInfoDeltaTime
(
char
*
name
,
pwr_tDeltaTime
*
time
);
pwr_tStatus
gdh_SetObjectInfoDeltaTime
(
char
*
name
,
pwr_tDeltaTime
*
time
);
pwr_tStatus
gdh_GetObjectInfoStr
(
char
*
name
,
char
*
str
,
int
size
);
pwr_tStatus
gdh_SetObjectInfoStr
(
c
har
*
name
,
char
*
str
,
int
size
);
void
gdh_SetStrDL
(
char
*
sp
,
c
onst
c
har
*
str
,
int
size
);
pwr_tStatus
gdh_GetObjectInfoTime
(
c
onst
c
har
*
name
,
pwr_tTime
*
time
);
pwr_tStatus
gdh_SetObjectInfoTime
(
c
onst
c
har
*
name
,
pwr_tTime
*
time
);
pwr_tStatus
gdh_GetObjectInfoDeltaTime
(
c
onst
c
har
*
name
,
pwr_tDeltaTime
*
time
);
pwr_tStatus
gdh_SetObjectInfoDeltaTime
(
c
onst
c
har
*
name
,
pwr_tDeltaTime
*
time
);
pwr_tStatus
gdh_GetObjectInfoStr
(
c
onst
c
har
*
name
,
char
*
str
,
int
size
);
pwr_tStatus
gdh_SetObjectInfoStr
(
c
onst
char
*
name
,
const
char
*
str
,
int
size
);
/** @} */
...
...
src/tools/bld/src/variables.mk
View file @
a238e41c
...
...
@@ -152,7 +152,7 @@ else
endif
explinkflags
:=
$(cross_compile)
-g
-L
$(elib_dir)
cxxflags
:=
$(cflags)
cxxflags
:=
$(cflags)
-Wno-deprecated-copy
clis
=
/lis
=
$(list)
dolist
=
/lis
=
$(list)
domap
=
-Xlinker
-Map
-Xlinker
$(map)
...
...
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
→
src/wbl/pwrb/src/pwrb_c_
a_
dsupcomp.wb_load
View file @
a238e41c
File moved
src/wbl/pwrb/src/pwrb_c_wbenvironment.wb_load
View file @
a238e41c
...
...
@@ -70,7 +70,7 @@ SObject pwrb:Class
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_ARRAY
Attr Elements =
2
0
Attr Elements =
5
0
EndBody
EndObject
EndObject
...
...
wb/lib/wb/qt/wb_foe_qt.cqt
View file @
a238e41c
...
...
@@ -1277,10 +1277,5 @@ int WFoeQt::view_set_entries()
int WFoeQt::get_selection(char* str, int len)
{
int sts = CoWowQt::GetSelection(str, len, "PWR_OBJID");
if (EVEN(sts)) {
sts = CoWowQt::GetSelection(str, len, "STRING");
}
return sts;
return CoWowQt::GetSelection(str, len);
}
wb/lib/wb/qt/wb_nav_qt.c
qt
→
wb/lib/wb/qt/wb_nav_qt.c
pp
View file @
a238e41c
...
...
@@ -42,26 +42,20 @@
#include "wb_nav_qt.h"
#include <QApplication>
#include <QClipboard>
#include <QScrollArea>
#include <qlocalsocket.h>
NavQt
::
NavQt
(
void
*
nav_parent_ctx
,
const
char
*
nav_name
,
ldh_tSesContext
nav_ldhses
,
const
char
*
nav_root_name
,
QWidget
**
w
,
pwr_tStatus
*
status
)
:
Nav
(
nav_parent_ctx
,
nav_name
,
nav_ldhses
,
nav_root_name
,
status
)
{
trace_obj = new NavQtTraceObject(this);
QScrollArea
*
scrolledbrow
=
((
QScrollArea
*
)
scrolledbrowwidgetqt_new
(
Nav
::
init_brow_cb
,
this
,
&
brow_widget
));
form_widget
=
wrapInFrame
(
scrolledbrow
);
server = new QLocalServer(trace_obj);
QObject::connect(
server, SIGNAL(newConnection()), trace_obj, SLOT(sel_convert_cb()));
set_inputfocus
(
0
);
*
w
=
form_widget
;
...
...
@@ -72,45 +66,27 @@ NavQt::~NavQt()
{
PalFile
::
config_tree_free
(
menu
);
free_pixmaps
();
delete trace_obj;
form_widget
->
close
();
}
void NavQt
TraceObject::sel_convert_cb(
)
void
NavQt
::
set_selection_owner
(
int
set
)
{
char name[200];
pwr_tStatus sts;
if (!nav->selection_owner) {
selection_owner
=
set
;
if
(
!
selection_owner
)
{
return
;
}
if (!nav->get_plant_select_cb) {
char
name
[
200
];
if
(
!
get_plant_select_cb
)
{
strcpy
(
name
,
""
);
}
else
{
sts = nav->get_plant_select_cb(nav->
parent_ctx, name, sizeof(name));
pwr_tStatus
sts
=
get_plant_select_cb
(
parent_ctx
,
name
,
sizeof
(
name
));
if
(
EVEN
(
sts
))
{
strcpy
(
name
,
""
);
}
}
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out.writeRawData(name, strlen(name));
QLocalSocket* clientConnection = nav->server->nextPendingConnection();
clientConnection->write(block);
clientConnection->flush();
clientConnection->disconnectFromServer();
}
void NavQt::set_selection_owner(int set)
{
if (!server->isListening()) {
QLocalServer::removeServer("STRING");
server->listen("STRING");
}
selection_owner = set;
QApplication
::
clipboard
()
->
setText
(
name
,
QClipboard
::
Selection
);
}
static
void
modifyBackground
(
QWidget
*
widget
,
QColor
color
)
...
...
wb/lib/wb/qt/wb_nav_qt.h
View file @
a238e41c
...
...
@@ -43,10 +43,6 @@
#include <QWidget>
#include <qlocalserver.h>
class
NavQtTraceObject
;
class
NavQt
:
public
Nav
{
public:
NavQt
(
void
*
parent_ctx
,
const
char
*
name
,
ldh_tSesContext
ldhses
,
...
...
@@ -56,26 +52,8 @@ public:
QWidget
*
brow_widget
;
QWidget
*
form_widget
;
QLocalServer
*
server
;
void
set_inputfocus
(
int
focus
);
void
set_selection_owner
(
int
set
);
private:
NavQtTraceObject
*
trace_obj
;
};
class
NavQtTraceObject
:
public
QObject
{
Q_OBJECT
public:
NavQtTraceObject
(
NavQt
*
parent
)
:
QObject
(),
nav
(
parent
)
{}
public
slots
:
void
sel_convert_cb
();
private:
NavQt
*
nav
;
};
#endif
\ No newline at end of file
#endif
wb/lib/wb/qt/wb_pal_qt.c
qt
→
wb/lib/wb/qt/wb_pal_qt.c
pp
View file @
a238e41c
...
...
@@ -42,26 +42,20 @@
#include "wb_pal_qt.h"
#include <QApplication>
#include <QClipboard>
#include <QScrollArea>
#include <qlocalsocket.h>
PalQt
::
PalQt
(
void
*
pal_parent_ctx
,
const
char
*
pal_name
,
ldh_tSesContext
pal_ldhses
,
const
char
*
pal_root_name
,
QWidget
**
w
,
pwr_tStatus
*
status
)
:
Pal
(
pal_parent_ctx
,
pal_name
,
pal_ldhses
,
pal_root_name
,
status
)
{
trace_obj = new PalQtTraceObject(this);
QScrollArea
*
scrolledbrow
=
((
QScrollArea
*
)
scrolledbrowwidgetqt_new
(
Pal
::
init_brow_cb
,
this
,
&
brow_widget
));
form_widget
=
wrapInFrame
(
scrolledbrow
);
server = new QLocalServer(trace_obj);
QObject::connect(
server, SIGNAL(newConnection()), trace_obj, SLOT(sel_convert_cb()));
set_inputfocus
(
0
);
*
w
=
form_widget
;
...
...
@@ -70,7 +64,6 @@ PalQt::PalQt(void* pal_parent_ctx, const char* pal_name,
PalQt
::~
PalQt
()
{
delete trace_obj;
PalFile
::
config_tree_free
(
menu
);
free_pixmaps
();
form_widget
->
close
();
...
...
@@ -107,25 +100,16 @@ void PalQt::set_inputfocus(int focus)
void
PalQt
::
set_selection_owner
()
{
if (!server->isListening()) {
QLocalServer::removeServer("STRING");
server->listen("STRING");
}
selection_owner
=
1
;
brow_SetInverseColor
(
brow_ctx
,
flow_eDrawType_Line
);
}
if
(
!
selection_owner
)
{
return
;
}
void PalQtTraceObject::sel_convert_cb()
{
char
name
[
200
];
brow_tNode
*
node_list
;
int
node_count
;
if (!pal->selection_owner) {
return;
}
brow_GetSelectedNodes(pal->brow_ctx, &node_list, &node_count);
brow_GetSelectedNodes
(
brow_ctx
,
&
node_list
,
&
node_count
);
if
(
!
node_count
)
{
strcpy
(
name
,
""
);
}
else
{
...
...
@@ -142,12 +126,5 @@ void PalQtTraceObject::sel_convert_cb()
}
}
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out.writeRawData(name, strlen(name));
QLocalSocket* clientConnection = pal->server->nextPendingConnection();
clientConnection->write(block);
clientConnection->flush();
clientConnection->disconnectFromServer();
QApplication
::
clipboard
()
->
setText
(
name
,
QClipboard
::
Selection
);
}
wb/lib/wb/qt/wb_pal_qt.h
View file @
a238e41c
...
...
@@ -41,10 +41,6 @@
#include <QWidget>
#include <qlocalserver.h>
class
PalQtTraceObject
;
class
PalQt
:
public
Pal
{
public:
PalQt
(
void
*
parent_ctx
,
const
char
*
name
,
ldh_tSesContext
ldhses
,
...
...
@@ -54,27 +50,9 @@ public:
QWidget
*
brow_widget
;
QWidget
*
form_widget
;
QLocalServer
*
server
;
void
set_inputfocus
(
int
focus
);
void
set_selection_owner
();
void
create_popup_menu
(
pwr_tCid
cid
,
int
x
,
int
y
);
private:
PalQtTraceObject
*
trace_obj
;
};
class
PalQtTraceObject
:
public
QObject
{
Q_OBJECT
public:
PalQtTraceObject
(
PalQt
*
parent
)
:
QObject
(),
pal
(
parent
)
{}
public
slots
:
void
sel_convert_cb
();
private:
PalQt
*
pal
;
};
#endif
\ No newline at end of file
#endif
wb/lib/wb/qt/wb_wattnav_qt.cpp
View file @
a238e41c
...
...
@@ -66,11 +66,7 @@ WAttNavQt::~WAttNavQt()
pwr_tStatus
WAttNavQt
::
get_selection
(
char
*
str
,
int
size
)
{
pwr_tStatus
sts
=
CoWowQt
::
GetSelection
(
str
,
size
,
"PWR_OBJID"
);
if
(
EVEN
(
sts
))
{
sts
=
CoWowQt
::
GetSelection
(
str
,
size
,
"STRING"
);
}
return
sts
;
return
CoWowQt
::
GetSelection
(
str
,
size
);
}
void
WAttNavQt
::
set_inputfocus
()
...
...
@@ -79,4 +75,4 @@ void WAttNavQt::set_inputfocus()
return
;
}
brow_widget
->
setFocus
();
}
\ No newline at end of file
}
wb/lib/wb/qt/wb_wnav_qt.cqt
View file @
a238e41c
...
...
@@ -60,14 +60,13 @@
#include "wb_xcrr_qt.h"
#include <QApplication>
#include <QClipboard>
#include <QColor>
#include <QInputDialog>
#include <QLayout>
#include <QMessageBox>
#include <QScrollArea>
#include <qlocalsocket.h>
void WNavQt::pop()
{
::pop(form_widget);
...
...
@@ -94,19 +93,6 @@ WNavQt::WNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, const char* xn_name,
// Create the root item
*w = form_widget;
serverString = new QLocalServer(trace_obj);
QObject::connect(
serverString, SIGNAL(newConnection()), trace_obj, SLOT(sel_convert_cb()));
serverGraph = new QLocalServer(trace_obj);
QObject::connect(
serverGraph, SIGNAL(newConnection()), trace_obj, SLOT(sel_convert_cb()));
serverObjId = new QLocalServer(trace_obj);
QObject::connect(
serverObjId, SIGNAL(newConnection()), trace_obj, SLOT(sel_convert_cb()));
serverAttrRef = new QLocalServer(trace_obj);
QObject::connect(serverAttrRef, SIGNAL(newConnection()), trace_obj,
SLOT(sel_convert_cb()));
gbl.load_config(this);
if (root_menu && !ldhses) {
...
...
@@ -181,36 +167,79 @@ void WNavQt::print(const char* title)
int WNavQt::get_selection(char* str, int len)
{
int sts;
sts = CoWowQt::GetSelection(str, len, "PWR_OBJID");
if (EVEN(sts)) {
sts = CoWowQt::GetSelection(str, len, "STRING");
}
return sts;
return CoWowQt::GetSelection(str, len);
}
void WNavQt::set_selection_owner()
{
if (!serverString->isListening()) {
QLocalServer::removeServer("STRING");
serverString->listen("STRING");
selection_owner = 1;
if (!selection_owner) {
return;
}
pwr_sAttrRef attrref;
char* buffp;
int node_count;
brow_tNode* node_list;
brow_GetSelectedNodes(brow->ctx, &node_list, &node_count);
if (!node_count) {
return;
}
WItem* item;
brow_GetUserData(node_list[0], (void**)&item);
switch (item->type) {
case wnav_eItemType_Attr:
case wnav_eItemType_AttrInput:
case wnav_eItemType_AttrInputInv:
case wnav_eItemType_AttrInputF:
case wnav_eItemType_AttrOutput:
case wnav_eItemType_AttrArray:
case wnav_eItemType_AttrArrayOutput:
case wnav_eItemType_AttrArrayElem:
case wnav_eItemType_AttrObject: {
WItemBaseAttr* aitem = (WItemBaseAttr*)item;
int size;
pwr_tAName attr_str;
int sts = ldh_ObjidToName(ldhses, item->objid, ldh_eName_Hierarchy,
attr_str, sizeof(attr_str), &size);
if (EVEN(sts)) {
break;
}
strcat(attr_str, ".");
strcat(attr_str, aitem->name);
sts = ldh_NameToAttrRef(ldhses, attr_str, &attrref);
if (EVEN(sts)) {
break;
}
sts = (format_selection_cb)(
parent_ctx, attrref, &buffp, 0, 1, wnav_eSelectionFormat_User);
if (sts) {
QApplication::clipboard()->setText(buffp, QClipboard::Selection);
}
break;
}
if (!serverGraph->isListening()) {
QLocalServer::removeServer("PWR_GRAPH");
serverGraph->listen("PWR_GRAPH");
case wnav_eItemType_Object: {
attrref = cdh_ObjidToAref(item->objid);
int sts = (format_selection_cb)(
parent_ctx, attrref, &buffp, 0, 0, wnav_eSelectionFormat_User);
if (sts) {
QApplication::clipboard()->setText(buffp, QClipboard::Selection);
}
break;
}
if (!serverObjId->isListening()) {
QLocalServer::removeServer("PWR_OBJID");
serverObjId->listen("PWR_OBJID");
default: {
char name[200];
brow_GetAnnotation(node_list[0], 0, name, sizeof(name));
QApplication::clipboard()->setText(name, QClipboard::Selection);
break;
}
if (!serverAttrRef->isListening()) {
QLocalServer::removeServer("PWR_ATTRREF");
serverAttrRef->listen("PWR_ATTRREF");
}
selection_owner = 1;
free(node_list);
}
void WNavQt::create_popup_menu(pwr_tAttrRef aref, int x, int y)
...
...
@@ -282,101 +311,6 @@ void WNavQt::logw_new(char* item, wlog_eCategory* categories, int show_item)
}
}
static void selection_data_set(
WNavQt* wnav, QLocalServer* server, const char* data)
{
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out << QString(data);
QLocalSocket* clientConnection = server->nextPendingConnection();
QObject::connect(clientConnection, SIGNAL(disconnected()),
clientConnection, SLOT(deleteLater()));
clientConnection->write(block);
clientConnection->flush();
clientConnection->disconnectFromServer();
}
void WNavQtTraceObject::sel_convert_cb()
{
pwr_sAttrRef attrref;
char* buffp;
QLocalServer* server = ((QLocalServer*)sender());
wnav_eSelectionFormat format;
if (server == wnav->serverGraph) {
format = wnav_eSelectionFormat_Graph;
} else if (server == wnav->serverObjId) {
format = wnav_eSelectionFormat_Objid;
} else if (server == wnav->serverAttrRef) {
format = wnav_eSelectionFormat_Attrref;
} else {
format = wnav_eSelectionFormat_User;
}
int node_count;
brow_tNode* node_list;
brow_GetSelectedNodes(wnav->brow->ctx, &node_list, &node_count);
if (!node_count) {
return;
}
WItem* item;
brow_GetUserData(node_list[0], (void**)&item);
switch (item->type) {
case wnav_eItemType_Attr:
case wnav_eItemType_AttrInput:
case wnav_eItemType_AttrInputInv:
case wnav_eItemType_AttrInputF:
case wnav_eItemType_AttrOutput:
case wnav_eItemType_AttrArray:
case wnav_eItemType_AttrArrayOutput:
case wnav_eItemType_AttrArrayElem:
case wnav_eItemType_AttrObject: {
WItemBaseAttr* aitem = (WItemBaseAttr*)item;
int size;
pwr_tAName attr_str;
int sts = ldh_ObjidToName(wnav->ldhses, item->objid, ldh_eName_Hierarchy,
attr_str, sizeof(attr_str), &size);
if (EVEN(sts)) {
break;
}
strcat(attr_str, ".");
strcat(attr_str, aitem->name);
sts = ldh_NameToAttrRef(wnav->ldhses, attr_str, &attrref);
if (EVEN(sts)) {
break;
}
sts = (wnav->format_selection_cb)(
wnav->parent_ctx, attrref, &buffp, 0, 1, format);
if (sts) {
selection_data_set(wnav, server, buffp);
}
break;
}
case wnav_eItemType_Object: {
attrref = cdh_ObjidToAref(item->objid);
int sts = (wnav->format_selection_cb)(
wnav->parent_ctx, attrref, &buffp, 0, 0, format);
if (sts) {
selection_data_set(wnav, server, buffp);
}
break;
}
default: {
char name[200];
brow_GetAnnotation(node_list[0], 0, name, sizeof(name));
selection_data_set(wnav, server, name);
break;
}
}
free(node_list);
}
int WNavQt::open_foe(const char* name, pwr_tOid plcpgm, void** foectx,
int map_window, ldh_eAccess access, pwr_tOid oid)
{
...
...
wb/lib/wb/qt/wb_wnav_qt.h
View file @
a238e41c
...
...
@@ -41,8 +41,6 @@
#include <QTimer>
#include <qlocalserver.h>
/* wtt_wnav_qt.h -- Simple navigator */
class
CoLogin
;
...
...
@@ -62,11 +60,6 @@ public:
QWidget
*
brow_widget
;
QWidget
*
form_widget
;
QLocalServer
*
serverString
;
QLocalServer
*
serverGraph
;
QLocalServer
*
serverObjId
;
QLocalServer
*
serverAttrRef
;
void
pop
();
void
set_inputfocus
(
int
focus
);
void
print
(
const
char
*
title
);
...
...
@@ -115,11 +108,10 @@ public:
public
slots
:
void
trace_scan
();
void
sel_convert_cb
();
private:
WNavQt
*
wnav
;
QTimer
*
trace_timerid
;
};
#endif
\ No newline at end of file
#endif
wb/lib/wb/src/wb_erep.h
View file @
a238e41c
...
...
@@ -78,7 +78,7 @@ class wb_erep {
std
::
vector
<
wb_vrep
*>
m_vrepbuffer
;
std
::
map
<
std
::
string
,
wb_tMethod
>
m_methods
;
char
m_dir_list
[
25
][
200
];
char
m_dir_list
[
52
][
200
];
int
m_dir_cnt
;
int
m_volatile_idx
;
int
m_buffer_max
;
...
...
wb/lib/wb/src/wb_lfu.cpp
View file @
a238e41c
...
...
@@ -742,7 +742,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
path_file_created
=
1
;
for
(
i
=
0
;
i
<
2
0
;
i
++
)
{
for
(
i
=
0
;
i
<
5
0
;
i
++
)
{
str_trim
(
path
,
path_ptr
[
i
]);
if
(
!
streq
(
path
,
""
))
fprintf
(
fpath
,
"%s
\n
"
,
path
);
...
...
wb/lib/wb/src/wb_wnav_item.cpp
View file @
a238e41c
...
...
@@ -3250,6 +3250,7 @@ int WItemAttrArrayElem::open_children(double x, double y)
flow_eDest_IntoLast
);
}
free
((
char
*
)
bd
);
break
;
}
case
pwr_eType_Objid
:
case
pwr_eType_AttrRef
:
{
...
...
xtt/exp/ge/src/pwr_c_remoteconfig.pwg
View file @
a238e41c
This diff is collapsed.
Click to expand it.
xtt/exp/ge/src/pwr_c_remoteconfig_objects.pwg
0 → 100644
View file @
a238e41c
This diff is collapsed.
Click to expand it.
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
a238e41c
...
...
@@ -52,6 +52,7 @@
#include "flow_browapi.h"
#include <QApplication>
#include <QClipboard>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QHBoxLayout>
...
...
@@ -70,8 +71,6 @@
#include <QTimer>
#include <QVBoxLayout>
#include <qlocalsocket.h>
typedef struct {
char title[80];
flow_tCtx flow_ctx;
...
...
@@ -413,34 +412,13 @@ void CoWowQtObject::DisplayLicense()
pop(mbox);
}
int CoWowQt::GetSelection(char* str, int size
, const char* atom
)
int CoWowQt::GetSelection(char* str, int size)
{
QLocalSocket* socket = new QLocalSocket();
socket->connectToServer(fl(atom));
if (!socket->waitForConnected()) {
log_debug("GetSelection failed, could not connect to local server %s: %s\n", fl(atom), qPrintable(socket->errorString()));
}
QString rcvStr;
int received = 0;
while (!received) {
if (socket->waitForReadyRead(50)) {
QDataStream in(socket);
if (socket->bytesAvailable() > 0 && !in.atEnd()) {
in >> rcvStr;
}
received = 1;
}
QApplication::processEvents();
}
socket->close();
delete socket;
QString rcvStr = QApplication::clipboard()->text(QClipboard::Selection);
if (!rcvStr.isEmpty() && rcvStr.length() < size) {
strcpy(str, qPrintable(rcvStr));
return true;
}
return !rcvStr.isEmpty();
}
...
...
xtt/lib/cow/qt/cow_wow_qt.h
View file @
a238e41c
...
...
@@ -223,7 +223,7 @@ public:
static
void
PopupPosition
(
QWidget
*
parent
,
int
x_event
,
int
y_event
,
int
*
x
,
int
*
y
);
static
int
GetSelection
(
char
*
str
,
int
size
,
const
char
*
atom
);
static
int
GetSelection
(
char
*
str
,
int
size
);
static
void
SetWindowIcon
(
QWidget
*
w
);
static
void
update_title
(
QWidget
*
w
,
int
editmode
);
...
...
xtt/lib/ge/qt/ge_qt.cqt
View file @
a238e41c
...
...
@@ -320,14 +320,9 @@ int GeQt::get_plant_select(char* select_name, int size)
pwr_tAName buff;
if (!ldhses) {
sts = CoWowQt::GetSelection(str, sizeof(str)
, "PWR_GRAPH"
);
sts = CoWowQt::GetSelection(str, sizeof(str));
if (ODD(sts)) {
strcpy(select_name, str);
} else {
sts = CoWowQt::GetSelection(str, sizeof(str), "STRING");
if (ODD(sts)) {
strcpy(select_name, str);
}
}
return sts;
}
...
...
@@ -342,14 +337,9 @@ int GeQt::get_plant_select(char* select_name, int size)
strncpy(select_name, buff, size);
return 1;
} else {
sts = CoWowQt::GetSelection(str, sizeof(str)
, "PWR_GRAPH"
);
sts = CoWowQt::GetSelection(str, sizeof(str));
if (ODD(sts)) {
strncpy(select_name, str, size);
} else {
sts = CoWowQt::GetSelection(str, sizeof(str), "STRING");
if (ODD(sts)) {
strncpy(select_name, str, size);
}
}
return sts;
}
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
a238e41c
...
...
@@ -11267,6 +11267,9 @@ int GeXY_Curve::scan(grow_tObject object)
dyn
->
parse_attr_name
(
x_attr
,
parsed_name
,
&
inverted
,
&
attr_type_x
,
&
attr_size
,
&
attr_elem
);
}
if
(
attr_elem
==
0
)
return
1
;
x_value
=
calloc
(
MAX
(
attr_elem
,
no_of_points
),
attr_size
/
attr_elem
);
sts
=
gdh_GetObjectInfo
(
parsed_name
,
x_value
,
attr_size
);
...
...
xtt/lib/glow/src/glow_growbarchart.cpp
View file @
a238e41c
...
...
@@ -373,7 +373,7 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot,
for
(
int
i
=
0
;
i
<
barsegments
+
1
;
i
++
)
{
glow_eDrawType
fillcolor
=
glow_eDrawType_Line
;
if
(
min_value
>
0
||
bar_values
[
i
][
j
]
>
0
)
{
if
(
min_value
>
=
0
||
bar_values
[
i
][
j
]
>
0
)
{
skip
=
0
;
bar_up_ur_y
=
bar_up_ll_y
;
...
...
@@ -467,6 +467,9 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot,
drawtype
=
fillcolor
;
ctx
->
gdraw
->
rect
(
bar_ll_x
,
bar_down_ll_y
,
bar_ur_x
-
bar_ll_x
,
bar_down_ur_y
-
bar_down_ll_y
,
drawtype
,
1
,
0
);
if
(
bar_up_ll_y
>
ll_y
)
ctx
->
gdraw
->
rect
(
bar_ll_x
,
ll_y
,
bar_ur_x
-
bar_ll_x
,
bar_up_ll_y
-
ll_y
,
drawtype
,
1
,
0
);
}
else
{
glow_eDrawType
f1
,
f2
;
if
(
gradient_contrast
>=
0
)
{
...
...
@@ -498,9 +501,9 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot,
}
if
(
min_value
>=
0
)
{
brect_ll_x
=
bar_ll_x
;
brect_ll_y
=
bar_up_ll_y
;
brect_ll_y
=
int
(
f_bar_up_ll_y
)
;
brect_width
=
bar_ur_x
-
bar_ll_x
;
brect_height
=
ur_y
-
bar_up_ll_y
;
brect_height
=
ur_y
-
int
(
f_bar_up_ll_y
)
;
}
else
{
brect_ll_x
=
bar_ll_x
;
brect_ll_y
=
bar_up_ll_y
;
...
...
xtt/lib/xtt/qt/xtt_ge_qt.cqt
View file @
a238e41c
...
...
@@ -331,8 +331,8 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
str_StrncpyCutOff(title, name, sizeof(title), 1);
// Qt
toplevel = new XttGeQtWidget(this);
if (!(options & ge_mOptions_Embedded)) {
toplevel = new XttGeQtWidget(this);
toplevel->setWindowTitle(QString::fromLatin1(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
...
...
xtt/lib/xtt/qt/xtt_multiview_qt.cpp
View file @
a238e41c
...
...
@@ -176,6 +176,11 @@ XttMultiViewQt::XttMultiViewQt(void* mv_parent_ctx, const char* mv_name,
comp_widget
=
std
::
vector
<
QWidget
*>
(
rows
*
cols
);
exchange_widget
=
std
::
vector
<
QWidget
*>
(
rows
*
cols
);
exchange_widget_layout
=
std
::
vector
<
QHBoxLayout
*>
(
rows
*
cols
);
for
(
int
i
=
0
;
i
<
rows
*
cols
;
i
++
)
{
exchange_widget_layout
[
i
]
=
new
QHBoxLayout
(
toplevel
);
exchange_widget
[
i
]
=
layout_to_widget
(
exchange_widget_layout
[
i
]);
}
QHBoxLayout
*
col_widget_box
=
new
QHBoxLayout
();
QSplitter
*
col_widget_pane
=
new
QSplitter
();
...
...
@@ -680,8 +685,6 @@ XttMultiViewQt::XttMultiViewQt(void* mv_parent_ctx, const char* mv_name,
if
(
mv
.
Action
[
idx
].
Options
&
pwr_mMultiViewElemOptionsMask_Exchangeable
)
{
exchange_widget
[
idx
]
=
layout_to_widget
(
exchange_widget_layout
[
idx
]);
if
(
comp_widget
[
idx
])
{
add_expanding
(
exchange_widget_layout
[
idx
],
comp_widget
[
idx
]);
...
...
@@ -1296,4 +1299,4 @@ void XttMultiViewQt::signal_send(char* signalname)
((
XttMultiViewQt
*
)
views
[
i
].
data
)
->
signal_send
(
signalname
);
}
}
}
\ No newline at end of file
}
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