ApplicationWindow Class Reference

Simple example using QMainWindow together with an QRootCanvas. More...

#include <qtroot.h>

List of all members.

Public Member Functions

 ApplicationWindow ()
 ~ApplicationWindow ()

Protected Slots

void myclose ()
void newDoc ()
void load ()
void load (const char *fileName)
void save ()
void saveAs ()
void print ()
void about ()
void aboutQt ()
void execute ()
void clear_histo ()
void closeQtRoot ()

Protected Member Functions

void closeEvent (QCloseEvent *ce)

Private Attributes

QString filename
QPrinter * printer
TQRootCanvasaCanvas
TQRootCanvasaCanvas2
TH1Fhisto
TF1sqroot
TFormulaform1
TPadpad1
TPadpad2
QTabWidget * tab
QWidget * central


Detailed Description

Simple example using QMainWindow together with an QRootCanvas.

Main Qt&Root Application Window:

Simple Example how to use a QMainWindow class embedding a ROOT Canvas attached as its Central Widget.

Services: Simple example

See also:
QRootCanvas, QMainWindow, QPopupMenu, QAction, QString
Authors:
Denis Bertini <d.bertini@gsi.de>
Version:
2.0

Definition at line 72 of file qtroot.h.


Constructor & Destructor Documentation

ApplicationWindow::ApplicationWindow (  ) 

Definition at line 116 of file qtroot.cpp.

References about(), aboutQt(), aCanvas, aCanvas2, c1, TCanvas::cd(), TPad::cd(), clear_histo(), clearHisto, close, TGraph::Draw(), TF1::Draw(), TH1::Draw(), TPad::Draw(), execute(), fileopen(), fileOpenText, filePrintText, fileSaveText, form1, TQRootCanvas::GetCanvas(), TPad::GetFrame(), TGraph::GetHistogram(), gr, help(), histo, i, load(), TPad::Modified(), n, newDoc(), pad1, pad2, print(), printer, TCanvas::Resize(), save(), saveAs(), TWbox::SetBorderMode(), TWbox::SetBorderSize(), TAttFill::SetFillColor(), TPad::SetGridx(), TPad::SetGridy(), TAttLine::SetLineColor(), TAttLine::SetLineWidth(), TAttMarker::SetMarkerColor(), TAttMarker::SetMarkerStyle(), TFormula::SetParameters(), TGraph::SetTitle(), TH1::SetXTitle(), TH1::SetYTitle(), SHIFT, TMath::Sin(), sqroot, tab, TCanvas::Update(), updateHisto, void, x, and y.

ApplicationWindow::~ApplicationWindow (  ) 

Definition at line 284 of file qtroot.cpp.

References aCanvas, histo, and printer.


Member Function Documentation

void ApplicationWindow::closeEvent ( QCloseEvent *  ce  )  [protected]

Definition at line 359 of file qtroot.cpp.

References TList::FindObject(), TROOT::GetListOfCanvases(), gROOT, and save().

void ApplicationWindow::myclose (  )  [inline, protected, slot]

Definition at line 83 of file qtroot.h.

References close.

void ApplicationWindow::newDoc (  )  [protected, slot]

New incoming functionality documentation

Definition at line 328 of file qtroot.cpp.

Referenced by ApplicationWindow().

void ApplicationWindow::load (  )  [protected, slot]

IO Loading:

Definition at line 334 of file qtroot.cpp.

References TMVA::null(), and statusBar().

Referenced by ApplicationWindow().

void ApplicationWindow::load ( const char *  fileName  )  [protected, slot]

IO Loading function:

Definition at line 343 of file qtroot.cpp.

void ApplicationWindow::save (  )  [protected, slot]

Saving results function:

@ etc...

Definition at line 347 of file qtroot.cpp.

Referenced by ApplicationWindow(), and closeEvent().

void ApplicationWindow::saveAs (  )  [protected, slot]

saving pictures, in different supported formats

Definition at line 351 of file qtroot.cpp.

Referenced by ApplicationWindow().

void ApplicationWindow::print (  )  [protected, slot]

print results in a specified format

Definition at line 355 of file qtroot.cpp.

Referenced by ApplicationWindow().

void ApplicationWindow::about (  )  [protected, slot]

online help about Qt&Root Main Application

Definition at line 394 of file qtroot.cpp.

Referenced by ApplicationWindow().

void ApplicationWindow::aboutQt (  )  [protected, slot]

online help about this Qt based Application

Definition at line 401 of file qtroot.cpp.

Referenced by ApplicationWindow().

void ApplicationWindow::execute (  )  [protected, slot]

Main slot action upon ROOT classes

Definition at line 303 of file qtroot.cpp.

References aCanvas, TCanvas::cd(), TPad::cd(), TH1::Draw(), TH1::Fill(), TQRootCanvas::GetCanvas(), gRandom, histo, i, kUPDATE, TPad::Modified(), pad1, random, TRandom::Rannor(), TRandom::Rndm(), and TCanvas::Update().

Referenced by ApplicationWindow().

void ApplicationWindow::clear_histo (  )  [protected, slot]

Main slot to reinitialize the objects

Definition at line 292 of file qtroot.cpp.

References TH1::Draw(), TROOT::GetSelectedPad(), gROOT, histo, TVirtualPad::Modified(), TH1F::Reset(), and TVirtualPad::Update().

Referenced by ApplicationWindow().

void ApplicationWindow::closeQtRoot (  )  [inline, protected, slot]

Definition at line 148 of file qtroot.h.

References close, TSystem::Exit(), and gSystem.


Member Data Documentation

QString ApplicationWindow::filename [private]

Definition at line 156 of file qtroot.h.

QPrinter* ApplicationWindow::printer [private]

Definition at line 157 of file qtroot.h.

Referenced by ApplicationWindow(), and ~ApplicationWindow().

TQRootCanvas* ApplicationWindow::aCanvas [private]

Definition at line 158 of file qtroot.h.

Referenced by ApplicationWindow(), execute(), and ~ApplicationWindow().

TQRootCanvas * ApplicationWindow::aCanvas2 [private]

Definition at line 158 of file qtroot.h.

Referenced by ApplicationWindow().

TH1F* ApplicationWindow::histo [private]

Definition at line 159 of file qtroot.h.

Referenced by ApplicationWindow(), clear_histo(), execute(), and ~ApplicationWindow().

TF1* ApplicationWindow::sqroot [private]

Definition at line 160 of file qtroot.h.

Referenced by ApplicationWindow().

TFormula* ApplicationWindow::form1 [private]

Definition at line 161 of file qtroot.h.

Referenced by ApplicationWindow().

TPad* ApplicationWindow::pad1 [private]

Definition at line 162 of file qtroot.h.

Referenced by ApplicationWindow(), and execute().

TPad * ApplicationWindow::pad2 [private]

Definition at line 162 of file qtroot.h.

Referenced by ApplicationWindow().

QTabWidget* ApplicationWindow::tab [private]

Definition at line 163 of file qtroot.h.

Referenced by ApplicationWindow().

QWidget* ApplicationWindow::central [private]

Definition at line 164 of file qtroot.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:25:01 2011 for ROOT_528-00b_version by  doxygen 1.5.1