]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Add a end-user tools (folder tools/dlgfactory) for bootstraping a Qt dialog box.
authorboulant <boulant>
Wed, 26 Oct 2011 13:31:30 +0000 (13:31 +0000)
committerboulant <boulant>
Wed, 26 Oct 2011 13:31:30 +0000 (13:31 +0000)
16 files changed:
Makefile.am
configure.ac
tools/dlgfactory/GenericDialog.cxx [new file with mode: 0644]
tools/dlgfactory/GenericDialog.hxx [new file with mode: 0644]
tools/dlgfactory/GenericDialog.ui [new file with mode: 0644]
tools/dlgfactory/Makefile.am [new file with mode: 0644]
tools/dlgfactory/README.txt [new file with mode: 0644]
tools/dlgfactory/__GDIALOG__.cxx [new file with mode: 0644]
tools/dlgfactory/__GDIALOG__.hxx [new file with mode: 0644]
tools/dlgfactory/__GDIALOG__.ui [new file with mode: 0644]
tools/dlgfactory/__QDIALOG__.cxx [new file with mode: 0644]
tools/dlgfactory/__QDIALOG__.hxx [new file with mode: 0644]
tools/dlgfactory/__QDIALOG__.ui [new file with mode: 0644]
tools/dlgfactory/dlgfactory.sh [new file with mode: 0755]
tools/dlgfactory/gtester.cxx [new file with mode: 0644]
tools/dlgfactory/qtester.cxx [new file with mode: 0644]

index ed1a9c0042e82e1d6b5091c76e0f4670dd98855b..567f59f1fbd5f27016286c3f079e9e45b0ce186f 100644 (file)
@@ -35,7 +35,7 @@ else !GUI_ENABLE_CORBA
     IDLDIR =
 endif
 
-SUBDIRS = $(IDLDIR) adm_local resources src doc bin 
+SUBDIRS = $(IDLDIR) adm_local resources src doc bin tools/dlgfactory
 
 DIST_SUBDIRS = idl adm_local resources src doc bin 
 
index b475a8b5887fd1aadcf0352423794de431444418..4a3d6143b4dd20ff678d86f9a26d5d50c1ab2e29 100644 (file)
@@ -671,5 +671,6 @@ AC_OUTPUT([ \
   src/GUI_PY/Makefile \
   resources/Makefile \
   idl/Makefile \
+  tools/dlgfactory/Makefile \
   Makefile
 ])
diff --git a/tools/dlgfactory/GenericDialog.cxx b/tools/dlgfactory/GenericDialog.cxx
new file mode 100644 (file)
index 0000000..9b84566
--- /dev/null
@@ -0,0 +1,29 @@
+#include "GenericDialog.hxx"
+
+GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent)
+{
+  ui.setupUi(this); // A faire en premier
+  
+  /*
+    Personnalisez vos widgets ici si nécessaire
+    Réalisez des connexions supplémentaires entre signaux et slots
+  */
+  
+  // The slots accept() and reject() are already connected to the
+  // buttonbox (inherited features) 
+}
+
+QFrame * GenericDialog::getPanel() {
+  return ui.centralPanel;
+}
+
+QDialogButtonBox * GenericDialog::getButtonBox() {
+  return ui.buttonBox;
+}
+
+
+#include <QDebug>
+void GenericDialog::accept() {
+  qDebug() << "accept() is not implemented yet";
+  QDialog::accept();
+}
diff --git a/tools/dlgfactory/GenericDialog.hxx b/tools/dlgfactory/GenericDialog.hxx
new file mode 100644 (file)
index 0000000..ee94661
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef _GenericDialog_HXX
+#define _GenericDialog_HXX
+
+#include <QtGui>
+#include "ui_GenericDialog.hxx"
+
+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.ui b/tools/dlgfactory/GenericDialog.ui
new file mode 100644 (file)
index 0000000..1fe7ae9
--- /dev/null
@@ -0,0 +1,89 @@
+<ui version="4.0" >
+ <class>GenericDialog</class>
+ <widget class="QDialog" name="GenericDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Dialog</string>
+  </property>
+  <layout class="QHBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QVBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QFrame" name="centralPanel" >
+       <property name="frameShape" >
+        <enum>QFrame::StyledPanel</enum>
+       </property>
+       <property name="frameShadow" >
+        <enum>QFrame::Raised</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons" >
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>GenericDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>GenericDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/tools/dlgfactory/Makefile.am b/tools/dlgfactory/Makefile.am
new file mode 100644 (file)
index 0000000..ecf7875
--- /dev/null
@@ -0,0 +1,92 @@
+#  Copyright (C) 2010  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# -* Makefile *- 
+#
+# Author : Guillaume Boulant (EDF/R&D) 
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# moc-files generation
+%_moc.cxx: %.hxx
+       $(MOC) $< -o $@
+
+# Qt form files generation (using UIC)
+ui_%.hxx: %.ui
+       $(UIC) -o $@ $<
+
+UIC_FILES_QDIALOG = \
+       ui_QDialogTest.hxx
+
+# MOC pre-processing
+MOC_FILES_QDIALOG = \
+       QDialogTest_moc.cxx
+
+BUILT_SOURCES = $(UIC_FILES_QDIALOG) $(UIC_FILES_GDIALOG)
+
+mostlyclean-local:
+       rm -f @builddir@/*_moc.cxx @builddir@/ui_*.hxx
+       rm @builddir@/QDialogTest*
+       rm @builddir@/GDialogTest*
+
+QDialogTest.ui: __QDIALOG__.ui __QDIALOG__.hxx __QDIALOG__.cxx dlgfactory.sh
+       $(srcdir)/dlgfactory.sh -n QDialogTest -t qdialog
+
+GDialogTest.ui: __GDIALOG__.ui __GDIALOG__.hxx __GDIALOG__.cxx dlgfactory.sh
+       $(srcdir)/dlgfactory.sh -n GDialogTest -t gdialog
+
+
+QT_CXXFLAGS=@QT_INCLUDES@ @QT_MT_INCLUDES@
+QT_LIBS=@QT_LIBS@
+
+# Program targets
+bin_PROGRAMS = qtester gtester
+
+# QDialog tester
+qtester_SOURCES = \
+        qtester.cxx \
+       QDialogTest.cxx \
+       $(MOC_FILES_QDIALOG) $(UIC_FILES_QDIALOG)
+
+qtester_CPPFLAGS = \
+       $(QT_CXXFLAGS)
+
+qtester_LDFLAGS = \
+        $(QT_LIBS)
+
+
+# GDialog tester
+MOC_FILES_GDIALOG= \
+       GenericDialog_moc.cxx \
+       GDialogTest_moc.cxx
+
+UIC_FILES_GDIALOG= \
+       ui_GenericDialog.hxx \
+       ui_GDialogTest.hxx
+
+gtester_SOURCES = \
+       gtester.cxx \
+       GenericDialog.cxx \
+       GDialogTest.cxx \
+       $(MOC_FILES_GDIALOG) $(UIC_FILES_GDIALOG)
+
+gtester_CPPFLAGS = \
+       $(QT_CXXFLAGS)
+
+gtester_LDFLAGS = \
+        $(QT_LIBS)
diff --git a/tools/dlgfactory/README.txt b/tools/dlgfactory/README.txt
new file mode 100644 (file)
index 0000000..1ddca16
--- /dev/null
@@ -0,0 +1,12 @@
+This package provides a simple tool to generates the bootstrap files
+of a standard Qt dialog. Nothing original neither very smart, but just
+help to initiate all this stuff the good way.
+
+See the header of the script dlgfactory.sh for details.
+
+Some use cases (basic unit test) are given in the files qtester.cxx
+and gtester.cxx. The build procedure (when you type make) create test
+classes called QDialogTest and GDialogTest and used respectively in
+qtester and gtester.
+
+(gboulant - 26 oct. 2011)
diff --git a/tools/dlgfactory/__GDIALOG__.cxx b/tools/dlgfactory/__GDIALOG__.cxx
new file mode 100644 (file)
index 0000000..705c721
--- /dev/null
@@ -0,0 +1,6 @@
+#include "__CLASSNAME__.hxx"
+
+__CLASSNAME__::__CLASSNAME__(QDialog *parent) : GenericDialog(parent)
+{
+  ui.setupUi(this->getPanel());
+}
diff --git a/tools/dlgfactory/__GDIALOG__.hxx b/tools/dlgfactory/__GDIALOG__.hxx
new file mode 100644 (file)
index 0000000..ab805a1
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef ___CLASSNAME___HXX
+#define ___CLASSNAME___HXX
+
+#include <QtGui>
+#include "ui___CLASSNAME__.hxx"
+#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__.ui b/tools/dlgfactory/__GDIALOG__.ui
new file mode 100644 (file)
index 0000000..7f5c27d
--- /dev/null
@@ -0,0 +1,99 @@
+<ui version="4.0" >
+ <class>__CLASSNAME__</class>
+ <widget class="QWidget" name="__CLASSNAME__" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>340</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QVBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QVBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QLabel" name="label" >
+           <property name="text" >
+            <string>Pression :</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_2" >
+           <property name="text" >
+            <string>Température :</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QLineEdit" name="lineEdit" />
+         </item>
+         <item>
+          <widget class="QLineEdit" name="lineEdit_2" />
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>20</width>
+         <height>121</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tools/dlgfactory/__QDIALOG__.cxx b/tools/dlgfactory/__QDIALOG__.cxx
new file mode 100644 (file)
index 0000000..32134c3
--- /dev/null
@@ -0,0 +1,20 @@
+#include "__CLASSNAME__.hxx"
+
+__CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent)
+{
+  ui.setupUi(this); // A faire en premier
+  
+  /*
+    Personnalisez vos widgets ici si nécessaire
+    Réalisez des connexions supplémentaires entre signaux et slots
+  */
+  
+  // The slots accept() and reject() are already connected to the
+  // buttonbox (inherited features) 
+}
+
+#include <QDebug>
+void __CLASSNAME__::accept() {
+  qDebug() << "accept() is not implemented yet";
+  QDialog::accept();
+}
diff --git a/tools/dlgfactory/__QDIALOG__.hxx b/tools/dlgfactory/__QDIALOG__.hxx
new file mode 100644 (file)
index 0000000..3865e17
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef ___CLASSNAME___HXX
+#define ___CLASSNAME___HXX
+
+#include <QtGui>
+#include "ui___CLASSNAME__.hxx"
+
+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__.ui b/tools/dlgfactory/__QDIALOG__.ui
new file mode 100644 (file)
index 0000000..88cf24d
--- /dev/null
@@ -0,0 +1,67 @@
+<ui version="4.0" >
+ <class>__CLASSNAME__</class>
+ <widget class="QDialog" name="__CLASSNAME__" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Dialog</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox" >
+   <property name="geometry" >
+    <rect>
+     <x>30</x>
+     <y>240</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation" >
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons" >
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>__CLASSNAME__</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>__CLASSNAME__</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/tools/dlgfactory/dlgfactory.sh b/tools/dlgfactory/dlgfactory.sh
new file mode 100755 (executable)
index 0000000..0cbc4ca
--- /dev/null
@@ -0,0 +1,137 @@
+#!/bin/sh
+#
+# ==================================================================
+#_debut_usage
+#
+# USAGE:
+#
+#      dlgfactory.sh -n className [-t classType]
+#
+#
+# DESCRIPTION:
+#
+# This script generates a set of files to initiate a dialog qt window
+# (i.e. MyDialog.ui, MyDialog.hxx 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
+# GenericDialog whose implementation is provided in this package and
+# whose design is defined by the GenericDialog.ui file (editable using
+# the qt designer).
+#
+# The -t option let you choose between the two possibilities (specify
+# "-t qdialog" for the first case, "-t gdialog" otherwise).
+#
+# OPTION:
+#          -n : specify the name of the class (default is TestDialog)
+#
+#          -t : specify the type of the class (default is qdialog)
+#
+#_fin_usage
+# ==================================================================
+#
+
+thisScript=$(which $0)
+TOOLDIRNAME=$(dirname $0)
+
+displayUsage()
+{
+  cat $thisScript | sed -e '/^#_debut_usage/,/^#_fin_usage/!d' \
+   -e '/^#_debut_usage/d' \
+   -e '/^#_fin_usage/d' \
+   -e 's/^#//g'
+}
+
+#
+# Read the options on the command line
+#
+className=TestDialog
+classType=dialog
+if [ $# -eq 0 ]; then
+    displayUsage
+    exit 1
+else
+    while [ $# -ne 0 ]; do
+        case $1 in
+            -n)
+                shift; className=$1; shift ;;
+            -t)
+                shift; classType=$1; shift ;;
+            *)
+                displayUsage;;
+        esac
+    done
+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__.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__.cxx > $className.cxx    
+fi
+
+displayMessage()
+{
+  cat $thisScript | sed -e '/^#_debut_message/,/^#_fin_message/!d' \
+   -e '/^#_debut_message/d' \
+   -e '/^#_fin_message/d' \
+   -e 's/^#//g' \
+   -e "s/__CLASSNAME__/$className/g"
+}
+
+#_debut_message
+##
+## ---------------------------------------------------------
+## Generation rules to create moc files from QObject headers
+## and form source files from ui files
+## ---------------------------------------------------------
+##
+#%_moc.cxx: %.hxx
+#      $(MOC) $< -o $@
+#
+#ui_%.hxx: %.ui
+#      $(UIC) -o $@ $<
+#
+##
+## ---------------------------------------------------------
+## Declaration of form files generated by UIC and MOC files
+## as BUILT_SOURCES to be used in the building process.
+## ---------------------------------------------------------
+##
+#UIC_FILES = \
+#      ui___CLASSNAME__.hxx
+##
+#MOC_FILES = \
+#      __CLASSNAME___moc.cxx
+#
+#BUILT_SOURCES = $(UIC_FILES)
+#
+##
+## ---------------------------------------------------------
+## Declaration of sources files to the building process
+## ---------------------------------------------------------
+## MOC files and UIC files should be added to the list of undistributed
+## source files with something like (where <MyLibrary> should be
+## replaced by the name of the product declared by the directive
+## lib_LTLIBRARIES):
+##
+#nodist_<MyLibrary>_la_SOURCES += $(MOC_FILES) $(UIC_FILES)
+#
+#dist_<MyLibrary>_la_SOURCES += __CLASSNAME__.cxx
+#salomeinclude_HEADERS       += __CLASSNAME__.hxx
+#
+#<MyLibrary>_la_CPPFLAGS = \
+#      $(QT_CXXFLAGS)
+#
+#<MyLibrary>_la_LDFLAGS = \
+#        $(QT_LIBS)
+
+#_fin_message
+
+echo "Note that the following directives should be present in your Makefile.am (or something like that):"
+echo ""
+displayMessage
+
diff --git a/tools/dlgfactory/gtester.cxx b/tools/dlgfactory/gtester.cxx
new file mode 100644 (file)
index 0000000..ed0fc68
--- /dev/null
@@ -0,0 +1,21 @@
+//
+// This program can be used for unit test of dialog box.
+// You just have to include the interface file (*.h) and
+// use the dialog class as illustrated in the functions TEST_*.
+// (gboulant - 12/10/2010)
+//
+#include <QApplication>
+#include <QtGui>
+#include "GDialogTest.hxx"
+
+void TEST_show() {
+  GDialogTest * dialog = new GDialogTest();
+  dialog->show();
+}
+
+int main(int argc, char *argv[])
+{
+  QApplication app(argc, argv);
+  TEST_show();
+  return app.exec();   
+}
diff --git a/tools/dlgfactory/qtester.cxx b/tools/dlgfactory/qtester.cxx
new file mode 100644 (file)
index 0000000..19174b7
--- /dev/null
@@ -0,0 +1,21 @@
+//
+// This program can be used for unit test of dialog box.
+// You just have to include the interface file (*.h) and
+// use the dialog class as illustrated in the functions TEST_*.
+// (gboulant - 12/10/2010)
+//
+#include <QApplication>
+#include <QtGui>
+#include "QDialogTest.hxx"
+
+void TEST_show() {
+  QDialogTest * dialog = new QDialogTest();
+  dialog->show();
+}
+
+int main(int argc, char *argv[])
+{
+  QApplication app(argc, argv);
+  TEST_show();
+  return app.exec();   
+}