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
62ee6b21
Commit
62ee6b21
authored
Aug 27, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed an error when opening a Plc Program
parent
9f246359
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
27 deletions
+23
-27
wb/lib/wb/qt/wb_foe_qt.cqt
wb/lib/wb/qt/wb_foe_qt.cqt
+19
-21
wb/lib/wb/qt/wb_foe_qt.h
wb/lib/wb/qt/wb_foe_qt.h
+1
-1
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+3
-3
xtt/lib/flow/qt/flow_draw_qt.h
xtt/lib/flow/qt/flow_draw_qt.h
+0
-2
No files found.
wb/lib/wb/qt/wb_foe_qt.cqt
View file @
62ee6b21
...
@@ -674,11 +674,9 @@ WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
...
@@ -674,11 +674,9 @@ WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
windowindex, new_window, f_map_window, f_access, function_access,
windowindex, new_window, f_map_window, f_access, function_access,
f_options, sts)
f_options, sts)
{
{
toplevel = new WFoeQtWidget(this, f_parent_wid);
*sts = new_local(plcprogram, ldhwbctx, ldhsesctx, nodeobject, windowindex,
*sts = new_local(plcprogram, ldhwbctx, ldhsesctx, nodeobject, windowindex,
new_window, function_access);
new_window, function_access);
toplevel = new WFoeQtWidget(this, f_parent_wid);
wow = new CoWowQt(toplevel);
}
}
WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
...
@@ -710,11 +708,9 @@ WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
...
@@ -710,11 +708,9 @@ WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
}
}
strcpy(name, new_name);
strcpy(name, new_name);
toplevel = new WFoeQtWidget(this, f_parent_wid);
*sts = new_local(
*sts = new_local(
plcprogram, ldhwbctx, ldhsesctx, 0, 0, 0, foe_eFuncAccess_Edit);
plcprogram, ldhwbctx, ldhsesctx, 0, 0, 0, foe_eFuncAccess_Edit);
toplevel = new WFoeQtWidget(this, f_parent_wid);
wow = new CoWowQt(toplevel);
}
}
// Pop the window
// Pop the window
...
@@ -787,7 +783,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
...
@@ -787,7 +783,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
toplevel, file, "&Close", SLOT(close()), "CTRL+W", "window-close");
toplevel, file, "&Close", SLOT(close()), "CTRL+W", "window-close");
// Edit Entry
// Edit Entry
QMenu*
edit = menu_bar->addMenu(translate_utf8("&Edit"));
edit = menu_bar->addMenu(translate_utf8("&Edit"));
undelete
undelete
= addMenuItem(toplevel, edit, "&Undo Delete", SLOT(activate_undelete()));
= addMenuItem(toplevel, edit, "&Undo Delete", SLOT(activate_undelete()));
...
@@ -871,18 +867,18 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
...
@@ -871,18 +867,18 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
// Edit Move submenu
// Edit Move submenu
QMenu* edit_move = edit->addMenu(translate_utf8("Move"));
QMenu* edit_move = edit->addMenu(translate_utf8("Move"));
a
= addMenuItem(
move_right
= addMenuItem(
toplevel, edit_move, "Right", SLOT(activate_move()), "CTRL+SHIFT+Right");
toplevel, edit_move, "Right", SLOT(activate_move()), "CTRL+SHIFT+Right");
a
->setData(flow_eDirection_Right);
move_right
->setData(flow_eDirection_Right);
a
= addMenuItem(
move_left
= addMenuItem(
toplevel, edit_move, "Left", SLOT(activate_move()), "CTRL+SHIFT+Left");
toplevel, edit_move, "Left", SLOT(activate_move()), "CTRL+SHIFT+Left");
a
->setData(flow_eDirection_Left);
move_left
->setData(flow_eDirection_Left);
a
= addMenuItem(
move_up
= addMenuItem(
toplevel, edit_move, "Up", SLOT(activate_move()), "CTRL+SHIFT+Up");
toplevel, edit_move, "Up", SLOT(activate_move()), "CTRL+SHIFT+Up");
a
->setData(flow_eDirection_Up);
move_up
->setData(flow_eDirection_Up);
a
= addMenuItem(
move_down
= addMenuItem(
toplevel, edit_move, "Down", SLOT(activate_move()), "CTRL+SHIFT+Down");
toplevel, edit_move, "Down", SLOT(activate_move()), "CTRL+SHIFT+Down");
a
->setData(flow_eDirection_Down);
move_down
->setData(flow_eDirection_Down);
changetext = addMenuItem(
changetext = addMenuItem(
toplevel, edit, "C&hange Text", SLOT(activate_changetext()), "CTRL+T");
toplevel, edit, "C&hange Text", SLOT(activate_changetext()), "CTRL+T");
...
@@ -934,7 +930,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
...
@@ -934,7 +930,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
addMenuItem(toplevel, view_zoom, "Zoom &Out", SLOT(activate_zoomout()),
addMenuItem(toplevel, view_zoom, "Zoom &Out", SLOT(activate_zoomout()),
"CTRL+O", "zoom-out");
"CTRL+O", "zoom-out");
addMenuItem(toplevel, view_zoom, "Zoom &Reset", SLOT(activate_unzoom()), "",
addMenuItem(toplevel, view_zoom, "Zoom &Reset", SLOT(activate_unzoom()), "",
"zoom-
reset
");
"zoom-
original
");
addCheckableMenuItem(
addCheckableMenuItem(
toplevel, view, "S&how Execute Order", SLOT(activate_showexeord(bool)));
toplevel, view, "S&how Execute Order", SLOT(activate_showexeord(bool)));
...
@@ -974,9 +970,9 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
...
@@ -974,9 +970,9 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
toplevel, tools, "Save", SLOT(activate_save()), "document-save");
toplevel, tools, "Save", SLOT(activate_save()), "document-save");
addToolItem(toplevel, tools, "Print documents", SLOT(activate_print()),
addToolItem(toplevel, tools, "Print documents", SLOT(activate_print()),
"document-print");
"document-print");
add
ToolItem(toplevel, tools, "Set edit mode", SLOT(activate_edit_togg(
)),
add
CheckableToolItem(toplevel, tools, "Set edit mode", SLOT(activate_edit_togg(bool
)),
"$pwr_exe/foe_edit.png");
"$pwr_exe/foe_edit.png");
add
ToolItem(toplevel, tools, "Set view mode", SLOT(activate_view_togg(
)),
add
CheckableToolItem(toplevel, tools, "Set view mode", SLOT(activate_view_togg(bool
)),
"$pwr_exe/foe_view.png");
"$pwr_exe/foe_view.png");
tools_build = addToolItem(
tools_build = addToolItem(
toplevel, tools, "Build Program", SLOT(activate_compile()), "system-run");
toplevel, tools, "Build Program", SLOT(activate_compile()), "system-run");
...
@@ -1018,7 +1014,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
...
@@ -1018,7 +1014,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
SLOT(activate_document()), "$pwr_exe/foe_document.png");
SLOT(activate_document()), "$pwr_exe/foe_document.png");
// Document_Landscape button
// Document_Landscape button
tools_document = addToolItem(toplevel, tools, "Document landscape",
tools_document
_landscape
= addToolItem(toplevel, tools, "Document landscape",
SLOT(activate_document_landscape()),
SLOT(activate_document_landscape()),
"$pwr_exe/foe_document_landscape.png");
"$pwr_exe/foe_document_landscape.png");
...
@@ -1080,6 +1076,8 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
...
@@ -1080,6 +1076,8 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
gre->init();
gre->init();
function_setup();
function_setup();
wow = new CoWowQt(toplevel);
return FOE__SUCCESS;
return FOE__SUCCESS;
}
}
...
@@ -1133,7 +1131,7 @@ int WFoeQt::edit_set_entries()
...
@@ -1133,7 +1131,7 @@ int WFoeQt::edit_set_entries()
redraw->setEnabled(true);
redraw->setEnabled(true);
plcattribute->setEnabled(true);
plcattribute->setEnabled(true);
winddelete->setEnabled(true);
winddelete->setEnabled(true);
edit
_entry
->setEnabled(true);
edit->setEnabled(true);
cut->setEnabled(true);
cut->setEnabled(true);
copy->setEnabled(true);
copy->setEnabled(true);
paste->setEnabled(true);
paste->setEnabled(true);
...
@@ -1178,7 +1176,7 @@ int WFoeQt::edit_set_entries()
...
@@ -1178,7 +1176,7 @@ int WFoeQt::edit_set_entries()
redraw->setEnabled(true);
redraw->setEnabled(true);
plcattribute->setEnabled(true);
plcattribute->setEnabled(true);
winddelete->setEnabled(true);
winddelete->setEnabled(true);
edit
_entry
->setEnabled(true);
edit->setEnabled(true);
cut->setEnabled(true);
cut->setEnabled(true);
copy->setEnabled(true);
copy->setEnabled(true);
paste->setEnabled(true);
paste->setEnabled(true);
...
...
wb/lib/wb/qt/wb_foe_qt.h
View file @
62ee6b21
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
QAction
*
changetext
;
QAction
*
changetext
;
QAction
*
expand
;
QAction
*
expand
;
QAction
*
compress
;
QAction
*
compress
;
Q
Widget
*
edit_entry
;
/* entry of the menu */
Q
Menu
*
edit
;
/* entry of the menu */
QWidget
*
search_entry
;
/* entry of the menu */
QWidget
*
search_entry
;
/* entry of the menu */
QWidget
*
customize_entry
;
/* entry of the menu */
QWidget
*
customize_entry
;
/* entry of the menu */
QAction
*
trace_togg
;
/* togg under the function entry of the menu */
QAction
*
trace_togg
;
/* togg under the function entry of the menu */
...
...
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
62ee6b21
...
@@ -251,7 +251,7 @@ void FlowDrawQt::delete_secondary_ctx(FlowCtx* ctx)
...
@@ -251,7 +251,7 @@ void FlowDrawQt::delete_secondary_ctx(FlowCtx* ctx)
FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
int (*init_proc)(QWidget* w, FlowCtx* ctx, void* client_data),
int (*init_proc)(QWidget* w, FlowCtx* ctx, void* client_data),
void* client_data, flow_eCtxType type)
void* client_data, flow_eCtxType type)
: toplevel(x_toplevel),
nav_toplevel(0),
window(0), nav_window(0),
: toplevel(x_toplevel), window(0), nav_window(0),
closing_down(0)
closing_down(0)
{
{
timer_id = new QTimer(this);
timer_id = new QTimer(this);
...
@@ -279,8 +279,8 @@ FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
...
@@ -279,8 +279,8 @@ FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
int FlowDrawQt::init_nav(QWidget* nav_widget, void* flow_ctx)
int FlowDrawQt::init_nav(QWidget* nav_widget, void* flow_ctx)
{
{
// debug_print("init_nav\n");
// debug_print("init_nav\n");
nav_toplevel = nav_widget
;
assert(dynamic_cast<QtScrollWidgetFlow*>(nav_widget) != NULL)
;
nav_window =
nav_toplevel->window(
);
nav_window =
dynamic_cast<QtScrollWidgetFlow*>(nav_widget
);
nav_window_canvas = &(((QtScrollWidgetFlow*)nav_window)->image);
nav_window_canvas = &(((QtScrollWidgetFlow*)nav_window)->image);
QPalette pal;
QPalette pal;
...
...
xtt/lib/flow/qt/flow_draw_qt.h
View file @
62ee6b21
...
@@ -55,8 +55,6 @@ class FlowDrawQt : private QObject, public FlowDraw {
...
@@ -55,8 +55,6 @@ class FlowDrawQt : private QObject, public FlowDraw {
public:
public:
QWidget
*
toplevel
;
QWidget
*
toplevel
;
QWidget
*
nav_shell
;
QWidget
*
nav_toplevel
;
QWidget
*
window
;
QWidget
*
window
;
QImage
*
window_canvas
;
QImage
*
window_canvas
;
QWidget
*
nav_window
;
QWidget
*
nav_window
;
...
...
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