Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

QSPlotView Class Reference

View class for QSWorkbook document. More...

#include <qsplotview.h>

List of all members.

Public Types

enum  ScrollBarType { HorizontalBar = 0, VerticalBar = 1 }
enum  SliderType { HorizontalSlider = 0, VerticalSlider = 1, AdditionalSlider = 2 }

Public Slots

void setCurrentPage (int index)
void updateCanvas ()

Signals

void message (const QString &msg)
void sigActiveObjectChanged ()
void sigActiveAxesChanged ()
void sigActiveAxesDatasetsChanged ()
void sigCurrentPageChanged ()
void sigCurrentPageTitleChanged (const QString &newTitle)
void sigCurrentPageObjectListChanged ()
void sigPageBarClicked ()
void sigSliderPressed ()
void sigSliderReleased ()
void sigScrollBarPressed ()
void sigScrollBarReleased ()

Public Methods

 QSPlotView (QWidget *parent=0, const char *name=0)
virtual ~QSPlotView ()
void setWorkbook (QSWorkbook *workbook)
QSWorkbookworkbook () const
QSPagecurrentPage () const
QSSelectionselection () const
void setPixmapBuffering (bool enabled)
bool pixmapBuffering () const
void setTool (QSTool *t)
void setFullPage (bool enabled)
void setZoom (double zoom)
void setGridSpacing (int x_mm, int y_mm)
void setGridVisible (bool visible)
void setRulersVisible (bool visible)
void setSlidersVisible (bool visible)
void setPageMarginsVisible (bool visible)
QSCObjectactiveObject () const
QSAxesactiveAxes () const
QSCObjectCollectionactiveCollection () const
int gridSpacingX () const
int gridSpacingY () const
bool gridVisible () const
bool rulersVisible () const
bool slidersVisible () const
bool pageMarginsVisible () const
bool fullPage () const
double zoom () const
double dpi () const
void bindScrollBar (ScrollBarType t, QSAxis::AxisType axisType)
void bindSlider (SliderType t, const char *property, int min, int max)
QSAxis::AxisType scrollBarAxis (ScrollBarType t) const
QCString sliderProperty (SliderType t) const
int sliderMin (SliderType t) const
int sliderMax (SliderType t) const
QSTooltool () const
QWidget * canvasWidget () const
QSCObjectobjectAt (const QPoint &pos, bool recursive=true)
void showUserMessage (const QString &msg)
bool eventFilter (QObject *, QEvent *)


Detailed Description

View class for QSWorkbook document.

Just call setWorkbook(). View updates itself automatically when workbook changes. It also manages canvas tools, see setTool(). Some object in the workbook can be selected, see selection().

Author:
Kamil Dobkowski
Examples:

demo2d.cpp, and demo3d.cpp.


Member Enumeration Documentation

enum QSPlotView::ScrollBarType
 

See bindScrollBar()

enum QSPlotView::SliderType
 

See bindSlider()


Constructor & Destructor Documentation

QSPlotView::QSPlotView QWidget *    parent = 0,
const char *    name = 0
 

Constructor.

virtual QSPlotView::~QSPlotView   [virtual]
 

Destructor.


Member Function Documentation

QSAxes* QSPlotView::activeAxes   const [inline]
 

Returns the active axes or NULL.( active means a parent axes of the selected object ).

QSCObjectCollection* QSPlotView::activeCollection   const
 

Default parent collection for newly created objects. If QSGroup s selected this is QSCGroup, if not this is QSPage or NULL.

QSCObject* QSPlotView::activeObject   const [inline]
 

Returns the currently active object. If selection contains only one object - it becames active object, active object is NULL if selection contains more than a one object.

void QSPlotView::bindScrollBar ScrollBarType    t,
QSAxis::AxisType    axisType
 

Designates a scrollbar to set a range on the given axis. This applies only to the active axes object. Only bounded scrollbars are visible. To unbind call this function with axis = UnknownAxisType. Those settings are valid even after plot object has changed.

void QSPlotView::bindSlider SliderType    t,
const char *    property,
int    min,
int    max
 

Designates a slider to set a given property of an active axes. To unbind call this function with 'property' set to QSCString::null.

QWidget* QSPlotView::canvasWidget   const [inline]
 

Returns a canvas.

QSPage* QSPlotView::currentPage   const [inline]
 

Returns pointer to the current page. See slot setCurrentPage().

double QSPlotView::dpi   const [inline]
 

Current dpi of the canvas. It is calculated as follows: zoom*72.0

bool QSPlotView::eventFilter QObject *   ,
QEvent *   
 

Reimplemented

bool QSPlotView::fullPage   const [inline]
 

Returns a full page setting.

int QSPlotView::gridSpacingX   const [inline]
 

Returns a grid spacing

int QSPlotView::gridSpacingY   const [inline]
 

Returns a grid spacing

bool QSPlotView::gridVisible   const [inline]
 

Is grid visible.

void QSPlotView::message const QString &    msg [signal]
 

Status messages. Emmited mainly by tools during their work.

QSCObject* QSPlotView::objectAt const QPoint &    pos,
bool    recursive = true
 

Returns object at position 'pos' or NULL. if 'recursive' is true it digs through all QSCGroups.

bool QSPlotView::pageMarginsVisible   const [inline]
 

Is page margin visible.

bool QSPlotView::pixmapBuffering   const [inline]
 

Returns if pixmap buffering is on

bool QSPlotView::rulersVisible   const [inline]
 

Are rulers visible.

QSAxis::AxisType QSPlotView::scrollBarAxis ScrollBarType    t const [inline]
 

A bumber of axis or UnknownAxisType.

QSSelection* QSPlotView::selection   const [inline]
 

Returns selection

void QSPlotView::setCurrentPage int    index [slot]
 

Sets the current ( displayed ) page

void QSPlotView::setFullPage bool    enabled
 

Turns on/off the full page mode.

void QSPlotView::setGridSpacing int    x_mm,
int    y_mm
 

Sets grid spacing

void QSPlotView::setGridVisible bool    visible
 

Shows/hides grid

void QSPlotView::setPageMarginsVisible bool    visible
 

Shows/hides page margin

void QSPlotView::setPixmapBuffering bool    enabled
 

Enables/disables pixmap buffering.

void QSPlotView::setRulersVisible bool    visible
 

Shows/hides rulers

void QSPlotView::setSlidersVisible bool    visible
 

Shows/hides sliders and scrollbars

void QSPlotView::setTool QSTool   t
 

Sets a new tool.

void QSPlotView::setWorkbook QSWorkbook   workbook
 

Sets a workbook.

void QSPlotView::setZoom double    zoom
 

Sets a zoom value. Currently accepts values between 0.1 and 5.0.

void QSPlotView::showUserMessage const QString &    msg
 

Shows a user message. Emits message() signal.

void QSPlotView::sigActiveAxesChanged   [signal]
 

Emitted when an active object changes, Notice that an active axes can change in this case too.

void QSPlotView::sigActiveAxesDatasetsChanged   [signal]
 

Added removed reordered.

void QSPlotView::sigActiveObjectChanged   [signal]
 

Emitted when a selected object changes.

void QSPlotView::sigCurrentPageChanged   [signal]
 

Current page was changed - see: setCurrentPage() .

void QSPlotView::sigCurrentPageObjectListChanged   [signal]
 

Current page object list was changed.

void QSPlotView::sigCurrentPageTitleChanged const QString &    newTitle [signal]
 

Current page title has changed

void QSPlotView::sigPageBarClicked   [signal]
 

Mouse right-button click over page bar.

void QSPlotView::sigScrollBarPressed   [signal]
 

Scrollbar pressed

void QSPlotView::sigScrollBarReleased   [signal]
 

Scrollbar released

void QSPlotView::sigSliderPressed   [signal]
 

Slider pressed

void QSPlotView::sigSliderReleased   [signal]
 

Slider released

int QSPlotView::sliderMax SliderType    t const [inline]
 

Returns a max value or 0.

int QSPlotView::sliderMin SliderType    t const [inline]
 

Returns a min value or 0.

QCString QSPlotView::sliderProperty SliderType    t const [inline]
 

Returns a property name or null.

bool QSPlotView::slidersVisible   const [inline]
 

Returns the current 'slider' state.

QSTool* QSPlotView::tool   const [inline]
 

Returns the currently selected tool

void QSPlotView::updateCanvas   [slot]
 

Updates canvas. There should be no need to call this directly. It is always called when the current page changes.

QSWorkbook* QSPlotView::workbook   const [inline]
 

Returns a default workbook.

double QSPlotView::zoom   const [inline]
 

Return zoom value


The documentation for this class was generated from the following file:
Generated on Mon Mar 18 19:16:52 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002