From 9b460181130e042cb1e5c7a01991b12066bea2e7 Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 14 Feb 2013 10:14:31 +0000 Subject: [PATCH] Another fix after previous integration: the .hxx files are renamed .h files (to be coherent with other libs). --- tools/dlgfactory/CMakeLists.txt | 10 +++++----- tools/dlgfactory/GenericDialog.cxx | 2 +- .../{GenericDialog.hxx => GenericDialog.h} | 0 tools/dlgfactory/Makefile.am | 14 +++++--------- tools/dlgfactory/__GDIALOG__.cxx | 2 +- .../dlgfactory/{__GDIALOG__.hxx => __GDIALOG__.h} | 0 tools/dlgfactory/__QDIALOG__.cxx | 2 +- .../dlgfactory/{__QDIALOG__.hxx => __QDIALOG__.h} | 0 tools/dlgfactory/dlgfactory.py | 12 ++++++------ tools/dlgfactory/dlgfactory.sh | 14 +++++++------- tools/dlgfactory/gtester.cxx | 2 +- tools/dlgfactory/qtester.cxx | 2 +- 12 files changed, 28 insertions(+), 32 deletions(-) rename tools/dlgfactory/{GenericDialog.hxx => GenericDialog.h} (100%) rename tools/dlgfactory/{__GDIALOG__.hxx => __GDIALOG__.h} (100%) rename tools/dlgfactory/{__QDIALOG__.hxx => __QDIALOG__.h} (100%) 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.hxx b/tools/dlgfactory/GenericDialog.h similarity index 100% rename from tools/dlgfactory/GenericDialog.hxx rename to tools/dlgfactory/GenericDialog.h 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__.hxx b/tools/dlgfactory/__GDIALOG__.h similarity index 100% rename from tools/dlgfactory/__GDIALOG__.hxx rename to tools/dlgfactory/__GDIALOG__.h 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__.hxx b/tools/dlgfactory/__QDIALOG__.h similarity index 100% rename from tools/dlgfactory/__QDIALOG__.hxx rename to tools/dlgfactory/__QDIALOG__.h 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(); -- 2.39.2