Oct ROOT 2002, CERN, Geneva Qt-Based Implementation of Low Level ROOT Graphical Layer By V.Fine.

Slides:



Advertisements
Similar presentations
Lecture 4: Embedded Application Framework Qt Tutorial Cheng-Liang (Paul) Hsieh ECE 424 Embedded Systems Design.
Advertisements

9/28/2005 ROOT 2005 Workshop CERN 1 Qt and ROOT by Valeri Fine STAR Brookhaven National Laboratory.
Linux vs. Windows. Linux  Linux was originally built by Linus Torvalds at the University of Helsinki in  Linux is a Unix-like, Kernal-based, fully.
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
June ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton.
Linux GUI X-Windows System. X-Windows System A stable and extremely powerful GUI system that provides a complete Client/Server framework. The X-org foundation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
QT Intro. 김기형
LAMAD Symbian Qt install and deploy Installing Qt SDK and deploying Qt applications.
Cross-platform approach to create the interactive application based on ROOT and Qt GUI libraries Rene Brun (CERN) Valeri Fine (BNL,
Qt Igor November 8, 2002 Friday’s HENP Group Meeting.
Linux Operations and Administration
Zubanov Alexei, 2006 Aug 07 – Sep 28 QtROOT package extension with Coin3D lib.
QtROOT a Qt interface to ROOT Denis Bertini GO4 GSI-Darmstadt 13/06/2001.
Valeri Fine (BNL, STAR) Whether it is feasible to benefit just from the two best technologies Using the Qt framework to create GUI.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Chapter 5: Defining the Role of the Operating System
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
GUI With GTK+ Under Linux Fanfan Xiong. Introduction GTK+ (GIMP toolkit) : A library for creating graphical user interfaces(GUI) Two examples developed.
Using the Qt to create complex interactive HENP applications at STAR by V.Fine, J.Lauret, V.Perevoztchikov.
Department of Computer Engineering Dongguk University Prof. Jin-Woo Jung T.A. Han-Mu Park
. The ideas behind Qt and a live demo Qt in Education.
© Paradigm Publishing, Inc. 4-1 Chapter 4 System Software Chapter 4 System Software.
Jericho CSCI 7818 September 5, 2001 Carissa Mills.
GLAST LAT Offline SoftwareCore review, Jan. 17, 2001 Review of the “Core” software: Introduction Environment: THB, Thomas, Ian, Heather Geometry: Joanne.
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev ROOT 2002 GSI Online Offline Object Oriented Go4.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
G.Govi CERN/IT-DB 1 September 26, 2003 POOL Integration, Testing and Release Procedure Integration  Packages structure  External dependencies  Configuration.
introductory lecture on java programming
TOPIC 7.0 LINUX SERVICES AND CONFIGURATION. ROOT USER Root user is called “super user” because it has power far beyond those of mortal user. As root,
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Program Libraries 1. What is a program library? A library is a collection of implementations of behavior, written in terms of a language, that has a well-defined.
Predrag Buncic (CERN/PH-SFT) Software Packaging: Can Virtualization help?
LCG AA Meeting 30 June 2004 Ilka Antcheva Graphics User Interface in ROOT.
OPERATING SYSTEMS (OS) By the end of this lesson you will be able to explain: 1. What an OS is 2. The relationship between the OS & application programs.
LCG AA Internal Review 30 March 2005 ROOT Graphical User Interface Ilka Antcheva, Bertrand Bellenot, Valeri Fine, Valeriy Onuchin, Fons Rademakers.
CMake: Experience in ALICE P. Hristov 19/06/12. History I Recursive makefiles (F.Carminati): – Problems in dependencies – Slow "Recursive Makefiles.
1. 2 Qt Toolkit ● C++ toolkit for cross-platform GUI application development – GUI functions (GUI = graphical user interface) – Data access components,
Computer System Structures
INTRO. To I.T Razan N. AlShihabi
Computer System Structures
Build and Test system for FairRoot
CST 1101 Problem Solving Using Computers
Mobile Application Development with MeeGo™ - Touch Apps & UI Design
Lecture 1-Part 2: Operating-System Structures
Computer Software Digital Literacy.
Chapter 2: Operating-System Structures
Marc-Elian Bégin ETICS Project, CERN
QtRoot project status and examples of its use at STAR
Computer Software Digital Literacy.
Introduction to Operating System (OS)
Introduction Enosis Learning.
QT graphical user interface framework
CernVM Status Report Predrag Buncic (CERN/PH-SFT).
Chapter 2: Operating-System Structures
Mobile Application Development with MeeGo™ - Programming with SDK
Introduction Enosis Learning.
Qt Programming.
Go4 CHEP 2001 Multithreaded Inter-Task Communication with ROOT -
Chapter 2: System Structures
The Designer.
Lecture 1-Part 2: Operating-System Structures
Constructors, GUI’s(Using Swing) and ActionListner
Go4 GUI and GSI's QtROOT interface
CMPE 135: Object-Oriented Analysis and Design March 14 Class Meeting
Go4 GUI and GSI's QtROOT interface
Web Application Development Using PHP
Presentation transcript:

Oct ROOT 2002, CERN, Geneva Qt-Based Implementation of Low Level ROOT Graphical Layer By V.Fine

Oct ROOT 2002, CERN, Geneva ROOT Low Level Graphics Level It is well-known that ROOT package has been ported to many different platforms which include the various flavors of UNIX as well as Windows. Such portability is provided thanks a few built-in “abstract” interfaces that separate the core ROOT logic from particular operating systems and low-level graphics layer. Even though such architecture allows keeping ROOT platform independent, it still needs to contain the separate platform depended (X11 or Win32) parts for each platform one wants to port ROOT to. That is difficult to maintain and error prone.

Oct ROOT 2002, CERN, Geneva ROOT low level GUI interface TVirtualX TGX11TGWIN32TGWin32GDK ROOT (TG ROOT (TVirtualPad) 3 different implementations to develop and support

Oct ROOT 2002, CERN, Geneva Why Qt? On the other hand, most tasks to be performed have no ROOT specific and have been successfully solved by other packages. Qt package from TrollTech AS was especially attractive not only due to its superior quality and high level technical support but because it comes with the source code and tools to build it in place (including a commercial version for Windows). The rich set of Qt documentation can be found on Web and available from the leading publishers as well. Qt is a multi-platform C++ application framework that developers can use to write single-source applications that run-natively-on Windows, Linux, Unix, Mac OS X and embedded Linux. Qt has been used to build thousands of successful commercial applications worldwide, and is the basis of the open source KDE desktop environment.

Oct ROOT 2002, CERN, Geneva Why Qt ? It does what it promises ! Myself have been confused no time with Qt documentation and functionality The plain implementation of TVirtualX that doesn’t bring any new feature can not justify the efforts to introduce a new extra layer and external dependency of the ROOT package

Oct ROOT 2002, CERN, Geneva ROOT Qt-based GUI interface TVirtualX TQt ROOT only one (!) implementation

Oct ROOT 2002, CERN, Geneva Qt-based implementation The Qt-based layer comes with 2 separate subpackages those are to be compiled into two separate share libraries (DLLs), libQt and libQtGui. The first is mandatory and it provides the C++ class TQt. The second class is to provide the concrete implementations of the abstract interfaces defined by TGuiFactory class, namely: –TCanvasImp, –TBrowserImp, –TContextMenuImp, –TControlBarImp, –TInspectorImp –TGLViewerImp etc The final goal here is to create a set of simple Qt-widgets those can be used to create sophisticated GUI interfaces with the standard components (for example a custom version of TBrowser )

Oct ROOT 2002, CERN, Geneva ROOT vs Qt To run ROOT –Create TApplication –Enter ROOT event loop TApplication::Run To run Qt –Create QApplication –Enter Qt event loop QApplication::exec() This implementation: TApplication QApplication TApplication::Run() QApplication::exec() Bottom line: No need to deal with QApplication!

Oct ROOT 2002, CERN, Geneva Qt Root “Hello Word” 1. t1.pro – Qt “Hello Word” project file 2. main.cxx – Qt “Hello Word” source file TEMPLATE= app CONFIG+= qt warn_on release HEADERS= SOURCES= main.cpp TARGET= t1 REQUIRES=small-config #include int main( int argc, char **argv ) { QApplication a( argc, argv ); QPushButton hello( "Hello world!", 0 ); hello.resize( 100, 30 ); a.setMainWidget( &hello ); hello.show(); return a.exec(); }

Oct ROOT 2002, CERN, Geneva Change source to make C++ class: #include int main( int argc, char **argv ) { QApplication a( argc, argv ); QPushButton hello("Hello world!",0); hello.resize( 100, 30 ); a.setMainWidget( &hello ); hello.show(); return a.exec(); } helloWord.h: class helloWord { public: helloWord(){ main();} int main(); }; helloWord.cxx: #include “helloWord.h” #include static helloWord t1; int helloWord::main() { // QApplication a( argc, argv ); static QWidget a; static QPushButton hello( "Hello world!", &a ); a.resize( 100, 30 ); // a.setMainWidget( &hello ); a.show(); // return a.exec(); }

Oct ROOT 2002, CERN, Geneva Adjust Qt project file: TEMPLATE= app CONFIG+= qt warn_on release HEADERS= SOURCES= main.cpp TARGET= t1 REQUIRES=small-config TEMPLATE= lib CONFIG+= qt warn_on release dll HEADERS= SOURCES= helloWord.cxx TARGET= t1 win32:INCLUDEPATH = %ROOTSYS%/include unix:INCLUDEPATH = $(ROOTSYS)/include win32:LIBS = %ROOTSYS%\lib\libCore.lib %ROOTSYS%\lib\libQt.lib

Oct ROOT 2002, CERN, Geneva Now we can build and execute it: Build makefile (for either platform): qmake helloWord.pro Create a share library or DLL (for either platform): make Start ROOT and load it: root root [0] gQt- >LoadQt("libt1")

Oct ROOT 2002, CERN, Geneva More complex Qt / ROOT example

Oct ROOT 2002, CERN, Geneva One can enjoy QT designer

Oct ROOT 2002, CERN, Geneva Where? Download it right NOW. And try !!! Just click “Download” and “Run” from there

Oct ROOT 2002, CERN, Geneva Qt-ROOT CVS The source code is available via CVS repository as well. To check out the sources, you need to be running CVS 1.10 or later (check by doing cvs -v), and have your $CVSROOT set to The password for user cvs is cvs. Two cvs commands will do the job: cvs -d login cvs -d co root

Oct ROOT 2002, CERN, Geneva Conclusion The present approach allows the ROOT developer as well as ROOT user to work with code that has no X11/ WIN32 graphics subsystem dependencies and at the same time opens unrestricted access to a rich set of ready-to-use commercial and free GUI Qt-based widgets. The Qt-based version was tested on Unix and Windows and available from the Physics Application Software (PAS) group of the Brookhaven National Laboratory CVS repository (