17
June 26,2002 [email protected] ACAT2002, Moscow Cross-Platform Qt- Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,[email protected] ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Cross-Platform Qt-Based Implementation of Low Level

GUI Layer of ROOT

V.Fine

BNL, Upton

Page 2: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Why ROOT is multi-platform ?

•Just to be healthy !•Just because there are plenty of Windows users around

Page 4: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

ROOT low level GUI interface

TVirtualX

TGX11TGWIN32 TGWin32GDK

ROOT(TG<family

>

ROOT(TVirtualPad)

3 different implementations to develop and support

Page 5: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

ROOT Qt-based GUI interface

TVirtualX

TQt

ROOTROOT

only one (!) implementation

Page 6: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

What is Qt

Page 7: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Why Qt ?It does what it promises !

Myself have been confused no time with Qt documentation and functionality

But it is not my (ROOT user) business to make the ROOT team life more easy.

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

Page 8: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

(ROOT + Qt) based applications

The question is:

“How easy can one create a complex application that uses ROOT to do what only ROOT can provide (namely the features coming from the built-in C++ interpreter) and use Qt to create cross-platform GUI ? ”

Page 9: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

libQtgui library

Qt-based ROOT consists of a standard ROOT installation with the addition of two additional shared libraries

The libQtGui library contains implementations of abstract interfaces provided by the TGuiFactory ROOT class:

• TCanvasImp

•TBrowserImp

•TContextMenuImp

•TControlBarImp

•TInspectorImp

1 day to implement !2 days to implement0.5 day to implement

Page 10: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Qt designer to create ROOT embedded canvases

Page 11: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

A test application to combine ROOT and Qt Widget

Page 12: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Where to get Qt-ROOT from

Page 13: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Qt-ROOT FAQ

Page 14: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

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

:pserver:[email protected]:/rootbnl/cvs

The password for user cvs is cvs.

Two cvs commands will do the job:

•cvs -d :pserver:[email protected]:/rootbnl/cvs login

•cvs -d :pserver:[email protected]:/rootbnl/cvs co root

AFS access will be provided also.

Page 15: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

ConclusionThere are enough evidences the present approach allows the ROOT developers as well as ROOT users 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.

Page 16: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

Thank you

Special thanks:

1. Torre Wenaus, Yuri Fisyak, Victor Perevoztchikov

2. Anton Fokin

3. Christian Holm Christensen

4. ROOT team

5. ROOT folks from ROOTTALK

Page 17: June 26,2002fine@bnl.gov ACAT2002, Moscow Cross-Platform Qt-Based Implementation of Low Level GUI Layer of ROOT V.Fine BNL, Upton

June 26,2002 [email protected], Moscow

0. Long lasting application

No penalty

1. Very wide used on Linux system (KDE)

2. Shipped with the source code and installation script

(no technical to take over but legal issue).

1. What is accepted level:

1. one pixel was that reliable level

2. dialog window is a mandatory attibute of any system

ROOT is designed like we 20 years ago

2. Qt - quality

library of Widget

weel-though separation of the automaically generated GUI and

user-provided custom actions. (Tha tallow to share GUI across applications)

3. Functionality: They treat MS a GUI standard

3. What ROOT may end up with. The best scenario we will ned up with somethin

Qt alike but in many years.

4. Price:

1. Free for non-commercial applcation on X11 platform

2. True cross platform (code designed and debugged on with free UNIX will

work in Windows

3. This allow to minimiz the number of Windows license

4. Windows license is really cheap anyway (acad. price $700/developer)

our experiecne did prove this worth to buy. It is much faster and better

to create GUI with Qt rather struggle with TG<classes>

4.1. Lack of documentation

4.2. Lack of functionality

5 License.

Qt 2. restrictive

Qt 3. can be accepted