Commit d26c7731 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Added missing callbacks.

parent b1850f04
......@@ -229,11 +229,26 @@ void PnViewerQtWidget::focusInEvent(QFocusEvent *event)
QWidget::focusInEvent(event);
}
void PnViewerQtWidget::activate_update()
{
viewer->activate_update();
}
void PnViewerQtWidget::activate_filter()
{
viewer->activate_filter(viewer_eFilterType_NotMatching);
}
void PnViewerQtWidget::activate_setdevice()
{
viewer->activate_setdevice();
}
void PnViewerQtWidget::activate_changevalue()
{
viewer->activate_changevalue();
}
void PnViewerQtWidget::activate_zoom_in()
{
viewer->viewernav->zoom(1.2);
......@@ -249,4 +264,9 @@ void PnViewerQtWidget::activate_zoom_reset()
viewer->viewernav->unzoom();
}
void PnViewerQtWidget::activate_help()
{
viewer->activate_help();
}
#endif
\ No newline at end of file
......@@ -84,10 +84,14 @@ protected:
public slots:
void valchanged_cmd_entry();
void activate_update();
void activate_filter();
void activate_setdevice();
void activate_changevalue();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_help();
private:
PnViewerQt *viewer;
......
......@@ -122,6 +122,66 @@ void GsdAttrQt::change_value()
//
// Callbackfunctions from menu entries
//
void GsdAttrQtWidget::activate_change_value()
{
attr->change_value();
}
void GsdAttrQtWidget::activate_help()
{
attr->activate_help();
}
void GsdAttrQtWidget::activate_copy()
{
attr->activate_copy();
}
void GsdAttrQtWidget::activate_cut()
{
attr->activate_cut();
}
void GsdAttrQtWidget::activate_paste()
{
attr->activate_paste();
}
void GsdAttrQtWidget::activate_zoom_in()
{
attr->activate_zoom_in();
}
void GsdAttrQtWidget::activate_zoom_out()
{
attr->activate_zoom_out();
}
void GsdAttrQtWidget::activate_zoom_reset()
{
attr->activate_zoom_reset();
}
void GsdAttrQtWidget::activate_print()
{
attr->activate_print();
}
void GsdAttrQtWidget::activate_cmd_ok()
{
attr->activate_cmd_ok();
}
void GsdAttrQtWidget::activate_cmd_apply()
{
attr->activate_cmd_apply();
}
void GsdAttrQtWidget::activate_cmd_ca()
{
attr->activate_cmd_ca();
}
void GsdAttrQtWidget::activate_cmd_input()
{
attr->cmd_prompt->setVisible(false);
......@@ -194,7 +254,7 @@ GsdAttrQt::GsdAttrQt(QWidget *a_parent_wid, void *a_parent_ctx, void *a_object,
// Functions entry
QMenu *functions = menu_bar->addMenu(translate_utf8("F&unctions"));
menubutton_changevalue = addMenuItem(toplevel, functions, "&Change Value",
SLOT(activate_changevalue()), "CTRL+Q");
SLOT(activate_change_value()), "CTRL+Q");
// View Entry
QMenu *view = menu_bar->addMenu(translate_utf8("&View"));
......
......@@ -81,7 +81,20 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_change_value();
void activate_exit();
void activate_help();
void activate_copy();
void activate_cut();
void activate_paste();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_print();
void activate_cmd_input();
void activate_cmd_ok();
void activate_cmd_apply();
void activate_cmd_ca();
void valchanged_cmd_input()
{
......
......@@ -133,6 +133,11 @@ void GsdmlAttrQt::change_value()
//
// Callbackfunctions from menu entries
//
void GsdmlAttrQtWidget::activate_change_value()
{
attr->change_value();
}
void GsdmlAttrQtWidget::activate_ordermoduletype_default()
{
attr->activate_ordermoduletype(attr_eOrderModuleType_Default);
......@@ -140,12 +145,37 @@ void GsdmlAttrQtWidget::activate_ordermoduletype_default()
void GsdmlAttrQtWidget::activate_ordermoduletype_name()
{
attr->activate_ordermoduletype(attr_eOrderModuleType_Name);
attr->activate_ordermoduletype( attr_eOrderModuleType_Name);
}
void GsdmlAttrQtWidget::activate_ordermoduletype_number()
{
attr->activate_ordermoduletype(attr_eOrderModuleType_Number);
attr->activate_ordermoduletype( attr_eOrderModuleType_Number);
}
void GsdmlAttrQtWidget::activate_exit()
{
attr->activate_exit();
}
void GsdmlAttrQtWidget::activate_help()
{
attr->activate_help();
}
void GsdmlAttrQtWidget::activate_copy()
{
attr->activate_copy();
}
void GsdmlAttrQtWidget::activate_cut()
{
attr->activate_cut();
}
void GsdmlAttrQtWidget::activate_paste()
{
attr->activate_paste();
}
void GsdmlAttrQtWidget::activate_viewio(bool set)
......@@ -153,6 +183,51 @@ void GsdmlAttrQtWidget::activate_viewio(bool set)
attr->activate_viewio(set);
}
void GsdmlAttrQtWidget::activate_zoom_in()
{
attr->activate_zoom_in();
}
void GsdmlAttrQtWidget::activate_zoom_out()
{
attr->activate_zoom_out();
}
void GsdmlAttrQtWidget::activate_zoom_reset()
{
attr->activate_zoom_reset();
}
void GsdmlAttrQtWidget::activate_collapse()
{
attr->activate_collapse();
}
void GsdmlAttrQtWidget::activate_expand_all()
{
attr->activate_expand_all();
}
void GsdmlAttrQtWidget::activate_print()
{
attr->activate_print();
}
void GsdmlAttrQtWidget::activate_cmd_ok()
{
attr->activate_cmd_ok();
}
void GsdmlAttrQtWidget::activate_cmd_apply()
{
attr->activate_cmd_apply();
}
void GsdmlAttrQtWidget::activate_cmd_ca()
{
attr->activate_cmd_ca();
}
void GsdmlAttrQtWidget::activate_cmd_entry()
{
attr->cmd_prompt->setVisible(false);
......@@ -228,7 +303,7 @@ GsdmlAttrQt::GsdmlAttrQt(QWidget *a_parent_wid, void *a_parent_ctx,
// Functions entry
QMenu *functions = menu_bar->addMenu(translate_utf8("F&unctions"));
menubutton_changevalue = addMenuItem(toplevel, functions, "&Change Value",
SLOT(activate_changevalue()), "CTRL+Q");
SLOT(activate_change_value()), "CTRL+Q");
// Submenu Order module type
QActionGroup *radio_group = new QActionGroup(toplevel);
......
......@@ -87,11 +87,26 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_change_value();
void activate_ordermoduletype_default();
void activate_ordermoduletype_name();
void activate_ordermoduletype_number();
void activate_viewio(bool set);
void activate_exit();
void activate_help();
void activate_copy();
void activate_cut();
void activate_paste();
void activate_viewio();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_print();
void activate_collapse();
void activate_expand_all();
void activate_cmd_entry();
void activate_cmd_ok();
void activate_cmd_apply();
void activate_cmd_ca();
void valchanged_cmd_entry()
{
......
......@@ -99,6 +99,31 @@ void XttTblQtWidget::activate_print()
tbl->activate_print();
}
void XttTblQtWidget::activate_login()
{
tbl->open_login();
}
void XttTblQtWidget::activate_logout()
{
tbl->logout();
}
void XttTblQtWidget::activate_zoom_in()
{
tbl->activate_zoom_in();
}
void XttTblQtWidget::activate_zoom_out()
{
tbl->activate_zoom_out();
}
void XttTblQtWidget::activate_zoom_reset()
{
tbl->activate_zoom_reset();
}
void XttTblQtWidget::activate_help()
{
if (!tbl->is_authorized()) {
......@@ -246,8 +271,8 @@ XttTblQt::XttTblQt(QWidget *a_parent_wid, void *a_parent_ctx,
QMenu *file = menu_bar->addMenu(translate_utf8("&File"));
addMenuItem(toplevel, file, "&Print", SLOT(activate_print()), "",
"document-print");
addMenuItem(toplevel, file, "&Login", SLOT(open_login()));
addMenuItem(toplevel, file, "Log&Out", SLOT(logout()));
addMenuItem(toplevel, file, "&Login", SLOT(activate_login()));
addMenuItem(toplevel, file, "Log&Out", SLOT(activate_logout()));
addMenuItem(toplevel, file, "&Close", SLOT(close()), "CTRL+W", "window-close");
// Functions entry
......@@ -280,11 +305,11 @@ XttTblQt::XttTblQt(QWidget *a_parent_wid, void *a_parent_ctx,
addToolItem(toplevel, tools, "Open history item", SLOT(activate_opensevhist()),
"$pwr_exe/xtt_meth_trend.png");
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoomin()),
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoom_in()),
"$pwr_exe/xtt_zoom_in.png");
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoomout()),
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoom_out()),
"$pwr_exe/xtt_zoom_out.png");
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoomreset()),
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoom_reset()),
"$pwr_exe/xtt_zoom_reset.png");
// Statusbar and cmd input
......
......@@ -87,10 +87,15 @@ public slots:
void activate_command();
void valchanged_cmd_input();
void activate_print();
void activate_login();
void activate_logout();
void activate_opensevhist();
void activate_delete_item();
void activate_tree_layout();
void activate_list_layout();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_help();
void activate_help_project();
void activate_help_proview();
......
......@@ -154,6 +154,46 @@ void WbBckWQt::set_title(char *title)
toplevel->setWindowTitle(QString::fromLatin1(title));
}
void WbBckWQtWidget::activate_print()
{
bck->activate_print();
}
void WbBckWQtWidget::activate_open()
{
bck->activate_open();
}
void WbBckWQtWidget::activate_diff()
{
bck->activate_diff();
}
void WbBckWQtWidget::activate_diff_wb()
{
bck->activate_diff_wb();
}
void WbBckWQtWidget::activate_transfer_wb()
{
bck->activate_transfer_wb();
}
void WbBckWQtWidget::activate_filter()
{
bck->activate_filter();
}
void WbBckWQtWidget::activate_check_all()
{
bck->activate_check_all();
}
void WbBckWQtWidget::activate_check_clear()
{
bck->activate_check_clear();
}
void WbBckWQtWidget::activate_zoom_in()
{
bck->bckwnav->zoom(1.2);
......
......@@ -83,6 +83,14 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_print();
void activate_open();
void activate_diff();
void activate_diff_wb();
void activate_transfer_wb();
void activate_filter();
void activate_check_all();
void activate_check_clear();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
......
......@@ -142,9 +142,9 @@ void WbExpWQt::print()
void WbExpWQtWidget::focusInEvent(QFocusEvent *event)
{
if (!exp->focustimer.disabled()) {
exp->expwnav->set_input_focus();
exp->focustimer.disable(400);
if (!expw->focustimer.disabled()) {
expw->expwnav->set_input_focus();
expw->focustimer.disable(400);
}
QWidget::focusInEvent(event);
......@@ -152,7 +152,7 @@ void WbExpWQtWidget::focusInEvent(QFocusEvent *event)
void WbExpWQtWidget::closeEvent(QCloseEvent *event)
{
delete exp;
delete expw;
QWidget::closeEvent(event);
}
......@@ -161,32 +161,57 @@ void WbExpWQt::set_title(char *title)
toplevel->setWindowTitle(QString::fromLatin1(title));
}
void WbExpWQtWidget::activate_export()
{
expw->activate_export();
}
void WbExpWQtWidget::activate_update()
{
expw->activate_update();
}
void WbExpWQtWidget::activate_check_all()
{
expw->activate_check_all();
}
void WbExpWQtWidget::activate_check_clear()
{
expw->activate_check_clear();
}
void WbExpWQtWidget::activate_check_reset()
{
expw->activate_check_reset();
}
void WbExpWQtWidget::activate_show_all(bool set)
{
exp->expwnav->set_show_all(set);
expw->expwnav->set_show_all(set);
}
void WbExpWQtWidget::activate_zoom_in()
{
exp->expwnav->zoom(1.2);
expw->expwnav->zoom(1.2);
}
void WbExpWQtWidget::activate_zoom_out()
{
exp->expwnav->zoom(5.0 / 6);
expw->expwnav->zoom(5.0 / 6);
}
void WbExpWQtWidget::activate_zoom_reset()
{
exp->expwnav->unzoom();
expw->expwnav->unzoom();
}
void WbExpWQtWidget::activate_help()
{
if (exp->type == expw_eType_Export || exp->type == expw_eType_Import) {
if (expw->type == expw_eType_Export || expw->type == expw_eType_Import) {
CoXHelp::dhelp("exportimport_refman", 0, navh_eHelpFile_Other,
"$pwr_lang/man_dg.dat", true);
} else if (exp->type == expw_eType_BuildDirectories) {
} else if (expw->type == expw_eType_BuildDirectories) {
CoXHelp::dhelp("builddir_refman", 0, navh_eHelpFile_Other,
"$pwr_lang/man_dg.dat", true);
}
......
......@@ -78,13 +78,18 @@ class WbExpWQtWidget : public QWidget {
public:
WbExpWQtWidget(WbExpWQt *parent_ctx, QWidget *parent)
: QWidget(parent, Qt::Window), exp(parent_ctx) {}
: QWidget(parent, Qt::Window), expw(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent *event);
void closeEvent(QCloseEvent *event);
public slots:
void activate_export();
void activate_update();
void activate_check_all();
void activate_check_clear();
void activate_check_reset();
void activate_show_all(bool set);
void activate_zoom_in();
void activate_zoom_out();
......@@ -92,7 +97,7 @@ public slots:
void activate_help();
private:
WbExpWQt *exp;
WbExpWQt *expw;
};
#endif
\ No newline at end of file
......@@ -71,6 +71,31 @@
#include <QMenuBar>
#include <QTimer>
void WFoeQtWidget::activate_save()
{
foe->activate_save();
}
void WFoeQtWidget::activate_winddelete()
{
foe->activate_winddelete();
}
void WFoeQtWidget::activate_quit()
{
foe->activate_quit();
}
void WFoeQtWidget::activate_savetrace()
{
foe->activate_savetrace();
}
void WFoeQtWidget::activate_restoretrace()
{
foe->activate_restoretrace();
}
void WFoeQtWidget::activate_history()
{
pwr_tStatus sts;
......@@ -93,6 +118,11 @@ void WFoeQtWidget::activate_history()
logw->CoLogW::show(categories, wname);
}
void WFoeQtWidget::activate_print()
{
foe->activate_print();
}
void WFoeQtWidget::activate_printdialog()
{
pwr_tStatus sts;
......@@ -101,6 +131,41 @@ void WFoeQtWidget::activate_printdialog()
this, &sts);
}
void WFoeQtWidget::activate_printoverv()
{
foe->activate_printoverv();
}
void WFoeQtWidget::activate_printselect()
{
foe->activate_printselect();
}
void WFoeQtWidget::activate_printpdf()
{
foe->activate_printpdf();
}
void WFoeQtWidget::activate_syntax()
{
foe->activate_syntax();
}
void WFoeQtWidget::activate_compile()
{
foe->activate_compile();
}
void WFoeQtWidget::activate_delete()
{
foe->activate_delete();
}
void WFoeQtWidget::activate_delete_confirm()
{
foe->activate_delete_confirm();
}
void WFoeQtWidget::activate_createobject()
{
double x, y;
......@@ -110,6 +175,26 @@ void WFoeQtWidget::activate_createobject()
foe->activate_createobject((float) x, (float) y);
}
void WFoeQtWidget::activate_changetext()
{
foe->activate_changetext();
}
void WFoeQtWidget::activate_cut()
{
foe->activate_cut();
}
void WFoeQtWidget::activate_copy()
{
foe->activate_copy();
}
void WFoeQtWidget::activate_paste()
{
foe->activate_paste();
}
void WFoeQtWidget::activate_select_next()
{
foe->activate_select_nextobject(
......@@ -140,13 +225,77 @@ void WFoeQtWidget::activate_move()
static_cast<flow_eDirection>(((QAction *) sender())->data().toInt()));
}
// Sets gridsize.
void WFoeQtWidget::activate_attribute()
{
foe->activate_attribute();
}
void WFoeQtWidget::activate_editcode()
{
foe->activate_editcode();
}
void WFoeQtWidget::activate_subwindow()
{
foe->activate_subwindow();
}
void WFoeQtWidget::activate_undelete()
{
foe->activate_undelete();
}
void WFoeQtWidget::activate_unselect()
{
foe->activate_unselect();
}
void WFoeQtWidget::activate_createnode()
{
foe->activate_createnode();
}
void WFoeQtWidget::activate_createcon()
{
foe->activate_createconnection();
}
void WFoeQtWidget::activate_conpoint_lock()
{
foe->activate_conpoint_lock();
}
// Sets gridsize.
void WFoeQtWidget::activate_gridsize()
{
foe->gre->set_grid_size(((QAction *) sender())->data().toDouble());
}
// Display or hide the connection palette.
void WFoeQtWidget::activate_showgrid()
{
}
void WFoeQtWidget::activate_redraw()
{
foe->activate_redraw();
}
void WFoeQtWidget::activate_zoomin()
{
foe->activate_zoomin();
}
void WFoeQtWidget::activate_zoomout()
{
foe->activate_zoomout();
}
void WFoeQtWidget::activate_unzoom()
{
foe->activate_unzoom();
}
// Display or hide the connection palette.
void WFoeQtWidget::activate_palette_con()
{
if (sender() != foe->view_conpal) {
......@@ -159,7 +308,7 @@ void WFoeQtWidget::activate_palette_con()
foe->con_palctx->set_inputfocus(set);
}
// Display or hide the connection palette.
// Display or hide the connection palette.
void WFoeQtWidget::activate_palette_object()
{
if (sender() != foe->view_objectpal) {
......@@ -202,7 +351,7 @@ void WFoeQtWidget::activate_document_landscape()
foe->activate_createobject_cid(pwr_cClass_Document, 1);
}
// Display or hide the connection palette.
// Display or hide the connection palette.
void WFoeQtWidget::activate_palette_plant()
{
if (sender() != foe->view_plantpal) {
......@@ -215,20 +364,93 @@ void WFoeQtWidget::activate_palette_plant()
foe->navctx->set_inputfocus(set);
}
// Callbacks from the toggle buttons under the function entry.
// This callbacks are called when the value of a toggle button is changed.
// The function pulldown menu is a radio box which ensure that
// one and only one toggle button is set at any time:
// If the callback is generated by the radio entry
// (and not directly by the user ) the event is 0.
// These callbacks are use to determine in which mode the user works:
void WFoeQtWidget::activate_refcon(bool set)
{
foe->activate_refcon(set);
}
void WFoeQtWidget::activate_showexeord(bool set)
{
foe->activate_showexeord(set);
}
void WFoeQtWidget::activate_plcattribute()
{
foe->activate_plcattribute();
}
void WFoeQtWidget::activate_search()
{
}
void WFoeQtWidget::activate_searchobject()
{
foe->activate_searchobject();
}
void WFoeQtWidget::activate_searchstring()
{
foe->activate_searchstring();
}
void WFoeQtWidget::activate_searchnext()
{
foe->activate_searchnext();
}
void WFoeQtWidget::activate_getobj()
{
foe->activate_getobj();
}
void WFoeQtWidget::activate_expand()
{
foe->activate_expand();
}
void WFoeQtWidget::activate_compress()
{
foe->activate_compress();
}
// Display help window for topic plc editor
void WFoeQtWidget::activate_help()
{
foe->activate_help();
}
// Display help for the plc window
void WFoeQtWidget::activate_helpplc()
{
foe->activate_helpplc();
}
// Display help for all the plcpmgs
void WFoeQtWidget::activate_helpplclist()
{
foe->activate_helpplclist();
}
// Display class help for selected object
void WFoeQtWidget::activate_helpclass()
{
foe->activate_helpclass();
}
// Callbacks from the toggle buttons under the function entry.
// This callbacks are called when the value of a toggle button is changed.
// The function pulldown menu is a radio box which ensure that
// one and only one toggle button is set at any time:
// If the callback is generated by the radio entry
// (and not directly by the user ) the event is 0.
// These callbacks are use to determine in which mode the user works:
// SG 01.05.91
void WFoeQtWidget::activate_trace_togg(bool set)
{
foe->activate_trace_togg(set);
}
// Callbacks from the toggle buttons under the customize entry.
// Callbacks from the toggle buttons under the customize entry.
void WFoeQtWidget::activate_simulate_togg(bool set)
{
foe->activate_simulate_togg(set);
......@@ -340,9 +562,9 @@ void WFoeQtWidget::focusInEvent(QFocusEvent *event)
QWidget::focusInEvent(event);
}
// Start the attribute editor and store the attribute context pointer
// together with WFoe and the nodepointer to use when a backcall
// comes.
// Start the attribute editor and store the attribute context pointer
// together with WFoe and the nodepointer to use when a backcall
// comes.
WAtt *WFoeQt::watt_new(void *a_parent_ctx, ldh_tSesContext a_ldhses,
pwr_sAttrRef a_aref, int a_editmode, int a_advanced_user,
int a_display_objectname)
......@@ -359,9 +581,9 @@ WAttText *WFoeQt::watttext_new(void *a_parent_ctx, ldh_tSesContext a_ldhses,
a_editmode, status);
}
// Destroys a foe instance.
// Destroys the widget and frees allocated memory for the
// context.
// Destroys a foe instance.
// Destroys the widget and frees allocated memory for the
// context.
void WFoeQt::destroy()
{
gre->wind->hw.foe = 0;
......@@ -400,9 +622,9 @@ WFoe *WFoeQt::subwindow_new(void *f_parent_ctx, char *f_name,
return foe;
}
// Displays a message in the foe window.
// Changes the label of a label widget which id is stored in the context.
// Author: SG
// Displays a message in the foe window.
// Changes the label of a label widget which id is stored in the context.
// Author: SG
// Date : 25.01.91
// To avoid unnecessary call to this routine the context variable :
// foe.msg_label_id is set to null if the the message to be displayed
......@@ -732,11 +954,11 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
// Zoom submenu
QMenu *view_zoom = menu_bar->addMenu(translate_utf8("&Zoom"));
addMenuItem(toplevel, view_zoom, "Zoom &In", SLOT(activate_zoom_in()), "CTRL+I",
addMenuItem(toplevel, view_zoom, "Zoom &In", SLOT(activate_zoomin()), "CTRL+I",
"zoom-in");
addMenuItem(toplevel, view_zoom, "Zoom &Out", SLOT(activate_zoom_out()), "CTRL+O",
addMenuItem(toplevel, view_zoom, "Zoom &Out", SLOT(activate_zoomout()), "CTRL+O",
"zoom-out");
addMenuItem(toplevel, view_zoom, "Zoom &Reset", SLOT(activate_zoom_reset()), "",
addMenuItem(toplevel, view_zoom, "Zoom &Reset", SLOT(activate_unzoom()), "",
"zoom-reset");
addCheckableMenuItem(toplevel, view, "S&how Execute Order",
......@@ -789,7 +1011,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
"$pwr_exe/xtt_zoom_in.png");
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoomout()),
"$pwr_exe/xtt_zoom_out.png");
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoomreset()),
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_unzoom()),
"$pwr_exe/xtt_zoom_reset.png");
addToolItem(toplevel, tools, "Show Object palette",
SLOT(activate_palette_object()),
......@@ -916,7 +1138,7 @@ void WFoeQt::set_mode_button_state(int mode, int state)
}
}
// Show the text input widget.
// Show the text input widget.
int WFoeQt::get_textinput(const char *msg, int (*function)(WFoe *, char *))
{
/* Print the text */
......
......@@ -188,15 +188,45 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_save();
void activate_winddelete();
void activate_quit();
void activate_savetrace();
void activate_restoretrace();
void activate_history();
void activate_print();
void activate_printdialog();
void activate_printoverv();
void activate_printselect();
void activate_printpdf();
void activate_syntax();
void activate_compile();
void activate_delete();
void activate_delete_confirm();
void activate_createobject();
void activate_changetext();
void activate_cut();
void activate_copy();
void activate_paste();
void activate_select_next();
void activate_select_addnext();
void activate_select_cp_next();
void activate_scroll();
void activate_move();
void activate_attribute();
void activate_editcode();
void activate_subwindow();
void activate_undelete();
void activate_unselect();
void activate_createnode();
void activate_createcon();
void activate_conpoint_lock();
void activate_gridsize();
void activate_showgrid();
void activate_redraw();
void activate_zoomin();
void activate_zoomout();
void activate_unzoom();
void activate_palette_con();
void activate_palette_object();
void activate_palette_plant();
......@@ -206,6 +236,20 @@ public slots:
void activate_textheader();
void activate_document();
void activate_document_landscape();
void activate_refcon(bool set);
void activate_showexeord(bool set);
void activate_plcattribute();
void activate_search();
void activate_searchobject();
void activate_searchstring();
void activate_searchnext();
void activate_getobj();
void activate_expand();
void activate_compress();
void activate_help();
void activate_helpplc();
void activate_helpplclist();
void activate_helpclass();
void activate_trace_togg(bool set);
void activate_simulate_togg(bool set);
void activate_view_togg(bool set);
......
......@@ -137,18 +137,18 @@ void WAttQt::change_value(int set_focus)
void WAttQtWidget::action_text_inserted()
{
int count = att->cmd_scrolled_buffer->toPlainText().length();
int count = watt->cmd_scrolled_buffer->toPlainText().length();
if (count > att->input_max_length) {
if (count > watt->input_max_length) {
// Remove inserted chars
QString txt = att->cmd_scrolled_buffer->toPlainText();
txt.truncate(att->input_max_length);
att->cmd_scrolled_buffer->setText(txt);
QString txt = watt->cmd_scrolled_buffer->toPlainText();
txt.truncate(watt->input_max_length);
watt->cmd_scrolled_buffer->setText(txt);
CoWowQt wow(this);
wow.DisplayError("Error message", "Attribute size exceeded");
} else {
att->message(' ', "");
watt->message(' ', "");
}
}
......@@ -157,12 +157,17 @@ void WAttQtWidget::action_text_inserted()
//
void WAttQtWidget::activate_change_value()
{
att->change_value(1);
watt->change_value(1);
}
void WAttQtWidget::activate_close_changeval()
{
att->change_value_close();
watt->change_value_close();
}
void WAttQtWidget::activate_print()
{
watt->activate_print();
}
void WAttQtWidget::activate_help()
......@@ -173,16 +178,16 @@ void WAttQtWidget::activate_help()
void WAttQtWidget::focusInEvent(QFocusEvent *event)
{
if (!att->focustimer.disabled()) {
if (att->cmd_scrolledinput->isVisible()) {
att->cmd_scrolled_buffer->setFocus();
} else if (att->cmd_entry->isVisible()) {
att->cmd_entry->setFocus();
} else if (att->wattnav) {
att->wattnav->set_inputfocus();
if (!watt->focustimer.disabled()) {
if (watt->cmd_scrolledinput->isVisible()) {
watt->cmd_scrolled_buffer->setFocus();
} else if (watt->cmd_entry->isVisible()) {
watt->cmd_entry->setFocus();
} else if (watt->wattnav) {
watt->wattnav->set_inputfocus();
}
att->focustimer.disable(400);
watt->focustimer.disable(400);
}
QWidget::focusInEvent(event);
......@@ -255,39 +260,39 @@ void WAttQt::change_value_close()
void WAttQtWidget::activate_cmd_entry()
{
att->wattnav->set_inputfocus();
watt->wattnav->set_inputfocus();
QByteArray ba = att->cmd_entry->text().toLatin1();
QByteArray ba = watt->cmd_entry->text().toLatin1();
char *text = ba.data();
if (att->input_open) {
if (watt->input_open) {
if (text) {
att->wattnav->set_attr_value(att->input_node, att->input_name, text);
watt->wattnav->set_attr_value(watt->input_node, watt->input_name, text);
}
att->cmd_entry->setVisible(false);
att->set_prompt("");
att->input_open = 0;
if (att->redraw_cb) {
(att->redraw_cb)(att);
watt->cmd_entry->setVisible(false);
watt->set_prompt("");
watt->input_open = 0;
if (watt->redraw_cb) {
(watt->redraw_cb)(watt);
}
}
att->cmd_prompt->setVisible(false);
att->cmd_entry->setVisible(false);
watt->cmd_prompt->setVisible(false);
watt->cmd_entry->setVisible(false);
if (!text) {
att->message('E', "Input error, invalid character");
watt->message('E', "Input error, invalid character");
}
if (att->pending_close) {
if (watt->pending_close) {
close();
}
}
void WAttQtWidget::activate_cmd_scrolled_ok()
{
if (att->input_open) {
QByteArray ba = att->cmd_scrolled_buffer->toPlainText().toLatin1();
if (watt->input_open) {
QByteArray ba = watt->cmd_scrolled_buffer->toPlainText().toLatin1();
char *text = ba.data();
if (text) {
......@@ -298,22 +303,22 @@ void WAttQtWidget::activate_cmd_scrolled_ok()
}
}
att->wattnav->set_attr_value(att->input_node, att->input_name, text);
watt->wattnav->set_attr_value(watt->input_node, watt->input_name, text);
}
att->cmd_scrolledinput->setVisible(false);
att->set_prompt("");
att->input_open = 0;
watt->cmd_scrolledinput->setVisible(false);
watt->set_prompt("");
watt->input_open = 0;
set_pane_position(att->pane, -50);
set_pane_position(watt->pane, -50);
att->wattnav->redraw();
att->wattnav->set_inputfocus();
watt->wattnav->redraw();
watt->wattnav->set_inputfocus();
if (!text) {
att->message('E', "Input error, invalid character");
watt->message('E', "Input error, invalid character");
}
if (att->pending_close) {
if (watt->pending_close) {
close();
}
}
......@@ -321,14 +326,14 @@ void WAttQtWidget::activate_cmd_scrolled_ok()
void WAttQtWidget::activate_cmd_scrolled_ca()
{
if (att->input_open) {
att->cmd_scrolledinput->setVisible(false);
if (watt->input_open) {
watt->cmd_scrolledinput->setVisible(false);
set_pane_position(att->pane, -50);
set_pane_position(watt->pane, -50);
att->set_prompt("");
att->input_open = 0;
att->wattnav->set_inputfocus();
watt->set_prompt("");
watt->input_open = 0;
watt->wattnav->set_inputfocus();
}
}
......@@ -353,10 +358,10 @@ void WAttQt::update_title()
void WAttQtWidget::closeEvent(QCloseEvent *event)
{
if (att->close_cb) {
(att->close_cb)(att);
if (watt->close_cb) {
(watt->close_cb)(watt);
} else {
delete att;
delete watt;
}
QWidget::closeEvent(event);
}
......
......@@ -91,7 +91,7 @@ class WAttQtWidget : public QWidget {
public:
WAttQtWidget(WAttQt *parent_ctx, QWidget *parent)
: QWidget(parent, Qt::Window), att(parent_ctx) {}
: QWidget(parent, Qt::Window), watt(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent *event);
......@@ -100,6 +100,7 @@ protected:
public slots:
void activate_change_value();
void activate_close_changeval();
void activate_print();
void activate_help();
void activate_cmd_entry();
void activate_cmd_scrolled_ok();
......@@ -107,7 +108,7 @@ public slots:
void action_text_inserted();
private:
WAttQt *att;
WAttQt *watt;
};
#endif
\ No newline at end of file
......@@ -151,6 +151,36 @@ void WdaQtWidget::activate_change_value()
wda->change_value(1);
}
void WdaQtWidget::activate_close_changeval()
{
wda->change_value_close();
}
void WdaQtWidget::activate_print()
{
wda->activate_print();
}
void WdaQtWidget::activate_export_text()
{
wda->print_textfile();
}
void WdaQtWidget::activate_import_text()
{
wda->import_textfile();
}
void WdaQtWidget::activate_setclass()
{
wda->Wda::open_class_dialog();
}
void WdaQtWidget::activate_setattr()
{
wda->open_attr_dialog();
}
void WdaQtWidget::activate_nextattr()
{
int sts = wda->next_attr();
......@@ -412,15 +442,15 @@ WdaQt::WdaQt(QWidget *wa_parent_wid, void *wa_parent_ctx,
// File entry
QMenu *file = menu_bar->addMenu(translate_utf8("&File"));
addMenuItem(toplevel, file, "&Select Class", SLOT(open_class_dialog()), "CTRL+C");
addMenuItem(toplevel, file, "Select &Attribute", SLOT(open_attr_dialog()),
addMenuItem(toplevel, file, "&Select Class", SLOT(activate_setclass()), "CTRL+C");
addMenuItem(toplevel, file, "Select &Attribute", SLOT(activate_setattr()),
"CTRL+A");
addMenuItem(toplevel, file, "Next Attribute", SLOT(activate_nextattr()),
"CTRL+N");
addMenuItem(toplevel, file, "Previous Attribute", SLOT(activate_prevattr()),
"CTRL+P");
addMenuItem(toplevel, file, "Export to Textfile", SLOT(print_textfile()));
addMenuItem(toplevel, file, "Import from Textfile", SLOT(import_textfile()));
addMenuItem(toplevel, file, "Export to Textfile", SLOT(activate_export_text()));
addMenuItem(toplevel, file, "Import from Textfile", SLOT(activate_import_text()));
addMenuItem(toplevel, file, "&Print", SLOT(activate_print()));
addMenuItem(toplevel, file, "&Close", SLOT(close()), "CTRL+W", "window-close");
......@@ -429,7 +459,7 @@ WdaQt::WdaQt(QWidget *wa_parent_wid, void *wa_parent_ctx,
addMenuItem(toplevel, functions, "Change &Value", SLOT(activate_change_value()),
"CTRL+Q");
addMenuItem(toplevel, functions, "C&lose Change Value",
SLOT(change_value_close()), "CTRL+T");
SLOT(activate_close_changeval()), "CTRL+T");
// Help entry
QMenu *help = menu_bar->addMenu(translate_utf8("&Help"));
......
......@@ -106,6 +106,12 @@ protected:
public slots:
void activate_change_value();
void activate_close_changeval();
void activate_export_text();
void activate_import_text();
void activate_print();
void activate_setclass();
void activate_setattr();
void activate_nextattr();
void activate_prevattr();
void activate_help();
......
......@@ -245,7 +245,7 @@ WGeQt::WGeQt(QWidget *wge_parent_wid, void *wge_parent_ctx, char *wge_name,
graph->is_authorized_cb = &wge_is_authorized_cb;
QObject::connect(((GraphQt *) graph)->grow_widget,
SLOT(resize_signal(QResizeEvent * )), toplevel,
SIGNAL(resize_signal(QResizeEvent * )), toplevel,
SLOT(action_resize(QResizeEvent * )));
//TODO: grow_widget must emit a resize_signal signal in resizeEvent()
......
......@@ -75,19 +75,49 @@ void WPkgQt::message(char severity, const char *message)
//
// Callbackfunctions from menu entries
//
void WPkgQtWidget::activate_distribute()
{
pkg->activate_distribute();
}
void WPkgQtWidget::activate_createpkg()
{
pkg->activate_createpkg();
}
void WPkgQtWidget::activate_zoom_in()
{
pkg->activate_zoom_in();
}
void WPkgQtWidget::activate_zoom_out()
{
pkg->activate_zoom_out();
}
void WPkgQtWidget::activate_zoom_reset()
{
pkg->activate_zoom_reset();
}
void WPkgQtWidget::activate_deletepkg()
{
pkg->activate_deletepkg();
}
void WPkgQtWidget::activate_dmode_filediff(bool set)
{
activate_dmode_filediff(set);
pkg->activate_dmode_filediff(set);
}
void WPkgQtWidget::activate_dmode_filetime(bool set)
{
activate_dmode_filetime(set);
pkg->activate_dmode_filetime(set);
}
void WPkgQtWidget::activate_dmode_filepath(bool set)
{
activate_dmode_filepath(set);
pkg->activate_dmode_filepath(set);
}
void WPkgQtWidget::activate_help()
......
......@@ -80,6 +80,12 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_distribute();
void activate_createpkg();
void activate_deletepkg();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_dmode_filediff(bool set);
void activate_dmode_filetime(bool set);
void activate_dmode_filepath(bool set);
......
......@@ -91,6 +91,41 @@ void WRevQtWidget::activate_history()
logw->CoLogW::show(categories, 0);
}
void WRevQtWidget::activate_store()
{
rev->activate_store();
}
void WRevQtWidget::activate_restore()
{
rev->activate_restore();
}
void WRevQtWidget::activate_delete()
{
rev->activate_delete();
}
void WRevQtWidget::activate_build()
{
rev->activate_build();
}
void WRevQtWidget::activate_zoom_in()
{
rev->activate_zoom_in();
}
void WRevQtWidget::activate_zoom_out()
{
rev->activate_zoom_out();
}
void WRevQtWidget::activate_zoom_reset()
{
rev->activate_zoom_reset();
}
void WRevQtWidget::activate_help()
{
CoXHelp::dhelp("revisions", 0, navh_eHelpFile_Other, "$pwr_lang/man_dg.dat",
......@@ -219,8 +254,8 @@ WRevQt::WRevQt(QWidget *wa_parent_wid, void *wa_parent_ctx,
void WRevInputDialog::closeEvent(QCloseEvent *event)
{
QWidget::closeEvent(event);
wrev->dialog_count--;
wrev->india_widget = 0;
rev->dialog_count--;
rev->india_widget = 0;
}
void WRevInputDialog::activate_ok()
......@@ -228,18 +263,18 @@ void WRevInputDialog::activate_ok()
QByteArray text1 = india_text1->text().toLatin1();
QByteArray text2 = india_text2->text().toLatin1();
wrev->dialog_count--;
wrev->india_widget = 0;
rev->dialog_count--;
rev->india_widget = 0;
(wrev->india_ok_cb)(wrev, text1.data(), text2.data());
(rev->india_ok_cb)(rev, text1.data(), text2.data());
close();
}
void WRevInputDialog::activate_cancel()
{
close();
wrev->dialog_count--;
wrev->india_widget = 0;
rev->dialog_count--;
rev->india_widget = 0;
}
void WRevQt::open_input_dialog(const char *text1, const char *text2,
......@@ -257,7 +292,7 @@ void WRevQt::open_input_dialog(const char *text1, const char *text2,
WRevInputDialog::WRevInputDialog(WRevQt *parent_ctx, QWidget *parent,
const char *text1, const char *text2,
const char *init_text1, const char *init_text2)
: QDialog(parent), wrev(parent_ctx)
: QDialog(parent), rev(parent_ctx)
{
setMinimumSize(350, 150);
setWindowTitle(fl("New Revision"));
......
......@@ -61,7 +61,7 @@ protected:
void closeEvent(QCloseEvent *event);
private:
WRevQt *wrev;
WRevQt *rev;
QLineEdit *india_text1;
QLineEdit *india_text2;
......@@ -109,7 +109,14 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_store();
void activate_restore();
void activate_delete();
void activate_build();
void activate_history();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_help();
private:
......
......@@ -1146,34 +1146,16 @@ void WttQtWidget::activate_rename()
wtt->open_change_name();
}
void WttQtWidget::activate_creaobjafter()
void WttQtWidget::activate_creaobj()
{
wtt->activate_creaobj(ldh_eDest_After);
wtt->activate_creaobj(
static_cast<ldh_eDest>(((QAction *) sender())->data().toInt()));
}
void WttQtWidget::activate_creaobjfirst()
void WttQtWidget::activate_moveobj()
{
wtt->activate_creaobj(ldh_eDest_IntoFirst);
}
void WttQtWidget::activate_moveobjup()
{
wtt->activate_moveobj(wnav_eDestCode_Before);
}
void WttQtWidget::activate_moveobjdown()
{
wtt->activate_moveobj(wnav_eDestCode_After);
}
void WttQtWidget::activate_moveobjinto()
{
wtt->activate_moveobj(wnav_eDestCode_FirstChild);
}
void WttQtWidget::activate_moveobjontop()
{
wtt->activate_moveobj(wnav_eDestCode_LastChild);
wtt->activate_moveobj(
static_cast<wnav_eDestCode>(((QAction *) sender())->data().toInt()));
}
void WttQtWidget::activate_deleteobj()
......@@ -2036,26 +2018,32 @@ WttQt::WttQt(void *wt_parent_ctx, QWidget *wt_parent_wid, const char *wt_name,
// Submenu Create Object
QMenu *edit_creaobj = edit->addMenu(translate_utf8("C&reate Object"));
menu_creaobjafter_w =
addMenuItem(toplevel, edit_creaobj, "&After", SLOT(activate_creaobjafter()),
addMenuItem(toplevel, edit_creaobj, "&After", SLOT(activate_creaobj()),
"CTRL+D");
menu_creaobjafter_w->setData(ldh_eDest_After);
menu_creaobjfirst_w = addMenuItem(toplevel, edit_creaobj, "&First Child",
SLOT(activate_creaobjfirst()),
SLOT(activate_creaobj()),
"CTRL+SHIFT+D");
menu_creaobjfirst_w->setData(ldh_eDest_IntoFirst);
// Submenu Move Object
QMenu *edit_moveobj = edit->addMenu(translate_utf8("&Move Object"));
menu_moveobjup_w =
addMenuItem(toplevel, edit_moveobj, "&Up", SLOT(activate_moveobjup()),
addMenuItem(toplevel, edit_moveobj, "&Up", SLOT(activate_moveobj()),
"CTRL+SHIFT+UP");
menu_moveobjup_w->setData(wnav_eDestCode_Before);
menu_moveobjdown_w =
addMenuItem(toplevel, edit_moveobj, "&Down", SLOT(activate_moveobjdown()),
addMenuItem(toplevel, edit_moveobj, "&Down", SLOT(activate_moveobj()),
"CTRL+SHIFT+DOWN");
menu_moveobjdown_w->setData(wnav_eDestCode_After);
menu_moveobjinto_w =
addMenuItem(toplevel, edit_moveobj, "&Into", SLOT(activate_moveobjinto()),
addMenuItem(toplevel, edit_moveobj, "&Into", SLOT(activate_moveobj()),
"CTRL+SHIFT+RIGHT");
menu_moveobjinto_w->setData(wnav_eDestCode_FirstChild);
menu_moveobjontop_w =
addMenuItem(toplevel, edit_moveobj, "&OnTop", SLOT(activate_moveobjontop()),
addMenuItem(toplevel, edit_moveobj, "&OnTop", SLOT(activate_moveobj()),
"CTRL+SHIFT+LEFT");
menu_moveobjontop_w->setData(wnav_eDestCode_LastChild);
menu_deleteobj_w =
addMenuItem(toplevel, edit, "&Delete Object", SLOT(activate_deleteobj()),
......
......@@ -261,12 +261,8 @@ public slots:
void activate_pasteinto();
void activate_copykeep();
void activate_rename();
void activate_creaobjafter();
void activate_creaobjfirst();
void activate_moveobjup();
void activate_moveobjdown();
void activate_moveobjinto();
void activate_moveobjontop();
void activate_creaobj();
void activate_moveobj();
void activate_deleteobj();
void activate_configure();
void activate_utilities();
......
......@@ -58,6 +58,11 @@
#include <QMenuBar>
#include <QVBoxLayout>
void WCrrQtWidget::activate_print()
{
crr->activate_print();
}
void WCrrQtWidget::activate_openplc()
{
// xcrrnav->start_trace();
......
......@@ -84,6 +84,7 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_print();
void activate_openplc();
void activate_help();
......
......@@ -467,6 +467,16 @@ void XttQtWidget::activate_advanceduser()
activate_advanceduser();
}
void XttQtWidget::activate_zoom_in()
{
xtt->activate_zoom_in();
}
void XttQtWidget::activate_zoom_out()
{
xtt->activate_zoom_out();
}
void XttQtWidget::activate_zoom_reset()
{
xtt->xnav->unzoom();
......@@ -680,7 +690,7 @@ XttQt::XttQt(int argc, char *argv[], int *return_sts) : Xtt(&argc, &argv,
SLOT(activate_collect_signals()), "CTRL+SHIFT+T");
addMenuItem(toplevel, functions_collect, "&IO Signals",
SLOT(activate_collect_iosignals()), "CTRL+T");
addMenuItem(toplevel, functions_collect, "&Open", SLOT(functions_collect_open()));
addMenuItem(toplevel, functions_collect, "&Open", SLOT(activate_collect_open()));
// End submenu
addMenuItem(toplevel, functions, "&Advanced user", SLOT(activate_advanceduser()),
......
......@@ -127,6 +127,8 @@ public slots:
void activate_collect_iosignals();
void activate_collect_open();
void activate_advanceduser();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_help();
void activate_help_navigator();
......
......@@ -121,6 +121,11 @@ void CoLogWQtWidget::closeEvent(QCloseEvent *event)
QWidget::closeEvent(event);
}
void CoLogWQtWidget::activate_print()
{
logw->activate_print();
}
void CoLogWQtWidget::activate_zoom_in()
{
logw->logwnav->zoom(1.2);
......
......@@ -76,6 +76,7 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_print();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
......
......@@ -77,11 +77,11 @@ void RtMonQtWidget::closeEvent(QCloseEvent *event)
}
static QPushButton *addButton(QWidget *parent, QBoxLayout *layout,
const char *text, void (RtMonQt::*callback)(void))
const char *text, const char *callback)
{
QPushButton *button = new QPushButton(fl(text));
button->setFixedSize(170, 25);
QObject::connect(button, SIGNAL(pressed()), parent, SLOT(callback()));
QObject::connect(button, SIGNAL(pressed()), parent, callback);
layout->addWidget(button);
return button;
}
......@@ -167,15 +167,16 @@ RtMonQt::RtMonQt(void *rtmon_parent_ctx, QWidget *rtmon_parent_wid,
bbox_label->setEnabled(false);
QVBoxLayout *bbox = new QVBoxLayout();
bbox_start = addButton(toplevel, bbox, "Start Runtime", &RtMonQt::activate_start);
bbox_start =
addButton(toplevel, bbox, "Start Runtime", SLOT(activate_start()));
bbox_restart =
addButton(toplevel, bbox, "Restart Runtime", &RtMonQt::activate_restart);
bbox_stop = addButton(toplevel, bbox, "Stop Runtime", &RtMonQt::activate_stop);
addButton(toplevel, bbox, "Restart Runtime", SLOT(activate_restart()));
bbox_stop = addButton(toplevel, bbox, "Stop Runtime", SLOT(activate_stop()));
QVBoxLayout *lbox = new QVBoxLayout();
lbox->setSpacing(33);
lbox->addWidget(bbox_label);
addButton(toplevel, lbox, "Reset Runtime", &RtMonQt::activate_reset);
addButton(toplevel, lbox, "Reset Runtime", SLOT(activate_reset()));
QHBoxLayout *bbox_vbox = new QHBoxLayout();
bbox_vbox->addWidget(bbox_image);
......@@ -214,16 +215,16 @@ void RtMonQtWidget::rtmon_scan()
if (sts == PWR__SRVCONNECTION) {
strcpy(color_name, "Gray");
strcpy(text, "Down");
rtmon->bbox_start->setEnabled(TRUE);
rtmon->bbox_restart->setEnabled(FALSE);
rtmon->bbox_stop->setEnabled(FALSE);
rtmon->tools_xtt->setEnabled(FALSE);
rtmon->tools_op->setEnabled(FALSE);
rtmon->file_xtt->setEnabled(FALSE);
rtmon->file_op->setEnabled(FALSE);
rtmon->bbox_image->setVisible(FALSE);
rtmon->bbox_image_gray->setVisible(TRUE);
rtmon->bbox_start->setEnabled(true);
rtmon->bbox_restart->setEnabled(false);
rtmon->bbox_stop->setEnabled(false);
rtmon->tools_xtt->setEnabled(false);
rtmon->tools_op->setEnabled(false);
rtmon->file_xtt->setEnabled(false);
rtmon->file_op->setEnabled(false);
rtmon->bbox_image->setVisible(false);
rtmon->bbox_image_gray->setVisible(true);
} else {
if (((sts & 7) == 2) || ((sts & 7) == 4)) {
strcpy(color_name, "Red");
......@@ -235,15 +236,15 @@ void RtMonQtWidget::rtmon_scan()
strcpy(color_name, "Green");
strcpy(text, "Running");
}
rtmon->bbox_start->setEnabled(FALSE);
rtmon->bbox_restart->setEnabled(TRUE);
rtmon->bbox_stop->setEnabled(TRUE);
rtmon->tools_xtt->setEnabled(TRUE);
rtmon->tools_op->setEnabled(TRUE);
rtmon->file_xtt->setEnabled(TRUE);
rtmon->file_op->setEnabled(TRUE);
rtmon->bbox_image->setVisible(TRUE);
rtmon->bbox_image_gray->setVisible(FALSE);
rtmon->bbox_start->setEnabled(false);
rtmon->bbox_restart->setEnabled(true);
rtmon->bbox_stop->setEnabled(true);
rtmon->tools_xtt->setEnabled(true);
rtmon->tools_op->setEnabled(true);
rtmon->file_xtt->setEnabled(true);
rtmon->file_op->setEnabled(true);
rtmon->bbox_image->setVisible(true);
rtmon->bbox_image_gray->setVisible(false);
}
QPalette pal;
......@@ -289,6 +290,26 @@ void RtMonQtWidget::focusInEvent(QFocusEvent *event)
QWidget::focusInEvent(event);
}
void RtMonQtWidget::activate_start()
{
rtmon->activate_start();
}
void RtMonQtWidget::activate_restart()
{
rtmon->activate_restart();
}
void RtMonQtWidget::activate_stop()
{
rtmon->activate_stop();
}
void RtMonQtWidget::activate_reset()
{
rtmon->activate_reset();
}
void RtMonQtWidget::activate_xtt()
{
rtmon->activate_xtt();
......
......@@ -93,6 +93,10 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_start();
void activate_restart();
void activate_stop();
void activate_reset();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
......
......@@ -90,6 +90,31 @@ void CowTreeQtWidget::focusInEvent(QFocusEvent *event)
QWidget::focusInEvent(event);
}
void CowTreeQtWidget::activate_print()
{
tree->activate_print();
}
void CowTreeQtWidget::activate_zoom_in()
{
tree->activate_zoom_in();
}
void CowTreeQtWidget::activate_zoom_out()
{
tree->activate_zoom_out();
}
void CowTreeQtWidget::activate_zoom_reset()
{
tree->activate_zoom_reset();
}
void CowTreeQtWidget::activate_help()
{
tree->activate_help();
}
void CowTreeQtWidget::activate_tree_layout()
{
tree->treenav->show_tree();
......
......@@ -85,8 +85,13 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_print();
void activate_tree_layout();
void activate_list_layout();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_help();
void activate_button_ok();
private:
......
......@@ -284,11 +284,31 @@ void AttrQtWidget::attr_activate_cmd_scrolled_ca()
}
}
void AttrQtWidget::attr_activate_changevalue()
{
attr->change_value();
}
void AttrQtWidget::attr_activate_store()
{
attr->store();
}
void AttrQtWidget::attr_activate_recall()
{
attr->recall_next();
}
void AttrQtWidget::attr_activate_help()
{
// Not yet implemented
}
void AttrQtWidget::attr_activate_recall_prev()
{
attr->recall_prev();
}
void AttrQtWidget::action_text_inserted()
{
int count = attr->cmd_scrolled_buffer->toPlainText().size();
......@@ -329,12 +349,14 @@ AttrQt::AttrQt(QWidget *a_parent_wid, void *a_parent_ctx, attr_eType a_type,
// Functions entry
QMenu *functions = menu_bar->addMenu(translate_utf8("&Functions"));
addMenuItem(toplevel, functions, "&Change Value", SLOT(change_value()),
"CTRL+Q");
addMenuItem(toplevel, functions, "&Store", SLOT(store()), "CTRL+T");
addMenuItem(toplevel, functions, "&Recall", SLOT(recall_next()), "CTRL+N");
addMenuItem(toplevel, functions, "Recall &previous", SLOT(recall_prev()),
"CTRL+P");
addMenuItem(toplevel, functions, "&Change Value",
SLOT(attr_activate_changevalue()), "CTRL+Q");
addMenuItem(toplevel, functions, "&Store", SLOT(attr_activate_store()),
"CTRL+T");
addMenuItem(toplevel, functions, "&Recall", SLOT(attr_activate_recall()),
"CTRL+N");
addMenuItem(toplevel, functions, "Recall &previous",
SLOT(attr_activate_recall_prev()), "CTRL+P");
// Help entry
QMenu *help = menu_bar->addMenu(translate_utf8("&Help"));
......@@ -363,7 +385,7 @@ AttrQt::AttrQt(QWidget *a_parent_wid, void *a_parent_ctx, attr_eType a_type,
cmd_entry = new CoWowEntryQt(&value_recall);
cmd_entry->setFixedHeight(25);
QObject::connect(cmd_entry, SIGNAL(editingFinished()), toplevel,
SLOT(attr_activate_cmd_input()));
SLOT(attr_activate_cmd_entry()));
statusbar->addWidget(msg_label);
statusbar->addWidget(cmd_prompt);
......@@ -384,10 +406,10 @@ AttrQt::AttrQt(QWidget *a_parent_wid, void *a_parent_ctx, attr_eType a_type,
buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_scrolled_ok()));
toplevel, SLOT(attr_activate_cmd_scrolled_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel),
SIGNAL(clicked()), toplevel,
SLOT(activate_cmd_scrolled_ca()));
SLOT(attr_activate_cmd_scrolled_ca()));
QVBoxLayout *cmd_scrolledinput_layout = new QVBoxLayout();
add_expanding(cmd_scrolledinput_layout, cmd_scrolled_buffer);
......@@ -415,9 +437,8 @@ AttrQt::AttrQt(QWidget *a_parent_wid, void *a_parent_ctx, attr_eType a_type,
toplevel->setModal(true);
}
} else {
attrnav =
new AttrNavQt(this, a_parent_wid, type, "Plant", itemlist, item_cnt,
&brow_widget, &sts);
attrnav = new AttrNavQt(this, a_parent_wid, type, "Plant", itemlist,
item_cnt, &brow_widget, &sts);
attrnav->message_cb = &Attr::message;
attrnav->change_value_cb = &Attr::change_value_c;
attrnav->get_subgraph_info_cb = &Attr::get_subgraph_info_c;
......
......@@ -99,7 +99,11 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void attr_activate_changevalue();
void attr_activate_store();
void attr_activate_recall();
void attr_activate_help();
void attr_activate_recall_prev();
void attr_activate_cmd_entry();
void attr_activate_cmd_scrolled_ok();
void attr_activate_cmd_scrolled_ca();
......
......@@ -138,6 +138,11 @@ int GeCurveQt::get_period(time_ePeriod *period)
return 0;
}
void GeCurveQtWidget::activate_configure()
{
curve->activate_configure();
}
void GeCurveQtWidget::activate_madd()
{
if (curve->madd_cb) {
......@@ -145,17 +150,22 @@ void GeCurveQtWidget::activate_madd()
}
}
void GeCurveQtWidget::activate_zoom_in()
void GeCurveQtWidget::activate_print()
{
curve->activate_print();
}
void GeCurveQtWidget::activate_zoomin()
{
curve_Zoom(curve->growcurve_ctx, 2.0);
}
void GeCurveQtWidget::activate_zoom_out()
void GeCurveQtWidget::activate_zoomout()
{
curve_Zoom(curve->growcurve_ctx, 0.5);
}
void GeCurveQtWidget::activate_zoom_reset()
void GeCurveQtWidget::activate_zoomreset()
{
curve_Unzoom(curve->growcurve_ctx);
}
......@@ -255,6 +265,11 @@ void GeCurveQtWidget::activate_timecombo(int index)
curve->current_period = period;
}
void GeCurveQtWidget::activate_background()
{
curve->activate_background();
}
void GeCurveQtWidget::activate_showname()
{
}
......@@ -283,6 +298,36 @@ void GeCurveQtWidget::activate_xlimits()
curve->open_minmax(0);
}
void GeCurveQtWidget::activate_new()
{
curve->activate_new();
}
void GeCurveQtWidget::activate_save()
{
curve->activate_save();
}
void GeCurveQtWidget::activate_open()
{
curve->activate_open();
}
void GeCurveQtWidget::activate_snapshot()
{
curve->activate_snapshot();
}
void GeCurveQtWidget::activate_export()
{
curve->activate_export();
}
void GeCurveQtWidget::activate_help()
{
curve->activate_help();
}
void GeCurveQtWidget::activate_minmax_ok()
{
bool ok = true;
......@@ -672,11 +717,11 @@ GeCurveQt::GeCurveQt(void *gc_parent_ctx, QWidget *parent_widget,
// View menu
QMenu *view = menu_bar->addMenu(translate_utf8("&View"));
addMenuItem(toplevel, view, "Zoom &In", SLOT(activate_zoom_in()), "CTRL+I",
addMenuItem(toplevel, view, "Zoom &In", SLOT(activate_zoomin()), "CTRL+I",
"zoom-in");
addMenuItem(toplevel, view, "Zoom &Out", SLOT(activate_zoom_out()), "CTRL+O",
addMenuItem(toplevel, view, "Zoom &Out", SLOT(activate_zoomout()), "CTRL+O",
"zoom-out");
addMenuItem(toplevel, view, "Zoom &Reset", SLOT(activate_zoom_reset()), "",
addMenuItem(toplevel, view, "Zoom &Reset", SLOT(activate_zoomreset()), "",
"zoom-original");
addMenuItem(toplevel, view, "&Background Color", SLOT(activate_background()));
addMenuItem(toplevel, view, "&Show Names", SLOT(activate_showname()), "CTRL+W");
......@@ -691,11 +736,11 @@ GeCurveQt::GeCurveQt(void *gc_parent_ctx, QWidget *parent_widget,
// Toolbar
QToolBar *tools = new QToolBar();
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoom_in()),
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoomin()),
"$pwr_exe/xtt_zoom_in.png");
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoom_out()),
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoomout()),
"$pwr_exe/xtt_zoom_out.png");
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoom_reset()),
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoomreset()),
"$pwr_exe/xtt_zoom_reset.png");
addToolItem(toplevel, tools, "Page left", SLOT(activate_page_left()),
"$pwr_exe/ge_page_left.png");
......@@ -964,9 +1009,9 @@ void GeCurveQt::create_export_dialog()
buttons->addButton(QDialogButtonBox::Cancel);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_export_ok));
toplevel, SLOT(activate_export_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
toplevel, SLOT(activate_export_cancel));
toplevel, SLOT(activate_export_cancel()));
QHBoxLayout *export_hbox1 = new QHBoxLayout();
export_hbox1->addWidget(attr_label);
......
......@@ -139,10 +139,16 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_showname();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_configure();
void activate_print();
void activate_new();
void activate_save();
void activate_open();
void activate_snapshot();
void activate_export();
void activate_zoomin();
void activate_zoomout();
void activate_zoomreset();
void activate_page_left();
void activate_page_right();
void activate_scroll_left();
......@@ -156,10 +162,13 @@ public slots:
void activate_madd();
void activate_remove();
void activate_timecombo(int index);
void activate_background();
void activate_showname();
void activate_filledcurves(bool set = false);
void activate_curvetype();
void activate_digsplit();
void activate_xlimits();
void activate_help();
void activate_minmax_ok();
void activate_minmax_cancel();
void activate_minmax_save();
......
......@@ -563,24 +563,10 @@ void GeQtWidget::activate_select_objects()
ge->activate_select_objects();
}
void GeQtWidget::activate_select_nextright()
void GeQtWidget::activate_select_next()
{
ge->activate_select_nextobject(glow_eDirection_Right);
}
void GeQtWidget::activate_select_nextleft()
{
ge->activate_select_nextobject(glow_eDirection_Left);
}
void GeQtWidget::activate_select_nextup()
{
ge->activate_select_nextobject(glow_eDirection_Up);
}
void GeQtWidget::activate_select_nextdown()
{
ge->activate_select_nextobject(glow_eDirection_Down);
ge->activate_select_nextobject(
static_cast<glow_eDirection>(((QAction *) sender())->data().toInt()));
}
void GeQtWidget::activate_group()
......@@ -1243,7 +1229,7 @@ void GeQt::update()
void GeQtWidget::closeEvent(QCloseEvent *event)
{
ge->activate_exit();
ge->Ge::activate_exit();
QWidget::closeEvent(event);
}
......@@ -1507,14 +1493,18 @@ GeQt::GeQt(void *x_parent_ctx, QWidget *x_parent_widget,
SLOT(activate_select_cons()));
addMenuItem(toplevel, functions_select, "All &Objects",
SLOT(activate_select_objects()));
addMenuItem(toplevel, functions_select, "Next Right",
SLOT(activate_select_nextright()), "CTRL+Right");
addMenuItem(toplevel, functions_select, "Next Left",
SLOT(activate_select_nextleft()), "CTRL+Left");
addMenuItem(toplevel, functions_select, "Next Up", SLOT(activate_select_nextup()),
"CTRL+Up");
addMenuItem(toplevel, functions_select, "Next Down",
SLOT(activate_select_nextdown()), "CTRL+Down");
QAction *a = addMenuItem(toplevel, functions_select, "Next Right",
SLOT(activate_select_next()), "CTRL+Right");
a->setData(glow_eDirection_Right);
a = addMenuItem(toplevel, functions_select, "Next Left",
SLOT(activate_select_next()), "CTRL+Left");
a->setData(glow_eDirection_Left);
a = addMenuItem(toplevel, functions_select, "Next Up",
SLOT(activate_select_next()), "CTRL+Up");
a->setData(glow_eDirection_Up);
a = addMenuItem(toplevel, functions_select, "Next Down",
SLOT(activate_select_next()), "CTRL+Down");
a->setData(glow_eDirection_Down);
addMenuItem(toplevel, functions, "&Group", SLOT(activate_group()));
addMenuItem(toplevel, functions, "&Ungroup", SLOT(activate_ungroup()));
......
......@@ -168,10 +168,7 @@ public slots:
void activate_equid_horiz_center();
void activate_select_cons();
void activate_select_objects();
void activate_select_nextright();
void activate_select_nextleft();
void activate_select_nextup();
void activate_select_nextdown();
void activate_select_next();
void activate_group();
void activate_ungroup();
void activate_connect();
......
......@@ -234,6 +234,16 @@ void CLogQt::file_selected_cb(void *ctx, char *text, int ok_pressed)
clog->reset_cursor();
}
void CLogQtWidget::activate_next_file()
{
clog->activate_next_file();
}
void CLogQtWidget::activate_prev_file()
{
clog->activate_prev_file();
}
void CLogQtWidget::activate_update()
{
clog->set_clock_cursor();
......@@ -241,6 +251,16 @@ void CLogQtWidget::activate_update()
clog->reset_cursor();
}
void CLogQtWidget::activate_print()
{
clog->activate_print();
}
void CLogQtWidget::activate_help()
{
clog->activate_help();
}
void CLogQtWidget::activate_helpmsg()
{
}
......
......@@ -93,11 +93,15 @@ protected:
public slots:
void activate_select_file();
void activate_next_file();
void activate_prev_file();
void activate_update();
void activate_print();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_filter();
void activate_help();
void activate_helpmsg();
void filter_apply_cb();
......
......@@ -264,7 +264,7 @@ EvQt::EvQt(void *ev_parent_ctx, QWidget *ev_parent_wid, char *eve_name,
addMenuItem(object, functions, "&Acknowledge",
SLOT(ala_activate_ack_last()), "CTRL+K");
addMenuItem(object, functions, "A&cknowledge All",
SLOT(eve_activate_ack_all()));
SLOT(ala_activate_ack_all()));
addMenuItem(object, functions, "Open &Program",
SLOT(ala_activate_open_plc()), "CTRL+L");
addMenuItem(object, functions, "&Display object in Navigator",
......@@ -674,6 +674,36 @@ void EvQt::blk_activate_exit()
blk_displayed = 0;
}
void EvQtObject::eve_activate_print()
{
ev->eve_activate_print();
}
void EvQtObject::ala_activate_print()
{
ev->ala_activate_print();
}
void EvQtObject::blk_activate_print()
{
ev->blk_activate_print();
}
void EvQtObject::eve_activate_ack_last()
{
ev->eve_activate_ack_last();
}
void EvQtObject::ala_activate_ack_last()
{
ev->ala_activate_ack_last();
}
void EvQtObject::ala_activate_ack_all()
{
ev->eve_activate_ack_all();
}
void EvQtObject::ala_activate_shift_view()
{
ev->view_shift();
......@@ -798,4 +828,29 @@ void EvQtObject::eve_activate_hide_text(bool set)
void EvQtObject::ala_activate_hide_text(bool set)
{
ev->ala->set_hide_text(set);
}
\ No newline at end of file
}
void EvQtObject::eve_activate_help()
{
ev->eve_activate_help();
}
void EvQtObject::eve_activate_helpevent()
{
ev->eve_activate_helpevent();
}
void EvQtObject::ala_activate_help()
{
ev->ala_activate_help();
}
void EvQtObject::ala_activate_helpevent()
{
ev->ala_activate_helpevent();
}
void EvQtObject::blk_activate_help()
{
ev->blk_activate_help();
}
......@@ -105,6 +105,12 @@ public:
EvQtObject(EvQt *parent_ctx) : QObject(), ev(parent_ctx) {}
public slots:
void eve_activate_print();
void ala_activate_print();
void blk_activate_print();
void eve_activate_ack_last();
void ala_activate_ack_last();
void ala_activate_ack_all();
void eve_activate_zoom_in();
void ala_activate_zoom_in();
void blk_activate_zoom_in();
......@@ -127,6 +133,11 @@ public slots:
void ala_activate_hide_object(bool set);
void eve_activate_hide_text(bool set);
void ala_activate_hide_text(bool set);
void eve_activate_help();
void ala_activate_help();
void blk_activate_help();
void eve_activate_helpevent();
void ala_activate_helpevent();
void ala_activate_shift_view();
void ala_activate_select_flat();
void ala_activate_select_view();
......
......@@ -298,6 +298,21 @@ void EvAlaQtWidget::closeEvent(QCloseEvent *event)
QWidget::closeEvent(event);
}
void EvAlaQtWidget::ala_activate_print()
{
ala->ala_activate_print();
}
void EvAlaQtWidget::ala_activate_ack_last()
{
ala->ala_activate_ack_last();
}
void EvAlaQtWidget::ala_activate_ack_all()
{
ala->ala_activate_ack_all();
}
void EvAlaQtWidget::ala_activate_shift_view()
{
ala->view_shift();
......@@ -352,4 +367,14 @@ void EvAlaQtWidget::ala_activate_hide_object(bool set)
void EvAlaQtWidget::ala_activate_hide_text(bool set)
{
ala->ala->set_hide_text(set);
}
void EvAlaQtWidget::ala_activate_help()
{
ala->ala_activate_help();
}
void EvAlaQtWidget::ala_activate_helpevent()
{
ala->ala_activate_helpevent();
}
\ No newline at end of file
......@@ -85,6 +85,9 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void ala_activate_print();
void ala_activate_ack_last();
void ala_activate_ack_all();
void ala_activate_zoom_in();
void ala_activate_zoom_out();
void ala_activate_zoom_reset();
......@@ -93,6 +96,8 @@ public slots:
void ala_activate_disp_hundredth(bool set);
void ala_activate_hide_object(bool set);
void ala_activate_hide_text(bool set);
void ala_activate_help();
void ala_activate_helpevent();
void ala_activate_shift_view();
void ala_activate_select_flat();
void ala_activate_select_view();
......
......@@ -286,6 +286,11 @@ void EvEveQtWidget::closeEvent(QCloseEvent *event)
QWidget::closeEvent(event);
}
void EvEveQtWidget::eve_activate_print()
{
eve->eve_activate_print();
}
void EvEveQtWidget::eve_activate_shift_view()
{
eve->view_shift();
......@@ -340,4 +345,14 @@ void EvEveQtWidget::eve_activate_hide_object(bool set)
void EvEveQtWidget::eve_activate_hide_text(bool set)
{
eve->ala->set_hide_text(set);
}
void EvEveQtWidget::eve_activate_help()
{
eve->eve_activate_help();
}
void EvEveQtWidget::eve_activate_helpevent()
{
eve->eve_activate_helpevent();
}
\ No newline at end of file
......@@ -85,6 +85,7 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void eve_activate_print();
void eve_activate_zoom_in();
void eve_activate_zoom_out();
void eve_activate_zoom_reset();
......@@ -93,6 +94,8 @@ public slots:
void eve_activate_disp_hundredth(bool set);
void eve_activate_hide_object(bool set);
void eve_activate_hide_text(bool set);
void eve_activate_help();
void eve_activate_helpevent();
void eve_activate_shift_view();
void eve_activate_select_flat();
void eve_activate_select_view();
......
......@@ -343,7 +343,7 @@ XttGeQt::XttGeQt(QWidget *xg_parent_wid, void *xg_parent_ctx,
graph->eventlog_cb = &ge_eventlog_cb;
QObject::connect(((GraphQt *) graph)->grow_widget,
SLOT(resize_signal(QResizeEvent * )), toplevel,
SIGNAL(resize_signal(QResizeEvent * )), toplevel,
SLOT(action_resize(QResizeEvent * )));
//TODO: grow_widget must emit a resize_signal signal in resizeEvent()
......
......@@ -123,7 +123,7 @@ HistQt::HistQt(void *hist_parent_ctx, QWidget *hist_parent_wid, char *hist_name,
addMenuItem(toplevel, functions, "&Display object in Navigator",
SLOT(activate_display_in_xnav()), "CTRL+D");
addMenuItem(toplevel, functions, "&Search", SLOT(ok_btn()), "CTRL+F");
addMenuItem(toplevel, functions, "S&tatistics", SLOT(stat()));
addMenuItem(toplevel, functions, "S&tatistics", SLOT(activate_stat()));
// View entry
QMenu *view = menu_bar->addMenu(translate_utf8("&View"));
......@@ -268,7 +268,7 @@ HistQt::HistQt(void *hist_parent_ctx, QWidget *hist_parent_wid, char *hist_name,
QPushButton *sea_search_button = new QPushButton(translate_utf8("Search"));
sea_search_button->setFixedSize(80, 25);
QObject::connect(sea_search_button, SLOT(clicked()), toplevel,
QObject::connect(sea_search_button, SIGNAL(clicked()), toplevel,
SLOT(ok_btn()));
QHBoxLayout *sea_numeventsbox = new QHBoxLayout();
......@@ -314,13 +314,11 @@ HistQt::HistQt(void *hist_parent_ctx, QWidget *hist_parent_wid, char *hist_name,
// Toolbar
QToolBar *tools = new QToolBar();
addToolItem(toplevel, tools, "Zoom in", SLOT(eve_activate_zoom_in()),
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoom_in()),
"$pwr_exe/xtt_zoom_in.png");
addToolItem(toplevel, tools, "Zoom out", SLOT(eve_activate_zoom_out()),
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoom_out()),
"$pwr_exe/xtt_zoom_out.png");
addToolItem(toplevel, tools, "Zoom reset", SLOT(eve_activate_zoom_reset()),
"$pwr_exe/xtt_zoom_reset.png");
addToolItem(toplevel, tools, "Zoom reset", SLOT(eve_activate_zoom_reset()),
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoom_reset()),
"$pwr_exe/xtt_zoom_reset.png");
// Hide search dialog checkbutton
......@@ -416,6 +414,11 @@ void HistQtWidget::ok_btn()
free(hist->eventName_str);
}
void HistQtWidget::activate_print()
{
hist->activate_print();
}
void HistQtWidget::activate_zoom_in()
{
hist->hist->zoom(1.2);
......@@ -450,6 +453,11 @@ void HistQtWidget::activate_display_in_xnav()
hist->hist->display_in_xnav();
}
void HistQtWidget::activate_stat()
{
hist->stat();
}
void HistQtWidget::activate_disp_hundredth(bool set)
{
hist->hist->set_display_hundredth(set);
......@@ -465,12 +473,62 @@ void HistQtWidget::activate_hide_text(bool set)
hist->hist->set_hide_text(set);
}
void HistQtWidget::activate_help()
{
hist->activate_help();
}
void HistQtWidget::activate_helpevent()
{
hist->activate_helpevent();
}
//callbackfunctions from the searchdialog
void HistQtWidget::cancel_cb()
{
// printf("hist_cancel_cb\n");
}
void HistQtWidget::today_cb()
{
hist->today_cb();
}
void HistQtWidget::yesterday_cb()
{
hist->yesterday_cb();
}
void HistQtWidget::thisw_cb()
{
hist->thisw_cb();
}
void HistQtWidget::lastw_cb()
{
hist->lastw_cb();
}
void HistQtWidget::thism_cb()
{
hist->thism_cb();
}
void HistQtWidget::lastm_cb()
{
hist->lastm_cb();
}
void HistQtWidget::all_cb()
{
hist->all_cb();
}
void HistQtWidget::time_cb()
{
hist->time_cb();
}
void HistQt::set_num_of_events(int nrOfEvents)
{
char buf[20];
......
......@@ -107,18 +107,30 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_print();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_hide_search(bool set);
void activate_open_plc();
void activate_stat();
void activate_display_in_xnav();
void activate_disp_hundredth(bool set);
void activate_hide_object(bool set);
void activate_hide_text(bool set);
void activate_help();
void activate_helpevent();
void ok_btn();
//callbackfunctions from the searchdialog
void cancel_cb();
void today_cb();
void yesterday_cb();
void thisw_cb();
void lastw_cb();
void thism_cb();
void lastm_cb();
void all_cb();
void time_cb();
private:
HistQt *hist;
......
......@@ -200,27 +200,27 @@ OpQt::OpQt(void *op_parent_ctx, QWidget *op_parent_wid, char *opplace,
aalarm_ack->setFixedSize(30, 20);
aalarm_mark->setFixedHeight(20);
QObject::connect(aalarm_ack, SIGNAL(clicked()), toplevel,
SLOT(activate_aalarm_ack));
SLOT(activate_aalarm_ack()));
// Increment size button
QPushButton *incr_button = image_button(toplevel, "$pwr_exe/xtt_down.png");
incr_button->setFixedSize(30, 20);
alarmcnt_label->setFixedHeight(20);
QObject::connect(incr_button, SIGNAL(clicked()), toplevel,
SLOT(activate_aalarm_incr));
SLOT(activate_aalarm_incr()));
// Decrement size button
decr_button = image_button(toplevel, "$pwr_exe/xtt_up.png");
decr_button->setFixedSize(30, 20);
QObject::connect(decr_button, SIGNAL(clicked()), toplevel,
SLOT(activate_aalarm_decr));
SLOT(activate_aalarm_decr()));
// Acknowledge button for b alarms
QPushButton *balarm_ack = image_button(toplevel, "$pwr_exe/xtt_acknowledge.png");
balarm_ack->setFixedSize(30, 20);
balarm_mark->setFixedHeight(20);
QObject::connect(balarm_ack, SIGNAL(clicked()), toplevel,
SLOT(activate_balarm_ack));
SLOT(activate_balarm_ack()));
QHBoxLayout *hbox_abutton = new QHBoxLayout();
hbox_abutton->addWidget(aalarm_ack);
......@@ -427,7 +427,7 @@ OpQt::OpQt(void *op_parent_ctx, QWidget *op_parent_wid, char *opplace,
sup_vect[i].textw = (void *) node_label;
sup_vect[i].textbgw = (void *) node_label;
sup_vect[i].buttonw = (void *) node_image;
QObject::connect(node_image, SLOT(clicked()), toplevel,
QObject::connect(node_image, SIGNAL(clicked()), toplevel,
SLOT(activate_sup_node()));
status_bar->setContentsMargins(padding2, padding2, padding2, padding2);
status_bar->addWidget(node_image);
......@@ -915,6 +915,16 @@ int OpQt::configure(char *opplace_str)
return XNAV__SUCCESS;
}
void OpQtWidget::activate_aalarm_ack()
{
op->activate_aalarm_ack();
}
void OpQtWidget::activate_balarm_ack()
{
op->activate_balarm_ack();
}
void OpQtWidget::activate_zoom_in()
{
if (op->text_size >= 18) {
......@@ -1013,17 +1023,102 @@ void OpQtWidget::activate_aalarm_decr()
resize(width, height);
}
void OpQtWidget::activate_cmd_menu_item(QAction *w)
void OpQtWidget::activate_alarmlist()
{
op->activate_alarmlist();
}
void OpQtWidget::activate_eventlist()
{
op->activate_eventlist();
}
void OpQtWidget::activate_eventlog()
{
op->activate_eventlog();
}
void OpQtWidget::activate_blocklist()
{
op->activate_blocklist();
}
void OpQtWidget::activate_navigator()
{
op->activate_navigator();
}
void OpQtWidget::activate_help()
{
op->activate_help();
}
void OpQtWidget::activate_help_overview()
{
op->activate_help_overview();
}
void OpQtWidget::activate_help_opwin()
{
op->activate_help_opwin();
}
void OpQtWidget::activate_help_proview()
{
op->activate_help_proview();
}
void OpQtWidget::activate_trend()
{
op->activate_trend();
}
void OpQtWidget::activate_fast()
{
op->activate_fast();
}
void OpQtWidget::activate_history()
{
op->activate_history();
}
void OpQtWidget::activate_graph()
{
op->activate_graph();
}
void OpQtWidget::activate_switch_user()
{
op->activate_switch_user();
}
void OpQtWidget::activate_show_user()
{
op->activate_show_user();
}
void OpQtWidget::activate_logout()
{
op->activate_logout();
}
void OpQtWidget::activate_cmd_menu_item()
{
pwr_tCmd cmd;
int sts;
sts = op->get_cmd(w->menu(), cmd);
sts = op->get_cmd(((QAction *) sender())->menu(), cmd);
if (ODD(sts)) {
op->activate_cmd_menu_item(cmd);
}
}
void OpQtWidget::activate_sup_node()
{
op->activate_sup_node(((QAction *) sender())->parentWidget());
}
void OpQtWidget::activate_appl()
{
for (int i = 0; i < 25; i++) {
......
......@@ -142,12 +142,31 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_aalarm_ack();
void activate_balarm_ack();
void activate_aalarm_incr();
void activate_aalarm_decr();
void activate_zoom_in();
void activate_zoom_out();
void activate_colortheme();
void activate_cmd_menu_item(QAction *action);
void activate_alarmlist();
void activate_eventlist();
void activate_eventlog();
void activate_blocklist();
void activate_navigator();
void activate_help();
void activate_help_overview();
void activate_help_opwin();
void activate_help_proview();
void activate_trend();
void activate_fast();
void activate_history();
void activate_switch_user();
void activate_show_user();
void activate_logout();
void activate_cmd_menu_item();
void activate_sup_node();
void activate_graph();
void activate_appl();
void activate_info();
......
......@@ -75,44 +75,109 @@ void RtTraceQtWidget::activate_print()
&sts);
}
void RtTraceQtWidget::activate_zoom_in()
void RtTraceQtWidget::activate_printselect()
{
flow_Zoom(rt->flow_ctx, 1.0 / 0.7);
rt->activate_printselect();
}
void RtTraceQtWidget::activate_zoom_out()
void RtTraceQtWidget::activate_savetrace()
{
flow_Zoom(rt->flow_ctx, 0.7);
rt->activate_savetrace();
}
void RtTraceQtWidget::activate_zoom_reset()
void RtTraceQtWidget::activate_restoretrace()
{
flow_UnZoom(rt->flow_ctx);
rt->activate_restoretrace();
}
void RtTraceQtWidget::activate_scantime1()
void RtTraceQtWidget::activate_cleartrace()
{
rt->scan_time = 0.5;
rt->activate_cleartrace();
}
void RtTraceQtWidget::activate_scantime2()
void RtTraceQtWidget::activate_display_object()
{
rt->scan_time = 0.2;
rt->activate_display_object();
}
void RtTraceQtWidget::activate_scantime3()
void RtTraceQtWidget::activate_parent_window()
{
rt->scan_time = 0.1;
rt->activate_parent_window();
}
void RtTraceQtWidget::activate_scantime4()
void RtTraceQtWidget::activate_collect_insert()
{
rt->scan_time = 0.05;
rt->activate_collect_insert();
}
void RtTraceQtWidget::activate_scantime5()
void RtTraceQtWidget::activate_open_object()
{
rt->scan_time = 0.02;
rt->activate_open_object();
}
void RtTraceQtWidget::activate_open_subwindow()
{
rt->activate_open_subwindow();
}
void RtTraceQtWidget::activate_show_cross()
{
rt->activate_show_cross();
}
void RtTraceQtWidget::activate_open_classgraph()
{
rt->activate_open_classgraph();
}
void RtTraceQtWidget::activate_trace()
{
rt->activate_trace();
}
void RtTraceQtWidget::activate_simulate()
{
rt->activate_simulate();
}
void RtTraceQtWidget::activate_view()
{
rt->activate_view();
}
void RtTraceQtWidget::activate_zoomin()
{
flow_Zoom( rt->flow_ctx, 1.0/0.7);
}
void RtTraceQtWidget::activate_zoomout()
{
flow_Zoom( rt->flow_ctx, 0.7);
}
void RtTraceQtWidget::activate_zoomreset()
{
flow_UnZoom( rt->flow_ctx);
}
void RtTraceQtWidget::activate_scantime()
{
rt->scan_time = ((QAction *) sender())->data().toInt();
}
void RtTraceQtWidget::activate_help()
{
rt->activate_help();
}
void RtTraceQtWidget::activate_helpplc()
{
rt->activate_helpplc();
}
void RtTraceQtWidget::activate_helpplclist()
{
rt->activate_helpplclist();
}
RtTraceQt::~RtTraceQt()
......@@ -261,28 +326,32 @@ RtTraceQt::RtTraceQt(void *tr_parent_ctx, QWidget *tr_parent_wid,
// View Entry
QMenu *view = menu_bar->addMenu(translate_utf8("&View"));
addMenuItem(toplevel, view, "Zoom &In", SLOT(activate_zoom_in()), "CTRL+I",
addMenuItem(toplevel, view, "Zoom &In", SLOT(activate_zoomin()), "CTRL+I",
"zoom-in");
addMenuItem(toplevel, view, "Zoom &Out", SLOT(activate_zoom_out()), "CTRL+O",
addMenuItem(toplevel, view, "Zoom &Out", SLOT(activate_zoomout()), "CTRL+O",
"zoom-out");
addMenuItem(toplevel, view, "Zoom &Reset", SLOT(activate_zoom_reset()), "CTRL+B",
addMenuItem(toplevel, view, "Zoom &Reset", SLOT(activate_zoomreset()), "CTRL+B",
"zoom-original");
// Submenu ScanTime
QMenu *view_sc = view->addMenu(translate_utf8("&ScanTime"));
QActionGroup *view_sc_group = new QActionGroup(toplevel);
QAction *view_scantime1 =
addMenuRadioItem(toplevel, view_sc, "0.50 s", SLOT(activate_scantime1()),
QAction *a = addMenuRadioItem(toplevel, view_sc, "0.50 s",
SLOT(activate_scantime()), view_sc_group);
a->setData(500);
a->setChecked(true);
a = addMenuRadioItem(toplevel, view_sc, "0.20 s", SLOT(activate_scantime()),
view_sc_group);
a->setData(200);
a = addMenuRadioItem(toplevel, view_sc, "0.10 s", SLOT(activate_scantime()),
view_sc_group);
a->setData(100);
a = addMenuRadioItem(toplevel, view_sc, "0.05 s", SLOT(activate_scantime()),
view_sc_group);
a->setData(50);
a = addMenuRadioItem(toplevel, view_sc, "0.02 s", SLOT(activate_scantime()),
view_sc_group);
view_scantime1->setChecked(true);
addMenuRadioItem(toplevel, view_sc, "0.20 s", SLOT(activate_scantime2()),
view_sc_group);
addMenuRadioItem(toplevel, view_sc, "0.10 s", SLOT(activate_scantime3()),
view_sc_group);
addMenuRadioItem(toplevel, view_sc, "0.05 s", SLOT(activate_scantime4()),
view_sc_group);
addMenuRadioItem(toplevel, view_sc, "0.02 s", SLOT(activate_scantime5()),
view_sc_group);
a->setData(20);
// End submenu
// End View entry
......@@ -322,11 +391,11 @@ RtTraceQt::RtTraceQt(void *tr_parent_ctx, QWidget *tr_parent_wid,
SLOT(activate_display_object()), "$pwr_exe/xtt_navigator.png");
addToolItem(toplevel, tools, "Show Crossreferences", SLOT(activate_show_cross()),
"$pwr_exe/xtt_crossref.png");
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoom_in()),
addToolItem(toplevel, tools, "Zoom in", SLOT(activate_zoomin()),
"$pwr_exe/xtt_zoom_in.png");
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoom_out()),
addToolItem(toplevel, tools, "Zoom out", SLOT(activate_zoomout()),
"$pwr_exe/xtt_zoom_out.png");
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoom_reset()),
addToolItem(toplevel, tools, "Zoom reset", SLOT(activate_zoomreset()),
"$pwr_exe/xtt_zoom_reset.png");
// Flow widget
......
......@@ -78,14 +78,27 @@ protected:
public slots:
void activate_print();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_scantime1();
void activate_scantime2();
void activate_scantime3();
void activate_scantime4();
void activate_scantime5();
void activate_printselect();
void activate_savetrace();
void activate_restoretrace();
void activate_cleartrace();
void activate_parent_window();
void activate_display_object();
void activate_collect_insert();
void activate_open_object();
void activate_open_subwindow();
void activate_show_cross();
void activate_open_classgraph();
void activate_trace();
void activate_simulate();
void activate_view();
void activate_zoomin();
void activate_zoomout();
void activate_zoomreset();
void activate_scantime();
void activate_help();
void activate_helpplc();
void activate_helpplclist();
private:
RtTraceQt *rt;
......
......@@ -165,6 +165,41 @@ void XAttQtWidget::activate_change_value()
xatt->change_value(1);
}
void XAttQtWidget::activate_close_changeval()
{
xatt->change_value_close();
}
void XAttQtWidget::activate_print()
{
xatt->activate_print();
}
void XAttQtWidget::activate_display_object()
{
xatt->activate_display_object();
}
void XAttQtWidget::activate_show_cross()
{
xatt->activate_show_cross();
}
void XAttQtWidget::activate_open_classgraph()
{
xatt->activate_open_classgraph();
}
void XAttQtWidget::activate_open_plc()
{
xatt->activate_open_plc();
}
void XAttQtWidget::activate_help()
{
xatt->activate_help();
}
void XAttQtWidget::focusInEvent(QFocusEvent *event)
{
if (!xatt->focustimer.disabled()) {
......
......@@ -97,6 +97,13 @@ protected:
public slots:
void activate_change_value();
void activate_close_changeval();
void activate_print();
void activate_display_object();
void activate_show_cross();
void activate_open_classgraph();
void activate_open_plc();
void activate_help();
void activate_cmd_entry();
void activate_cmd_scrolled_ok();
void activate_cmd_scrolled_ca();
......
......@@ -172,34 +172,94 @@ void XColWindQtWidget::activate_change_value()
colwind->change_value(1);
}
void XColWindQtWidget::activate_zoom_reset()
void XColWindQtWidget::activate_open()
{
colwind->xattnav->unzoom();
colwind->activate_open();
}
void XColWindQtWidget::activate_save()
{
colwind->activate_save();
}
void XColWindQtWidget::activate_scantime1()
void XColWindQtWidget::activate_saveas()
{
colwind->xattnav->set_scantime(500);
colwind->activate_saveas();
}
void XColWindQtWidget::activate_scantime2()
void XColWindQtWidget::activate_print()
{
colwind->xattnav->set_scantime(200);
colwind->activate_print();
}
void XColWindQtWidget::activate_scantime3()
void XColWindQtWidget::activate_close_changeval()
{
colwind->xattnav->set_scantime(100);
colwind->change_value_close();
}
void XColWindQtWidget::activate_scantime4()
void XColWindQtWidget::activate_insert()
{
colwind->xattnav->set_scantime(50);
colwind->activate_collect_insert();
}
void XColWindQtWidget::activate_scantime5()
void XColWindQtWidget::activate_delete()
{
colwind->xattnav->set_scantime(20);
colwind->activate_collect_delete();
}
void XColWindQtWidget::activate_moveup()
{
colwind->activate_moveup();
}
void XColWindQtWidget::activate_movedown()
{
colwind->activate_movedown();
}
void XColWindQtWidget::activate_display_object()
{
colwind->activate_display_object();
}
void XColWindQtWidget::activate_show_cross()
{
colwind->activate_show_cross();
}
void XColWindQtWidget::activate_open_classgraph()
{
colwind->activate_open_classgraph();
}
void XColWindQtWidget::activate_open_plc()
{
colwind->activate_open_plc();
}
void XColWindQtWidget::activate_zoomin()
{
colwind->activate_zoomin();
}
void XColWindQtWidget::activate_zoomout()
{
colwind->activate_zoomout();
}
void XColWindQtWidget::activate_zoomreset()
{
colwind->xattnav->unzoom();
}
void XColWindQtWidget::activate_scantime()
{
colwind->xattnav->set_scantime(((QAction *) sender())->data().toInt());
}
void XColWindQtWidget::activate_help()
{
colwind->activate_help();
}
void XColWindQtWidget::focusInEvent(QFocusEvent *event)
......@@ -402,8 +462,8 @@ XColWindQt::XColWindQt(QWidget *xa_parent_wid, void *xa_parent_ctx,
// Edit entry
QMenu *edit = menu_bar->addMenu(translate_utf8("&Edit"));
addMenuItem(toplevel, edit, "&Insert", SLOT(activate_collect_insert()), "CTRL+V");
addMenuItem(toplevel, edit, "&Delete", SLOT(activate_collect_delete()), "Delete");
addMenuItem(toplevel, edit, "&Insert", SLOT(activate_insert()), "CTRL+V");
addMenuItem(toplevel, edit, "&Delete", SLOT(activate_delete()), "Delete");
addMenuItem(toplevel, edit, "Move &Up", SLOT(activate_moveup()), "Up");
addMenuItem(toplevel, edit, "Move &Down", SLOT(activate_movedown()), "Down");
......@@ -428,24 +488,28 @@ XColWindQt::XColWindQt(QWidget *xa_parent_wid, void *xa_parent_ctx,
"zoom-in");
addMenuItem(toplevel, view, "Zoom &Out", SLOT(activate_zoomout()), "CTRL+O",
"zoom-out");
addMenuItem(toplevel, view, "Zoom &Reset", SLOT(activate_zoom_reset()), "CTRL+B",
addMenuItem(toplevel, view, "Zoom &Reset", SLOT(activate_zoomreset()), "CTRL+B",
"zoom-original");
// Submenu ScanTime
QMenu *view_sc = view->addMenu(translate_utf8("&ScanTime"));
QActionGroup *view_sc_group = new QActionGroup(toplevel);
QAction *view_scantime1 =
addMenuRadioItem(toplevel, view_sc, "0.50 s", SLOT(activate_scantime1()),
QAction *a = addMenuRadioItem(toplevel, view_sc, "0.50 s",
SLOT(activate_scantime()), view_sc_group);
a->setData(500);
a->setChecked(true);
a = addMenuRadioItem(toplevel, view_sc, "0.20 s", SLOT(activate_scantime()),
view_sc_group);
a->setData(200);
a = addMenuRadioItem(toplevel, view_sc, "0.10 s", SLOT(activate_scantime()),
view_sc_group);
a->setData(100);
a = addMenuRadioItem(toplevel, view_sc, "0.05 s", SLOT(activate_scantime()),
view_sc_group);
a->setData(50);
a = addMenuRadioItem(toplevel, view_sc, "0.02 s", SLOT(activate_scantime()),
view_sc_group);
view_scantime1->setChecked(true);
addMenuRadioItem(toplevel, view_sc, "0.20 s", SLOT(activate_scantime2()),
view_sc_group);
addMenuRadioItem(toplevel, view_sc, "0.10 s", SLOT(activate_scantime3()),
view_sc_group);
addMenuRadioItem(toplevel, view_sc, "0.05 s", SLOT(activate_scantime4()),
view_sc_group);
addMenuRadioItem(toplevel, view_sc, "0.02 s", SLOT(activate_scantime5()),
view_sc_group);
a->setData(20);
// End submenu
// End View entry
......
......@@ -100,13 +100,25 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_open();
void activate_save();
void activate_saveas();
void activate_insert();
void activate_delete();
void activate_print();
void activate_moveup();
void activate_movedown();
void activate_change_value();
void activate_zoom_reset();
void activate_scantime1();
void activate_scantime2();
void activate_scantime3();
void activate_scantime4();
void activate_scantime5();
void activate_close_changeval();
void activate_display_object();
void activate_show_cross();
void activate_open_classgraph();
void activate_open_plc();
void activate_zoomin();
void activate_zoomout();
void activate_zoomreset();
void activate_scantime();
void activate_help();
void activate_cmd_entry();
void activate_cmd_scrolled_ok();
void activate_cmd_scrolled_ca();
......
......@@ -60,6 +60,11 @@
#include <QMenuBar>
#include <QVBoxLayout>
void XCrrQtWidget::activate_print()
{
xcrr->activate_print();
}
void XCrrQtWidget::activate_open_plc()
{
xcrr->xcrrnav->start_trace();
......
......@@ -80,6 +80,7 @@ protected:
void closeEvent(QCloseEvent *event);
public slots:
void activate_print();
void activate_open_plc();
void activate_help();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment