Eneboo - Documentación para desarrolladores
Clases | Señales | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtScaleWidget

A Widget which contains a scale. Más...

#include <qwt_scale_widget.h>

Diagrama de herencias de QwtScaleWidget
QWidget QObject QPaintDevice QObject QPaintDevice Qt Qt Qt Qt

Lista de todos los miembros.

Clases

class  PrivateData

Señales

void scaleDivChanged ()
 Signal emitted, whenever the scale divison changes.

Métodos públicos

 QwtScaleWidget (QWidget *parent=NULL)
 Create a scale with the position QwtScaleWidget::Left.
 QwtScaleWidget (QWidget *parent, const char *name)
 Create a scale with the position QwtScaleWidget::Left.
 QwtScaleWidget (QwtScaleDraw::Alignment, QWidget *parent=NULL)
 Constructor.
virtual ~QwtScaleWidget ()
 Destructor.
void setTitle (const QString &title)
void setTitle (const QwtText &title)
 Give title new text contents.
QwtText title () const
void setBorderDist (int start, int end)
int startBorderDist () const
int endBorderDist () const
void getBorderDistHint (int &start, int &end) const
 Calculate a hint for the border distances.
void getMinBorderDist (int &start, int &end) const
void setMinBorderDist (int start, int end)
void setMargin (int)
 Specify the margin to the colorBar/base line.
int margin () const
void setSpacing (int td)
 Specify the distance between color bar, scale and title.
int spacing () const
void setPenWidth (int)
 Specify the width of the scale pen.
int penWidth () const
void setScaleDiv (QwtScaleTransformation *, const QwtScaleDiv &sd)
 Assign a scale division.
void setScaleDraw (QwtScaleDraw *)
 Set a scale draw sd has to be created with new and will be deleted in QwtScaleWidget::~QwtScale or the next call of QwtScaleWidget::setScaleDraw.
const QwtScaleDrawscaleDraw () const
QwtScaleDrawscaleDraw ()
void setLabelAlignment (int)
 Change the alignment for the labels.
void setLabelRotation (double rotation)
 Change the rotation for the labels. See QwtScaleDraw::setLabelRotation().
void setColorBarEnabled (bool)
bool isColorBarEnabled () const
void setColorBarWidth (int)
int colorBarWidth () const
void setColorMap (const QwtDoubleInterval &, const QwtColorMap &)
QwtDoubleInterval colorBarInterval () const
const QwtColorMapcolorMap () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
int titleHeightForWidth (int width) const
 Find the height of the title for a given width.
int dimForLength (int length, const QFont &scaleFont) const
 Find the minimum dimension for a given length. dim is the height, length the width seen in direction of the title.
void drawColorBar (QPainter *painter, const QRect &rect) const
void drawTitle (QPainter *painter, QwtScaleDraw::Alignment, const QRect &rect) const
void setAlignment (QwtScaleDraw::Alignment)
QwtScaleDraw::Alignment alignment () const
QRect colorBarRect (const QRect &) const

Métodos protegidos

virtual void paintEvent (QPaintEvent *e)
 paintEvent
virtual void resizeEvent (QResizeEvent *e)
 resizeEvent
virtual void fontChange (const QFont &oldfont)
 Notify a change of the font.
void draw (QPainter *p) const
 draw the scale
void scaleChange ()
 Notify a change of the scale.
void layoutScale (bool update=true)
 Recalculate the scale's geometry and layout based on.

Descripción detallada

A Widget which contains a scale.

This Widget can be used to decorate composite widgets with a scale.


Documentación del constructor y destructor

QwtScaleWidget::QwtScaleWidget ( QWidget parent = NULL) [explicit]

Create a scale with the position QwtScaleWidget::Left.

Parámetros:
parentParent widget
QwtScaleWidget::QwtScaleWidget ( QWidget parent,
const char *  name 
) [explicit]

Create a scale with the position QwtScaleWidget::Left.

Parámetros:
parentParent widget
nameObject name
QwtScaleWidget::QwtScaleWidget ( QwtScaleDraw::Alignment  align,
QWidget parent = NULL 
) [explicit]

Constructor.

Parámetros:
alignAlignment.
parentParent widget
QwtScaleWidget::~QwtScaleWidget ( ) [virtual]

Destructor.


Documentación de las funciones miembro

QwtScaleDraw::Alignment QwtScaleWidget::alignment ( ) const
Devuelve:
position
Ver también:
QwtScaleWidget::setPosition
QwtDoubleInterval QwtScaleWidget::colorBarInterval ( ) const
QRect QwtScaleWidget::colorBarRect ( const QRect rect) const
int QwtScaleWidget::colorBarWidth ( ) const
const QwtColorMap & QwtScaleWidget::colorMap ( ) const
int QwtScaleWidget::dimForLength ( int  length,
const QFont scaleFont 
) const

Find the minimum dimension for a given length. dim is the height, length the width seen in direction of the title.

Parámetros:
lengthwidth for horizontal, height for vertical scales
scaleFontFont of the scale
Devuelve:
height for horizontal, width for vertical scales
void QwtScaleWidget::draw ( QPainter p) const [protected]

draw the scale

void QwtScaleWidget::drawColorBar ( QPainter painter,
const QRect rect 
) const
void QwtScaleWidget::drawTitle ( QPainter painter,
QwtScaleDraw::Alignment  align,
const QRect rect 
) const

Rotate and paint a title according to its position into a given rectangle.

Parámetros:
painterPainter
alignAlignment
rectBounding rectangle
int QwtScaleWidget::endBorderDist ( ) const
Devuelve:
end border distance
Ver también:
QwtScaleWidget::setBorderDist
void QwtScaleWidget::fontChange ( const QFont oldFont) [protected, virtual]

Notify a change of the font.

This virtual function may be overloaded by derived widgets. The default implementation resizes the scale and repaints the widget.

Parámetros:
oldFontPrevious font

Reimplementado de QWidget.

void QwtScaleWidget::getBorderDistHint ( int start,
int end 
) const

Calculate a hint for the border distances.

This member function calculates the distance of the scale's endpoints from the widget borders which is required for the mark labels to fit into the widget. The maximum of this distance an the minimum border distance is returned.

Atención:
  • The minimum border distance depends on the font.
Ver también:
setMinBorderDist(), getMinBorderDist(), setBorderDist()
void QwtScaleWidget::getMinBorderDist ( int start,
int end 
) const

Get the minimum value for the distances of the scale's endpoints from the widget borders.

Ver también:
setMinBorderDist(), getBorderDistHint()
bool QwtScaleWidget::isColorBarEnabled ( ) const
void QwtScaleWidget::layoutScale ( bool  update = true) [protected]

Recalculate the scale's geometry and layout based on.

int QwtScaleWidget::margin ( ) const
Devuelve:
margin
Ver también:
QwtScaleWidget::setMargin
QSize QwtScaleWidget::minimumSizeHint ( ) const [virtual]
Devuelve:
a minimum size hint

Reimplementado de QWidget.

void QwtScaleWidget::paintEvent ( QPaintEvent e) [protected, virtual]

paintEvent

Reimplementado de QWidget.

int QwtScaleWidget::penWidth ( ) const
Devuelve:
Scale pen width
Ver también:
QwtScaleWidget::setPenWidth
void QwtScaleWidget::resizeEvent ( QResizeEvent e) [protected, virtual]

resizeEvent

Reimplementado de QWidget.

void QwtScaleWidget::scaleChange ( ) [protected]

Notify a change of the scale.

This virtual function can be overloaded by derived classes. The default implementation updates the geometry and repaints the widget.

void QwtScaleWidget::scaleDivChanged ( ) [signal]

Signal emitted, whenever the scale divison changes.

const QwtScaleDraw * QwtScaleWidget::scaleDraw ( ) const

scaleDraw of this scale

Ver también:
QwtScaleDraw::setScaleDraw
QwtScaleDraw * QwtScaleWidget::scaleDraw ( )

scaleDraw of this scale

Ver también:
QwtScaleDraw::setScaleDraw
void QwtScaleWidget::setAlignment ( QwtScaleDraw::Alignment  alignment)

Change the alignment

Parámetros:
alignmentNew alignment
Ver también:
QwtScaleWidget::alignment
void QwtScaleWidget::setBorderDist ( int  dist1,
int  dist2 
)

Specify distances of the scale's endpoints from the widget's borders. The actual borders will never be less than minimum border distance.

Parámetros:
dist1Left or top Distance
dist2Right or bottom distance
Ver también:
QwtScaleWidget::borderDist
void QwtScaleWidget::setColorBarEnabled ( bool  on)
void QwtScaleWidget::setColorBarWidth ( int  width)
void QwtScaleWidget::setColorMap ( const QwtDoubleInterval interval,
const QwtColorMap colorMap 
)
void QwtScaleWidget::setLabelAlignment ( int  alignment)

Change the alignment for the labels.

Ver también:
QwtScaleDraw::setLabelAlignment(), QwtScaleWidget::setLabelRotation()
void QwtScaleWidget::setLabelRotation ( double  rotation)

Change the rotation for the labels. See QwtScaleDraw::setLabelRotation().

Ver también:
QwtScaleDraw::setLabelRotation(), QwtScaleWidget::setLabelFlags()
void QwtScaleWidget::setMargin ( int  margin)

Specify the margin to the colorBar/base line.

Parámetros:
marginMargin
Ver también:
QwtScaleWidget::margin
void QwtScaleWidget::setMinBorderDist ( int  start,
int  end 
)

Set a minimum value for the distances of the scale's endpoints from the widget borders. This is useful to avoid that the scales are "jumping", when the tick labels or their positions change often.

Ver también:
getMinBorderDist(), getBorderDistHint()
void QwtScaleWidget::setPenWidth ( int  width)

Specify the width of the scale pen.

Parámetros:
widthPen width
Ver también:
QwtScaleWidget::penWidth
void QwtScaleWidget::setScaleDiv ( QwtScaleTransformation transformation,
const QwtScaleDiv scaleDiv 
)

Assign a scale division.

The scale division determines where to set the tick marks.

Parámetros:
transformationTransformation, needed to translate between scale and pixal values
scaleDivScale Division
Ver también:
For more information about scale divisions, see QwtScaleDiv.
void QwtScaleWidget::setScaleDraw ( QwtScaleDraw sd)

Set a scale draw sd has to be created with new and will be deleted in QwtScaleWidget::~QwtScale or the next call of QwtScaleWidget::setScaleDraw.

void QwtScaleWidget::setSpacing ( int  spacing)

Specify the distance between color bar, scale and title.

Parámetros:
spacingSpacing
Ver también:
QwtScaleWidget::spacing
void QwtScaleWidget::setTitle ( const QString title)
void QwtScaleWidget::setTitle ( const QwtText title)

Give title new text contents.

Parámetros:
titleNew title
Ver también:
QwtScaleWidget::title
Atención:
The title flags are interpreted in direction of the label, AlignTop, AlignBottom can't be set as the title will always be aligned to the scale.
QSize QwtScaleWidget::sizeHint ( ) const [virtual]
Devuelve:
a size hint

Reimplementado de QWidget.

int QwtScaleWidget::spacing ( ) const
Devuelve:
distance between scale and title
Ver también:
QwtScaleWidget::setMargin
int QwtScaleWidget::startBorderDist ( ) const
Devuelve:
start border distance
Ver también:
QwtScaleWidget::setBorderDist
QwtText QwtScaleWidget::title ( ) const
Devuelve:
title
Ver también:
QwtScaleWidget::setTitle
int QwtScaleWidget::titleHeightForWidth ( int  width) const

Find the height of the title for a given width.

Parámetros:
widthWidth
Devuelve:
height Height

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'