Commit b92006f8 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Cleaned up unused constructor parameters.

parent 488e2a65
......@@ -119,13 +119,12 @@ PnViewerQt::PnViewerQt(const char* v_name, const char* v_device,
QLabel* header_left = new QLabel("Devices on Network");
QLabel* header_right = new QLabel("Devices from Configuration");
viewernav
= new PnViewerNavQt(this, nav_right, viewer_eType_Network, &nav_widget);
viewernav = new PnViewerNavQt(this, viewer_eType_Network, &nav_widget);
viewernav->change_value_cb = &change_value;
viewernav->message_cb = &message_cb;
viewernavconf = new PnViewerNavQt(
this, nav_left, viewer_eType_Configuration, &navconf_widget);
viewernavconf = new PnViewerNavQt(this, viewer_eType_Configuration,
&navconf_widget);
viewernavconf->change_value_cb = &change_value;
viewernavconf->message_cb = &message_cb;
......
......@@ -71,8 +71,7 @@ class PnViewerQtWidget : public QWidget {
Q_OBJECT
public:
PnViewerQtWidget(PnViewerQt* parent_ctx)
: QWidget(), viewer(parent_ctx){}
PnViewerQtWidget(PnViewerQt* parent_ctx) : QWidget(), viewer(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -44,7 +44,7 @@
#include "pn_viewernav_qt.h"
PnViewerNavQt::PnViewerNavQt(
void* l_parent_ctx, QWidget* l_parent_wid, viewer_eType l_type, QWidget** w)
void* l_parent_ctx, viewer_eType l_type, QWidget** w)
: PnViewerNav(l_parent_ctx, l_type)
{
form_widget
......
......@@ -43,8 +43,7 @@
class PnViewerNavQt : public PnViewerNav {
public:
PnViewerNavQt(void* v_parent_ctx, QWidget* v_parent_wid, viewer_eType v_type,
QWidget** w);
PnViewerNavQt(void* v_parent_ctx, viewer_eType v_type, QWidget** w);
~PnViewerNavQt();
QWidget* brow_widget;
......
......@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
}
// Create help window
CoXHelpQt* xhelp = new CoXHelpQt(viewer->toplevel, 0, xhelp_eUtility_Wtt, (int*)&sts);
CoXHelpQt* xhelp = new CoXHelpQt(NULL, xhelp_eUtility_Wtt, (int*)&sts);
CoXHelpQt::set_default(xhelp);
try {
......
......@@ -214,13 +214,12 @@ GsdAttrQt::~GsdAttrQt()
delete attrnav;
}
GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pb_gsd* a_gsd, int a_edit_mode)
: GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode)
GsdAttrQt::GsdAttrQt(void* a_parent_ctx, void* a_object, pb_gsd* a_gsd,
int a_edit_mode) : GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode)
{
int sts;
toplevel = new GsdAttrQtWidget(this, a_parent_wid);
toplevel = new GsdAttrQtWidget(this);
toplevel->setMinimumSize(500, 500);
toplevel->setWindowTitle(fl("pbGsdEditor"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -264,8 +263,7 @@ GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
toplevel, help, "&Help", SLOT(activate_help()), "CTRL+H", "system-help");
// Navigator
attrnav = new GsdAttrNavQt(
this, toplevel, "Plant", gsd, edit_mode, &brow_widget, &sts);
attrnav = new GsdAttrNavQt(this, "Plant", gsd, edit_mode, &brow_widget, &sts);
attrnav->message_cb = &GsdAttr::gsdattr_message;
attrnav->change_value_cb = &GsdAttr::gsdattr_change_value_cb;
......
......@@ -61,8 +61,7 @@ public:
static CoWowRecall value_recall;
CoWowEntryQt* cmd_entry;
GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pb_gsd* a_gsd, int a_edit_mode);
GsdAttrQt(void* a_parent_ctx, void* a_object, pb_gsd* a_gsd, int a_edit_mode);
~GsdAttrQt();
void message(char severity, const char* message);
......@@ -77,10 +76,7 @@ class GsdAttrQtWidget : public QWidget {
Q_OBJECT
public:
GsdAttrQtWidget(GsdAttrQt* parent_ctx, QWidget* parent)
: QWidget(), attr(parent_ctx)
{
}
GsdAttrQtWidget(GsdAttrQt* parent_ctx) : QWidget(), attr(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -43,9 +43,8 @@
#include "cow_pb_gsd_attrnav_qt.h"
GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
const char* xn_name, pb_gsd* xn_gsd, int xn_edit_mode, QWidget** w,
pwr_tStatus* status)
GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, const char* xn_name,
pb_gsd* xn_gsd, int xn_edit_mode, QWidget** w, pwr_tStatus* status)
: GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status)
{
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
......
......@@ -46,8 +46,8 @@
//! The navigation area of the attribute editor.
class GsdAttrNavQt : public GsdAttrNav {
public:
GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, const char* xn_name,
pb_gsd* xn_gsd, int xn_edit_mode, QWidget** w, pwr_tStatus* status);
GsdAttrNavQt(void* xn_parent_ctx, const char* xn_name, pb_gsd* xn_gsd,
int xn_edit_mode, QWidget** w, pwr_tStatus* status);
~GsdAttrNavQt();
void set_inputfocus();
......
......@@ -250,14 +250,13 @@ GsdmlAttrQt::~GsdmlAttrQt()
delete attrnav;
}
GsdmlAttrQt::GsdmlAttrQt(QWidget* a_parent_wid, void* a_parent_ctx,
void* a_object, pn_gsdml* a_gsdml, int a_edit_mode,
const char* a_data_filename, pwr_tStatus* a_sts)
GsdmlAttrQt::GsdmlAttrQt(void* a_parent_ctx, void* a_object, pn_gsdml* a_gsdml,
int a_edit_mode, const char* a_data_filename, pwr_tStatus* a_sts)
: GsdmlAttr(a_parent_ctx, a_object, a_gsdml, a_edit_mode, a_data_filename)
{
int sts;
toplevel = new GsdmlAttrQtWidget(this, a_parent_wid);
toplevel = new GsdmlAttrQtWidget(this);
toplevel->setMinimumSize(700, 700);
toplevel->setWindowTitle(fl("profinetConfigurator"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -316,8 +315,8 @@ GsdmlAttrQt::GsdmlAttrQt(QWidget* a_parent_wid, void* a_parent_ctx,
toplevel, help, "&Help", SLOT(activate_help()), "CTRL+H", "system-help");
// Navigator
attrnav = new GsdmlAttrNavQt(
this, toplevel, "Plant", gsdml, edit_mode, &brow_widget, &sts);
attrnav = new GsdmlAttrNavQt(this, "Plant", gsdml, edit_mode, &brow_widget,
&sts);
attrnav->message_cb = &GsdmlAttr::gsdmlattr_message;
attrnav->change_value_cb = &GsdmlAttr::gsdmlattr_change_value_cb;
......
......@@ -65,9 +65,8 @@ public:
static CoWowRecall value_recall;
CoWowEntryQt* cmd_entry;
GsdmlAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pn_gsdml* a_gsdml, int a_edit_mode, const char* a_data_filename,
pwr_tStatus* a_sts);
GsdmlAttrQt(void* a_parent_ctx, void* a_object, pn_gsdml* a_gsdml,
int a_edit_mode, const char* a_data_filename, pwr_tStatus* a_sts);
~GsdmlAttrQt();
void message(char severity, const char* message);
......@@ -80,10 +79,7 @@ class GsdmlAttrQtWidget : public QWidget {
Q_OBJECT
public:
GsdmlAttrQtWidget(GsdmlAttrQt* parent_ctx, QWidget* parent)
: QWidget(), attr(parent_ctx)
{
}
GsdmlAttrQtWidget(GsdmlAttrQt* parent_ctx) : QWidget(), attr(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -43,9 +43,8 @@
#include "cow_pn_gsdml_attr_qt.h"
#include "cow_pn_gsdml_attrnav_qt.h"
GsdmlAttrNavQt::GsdmlAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
const char* xn_name, pn_gsdml* xn_gsdml, int xn_edit_mode, QWidget** w,
pwr_tStatus* status)
GsdmlAttrNavQt::GsdmlAttrNavQt(void* xn_parent_ctx, const char* xn_name,
pn_gsdml* xn_gsdml, int xn_edit_mode, QWidget** w, pwr_tStatus* status)
: GsdmlAttrNav(xn_parent_ctx, xn_name, xn_gsdml, xn_edit_mode, status)
{
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
......
......@@ -46,9 +46,8 @@
//! The navigation area of the attribute editor.
class GsdmlAttrNavQt : public GsdmlAttrNav {
public:
GsdmlAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
const char* xn_name, pn_gsdml* xn_gsdml, int xn_edit_mode, QWidget** w,
pwr_tStatus* status);
GsdmlAttrNavQt(void* xn_parent_ctx, const char* xn_name, pn_gsdml* xn_gsdml,
int xn_edit_mode, QWidget** w, pwr_tStatus* status);
~GsdmlAttrNavQt();
void set_inputfocus();
void display_attr_help_text();
......
......@@ -57,8 +57,7 @@ static pwr_tStatus Configure(ldh_sMenuCall* ip)
return sts;
}
ctx->attr = new GsdAttrQt(
CoXHelpQt::get_widget(), ctx, 0, ctx->gsd, ctx->edit_mode);
ctx->attr = new GsdAttrQt(ctx, 0, ctx->gsd, ctx->edit_mode);
ctx->attr->close_cb = pb_dp_slave_close_cb;
ctx->attr->save_cb = pb_dp_slave_save_cb;
ctx->attr->help_cb = pb_dp_slave_help_cb;
......
......@@ -75,8 +75,8 @@ static pwr_tStatus Configure(ldh_sMenuCall* ip)
return sts;
}
ctx->attr = new GsdmlAttrQt(CoXHelpQt::get_widget(), ctx, 0, ctx->gsdml,
ctx->edit_mode, datafile, &sts);
ctx->attr = new GsdmlAttrQt(ctx, 0, ctx->gsdml, ctx->edit_mode, datafile,
&sts);
if (sts == PB__CONFIGABORTED) {
((GsdmlAttrQt*)ctx->attr)->toplevel->close();
return 1;
......
......@@ -56,8 +56,7 @@ static pwr_tStatus ShowConfiguration(xmenu_sMenuCall* ip)
return sts;
}
ctx->attr
= new GsdAttrQt(CoXHelpQt::get_widget(), ctx, 0, ctx->gsd, edit_mode);
ctx->attr = new GsdAttrQt(ctx, 0, ctx->gsd, edit_mode);
ctx->attr->close_cb = xtt_pb_dp_slave_close_cb;
ctx->attr->save_cb = xtt_pb_dp_slave_save_cb;
ctx->attr->help_cb = xtt_pb_dp_slave_help_cb;
......
......@@ -71,8 +71,7 @@ static pwr_tStatus ShowConfiguration(xmenu_sMenuCall* ip)
if (EVEN(sts))
return sts;
ctx->attr = new GsdmlAttrQt(
CoXHelpQt::get_widget(), ctx, 0, ctx->gsdml, 0, datafile, &sts);
ctx->attr = new GsdmlAttrQt(ctx, 0, ctx->gsdml, 0, datafile, &sts);
if (sts == PB__CONFIGABORTED) {
delete ctx->attr;
return 1;
......
......@@ -95,7 +95,7 @@ int main(int argc, char* argv[])
setlocale(LC_NUMERIC, "POSIX");
setlocale(LC_TIME, "en_US");
XttTblQt* tbl = new XttTblQt(0, 0, sevcli, items, itemcnt);
XttTblQt* tbl = new XttTblQt(NULL, sevcli, items, itemcnt);
tbl->close_cb = tbl_close_cb;
return app.exec();
......
......@@ -176,9 +176,8 @@ XttSevHist* XttTblQt::sevhist_new(pwr_tOid* oidv, pwr_tOName* anamev,
pwr_tOName* onamev, bool* sevhistobjectv, pwr_tStatus* sts)
{
QWidget* w;
return new XttSevHistQt(this, toplevel, "Process History", &w, oidv, anamev,
onamev, sevhistobjectv, sevcli, 0, 0, 0, 0, time_ePeriod_LastHour, 0,
sts);
return new XttSevHistQt(this, "Process History", &w, oidv, anamev, onamev,
sevhistobjectv, sevcli, 0, 0, 0, 0, time_ePeriod_LastHour, 0, sts);
}
CoLogin* XttTblQt::login_new(const char* name, const char* groupname,
......@@ -232,13 +231,12 @@ void XttTblQtWidget::valchanged_cmd_input()
tbl->tblnav->set_inputfocus();
}
XttTblQt::XttTblQt(QWidget* a_parent_wid, void* a_parent_ctx,
sevcli_tCtx a_sevcli, sevcli_sHistItem* itemlist, int item_cnt)
: XttTbl(a_parent_ctx, a_sevcli)
XttTblQt::XttTblQt(void* a_parent_ctx, sevcli_tCtx a_sevcli,
sevcli_sHistItem* itemlist, int item_cnt) : XttTbl(a_parent_ctx, a_sevcli)
{
int sts;
toplevel = new XttTblQtWidget(this, a_parent_wid);
toplevel = new XttTblQtWidget(this);
toplevel->setMinimumSize(500, 700);
toplevel->setWindowTitle(fl("SevXtt Navigator"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -311,7 +309,7 @@ XttTblQt::XttTblQt(QWidget* a_parent_wid, void* a_parent_ctx,
statusbar->addWidget(cmd_prompt);
add_expanding(statusbar, cmd_entry);
tblnav = new TblNavQt(this, toplevel, itemlist, item_cnt, &brow_widget, &sts);
tblnav = new TblNavQt(this, itemlist, item_cnt, &brow_widget, &sts);
tblnav->message_cb = &XttTbl::message;
tblnav->is_authorized_cb = &XttTbl::is_authorized;
tblnav->command_cb = &XttTbl::command_cb;
......@@ -329,7 +327,7 @@ XttTblQt::XttTblQt(QWidget* a_parent_wid, void* a_parent_ctx,
cmd_entry->setVisible(false);
// Create help window
CoXHelp* xhelp = new CoXHelpQt(toplevel, this, xhelp_eUtility_Xtt, &sts);
CoXHelp* xhelp = new CoXHelpQt(this, xhelp_eUtility_Xtt, &sts);
CoXHelp::set_default(xhelp);
wow = new CoWowQt(toplevel);
......
......@@ -49,8 +49,8 @@ class XttTblQtWidget;
class XttTblQt : public XttTbl {
public:
XttTblQt(QWidget* a_parent_wid, void* a_parent_ctx, sevcli_tCtx a_sevcli,
sevcli_sHistItem* itemlist, int item_cnt);
XttTblQt(void* a_parent_ctx, sevcli_tCtx a_sevcli, sevcli_sHistItem* itemlist,
int item_cnt);
~XttTblQt();
XttTblQtWidget* toplevel;
......@@ -74,10 +74,7 @@ class XttTblQtWidget : public QWidget {
Q_OBJECT
public:
XttTblQtWidget(XttTblQt* parent_ctx, QWidget* parent)
: QWidget(), tbl(parent_ctx)
{
}
XttTblQtWidget(XttTblQt* parent_ctx) : QWidget(), tbl(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -42,9 +42,8 @@
#include "xtt_tblnav_qt.h"
TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
sevcli_sHistItem* xn_itemlist, int xn_item_cnt, QWidget** w,
pwr_tStatus* status)
TblNavQt::TblNavQt(void* xn_parent_ctx, sevcli_sHistItem* xn_itemlist,
int xn_item_cnt, QWidget** w, pwr_tStatus* status)
: TblNav(xn_parent_ctx, xn_itemlist, xn_item_cnt, status)
{
form_widget
......
......@@ -46,9 +46,8 @@
//! The navigation area of the attribute editor.
class TblNavQt : public TblNav {
public:
TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
sevcli_sHistItem* xn_itemlist, int xn_item_cnt, QWidget** w,
pwr_tStatus* status);
TblNavQt(void* xn_parent_ctx, sevcli_sHistItem* xn_itemlist, int xn_item_cnt,
QWidget** w, pwr_tStatus* status);
~TblNavQt();
QWidget* brow_widget;
......
......@@ -63,8 +63,8 @@ Wtt* WbQt::wtt_new(const char* name, const char* iconname,
ldh_tWBContext ldhwbctx, pwr_tVolumeId volid, ldh_tVolume volctx,
wnav_sStartMenu* root_menu, pwr_tStatus* status)
{
return new WttQt(
0, toplevel, name, iconname, ldhwbctx, volid, volctx, root_menu, status);
return new WttQt(0, name, iconname, ldhwbctx, volid, volctx, root_menu,
status);
}
WVsel* WbQt::vsel_new(pwr_tStatus* status, const char* name,
......@@ -72,7 +72,7 @@ WVsel* WbQt::vsel_new(pwr_tStatus* status, const char* name,
int (*bc_success)(void*, pwr_tVolumeId*, int), void (*bc_cancel)(),
int (*bc_time_to_exit)(void*), int show_volumes, wb_eType wb_type)
{
return new WVselQt(status, NULL, mainwindow, name, ldhwbctx, volumename,
return new WVselQt(status, NULL, name, ldhwbctx, volumename,
bc_success, bc_cancel, bc_time_to_exit, show_volumes, wb_type);
}
......@@ -90,7 +90,7 @@ int main(int argc, char* argv[])
return app.exec();
}
WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
WbQt::WbQt(int argc, char* argv[])
{
pwr_tStatus sts;
int login_display = 0;
......@@ -210,14 +210,14 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
// Create message window
MsgWindowQt* msg_window
= new MsgWindowQt(0, mainwindow, "Workbench messages", &sts);
= new MsgWindowQt(0, "Workbench messages", &sts);
msg_window->find_wnav_cb = Wb::find_wnav_cb;
msg_window->find_plc_cb = Wb::find_plc_cb;
MsgWindow::set_default(msg_window);
MsgWindow::message('I', "Development environment started");
// Create help window
CoXHelpQt* xhelp = new CoXHelpQt(mainwindow, 0, xhelp_eUtility_Wtt, &sts);
CoXHelpQt* xhelp = new CoXHelpQt(0, xhelp_eUtility_Wtt, &sts);
CoXHelp::set_default(xhelp);
sts = ldh_OpenWB(&wbctx, volumename_p, options);
......@@ -303,7 +303,7 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
exit(LOGIN__NOPRIV);
}
} else if (login_display) {
new CoLoginQt(NULL, mainwindow, "PwR Login", systemgroup,
new CoLoginQt(NULL, NULL, "PwR Login", systemgroup,
&Wb::login_success, &Wb::login_cancel, 0, &sts);
}
......
......@@ -44,7 +44,6 @@
class WbQt : public Wb {
public:
QWidget* toplevel;
QWidget* mainwindow;
WbQt(int argc, char* argv[]);
~WbQt() {}
......
......@@ -45,13 +45,12 @@
#include <QMenuBar>
#include <QVBoxLayout>
WbBckWQt::WbBckWQt(void* bckw_parent_ctx, QWidget* bckw_parent_wid,
ldh_tSession bckw_ldhses, const char* bckw_name, wb_bck_list* l_list,
int l_editmode, pwr_tStatus* status)
: WbBckW(
bckw_parent_ctx, bckw_ldhses, bckw_name, l_list, l_editmode, status)
WbBckWQt::WbBckWQt(void* bckw_parent_ctx, ldh_tSession bckw_ldhses,
const char* bckw_name, wb_bck_list* l_list, int l_editmode,
pwr_tStatus* status) : WbBckW(bckw_parent_ctx, bckw_ldhses, bckw_name,
l_list, l_editmode, status)
{
toplevel = new WbBckWQtWidget(this, bckw_parent_wid);
toplevel = new WbBckWQtWidget(this);
toplevel->setMinimumSize(1100, 600);
toplevel->setWindowTitle(fl(bckw_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -95,8 +94,7 @@ WbBckWQt::WbBckWQt(void* bckw_parent_ctx, QWidget* bckw_parent_wid,
QVBoxLayout* form = new QVBoxLayout(toplevel);
// Create bckwnav
bckwnav = new WbBckWNavQt(
this, toplevel, bckw_ldhses, l_list, l_editmode, &nav_widget);
bckwnav = new WbBckWNavQt(this, bckw_ldhses, l_list, l_editmode, &nav_widget);
form->setMenuBar(menu_bar);
add_expanding(form, nav_widget);
......
......@@ -47,9 +47,8 @@ class WbBckWQtWidget;
class WbBckWQt : public WbBckW {
public:
WbBckWQt(void* l_parent_ctx, QWidget* l_parent_wid, ldh_tSession l_ldhses,
const char* l_name, wb_bck_list* l_list, int l_editmode,
pwr_tStatus* status);
WbBckWQt(void* l_parent_ctx, ldh_tSession l_ldhses, const char* l_name,
wb_bck_list* l_list, int l_editmode, pwr_tStatus* status);
~WbBckWQt();
QWidget* nav_widget;
......@@ -69,10 +68,7 @@ class WbBckWQtWidget : public QWidget {
Q_OBJECT
public:
WbBckWQtWidget(WbBckWQt* parent_ctx, QWidget* parent)
: QWidget(), bck(parent_ctx)
{
}
WbBckWQtWidget(WbBckWQt* parent_ctx) : QWidget(), bck(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -42,8 +42,8 @@
#include "wb_bckwnav_qt.h"
WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
ldh_tSession l_ldhses, wb_bck_list* l_list, int l_editmode, QWidget** w)
WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, ldh_tSession l_ldhses,
wb_bck_list* l_list, int l_editmode, QWidget** w)
: WbBckWNav(l_parent_ctx, l_ldhses, l_list, l_editmode)
{
form_widget
......
......@@ -45,9 +45,8 @@
class WbBckWNavQt : public WbBckWNav {
public:
WbBckWNavQt(void* bckw_parent_ctx, QWidget* bckw_parent_wid,
ldh_tSession bckw_ldhses, wb_bck_list* l_list, int l_editmode,
QWidget** w);
WbBckWNavQt(void* bckw_parent_ctx, ldh_tSession bckw_ldhses,
wb_bck_list* l_list, int l_editmode, QWidget** w);
~WbBckWNavQt();
QWidget* brow_widget;
......
......@@ -45,13 +45,12 @@
#include <QMenuBar>
#include <QVBoxLayout>
WbExpWQt::WbExpWQt(void* expw_parent_ctx, QWidget* expw_parent_wid,
ldh_tSession expw_ldhses, const char* expw_name, int l_type, int l_editmode,
pwr_tStatus* status)
: WbExpW(
expw_parent_ctx, expw_ldhses, expw_name, l_type, l_editmode, status)
WbExpWQt::WbExpWQt(void* expw_parent_ctx, ldh_tSession expw_ldhses,
const char* expw_name, int l_type, int l_editmode, pwr_tStatus* status)
: WbExpW(expw_parent_ctx, expw_ldhses, expw_name, l_type, l_editmode,
status)
{
toplevel = new WbExpWQtWidget(this, expw_parent_wid);
toplevel = new WbExpWQtWidget(this);
toplevel->setMinimumSize(1100, 600);
toplevel->setWindowTitle(fl(expw_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -106,8 +105,7 @@ WbExpWQt::WbExpWQt(void* expw_parent_ctx, QWidget* expw_parent_wid,
QVBoxLayout* form = new QVBoxLayout(toplevel);
// Create expwnav
expwnav = new WbExpWNavQt(
this, toplevel, expw_ldhses, l_type, l_editmode, &nav_widget);
expwnav = new WbExpWNavQt(this, expw_ldhses, l_type, l_editmode, &nav_widget);
form->setMenuBar(menu_bar);
form->addWidget(tools);
......
......@@ -47,8 +47,8 @@ class WbExpWQtWidget;
class WbExpWQt : public WbExpW {
public:
WbExpWQt(void* l_parent_ctx, QWidget* l_parent_wid, ldh_tSession l_ldhses,
const char* l_name, int type, int l_editmode, pwr_tStatus* status);
WbExpWQt(void* l_parent_ctx, ldh_tSession l_ldhses, const char* l_name,
int type, int l_editmode, pwr_tStatus* status);
~WbExpWQt();
QWidget* form;
......@@ -66,10 +66,7 @@ class WbExpWQtWidget : public QWidget {
Q_OBJECT
public:
WbExpWQtWidget(WbExpWQt* parent_ctx, QWidget* parent)
: QWidget(), expw(parent_ctx)
{
}
WbExpWQtWidget(WbExpWQt* parent_ctx) : QWidget(), expw(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -42,8 +42,8 @@
#include "wb_expwnav_qt.h"
WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
ldh_tSession l_ldhses, int l_type, int l_editmode, QWidget** w)
WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, ldh_tSession l_ldhses, int l_type,
int l_editmode, QWidget** w)
: WbExpWNav(l_parent_ctx, l_ldhses, l_type, l_editmode)
{
form_widget
......
......@@ -45,8 +45,8 @@
class WbExpWNavQt : public WbExpWNav {
public:
WbExpWNavQt(void* expw_parent_ctx, QWidget* expw_parent_wid,
ldh_tSession expw_ldhses, int l_type, int l_editmode, QWidget** w);
WbExpWNavQt(void* expw_parent_ctx, ldh_tSession expw_ldhses, int l_type,
int l_editmode, QWidget** w);
~WbExpWNavQt();
QWidget* brow_widget;
......
......@@ -107,7 +107,7 @@ void WFoeQtWidget::activate_history()
strcpy(title, "History ");
strcat(title, wname);
CoLogWQt* logw = new CoLogWQt(this, this, title, 0, &sts);
CoLogWQt* logw = new CoLogWQt(foe, title, 0, &sts);
logw->CoLogW::show(categories, wname);
}
......@@ -556,15 +556,14 @@ 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)
{
return new WAttQt(toplevel->parentWidget(), a_parent_ctx, a_ldhses, a_aref,
a_editmode, a_advanced_user, a_display_objectname);
return new WAttQt(a_parent_ctx, a_ldhses, a_aref, a_editmode, a_advanced_user,
a_display_objectname);
}
WAttText* WFoeQt::watttext_new(void* a_parent_ctx, ldh_tSesContext a_ldhses,
pwr_sAttrRef a_aref, int a_editmode, pwr_tStatus* status)
{
return new WAttTextQt(toplevel->parentWidget(), a_parent_ctx, a_ldhses,
a_aref, a_editmode, status);
return new WAttTextQt(a_parent_ctx, a_ldhses, a_aref, a_editmode, status);
}
// Destroys a foe instance.
......@@ -603,7 +602,7 @@ WFoe* WFoeQt::subwindow_new(void* f_parent_ctx, char* f_name,
int f_map_window, ldh_eAccess f_access, foe_eFuncAccess function_access,
unsigned int f_options, pwr_tStatus* sts)
{
WFoeQt* foe = new WFoeQt(f_parent_ctx, foe_window, f_name, plcprogram,
WFoeQt* foe = new WFoeQt(f_parent_ctx, f_name, plcprogram,
ldhwbctx, ldhsesctx, nodeobject, windowindex, new_window, f_map_window,
f_access, function_access, f_options, sts);
if (ODD(*sts)) {
......@@ -672,24 +671,22 @@ void WFoeQt::popupmsg(const char* new_label, void (*yes_procedure)(WFoe*),
}
}
WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
pwr_tObjid plcprogram, ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx,
vldh_t_node nodeobject, unsigned long windowindex, unsigned long new_window,
int f_map_window, ldh_eAccess f_access, foe_eFuncAccess function_access,
unsigned int f_options, pwr_tStatus* sts)
: WFoe(f_parent_ctx, f_name, plcprogram, ldhwbctx, ldhsesctx, nodeobject,
windowindex, new_window, f_map_window, f_access, function_access,
f_options, sts)
WFoeQt::WFoeQt(void* f_parent_ctx, const char* f_name, pwr_tObjid plcprogram,
ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx, vldh_t_node nodeobject,
unsigned long windowindex, unsigned long new_window, int f_map_window,
ldh_eAccess f_access, foe_eFuncAccess function_access,
unsigned int f_options, pwr_tStatus* sts) : WFoe(f_parent_ctx, f_name,
plcprogram, ldhwbctx, ldhsesctx, nodeobject, windowindex, new_window,
f_map_window, f_access, function_access, f_options, sts)
{
toplevel = new WFoeQtWidget(this, f_parent_wid);
toplevel = new WFoeQtWidget(this);
*sts = new_local(plcprogram, ldhwbctx, ldhsesctx, nodeobject, windowindex,
new_window, function_access);
}
WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
pwr_tObjid plcprogram, ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx,
int f_map_window, ldh_eAccess f_access, unsigned int f_options,
pwr_tStatus* sts)
WFoeQt::WFoeQt(void* f_parent_ctx, const char* f_name, pwr_tObjid plcprogram,
ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx, int f_map_window,
ldh_eAccess f_access, unsigned int f_options, pwr_tStatus* sts)
: WFoe(f_parent_ctx, f_name, plcprogram, ldhwbctx, ldhsesctx, f_map_window,
f_access, f_options, sts)
{
......@@ -715,7 +712,7 @@ WFoeQt::WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
}
strcpy(name, new_name);
toplevel = new WFoeQtWidget(this, f_parent_wid);
toplevel = new WFoeQtWidget(this);
*sts = new_local(
plcprogram, ldhwbctx, ldhsesctx, 0, 0, 0, foe_eFuncAccess_Edit);
}
......@@ -1037,16 +1034,16 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
subpane = new QSplitter(Qt::Vertical);
QHBoxLayout* palbox = new QHBoxLayout();
node_palctx = new PalQt(this, subpane, "Objects", ldhsession,
"PlcEditorPalette", &node_palette, &sts);
node_palctx = new PalQt(this, "Objects", ldhsession, "PlcEditorPalette",
&node_palette, &sts);
node_palette_managed = 1;
node_palctx->select_cb = pal_select_cb;
con_palctx = new PalQt(this, subpane, "Connections", ldhsession,
"PlcEditorConPalette", &con_palette, &sts);
con_palctx = new PalQt(this, "Connections", ldhsession, "PlcEditorConPalette",
&con_palette, &sts);
navctx = new NavQt(
this, subpane, "Plant", ldhsession, "NavigatorW1", &nav_palette, &sts);
navctx = new NavQt(this, "Plant", ldhsession, "NavigatorW1", &nav_palette,
&sts);
add_expanding(palbox, node_palette);
add_expanding(palbox, con_palette);
......@@ -1055,7 +1052,7 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
add_expanding(subpane, palbox);
pane = new QSplitter(Qt::Horizontal);
gre = new WGreQt(this, pane, "Name");
gre = new WGreQt(this, "Name");
((WGreQt*)gre)->new_navigator(subpane);
subpane->addWidget(((WGreQt*)gre)->nav_widget);
......
......@@ -55,7 +55,6 @@ public:
QSplitter* pane;
QSplitter* subpane;
QWidget* caution;
QWidget* foe_window;
QWidget* popupmenu;
QAction* save;
QAction* exit;
......@@ -115,12 +114,11 @@ public:
QAction* select_cp_nextdown;
CoWowFocusTimerQt focustimer;
WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
pwr_tObjid plcprogram, ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx,
int f_map_window, ldh_eAccess f_access, unsigned int f_options,
pwr_tStatus* sts);
WFoeQt(void* f_parent_ctx, QWidget* f_parent_wid, const char* f_name,
pwr_tObjid plcprogram, ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx,
WFoeQt(void* f_parent_ctx, const char* f_name, pwr_tObjid plcprogram,
ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx, int f_map_window,
ldh_eAccess f_access, unsigned int f_options, pwr_tStatus* sts);
WFoeQt(void* f_parent_ctx, const char* f_name, pwr_tObjid plcprogram,
ldh_tWBContext ldhwbctx, ldh_tSesContext ldhsesctx,
vldh_t_node nodeobject, unsigned long windowindex,
unsigned long new_window, int f_map_window, ldh_eAccess f_access,
foe_eFuncAccess function_access, unsigned int f_options,
......@@ -161,9 +159,7 @@ class WFoeQtWidget : public QWidget {
Q_OBJECT
public:
WFoeQtWidget(WFoeQt* parent_ctx, QWidget* parent) : QWidget(), foe(parent_ctx)
{
}
WFoeQtWidget(WFoeQt* parent_ctx) : QWidget(), foe(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -49,8 +49,7 @@
#include <QTimer>
WGreQt::WGreQt(void* wg_parent_ctx, QWidget* wg_parent_wid, const char* name)
: WGre(wg_parent_ctx, 0)
WGreQt::WGreQt(void* wg_parent_ctx, const char* name) : WGre(wg_parent_ctx, 0)
{
trace_obj = new WGreQtTraceObject(this);
trace_timerid = new QTimer(trace_obj);
......
......@@ -52,7 +52,7 @@ public:
QTimer* trace_timerid;
WGreQt(void* parent_ctx, QWidget* parent_wid, const char* name);
WGreQt(void* parent_ctx, const char* name);
~WGreQt();
void trace_start();
......@@ -70,9 +70,7 @@ class WGreQtTraceObject : public QObject {
Q_OBJECT
public:
WGreQtTraceObject(WGreQt* parent) : QObject(), wgre(parent)
{
}
WGreQtTraceObject(WGreQt* parent) : QObject(), wgre(parent) {}
public slots:
void trace_scan();
......
......@@ -46,9 +46,9 @@
#include <qlocalsocket.h>
NavQt::NavQt(void* nav_parent_ctx, QWidget* nav_parent_wid,
const char* nav_name, ldh_tSesContext nav_ldhses, const char* nav_root_name,
QWidget** w, pwr_tStatus* status)
NavQt::NavQt(void* nav_parent_ctx, const char* nav_name,
ldh_tSesContext nav_ldhses, const char* nav_root_name, QWidget** w,
pwr_tStatus* status)
: Nav(nav_parent_ctx, nav_name, nav_ldhses, nav_root_name, status)
{
trace_obj = new NavQtTraceObject(this);
......
......@@ -49,9 +49,8 @@ class NavQtTraceObject;
class NavQt : public Nav {
public:
NavQt(void* parent_ctx, QWidget* parent_wid, const char* name,
ldh_tSesContext ldhses, const char* root_name, QWidget** w,
pwr_tStatus* status);
NavQt(void* parent_ctx, const char* name, ldh_tSesContext ldhses,
const char* root_name, QWidget** w, pwr_tStatus* status);
~NavQt();
QWidget* brow_widget;
......@@ -70,9 +69,7 @@ class NavQtTraceObject : public QObject {
Q_OBJECT
public:
NavQtTraceObject(NavQt* parent) : QObject(), nav(parent)
{
}
NavQtTraceObject(NavQt* parent) : QObject(), nav(parent) {}
public slots:
void sel_convert_cb();
......
......@@ -46,9 +46,9 @@
#include <qlocalsocket.h>
PalQt::PalQt(void* pal_parent_ctx, QWidget* pal_parent_wid,
const char* pal_name, ldh_tSesContext pal_ldhses, const char* pal_root_name,
QWidget** w, pwr_tStatus* status)
PalQt::PalQt(void* pal_parent_ctx, const char* pal_name,
ldh_tSesContext pal_ldhses, const char* pal_root_name, QWidget** w,
pwr_tStatus* status)
: Pal(pal_parent_ctx, pal_name, pal_ldhses, pal_root_name, status)
{
trace_obj = new PalQtTraceObject(this);
......
......@@ -47,9 +47,8 @@ class PalQtTraceObject;
class PalQt : public Pal {
public:
PalQt(void* parent_ctx, QWidget* parent_wid, const char* name,
ldh_tSesContext ldhses, const char* root_name, QWidget** w,
pwr_tStatus* status);
PalQt(void* parent_ctx, const char* name, ldh_tSesContext ldhses,
const char* root_name, QWidget** w, pwr_tStatus* status);
~PalQt();
QWidget* brow_widget;
......@@ -69,9 +68,7 @@ class PalQtTraceObject : public QObject {
Q_OBJECT
public:
PalQtTraceObject(PalQt* parent) : QObject(), pal(parent)
{
}
PalQtTraceObject(PalQt* parent) : QObject(), pal(parent) {}
public slots:
void sel_convert_cb();
......
......@@ -143,14 +143,13 @@ void WUtedQt::update_title(int editmode)
CoWowQt::update_title(toplevel, editmode);
}
WUtedQt::WUtedQt(void* wu_parent_ctx, QWidget* wu_parent_wid,
const char* wu_name, const char* wu_iconname, ldh_tWBContext wu_ldhwb,
ldh_tSesContext wu_ldhses, int wu_editmode, void (*wu_quit_cb)(void*),
pwr_tStatus* status)
WUtedQt::WUtedQt(void* wu_parent_ctx, const char* wu_name,
const char* wu_iconname, ldh_tWBContext wu_ldhwb, ldh_tSesContext wu_ldhses,
int wu_editmode, void (*wu_quit_cb)(void*), pwr_tStatus* status)
: WUted(wu_parent_ctx, wu_name, wu_iconname, wu_ldhwb, wu_ldhses,
wu_editmode, wu_quit_cb, status)
{
toplevel = new WUtedQtWidget(this, wu_parent_wid);
toplevel = new WUtedQtWidget(this);
toplevel->setMinimumSize(800, 400);
toplevel->setWindowTitle(fl("Wb Utilities"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -56,10 +56,9 @@ public:
QCheckBox* present[UTED_QUALS];
QAction* optmenubuttons[UTED_MAX_COMMANDS];
WUtedQt(void* wu_parent_ctx, QWidget* wu_parent_wid, const char* wu_name,
const char* wu_iconname, ldh_tWBContext wu_ldhwb,
ldh_tSesContext wu_ldhses, int wu_editmode, void (*wu_quit_cb)(void*),
pwr_tStatus* status);
WUtedQt(void* wu_parent_ctx, const char* wu_name, const char* wu_iconname,
ldh_tWBContext wu_ldhwb, ldh_tSesContext wu_ldhses, int wu_editmode,
void (*wu_quit_cb)(void*), pwr_tStatus* status);
~WUtedQt();
void remove_command_window();
void reset_qual();
......@@ -85,10 +84,7 @@ class WUtedQtWidget : public QWidget {
Q_OBJECT
public:
WUtedQtWidget(WUtedQt* parent_ctx, QWidget* parent)
: QWidget(), uted(parent_ctx)
{
}
WUtedQtWidget(WUtedQt* parent_ctx) : QWidget(), uted(parent_ctx) {}
protected:
void closeEvent(QCloseEvent* event);
......
......@@ -59,8 +59,8 @@ int wb_utl_qt::utl_foe_new(const char* name, pwr_tOid plcpgm,
*foe = WFoe::get(plcpgm);
if (!*foe) {
*foe = new WFoeQt(0, widget, name, plcpgm, ldhwbctx, ldhsesctx, map_window,
access, 0, &sts);
*foe = new WFoeQt(0, name, plcpgm, ldhwbctx, ldhsesctx, map_window, access,
0, &sts);
}
return sts;
}
......@@ -74,9 +74,8 @@ int wb_utl_qt::utl_foe_new_local(WFoe* foe, const char* name, pwr_tOid plcpgm,
*return_foe = WFoe::get(plcpgm);
if (!*return_foe) {
*return_foe = new WFoeQt(foe, ((WFoeQt*)foe)->foe_window, name, plcpgm,
ldhwbctx, ldhsesctx, nodeobject, windowindex, new_window, map_window,
access, function_access, 0, &sts);
*return_foe = new WFoeQt(foe, name, plcpgm, ldhwbctx, ldhsesctx, nodeobject,
windowindex, new_window, map_window, access, function_access, 0, &sts);
}
return sts;
}
......
......@@ -45,13 +45,9 @@ class wb_utl_qt : public wb_utl {
public:
QWidget* widget;
wb_utl_qt(QWidget* w) : widget(w)
{
}
wb_utl_qt(QWidget* w) : widget(w) {}
~wb_utl_qt()
{
}
~wb_utl_qt() {}
int create_mainwindow(int argc, char** argv);
int destroy_mainwindow();
......
......@@ -162,7 +162,6 @@ void WVselQtWidget::activate_showall(bool set)
*
* Type Parameter IOGF Description
* void *parent_ctx I Parent context adress
* Widget parent_wid I Parent Widget adress
* char * name I Name of the created object
*
* Description:
......@@ -170,10 +169,9 @@ void WVselQtWidget::activate_showall(bool set)
**************************************************************************/
WVselQt::WVselQt(pwr_tStatus* status, void* wv_parent_ctx,
QWidget* wv_parent_wid, const char* wv_name, ldh_tWBContext wv_wbctx,
char* volumename, int (*bc_success)(void*, pwr_tVolumeId*, int),
void (*bc_cancel)(), int (*bc_time_to_exit)(void*), int show_volumes,
wb_eType wv_wb_type)
const char* wv_name, ldh_tWBContext wv_wbctx, char* volumename,
int (*bc_success)(void*, pwr_tVolumeId*, int), void (*bc_cancel)(),
int (*bc_time_to_exit)(void*), int show_volumes, wb_eType wv_wb_type)
: WVsel(status, wv_parent_ctx, wv_name, wv_wbctx, volumename, bc_success,
bc_cancel, bc_time_to_exit, show_volumes, wv_wb_type)
{
......@@ -244,7 +242,7 @@ WVselQt::WVselQt(pwr_tStatus* status, void* wv_parent_ctx,
}
// Create the window
toplevel = new WVselQtWidget(this, wv_parent_wid);
toplevel = new WVselQtWidget(this);
toplevel->setMinimumSize(500, 400);
toplevel->setWindowTitle(fl(name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -47,8 +47,8 @@ class WVselQtWidget;
class WVselQt : public WVsel {
public:
WVselQt(pwr_tStatus* status, void* wv_parent_ctx, QWidget* wv_parent_wid,
const char* wv_name, ldh_tWBContext wv_wbctx, char* volumename,
WVselQt(pwr_tStatus* status, void* wv_parent_ctx, const char* wv_name,
ldh_tWBContext wv_wbctx, char* volumename,
int (*bc_success)(void*, pwr_tVolumeId*, int), void (*bc_cancel)(),
int (*bc_time_to_exit)(void*), int show_volumes, wb_eType wv_wb_type);
......@@ -63,10 +63,7 @@ class WVselQtWidget : public QWidget {
Q_OBJECT
public:
WVselQtWidget(WVselQt* parent_ctx, QWidget* parent)
: QWidget(), sel(parent_ctx)
{
}
WVselQtWidget(WVselQt* parent_ctx) : QWidget(), sel(parent_ctx) {}
public slots:
// Backcall functions from uil
......
......@@ -371,11 +371,10 @@ WAttQt::~WAttQt()
delete wattnav;
}
WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref, int wa_editmode,
int wa_advanced_user, int wa_display_objectname)
: WAtt(wa_parent_ctx, wa_ldhses, wa_aref, wa_editmode, wa_advanced_user,
wa_display_objectname)
WAttQt::WAttQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, int wa_editmode, int wa_advanced_user,
int wa_display_objectname) : WAtt(wa_parent_ctx, wa_ldhses, wa_aref,
wa_editmode, wa_advanced_user, wa_display_objectname)
{
int sts;
int size;
......@@ -386,7 +385,7 @@ WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
return;
}
toplevel = new WAttQtWidget(this, wa_parent_wid);
toplevel = new WAttQtWidget(this);
toplevel->setMinimumSize(410, 570);
toplevel->setWindowTitle(fl(namep));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -421,8 +420,8 @@ WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
}
utility = ((WUtility*)parent_ctx)->utype;
wattnav = new WAttNavQt(this, wattnav_eType_Object, pane, "Plant", ldhses,
aref, wa_editmode, wa_advanced_user, wa_display_objectname, utility,
wattnav = new WAttNavQt(this, wattnav_eType_Object, "Plant", ldhses, aref,
wa_editmode, wa_advanced_user, wa_display_objectname, utility,
&brow_widget, &sts);
wattnav->message_cb = &WAtt::message_cb;
wattnav->change_value_cb = &WAtt::change_value_cb;
......
......@@ -51,9 +51,8 @@ class WAttQtWidget;
class WAttQt : public WAtt {
public:
WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, int wa_editmode, int wa_advanced_user,
int wa_display_objectname);
WAttQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref,
int wa_editmode, int wa_advanced_user, int wa_display_objectname);
~WAttQt();
QWidget* brow_widget;
QWidget* form_widget;
......@@ -84,10 +83,7 @@ class WAttQtWidget : public QWidget {
Q_OBJECT
public:
WAttQtWidget(WAttQt* parent_ctx, QWidget* parent)
: QWidget(), watt(parent_ctx)
{
}
WAttQtWidget(WAttQt* parent_ctx) : QWidget(), watt(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -45,10 +45,9 @@
#include "wb_wattnav_qt.h"
WAttNavQt::WAttNavQt(void* wa_parent_ctx, wattnav_eType wa_type,
QWidget* wa_parent_wid, const char* wa_name, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, int wa_editmode, int wa_advanced_user,
int wa_display_objectname, wb_eUtility wa_utility, QWidget** w,
pwr_tStatus* status)
const char* wa_name, ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref,
int wa_editmode, int wa_advanced_user, int wa_display_objectname,
wb_eUtility wa_utility, QWidget** w, pwr_tStatus* status)
: WAttNav(wa_parent_ctx, wa_type, wa_name, wa_ldhses, wa_aref, wa_editmode,
wa_advanced_user, wa_display_objectname, wa_utility, status)
{
......
......@@ -43,10 +43,10 @@
class WAttNavQt : public WAttNav {
public:
WAttNavQt(void* wa_parent_ctx, wattnav_eType wa_type, QWidget* wa_parent_wid,
const char* wa_name, ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref,
int wa_editmode, int wa_advanced_user, int wa_display_objectname,
wb_eUtility wa_utility, QWidget** w, pwr_tStatus* status);
WAttNavQt(void* wa_parent_ctx, wattnav_eType wa_type, const char* wa_name,
ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref, int wa_editmode,
int wa_advanced_user, int wa_display_objectname, wb_eUtility wa_utility,
QWidget** w, pwr_tStatus* status);
~WAttNavQt();
QWidget* brow_widget;
......
......@@ -179,9 +179,8 @@ WAttTextQt::~WAttTextQt()
}
}
WAttTextQt::WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref, int wa_editmode,
pwr_tStatus* status)
WAttTextQt::WAttTextQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, int wa_editmode, pwr_tStatus* status)
: WAttText(wa_parent_ctx, wa_ldhses, wa_aref, wa_editmode, status), init(1)
{
int sts;
......@@ -198,7 +197,7 @@ WAttTextQt::WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
return;
}
toplevel = new WAttTextQtWidget(this, wa_parent_wid);
toplevel = new WAttTextQtWidget(this);
toplevel->setMinimumSize(800, 700);
toplevel->setWindowTitle(fl(namep));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -48,9 +48,8 @@ class WAttTextQtWidget;
class WAttTextQt : public WAttText {
public:
WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
ldh_tSesContext wa_ldhses, pwr_sAttrRef wa_aref, int wa_editmode,
pwr_tStatus* status);
WAttTextQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, int wa_editmode, pwr_tStatus* status);
~WAttTextQt();
QLabel* msg_label;
QTextEdit* textbuffer;
......@@ -70,10 +69,7 @@ class WAttTextQtWidget : public QWidget {
Q_OBJECT
public:
WAttTextQtWidget(WAttTextQt* parent_ctx, QWidget* parent)
: QWidget(), atxt(parent_ctx)
{
}
WAttTextQtWidget(WAttTextQt* parent_ctx) : QWidget(), atxt(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -461,16 +461,15 @@ void WdaQtWidget::closeEvent(QCloseEvent* event)
QWidget::closeEvent(event);
}
WdaQt::WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
ldh_tSesContext wa_ldhses, pwr_tObjid wa_objid, pwr_tClassId wa_classid,
const char* wa_attribute, int wa_editmode, int wa_advanced_user,
int wa_display_objectname)
WdaQt::WdaQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
pwr_tObjid wa_objid, pwr_tClassId wa_classid, const char* wa_attribute,
int wa_editmode, int wa_advanced_user, int wa_display_objectname)
: Wda(wa_parent_ctx, wa_ldhses, wa_objid, wa_classid, wa_attribute,
wa_editmode, wa_advanced_user, wa_display_objectname)
{
int sts;
toplevel = new WdaQtWidget(this, wa_parent_wid);
toplevel = new WdaQtWidget(this);
toplevel->setMinimumSize(700, 700);
toplevel->setWindowTitle(fl("Spreadsheet Editor"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -513,7 +512,7 @@ WdaQt::WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
pane = new QSplitter(Qt::Vertical);
utility = ((WUtility*)parent_ctx)->utype;
wdanav = new WdaNavQt(this, pane, "Plant", ldhses, objid, classid, attribute,
wdanav = new WdaNavQt(this, "Plant", ldhses, objid, classid, attribute,
wa_editmode, wa_advanced_user, wa_display_objectname, utility,
&brow_widget, &sts);
wdanav->message_cb = &Wda::message_cb;
......
......@@ -52,9 +52,9 @@ class WdaQtWidget;
class WdaQt : public Wda {
public:
WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
pwr_tObjid wa_objid, pwr_tClassId wa_classid, const char* wa_attribute,
int wa_editmode, int wa_advanced_user, int wa_display_objectname);
WdaQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses, pwr_tObjid wa_objid,
pwr_tClassId wa_classid, const char* wa_attribute, int wa_editmode,
int wa_advanced_user, int wa_display_objectname);
~WdaQt();
QWidget* brow_widget;
QWidget* form_widget;
......@@ -85,9 +85,7 @@ class WdaQtWidget : public QWidget {
Q_OBJECT
public:
WdaQtWidget(WdaQt* parent_ctx, QWidget* parent) : QWidget(), wda(parent_ctx)
{
}
WdaQtWidget(WdaQt* parent_ctx) : QWidget(), wda(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -42,14 +42,13 @@
#include "wb_wdanav_qt.h"
WdaNavQt::WdaNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
const char* wa_name, ldh_tSesContext wa_ldhses, pwr_tObjid wa_objid,
pwr_tClassId wa_classid, char* wa_attribute, int wa_editmode,
int wa_advanced_user, int wa_display_objectname, wb_eUtility wa_utility,
QWidget** w, pwr_tStatus* status)
: WdaNav(wa_parent_ctx, wa_name, wa_ldhses, wa_objid, wa_classid,
wa_attribute, wa_editmode, wa_advanced_user, wa_display_objectname,
wa_utility, status)
WdaNavQt::WdaNavQt(void* wa_parent_ctx, const char* wa_name,
ldh_tSesContext wa_ldhses, pwr_tObjid wa_objid, pwr_tClassId wa_classid,
char* wa_attribute, int wa_editmode, int wa_advanced_user,
int wa_display_objectname, wb_eUtility wa_utility, QWidget** w,
pwr_tStatus* status) : WdaNav(wa_parent_ctx, wa_name, wa_ldhses, wa_objid,
wa_classid, wa_attribute, wa_editmode, wa_advanced_user,
wa_display_objectname, wa_utility, status)
{
form_widget
= scrolledbrowwidgetqt_new(WdaNav::init_brow_cb, this, &brow_widget);
......
......@@ -41,11 +41,10 @@
class WdaNavQt : public WdaNav {
public:
WdaNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid, const char* wa_name,
ldh_tSesContext wa_ldhses, pwr_tObjid wa_objid, pwr_tClassId wa_classid,
char* wa_attribute, int wa_editmode, int wa_advanced_user,
int wa_display_objectname, wb_eUtility wa_utility, QWidget** w,
pwr_tStatus* status);
WdaNavQt(void* wa_parent_ctx, const char* wa_name, ldh_tSesContext wa_ldhses,
pwr_tObjid wa_objid, pwr_tClassId wa_classid, char* wa_attribute,
int wa_editmode, int wa_advanced_user, int wa_display_objectname,
wb_eUtility wa_utility, QWidget** w, pwr_tStatus* status);
~WdaNavQt();
QWidget* brow_widget;
......
......@@ -177,10 +177,9 @@ void WGeQtWidget::closeEvent(QCloseEvent* event)
QWidget::closeEvent(event);
}
WGeQt::WGeQt(QWidget* wge_parent_wid, void* wge_parent_ctx, char* wge_name,
char* wge_filename, int wge_scrollbar, int wge_menu, int wge_navigator,
int wge_width, int wge_height, int x, int y, char* object_name,
int wge_modal = 0)
WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
int wge_scrollbar, int wge_menu, int wge_navigator, int wge_width,
int wge_height, int x, int y, char* object_name, int wge_modal = 0)
: WGe(wge_parent_ctx, wge_name, wge_filename, wge_scrollbar, wge_menu,
wge_navigator, wge_width, wge_height, x, y, object_name, wge_modal),
value_dialog(0)
......@@ -197,7 +196,7 @@ WGeQt::WGeQt(QWidget* wge_parent_wid, void* wge_parent_ctx, char* wge_name,
str_StrncpyCutOff(title, name, sizeof(title), 1);
// Qt
toplevel = new WGeQtWidget(this, wge_parent_wid);
toplevel = new WGeQtWidget(this);
toplevel->setMinimumSize(window_width, window_height);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -209,7 +208,7 @@ WGeQt::WGeQt(QWidget* wge_parent_wid, void* wge_parent_ctx, char* wge_name,
}
QVBoxLayout* graph_form = new QVBoxLayout();
graph = new GraphQt(this, toplevel, "Plant", &grow_widget, &sts, "pwrp_exe:",
graph = new GraphQt(this, "Plant", &grow_widget, &sts, "pwrp_exe:",
graph_eMode_Runtime, scrollbar, 1, object_name, 0, 0);
graph->message_cb = &message;
graph->close_cb = &graph_close_cb;
......
......@@ -60,9 +60,9 @@ public:
void set_size(int width, int height);
void set_subwindow_release();
WGeQt(QWidget* parent_wid, void* parent_ctx, char* name, char* filename,
int scrollbar, int menu, int navigator, int width, int height, int x,
int y, char* object_name, int modal);
WGeQt(void* parent_ctx, char* name, char* filename, int scrollbar, int menu,
int navigator, int width, int height, int x, int y, char* object_name,
int modal);
~WGeQt();
static void change_value_cb(void* ge_ctx, void* value_object, char* text);
......@@ -77,9 +77,7 @@ class WGeQtWidget : public QWidget {
Q_OBJECT
public:
WGeQtWidget(WGeQt* parent_ctx, QWidget* parent) : QWidget(), ge(parent_ctx)
{
}
WGeQtWidget(WGeQt* parent_ctx) : QWidget(), ge(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -214,13 +214,13 @@ Ge* WNavQt::ge_new(char* graph_name, int nojournal)
options |= ge_mOption_IgnoreJournal;
}
return new GeQt(NULL, form_widget, ldhses, 0, options, graph_name);
return new GeQt(NULL, ldhses, 0, options, graph_name);
}
WGe* WNavQt::wge_new(char* name, char* filename, char* object_name, int modal)
{
return new WGeQt(parent_wid, this, name, filename, 0, 1, 1, 0, 0, 0, 0,
object_name, modal);
return new WGeQt(this, name, filename, 0, 1, 1, 0, 0, 0, 0, object_name,
modal);
}
wb_utl* WNavQt::utl_new()
......@@ -230,7 +230,7 @@ wb_utl* WNavQt::utl_new()
WRev* WNavQt::rev_new()
{
return new WRevQt(parent_wid, this, ldhses);
return new WRevQt(this, ldhses);
}
void WNavQt::logw_new(char* item, wlog_eCategory* categories, int show_item)
......@@ -259,7 +259,7 @@ void WNavQt::logw_new(char* item, wlog_eCategory* categories, int show_item)
title[strlen(title) - 1] = 0;
}
CoLogWQt* logw = new CoLogWQt(this, parent_wid, title, show_item, &sts);
CoLogWQt* logw = new CoLogWQt(this, title, show_item, &sts);
if (categories) {
logw->CoLogW::show(categories_str, item);
} else {
......@@ -385,8 +385,8 @@ int WNavQt::open_foe(const char* name, pwr_tOid plcpgm, void** foectx,
if (foe) {
foe->pop();
} else {
foe = new WFoeQt((void*)this, parent_wid, name, plcpgm, wbctx, ldhses,
map_window, access, options, &sts);
foe = new WFoeQt((void*)this, name, plcpgm, wbctx, ldhses, map_window,
access, options, &sts);
if (EVEN(sts)) {
return sts;
}
......@@ -402,7 +402,7 @@ int WNavQt::open_foe(const char* name, pwr_tOid plcpgm, void** foectx,
void WNavQt::wda_new(pwr_tOid oid, pwr_tCid cid, char* attribute, int edit_mode,
int advuser, int display_objectname)
{
new WdaQt(parent_wid, this, ldhses, oid, cid, attribute, edit_mode, advuser,
new WdaQt(this, ldhses, oid, cid, attribute, edit_mode, advuser,
display_objectname);
}
......@@ -415,23 +415,23 @@ CoLogin* WNavQt::login_new(const char* name, const char* groupname,
WCrr* WNavQt::wcrr_new(pwr_tAttrRef* aref, pwr_tStatus* status)
{
return new WCrrQt(parent_wid, this, ldhses, aref, gbl.advanced_user, status);
return new WCrrQt(this, ldhses, aref, gbl.advanced_user, status);
}
WbBckW* WNavQt::bckw_new(char* name, wb_bck_list* list, pwr_tStatus* status)
{
return new WbBckWQt(this, parent_wid, ldhses, name, list, editmode, status);
return new WbBckWQt(this, ldhses, name, list, editmode, status);
}
WbExpW* WNavQt::expw_new(char* name, int type, pwr_tStatus* status)
{
return new WbExpWQt(this, parent_wid, ldhses, name, type, 1, status);
return new WbExpWQt(this, ldhses, name, type, 1, status);
}
WAttText* WNavQt::watttext_new(
pwr_tAttrRef aref, int editmode, pwr_tStatus* status)
{
return new WAttTextQt(parent_wid, this, ldhses, aref, editmode, status);
return new WAttTextQt(this, ldhses, aref, editmode, status);
}
void WNavQt::wge_subwindow_loop(WGe* wge)
......
......@@ -120,7 +120,7 @@ void WPkgQtWidget::activate_history()
strcpy(categories[2], "");
strcpy(title, "Distributor History");
CoLogWQt* logw = new CoLogWQt(this, this, title, 1, &sts);
CoLogWQt* logw = new CoLogWQt(pkg, title, 1, &sts);
logw->CoLogW::show(categories, 0);
}
......@@ -170,12 +170,11 @@ void WPkgQtWidget::closeEvent(QCloseEvent* event)
QWidget::closeEvent(event);
}
WPkgQt::WPkgQt(QWidget* wa_parent_wid, void* wa_parent_ctx)
: WPkg(wa_parent_ctx)
WPkgQt::WPkgQt(void* wa_parent_ctx) : WPkg(wa_parent_ctx)
{
int sts;
toplevel = new WPkgQtWidget(this, wa_parent_wid);
toplevel = new WPkgQtWidget(this);
toplevel->setMinimumSize(600, 600);
toplevel->setWindowTitle(fl("Distributor"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -233,7 +232,7 @@ WPkgQt::WPkgQt(QWidget* wa_parent_wid, void* wa_parent_ctx)
QVBoxLayout* vbox = new QVBoxLayout(toplevel);
utility = ((WUtility*)parent_ctx)->utype;
wpkgnav = new WPkgNavQt(this, tools, "Packages", utility, &brow_widget, &sts);
wpkgnav = new WPkgNavQt(this, "Packages", utility, &brow_widget, &sts);
((WPkgNav*)wpkgnav)->message_cb = message_cb;
((WPkgNav*)wpkgnav)->set_clock_cursor_cb = set_clock_cursor_cb;
((WPkgNav*)wpkgnav)->reset_cursor_cb = reset_cursor_cb;
......
......@@ -49,7 +49,7 @@ class WPkgQtWidget;
class WPkgQt : public WPkg {
public:
WPkgQt(QWidget* wa_parent_wid, void* wa_parent_ctx);
WPkgQt(void* wa_parent_ctx);
~WPkgQt();
QWidget* brow_widget;
......@@ -71,9 +71,7 @@ class WPkgQtWidget : public QWidget {
Q_OBJECT
public:
WPkgQtWidget(WPkgQt* parent_ctx, QWidget* parent) : QWidget(), pkg(parent_ctx)
{
}
WPkgQtWidget(WPkgQt* parent_ctx) : QWidget(), pkg(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -40,9 +40,8 @@
#include "wb_wpkgnav_qt.h"
WPkgNavQt::WPkgNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
const char* wa_name, wb_eUtility wa_utility, QWidget** w,
pwr_tStatus* status)
WPkgNavQt::WPkgNavQt(void* wa_parent_ctx, const char* wa_name,
wb_eUtility wa_utility, QWidget** w, pwr_tStatus* status)
: WPkgNav(wa_parent_ctx, wa_name, wa_utility, status)
{
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
......
......@@ -41,8 +41,8 @@
class WPkgNavQt : public WPkgNav {
public:
WPkgNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid, const char* wa_name,
wb_eUtility wa_utility, QWidget** w, pwr_tStatus* status);
WPkgNavQt(void* wa_parent_ctx, const char* wa_name, wb_eUtility wa_utility,
QWidget** w, pwr_tStatus* status);
~WPkgNavQt();
QWidget* brow_widget;
......
......@@ -68,8 +68,7 @@ void WRevQtWidget::activate_history()
wb_log::category_to_string(wlog_eCategory_RevisionRestore, categories[1]);
strcpy(categories[2], "");
CoLogWQt* logw
= new CoLogWQt(rev, parentWidget(), "Revision History", 1, &sts);
CoLogWQt* logw = new CoLogWQt(rev, "Revision History", 1, &sts);
logw->CoLogW::show(categories, 0);
}
......@@ -161,13 +160,12 @@ WRevQt::~WRevQt()
delete wrevnav;
}
WRevQt::WRevQt(
QWidget* wa_parent_wid, void* wa_parent_ctx, ldh_tSession wa_ldhses)
WRevQt::WRevQt(void* wa_parent_ctx, ldh_tSession wa_ldhses)
: WRev(wa_parent_ctx, wa_ldhses), india_widget(0)
{
int sts;
toplevel = new WRevQtWidget(this, wa_parent_wid);
toplevel = new WRevQtWidget(this);
toplevel->setMinimumSize(700, 300);
toplevel->setWindowTitle(fl("Revisions"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -217,8 +215,7 @@ WRevQt::WRevQt(
QVBoxLayout* vbox = new QVBoxLayout(toplevel);
utility = ((WUtility*)parent_ctx)->utype;
wrevnav = new WRevNavQt(
this, toplevel, ldhses, "Packages", utility, &brow_widget, &sts);
wrevnav = new WRevNavQt(this, ldhses, "Packages", utility, &brow_widget, &sts);
((WRevNav*)wrevnav)->message_cb = message_cb;
((WRevNav*)wrevnav)->set_clock_cursor_cb = set_clock_cursor_cb;
((WRevNav*)wrevnav)->reset_cursor_cb = reset_cursor_cb;
......
......@@ -71,7 +71,7 @@ class WRevQtWidget;
class WRevQt : public WRev {
public:
WRevQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ldh_tSession wb_ldhses);
WRevQt(void* wa_parent_ctx, ldh_tSession wb_ldhses);
~WRevQt();
QWidget* brow_widget;
......@@ -97,9 +97,7 @@ class WRevQtWidget : public QWidget {
Q_OBJECT
public:
WRevQtWidget(WRevQt* parent_ctx, QWidget* parent) : QWidget(), rev(parent_ctx)
{
}
WRevQtWidget(WRevQt* parent_ctx) : QWidget(), rev(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -40,9 +40,9 @@
#include "wb_wrevnav_qt.h"
WRevNavQt::WRevNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
ldh_tSession wa_ldhses, const char* wa_name, wb_eUtility wa_utility,
QWidget** w, pwr_tStatus* status)
WRevNavQt::WRevNavQt(void* wa_parent_ctx, ldh_tSession wa_ldhses,
const char* wa_name, wb_eUtility wa_utility, QWidget** w,
pwr_tStatus* status)
: WRevNav(wa_parent_ctx, wa_ldhses, wa_name, wa_utility, status)
{
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
......
......@@ -41,9 +41,8 @@
class WRevNavQt : public WRevNav {
public:
WRevNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid, ldh_tSession wb_ldhses,
const char* wa_name, wb_eUtility wa_utility, QWidget** w,
pwr_tStatus* status);
WRevNavQt(void* wa_parent_ctx, ldh_tSession wb_ldhses, const char* wa_name,
wb_eUtility wa_utility, QWidget** w, pwr_tStatus* status);
~WRevNavQt();
QWidget* brow_widget;
......
......@@ -731,21 +731,19 @@ void WttQt::set_prompt(const char* prompt)
void WttQt::watt_new(pwr_tAttrRef aref)
{
new WAttQt(
toplevel, this, ldhses, aref, editmode, wnavnode->gbl.advanced_user, 1);
new WAttQt(this, ldhses, aref, editmode, wnavnode->gbl.advanced_user, 1);
}
void WttQt::wda_new(pwr_tOid oid)
{
new WdaQt(
toplevel, this, ldhses, oid, 0, "", editmode, wnav->gbl.advanced_user, 1);
new WdaQt(this, ldhses, oid, 0, "", editmode, wnav->gbl.advanced_user, 1);
}
Ge* WttQt::ge_new(char* graph_name)
{
unsigned int opt
= wnavnode->gbl.enable_comment ? ge_mOption_EnableComment : 0;
return new GeQt(this, toplevel, ldhses, 0, opt, graph_name);
return new GeQt(this, ldhses, 0, opt, graph_name);
}
void WttQt::wcast_new(pwr_tAttrRef aref, pwr_tStatus* sts)
......@@ -760,14 +758,14 @@ wb_build* WttQt::build_new()
void WttQt::wpkg_new()
{
wpkg = new WPkgQt(toplevel, this);
wpkg = new WPkgQt(this);
wpkg->close_cb = Wtt::wpkg_quit_cb;
}
int WttQt::ute_new(char* title)
{
pwr_tStatus sts;
utedctx = new WUtedQt(this, toplevel, title, "Utilites",
utedctx = new WUtedQt(this, title, "Utilites",
ldh_SessionToWB(ldhses), ldhses, editmode, uted_quit_cb, &sts);
return sts;
}
......@@ -999,14 +997,14 @@ static void wtt_help_cb(void* ctx, const char* topic)
void WttQtWidget::activate_rtmon()
{
pwr_tStatus sts;
RtMon* rtmon = new RtMonQt(this, this, "Runtime Monitor", 0, &sts);
RtMon* rtmon = new RtMonQt(this, "Runtime Monitor", 0, &sts);
rtmon->help_cb = wtt_help_cb;
}
void WttQtWidget::activate_statusmon()
{
pwr_tStatus sts;
Nodelist* nl = new NodelistQt(this, this, "Supervision Center",
Nodelist* nl = new NodelistQt(this, "Supervision Center",
nodelist_eMode_SystemStatus, 0, 0, &sts);
nl->set_scantime(3);
nl->help_cb = wtt_help_cb;
......@@ -1061,7 +1059,7 @@ void WttQtWidget::activate_history()
strcpy(title, "History Configurator ");
strcat(title, vname);
CoLogWQt* logw = new CoLogWQt(wtt, parentWidget(), title, 0, &sts);
CoLogWQt* logw = new CoLogWQt(wtt, title, 0, &sts);
logw->CoLogW::show(categories, vname);
}
......@@ -1713,11 +1711,10 @@ void WttQtWidget::closeEvent(QCloseEvent* event)
event->ignore();
}
WttQt::WttQt(void* wt_parent_ctx, QWidget* wt_parent_wid, const char* wt_name,
const char* iconname, void* wt_wbctx, pwr_tVolumeId wt_volid,
ldh_tVolume wt_volctx, wnav_sStartMenu* root_menu, pwr_tStatus* status)
: Wtt(wt_parent_ctx, wt_name, iconname, wt_wbctx, wt_volid, wt_volctx,
root_menu, status),
WttQt::WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname,
void* wt_wbctx, pwr_tVolumeId wt_volid, ldh_tVolume wt_volctx,
wnav_sStartMenu* root_menu, pwr_tStatus* status) : Wtt(wt_parent_ctx,
wt_name, iconname, wt_wbctx, wt_volid, wt_volctx, root_menu, status),
boot_dia(0), options_form(0), set_focus_disabled(0), disfocus_timerid(0),
avoid_deadlock(0), realized(0)
{
......@@ -1886,7 +1883,7 @@ WttQt::WttQt(void* wt_parent_ctx, QWidget* wt_parent_wid, const char* wt_name,
}
// Qt
toplevel = new WttQtWidget(this, wt_parent_wid);
toplevel = new WttQtWidget(this);
toplevel->setMinimumSize(window_width, window_height);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -2133,8 +2130,8 @@ WttQt::WttQt(void* wt_parent_ctx, QWidget* wt_parent_wid, const char* wt_name,
palette_paned = new QSplitter(Qt::Horizontal);
wnav_paned = new QSplitter(Qt::Horizontal);
Wtt::palette = new PalQt(this, palette_paned, "Objects", ldhses,
layout_palette, &palette_widget, &sts);
Wtt::palette = new PalQt(this, "Objects", ldhses, layout_palette,
&palette_widget, &sts);
Wtt::palette->set_focus_cb = &Wtt::set_focus_cb;
Wtt::palette->traverse_focus_cb = &Wtt::traverse_focus;
Wtt::palette->create_popup_menu_cb = &Wtt::create_pal_popup_menu_cb;
......@@ -2367,7 +2364,7 @@ void OptionsDialog::activate_options_cancel()
}
OptionsDialog::OptionsDialog(WttQt* parent_ctx, QWidget* parent)
: QDialog(), wtt(parent_ctx)
: QDialog(parent), wtt(parent_ctx)
{
setMinimumSize(650, 450);
setWindowTitle(fl("Options"));
......
......@@ -90,13 +90,11 @@ class WttQtWidget;
class WttQt : public Wtt {
public:
WttQt(void* wt_parent_ctx, QWidget* wt_parent_wid, const char* wt_name,
const char* iconname, ldh_tWBContext wt_wbctx, pwr_tVolumeId wt_volid,
ldh_tVolume wt_volctx, wnav_sStartMenu* root_menu, pwr_tStatus* status);
WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname,
ldh_tWBContext wt_wbctx, pwr_tVolumeId wt_volid, ldh_tVolume wt_volctx,
wnav_sStartMenu* root_menu, pwr_tStatus* status);
WttQt()
{
}
WttQt() {}
~WttQt();
QWidget* wnav_brow_widget;
......@@ -227,9 +225,7 @@ class WttQtWidget : public QWidget {
Q_OBJECT
public:
WttQtWidget(WttQt* parent_ctx, QWidget* parent) : QWidget(), wtt(parent_ctx)
{
}
WttQtWidget(WttQt* parent_ctx) : QWidget(), wtt(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -112,9 +112,8 @@ WCrrQt::~WCrrQt()
delete xcrrnav;
}
WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
ldh_tSesContext xa_ldhses, pwr_sAttrRef* xa_objar, int xa_advanced_user,
int* xa_sts)
WCrrQt::WCrrQt(void* xa_parent_ctx, ldh_tSesContext xa_ldhses,
pwr_sAttrRef* xa_objar, int xa_advanced_user, int* xa_sts)
: WCrr(xa_parent_ctx, xa_ldhses, xa_objar, xa_advanced_user, xa_sts)
{
int sts;
......@@ -129,7 +128,7 @@ WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
strncpy(title, namep, sizeof(title));
toplevel = new WCrrQtWidget(this, xa_parent_wid);
toplevel = new WCrrQtWidget(this);
toplevel->setMinimumSize(600, 420);
toplevel->setWindowTitle(convert_utf8(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -158,9 +157,9 @@ WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
addMenuItem(toplevel, help, "&Overview", SLOT(activate_help()), "CTRL+H",
"system-help");
xcrrnav = new WAttNavQt(this, wattnav_eType_CrossRef, toplevel, "Plant",
xa_ldhses, objar, 0, xa_advanced_user, 1, wb_eUtility_AttributeEditor,
&brow_widget, &sts);
xcrrnav = new WAttNavQt(this, wattnav_eType_CrossRef, "Plant", xa_ldhses,
objar, 0, xa_advanced_user, 1, wb_eUtility_AttributeEditor, &brow_widget,
&sts);
// xcrrnav->popup_menu_cb = &xcrr_popup_menu_cb;
// xcrrnav->start_trace_cb = &xcrr_start_trace_cb;
// xcrrnav->close_cb = &xcrr_close_cb;
......
......@@ -47,8 +47,8 @@ class WCrrQtWidget;
class WCrrQt : public WCrr {
public:
WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ldh_tSesContext xa_ldhses,
pwr_sAttrRef* xa_objar, int xa_advanced_user, int* xa_sts);
WCrrQt(void* xa_parent_ctx, ldh_tSesContext xa_ldhses, pwr_sAttrRef* xa_objar,
int xa_advanced_user, int* xa_sts);
~WCrrQt();
QWidget* brow_widget;
QWidget* form_widget;
......@@ -65,9 +65,7 @@ class WCrrQtWidget : public QWidget {
Q_OBJECT
public:
WCrrQtWidget(WCrrQt* parent_ctx, QWidget* parent) : QWidget(), crr(parent_ctx)
{
}
WCrrQtWidget(WCrrQt* parent_ctx) : QWidget(), crr(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -87,7 +87,7 @@ CoHelpQt::CoHelpQt(int argc, char* argv[], int* return_sts)
fprintf(stderr, "\n");
// Create help window
xhelp = new CoXHelpQt(0 /*toplevel*/, this, xhelp_eUtility_Xtt, &sts);
xhelp = new CoXHelpQt(this, xhelp_eUtility_Xtt, &sts);
// xhelp->open_URL_cb = open_URL_cb;
CoXHelp::set_default(xhelp);
xhelp->close_cb = close_cb;
......
......@@ -94,10 +94,10 @@ int main(int argc, char* argv[])
setlocale(LC_TIME, "en_US");
// Create help window
xhelp = new CoXHelpQt(0, 0, xhelp_eUtility_Xtt, &sts);
xhelp = new CoXHelpQt(NULL, xhelp_eUtility_Xtt, &sts);
CoXHelp::set_default(xhelp);
rtmon = new RtMonQt(NULL, NULL, "Runtime Monitor", display, &sts);
rtmon = new RtMonQt(NULL, "Runtime Monitor", display, &sts);
rtmon->help_cb = rtmon_help_cb;
rtmon->close_cb = rtmon_close_cb;
......
......@@ -118,10 +118,11 @@ int main(int argc, char* argv[])
setlocale(LC_NUMERIC, "POSIX");
setlocale(LC_TIME, "en_US");
xhelp = new CoXHelpQt(0, 0, xhelp_eUtility_Xtt, &sts);
xhelp = new CoXHelpQt(NULL, xhelp_eUtility_Xtt, &sts);
CoXHelp::set_default(xhelp);
nl = new NodelistQt(0, 0, "Status Monitor", mode, view_descr, msgw_ePop_No, &sts);
nl = new NodelistQt(NULL, "Status Monitor", mode, view_descr, msgw_ePop_No,
&sts);
nl->close_cb = statusmon_close;
nl->set_scantime(3);
......
......@@ -732,8 +732,8 @@ XttQt::XttQt(int argc, char* argv[], int* return_sts)
statusbar->show();
xnav = new XNavQt(this, NULL, "Plant", &brow_widget,
(xnav_sStartMenu*)root_menu, opplace_str, op_close_button, &sts);
xnav = new XNavQt(this, "Plant", &brow_widget, (xnav_sStartMenu*)root_menu,
opplace_str, op_close_button, &sts);
xnav->message_cb = &xtt_message_cb;
xnav->close_cb = &close;
xnav->map_cb = &map;
......@@ -770,7 +770,7 @@ XttQt::XttQt(int argc, char* argv[], int* return_sts)
cmd_entry->setVisible(false);
// Create help window
CoXHelp* xhelp = new CoXHelpQt(toplevel, this, xhelp_eUtility_Xtt, &sts);
CoXHelp* xhelp = new CoXHelpQt(this, xhelp_eUtility_Xtt, &sts);
xhelp->open_URL_cb = open_URL_cb;
CoXHelp::set_default(xhelp);
......
......@@ -87,9 +87,7 @@ class XttQtWidget : public QWidget {
Q_OBJECT
public:
XttQtWidget(XttQt* parent_ctx) : QWidget(), xtt(parent_ctx)
{
}
XttQtWidget(XttQt* parent_ctx) : QWidget(), xtt(parent_ctx) {}
bool eventFilter(QObject* obj, QEvent* event);
protected:
......
......@@ -57,7 +57,7 @@ XttCmdQt::XttCmdQt()
pwr_tStatus sts;
pwr_tOName opplace = "";
xnav = new XNavQt(this, NULL, "Plant", &brow_widget, (xnav_sStartMenu*)root_menu,
xnav = new XNavQt(this, "Plant", &brow_widget, (xnav_sStartMenu*)root_menu,
opplace, 0, &sts);
xnav->message_cb = &message_cb;
......
......@@ -56,7 +56,6 @@
/* Fallback resources */
static QWidget* toplevel;
static QWidget* mainwindow;
static void usage()
{
......@@ -86,7 +85,7 @@ int main(int argc, char* argv[])
toplevel->setAttribute(Qt::WA_DeleteOnClose);
// Create help window
CoXHelpQt* xhelp = new CoXHelpQt(mainwindow, 0, xhelp_eUtility_Wtt, &sts);
CoXHelpQt* xhelp = new CoXHelpQt(0, xhelp_eUtility_Wtt, &sts);
CoXHelpQt::set_default(xhelp);
debug_print("%s ", argv[0]);
......@@ -109,7 +108,7 @@ int main(int argc, char* argv[])
// Execute script
pwr_tStatus sts;
gectx = new GeQt(NULL, toplevel, 0, 1, 0, NULL);
gectx = new GeQt(NULL, 0, 1, 0, NULL);
sts = gectx->command(file);
if (EVEN(sts)) {
gectx->message(sts);
......@@ -117,13 +116,13 @@ int main(int argc, char* argv[])
} else {
// Open graph
strcpy(graph_name, file);
gectx = new GeQt(NULL, mainwindow, 0, 1, opt, graph_name);
gectx = new GeQt(NULL, 0, 1, opt, graph_name);
sprintf(fname, "@%s.pwr_com", wnav_cInitFile);
gectx->command(fname);
}
} else {
gectx = new GeQt(NULL, mainwindow, 0, 1, opt, NULL);
gectx = new GeQt(NULL, 0, 1, opt, NULL);
sprintf(fname, "@%s.pwr_com", wnav_cInitFile);
gectx->command(fname);
......@@ -135,8 +134,7 @@ int main(int argc, char* argv[])
new wb_log_qt(toplevel);
// Create message window
MsgWindowQt* msg_window
= new MsgWindowQt(gectx, mainwindow, "Ge messages", &sts);
MsgWindowQt* msg_window = new MsgWindowQt(gectx, "Ge messages", &sts);
msg_window->find_ge_cb = Ge::find_ge_cb;
MsgWindow::set_default(msg_window);
......
......@@ -58,9 +58,7 @@ public:
CoLoginQt(void* wl_parent_ctx, QWidget* wl_parent_wid, const char* wl_name,
const char* wl_groupname, void (*wl_bc_success)(void*),
void (*wl_bc_cancel)(void*), void* base_widget, pwr_tStatus* sts);
~CoLoginQt()
{
}
~CoLoginQt() {}
pwr_tStatus get_values();
void message(const char* new_label);
......@@ -72,9 +70,7 @@ class CoLoginQtWidget : public QDialog {
public:
CoLoginQtWidget(CoLoginQt* parent_ctx, QWidget* parent)
: QDialog(parent), login(parent_ctx), del(true)
{
}
: QDialog(parent), login(parent_ctx), del(true) {}
protected:
void closeEvent(QCloseEvent* event);
......
......@@ -44,11 +44,11 @@
#include <QMenuBar>
#include <QVBoxLayout>
CoLogWQt::CoLogWQt(void* logw_parent_ctx, QWidget* logw_parent_wid,
const char* logw_name, int l_show_item, pwr_tStatus* status)
CoLogWQt::CoLogWQt(void* logw_parent_ctx, const char* logw_name,
int l_show_item, pwr_tStatus* status)
: CoLogW(logw_parent_ctx, logw_name, l_show_item, status)
{
toplevel = new CoLogWQtWidget(this, logw_parent_wid);
toplevel = new CoLogWQtWidget(this);
toplevel->setMinimumSize(800, 600);
toplevel->setWindowTitle(fl(logw_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -76,7 +76,7 @@ CoLogWQt::CoLogWQt(void* logw_parent_ctx, QWidget* logw_parent_wid,
QVBoxLayout* form = new QVBoxLayout(toplevel);
// Create logwnav
logwnav = new CoLogWNavQt(this, toplevel, l_show_item, &nav_widget);
logwnav = new CoLogWNavQt(this, l_show_item, &nav_widget);
form->setMenuBar(menu_bar);
add_expanding(form, nav_widget);
......
......@@ -47,8 +47,8 @@ class CoLogWQtWidget;
class CoLogWQt : public CoLogW {
public:
CoLogWQt(void* msg_parent_ctx, QWidget* msg_parent_wid, const char* msg_name,
int l_show_item, pwr_tStatus* status);
CoLogWQt(void* msg_parent_ctx, const char* msg_name, int l_show_item,
pwr_tStatus* status);
~CoLogWQt();
QWidget* nav_widget;
......@@ -64,10 +64,7 @@ class CoLogWQtWidget : public QWidget {
Q_OBJECT
public:
CoLogWQtWidget(CoLogWQt* parent_ctx, QWidget* parent)
: QWidget(), logw(parent_ctx)
{
}
CoLogWQtWidget(CoLogWQt* parent_ctx) : QWidget(), logw(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -41,8 +41,7 @@
#include "flow_browwidget_qt.h"
CoLogWNavQt::CoLogWNavQt(
void* l_parent_ctx, QWidget* l_parent_wid, int l_show_item, QWidget** w)
CoLogWNavQt::CoLogWNavQt(void* l_parent_ctx, int l_show_item, QWidget** w)
: CoLogWNav(l_parent_ctx, l_show_item)
{
form_widget
......
......@@ -45,8 +45,7 @@
class CoLogWNavQt : public CoLogWNav {
public:
CoLogWNavQt(void* ev_parent_ctx, QWidget* ev_parent_wid, int l_show_item,
QWidget** w);
CoLogWNavQt(void* ev_parent_ctx, int l_show_item, QWidget** w);
~CoLogWNavQt();
QWidget* brow_widget;
......
......@@ -41,7 +41,7 @@
#include "flow_browwidget_qt.h"
MsgListQt::MsgListQt(void* ev_parent_ctx, QWidget* ev_parent_wid, QWidget** w)
MsgListQt::MsgListQt(void* ev_parent_ctx, QWidget** w)
: MsgList(ev_parent_ctx)
{
form_widget
......
......@@ -45,7 +45,7 @@
class MsgListQt : public MsgList {
public:
MsgListQt(void* ev_parent_ctx, QWidget* ev_parent_wid, QWidget** w);
MsgListQt(void* ev_parent_ctx, QWidget** w);
~MsgListQt();
QWidget* brow_widget;
......
......@@ -53,11 +53,10 @@ void MsgWindowQtWidget::closeEvent(QCloseEvent* event)
event->ignore();
}
MsgWindowQt::MsgWindowQt(void* msg_parent_ctx, QWidget* msg_parent_wid,
const char* msg_name, pwr_tStatus* status)
: MsgWindow(msg_parent_ctx, msg_name, status)
MsgWindowQt::MsgWindowQt(void* msg_parent_ctx, const char* msg_name,
pwr_tStatus* status) : MsgWindow(msg_parent_ctx, msg_name, status)
{
toplevel = new MsgWindowQtWidget(this, msg_parent_wid);
toplevel = new MsgWindowQtWidget(this);
toplevel->setMinimumSize(800, 600);
toplevel->setWindowTitle(translate_utf8(msg_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -84,7 +83,7 @@ MsgWindowQt::MsgWindowQt(void* msg_parent_ctx, QWidget* msg_parent_wid,
// Create msgnav
QVBoxLayout* form = new QVBoxLayout();
msgnav = new MsgListQt(this, toplevel, &nav_widget);
msgnav = new MsgListQt(this, &nav_widget);
msgnav->find_wnav_cb = MsgWindow::msgw_find_wnav_cb;
msgnav->find_plc_cb = MsgWindow::msgw_find_plc_cb;
msgnav->find_ge_cb = MsgWindow::msgw_find_ge_cb;
......
......@@ -47,8 +47,7 @@ class MsgWindowQtWidget;
class MsgWindowQt : public MsgWindow {
public:
MsgWindowQt(void* msg_parent_ctx, QWidget* msg_parent_wid,
const char* msg_name, pwr_tStatus* status);
MsgWindowQt(void* msg_parent_ctx, const char* msg_name, pwr_tStatus* status);
QWidget* nav_widget;
CoWowFocusTimerQt focustimer;
......@@ -66,10 +65,7 @@ class MsgWindowQtWidget : public QWidget {
Q_OBJECT
public:
MsgWindowQtWidget(MsgWindowQt* parent_ctx, QWidget* parent)
: QWidget(), msgwin(parent_ctx)
{
}
MsgWindowQtWidget(MsgWindowQt* parent_ctx) : QWidget(), msgwin(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -72,8 +72,8 @@ static QPushButton* addButton(
return button;
}
RtMonQt::RtMonQt(void* rtmon_parent_ctx, QWidget* rtmon_parent_wid,
const char* rtmon_name, const char* rtmon_display, pwr_tStatus* status)
RtMonQt::RtMonQt(void* rtmon_parent_ctx, const char* rtmon_name,
const char* rtmon_display, pwr_tStatus* status)
: RtMon(rtmon_parent_ctx, rtmon_name, rtmon_display, status), timerid(0),
old_status(9999)
{
......@@ -86,7 +86,7 @@ RtMonQt::RtMonQt(void* rtmon_parent_ctx, QWidget* rtmon_parent_wid,
strcat(title, " ");
strcat(title, rtmon_name);
toplevel = new RtMonQtWidget(this, rtmon_parent_wid);
toplevel = new RtMonQtWidget(this);
toplevel->setMinimumHeight(340);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -120,7 +120,7 @@ RtMonQt::RtMonQt(void* rtmon_parent_ctx, QWidget* rtmon_parent_wid,
toplevel, help, "&Help", SLOT(activate_help()), "CTRL+H", "system-help");
QVBoxLayout* vbox = new QVBoxLayout();
nodelistnav = new NodelistNavQt(this, toplevel, 0, nodename,
nodelistnav = new NodelistNavQt(this, 0, nodename,
nodelist_eMode_SystemStatus, 0, 0, &nodelistnav_widget);
// Toolbar
......
......@@ -50,8 +50,8 @@ class RtMonQtWidget;
class RtMonQt : public RtMon {
public:
RtMonQt(void* rtmon_parent_ctx, QWidget* rtmon_parent_wid,
const char* rtmon_name, const char* rtmon_display, pwr_tStatus* status);
RtMonQt(void* rtmon_parent_ctx, const char* rtmon_name,
const char* rtmon_display, pwr_tStatus* status);
~RtMonQt();
QWidget* nodelistnav_widget;
......@@ -83,10 +83,7 @@ class RtMonQtWidget : public QWidget {
Q_OBJECT
public:
RtMonQtWidget(RtMonQt* parent_ctx, QWidget* parent)
: QWidget(), rtmon(parent_ctx)
{
}
RtMonQtWidget(RtMonQt* parent_ctx) : QWidget(), rtmon(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -59,15 +59,14 @@ void NodelistQtWidget::closeEvent(QCloseEvent* event)
QWidget::closeEvent(event);
}
NodelistQt::NodelistQt(void* nodelist_parent_ctx, QWidget* nodelist_parent_wid,
const char* nodelist_name, int nodelist_mode, int nodelist_view_node_descr,
int msgw_pop, pwr_tStatus* status)
: Nodelist(nodelist_parent_ctx, nodelist_name, nodelist_mode,
nodelist_view_node_descr, status)
NodelistQt::NodelistQt(void* nodelist_parent_ctx, const char* nodelist_name,
int nodelist_mode, int nodelist_view_node_descr, int msgw_pop,
pwr_tStatus* status) : Nodelist(nodelist_parent_ctx, nodelist_name,
nodelist_mode, nodelist_view_node_descr, status)
{
pwr_tStatus sts;
toplevel = new NodelistQtWidget(this, nodelist_parent_wid);
toplevel = new NodelistQtWidget(this);
toplevel->setMinimumSize(850, 300);
toplevel->setWindowTitle(fl(nodelist_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -147,13 +146,13 @@ NodelistQt::NodelistQt(void* nodelist_parent_ctx, QWidget* nodelist_parent_wid,
addMenuItem(
toplevel, help, "&Help", SLOT(activate_help()), "CTRL+H", "system-help");
msg_window = new MsgWindowQt(this, toplevel, "Status Events", &sts);
msg_window = new MsgWindowQt(this, "Status Events", &sts);
msg_window->find_wnav_cb = find_node_cb;
msg_window->msg('I', "Status Montitor started");
QVBoxLayout* vbox = new QVBoxLayout();
nodelistnav = new NodelistNavQt(this, toplevel, msg_window, 0, mode,
view_node_descr, msgw_pop, &nodelistnav_widget);
nodelistnav = new NodelistNavQt(this, msg_window, 0, mode, view_node_descr,
msgw_pop, &nodelistnav_widget);
// Toolbar
QToolBar* tools = new QToolBar();
......
......@@ -76,9 +76,9 @@ private:
class NodelistQt : public Nodelist {
public:
NodelistQt(void* nodelist_parent_ctx, QWidget* nodelist_parent_wid,
const char* nodelist_name, int nodelist_mode,
int nodelist_view_node_descr, int msgw_pop, pwr_tStatus* status);
NodelistQt(void* nodelist_parent_ctx, const char* nodelist_name,
int nodelist_mode, int nodelist_view_node_descr, int msgw_pop,
pwr_tStatus* status);
~NodelistQt();
QWidget* nodelistnav_widget;
......@@ -104,10 +104,7 @@ class NodelistQtWidget : public QWidget {
Q_OBJECT
public:
NodelistQtWidget(NodelistQt* parent_ctx, QWidget* parent)
: QWidget(), nodelist(parent_ctx)
{
}
NodelistQtWidget(NodelistQt* parent_ctx) : QWidget(), nodelist(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -46,9 +46,8 @@
#include <QTimer>
NodelistNavQt::NodelistNavQt(void* nodelist_parent_ctx,
QWidget* nodelist_parent_wid, MsgWindow* nodelist_msg_window,
char* nodelist_nodename, int nodelist_mode, int nodelist_view_node_descr,
int nodelist_msgw_pop, QWidget** w)
MsgWindow* nodelist_msg_window, char* nodelist_nodename, int nodelist_mode,
int nodelist_view_node_descr, int nodelist_msgw_pop, QWidget** w)
: NodelistNav(nodelist_parent_ctx, nodelist_msg_window, nodelist_nodename,
nodelist_mode, nodelist_view_node_descr, nodelist_msgw_pop)
{
......
......@@ -49,10 +49,9 @@ class NodelistNavQtTraceObject;
class NodelistNavQt : public NodelistNav {
public:
NodelistNavQt(void* ev_parent_ctx, QWidget* nodelistnav_parent_wid,
MsgWindow* nodelistnav_msg_window, char* nodelistnav_msg_nodename,
int nodelistnav_mode, int nodelistnav_view_node_descr,
int nodelist_msgw_pop, QWidget** w);
NodelistNavQt(void* ev_parent_ctx, MsgWindow* nodelistnav_msg_window,
char* nodelistnav_msg_nodename, int nodelistnav_mode,
int nodelistnav_view_node_descr, int nodelist_msgw_pop, QWidget** w);
~NodelistNavQt();
QWidget* brow_widget;
......
......@@ -43,9 +43,7 @@ class PwrStyle : public QGtkStyle {
Q_OBJECT
public:
PwrStyle() : QGtkStyle()
{
}
PwrStyle() : QGtkStyle() {}
int pixelMetric(PixelMetric which, const QStyleOption* option,
const QWidget* widget = 0) const;
......
......@@ -118,10 +118,9 @@ void CowTreeQt::pop()
::pop(toplevel);
}
CowTreeQt::CowTreeQt(QWidget* a_parent_wid, void* a_parent_ctx,
const char* title, pwr_tAttrRef* itemlist, int item_cnt,
unsigned int options, pwr_tStatus (*get_object_info)(void*, pwr_tAttrRef*,
char*, int, char*, char*, int),
CowTreeQt::CowTreeQt(void* a_parent_ctx, const char* title,
pwr_tAttrRef* itemlist, int item_cnt, unsigned int options, pwr_tStatus
(*get_object_info)(void*, pwr_tAttrRef*, char*, int, char*, char*, int),
pwr_tStatus (*get_node_info)(void*, char*, char*, int),
pwr_tStatus (*action)(void*, pwr_tAttrRef*))
: CowTree(a_parent_ctx, itemlist, item_cnt, options, get_object_info,
......@@ -129,7 +128,7 @@ CowTreeQt::CowTreeQt(QWidget* a_parent_wid, void* a_parent_ctx,
{
int sts;
toplevel = new CowTreeQtWidget(this, a_parent_wid);
toplevel = new CowTreeQtWidget(this);
toplevel->setMinimumSize(600, 400);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......@@ -191,8 +190,8 @@ CowTreeQt::CowTreeQt(QWidget* a_parent_wid, void* a_parent_ctx,
msg_label = new QLabel("");
statusbar->addWidget(msg_label);
treenav = new TreeNavQt(this, toplevel, itemlist, item_cnt, options,
get_object_info, get_node_info, &brow_widget, &sts);
treenav = new TreeNavQt(this, itemlist, item_cnt, options, get_object_info,
get_node_info, &brow_widget, &sts);
treenav->message_cb = &CowTree::message;
vbox->setMenuBar(menu_bar);
......
......@@ -48,10 +48,9 @@ class CowTreeQtWidget;
class CowTreeQt : public CowTree {
public:
CowTreeQt(QWidget* a_parent_wid, void* a_parent_ctx, const char* title,
pwr_tAttrRef* itemlist, int item_cnt, unsigned int options,
pwr_tStatus (*get_object_info)(
void*, pwr_tAttrRef*, char*, int, char*, char*, int),
CowTreeQt(void* a_parent_ctx, const char* title, pwr_tAttrRef* itemlist,
int item_cnt, unsigned int options, pwr_tStatus (*get_object_info)(void*,
pwr_tAttrRef*, char*, int, char*, char*, int),
pwr_tStatus (*get_node_info)(void*, char*, char*, int),
pwr_tStatus (*action)(void*, pwr_tAttrRef*));
QWidget* brow_widget;
......@@ -70,10 +69,7 @@ class CowTreeQtWidget : public QWidget {
Q_OBJECT
public:
CowTreeQtWidget(CowTreeQt* parent_ctx, QWidget* parent)
: QWidget(), tree(parent_ctx)
{
}
CowTreeQtWidget(CowTreeQt* parent_ctx) : QWidget(), tree(parent_ctx) {}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -41,9 +41,8 @@
#include "flow_browwidget_qt.h"
TreeNavQt::TreeNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tAttrRef* xn_itemlist, int xn_item_cnt, unsigned int xn_options,
pwr_tStatus (*xn_get_object_info)(
TreeNavQt::TreeNavQt(void* xn_parent_ctx, pwr_tAttrRef* xn_itemlist,
int xn_item_cnt, unsigned int xn_options, pwr_tStatus (*xn_get_object_info)(
void*, pwr_tAttrRef*, char*, int, char*, char*, int),
pwr_tStatus (*xn_get_node_info)(void*, char*, char*, int), QWidget** w,
pwr_tStatus* status)
......
......@@ -46,9 +46,8 @@
//! The navigation area of the attribute editor.
class TreeNavQt : public TreeNav {
public:
TreeNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tAttrRef* xn_itemlist, int xn_item_cnt, unsigned int xn_options,
pwr_tStatus (*xn_get_object_info)(
TreeNavQt(void* xn_parent_ctx, pwr_tAttrRef* xn_itemlist, int xn_item_cnt,
unsigned int xn_options, pwr_tStatus (*xn_get_object_info)(
void*, pwr_tAttrRef*, char*, int, char*, char*, int),
pwr_tStatus (*xn_get_node_info)(void*, char*, char*, int), QWidget** w,
pwr_tStatus* status);
......
......@@ -124,9 +124,7 @@ class CoWowTimerQtObject : public QObject {
Q_OBJECT
public:
CoWowTimerQtObject(CoWowTimerQt* parent) : QObject(), wow_timer(parent)
{
}
CoWowTimerQtObject(CoWowTimerQt* parent) : QObject(), wow_timer(parent) {}
public slots:
void timer_cb();
......@@ -236,9 +234,7 @@ class CoWowQtObject : public QObject {
Q_OBJECT
public:
CoWowQtObject(QWidget* parent) : QObject(), parent_wid(parent)
{
}
CoWowQtObject(QWidget* parent) : QObject(), parent_wid(parent) {}
QWidget* parent_wid;
public slots:
......
......@@ -176,16 +176,15 @@ CoXHelpQt::~CoXHelpQt()
delete xhelpnav;
}
CoXHelpQt::CoXHelpQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
xhelp_eUtility utility, int* xa_sts)
: CoXHelp(xa_parent_ctx, utility, xa_sts), parent_wid(xa_parent_wid)
CoXHelpQt::CoXHelpQt(void* xa_parent_ctx, xhelp_eUtility utility, int* xa_sts)
: CoXHelp(xa_parent_ctx, utility, xa_sts)
{
int sts;
char title[80];
strcpy(title, Lng::translate("Help"));
toplevel = new CoXHelpQtWidget(this, xa_parent_wid);
toplevel = new CoXHelpQtWidget(this);
toplevel->setMinimumSize(700, 600);
toplevel->setWindowTitle(fl(title));
......@@ -249,8 +248,7 @@ CoXHelpQt::CoXHelpQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
QVBoxLayout* vbox = new QVBoxLayout();
xhelpnav
= new CoXHelpNavQt(this, toplevel, title, utility, &brow_widget, &sts);
xhelpnav = new CoXHelpNavQt(this, title, utility, &brow_widget, &sts);
xhelpnav->open_URL_cb = CoXHelp::open_URL;
vbox->setMenuBar(menu_bar);
......@@ -262,4 +260,13 @@ CoXHelpQt::CoXHelpQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
toplevel->hide();
*xa_sts = 1;
}
QWidget* CoXHelpQt::get_widget()
{
if (default_xhelp) {
return ((CoXHelpQt*)default_xhelp)->toplevel;
} else {
return 0;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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