#include <KoRuler.h>
Graphe de collaboration de KoRuler:
Connecteurs publics | |
void | setUnit (KoUnit::Unit unit) |
Set the unit of the ruler. | |
void | setOffset (int offset) |
void | setRulerLength (double length) |
Sets the length of the ruler to length in points (pt). | |
void | setActiveRange (double start, double end) |
void | setShowMousePosition (bool show) |
void | updateMouseCoordinate (int coordinate) |
Fonctions membres publiques | |
KoRuler (QWidget *parent, Qt::Orientation orientation, KoViewConverter *viewConverter) | |
~KoRuler () | |
KoUnit::Unit | unit () const |
The ruler's unit. | |
double | rulerLength () const |
The length of the ruler in points (pt). | |
Qt::Orientation | orientation () const |
The orientation of the ruler. | |
virtual QSize | minimumSizeHint () const |
virtual QSize | sizeHint () const |
Fonctions membres protégées | |
virtual void | paintEvent (QPaintEvent *event) |
double | numberStepForUnit () const |
| |
Attributs privés | |
KoRulerPrivate * | d |
Définition à la ligne 40 du fichier KoRuler.h.
KoRuler::KoRuler | ( | QWidget * | parent, | |
Qt::Orientation | orientation, | |||
KoViewConverter * | viewConverter | |||
) |
Définition à la ligne 49 du fichier KoRuler.cpp.
Références d, KoRulerPrivate::m_orientation, KoRulerPrivate::m_viewConverter, setActiveRange(), setOffset(), setRulerLength(), setShowMousePosition(), setUnit(), KoUnit::U_PT, et updateMouseCoordinate().
KoRuler::~KoRuler | ( | ) |
KoUnit::Unit KoRuler::unit | ( | ) | const |
The ruler's unit.
Définition à la ligne 71 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_unit.
double KoRuler::rulerLength | ( | ) | const |
The length of the ruler in points (pt).
Définition à la ligne 81 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_rulerLength.
Référencé par paintEvent().
Voici le graphe d'appel pour cette fonction :
Qt::Orientation KoRuler::orientation | ( | ) | const |
The orientation of the ruler.
Définition à la ligne 86 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_orientation.
Référencé par paintEvent().
Voici le graphe d'appel pour cette fonction :
QSize KoRuler::minimumSizeHint | ( | ) | const [virtual] |
Définition à la ligne 322 du fichier KoRuler.cpp.
Références testguiform::size.
Référencé par sizeHint().
Voici le graphe d'appel pour cette fonction :
QSize KoRuler::sizeHint | ( | ) | const [virtual] |
Définition à la ligne 336 du fichier KoRuler.cpp.
Références minimumSizeHint().
Voici le graphe d'appel pour cette fonction :
void KoRuler::setUnit | ( | KoUnit::Unit | unit | ) | [slot] |
Set the unit of the ruler.
Définition à la ligne 76 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_unit.
Référencé par KoRuler().
void KoRuler::setOffset | ( | int | offset | ) | [slot] |
Set the offset. Use this function to sync the ruler with the canvas' position on screen
offset | The offset in pixels |
Définition à la ligne 91 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_offset.
Référencé par KoRuler().
void KoRuler::setRulerLength | ( | double | length | ) | [slot] |
Sets the length of the ruler to length
in points (pt).
Définition à la ligne 97 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_rulerLength.
Référencé par KoRuler().
void KoRuler::setActiveRange | ( | double | start, | |
double | end | |||
) | [slot] |
Set the active range, ie the part of the ruler that is most likely used.
start | the start of the range in pt | |
end | the end of the range in pt |
Définition à la ligne 341 du fichier KoRuler.cpp.
Références d, KoRulerPrivate::m_activeRangeEnd, et KoRulerPrivate::m_activeRangeStart.
Référencé par KoRuler().
void KoRuler::setShowMousePosition | ( | bool | show | ) | [slot] |
Set wether the ruler should show the current mouse position. Update the position with updateMouseCoordinate().
show | show mouse position if true. Default is false. |
Définition à la ligne 354 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_showMousePosition.
Référencé par KoRuler().
void KoRuler::updateMouseCoordinate | ( | int | coordinate | ) | [slot] |
Update the current position of the mouse pointer. The ruler offset will be applied before painting.
coordinate | Either the x or y coordinate of the mouse depending of the orientation of the ruler. |
Définition à la ligne 348 du fichier KoRuler.cpp.
Références d, et KoRulerPrivate::m_mouseCoordinate.
Référencé par KoRuler().
void KoRuler::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Définition à la ligne 102 du fichier KoRuler.cpp.
Références d, KoViewConverter::documentToViewX(), KoViewConverter::documentToViewY(), KoUnit::fromUserValue(), KoPageFormat::height(), KoRulerPrivate::m_activeRangeEnd, KoRulerPrivate::m_activeRangeStart, KoRulerPrivate::m_mouseCoordinate, KoRulerPrivate::m_offset, KoRulerPrivate::m_showMousePosition, KoRulerPrivate::m_unit, KoRulerPrivate::m_viewConverter, numberStepForUnit(), orientation(), gensymbolfontmap::pos, rulerLength(), et KoPageFormat::width().
Voici le graphe d'appel pour cette fonction :
double KoRuler::numberStepForUnit | ( | ) | const [protected] |
Définition à la ligne 359 du fichier KoRuler.cpp.
Références d, KoRulerPrivate::m_unit, KoUnit::U_CC, KoUnit::U_CM, KoUnit::U_DD, KoUnit::U_DM, KoUnit::U_INCH, KoUnit::U_MM, KoUnit::U_PI, et KoUnit::U_PT.
Référencé par paintEvent().
Voici le graphe d'appel pour cette fonction :
KoRulerPrivate* KoRuler::d [private] |
Définition à la ligne 98 du fichier KoRuler.h.
Référencé par KoRuler(), numberStepForUnit(), orientation(), paintEvent(), rulerLength(), setActiveRange(), setOffset(), setRulerLength(), setShowMousePosition(), setUnit(), unit(), updateMouseCoordinate(), et ~KoRuler().