29class KRITAWIDGETS_EXPORT
KoRuler :
public QWidget
44 qreal position { 0.0 };
45 QTextOption::TabType type { QTextOption::LeftTab };
52 qreal rulerLength()
const;
55 Qt::Orientation orientation()
const;
58 qreal firstLineIndent()
const;
61 qreal paragraphIndent()
const;
64 qreal endIndent()
const;
68 QWidget *tabChooser();
83 QSize minimumSizeHint()
const override;
86 QSize sizeHint()
const override;
90 void setUnit(
const KoUnit &unit);
96 void setOffset(
int offset);
99 void setRulerLength(qreal
length);
106 void setActiveRange(qreal start, qreal end);
114 void setOverrideActiveRange(qreal start, qreal end);
119 void setRightToLeft(
bool isRightToLeft);
125 void setShowIndents(
bool show);
131 void setFirstLineIndent(qreal indent);
137 void setParagraphIndent(qreal indent);
143 void setEndIndent(qreal indent);
149 void setShowMousePosition(
bool show);
154 bool showMousePosition()
const;
161 void updateMouseCoordinate(
int coordinate);
167 void setShowSelectionBorders(
bool show);
174 void updateSelectionBorders(qreal first, qreal second);
180 void setShowTabs(
bool show);
186 void setRelativeTabs(
bool relative);
193 void updateTabs(
const QList<Tab> &tabs, qreal tabDistance);
204 void clearHotSpots();
212 void setHotSpot(qreal position,
int id = -1);
219 bool removeHotSpot(
int id);
229 void setUnitPixelMultiple2(
bool enabled);
259 void paintEvent(QPaintEvent* event)
override;
261 void mousePressEvent(QMouseEvent *ev)
override;
263 void mouseReleaseEvent(QMouseEvent *ev)
override;
265 void mouseMoveEvent(QMouseEvent *ev)
override;