Commit 5935f66d authored by pwrd's avatar pwrd

Merge branch 'master'

parents fafbd090 05e4a205
...@@ -91,8 +91,13 @@ ifeq ($(pwre_conf_qt),1) ...@@ -91,8 +91,13 @@ ifeq ($(pwre_conf_qt),1)
csetos := -DPWRE_CONF_QT $(pwre_conf_cc_define) csetos := -DPWRE_CONF_QT $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirqt) cinc := -I$(inc_dir) -I$(einc_dir) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirqt)
else else
ifeq ($(pwre_conf_gtk),1)
csetos := -DPWRE_CONF_GTK $(pwre_conf_cc_define) csetos := -DPWRE_CONF_GTK $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) cinc := -I$(inc_dir) -I$(einc_dir) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst)
else
csetos := $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst)
endif
endif endif
rm := rm rm := rm
cp := cp cp := cp
......
...@@ -40,6 +40,8 @@ rt_modules = \ ...@@ -40,6 +40,8 @@ rt_modules = \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/otherio/inc/pwr_otherioclasses.hpp \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/otherio/inc/pwr_otherioclasses.hpp \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/pwr_remoteclasses.h \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/pwr_remoteclasses.h \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/pwr_remoteclasses.hpp \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/pwr_remoteclasses.hpp \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/sev/inc/pwr_sevclasses.h \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/sev/inc/pwr_sevclasses.hpp \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/pwr_abbclasses.h \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/pwr_abbclasses.h \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/pwr_abbclasses.hpp \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/pwr_abbclasses.hpp \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/inor/inc/pwr_inorclasses.h \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/inor/inc/pwr_inorclasses.h \
...@@ -79,7 +81,7 @@ op_motif_modules = \ ...@@ -79,7 +81,7 @@ op_motif_modules = \
java_modules = \ java_modules = \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_rt.jar \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_rt.jar \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_jop.jar \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_jop.jar \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_jopc.jar \ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_jopg.jar \
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_rt_client.jar $(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/pwr_rt_client.jar
...@@ -171,6 +173,14 @@ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/%.hpp : $(pwre_vmsinc)/exp/inc/%. ...@@ -171,6 +173,14 @@ $(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/%.hpp : $(pwre_vmsinc)/exp/inc/%.
@ echo Import ${target} @ echo Import ${target}
@ cp $(source) $(target) @ cp $(source) $(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/sev/inc/%.h : $(pwre_vmsinc)/exp/inc/%.h
@ echo Import ${target}
@ cp $(source) $(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/sev/inc/%.hpp : $(pwre_vmsinc)/exp/inc/%.hpp
@ echo Import ${target}
@ cp $(source) $(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/%.h : $(pwre_vmsinc)/exp/inc/%.h $(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/%.h : $(pwre_vmsinc)/exp/inc/%.h
@ echo Import ${target} @ echo Import ${target}
@ cp $(source) $(target) @ cp $(source) $(target)
......
...@@ -153,6 +153,7 @@ sub configure() ...@@ -153,6 +153,7 @@ sub configure()
sub set_flavour # args: flavour sub set_flavour # args: flavour
{ {
printf("Set flavour %s\n", $_[0]);
if ($_[0] eq "qt") { if ($_[0] eq "qt") {
$ENV{pwre_conf_qt} = "1"; $ENV{pwre_conf_qt} = "1";
} }
...@@ -330,6 +331,7 @@ sub ebuild # args: pass flavour ...@@ -330,6 +331,7 @@ sub ebuild # args: pass flavour
printf("\n"); printf("\n");
close FILE; close FILE;
set_flavour("");
my $pass = $_[0]; my $pass = $_[0];
my $flavour = $_[1]; my $flavour = $_[1];
...@@ -348,16 +350,16 @@ sub ebuild # args: pass flavour ...@@ -348,16 +350,16 @@ sub ebuild # args: pass flavour
_build("msg", "*", "src", "all"); _build("msg", "*", "src", "all");
_build("lib", "rt", "src", "init"); _build("lib", "rt", "src", "init");
_build("lib", "rt", "src", "copy"); _build("lib", "rt", "src", "copy");
_build("lib", "rt", $flavour, "copy"); # _build("lib", "rt", $flavour, "copy");
_build("lib", "co", "src", "init"); _build("lib", "co", "src", "init");
_build("lib", "co", "src", "copy"); _build("lib", "co", "src", "copy");
_build("lib", "co", $flavour, "copy"); # _build("lib", "co", $flavour, "copy");
_build("lib", "dtt", "src", "init"); _build("lib", "dtt", "src", "init");
_build("lib", "dtt", "src", "copy"); _build("lib", "dtt", "src", "copy");
_build("lib", "statussrv", "src", "init"); _build("lib", "statussrv", "src", "init");
_build("lib", "statussrv", "src", "copy"); _build("lib", "statussrv", "src", "copy");
_build("lib", "co", "src", "all"); _build("lib", "co", "src", "all");
_build("lib", "co", $flavour, "all"); # _build("lib", "co", $flavour, "all");
_build("exe", "co*", "src", "all"); _build("exe", "co*", "src", "all");
_build("exe", "*", "src", "copy"); _build("exe", "*", "src", "copy");
_build("exp", "stdsoap2", "src", "copy"); _build("exp", "stdsoap2", "src", "copy");
...@@ -380,9 +382,11 @@ sub ebuild # args: pass flavour ...@@ -380,9 +382,11 @@ sub ebuild # args: pass flavour
_build("lib","epl_dummy","src","init lib"); _build("lib","epl_dummy","src","init lib");
_build("lib","piface_dummy","src","init lib"); _build("lib","piface_dummy","src","init lib");
merge(); merge();
_module("sev");
merge();
_module("rt"); _module("rt");
_build("exe", "rt*", "src", "all"); _build("exe", "rt*", "src", "all");
_build("exe", "co*", $flavour, "all"); # _build("exe", "co*", $flavour, "all");
_build("exe", "pwr_user", "src", "all"); _build("exe", "pwr_user", "src", "all");
if ($to_build{"nmps"}) { if ($to_build{"nmps"}) {
merge(); merge();
......
...@@ -17,7 +17,8 @@ Arguments ...@@ -17,7 +17,8 @@ Arguments
--lock-dbs Lock dbs-files. Dbs-files will not be rebuilt. --lock-dbs Lock dbs-files. Dbs-files will not be rebuilt.
--unlock-dbs Unlock dbs-files --unlock-dbs Unlock dbs-files
--parallel Build with parallel execution. --parallel Build with parallel execution.
--not-parallel Don't build with parallel execution --not-parallel Don't build with parallel execution.
--ebuild Build with cross compilation.
EOF EOF
} }
......
...@@ -11,7 +11,7 @@ try: ...@@ -11,7 +11,7 @@ try:
except: except:
pwre_conf_qt = "" pwre_conf_qt = ""
if pwre_conf_qt == "": if pwre_conf_qt == "1":
libs = ['pwr_wb_gtk', 'pwr_xtt_gtk', 'pwr_ge_gtk', 'pwr_cow_gtk', libs = ['pwr_wb_gtk', 'pwr_xtt_gtk', 'pwr_ge_gtk', 'pwr_cow_gtk',
'pwr_flow_gtk', 'pwr_glow_gtk', 'pwr_flow_gtk', 'pwr_glow_gtk',
'pwr_wb', 'pwr_xtt', 'pwr_ge', 'pwr_cow', 'pwr_flow', 'pwr_glow', 'pwr_wb', 'pwr_xtt', 'pwr_ge', 'pwr_cow', 'pwr_flow', 'pwr_glow',
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "wb_wge_qt.h" #include "wb_wge_qt.h"
#include <QApplication> #include <QApplication>
#include <QCloseEvent>
#include <QMenuBar> #include <QMenuBar>
#include <QMessageBox> #include <QMessageBox>
#include <QShortcut> #include <QShortcut>
...@@ -146,9 +147,14 @@ void WGeQtWidget::action_resize(QResizeEvent* event) ...@@ -146,9 +147,14 @@ void WGeQtWidget::action_resize(QResizeEvent* event)
WGeQt::~WGeQt() WGeQt::~WGeQt()
{ {
if (close_cb) {
(close_cb)(this);
}
if (nav_widget) { if (nav_widget) {
nav_widget->close(); nav_widget->close();
} }
delete graph;
delete toplevel;
} }
void WGeQt::set_size(int width, int height) void WGeQt::set_size(int width, int height)
...@@ -175,7 +181,7 @@ void WGeQtWidget::closeEvent(QCloseEvent* event) ...@@ -175,7 +181,7 @@ void WGeQtWidget::closeEvent(QCloseEvent* event)
} else { } else {
delete ge; delete ge;
} }
QWidget::closeEvent(event); event->ignore();
} }
WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename, WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
...@@ -199,7 +205,6 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename, ...@@ -199,7 +205,6 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
// Qt // Qt
toplevel = new WGeQtWidget(this); toplevel = new WGeQtWidget(this);
toplevel->setWindowTitle(fl(title)); toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
CoWowQt::SetWindowIcon(toplevel); CoWowQt::SetWindowIcon(toplevel);
......
...@@ -263,7 +263,7 @@ Ge* WNavQt::ge_new(char* graph_name, int nojournal) ...@@ -263,7 +263,7 @@ Ge* WNavQt::ge_new(char* graph_name, int nojournal)
WGe* WNavQt::wge_new(char* name, char* filename, char* object_name, int modal) WGe* WNavQt::wge_new(char* name, char* filename, char* object_name, int modal)
{ {
return new WGeQt(this, name, filename, 0, 1, 1, 0, 0, 0, 0, object_name, return new WGeQt(this, name, filename, 0, 0, 0, 0, 0, 0, 0, object_name,
modal); modal);
} }
......
...@@ -281,19 +281,16 @@ void GlowDrawQt::event_handler(QEvent* event, QWidget* target) ...@@ -281,19 +281,16 @@ void GlowDrawQt::event_handler(QEvent* event, QWidget* target)
switch (event->type()) { switch (event->type()) {
case QEvent::KeyPress: { case QEvent::KeyPress: {
QKeyEvent* keyEvent = ((QKeyEvent*)event); QKeyEvent* keyEvent = ((QKeyEvent*)event);
int keysym; if (keyEvent->key() >= Qt::Key_Space && keyEvent->key() <= Qt::Key_AsciiTilde) {
const char *buff = qPrintable(keyEvent->text());
keysym = keyEvent->key();
if (keysym >= Qt::Key_Space && keysym <= Qt::Key_AsciiTilde) {
char buff = QChar(keysym).toAscii();
if (keyEvent->modifiers() & Qt::ControlModifier) { if (keyEvent->modifiers() & Qt::ControlModifier) {
sts = ctx->event_handler(glow_eEvent_Key_CtrlAscii, 0, 0, buff, 0); sts = ctx->event_handler(glow_eEvent_Key_CtrlAscii, 0, 0, buff[0], 0);
} else { } else {
sts = ctx->event_handler(glow_eEvent_Key_Ascii, 0, 0, buff, 0); sts = ctx->event_handler(glow_eEvent_Key_Ascii, 0, 0, buff[0], 0);
} }
} else { } else {
switch (keysym) { switch (keyEvent->key()) {
case Qt::Key_Return: case Qt::Key_Return:
case Qt::Key_Enter: case Qt::Key_Enter:
sts = ctx->event_handler(glow_eEvent_Key_Return, 0, 0, 0, 0); sts = ctx->event_handler(glow_eEvent_Key_Return, 0, 0, 0, 0);
......
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