Into

Modules

Documentation

classPiiMeasureBar

#include <PiiMeasureBar.h>

This widget provides a measuring tape for other widgets, like PiiImageDisplay and PiiDefectMap.

Inherits QFrame

Description

Properties

TODO: COMPLETE THIS COMMENT BLOCK!!

TODO: COMPLETE THIS COMMENT BLOCK!!

bool

This property determines, whether the units are drawn in the measure bar after the unit numbers, or not.

QVariantList

TODO: COMPLETE THIS COMMENT BLOCK!!

Qt::Orientation

This property holds the orientation of the measure widget.

double

TODO: REVIEW THIS COMMENT BLOCK.

TODO: COMPLETE THIS COMMENT BLOCK!!

QVariantList

TODO: COMPLETE THIS COMMENT BLOCK!!

Public types

enum
{ DrawNone = 0x00, DrawTopOrRight = 0x01, DrawBottomOrLeft = 0x02, DrawBoth = 0x03 }

Enumeration, which determines the side, where the scale is drawn.

enum
{ Metric = PiiUnitConverter::Metric, Imperial = PiiUnitConverter::Imperial }

An enumeration used in determinining the unit system used in measuer widget.

Public Slots

void

If this is true, we will draw mouse location.

double
void

Sets the start location of the measure bar in pixels.

void

Sets the location of the mouse cursor in pixels.

void

Sets the logicl pixel length either in the horizontal or vertical direction, depending on the orientation of the measure bar.

void
( )

Sets the scale of the measure bar (in pixels).

Constructors and destructor

( )
(
  • Qt::Orientation orientation
  • QWidget * parent = 0
)

Public member functions

( )
( )
bool
QVariantList
Qt::Orientation
void
( )
void
( )
void
(
  • bool status
)
void
(
  • const QVariantList & distances
)
void
(
  • const Qt::Orientation & orientation
)
void
( )
void
(
  • const QVariantList & tickScales
)
( )
QVariantList

Protected member functions

void
( )

Property details

  • QBrush brush

    [read, write]

    TODO: COMPLETE THIS COMMENT BLOCK!!

  • DrawTicks drawTicks

    [read, write]

    TODO: COMPLETE THIS COMMENT BLOCK!!

  • bool drawUnitNames

    [read, write]

    This property determines, whether the units are drawn in the measure bar after the unit numbers, or not.

    The default value is @ true.

  • QVariantList minTickDistances

    [read, write]

    TODO: COMPLETE THIS COMMENT BLOCK!!

  • Qt::Orientation orientation

    [read, write]

    This property holds the orientation of the measure widget.

    The orientation must be Qt::Vertical (the default) or Qt::Horizontal

  • double pixelLength

    [read, write]

    TODO: REVIEW THIS COMMENT BLOCK.

    Defines the logical pixel length as millimieters. In this class only one dimension of the pixel size is needed. That's why its type is double. The value of this property, together with the scale factor set by the function setScale(), affect to the scale, how the units are shown in the measure bar. It depends also on the property unitSystem in which units the coordinates are ultimately shown for the user.

    There is also corresponding property pixelSize in the class PiiDefectMapOperation, which affects in two dimensions. During creation of this UI-component, the value of the property in this class is initialized according to the value in the operation. And each time the value of the property changes in the operation, it is changed also in this class. However, in this class, it is possible to overwrite the property.

  • QStringList tickNames

    [read, write]

    TODO: COMPLETE THIS COMMENT BLOCK!!

  • QVariantList tickScales

    [read, write]

    TODO: COMPLETE THIS COMMENT BLOCK!!

Enumeration details

  • enum DrawTicks

    Enumeration, which determines the side, where the scale is drawn.

    The following values are possible:

    • UndefinedDrawSide - the scale side drawn is undefined.

    • DrawTopOrRight - the scale is drawn either in the right or the top side of the measure bar, depengind on the orientation of the measure bar.

    • DrawBottomOrLeft - the scale is drawn either in the left or the bottom side of the measure bar, depengind on the orientation of the measure bar.

    • DrawBoth - the scale is drawn in both sides of the measure bar.

  • enum UnitSystem

    An enumeration used in determinining the unit system used in measuer widget.

    The following values are determined:

    • Metric - metric system (m, mm)

    • Imperial - imperial system (inches, feet)

    This enumeration is identical to the enumeration defined in class PiiUnitConverter. The reasons, why we cannot use that enumeration directly, are the limitations in Qt and moc.

Function details

  • PiiMeasureBar

    ( )
  • PiiMeasureBar

    (
    • Qt::Orientation orientation
    • QWidget * parent = 0
    )
  • ~PiiMeasureBar

    ()
  • QBrush brush

    ()
  • DrawTicks drawTicks

    ()
  • bool drawUnitNames

    ()
  • QVariantList minTickDistances

    ()
  • Qt::Orientation orientation

    ()
  • void setBrush

    ( )
  • void setDrawTicks

    ( )
  • void setDrawUnitNames

    (
    • bool status
    )
  • void setMinTickDistances

    (
    • const QVariantList & distances
    )
  • void setOrientation

    (
    • const Qt::Orientation & orientation
    )
  • void setTickNames

    ( )
  • void setTickScales

    (
    • const QVariantList & tickScales
    )
  • QStringList tickNames

    ()
  • QVariantList tickScales

    ()
  • void paintEvent

    ( )
    [protected]
  • void drawMouseLocation

    ()
    [slot]

    If this is true, we will draw mouse location.

  • double pixelLength

    ()
    [slot]
  • void setLocation

    ()
    [slot]

    Sets the start location of the measure bar in pixels.

  • void setMouseLocation

    ()
    [slot]

    Sets the location of the mouse cursor in pixels.

    In general this is the location from the tracking widget (in pixels) without any scaling.

  • void setPixelLength

    ()
    [slot]

    Sets the logicl pixel length either in the horizontal or vertical direction, depending on the orientation of the measure bar.

  • void setScale

    ()
    [slot]

    Sets the scale of the measure bar (in pixels).

    E.g. scale 1.0 means that a logical pixel in the measure bar corresponds to a pixel on the screen.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.