From: gdd Date: Thu, 14 Feb 2013 10:14:31 +0000 (+0000) Subject: Another fix after previous integration: the .hxx files are renamed .h files (to be... X-Git-Tag: V6_main_FINAL~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b460181130e042cb1e5c7a01991b12066bea2e7;p=modules%2Fgui.git Another fix after previous integration: the .hxx files are renamed .h files (to be coherent with other libs). --- diff --git a/tools/dlgfactory/CMakeLists.txt b/tools/dlgfactory/CMakeLists.txt index 2821d4d37..7df07c799 100755 --- a/tools/dlgfactory/CMakeLists.txt +++ b/tools/dlgfactory/CMakeLists.txt @@ -28,7 +28,7 @@ SET(qtester_SOURCES ) SET(qtester_HEADERS - ${CMAKE_CURRENT_BINARY_DIR}/QDialogTest.hxx + ${CMAKE_CURRENT_BINARY_DIR}/QDialogTest.h ) SET(qtester_FORMS @@ -41,7 +41,7 @@ SET(gtester_SOURCES ) SET(gtester_HEADERS - ${CMAKE_CURRENT_BINARY_DIR}/GDialogTest.hxx + ${CMAKE_CURRENT_BINARY_DIR}/GDialogTest.h ) SET(gtester_FORMS @@ -49,7 +49,7 @@ SET(gtester_FORMS ) SET(GenericDialog_HEADERS - GenericDialog.hxx + GenericDialog.h ) SET(GenericDialog_FORMS @@ -58,11 +58,11 @@ SET(GenericDialog_FORMS ADD_DEFINITIONS(${QT_DEFINITIONS}) -ADD_CUSTOM_COMMAND( OUTPUT QDialogTest.cxx QDialogTest.hxx QDialogTest.ui +ADD_CUSTOM_COMMAND( OUTPUT QDialogTest.cxx QDialogTest.h QDialogTest.ui COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n QDialogTest -t qdialog ) -ADD_CUSTOM_COMMAND( OUTPUT GDialogTest.cxx GDialogTest.hxx GDialogTest.ui +ADD_CUSTOM_COMMAND( OUTPUT GDialogTest.cxx GDialogTest.h GDialogTest.ui COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n GDialogTest -t gdialog ) diff --git a/tools/dlgfactory/GenericDialog.cxx b/tools/dlgfactory/GenericDialog.cxx index 9b8456674..9c336f492 100644 --- a/tools/dlgfactory/GenericDialog.cxx +++ b/tools/dlgfactory/GenericDialog.cxx @@ -1,4 +1,4 @@ -#include "GenericDialog.hxx" +#include "GenericDialog.h" GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent) { diff --git a/tools/dlgfactory/GenericDialog.h b/tools/dlgfactory/GenericDialog.h new file mode 100644 index 000000000..1c9d7ea69 --- /dev/null +++ b/tools/dlgfactory/GenericDialog.h @@ -0,0 +1,27 @@ +#ifndef _GenericDialog_HXX +#define _GenericDialog_HXX + +#include +#include "ui_GenericDialog.h" + +class GenericDialog : public QDialog +{ + Q_OBJECT + +public: + GenericDialog(QDialog *parent = 0); + + protected: + QFrame * getPanel(); + QDialogButtonBox * getButtonBox(); + + protected slots: + void accept(); + //void reject(); + + private: + Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h +}; + + +#endif // _GenericDialog_HXX diff --git a/tools/dlgfactory/GenericDialog.hxx b/tools/dlgfactory/GenericDialog.hxx deleted file mode 100644 index 1c9d7ea69..000000000 --- a/tools/dlgfactory/GenericDialog.hxx +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _GenericDialog_HXX -#define _GenericDialog_HXX - -#include -#include "ui_GenericDialog.h" - -class GenericDialog : public QDialog -{ - Q_OBJECT - -public: - GenericDialog(QDialog *parent = 0); - - protected: - QFrame * getPanel(); - QDialogButtonBox * getButtonBox(); - - protected slots: - void accept(); - //void reject(); - - private: - Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h -}; - - -#endif // _GenericDialog_HXX diff --git a/tools/dlgfactory/Makefile.am b/tools/dlgfactory/Makefile.am index 70b1c5b30..b7090df21 100644 --- a/tools/dlgfactory/Makefile.am +++ b/tools/dlgfactory/Makefile.am @@ -20,10 +20,6 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am -# meta object implementation files generation (moc) -%_moc.cxx: %.hxx - $(MOC) $(MOC_FLAGS) $< -o $@ - # Program targets bin_PROGRAMS = qtester gtester @@ -45,10 +41,10 @@ MOC_FILES_GDIALOG= \ GenericDialog_moc.cxx \ GDialogTest_moc.cxx -QDIALOG_TEMPLATES = __QDIALOG__.ui __QDIALOG__.hxx __QDIALOG__.cxx -GDIALOG_TEMPLATES = __GDIALOG__.ui __GDIALOG__.hxx __GDIALOG__.cxx -QDIALOG_FILES = QDialogTest.hxx QDialogTest.cxx QDialogTest.ui -GDIALOG_FILES = GDialogTest.hxx GDialogTest.cxx GDialogTest.ui +QDIALOG_TEMPLATES = __QDIALOG__.ui __QDIALOG__.h __QDIALOG__.cxx +GDIALOG_TEMPLATES = __GDIALOG__.ui __GDIALOG__.h __GDIALOG__.cxx +QDIALOG_FILES = QDialogTest.h QDialogTest.cxx QDialogTest.ui +GDIALOG_FILES = GDialogTest.h GDialogTest.cxx GDialogTest.ui # generated sources BUILT_SOURCES = $(UIC_FILES_QDIALOG) $(UIC_FILES_GDIALOG) @@ -86,7 +82,7 @@ qtester_LDFLAGS = \ gtester_SOURCES = \ gtester.cxx \ - GenericDialog.hxx \ + GenericDialog.h \ GenericDialog.cxx nodist_gtester_SOURCES = \ GDialogTest.cxx \ diff --git a/tools/dlgfactory/__GDIALOG__.cxx b/tools/dlgfactory/__GDIALOG__.cxx index 705c7213f..14dc63ac0 100644 --- a/tools/dlgfactory/__GDIALOG__.cxx +++ b/tools/dlgfactory/__GDIALOG__.cxx @@ -1,4 +1,4 @@ -#include "__CLASSNAME__.hxx" +#include "__CLASSNAME__.h" __CLASSNAME__::__CLASSNAME__(QDialog *parent) : GenericDialog(parent) { diff --git a/tools/dlgfactory/__GDIALOG__.h b/tools/dlgfactory/__GDIALOG__.h new file mode 100644 index 000000000..ed1547079 --- /dev/null +++ b/tools/dlgfactory/__GDIALOG__.h @@ -0,0 +1,20 @@ +#ifndef ___CLASSNAME___HXX +#define ___CLASSNAME___HXX + +#include +#include "ui___CLASSNAME__.h" +#include "GenericDialog.hxx" + +class __CLASSNAME__ : public GenericDialog +{ + Q_OBJECT + + public: + __CLASSNAME__(QDialog *parent = 0); + + private: + Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx +}; + + +#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/__GDIALOG__.hxx b/tools/dlgfactory/__GDIALOG__.hxx deleted file mode 100644 index ed1547079..000000000 --- a/tools/dlgfactory/__GDIALOG__.hxx +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ___CLASSNAME___HXX -#define ___CLASSNAME___HXX - -#include -#include "ui___CLASSNAME__.h" -#include "GenericDialog.hxx" - -class __CLASSNAME__ : public GenericDialog -{ - Q_OBJECT - - public: - __CLASSNAME__(QDialog *parent = 0); - - private: - Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx -}; - - -#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/__QDIALOG__.cxx b/tools/dlgfactory/__QDIALOG__.cxx index 32134c395..97f1fadd4 100644 --- a/tools/dlgfactory/__QDIALOG__.cxx +++ b/tools/dlgfactory/__QDIALOG__.cxx @@ -1,4 +1,4 @@ -#include "__CLASSNAME__.hxx" +#include "__CLASSNAME__.h" __CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent) { diff --git a/tools/dlgfactory/__QDIALOG__.h b/tools/dlgfactory/__QDIALOG__.h new file mode 100644 index 000000000..b2cfd4f7f --- /dev/null +++ b/tools/dlgfactory/__QDIALOG__.h @@ -0,0 +1,23 @@ +#ifndef ___CLASSNAME___HXX +#define ___CLASSNAME___HXX + +#include +#include "ui___CLASSNAME__.h" + +class __CLASSNAME__ : public QDialog +{ + Q_OBJECT + + public: + __CLASSNAME__(QDialog *parent = 0); + + protected slots: + void accept(); + //void reject(); + + private: + Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx +}; + + +#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/__QDIALOG__.hxx b/tools/dlgfactory/__QDIALOG__.hxx deleted file mode 100644 index b2cfd4f7f..000000000 --- a/tools/dlgfactory/__QDIALOG__.hxx +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef ___CLASSNAME___HXX -#define ___CLASSNAME___HXX - -#include -#include "ui___CLASSNAME__.h" - -class __CLASSNAME__ : public QDialog -{ - Q_OBJECT - - public: - __CLASSNAME__(QDialog *parent = 0); - - protected slots: - void accept(); - //void reject(); - - private: - Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx -}; - - -#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/dlgfactory.py b/tools/dlgfactory/dlgfactory.py index 5eca0eea4..8f3c57b96 100755 --- a/tools/dlgfactory/dlgfactory.py +++ b/tools/dlgfactory/dlgfactory.py @@ -22,7 +22,7 @@ import sys, os __descr_str = "" __descr_str += "This script generates a set of files to initiate a dialog Qt window " -__descr_str += "(i.e. MyDialog.ui, MyDialog.hxx and MyDialog.cxx files). " +__descr_str += "(i.e. MyDialog.ui, MyDialog.h and MyDialog.cxx files). " __descr_str += "The dialog window can be a self-consistent class (i.e. depends only " __descr_str += "on Qt classes) or a class that inherits class GenericDialog " __descr_str += "which implementation is provided in this package and " @@ -38,10 +38,10 @@ __msg_str = """ # and form source files from ui files # --------------------------------------------------------- -%_moc.cxx: %.hxx +%_moc.cxx: %.h $(MOC) $< -o $@ -ui_%.hxx: %.ui +ui_%.h: %.ui $(UIC) -o $@ $< @@ -51,7 +51,7 @@ ui_%.hxx: %.ui # --------------------------------------------------------- # UIC_FILES = \ - ui___CLASSNAME__.hxx + ui___CLASSNAME__.h # MOC_FILES = \ __CLASSNAME___moc.cxx @@ -70,7 +70,7 @@ BUILT_SOURCES = $(UIC_FILES) nodist__la_SOURCES += $(MOC_FILES) $(UIC_FILES) dist__la_SOURCES += __CLASSNAME__.cxx -salomeinclude_HEADERS += __CLASSNAME__.hxx +salomeinclude_HEADERS += __CLASSNAME__.h _la_CPPFLAGS = \\ $(QT_CXXFLAGS) @@ -100,7 +100,7 @@ if __name__ == "__main__": className = options.className classType = options.classType - for ext in [".cxx", ".hxx", ".ui"]: + for ext in [".cxx", ".h", ".ui"]: file_dest = className + ext if classType == "qdialog": file_src = os.path.join( tool_path, "__QDIALOG__" + ext ) diff --git a/tools/dlgfactory/dlgfactory.sh b/tools/dlgfactory/dlgfactory.sh index 0f127d515..0e17ae81f 100755 --- a/tools/dlgfactory/dlgfactory.sh +++ b/tools/dlgfactory/dlgfactory.sh @@ -29,7 +29,7 @@ # DESCRIPTION: # # This script generates a set of files to initiate a dialog qt window -# (i.e. MyDialog.ui, MyDialog.hxx and MyDialog.cxx files). +# (i.e. MyDialog.ui, MyDialog.h and MyDialog.cxx files). # # The dialog window can be a self-consistent class (i.e. depends only # on Qt classes) or a classe that inherits from the class @@ -83,11 +83,11 @@ fi if [ "$classType" = "qdialog" ]; then sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.ui > $className.ui - sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.hxx > $className.hxx + sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.h > $className.h sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.cxx > $className.cxx else sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.ui > $className.ui - sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.hxx > $className.hxx + sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.h > $className.h sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.cxx > $className.cxx fi @@ -107,10 +107,10 @@ displayMessage() ## and form source files from ui files ## --------------------------------------------------------- ## -#%_moc.cxx: %.hxx +#%_moc.cxx: %.h # $(MOC) $< -o $@ # -#ui_%.hxx: %.ui +#ui_%.h: %.ui # $(UIC) -o $@ $< # ## @@ -120,7 +120,7 @@ displayMessage() ## --------------------------------------------------------- ## #UIC_FILES = \ -# ui___CLASSNAME__.hxx +# ui___CLASSNAME__.h ## #MOC_FILES = \ # __CLASSNAME___moc.cxx @@ -139,7 +139,7 @@ displayMessage() #nodist__la_SOURCES += $(MOC_FILES) $(UIC_FILES) # #dist__la_SOURCES += __CLASSNAME__.cxx -#salomeinclude_HEADERS += __CLASSNAME__.hxx +#salomeinclude_HEADERS += __CLASSNAME__.h # #_la_CPPFLAGS = \ # $(QT_CXXFLAGS) diff --git a/tools/dlgfactory/gtester.cxx b/tools/dlgfactory/gtester.cxx index 0f636c240..aec951ad3 100644 --- a/tools/dlgfactory/gtester.cxx +++ b/tools/dlgfactory/gtester.cxx @@ -23,7 +23,7 @@ // #include #include -#include "GDialogTest.hxx" +#include "GDialogTest.h" void TEST_show() { GDialogTest * dialog = new GDialogTest(); diff --git a/tools/dlgfactory/qtester.cxx b/tools/dlgfactory/qtester.cxx index eeb15e5fd..dbb294352 100644 --- a/tools/dlgfactory/qtester.cxx +++ b/tools/dlgfactory/qtester.cxx @@ -23,7 +23,7 @@ // #include #include -#include "QDialogTest.hxx" +#include "QDialogTest.h" void TEST_show() { QDialogTest * dialog = new QDialogTest();