[opengtl-commits] [460] import GTLDesigner

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 460
Author:   cyrille
Date:     2008-11-03 19:58:10 +0100 (Mon, 03 Nov 2008)

Log Message:
-----------
import GTLDesigner

Added Paths:
-----------
    trunk/CMakeLists.txt
    trunk/GTLDesigner.kdevelop
    trunk/GTLDesigner.kdevelop.filelist
    trunk/GTLDesigner.kdevelop.pcs
    trunk/GTLDesigner.kdevses
    trunk/README
    trunk/cmake/
    trunk/cmake/modules/
    trunk/cmake/modules/FindOpenCTL.cmake
    trunk/cmake/modules/FindOpenShiva.cmake
    trunk/doc/
    trunk/doc/CMakeLists.txt
    trunk/doc/index.cache.bz2
    trunk/doc/index.docbook
    trunk/icons/
    trunk/icons/CMakeLists.txt
    trunk/icons/hi16-app-gtldesigner.png
    trunk/icons/hi32-app-gtldesigner.png
    trunk/icons/hi48-app-gtldesigner.png
    trunk/src/
    trunk/src/CMakeLists.txt
    trunk/src/ImageViewer.cpp
    trunk/src/ImageViewer.h
    trunk/src/Messages.sh
    trunk/src/QtGTL.h
    trunk/src/gtldesigner.cpp
    trunk/src/gtldesigner.desktop
    trunk/src/gtldesigner.h
    trunk/src/gtldesigner.kcfg
    trunk/src/gtldesignerui.rc
    trunk/src/gtldesignerview.cpp
    trunk/src/gtldesignerview.h
    trunk/src/gtldesignerview_base.ui
    trunk/src/main.cpp
    trunk/src/prefs_base.ui
    trunk/src/settings.kcfgc


Added: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	                        (rev 0)
+++ trunk/CMakeLists.txt	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,14 @@
+set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
+
+project(gtldesigner)
+
+find_package(OpenCTL REQUIRED)
+find_package(OpenShiva REQUIRED)
+find_package(KDE4 REQUIRED)
+include (KDE4Defaults)
+
+include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} )
+
+add_subdirectory( doc )
+add_subdirectory( src )
+add_subdirectory( icons )

Added: trunk/GTLDesigner.kdevelop
===================================================================
--- trunk/GTLDesigner.kdevelop	                        (rev 0)
+++ trunk/GTLDesigner.kdevelop	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,221 @@
+<?xml version = '1.0'?>
+<kdevelop>
+  <general>
+    <author>Cyrille Berger</author>
+    <email>cberger@xxxxxxxxxxx</email>
+    <version>1</version>
+    <projectmanagement>KDevCustomProject</projectmanagement>
+    <primarylanguage>C++</primarylanguage>
+    <ignoreparts>
+      <part>kdevabbrev</part>
+      <part>kdevclassview</part>
+      <part>kdevsnippet</part>
+      <part>kdevdebugger</part>
+      <part>kdevdocumentation</part>
+      <part>kdevdoxygen</part>
+      <part>kdevfilegroups</part>
+      <part>kdevfilelist</part>
+      <part>kdevfileselector</part>
+      <part>kdevdistpart</part>
+      <part>kdevregexptest</part>
+      <part>kdevscripting</part>
+      <part>kdevfilter</part>
+      <part>kdevtexttools</part>
+      <part>kdevtools</part>
+      <part>kdevvalgrind</part>
+    </ignoreparts>
+    <projectname>GTLDesigner</projectname>
+    <projectdirectory>.</projectdirectory>
+    <absoluteprojectpath>false</absoluteprojectpath>
+    <description/>
+    <defaultencoding/>
+  </general>
+  <kdevcustomproject>
+    <run>
+      <directoryradio>executable</directoryradio>
+      <mainprogram>/home/cyrille/src/GTLDesigner/build-debug/src/gtldesigner</mainprogram>
+      <programargs/>
+      <globaldebugarguments/>
+      <globalcwd>/home/cyrille/src/GTLDesigner</globalcwd>
+      <useglobalprogram>false</useglobalprogram>
+      <terminal>false</terminal>
+      <autocompile>false</autocompile>
+      <autoinstall>false</autoinstall>
+      <autokdesu>false</autokdesu>
+      <envvars/>
+    </run>
+    <filetypes>
+      <filetype>*.java</filetype>
+      <filetype>*.h</filetype>
+      <filetype>*.H</filetype>
+      <filetype>*.hh</filetype>
+      <filetype>*.hxx</filetype>
+      <filetype>*.hpp</filetype>
+      <filetype>*.c</filetype>
+      <filetype>*.C</filetype>
+      <filetype>*.cc</filetype>
+      <filetype>*.cpp</filetype>
+      <filetype>*.c++</filetype>
+      <filetype>*.cxx</filetype>
+      <filetype>Makefile</filetype>
+      <filetype>CMakeLists.txt</filetype>
+    </filetypes>
+    <blacklist/>
+    <build>
+      <buildtool>make</buildtool>
+      <builddir>/home/cyrille/src/GTLDesigner/build-debug/</builddir>
+    </build>
+    <other>
+      <prio>0</prio>
+      <otherbin/>
+      <defaulttarget/>
+      <otheroptions/>
+      <selectedenvironment>default</selectedenvironment>
+      <environments>
+        <default/>
+      </environments>
+    </other>
+    <make>
+      <abortonerror>false</abortonerror>
+      <numberofjobs>0</numberofjobs>
+      <prio>0</prio>
+      <dontact>false</dontact>
+      <makebin/>
+      <defaulttarget>install</defaulttarget>
+      <makeoptions/>
+      <selectedenvironment>default</selectedenvironment>
+      <environments>
+        <default/>
+      </environments>
+    </make>
+    <general>
+      <activedir>src</activedir>
+    </general>
+  </kdevcustomproject>
+  <kdevdebugger>
+    <general>
+      <dbgshell/>
+    </general>
+  </kdevdebugger>
+  <kdevdoctreeview>
+    <ignoretocs>
+      <toc>ada</toc>
+      <toc>ada_bugs_gcc</toc>
+      <toc>bash</toc>
+      <toc>bash_bugs</toc>
+      <toc>clanlib</toc>
+      <toc>fortran_bugs_gcc</toc>
+      <toc>gnome1</toc>
+      <toc>gnustep</toc>
+      <toc>gtk</toc>
+      <toc>gtk_bugs</toc>
+      <toc>haskell</toc>
+      <toc>haskell_bugs_ghc</toc>
+      <toc>java_bugs_gcc</toc>
+      <toc>java_bugs_sun</toc>
+      <toc>kde2book</toc>
+      <toc>opengl</toc>
+      <toc>pascal_bugs_fp</toc>
+      <toc>php</toc>
+      <toc>php_bugs</toc>
+      <toc>perl</toc>
+      <toc>perl_bugs</toc>
+      <toc>python</toc>
+      <toc>python_bugs</toc>
+      <toc>qt-kdev3</toc>
+      <toc>ruby</toc>
+      <toc>ruby_bugs</toc>
+      <toc>sdl</toc>
+      <toc>sw</toc>
+      <toc>w3c-dom-level2-html</toc>
+      <toc>w3c-svg</toc>
+      <toc>w3c-uaag10</toc>
+      <toc>wxwidgets_bugs</toc>
+    </ignoretocs>
+    <ignoreqt_xml>
+      <toc>Guide to the Qt Translation Tools</toc>
+      <toc>Qt Assistant Manual</toc>
+      <toc>Qt Designer Manual</toc>
+      <toc>Qt Reference Documentation</toc>
+      <toc>qmake User Guide</toc>
+    </ignoreqt_xml>
+    <ignoredoxygen>
+      <toc>KDE Libraries (Doxygen)</toc>
+    </ignoredoxygen>
+  </kdevdoctreeview>
+  <kdevfilecreate>
+    <filetypes/>
+    <useglobaltypes>
+      <type ext="ui" />
+      <type ext="cpp" />
+      <type ext="h" />
+    </useglobaltypes>
+  </kdevfilecreate>
+  <kdevcppsupport>
+    <qt>
+      <used>false</used>
+      <version>3</version>
+      <includestyle>3</includestyle>
+      <root></root>
+      <designerintegration>EmbeddedKDevDesigner</designerintegration>
+      <qmake>/usr/bin/qmake</qmake>
+      <designer>/usr/bin/designer</designer>
+      <designerpluginpaths/>
+    </qt>
+    <codecompletion>
+      <automaticCodeCompletion>false</automaticCodeCompletion>
+      <automaticArgumentsHint>true</automaticArgumentsHint>
+      <automaticHeaderCompletion>true</automaticHeaderCompletion>
+      <codeCompletionDelay>250</codeCompletionDelay>
+      <argumentsHintDelay>400</argumentsHintDelay>
+      <headerCompletionDelay>250</headerCompletionDelay>
+      <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
+      <completionBoxItemOrder>0</completionBoxItemOrder>
+      <howEvaluationContextMenu>true</howEvaluationContextMenu>
+      <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
+      <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
+      <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
+      <processPrimaryTypes>true</processPrimaryTypes>
+      <processFunctionArguments>false</processFunctionArguments>
+      <preProcessAllHeaders>false</preProcessAllHeaders>
+      <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
+      <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
+      <alwaysParseInBackground>true</alwaysParseInBackground>
+      <usePermanentCaching>true</usePermanentCaching>
+      <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
+      <includePaths>.;</includePaths>
+    </codecompletion>
+    <creategettersetter>
+      <prefixGet/>
+      <prefixSet>set</prefixSet>
+      <prefixVariable>m_,_</prefixVariable>
+      <parameterName>theValue</parameterName>
+      <inlineGet>true</inlineGet>
+      <inlineSet>true</inlineSet>
+    </creategettersetter>
+    <splitheadersource>
+      <enabled>false</enabled>
+      <synchronize>true</synchronize>
+      <orientation>Vertical</orientation>
+    </splitheadersource>
+    <references>
+      <pcs>OpenCv</pcs>
+      <pcs>stdlib</pcs>
+      <pcs>Qt4</pcs>
+      <pcs>llvm</pcs>
+      <pcs>automatic_%2Fhome%2Fcyrille%2Fsrc%2Fkisab</pcs>
+    </references>
+  </kdevcppsupport>
+  <cppsupportpart>
+    <filetemplates>
+      <interfacesuffix>.h</interfacesuffix>
+      <implementationsuffix>.cpp</implementationsuffix>
+    </filetemplates>
+  </cppsupportpart>
+  <kdevfileview>
+    <tree>
+      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+    </tree>
+  </kdevfileview>
+</kdevelop>

Added: trunk/GTLDesigner.kdevelop.filelist
===================================================================
--- trunk/GTLDesigner.kdevelop.filelist	                        (rev 0)
+++ trunk/GTLDesigner.kdevelop.filelist	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,35 @@
+# KDevelop Custom Project File List
+CMakeLists.txt
+build-debug
+build-debug/CMakeFiles
+build-debug/CMakeFiles/CompilerIdC
+build-debug/CMakeFiles/CompilerIdC/CMakeCCompilerId.c
+build-debug/CMakeFiles/CompilerIdCXX
+build-debug/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp
+build-debug/CMakeTmp
+build-debug/CMakeTmp/check_qt_visibility.cpp
+build-debug/Makefile
+build-debug/doc
+build-debug/doc/Makefile
+build-debug/icons
+build-debug/icons/Makefile
+build-debug/src
+build-debug/src/Makefile
+build-debug/src/gtldesigner_automoc.cpp
+build-debug/src/settings.cpp
+build-debug/src/settings.h
+build-debug/src/ui_gtldesignerview_base.h
+build-debug/src/ui_prefs_base.h
+doc
+doc/CMakeLists.txt
+icons
+icons/CMakeLists.txt
+src
+src/CMakeLists.txt
+src/ImageViewer.cpp
+src/ImageViewer.h
+src/gtldesigner.cpp
+src/gtldesigner.h
+src/gtldesignerview.cpp
+src/gtldesignerview.h
+src/main.cpp

Added: trunk/GTLDesigner.kdevelop.pcs
===================================================================
(Binary files differ)


Property changes on: trunk/GTLDesigner.kdevelop.pcs
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/GTLDesigner.kdevses
===================================================================
--- trunk/GTLDesigner.kdevses	                        (rev 0)
+++ trunk/GTLDesigner.kdevses	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,39 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<!DOCTYPE KDevPrjSession>
+<KDevPrjSession>
+ <DocsAndViews NumberOfDocuments="8" >
+  <Doc0 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/gtldesigner.cpp" >
+   <View0 Encoding="" line="181" Type="Source" />
+  </Doc0>
+  <Doc1 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/gtldesigner.h" >
+   <View0 Encoding="" Type="Source" />
+  </Doc1>
+  <Doc2 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/gtldesignerui.rc" >
+   <View0 Encoding="" Type="Source" />
+  </Doc2>
+  <Doc3 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/CMakeLists.txt" >
+   <View0 Encoding="" Type="Source" />
+  </Doc3>
+  <Doc4 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/CMakeLists.txt" >
+   <View0 Encoding="" Type="Source" />
+  </Doc4>
+  <Doc5 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/QtGTL.h" >
+   <View0 Encoding="" Type="Source" />
+  </Doc5>
+  <Doc6 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/ImageViewer.cpp" >
+   <View0 Encoding="" Type="Source" />
+  </Doc6>
+  <Doc7 NumberOfViews="1" URL="file:///home/cyrille/src/GTLDesigner/src/ImageViewer.h" >
+   <View0 Encoding="" line="29" Type="Source" />
+  </Doc7>
+ </DocsAndViews>
+ <pluginList>
+  <kdevastyle>
+   <Extensions ext="*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm" />
+   <AStyle IndentPreprocessors="0" FillCount="4" PadParenthesesOut="1" IndentNamespaces="1" IndentLabels="1" Fill="Tabs" MaxStatement="40" Brackets="Break" MinConditional="-1" IndentBrackets="0" PadParenthesesUn="1" BlockBreak="0" KeepStatements="1" KeepBlocks="1" BlockIfElse="0" IndentSwitches="1" PadOperators="0" FStyle="UserDefined" IndentCases="0" FillEmptyLines="0" BracketsCloseHeaders="0" BlockBreakAll="0" PadParenthesesIn="1" IndentClasses="1" IndentBlocks="0" FillForce="0" />
+  </kdevastyle>
+  <kdevbookmarks>
+   <bookmarks/>
+  </kdevbookmarks>
+ </pluginList>
+</KDevPrjSession>

Added: trunk/README
===================================================================
--- trunk/README	                        (rev 0)
+++ trunk/README	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,24 @@
+How To Build This Template
+-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+cd <project_name_path>
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=debugfull ..      <- do not forget the ..
+make
+make install or su -c 'make install'
+
+to uninstall the project:
+make uninstall or su -c 'make uninstall'
+
+Note: you can use another build path. Then cd in your build dir and:
+export KDE_SRC=path_to_your_src
+cmake $KDE_SRC -DCMAKE_INSTALL_PREFIX=$KDEDIR -DCMAKE_BUILD_TYPE=debugfull
+
+
+----------------------------
+Please send all comments to:
+Anne-Marie Mahfouf
+annma@xxxxxxx
+
+Last update: April 2008

Added: trunk/cmake/modules/FindOpenCTL.cmake
===================================================================
--- trunk/cmake/modules/FindOpenCTL.cmake	                        (rev 0)
+++ trunk/cmake/modules/FindOpenCTL.cmake	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,36 @@
+     
+
+INCLUDE(UsePkgConfig)
+PKGCONFIG(OpenCTL _OpenCTLIncDir _OpenCTLLinkDir _OpenCTLLinkFlags _OpenCTLCflags)
+
+set(OPENCTL_DEFINITIONS ${_OpenCTLCflags})
+set(OPENCTL_LIBRARIES ${_OpenCTLLinkFlags})
+set(OPENCTL_INCLUDE_DIR ${_OpenCTLIncDir})
+
+if(OPENCTL_DEFINITIONS AND OPENCTL_LIBRARIES)
+
+  FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin )
+
+  # query pkg-config asking for OpenCTL == 0.9.2
+  EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.9.3 OpenCTL RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+
+  if(_return_VALUE STREQUAL "0")
+    set(OPENCTL_FOUND TRUE)
+    set(HAVE_OPENCTL TRUE)
+  else(_return_VALUE STREQUAL "0")
+    message(STATUS "OpenCTL >= 0.9.3 was found")
+  endif(_return_VALUE STREQUAL "0")
+endif(OPENCTL_DEFINITIONS AND OPENCTL_LIBRARIES)
+
+if (OPENCTL_FOUND)
+    if (NOT OpenCTL_FIND_QUIETLY)
+        message(STATUS "Found OPENCTL: ${OPENCTL_LIBRARIES}")
+    endif (NOT OpenCTL_FIND_QUIETLY)
+else (OPENCTL_FOUND)
+    if (NOT OpenCTL_FIND_QUIETLY)
+        message(STATUS "OpenCTL was NOT found.")
+    endif (NOT OpenCTL_FIND_QUIETLY)
+    if (OpenCTL_FIND_REQUIRED)
+        message(FATAL_ERROR "Could NOT find OPENCTL")
+    endif (OpenCTL_FIND_REQUIRED)
+endif (OPENCTL_FOUND)

Added: trunk/cmake/modules/FindOpenShiva.cmake
===================================================================
--- trunk/cmake/modules/FindOpenShiva.cmake	                        (rev 0)
+++ trunk/cmake/modules/FindOpenShiva.cmake	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,35 @@
+
+INCLUDE(UsePkgConfig)
+PKGCONFIG(OpenShiva _OpenShivaIncDir _OpenShivaLinkDir _OpenShivaLinkFlags _OpenShivaCflags)
+
+set(OPENSHIVA_DEFINITIONS ${_OpenShivaCflags})
+set(OPENSHIVA_LIBRARIES ${_OpenShivaLinkFlags})
+set(OPENSHIVA_INCLUDE_DIR ${_OpenShivaIncDir})
+
+if(OPENSHIVA_DEFINITIONS AND OPENSHIVA_LIBRARIES)
+
+  FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin )
+
+  # query pkg-config asking for OpenShiva >= 0.9.2
+  EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.9.3 OpenShiva RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+
+  if(_return_VALUE STREQUAL "0")
+    set(OPENSHIVA_FOUND TRUE)
+    set(HAVE_OPENSHIVA TRUE)
+  else(_return_VALUE STREQUAL "0")
+    message(STATUS "OpenShiva >= 0.9.3 was found")
+  endif(_return_VALUE STREQUAL "0")
+endif(OPENSHIVA_DEFINITIONS AND OPENSHIVA_LIBRARIES)
+
+if (OPENSHIVA_FOUND)
+    if (NOT OPENSHIVA_FIND_QUIETLY)
+        message(STATUS "Found OpenShiva: ${OPENSHIVA_LIBRARIES}")
+    endif (NOT OPENSHIVA_FIND_QUIETLY)
+else (OPENShiva_FOUND)
+    if (NOT OPENSHIVA_FIND_QUIETLY)
+        message(STATUS "OpenShiva was NOT found.")
+    endif (NOT OPENSHIVA_FIND_QUIETLY)
+    if (OPENSHIVA_FIND_REQUIRED)
+        message(FATAL_ERROR "Could NOT find OPENShiva")
+    endif (OPENSHIVA_FIND_REQUIRED)
+endif (OPENSHIVA_FOUND)

Added: trunk/doc/CMakeLists.txt
===================================================================
--- trunk/doc/CMakeLists.txt	                        (rev 0)
+++ trunk/doc/CMakeLists.txt	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,4 @@
+########### install files ###############
+#
+
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR gtldesigner)

Added: trunk/doc/index.cache.bz2
===================================================================
(Binary files differ)


Property changes on: trunk/doc/index.cache.bz2
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/doc/index.docbook
===================================================================
--- trunk/doc/index.docbook	                        (rev 0)
+++ trunk/doc/index.docbook	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,569 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+  <!-- Define an entity for your application if it is not part of KDE
+       CVS -->
+  <!ENTITY kmyapplication "<application>gtldesigner</application>">
+  <!ENTITY kappname "&kmyapplication;"><!-- replace kmyapplication here
+                                            do *not* replace kappname-->
+  <!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc.  Leave
+                                     this unchanged if your
+                                     application is not maintained in KDE CVS -->
+  <!ENTITY % addindex "IGNORE">
+  <!ENTITY % English "INCLUDE"> <!-- ONLY If you are writing non-English
+                                     original documentation, change
+                                     the language here -->
+
+  <!-- Do not define any other entities; instead, use the entities
+       from entities/general.entities and $LANG/user.entities. -->
+]>
+<!-- kdoctemplate v0.9 January 10 2003
+     Changes to comments to clarify entity usage January 10 2003
+     Minor update to "Credits and Licenses" section on August 24, 2000
+     Removed "Revision history" section on 22 January 2001
+     Changed to Installation/Help menu entities 18 October 2001
+     Other minor cleanup and changes 18 October 2001
+     FPI change and minor changes November 2002 -->
+
+<!--
+This template was designed by: David Rugge davidrugge@xxxxxxxxxxxxxx
+with lots of help from: Eric Bischoff ebisch@xxxxxxxxxxxxxxxx
+and Frederik Fouvry fouvry@xxxxxxxxxxxxxxxxxxxxxxxxxx
+of the KDE DocBook team.
+
+You may freely use this template for writing any sort of KDE documentation.
+If you have any changes or improvements, please let us know.
+
+Remember:
+- in XML, the case of the <tags> and attributes is relevant ;
+- also, quote all attributes.
+
+Please don't forget to remove all these comments in your final documentation,
+thanks ;-).
+-->
+
+<!-- ................................................................ -->
+
+<!-- The language must NOT be changed here. -->
+<!-- If you are writing original documentation in a language other -->
+<!-- than English, change the language above ONLY, not here -->
+<book lang="&language;">
+
+<!-- This header contains all of the meta-information for the document such
+as Authors, publish date, the abstract, and Keywords -->
+
+<bookinfo>
+<title>The &kmyapplication; Handbook</title>
+
+<authorgroup>
+<author>
+<!-- This is just put in as an example.  For real documentation, please
+     define a general entity in entities/contributor.entities, e.g.
+<!ENTITY George.N.Ugnacious "<personname><firstname>George</firstname><othername>N.</othername><surname>Ugnacious</surname></personname>">
+<!ENTITY George.N.Ugnacious.mail "<email>gnu@xxxxxxx</email>">
+and use `&George.N.Ugnacious; &George.N.Ugnacious.mail;' in the author element.
+ -->
+<personname>
+<firstname>George</firstname>
+<othername>N.</othername>
+<surname>Ugnacious</surname>
+</personname>
+<email>gnu@xxxxxxx</email>
+</author>
+</authorgroup>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+<copyright>
+<year>2008</year>
+<holder>George N. Ugnacious</holder>
+</copyright>
+<!-- Translators: put here the copyright notice of the translation -->
+<!-- Put here the FDL notice.  Read the explanation in fdl-notice.docbook
+     and in the FDL itself on how to use it. -->
+<legalnotice>&FDLNotice;</legalnotice>
+
+<!-- Date and version information of the application
+Don't forget to include this last date and this last revision number, we
+need them for translation coordination !
+Please respect the format of the date (YYYY-MM-DD) and of the version
+(V.MM.LL), it could be used by automation scripts.
+Do NOT change these in the translation. -->
+
+<date>2008-01-10</date>
+<releaseinfo>1.01.00</releaseinfo>
+
+<!-- Abstract about this handbook -->
+
+<abstract>
+<para>
+&kmyapplication; is an application specially designed to do nothing you would
+ever want.
+</para>
+</abstract>
+
+<!-- This is a set of Keywords for indexing by search engines.
+Please at least include KDE, the KDE package it is in, the name
+ of your application, and a few relevant keywords. -->
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>kdeutils</keyword>
+<keyword>Kapp</keyword>
+<keyword>nothing</keyword>
+<keyword>nothing else</keyword>
+</keywordset>
+
+</bookinfo>
+
+<!-- The contents of the documentation begin here.  Label
+each chapter so with the id attribute. This is necessary for two reasons: it
+allows you to easily reference the chapter from other chapters of your
+document, and if there is no ID, the name of the generated HTML files will vary
+from time to time making it hard to manage for maintainers and for the CVS
+system. Any chapter labelled (OPTIONAL) may be left out at the author's
+discretion. Other chapters should not be left out in order to maintain a
+consistent documentation style across all KDE apps. -->
+
+<chapter id="introduction">
+<title>Introduction</title>
+
+<!-- The introduction chapter contains a brief introduction for the
+application that explains what it does and where to report
+problems. Basically a long version of the abstract.  Don't include a
+revision history. (see installation appendix comment) -->
+
+<para>
+&kmyapplication; is a program that lets you do absolutely nothing. Please report
+any problems or feature requests to the &kde; mailing lists.
+</para>
+</chapter>
+
+<chapter id="using-kapp">
+<title>Using &kmyapplication;</title>
+
+<!-- This chapter should tell the user how to use your app. You should use as
+many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
+your application. -->
+
+<para>
+
+<!-- Note that all graphics should be in .png format. Do not use gifs because of
+patent issues. -->
+
+<screenshot>
+<screeninfo>Here's a screenshot of &kmyapplication;</screeninfo>
+	<mediaobject>
+	  <imageobject>
+	    <imagedata fileref="screenshot.png" format="PNG"/>
+	  </imageobject>
+	  <imageobject>
+	    <imagedata fileref="screenshot.eps" format="EPS"/>
+	  </imageobject>
+	  <textobject>
+	    <phrase>Screenshot</phrase>
+	  </textobject>
+	</mediaobject>
+</screenshot>
+</para>
+
+
+<sect1 id="kapp-features">
+<title>More &kmyapplication; features</title>
+
+<para>It slices! It dices! and it comes with a free toaster!</para>
+<para>
+The Squiggle Tool <guiicon><inlinemediaobject>
+	  <imageobject>
+	    <imagedata fileref="squiggle.png" format="PNG"/>
+	  </imageobject>
+	  <imageobject>
+	    <imagedata fileref="squiggle.eps" format="EPS"/>
+	  </imageobject>
+	  <textobject>
+	    <phrase>Squiggle</phrase>
+	  </textobject>
+</inlinemediaobject></guiicon> is used to draw squiggly lines all over
+the &kmyapplication; main window. It's not a bug, it's a feature!
+</para>
+
+</sect1>
+</chapter>
+
+<chapter id="commands">
+<title>Command Reference</title>
+
+<!-- (OPTIONAL, BUT RECOMMENDED) This chapter should list all of the
+application windows and their menubar and toolbar commands for easy reference.
+Also include any keys that have a special function but have no equivalent in the
+menus or toolbars. This may not be necessary for small apps or apps with no tool
+or menu bars. -->
+
+<sect1 id="kapp-mainwindow">
+<title>The main &kmyapplication; window</title>
+
+<sect2>
+<title>The File Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>New</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Creates a new document</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Save</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Saves the document</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Quit</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Quits</action> &kmyapplication;</para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+
+</sect2>
+
+<sect2>
+<title>The <guimenu>Help</guimenu> Menu</title>
+
+<!-- Assuming you have a standard help menu (help, what's this, about -->
+<!-- &kmyapplication;, about KDE) then the documentation is already written. -->
+<!-- The following entity is valid anywhere that a variablelist is -->
+<!-- valid.  -->
+
+&help.menu.documentation;
+
+</sect2>
+
+</sect1>
+</chapter>
+
+<chapter id="developers">
+<title>Developer's Guide to &kmyapplication;</title>
+
+<!-- (OPTIONAL) A Programming/Scripting reference chapter should be
+used for apps that use plugins or that provide their own scripting hooks
+and/or development libraries. -->
+
+<para>
+Programming &kmyapplication; plugins is a joy to behold. Just read through the next
+66 pages of API's to learn how!
+</para>
+
+<!-- Use refentries to describe APIs.  Refentries are fairly complicated and you
+should consult the docbook reference for further details. The example below was
+taken from that reference and shortened a bit for readability. -->
+
+<refentry id="re-1007-unmanagechildren-1">
+<refmeta>
+<refentrytitle>XtUnmanageChildren</refentrytitle>
+<refmiscinfo>Xt - Geometry Management</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>XtUnmanageChildren
+</refname>
+<refpurpose>remove a list of children from a parent widget's managed
+list.
+<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
+<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm>
+</refpurpose>
+
+</refnamediv>
+<refsynopsisdiv>
+<refsynopsisdivinfo>
+<date>4 March 1996</date>
+</refsynopsisdivinfo>
+<synopsis>
+void XtUnmanageChildren(<replaceable class="parameter">children</replaceable>, <replaceable class="parameter">num_children</replaceable>)
+    WidgetList <replaceable class="parameter">children</replaceable>;
+    Cardinal <replaceable class="parameter">num_children</replaceable>;
+</synopsis>
+
+<refsect2 id="r2-1007-unmanagechildren-1">
+<title>Inputs</title>
+<variablelist>
+<varlistentry>
+<term><replaceable class="parameter">children</replaceable>
+</term>
+<listitem>
+<para>Specifies an array of child widgets. Each child must be of
+class RectObj or any subclass thereof.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><replaceable class="parameter">num_children</replaceable>
+</term>
+<listitem>
+<para>Specifies the number of elements in <replaceable class="parameter">children</replaceable>.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refsect2></refsynopsisdiv>
+
+<refsect1 id="r1-1007-unmanagechildren-1">
+<title>Description
+</title>
+<para><function>XtUnmanageChildren()</function> unmaps the specified widgets
+and removes them from their parent's geometry management.
+The widgets will disappear from the screen, and (depending
+on its parent) may no longer have screen space allocated for
+them.
+</para>
+<para>Each of the widgets in the <replaceable class="parameter">children</replaceable> array must have
+the same parent.
+</para>
+<para>See the &ldquo;Algorithm&rdquo; section below for full details of the
+widget unmanagement procedure.
+</para>
+</refsect1>
+
+<refsect1 id="r1-1007-unmanagechildren-2">
+<title>Usage</title>
+<para>Unmanaging widgets is the usual method for temporarily
+making them invisible.  They can be re-managed with
+<function>XtManageChildren()</function>.
+</para>
+<para>You can unmap a widget, but leave it under geometry
+management by calling <function>XtUnmapWidget()</function>.  You can
+destroy a widget's window without destroying the widget by
+calling <function>XtUnrealizeWidget()</function>.  You can destroy a
+widget completely with <function>XtDestroyWidget()</function>.
+</para>
+<para>If you are only going to unmanage a single widget, it is
+more convenient to call <function>XtUnmanageChild()</function>.  It is
+often more convenient to call <function>XtUnmanageChild()</function>
+several times than it is to declare and initialize an array
+of widgets to pass to <function>XtUnmanageChildren()</function>.  Calling
+<function>XtUnmanageChildren()</function> is more efficient, however,
+because it only calls the parent's <function>change_managed()</function>
+method once.
+</para>
+</refsect1>
+
+<refsect1 id="r1-1007-unmanagechildren-3">
+<title>Algorithm
+</title>
+<para><function>XtUnmanageChildren()</function> performs the following:
+</para>
+<variablelist>
+<varlistentry>
+<term>-
+</term>
+<listitem>
+<para>Ignores the child if it already is unmanaged or is being
+destroyed.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>-
+</term>
+<listitem>
+<para>Otherwise, if the child is realized, it makes it nonvisible
+by unmapping it.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="r1-1007-unmanagechildren-4">
+<title>Structures</title>
+<para>The <type>WidgetList</type> type is simply an array of widgets:
+</para>
+<screen id="sc-1007-unmanagechildren-1">typedef Widget *WidgetList;
+</screen>
+</refsect1>
+</refentry>
+
+</chapter>
+
+<chapter id="faq">
+<title>Questions and Answers</title>
+
+<!-- (OPTIONAL but recommended) This chapter should include all of the silly
+(and not-so-silly) newbie questions that fill up your mailbox. This chapter
+should be reserved for BRIEF questions and answers! If one question uses more
+than a page or so then it should probably be part of the
+"Using this Application" chapter instead. You should use links to
+cross-reference questions to the parts of your documentation that answer them.
+This is also a great place to provide pointers to other FAQ's if your users
+must do some complicated configuration on other programs in order for your
+application work. -->
+
+&reporting.bugs;
+&updating.documentation;
+
+<qandaset id="faqlist">
+<qandaentry>
+<question>
+<para>My Mouse doesn't work. How do I quit &kmyapplication;?</para>
+</question>
+<answer>
+<para>You silly goose! Check out the <link linkend="commands">Commands
+Section</link> for the answer.</para>
+</answer>
+</qandaentry>
+<qandaentry>
+<question>
+<para>Why can't I twiddle my documents?</para>
+</question>
+<answer>
+<para>You can only twiddle your documents if you have the foobar.lib
+installed.</para>
+</answer>
+</qandaentry>
+</qandaset>
+</chapter>
+
+<chapter id="credits">
+
+<!-- Include credits for the programmers, documentation writers, and
+contributors here. The license for your software should then be included below
+the credits with a reference to the appropriate license file included in the KDE
+distribution. -->
+
+<title>Credits and License</title>
+
+<para>
+&kmyapplication;
+</para>
+<para>
+Program copyright 2008 John Q. Hacker <email>jqh@xxxxxxx</email>
+</para>
+<para>
+Contributors:
+<itemizedlist>
+<listitem><para>Konqui the KDE Dragon <email>konqui@xxxxxxx</email></para>
+</listitem>
+<listitem><para>Tux the Linux Penguin <email>tux@xxxxxxxxx</email></para>
+</listitem>
+</itemizedlist>
+</para>
+
+<para>
+Documentation Copyright &copy; 2008 George N. Ugnacious <email>gnu@xxxxxxx</email>
+</para>
+
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+
+&underFDL;               <!-- FDL: do not remove -->
+
+<!-- Determine which license your application is licensed under,
+     and delete all the remaining licenses below:
+
+     (NOTE:  All documentation are licensed under the FDL,
+     regardless of what license the application uses) -->
+
+&underGPL;        	 <!-- GPL License -->
+&underBSDLicense;        <!-- BSD License -->
+&underArtisticLicense;   <!-- BSD Artistic License -->
+&underX11License;        <!-- X11 License  -->
+
+</chapter>
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-kapp">
+<title>How to obtain &kmyapplication;</title>
+
+<!-- This first entity contains boiler plate for applications that are
+part of KDE CVS.  You should remove it if you are releasing your
+application -->
+
+&install.intro.documentation;
+
+</sect1>
+
+<sect1 id="requirements">
+<title>Requirements</title>
+
+<!--
+List any special requirements for your application here. This should include:
+.Libraries or other software that is not included in kdesupport,
+kdelibs, or kdebase.
+.Hardware requirements like amount of RAM, disk space, graphics card
+capabilities, screen resolution, special expansion cards, etc.
+.Operating systems the app will run on. If your app is designed only for a
+specific OS, (you wrote a graphical LILO configurator for example) put this
+information here.
+-->
+
+<para>
+In order to successfully use &kmyapplication;, you need &kde; 1.1. Foobar.lib is
+required in order to support the advanced &kmyapplication; features. &kmyapplication; uses
+about 5 megs of memory to run, but this may vary depending on your
+platform and configuration.
+</para>
+
+<para>
+All required libraries as well as &kmyapplication; itself can be found
+on <ulink url="ftp://ftp.kapp.org";>The &kmyapplication; home page</ulink>.
+</para>
+
+<!-- For a list of updates, you may refer to the application web site
+or the ChangeLog file, or ... -->
+<para>
+You can find a list of changes at <ulink
+url="http://apps.kde.org/kapp";>http://apps.kde.org/kapp</ulink>.
+</para>
+</sect1>
+
+<sect1 id="compilation">
+<title>Compilation and Installation</title>
+
+<!-- This entity contains the boilerplate text for standard -->
+<!-- compilation instructions.  If your application requires any -->
+<!-- special handling, remove it, and replace with your own text. -->
+
+&install.compile.documentation;
+
+</sect1>
+
+<sect1 id="configuration">
+<title>Configuration</title>
+
+<para>Don't forget to tell your system to start the <filename>dtd</filename>
+dicer-toaster daemon first, or &kmyapplication; won't work !</para>
+
+</sect1>
+
+</appendix>
+
+&documentation.index;
+</book>
+
+<!--
+Local Variables:
+mode: xml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+
+vim:tabstop=2:shiftwidth=2:expandtab
+kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
+-->

Added: trunk/icons/CMakeLists.txt
===================================================================
--- trunk/icons/CMakeLists.txt	                        (rev 0)
+++ trunk/icons/CMakeLists.txt	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1 @@
+kde4_install_icons( ${ICON_INSTALL_DIR}   )

Added: trunk/icons/hi16-app-gtldesigner.png
===================================================================
(Binary files differ)


Property changes on: trunk/icons/hi16-app-gtldesigner.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icons/hi32-app-gtldesigner.png
===================================================================
(Binary files differ)


Property changes on: trunk/icons/hi32-app-gtldesigner.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icons/hi48-app-gtldesigner.png
===================================================================
(Binary files differ)


Property changes on: trunk/icons/hi48-app-gtldesigner.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt	                        (rev 0)
+++ trunk/src/CMakeLists.txt	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,24 @@
+include_directories(${OPENSHIVA_INCLUDE_DIR} ${OPENCTL_LIBRARIES})
+
+set(gtldesigner_SRCS
+   gtldesigner.cpp
+   ImageViewer.cpp
+   main.cpp
+ )
+
+kde4_add_ui_files(gtldesigner_SRCS gtldesignerview_base.ui prefs_base.ui)
+
+kde4_add_kcfg_files(gtldesigner_SRCS settings.kcfgc )
+
+kde4_add_executable(gtldesigner ${gtldesigner_SRCS})
+
+target_link_libraries(gtldesigner ${KDE4_KDEUI_LIBS} ${KDE4_KTEXTEDITOR_LIBS}  ${OPENSHIVA_LIBRARIES}  ${OPENCTL_LIBRARIES})
+
+install(TARGETS gtldesigner DESTINATION ${BIN_INSTALL_DIR} )
+
+
+########### install files ###############
+
+install( FILES gtldesigner.desktop  DESTINATION ${XDG_APPS_INSTALL_DIR} )
+install( FILES gtldesigner.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
+install( FILES gtldesignerui.rc  DESTINATION  ${DATA_INSTALL_DIR}/gtldesigner )

Added: trunk/src/ImageViewer.cpp
===================================================================
--- trunk/src/ImageViewer.cpp	                        (rev 0)
+++ trunk/src/ImageViewer.cpp	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ * 
+ * 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, or (at your option) any later version.
+ * 
+ * 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, see <http://www.gnu.org/licenses/>. */
+
+#include <ImageViewer.h>
+
+#include <QGraphicsPixmapItem>
+
+ImageViewer::ImageViewer(const QImage& image)
+{
+  QGraphicsScene* scene = new QGraphicsScene;
+  setScene( scene );
+  QGraphicsPixmapItem* pixmapItem = new QGraphicsPixmapItem;
+  scene->addItem( pixmapItem );
+  pixmapItem->setPixmap( QPixmap::fromImage( image ) );
+  setAttribute(Qt::WA_DeleteOnClose);
+
+}

Added: trunk/src/ImageViewer.h
===================================================================
--- trunk/src/ImageViewer.h	                        (rev 0)
+++ trunk/src/ImageViewer.h	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ * 
+ * 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, or (at your option) any later version.
+ * 
+ * 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, see <http://www.gnu.org/licenses/>. */
+
+
+#ifndef _IMAGEVIEWER_H_
+#define _IMAGEVIEWER_H_
+
+#include <QGraphicsView>
+
+class ImageViewer : public QGraphicsView
+{
+  Q_OBJECT
+  public:
+    ImageViewer(const QImage& image);
+};
+
+#endif

Added: trunk/src/Messages.sh
===================================================================
--- trunk/src/Messages.sh	                        (rev 0)
+++ trunk/src/Messages.sh	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,4 @@
+#! /usr/bin/env bash
+$EXTRACTRC `find . -name \*.rc` >> rc.cpp
+$XGETTEXT *.cpp -o $podir/gtldesigner.pot
+rm -f *.cpp

Added: trunk/src/QtGTL.h
===================================================================
--- trunk/src/QtGTL.h	                        (rev 0)
+++ trunk/src/QtGTL.h	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ * 
+ * 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, or (at your option) any later version.
+ * 
+ * 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, see <http://www.gnu.org/licenses/>. */
+
+
+#ifndef _QTGTL_H_
+#define _QTGTL_H_
+
+#include <QImage>
+#include <GTLCore/Buffer.h>
+#include <GTLCore/BufferImage.h>
+#include <GTLCore/PixelDescription.h>
+#include <GTLCore/Type.h>
+
+class QImageBuffer : public GTLCore::Buffer {
+  public:
+    QImageBuffer(const QImage& img) : m_image(img) { }
+    ~QImageBuffer() {}
+    virtual char * rawData() { return (char*)m_image.bits(); }
+    virtual const char * rawData() const { return (const char*)m_image.bits(); }
+    virtual int size() const { return m_image.numBytes(); }
+    QImage image() const { return m_image; }
+  private:
+    QImage m_image;
+};
+
+class QImageImage : public GTLCore::BufferImage {
+  public:
+    QImageImage(const QImage& img) : BufferImage( img.width(), img.height(), new QImageBuffer( img ), imageToPixelDescription( img ) )
+    {
+    }
+    ~QImageImage() {}
+    QImage image() const { return static_cast<const QImageBuffer*>(buffer())->image(); }
+  private:
+    GTLCore::PixelDescription imageToPixelDescription( const QImage& img )
+    {
+      switch( img.format())
+      {
+        case QImage::Format_RGB32:
+          return GTLCore::PixelDescription( GTLCore::Type::UnsignedInteger8, 4 );
+        case QImage::Format_ARGB32:
+          return GTLCore::PixelDescription( GTLCore::Type::UnsignedInteger8, 4 );
+        case QImage::Format_RGB888:
+          return GTLCore::PixelDescription( GTLCore::Type::UnsignedInteger8, 3 );
+        default:
+          qFatal("Unsupported QImage");
+      }
+    }
+};
+
+
+#endif

Added: trunk/src/gtldesigner.cpp
===================================================================
--- trunk/src/gtldesigner.cpp	                        (rev 0)
+++ trunk/src/gtldesigner.cpp	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ * 
+ * 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, or (at your option) any later version.
+ * 
+ * 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, see <http://www.gnu.org/licenses/>. */
+
+#include "gtldesigner.h"
+#include "settings.h"
+
+#include "QtGTL.h"
+
+#include <QtGui/QDropEvent>
+#include <QtGui/QPainter>
+#include <QtGui/QPrinter>
+
+#include <kconfigdialog.h>
+#include <kstatusbar.h>
+
+#include <kaction.h>
+#include <kactioncollection.h>
+#include <kstandardaction.h>
+
+#include <KLocale>
+#include <KMessageBox>
+
+#include <KFileDialog>
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/editor.h>
+#include <ktexteditor/editorchooser.h>
+#include <ktexteditor/configpage.h>
+
+#include <OpenShiva/Kernel.h>
+#include <GTLCore/Region.h>
+
+#include "ImageViewer.h"
+
+GTLDesigner::GTLDesigner()
+    : KXmlGuiWindow(),
+      m_view(0),
+      m_printer(0)
+{
+    // accept dnd
+    setAcceptDrops(true);
+    KTextEditor::EditorChooser::editor()->readConfig();
+    KTextEditor::Editor *editor = KTextEditor::EditorChooser::editor();
+    m_document = editor->createDocument(this);
+    connect( m_document, SIGNAL(documentNameChanged( KTextEditor::Document *) ), SLOT(updateCaption()) );
+    connect( m_document, SIGNAL(textChanged( KTextEditor::Document *) ), SLOT(updateCaption()) );
+    m_view = qobject_cast<KTextEditor::View*>(m_document->createView(this));
+    
+    QMetaObject::invokeMethod(m_view, "toggleLineNumbersOn", Qt::DirectConnection );
+
+    // tell the KXmlGuiWindow that this is indeed the main widget
+    setCentralWidget(m_view);
+
+    // then, setup our actions
+    setupActions();
+
+    // add a status bar
+    statusBar()->show();
+
+    // a call to KXmlGuiWindow::setupGUI() populates the GUI
+    // with actions, using KXMLGUI.
+    // It also applies the saved mainwindow settings, if any, and ask the
+    // mainwindow to automatically save settings if changed: window size,
+    // toolbar position, icon size, etc.
+    setupGUI();
+}
+
+GTLDesigner::~GTLDesigner()
+{
+}
+
+void GTLDesigner::setupActions()
+{
+    KStandardAction::openNew(this, SLOT(fileNew()), actionCollection());
+    KStandardAction::open(this, SLOT(fileOpen()), actionCollection());
+    KStandardAction::save(this, SLOT(fileSave()), actionCollection());
+    KStandardAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+    KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection());
+
+    KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+
+    // custom menu and menu item - the slot is in the class GTLDesignerView
+    KAction *custom = new KAction( i18n("Configure editor"), this);
+    connect(custom, SIGNAL(triggered()), SLOT(optionsEditorPreferences()));
+    actionCollection()->addAction( QLatin1String("configure_editor"), custom );
+    
+    // Execute actions
+    KAction* actionExecuteRun = new KAction(i18n("Run"), this );
+    connect( actionExecuteRun, SIGNAL(triggered()), SLOT(executeRun()));
+    actionCollection()->addAction( QLatin1String("execute_run"), actionExecuteRun );
+    KAction* actionExecuteRunCTL = new KAction(i18n("Run as CTL"), this );
+    connect( actionExecuteRunCTL, SIGNAL(triggered()), SLOT(executeCtl()));
+    actionCollection()->addAction( QLatin1String("execute_run_as_ctl"), actionExecuteRunCTL );
+    KAction* actionExecuteRunShiva = new KAction(i18n("Run as Shiva"), this );
+    connect( actionExecuteRunShiva, SIGNAL(triggered()), SLOT(executeShiva()));
+    actionCollection()->addAction( QLatin1String("execute_run_as_shiva"), actionExecuteRunShiva );
+}
+
+void GTLDesigner::fileNew()
+{
+    // this slot is called whenever the File->New menu is selected,
+    // the New shortcut is pressed (usually CTRL+N) or the New toolbar
+    // button is clicked
+
+    // create a new window
+    (new GTLDesigner)->show();
+}
+
+void GTLDesigner::fileOpen()
+{
+  KUrl file = KFileDialog::getOpenFileName( KUrl(), "*.ctl *.shiva", this);
+  
+  m_document->openUrl(file);
+  updateCaption();
+}
+
+void GTLDesigner::fileSave()
+{
+  kDebug() << m_document->isModified();
+  m_document->documentSave();
+  updateCaption();
+}
+
+void GTLDesigner::fileSaveAs()
+{
+  m_document->documentSaveAs();
+  updateCaption();
+}
+
+void GTLDesigner::executeRun()
+{
+  QString suffix = QFileInfo( m_document->url().fileName() ).suffix();
+  if( suffix == "shiva" )
+  {
+    executeShiva();
+  } else if( suffix == "ctl" )
+  {
+    executeCTL();
+  } else {
+    KMessageBox::error( this, "Can't find an interpreter");
+  }
+}
+void GTLDesigner::executeCTL()
+{
+  abort();
+}
+void GTLDesigner::executeShiva()
+{
+  GTLCore::PixelDescription pixel( GTLCore::Type::Float, 3 );
+  OpenShiva::Kernel p("", 4);
+  p.setSource( m_document->text().toAscii ().data() );
+  p.compile();
+  if(p.isCompiled())
+  {
+    std::list<GTLCore::AbstractImage*> inputImages;
+/*    for( int k = 0; k < m_mainWindow->listImages->count(); ++k)
+    {
+      QString fileName = m_mainWindow->listImages->item( k )->data( Qt::UserRole ).toString();
+      QImage img;
+      if (not img.load(fileName)) {
+        QMessageBox::warning(this, tr("QtShiva"),
+                              tr("Cannot read image %1..")
+                              .arg(fileName));
+        return;
+      }
+      GTLCore::AbstractImage* iImage = new QImageImage( img );
+      inputImages.push_back( iImage );
+    }*/
+    QImageImage image( QImage( 1000, 1000, QImage::Format_ARGB32) );
+    p.evaluatePixeles( GTLCore::Region(0,0, 1000,1000), inputImages, &image );
+    showImage( image.image() );
+/*    for( std::list<GTLCore::AbstractImage*>::iterator it = inputImages.begin();
+         it != inputImages.end(); ++it)
+    {
+      delete *it;
+    }*/
+  } else {
+    QMessageBox::critical(this, tr("QtShiva"), tr("Compilation error: %1").arg( p.compilationErrorsMessage().c_str() ));
+  }
+}
+
+void GTLDesigner::showImage(const QImage& _image)
+{
+    ImageViewer* viewer = new ImageViewer( _image );
+    viewer->show();
+}
+
+void GTLDesigner::optionsEditorPreferences()
+{
+  KTextEditor::EditorChooser::editor()->configDialog( this );
+  KTextEditor::EditorChooser::editor()->writeConfig();
+}
+
+void GTLDesigner::optionsPreferences()
+{
+    // The preference dialog is derived from prefs_base.ui
+    //
+    // compare the names of the widgets in the .ui file
+    // to the names of the variables in the .kcfg file
+    //avoid to have 2 dialogs shown
+    if ( KConfigDialog::showDialog( "settings" ) )  {
+        return;
+    }
+    KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self());
+    QWidget *generalSettingsDlg = new QWidget;
+    ui_prefs_base.setupUi(generalSettingsDlg);
+    dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting");
+    connect(dialog, SIGNAL(settingsChanged(QString)), m_view, SLOT(settingsChanged()));
+    dialog->setAttribute( Qt::WA_DeleteOnClose );
+    dialog->show();
+}
+
+void GTLDesigner::updateCaption()
+{
+  QString caption = m_document->documentName();
+  if( m_document->isModified())
+  {
+    caption += "*";
+  }
+  setCaption( caption );
+}
+
+#include "gtldesigner.moc"

Added: trunk/src/gtldesigner.desktop
===================================================================
--- trunk/src/gtldesigner.desktop	                        (rev 0)
+++ trunk/src/gtldesigner.desktop	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,34 @@
+[Desktop Entry]
+Name=GTLDesigner
+Name[x-test]=xxGTLDesignerxx
+Exec=gtldesigner %i -caption "%c"
+Icon=gtldesigner
+Type=Application
+DocPath=gtldesigner/index.html
+GenericName=A KDE4 Application
+GenericName[ca]=Una aplicació del KDE4
+GenericName[da]=Et KDE4-program
+GenericName[de]=Eine KDE-4-Anwendung
+GenericName[el]=Μια εφαρμογή KDE4
+GenericName[es]=Una aplicación de KDE4
+GenericName[et]=KDE4 rakendus
+GenericName[fr]=Une application pour KDE4
+GenericName[ga]=Feidhmchlár KDE4
+GenericName[gl]=Un programa de KDE4
+GenericName[it]=Un'applicazione di KDE 4
+GenericName[km]=កម្មវិធី KDE4
+GenericName[lv]=KDE4 lietotne
+GenericName[nds]=En KDE4-Programm
+GenericName[pl]=Program dla KDE4
+GenericName[pt]=Uma Aplicação do KDE4
+GenericName[pt_BR]=Uma Aplicação do KDE4
+GenericName[sr]=КДЕ‑4 програм
+GenericName[sr@latin]=KDE4 program
+GenericName[sv]=Ett KDE4-program
+GenericName[tr]=Bir KDE4 Uygulaması
+GenericName[uk]=Програма для KDE4
+GenericName[x-test]=xxA KDE4 Applicationxx
+GenericName[zh_CN]=KDE4 应用程序
+GenericName[zh_TW]=KDE4 應用程式
+Terminal=0
+

Added: trunk/src/gtldesigner.h
===================================================================
--- trunk/src/gtldesigner.h	                        (rev 0)
+++ trunk/src/gtldesigner.h	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ * 
+ * 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, or (at your option) any later version.
+ * 
+ * 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef GTLDESIGNER_H
+#define GTLDESIGNER_H
+
+
+#include <kxmlguiwindow.h>
+
+#include "ui_prefs_base.h"
+
+class GTLDesignerView;
+class QPrinter;
+class KToggleAction;
+class KUrl;
+class QImage;
+
+namespace KTextEditor
+{
+  class Document;
+  class View;
+}
+
+/**
+ * This class serves as the main window for GTLDesigner.  It handles the
+ * menus, toolbars, and status bars.
+ *
+ * @short Main window class
+ * @author Cyrille Berger <cberger@xxxxxxxxxxx>
+ * @version 0.1
+ */
+class GTLDesigner : public KXmlGuiWindow
+{
+    Q_OBJECT
+public:
+    /**
+     * Default Constructor
+     */
+    GTLDesigner();
+
+    /**
+     * Default Destructor
+     */
+    virtual ~GTLDesigner();
+
+private slots:
+    void fileNew();
+    void fileOpen();
+    void fileSave();
+    void fileSaveAs();
+    void optionsPreferences();
+    void optionsEditorPreferences();
+    void executeRun();
+    void executeCTL();
+    void executeShiva();
+    void updateCaption();
+private:
+    void setupActions();
+    void showImage(const QImage&);
+
+  private:
+    KTextEditor::View *m_view;
+    KTextEditor::Document *m_document;
+    
+    Ui::prefs_base ui_prefs_base ;
+
+    QPrinter   *m_printer;
+    KToggleAction *m_toolbarAction;
+    KToggleAction *m_statusbarAction;
+};
+
+#endif // _GTLDESIGNER_H_

Added: trunk/src/gtldesigner.kcfg
===================================================================
--- trunk/src/gtldesigner.kcfg	                        (rev 0)
+++ trunk/src/gtldesigner.kcfg	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0";
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"; >
+  <kcfgfile name="gtldesignerrc"/>
+  <group name="Preferences">
+    <entry name="col_background" type="Color">
+	    <label>color of the background</label>
+	    <default>black</default>
+    </entry>
+    <entry name="col_foreground" type="Color">
+	    <label>color of the foreground</label>
+	    <default>yellow</default>
+    </entry>
+    <entry name="val_time" type="Int">
+	    <label>size of a ball</label>
+	    <default>2</default>
+    </entry>
+  </group>
+</kcfg>

Added: trunk/src/gtldesignerui.rc
===================================================================
--- trunk/src/gtldesignerui.rc	                        (rev 0)
+++ trunk/src/gtldesignerui.rc	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,13 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="gtldesigner" version="2">
+<MenuBar>
+  <Menu name="execute"><text>&amp;Exectute</text>
+    <Action name="execute_run" />
+    <Action name="execute_run_as_shiva" />
+    <Action name="execute_run_as_ctl" />
+  </Menu>
+  <Menu name="settings"><text>&amp;Settings</text>
+    <Action name="configure_editor" />
+  </Menu>
+</MenuBar>
+</kpartgui>

Added: trunk/src/gtldesignerview.cpp
===================================================================
--- trunk/src/gtldesignerview.cpp	                        (rev 0)
+++ trunk/src/gtldesignerview.cpp	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,47 @@
+/*
+ * gtldesignerview.cpp
+ *
+ * Copyright (C) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ */
+#include "gtldesignerview.h"
+#include "settings.h"
+
+#include <klocale.h>
+#include <QtGui/QLabel>
+
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/editor.h>
+#include <ktexteditor/editorchooser.h>
+
+GTLDesignerView::GTLDesignerView(QWidget *)
+{
+
+  QHBoxLayout* layout = new QHBoxLayout( this );
+  layout->addWidget( m_view );
+  
+  
+  settingsChanged();
+  setAutoFillBackground(true);
+}
+
+GTLDesignerView::~GTLDesignerView()
+{
+
+}
+
+void GTLDesignerView::switchColors()
+{
+    // switch the foreground/background colors of the label
+    QColor color = Settings::col_background();
+    Settings::setCol_background( Settings::col_foreground() );
+    Settings::setCol_foreground( color );
+
+    settingsChanged();
+}
+
+void GTLDesignerView::settingsChanged()
+{
+}
+
+#include "gtldesignerview.moc"

Added: trunk/src/gtldesignerview.h
===================================================================
--- trunk/src/gtldesignerview.h	                        (rev 0)
+++ trunk/src/gtldesignerview.h	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,59 @@
+/*
+ * gtldesignerview.h
+ *
+ * Copyright (C) 2007 Cyrille Berger <cberger@xxxxxxxxxxx>
+ */
+#ifndef GTLDESIGNERVIEW_H
+#define GTLDESIGNERVIEW_H
+
+#include <QtGui/QWidget>
+
+#include "ui_gtldesignerview_base.h"
+
+class QPainter;
+class KUrl;
+  
+/**
+ * This is the main view class for GTLDesigner.  Most of the non-menu,
+ * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go
+ * here.
+ *
+ * @short Main view
+ * @author Cyrille Berger <cberger@xxxxxxxxxxx>
+ * @version 0.1
+ */
+
+class GTLDesignerView : public QWidget, public Ui::gtldesignerview_base
+{
+    Q_OBJECT
+public:
+    /**
+     * Default constructor
+     */
+    GTLDesignerView(QWidget *parent);
+
+    /**
+     * Destructor
+     */
+    virtual ~GTLDesignerView();
+
+private:
+//     Ui::gtldesignerview_base ui_gtldesignerview_base;
+
+signals:
+    /**
+     * Use this signal to change the content of the statusbar
+     */
+    void signalChangeStatusbar(const QString& text);
+
+    /**
+     * Use this signal to change the content of the caption
+     */
+    void signalChangeCaption(const QString& text);
+
+private slots:
+    void switchColors();
+    void settingsChanged();
+};
+
+#endif // GTLDesignerVIEW_H

Added: trunk/src/gtldesignerview_base.ui
===================================================================
--- trunk/src/gtldesignerview_base.ui	                        (rev 0)
+++ trunk/src/gtldesignerview_base.ui	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,213 @@
+<ui version="4.0" >
+<class>gtldesignerview_base</class>
+<widget class="QWidget" name="gtldesignerview_base" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>315</width>
+    <height>233</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>kapp4_base</string>
+  </property>
+  <property name="autoFillBackground" >
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>11</number>
+   </property>
+   <property name="topMargin" >
+    <number>11</number>
+   </property>
+   <property name="rightMargin" >
+    <number>11</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>11</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QLabel" name="kcfg_sillyLabel" >
+     <property name="palette" >
+      <palette>
+       <active>
+        <colorrole role="WindowText" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>255</red>
+           <green>255</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Button" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Base" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Window" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="AlternateBase" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </active>
+       <inactive>
+        <colorrole role="WindowText" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>255</red>
+           <green>255</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Button" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Base" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Window" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="AlternateBase" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </inactive>
+       <disabled>
+        <colorrole role="WindowText" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>119</red>
+           <green>119</green>
+           <blue>119</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Button" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Base" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Window" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="AlternateBase" >
+         <brush brushstyle="SolidPattern" >
+          <color alpha="255" >
+           <red>0</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </disabled>
+      </palette>
+     </property>
+     <property name="font" >
+      <font>
+       <family>Sans Serif</family>
+       <pointsize>12</pointsize>
+      </font>
+     </property>
+     <property name="autoFillBackground" >
+      <bool>true</bool>
+     </property>
+     <property name="text" >
+      <string>hello, world</string>
+     </property>
+     <property name="scaledContents" >
+      <bool>true</bool>
+     </property>
+     <property name="alignment" >
+      <set>Qt::AlignCenter</set>
+     </property>
+     <property name="wordWrap" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>

Added: trunk/src/main.cpp
===================================================================
--- trunk/src/main.cpp	                        (rev 0)
+++ trunk/src/main.cpp	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,53 @@
+#include "gtldesigner.h"
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <KDE/KLocale>
+
+static const char description[] =
+    I18N_NOOP("A KDE 4 Application");
+
+static const char version[] = "0.1";
+
+int main(int argc, char **argv)
+{
+    KAboutData about("gtldesigner", 0, ki18n("GTLDesigner"), version, ki18n(description),
+                     KAboutData::License_GPL, ki18n("(C) 2007 Cyrille Berger"), KLocalizedString(), 0, "cberger@xxxxxxxxxxx");
+    about.addAuthor( ki18n("Cyrille Berger"), KLocalizedString(), "cberger@xxxxxxxxxxx" );
+    KCmdLineArgs::init(argc, argv, &about);
+
+    KCmdLineOptions options;
+    options.add("+[URL]", ki18n( "Document to open" ));
+    KCmdLineArgs::addCmdLineOptions(options);
+    KApplication app;
+
+    GTLDesigner *widget = new GTLDesigner;
+
+    // see if we are starting with session management
+    if (app.isSessionRestored())
+    {
+        RESTORE(GTLDesigner);
+    }
+    else
+    {
+        // no session.. just start up normally
+        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+        if (args->count() == 0)
+        {
+            //gtldesigner *widget = new gtldesigner;
+            widget->show();
+        }
+        else
+        {
+            int i = 0;
+            for (; i < args->count(); i++)
+            {
+                //gtldesigner *widget = new gtldesigner;
+                widget->show();
+            }
+        }
+        args->clear();
+    }
+
+    return app.exec();
+}

Added: trunk/src/prefs_base.ui
===================================================================
--- trunk/src/prefs_base.ui	                        (rev 0)
+++ trunk/src/prefs_base.ui	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,155 @@
+<ui version="4.0" >
+ <class>prefs_base</class>
+ <widget class="QWidget" name="prefs_base" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>282</width>
+    <height>156</height>
+   </rect>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="textLabel2_2" >
+     <property name="text" >
+      <string>Background color:</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" >
+    <widget class="KColorButton" name="kcfg_col_background" >
+     <property name="toolTip" >
+      <string>Choose a new background color</string>
+     </property>
+     <property name="whatsThis" >
+      <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the &lt;span style=" font-weight:600;">background&lt;/span> color by clicking here and choose the new &lt;span style=" color:#ff0000;">color&lt;/span> in the &lt;span style=" font-style:italic;">color dialog&lt;/span>.&lt;/p>&lt;/body>&lt;/html></string>
+     </property>
+     <property name="text" >
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QLabel" name="textLabel1" >
+     <property name="text" >
+      <string>Project age:</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="textLabel2" >
+     <property name="text" >
+      <string>Foreground color:</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <widget class="KColorButton" name="kcfg_col_foreground" >
+     <property name="toolTip" >
+      <string>Choose a new foreground color</string>
+     </property>
+     <property name="whatsThis" >
+      <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the &lt;span style=" font-weight:600;">foreground&lt;/span> color by clicking here and choose the new &lt;span style=" color:#ff0000;">color&lt;/span> in the &lt;span style=" font-style:italic;">color dialog&lt;/span>.&lt;/p>&lt;/body>&lt;/html></string>
+     </property>
+     <property name="text" >
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>41</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>41</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="1" >
+    <widget class="QSpinBox" name="kcfg_val_time" >
+     <property name="toolTip" >
+      <string>Set the project age (in days)</string>
+     </property>
+     <property name="whatsThis" >
+      <string>Change the project age (in days) by choosing a new number of days.</string>
+     </property>
+     <property name="minimum" >
+      <number>1</number>
+     </property>
+     <property name="value" >
+      <number>2</number>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>41</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>KColorButton</class>
+   <extends>QPushButton</extends>
+   <header>kcolorbutton.h</header>
+  </customwidget>
+ </customwidgets>
+ <includes>
+  <include location="local" >kcolorbutton.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>

Added: trunk/src/settings.kcfgc
===================================================================
--- trunk/src/settings.kcfgc	                        (rev 0)
+++ trunk/src/settings.kcfgc	2008-11-03 18:58:10 UTC (rev 460)
@@ -0,0 +1,6 @@
+# Code generation options for kconfig_compiler
+File=gtldesigner.kcfg
+ClassName=Settings
+Singleton=true
+Mutators=col_background,col_foreground
+# will create the necessary code for setting those variables


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/