#include <KoRuler.h>
Inherits TQFrame.
|
|
void | newPageLayout (const KoPageLayout &) |
| |
|
void | newLeftIndent (double) |
| |
|
void | newFirstIndent (double) |
| |
|
void | newRightIndent (double) |
| |
| void | openPageLayoutDia () |
| |
| void | doubleClicked () |
| |
| void | doubleClicked (double ptPos) |
| |
|
void | tabListChanged (const KoTabulatorList &) |
| |
|
void | unitChanged (KoUnit::Unit) |
| |
|
void | addGuide (const TQPoint &, bool, int) |
| |
|
void | moveGuide (const TQPoint &, bool, int) |
| |
|
void | addHelpline (const TQPoint &, bool) |
| |
|
void | moveHelpLines (const TQPoint &, bool) |
| |
|
| enum | Action {
A_NONE
, A_BR_LEFT
, A_BR_RIGHT
, A_BR_TOP
,
A_BR_BOTTOM
, A_LEFT_INDENT
, A_FIRST_INDENT
, A_TAB
,
A_RIGHT_INDENT
, A_HELPLINES
} |
| |
KoRuler is the horizontal or vertical ruler, to be used around the drawing area of most KOffice programs.
It shows the graduated ruler with numbering, in any of the base units (like mm/pt/inch), and supports zooming, tabulators, paragraph indents, showing the mouse position, etc.
It also offers a popupmenu upon right-clicking, for changing the unit, the page layout, or removing a tab.
Definition at line 101 of file KoRuler.h.
◆ Action
◆ KoRuler()
| KoRuler::KoRuler |
( |
TQWidget * |
_parent, |
|
|
TQWidget * |
_canvas, |
|
|
TQt::Orientation |
_orientation, |
|
|
const KoPageLayout & |
_layout, |
|
|
int |
_flags, |
|
|
KoUnit::Unit |
_unit, |
|
|
KoTabChooser * |
_tabChooser = 0L |
|
) |
| |
Create a ruler TODO document params.
Definition at line 82 of file KoRuler.cpp.
◆ ~KoRuler()
◆ changeFlags()
| void KoRuler::changeFlags |
( |
int |
_flags | ) |
|
Change the flag (i.e.
activate or deactivate certain features of KoRuler)
Definition at line 1142 of file KoRuler.cpp.
◆ doubleClicked [1/2]
| void KoRuler::doubleClicked |
( |
| ) |
|
|
signal |
This signal is emitted when double-clicking the ruler (or an indent)
◆ doubleClicked [2/2]
| void KoRuler::doubleClicked |
( |
double |
ptPos | ) |
|
|
signal |
This signal is emitted when double-clicking a tab.
◆ doubleClickedIndent()
| bool KoRuler::doubleClickedIndent |
( |
| ) |
const |
- Returns
- whether the current doubleClicked() signal was triggered by the user double-clicking on an indent (BCI). It returns false if the user just double-clicked on an "empty" part of the ruler.
This method is strictly provided for use in a slot connected to the doubleClicked() signal; calling it at any other time results in undefined behavior.
Definition at line 1152 of file KoRuler.cpp.
◆ drawContents()
| void KoRuler::drawContents |
( |
TQPainter * |
_painter | ) |
|
|
inlineprotected |
◆ drawHorizontal()
| void KoRuler::drawHorizontal |
( |
TQPainter * |
_painter | ) |
|
|
protected |
◆ drawLine()
| void KoRuler::drawLine |
( |
int |
oldX, |
|
|
int |
newX |
|
) |
| |
|
protected |
◆ drawTabs()
| void KoRuler::drawTabs |
( |
TQPainter & |
_painter | ) |
|
|
protected |
◆ drawVertical()
| void KoRuler::drawVertical |
( |
TQPainter * |
_painter | ) |
|
|
protected |
◆ flags()
| int KoRuler::flags |
( |
| ) |
const |
◆ handleDoubleClick()
| void KoRuler::handleDoubleClick |
( |
| ) |
|
|
protected |
◆ makeIntern()
| double KoRuler::makeIntern |
( |
double |
_v | ) |
|
|
protected |
◆ minimumSizeHint()
| TQSize KoRuler::minimumSizeHint |
( |
| ) |
const |
|
virtual |
◆ mouseDoubleClickEvent()
| void KoRuler::mouseDoubleClickEvent |
( |
TQMouseEvent * |
| ) |
|
|
protected |
◆ mouseMoveEvent()
| void KoRuler::mouseMoveEvent |
( |
TQMouseEvent * |
e | ) |
|
|
protected |
◆ mousePressEvent()
| void KoRuler::mousePressEvent |
( |
TQMouseEvent * |
e | ) |
|
|
protected |
◆ mouseReleaseEvent()
| void KoRuler::mouseReleaseEvent |
( |
TQMouseEvent * |
e | ) |
|
|
protected |
◆ openPageLayoutDia
| void KoRuler::openPageLayoutDia |
( |
| ) |
|
|
signal |
Old signal, kept for compatibility.
Use doubleClicked instead.
◆ pageLayoutDia
| void KoRuler::pageLayoutDia |
( |
| ) |
|
|
inlineprotectedslot |
◆ rbRemoveTab
| void KoRuler::rbRemoveTab |
( |
| ) |
|
|
protectedslot |
◆ resizeEvent()
| void KoRuler::resizeEvent |
( |
TQResizeEvent * |
e | ) |
|
|
protected |
◆ searchTab()
| void KoRuler::searchTab |
( |
int |
mx | ) |
|
|
protected |
◆ setDirection()
| void KoRuler::setDirection |
( |
bool |
rtl | ) |
|
Set the [paragraph] direction.
By default (rtl=false), the left indent is on the left, and the right indent is on the right ;) If rtl=true, it's the opposite.
Definition at line 1136 of file KoRuler.cpp.
◆ setFirstIndent()
| void KoRuler::setFirstIndent |
( |
double |
_first | ) |
|
|
inline |
Set the [paragraph] first-line left indent to the specified position (in the current unit) This indent is cumulated with the left or right margin, depending on the [paragraph] direction.
Definition at line 178 of file KoRuler.h.
◆ setFrameStartEnd()
| void KoRuler::setFrameStartEnd |
( |
int |
_frameStart, |
|
|
int |
_frameEnd |
|
) |
| |
Set the start and the end of the current 'frame', i.e.
the part of the page in which we are currently working. See KWord frames for an example where this is used. The tab positions and paragraph indents then become relative to the beginning of the frame, and the ruler goes from frameStart to frameEnd instead of using the page margins. _frameStart et _frameEnd are in pixel coordinates.
Definition at line 1117 of file KoRuler.cpp.
◆ setGridSize()
| void KoRuler::setGridSize |
( |
double |
newGridSize | ) |
|
|
inline |
Set the size of the grid used for tabs positioning, size in pt.
default value is 0. 0 means no grid.
Definition at line 223 of file KoRuler.h.
◆ setLeftIndent()
| void KoRuler::setLeftIndent |
( |
double |
_left | ) |
|
|
inline |
Set the [paragraph] left indent to the specified position (in the current unit)
Definition at line 171 of file KoRuler.h.
◆ setMousePos()
| void KoRuler::setMousePos |
( |
int |
mx, |
|
|
int |
my |
|
) |
| |
Set the position of the mouse, to update the indication in the ruler.
This is only effective if showMousePos(true) was called previously. The position to give is not zoomed, it's in real pixel coordinates!
Definition at line 155 of file KoRuler.cpp.
◆ setOffset()
| void KoRuler::setOffset |
( |
int |
_diffx, |
|
|
int |
_diffy |
|
) |
| |
Set a global offset to the X and Y coordinates.
Usually the main drawing area is a TQScrollView, and this is called with contentsX() and contentsY(), each time those values change.
Definition at line 1109 of file KoRuler.cpp.
◆ setPageLayout()
Set the page layout, see KoPageLayout.
This defines the size of the page and the margins, from which the size of the ruler is deducted.
Definition at line 1196 of file KoRuler.cpp.
◆ setPageLayoutMenuItemEnabled()
| void KoRuler::setPageLayoutMenuItemEnabled |
( |
bool |
b | ) |
|
Enable or disable the "Page Layout" menu item.
Definition at line 149 of file KoRuler.cpp.
◆ setReadWrite()
| void KoRuler::setReadWrite |
( |
bool |
_readWrite | ) |
|
KoRuler is in "read write" mode by default.
Use setReadWrite(false) to use it in read-only mode.
Definition at line 1069 of file KoRuler.cpp.
◆ setRightIndent()
| void KoRuler::setRightIndent |
( |
double |
_right | ) |
|
Set the [paragraph] right indent to the specified position (in the current unit)
Definition at line 1130 of file KoRuler.cpp.
◆ setTabList()
| void KoRuler::setTabList |
( |
const KoTabulatorList & |
tabList | ) |
|
Set the list of tabulators to show in the ruler.
Definition at line 990 of file KoRuler.cpp.
◆ setUnit() [1/2]
| void KoRuler::setUnit |
( |
const TQString & |
unit | ) |
|
◆ setUnit() [2/2]
◆ setupMenu()
| void KoRuler::setupMenu |
( |
| ) |
|
|
protected |
◆ setZoom()
| void KoRuler::setZoom |
( |
const double & |
zoom = 1.0 | ) |
|
Set the zoom of the ruler (default value of 1.0 is 100%)
Definition at line 1045 of file KoRuler.cpp.
◆ showMousePos()
| void KoRuler::showMousePos |
( |
bool |
_showMPos | ) |
|
Call showMousePos(true) if the ruler should indicate the position of the mouse.
This is usually only the case for drawing applications, so it is not enabled by default.
Definition at line 1100 of file KoRuler.cpp.
◆ sizeHint()
| TQSize KoRuler::sizeHint |
( |
| ) |
const |
|
virtual |
◆ slotMenuActivated
| void KoRuler::slotMenuActivated |
( |
int |
i | ) |
|
|
protectedslot |
◆ uncheckMenu()
| void KoRuler::uncheckMenu |
( |
| ) |
|
|
protected |
◆ unZoomIt() [1/3]
| double KoRuler::unZoomIt |
( |
const double & |
value | ) |
const |
|
inlineprotected |
◆ unZoomIt() [2/3]
| int KoRuler::unZoomIt |
( |
const int & |
value | ) |
const |
|
inlineprotected |
◆ unZoomIt() [3/3]
| unsigned int KoRuler::unZoomIt |
( |
const unsigned int & |
value | ) |
const |
|
inlineprotected |
◆ zoom()
| const double & KoRuler::zoom |
( |
| ) |
const |
|
inline |
- Returns
- the current zoom level
Definition at line 139 of file KoRuler.h.
◆ zoomIt() [1/3]
| double KoRuler::zoomIt |
( |
const double & |
value | ) |
const |
|
inlineprotected |
◆ zoomIt() [2/3]
| int KoRuler::zoomIt |
( |
const int & |
value | ) |
const |
|
inlineprotected |
◆ zoomIt() [3/3]
| unsigned int KoRuler::zoomIt |
( |
const unsigned int & |
value | ) |
const |
|
inlineprotected |
◆ KoRulerPrivate
| friend class KoRulerPrivate |
|
friend |
◆ F_HELPLINES
| const int KoRuler::F_HELPLINES = 4 |
|
static |
◆ F_INDENTS
| const int KoRuler::F_INDENTS = 2 |
|
static |
◆ F_NORESIZE
| const int KoRuler::F_NORESIZE = 8 |
|
static |
◆ F_TABS
| const int KoRuler::F_TABS = 1 |
|
static |
The documentation for this class was generated from the following files:
|