Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

CanvasWindow Class Reference

Inheritance diagram for CanvasWindow:

Inheritance graph
[legend]
Collaboration diagram for CanvasWindow:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 16 of file CanvasWindow.sip.

Public Member Functions

 CanvasWindow (QWidget */TransferThis/=0, const char *=0, unsigned=WType_TopLevel)
 CanvasWindow (const CanvasWindow &)
 A copy constructor that does nothing except keep boost.python happy.
virtual ~CanvasWindow ()
void initFromFile (const std::string &)
 Initializes this object from contents of file.
void inhibitClose (bool=true)
 If yes is true, sets a flag so that this object will not accept close events.
void setAllowClose (bool=true)
 Sets the window to allowed to be closed by user without prompting.
bool allowClose ()
 If document has changed and not saved, opens a dialog box for user to choose to save, discard or cancel.
virtual bool closeNoPrompt ()
 Closes the window.
void setChanged (bool=true)
 Sets the changed flag.
void setCaption ()
 Sets the Windows title.
void updateActions ()
 Update Action objects.
virtual void fileNew ()
 Creates a new document CanvasWindow.
void fileSave ()
 Saves the document.
virtual void fileSaveAs ()
 Saves the document after display a file dialog to the user.
virtual void fileSaveSelectedImages ()
 Saves the selected ViewBase object as an image file.
virtual void fileSaveSelectedImages (const std::string &)
 Saves the selected ViewBase objects as an image file with the given filename.
void addDisplay (PlotterBase *)
 Adds a new plot to the canvas and selects it.
void addFuncDisplay (PlotterBase *, const std::string &) throw ( FactoryException )
 Adds function textual display to the canvas.
void addPlotDisplay (PlotterBase *, bool)
 Adds a new plot display to the canvas.
void removeDisplay (PlotterBase *)
 Removes the plotter and its view from the canvas.
PlotterBaseselectedPlotter ()
 Returns the selected plotter.
QtViewgetViewFor (const PlotterBase *)
 Returns the QtView object that is the Observer of the plotter.
void setIntervalEnabled (bool)
 Sets the display interval feature to enabled if yes is true, otherwise sets it to disabled.
void saveAs (const std::string &)
 Saves the document to the specified file.
void saveAllAs (const std::string &)
 Saves the document along with its NTuple objects.
void savePlotAsImage (const PlotterBase *, std::string)
 Saves the plotter as image file.
void saveAsImage (const PlotterBase *, std::string)
 Saves the plotter as image file.
void clear ()
 Removes all items from the canvas.
virtual void customEvent (QCustomEvent *)
 Responds to QCustomEvents.
void savePlotAsImageImmediate (const PlotterBase *, const std::string &)
 Save plot as image file without posting an event.
void setAllSelected (bool=true)
 Select or de-select all views in the window.
void setSelected (QtView *)
 Select a specific view in the window.
const std::vector< double > & mouseEventData ()
 Retrieve a vector (x, y, z) points from the next mouse event.
void print (const std::string &)
 Prints the view to Postscript file without prompting user.
void setPlotMatrix (unsigned int, unsigned int)
 Sets the number of columns and rows of plots on each page.
void setAddedSelected (bool)
 Sets a flag so that plots will be in their selected stated when added to the canvas.

Static Public Member Functions

static void resetFontSize ()
 Resets the font size to be no larger than 10.

Protected Slots

virtual void on_fileExit_activated ()
 Responds to the Quit item in the File menu.
virtual void on_fileOpen_activated ()
 Opens an existing file.

Protected Member Functions

virtual void hideEvent (QHideEvent *)
 Informs the application object that the window has been hidden.


Constructor & Destructor Documentation

CanvasWindow::CanvasWindow QWidget */TransferThis/  = 0,
const char *  = 0,
unsigned  = WType_TopLevel
 

CanvasWindow::CanvasWindow const CanvasWindow  ) 
 

A copy constructor that does nothing except keep boost.python happy.

Without it, boost.python interface wouldn't compile because QMainWindow copy constructor is private.

virtual CanvasWindow::~CanvasWindow  )  [virtual]
 


Member Function Documentation

void CanvasWindow::addDisplay PlotterBase  ) 
 

Adds a new plot to the canvas and selects it.

void CanvasWindow::addFuncDisplay PlotterBase ,
const std::string & 
throw ( FactoryException )
 

Adds function textual display to the canvas.

void CanvasWindow::addPlotDisplay PlotterBase ,
bool 
 

Adds a new plot display to the canvas.

Adds a new plot display to the canvas and puts it in selected state if select is true.

bool CanvasWindow::allowClose  ) 
 

If document has changed and not saved, opens a dialog box for user to choose to save, discard or cancel.

Otherwise, return true. Intended to be used for closeEvent.

void CanvasWindow::clear  ) 
 

Removes all items from the canvas.

See also:
editClear()

virtual bool CanvasWindow::closeNoPrompt  )  [virtual]
 

Closes the window.

If no_prompt is true, the user will not be prompted, otherwise the user gets a dialog with which he can cancel the close operation.

virtual void CanvasWindow::customEvent QCustomEvent  )  [virtual]
 

Responds to QCustomEvents.

Responds to SaveAsImageEvent custom events. All others are ignored.

virtual void CanvasWindow::fileNew  )  [virtual]
 

Creates a new document CanvasWindow.

Implements CanvasWindowBase.

void CanvasWindow::fileSave  )  [virtual]
 

Saves the document.

If the document already corresponds to a saved document, prompts the user with a warning dialog before over writing the file. If no file name has been assigned, then invokes the fileSaveAs() member function.

Implements CanvasWindowBase.

virtual void CanvasWindow::fileSaveAs  )  [virtual]
 

Saves the document after display a file dialog to the user.

Implements CanvasWindowBase.

virtual void CanvasWindow::fileSaveSelectedImages const std::string &   )  [virtual]
 

Saves the selected ViewBase objects as an image file with the given filename.

virtual void CanvasWindow::fileSaveSelectedImages  )  [virtual]
 

Saves the selected ViewBase object as an image file.

QtView* CanvasWindow::getViewFor const PlotterBase  ) 
 

Returns the QtView object that is the Observer of the plotter.

virtual void CanvasWindow::hideEvent QHideEvent  )  [protected, virtual]
 

Informs the application object that the window has been hidden.

void CanvasWindow::inhibitClose bool  = true  ) 
 

If yes is true, sets a flag so that this object will not accept close events.

void CanvasWindow::initFromFile const std::string &   ) 
 

Initializes this object from contents of file.

const std::vector<double>& CanvasWindow::mouseEventData  ) 
 

Retrieve a vector (x, y, z) points from the next mouse event.

virtual void CanvasWindow::on_fileExit_activated  )  [protected, virtual, slot]
 

Responds to the Quit item in the File menu.

virtual void CanvasWindow::on_fileOpen_activated  )  [protected, virtual, slot]
 

Opens an existing file.

Opens an existing document or data file after prompting the user for the document's file name and/or type.

void CanvasWindow::print const std::string &   ) 
 

Prints the view to Postscript file without prompting user.

void CanvasWindow::removeDisplay PlotterBase  ) 
 

Removes the plotter and its view from the canvas.

static void CanvasWindow::resetFontSize  )  [static]
 

Resets the font size to be no larger than 10.

void CanvasWindow::saveAllAs const std::string &   ) 
 

Saves the document along with its NTuple objects.

void CanvasWindow::saveAs const std::string &   ) 
 

Saves the document to the specified file.

void CanvasWindow::saveAsImage const PlotterBase ,
std::string 
 

Saves the plotter as image file.

The filename should have suffix appropriate for the image format desired. If no suffix is given, then a file dialog may be opened. If file exists, it will be over-written as this method is intended to be call from Python script. It locks and locks the application object so it maybe called from a non-GUI thread.

void CanvasWindow::savePlotAsImage const PlotterBase ,
std::string 
 

Saves the plotter as image file.

The filename should have suffix appropriate for the image format desired. If no suffix is given, then a file dialog may be opened. If file exists, it will be over-written as this method is intended to be call from Python script.

Attention:
Calling this method from a non GUI thread could be dangerous. It would be better to post a SaveAsImageEvent custom event to the CanvasWindow.

void CanvasWindow::savePlotAsImageImmediate const PlotterBase ,
const std::string & 
 

Save plot as image file without posting an event.

PlotterBase* CanvasWindow::selectedPlotter  ) 
 

Returns the selected plotter.

void CanvasWindow::setAddedSelected bool   ) 
 

Sets a flag so that plots will be in their selected stated when added to the canvas.

void CanvasWindow::setAllowClose bool  = true  ) 
 

Sets the window to allowed to be closed by user without prompting.

void CanvasWindow::setAllSelected bool  = true  ) 
 

Select or de-select all views in the window.

void CanvasWindow::setCaption  ) 
 

Sets the Windows title.

The windows title depends on an number of attributes. They are collected to set the title.

void CanvasWindow::setChanged bool  = true  ) 
 

Sets the changed flag.

If the changed status has already set to true and flag is true, this member function does nothing. Otherwise, updates the window's title bar to reflect the document's current status.

void CanvasWindow::setIntervalEnabled bool   ) 
 

Sets the display interval feature to enabled if yes is true, otherwise sets it to disabled.

void CanvasWindow::setPlotMatrix unsigned  int,
unsigned  int
 

Sets the number of columns and rows of plots on each page.

void CanvasWindow::setSelected QtView  ) 
 

Select a specific view in the window.

void CanvasWindow::updateActions  ) 
 

Update Action objects.

Sets enable status of QAction objects such as menu items and tool bar icons.


The documentation for this class was generated from the following file:
Generated on Wed Sep 7 14:51:43 2005 for SiHippo by  doxygen 1.4.3