From KitwarePublic
Jump to: navigation, search

Work Journal In Detail

This is the full version of the work journal. It *hopefully* details every step followed, approach taken and, if pertinent, results or pending status of my KWWidgets UI-Designer project.


Throughout the duration of my contribution to this project, an intensive e-mail exchange between the KWWidgets team and me, Juan Carlos Bermúdez, was held. Use this link to access those emails.

1rst project week


First preliminary meeting with Mr. Grunenwald to discuss the highlights of the project and its main goals.


Installation and configuration of a Linux-based workstation. Ubuntu 5.10 with gcc4.0, tcl/tk8.4, libxml2.
Download of the CMake and VTK sources. The download of the KWWidgets library failed, due to a connectivity problem, perhaps due to school's firewall restrictions. Error message to the cvs command indicated in the wiki was "cvs [login aborted]: connect to failed: Connection refused". (see entry of 03/23/2006 for a solution)


Installation of the CMake package.
Compilation and installation of the VTK library following the instructions found in*checkout*/README.html#Compilation
  • Chose an out-of-source build
  • Replaced the typical ccmake call to "env CC=path_to_C_compiler CXX=path_to_CXX_compiler ccmake path_to_VTK"
  • Error message prompted, as the 'make' package wasn't installed -> installed 'make' version 3.80-9
  • Error message prompted stating "OPENGL_INCLUDE_DIR (ADVANCED)" and "OPENGL_gl_LIBRARY (ADVANCED)" are required variables and they are not found -> installed 'freeglut3-dev' which included 'libgl1-mesa-dev', 'libglu1-mesa-dev' and 'x11proto-gl-dev'
  • Configuration with CMake rendered no further error. VTK compiled without error.
The cvs problem was reported to Sebastien Barre in order to get further instructions.


After reception of an email from Sebastien Barre, an email was sent to Mr. Voumard, school's sysadmin, in order for him to contact the KWWidgets' sysadmin to resolve the access problem to the CVS server. (Status see entry of 03/23/2006 for a solution)
Redaction of the first version of the project plan. This version was shown and pre-approved by Mr. Grunenwald.
Retrieval of the KWWidgets sources using a windows workstation where the ISA Server Client was installed.
First weekly meeting with Mr. Grunenwald.
Installation and configuration of a VNC server. Used apt's front-end Synaptics for this.


While preparing compilation of the KWWidgets library the following problems were encountered
  • CMake wasn't able to find the '' library -> adding the path where the vtk libraries were installed, in my case '/usr/local/lib', to the file '/etc/' and executing a 'sudo /sbin/ldconfig -v' solved the problem.
  • CMake wasn't able to find the '' library, which wasn't installed in the system, but remained in the build directory -> specifiying the 'VTK_DIR' as the path to the vtk build directory solved this and the compilation process ended successfuly.

3rd project week


Brief test of the KWWidgets samples compiled and installed into the system, just to get a quick to of what they look like and how they interact.
The wiki pages were created and edited. The local version of the work journal and the project's plan were uploaded to this pages. From this point on the work journal should be located and worked upon in the wiki pages. Some extra useful informations were retrieved from this site


The wiki pages were updated to use the proper namespacing style, i.e. "KWWidgets/Projects/UIDesigner/<SubLevel1>[/<SubLevel2>...]", for internal links and pages' name.
The first version of the use-case diagram of the KWWidgets UI-Designer was drawn and uploaded to the wiki pages. This diagram list just the most basic use-case scenarios. It will certainly change with time and application's specifications. The diagram is available here.
Redaction of an exhaustive criteria list for the comparison study of existing UI-designers Glade, Qt-designer and Visual Studio. This list was sent via e-mail to the different members involved in the projet for comments/suggestions/modifications. This list is available here.


After having upgraded to Dapper Drake several problems were encountered, like X server locking while trying to log-in, dynamic libraries not found, VTK and KWWidgets not running, among others. Instructions found on this site were followed to no avail.
Reinstallation and reconfiguration of the Linux workstation due to the problems mentionned above.


Continue the reconfiguration of the Linux workstation and compilation of the VTK. The reconfiguration was not finished, as the personnel needed the computer to prepare it for school's open-doors days.
Received feed-back from Mr. Grunenwald concerning the criteria list for the comparison study. Some new points were suggested.
A response concerning the connection to KWWidgets' cvs server was received. It is explained that in order to gain connectivity through school's proxy server one has to use the tsocks package. More info about this package can be found here.


The criteria list for the comparison study of existing UI designers was updated to include suggestions made by Mr. Grunenwald.
Added a 'Previous Works' section for the comparison study of some existing UI designers. This section has links to individual pages listing the results of the study. This section is reachable here.
Fix some broken internal links in some pages that pointed to empty pages.
Started the comparison study by reviewing Glade. Information on Glade and on the supported widgets were found on the following sites :

4th project week


Finish the reconfiguration of the Linux system : recompilation of the KWWidgets library. Reconfiguration of the vnc4server (note : on Debian based installations one has to create a soft-link in the "/usr/X11R6/lib/X11" directory to the "/usr/share/X11/fonts" directory, else the Xvnc server won't start up, since it assumes fonts are located in the former directory instead of parsing the xorg.conf file or the output of the "xset q fp" command). Installation of msttfcorefonts and other Windows fonts; information on this was found on this page.
Continue the comparison study started 03/26/2006. Finished the first two parts of the comparison study for Glade, namely the listing of the proposed widgets. Sent an email to the KWWidgets team members to ask for feedback upon the listing of the widgets.
Installed the 'glade-doc-2' package in order to have the off-line documentation for glade-2.


Continue the comparison study started 03/36/2006 for Glade. Finished the 'Disposition of tools in the environment and the environment itself' section.
First meeting with Mr. Stalder, the project's expert, to make acquintance and present the project, its current advancement and future projections.


Continue the comparison study started 03/26/2006 for Glade. Finished the 'Using the designer' section. Uploaded the results and sent e-mail to the KWWidgets team for feed-back.


Continue the comparison study by reviewing Qt-Designer. A preliminary phase of acquiantace was necessary as I have not manipulated this software in the past. Information on Qt Designer and the Qt API was found on these pages
The listing of widgets was easier to do, as Qt-Designer displays and labels all its widgets in a single window, so a screen-shot was sufficient.


Continue the comparison study for Qt-Designer. Added links to the preliminary results of the comparison study of Qt-Designer. Finished mos of the 'Disposition of tools in the environment and the environment itself' section.
Updated links and reformated some of the pages.

5th project week


Continue the comparison study for Qt-Designer. Finished the 'Disposition of tools in the environment and the environment itself' section. Started the 'Using the designer' section. Using the designer to achive the same layout as with Glade was really difficult, as layout manager don't work the same way as Glade and it was the first time I used Qt Designer.


Continue the comparison study for Qt-Designer. Finished the 'Using the designer' section.
Checked for syntax mistakes in the pages of the comparison study.


Checked for orthograph mistakes in the pages of the comparison study.
Took, edited and uploaded screen-shots for the pages of the comparison study of both Glade and Qt Designer. The results were re-read to decide what would be the best screen-shots to use.


Started the comparison study for Visual Studio 2005. Got acquiantanced with the IDE.
To freshen-up my mind a bit started reading reference documentation for TCL/TK.


Continue reading reference documentation for TCL/TK.


Continue reading reference documentation for TCL/TK.

6th project week


Continued reading reference documentation for TCL/TK.


Updated the wiki pages: deleted notes stating screen-shots for the comparison study results were missing, and updated the work journal.
Continued the comparison study for Visual Studio 2005. Managed through the half of the 'Disposition of tools in the environment and the environment itself' section.


Uninstalled Visual Studio 2005 french version and installed Visual Studio 2005 english version to have pertinent translations and for the screen-shots with english text. (Note a simple 'overwrite' installation does not work as the system always chooses to use the french version)
Changed uploaded screen-shots for new ones using the Visual Studio 2005 english version.
Continued and ended the comparison study for Visual Studio 2005.


Checked for syntax and orthographic mistakes in the page of the comparison study for Visual Studio 2005.
Updated the wiki pages to include links to the comparison study for Visual Studio where pertinent.
Continued the comparison study by reviewing the NetBeans IDE. This part of the study will not explain in detail every single aspect of the IDE, just what's is relevant to UI designing, it will focus on all the items of the comparison criteria list, but will only point out the "DO" and "DONTS".

7th project week


Continued the comparison study for NetBeans.


Finished the comparison study for NetBeans. Results can be found here
Begun the summary of features we want for KWWidgets UI Designer based on the results retrieved from the comparison study


Finished the summary of features. An e-mail was sent to the KWWidgets team asking for feed-up on this summary.
Started to read the reference documentation of KWWidgets. Started off by reading the class list with brief descriptions. While reading each in-depth class description, the 'KWWidgets Tour Example' was run to get acquiantance with the look and fonctionality of the different widgets.
Read chapter 9 'Contributing Code' of the VTK User's Guide book to get to know the coding style used in VTK. Sent an e-mail to Sebastien Barre to get further information about coding style in KWWidgets.


Continued and finished reading the reference documentation of KWWidgets.
To summarized the API furnishes many interesting classes, like vtkKWApplication a class that controls an entire application with a default top-level window with a menu and a status bar and a main frame, vtkKWBalloonHelpManager a manager for tool-tips, vtkKWLanguage for language support, vtkKWRegistryHelper for (re)storing data relative to an application, vtkKWResourceUtilities for managing resources, among others including a vast range of standard and composite widgets. But the more interesting classes are vtkKWTclInteractor for executing Tcl commands, vtkKWTkcon a wrapper on the Tk console, and the most interesting of them all *IMHO* vtkKWTkUtilities which provides methods to perform common Tk operations.
Started reading reference documentation for Tk. Used the book 'Practical Programming in Tcl and Tk' as the main reference. Started off with chapter 23 'Tk fundamentals' and chapter 24 'Tk by Example'.


Continued reading the book 'Practical Programming in Tcl and Tk'. Managed through chapter 25 'The Pack Geometry Manager', chapter 26 'The Grid Geometry Manager' and chapter 27 'The Place Geometry Manager'. Where necessary the book was browsed to look for related topics.


Finished reading the 'Tk basics' section by reading chapters 28 'The Panedwindow Widget' and chapter 29 'Binding Commands to Events'.
Re-browsed briefly the KWWidgets API reference documentation while comparing certain points with the topics read in the book. A better understanding of the KWWidgets API was acquired.
Study in detail the source code of the 'KWHelloWorld' example based on the freshly acquired notions from the API.

8th project week


Updated the work journal.
Briefly browsed the 'Tk Widgets' and 'Tk Details' section of the book 'Practical Programming with Tcl and Tk' to get acquaintanced with all the options widgets can have. After browsing these sections one realizes that, even though a big part of the Tk options of the widgets are wrapped, certain are missing. After discussing this point with Mr. Grunenwald an an email will be sent, if necessary, to Sebastien Barre to ask if one should limit to the wrapped options of if one should use the 'vtkKWCoreWidget::SetConfigurationOption' to set the non-wrapped options, for instance the 'cursor' option for buttons among other options.
Updated the project plan to reflect the actual time spent on every step.
Updated the 'use-case' diagram to reflect the features summarized by the comparison study.
Read the examples found in the 'Examples' section.
Sketched a preliminary layout for the designer. It will be sent to Wendy Plesniak and the rest of the KWWidgets team for feed-back.


For testing purposes, the sources of the 'KWHelloWorldExample' application were copied into an isolated folder and tried to be compiled using CMake. The first attempt was to run 'ccmake .', but CMake complained about a missing 'CMakeLists.txt' file. The second attempt was using a copy of the 'CMakeLists.txt' file found in the KWWidgets examples folder. The process went O.K.. A third attempt was done editing the 'CMakeLists.txt' copy to include just the necessary parameters and to juggle around with options. The documentation of CMake was read to have a better understanding of every possible option one can find in a 'CMakeLists.txt' file.
After having read this tutorial another attempt was made to compile the 'HelloWorld' example using a 'CMakeLists.txt' file from scratch including just the 'PROJECT' and the 'ADD_EXECUTABLE' options. Problems encountered:
  • While configuring, CMake complained about having to force the C++ compiler version to match the one used to compile KWWidgets, even though the version wasn't changed. This is a repetitive error and can be *savely* ignored.
  • While 'make'-ing the project references to vtkKW*.h files were not found. To resolved this two more options were added 'FIND_PACKAGE(KWWidgets REQUIRED)' and 'INCLUDE(${KWWidgets_USE_FILE})', reconfigured with ccmake and re-'make'-d. More problems were found, because methods and classes were not found, for example 'vtkKWApplication::InitializeTcl'. At this point a decision was made to stop the attempts and to use a 'customized' version of the 'CMakeLists.txt' file furnished with the 'HelloWorld' example.
A couple of IDE and text editors were tested to make a decision on which one would be the best fit.
The key point was autocompletion.
Gedit, Kate, Kedit and anjuta, version 1.2.4, were tested and rejected: the first three ones presented or lacked a very basic autocompletion implementation and the later one presented autocompletion just on word entered on a given project, external header parsing was not featured.
Version 2.0.1 of anjuta was compiled from source code as they claim autocompletion is much more robust than their present stable version, but it was just too unstable displaying text that the idea of using version 2.0.1 was discarded.
Eclipse 3.1.3, with CDT, was tested and approved: it is a very rich IDE which can be configured in almost any imaginable way and its autocompletion implementation is really robust --language keywords, external header files parsing, current project files parsing, code section templates, e.g. complete declaration of a switch structure triggered just by typing 'switch', etc...--.
An attempt was made to 'convert' the 'HelloWorld' example into the dummy application developped for the comparison study of existing UI designers. While browsing the KWWidgets forums for information about adding menus and menu entries, by chance information about how to specify CMakeLists.txt files was found here, information written by Sebastien Barre.
After having read this thread while searching for more information about menus and menu entries, a decision was made to re-retrieved and recompile the cvs sources.
An attempt was made to use 'Doxywizard', a GUI for doxygen, to generate the KWWidgets API reference documentation as was lacking an internet connection. The process went O.K., but the resulting pages were deprived from the classes/methods descriptions. Several tries using different tweacks were performed, but the result was always the same: not description for classes/methods. This approach was abandoned and as soon as an internet connection was stablished a tar-ed file containing the reference documentation was downloaded.


After having tested 'Eclipse' a malfunction, which was reported to the Eclipse/CDT newsgroup, was encountered and another IDE was tested: KDevelop. The malfunction was not present in KDevelop, thus this will be the IDE chosen to develop the UI-Designer. The glitch present in the CDT indexer is indeed a big loss, since using Eclipse will render projects 'portable' and thus speed development: no need to recreate a new project while switching OS, to import source code, to set include/library paths, etc...
A brief study was undertook to decide which will be the best tool-kit for creating 'KWWidgets UI-Designer'. A priori personal decision was made to use KWWidgets to develop the designer, but this study will reflect if this premature decision was the right one. A 'mini' criteria grid will be conceived for this study.
A quick research was perform to look for existing user interface designers written in Tk, which could give me ideas of how to accomplish basic things like selecting/resizing widgets. An archaic Sun project named SpecTcl was found and the code for selecting/resizing was studied. The main idea consists on using widgets as containers to layer new frames on top and change the attributes of these new layer not the properties of the underlying widgets. Anything can be layered on top of the widgets and added into the superposed frames, even transparent images if using tk8.4.


Updated wiki pages to reflect the project's progress.
Uploaded a second version of the application's 'use-case' diagram reflecting the summary of features obtained from the comparison study.
Uploaded a sketch defining a preliminary layout for the designer.
Sent an email to the KWWidgets team to inform about the project's progress and to ask many important questions.


Started to define a working plan for the rest of the project's duration in which all the essential features will be listed. Tasks are divided into as many sub-tasks as possible.

9th project week


Modified and uploaded a third version of the use-case diagram. This version is a revision of the second version and adds a new use-case: consulting of off-line documentation.
Answered e-mails to Wendy, Steve and Sebastien. Modifications were performed following indications in their e-mails.
Modified the third version of the use-case diagram according to the remarks of the KWWidgets team.


Established a time-line for the rest of the project's duration. This time-line lists the main tasks Sebastien would like to see implemented by the end of the project.
The "HelloWorld" example was modified to follow a more C++ structure. The resulting "canvas" was submitted to Sebastien for input. The most important thing to stressed out is that a TCL interpreter, an instance of Tcl_Interp, MUST be initialized BEFORE any instantiation of a vtkKWApplication.


Updated the wiki pages:
Uploaded the time-line *approved* by Sebastien. A pretty ambitious time-line, since the KWWidgets learning curve has not been "conquered" yet.
Updated the work journal.
Uploaded a mock-up of the designer's interface proposed by Sebastien.
Studied the tcl/tk sources of the mock-up proposed by Sebatien.


Followed the indications and remarks of Sebastien, concerning the modifications made 05/04/2006 on the 'HelloWorld' example, and remodified the 'HelloWorld' example.


'Ported' the tcl/tk sources of the mock-up into C++. Used the re-structure of the "HelloWorld" example as a 'frame-work' basis. The resulting sources were submitted to Sebastien for input.

10th project week


Recompiled VTK activating the 'VTK_DEBUG_LEAKS' CMake option. This is a pretty critical debugging feature, which will tell you if you forgot to call Delete() on the objects you allocated with New(). It will tell you that when you exit your program
Recompiled KWWidgets using the newly recompiled VTK API.


Modified the work started 05/07/2006, following indications and remarks made by Sebastien. The results were submitted to Sebastien.


Listed all the KWWidgets widgets under categories, based on the Qt Designer 'Widgets' window's categories. The *proposed* categories are: "Buttons", "Input widgets", "Items Views", "Display widgets", "Containers", "Spacers", "Menu and Toolbars", "Windows" and "VTK Widgets".
Defined an XML structure for the list of available KWWidgets widgets and their properties.
The categories list and the XML structure was submitted to the KWWidgets team for input.


Updated the work journal.
Wrote a compilation of VTK/KWWidgets coding style conventions based on the e-mails' content exchanged with Sebastien Barre.


Tried to compile the VTK API using MinGW, the GNU C/C++ compiler for Windows, under Windows. Several tries resulted in failures. Some of the failures concerned CMake not finding certain .lib files, others concerned specifications of non-found libraries, which IMHO came from the fact the Makefiles did not include all of the needed libraries.


Continue the task started 05/13/2006. Retrieved and installed the latest CMake version, i.e. 2.4.2, and the lattest CVS VTK version, i.e. version of May the 14th, 2006. The generation of the Makefiles went OK, though the compilation process got further then the previous tries, an error occurred. After having found a page by Mr. Barre, in which it is explained how to compile VTK 2.0 under Windows, the specific Tcl/Tk libraries for MinGW were retrieved and compiled. The compilation of VTK and KWWidgets was a success. The process is explained here, where all the encountered problems and solutions are enumarated and explained.

11th project week


Second interview with the project's expert, Mr. Stalder. Presented and explained the progress of the project.


Studied and analized the documentation reference of the vtkXMLDataElement, vtkXMLParser, vtkXMLFileReadTester and vtkXMLUtilities classes. This classes, or classes inherited from this ones, will serve to implement a method to parse the XML file listing the available KWWidgets.


Continued the study on the vtkXML* classes.
Sent an email to Sebastien, asking what is the way to extract the nodes' information of XML files while parsing such files.
Found a post on the VTK forum, where it is explained which methods should handle the extraction of information. The post is found here:
Subclassed the vtkXMLFileReadTester class to verify a given XML file is a valid KWWidgets file which contains the list of available KWWidgets.


Subclassed the vtkXMLParser class to parse and extract the information of the XML file containing the list of available KWWidgets widgets. This was done in order to populate the 'Widgets' control panel and to create an XML hierarchy which reflects the contents of the XML file.
Submitted the changes to Sebastien Barre asking for input.
Based on the "WidgetsTour" example, added a call-back to the "SelectionChanged" event on the tree of the 'Widgets' control panel. Again the changes were submitted to Sebastien Barre.


Changed the code and the architecture based on the remarks made by Sebastien Barre.
Implemented a method to populate the 'Properties' control panel when a given entry in the 'Widgets' control panel tree is selected.


Started to implement a method to export the contents of the XML hierarchy managed in memory into an XML file using the vtkXMLUtilities class. The code of that class had to be extensively studied, since there's a big lack of documentation.


Finished the implementation of the method started 05/19/2006.
Submitted the changes to Sebastien Barre asking for input.

12th project week


Solved the memory leaks problem. The problem was solved by calling the Delete method after the AddWindow method was called.


Retrieved and re-compiled the KWWidgets CVS-sources in order to profit from the lattest changes, e.g. the vtkKWMenu class won't complain about adding/inserting into negative indexes, 0 is assumed in this cases.


Summary of most important changes applied during this week:
-) code lines don't exceed 78 characters of length.
-) extensive comments on the header files.
-) updated the VTK/KWWidgets coding conventions page to reflect pointers given in previous emails.
-) changed the architecture of the XML file listing the available KWWidgets widgets.
-) the 'Hierarchy' control panel tree gets dynamically populated as widgets are added or removed.
-) added a PIMPL map to managed the added widgets.
-) sketched a state-machine diagram to follow the creation and addition of widgets.
-) added the possibility to add vtkKWTopLevels and vtkKWPushButtons.

13th project week


Sent an email to Sebastien Barre explaining the changes and new implementations of last week, the problems encountered and asking for feed-back.


Started the redaction of the final project paper.


Continued the redaction of the final project paper.


Continued the redaction of the final project paper.


Continued the redaction of the final project paper.


Continued the redaction of the final project paper.


Continued the redaction of the final project paper.

14th project week


Finished the redaction and submitted the final project paper.


Worked on the state-machine diagram for the creation of widgets.


Updated the Wiki: the work journal, a section about how to compile VTK under Windows with MinGW.

KWWidgets: [Welcome | Site Map]