From 4a98a77b5230943c15a4738eb8545c8005c3a6e1 Mon Sep 17 00:00:00 2001 From: caremoli Date: Mon, 3 Jan 2005 13:37:16 +0000 Subject: [PATCH] CCAR: It seems that the tagged version (V2_1_0) does not work. First, the branch V1_4_1a has not been merged in main trunk. Then the configure.in.base does not test properly if the sstream include is present or not (HAVE_SSTREAM). This version should be tagged ?? --- configure.in.base | 46 ++++++++++++++++++++++++++++++++++++++- src/HELLOGUI/HELLOGUI.cxx | 41 ++++++++-------------------------- src/HELLOGUI/HELLOGUI.h | 14 +++++++----- 3 files changed, 62 insertions(+), 39 deletions(-) diff --git a/configure.in.base b/configure.in.base index 386022d..80563ef 100644 --- a/configure.in.base +++ b/configure.in.base @@ -86,6 +86,50 @@ case "$INSTALL" in ;; esac +echo +echo --------------------------------------------- +echo testing C/C++ +echo --------------------------------------------- +echo + +cc_ok=no +dnl inutil car libtool +dnl AC_PROG_CC +AC_PROG_CXX +AC_CXX_WARNINGS +AC_CXX_TEMPLATE_OPTIONS +AC_DEPEND_FLAG +# AC_CC_WARNINGS([ansi]) +cc_ok=yes + +dnl Library libdl : +AC_CHECK_LIB(dl,dlopen) + +dnl Library librt : for alpha/osf +AC_CHECK_LIB(rt,nanosleep) + +dnl add library libm : +AC_CHECK_LIB(m,ceil) + +AC_CXX_USE_STD_IOSTREAM +AC_CXX_HAVE_SSTREAM + +dnl +dnl --------------------------------------------- +dnl testing linker +dnl --------------------------------------------- +dnl + +AC_LINKER_OPTIONS + +echo +echo --------------------------------------------- +echo testing threads +echo --------------------------------------------- +echo + +ENABLE_PTHREADS + echo echo --------------------------------------------- echo testing python @@ -146,7 +190,7 @@ echo --------------------------------------------- echo echo Configure -variables="python_ok omniORB_ok Kernel_ok qt_ok" +variables="cc_ok threads_ok python_ok omniORB_ok Kernel_ok qt_ok" for var in $variables do diff --git a/src/HELLOGUI/HELLOGUI.cxx b/src/HELLOGUI/HELLOGUI.cxx index fc631e9..83ea5ba 100644 --- a/src/HELLOGUI/HELLOGUI.cxx +++ b/src/HELLOGUI/HELLOGUI.cxx @@ -20,6 +20,10 @@ using namespace std; #include #include +HELLOGUI::HELLOGUI( const QString& theName, QObject* theParent ) : + SALOMEGUI( theName, theParent ) +{} + // launch HELLO component and return a handle HELLO_ORB::HELLO_Gen_ptr HELLOGUI::InitHELLOGen(QAD_Desktop* parent) @@ -97,9 +101,10 @@ bool HELLOGUI::CustomPopup ( QAD_Desktop* parent, return true; } -void HELLOGUI::ActiveStudyChanged( QAD_Desktop* parent ) +bool HELLOGUI::ActiveStudyChanged( QAD_Desktop* parent ) { MESSAGE("HELLOGUI::ActiveStudyChanged"); + return true; } void HELLOGUI::DefinePopup( QString & theContext, QString & theParent, QString & theObject ) @@ -110,38 +115,10 @@ void HELLOGUI::DefinePopup( QString & theContext, QString & theParent, QString & } - - +static HELLOGUI aGUI(""); extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - { - return HELLOGUI::OnGUIEvent(theCommandID, parent); - } - - - bool SetSettings ( QAD_Desktop* parent ) - { - return HELLOGUI::SetSettings( parent ); - } - - bool customPopup ( QAD_Desktop* parent, - QPopupMenu* popup, - const QString & theContext, - const QString & theParent, - const QString & theObject ) - { - return HELLOGUI::CustomPopup( parent, popup, theContext, - theParent, theObject ); - } - - void definePopup ( QString & theContext, QString & theParent, QString & theObject ) - { - HELLOGUI::DefinePopup( theContext, theParent, theObject ); - } - - bool activeStudyChanged ( QAD_Desktop* parent ) - { - HELLOGUI::ActiveStudyChanged( parent ); + Standard_EXPORT SALOMEGUI* GetComponentGUI() { + return &aGUI; } } diff --git a/src/HELLOGUI/HELLOGUI.h b/src/HELLOGUI/HELLOGUI.h index 577ca5f..2559c9d 100644 --- a/src/HELLOGUI/HELLOGUI.h +++ b/src/HELLOGUI/HELLOGUI.h @@ -4,6 +4,7 @@ #ifndef _HELLOGUI_H_ #define _HELLOGUI_H_ +#include "SALOMEGUI.h" #include "QAD_Desktop.h" #include @@ -11,25 +12,26 @@ -class HELLOGUI: public QObject +class HELLOGUI: public SALOMEGUI { Q_OBJECT public: + HELLOGUI( const QString& name = "", QObject* parent = 0 ); - static bool OnGUIEvent (int theCommandID, QAD_Desktop* parent); + virtual bool OnGUIEvent (int theCommandID, QAD_Desktop* parent); - static bool SetSettings (QAD_Desktop* parent); + virtual bool SetSettings (QAD_Desktop* parent); - static bool CustomPopup ( QAD_Desktop* parent, + virtual bool CustomPopup ( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext, const QString & theParent, const QString & theObject); - static void DefinePopup(QString & theContext, QString & theParent, QString & theObject); + virtual void DefinePopup(QString & theContext, QString & theParent, QString & theObject); - static void ActiveStudyChanged ( QAD_Desktop* parent ); + virtual bool ActiveStudyChanged ( QAD_Desktop* parent ); static HELLO_ORB::HELLO_Gen_ptr InitHELLOGen(QAD_Desktop* parent); -- 2.39.2