-------------------------------------- Read: "http://root.bnl.gov/QtRoot/QtRoot.html#designer" -------------------------------------- "GeomBrowser" is a Qt "QMainWindow" application with the ROOT embedded "TCanvas" widgets and "QListView with TCheckListItem" members created automatically with Qt designer v. 3.3 (see: http://root.bnl.gov/QtRoot/GeomBrowserMain.png ) This example demonstrates the advanced technique to create the unique ROOT-based application with Qt gui This uses 1. QListView with QCheckListItem - that has no equivalent in ROOT gui http://doc.trolltech.com/3.3/qlistview.html http://doc.trolltech.com/3.3/qchecklistitem.html and 2. The TQtWidget - that to create the embedded TCanvas widget. That has no equivalent in QT gui. in addition 2. Qt main window with the "menu", "tool bar" and "status bar" and two embedded TCanvas widgets. 3. "Menu" and "Tool bar" options provide the standard facilities to "Open File", "Save" / "Save as" the current widget using the various image formats as well as ROOT TPad formats. 4. ROOT context menu is invoked automatically from the Qt "ContextMenu event" in additon 5. The high quality OpenGL view is rendered with the poweful QGLViewer http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer/index.html (no equivalent in the "native" ROOT gui either) and / or 6. with Coin3D viewer (see: http://www.coin3d.org ) etc. -------------------------------------- I. On Microsoft Windows (9x/NT/w2k/xp) PC. 1. Download the self-extracted Windows executable and install the ROOT with Qt extensions click the link "http://root.bnl.gov/QtRoot/downloads/new.exe" and select either a) "Open" to install it right away b) "Save" to keep the copy of the file for the re-distribution and further installation. 2. Start "ROOT" by clicking the ROOT icon. 3. Start "GeomBrowser.CC" ROOT macro. 4. Click "Open File" icon and navigate the directory tree to find and open $ROOTSYS/test/QtGBrowser/starcomplete.root file 5. Optionally you can download the full ATLAS detector geometry also http://root.bnl.gov/QtRoot/downloads/atlas.root -------------------------------------- II. On UNIX platfroms: 1. Install "ROOT Qt layer" and "ROOT Qt extensions": http://root.bnl.gov/QtRoot/How2Install4Unix.html 2. Download and unpack the Qt project directory: cvs -d :psedrver:cvsuser@cvs.bnl.ov:/data01/CVS co -d QtGBrowser root/qtExamples/QtGBrowser This example is included into the "Qt extensions" CVS repository. You may have skiped this step if you do the step 1. 3. To create the GeomBrowser application makefile for your platform do: a) you want all features provided by the "Qt Extensions": qmake GeomBrowserExtensions.pro b) you want try the basic things provided by the "Qt layer" alone: "qmake GeomBrowser.pro" 4. To build the application do: "make" (or "nmake" on wWindows ) 5. "make" creates the local version of the ROOT resource file ".rootrc" (if needed) a) you want all features provided by the "Qt Extensions" (see: 3a): "ln -s rootrcqtgui .rootrc" b) you want try the basic things provided by the "Qt layer" alone (see: 3b): "ln -s rootrcqt .rootrc" 6. To start the example "GeomBrowserExtensions [-style=windows | platinum | motif ]" or "GeomBrowser [-style=windows | platinum | motif ]" You can check the style available by running "qtconfig" utility 7. Click "Open File" icon and navigate the directory tree to find and open "starcomplete.root" file. This file is included into the example CVS repository. 8. Optionally you can download the full ATLAS detector geometry also http://root.bnl.gov/QtRoot/downloads/atlas.root 9. The browser can use the "shape icons". To get it one needs: 1. The shape icons from ROOT 5.08 "$ROOTSYS/icons" directory 2. The fresh (RROOT >= 5.08) version of $ROOTSYS/etc/root.mimies file One can define the custom look and feel of the GUI application. The number of the available different styles is defined by your local Qt installation. See: "http://doc.trolltech.com/3.3/qapplication.html#QApplication" for details and other command mode parameters. -------------------------------------- To change the design with the Qt "Designer" do 1. Start Qt "designer" with no parameter 2. Add the "Custom Qt Widget" description to your designer from $ROOTSYS/qt/inc/TQtWidget.cw Follow the Qt designer menu: "Tool" -> "Custom" -> "Edit Custom Widgets" -> "Load Description" 3. Close Qt "Designer" 4. Start the designer over with the project file: "designer RootBrowser.pro&" Note: The steps 1-3 are to be done at once per user account. Qt designer will keep the new custom widget definition with Qt designer resource file. Valeri Fine (fine@bnl.gov) last update Dec 6,2004