lib

KoLineWidthAction Class Reference

#include <Kolinewidthaction.h>

Inheritance diagram for KoLineWidthAction:

KoSelectAction KAction List of all members.

Detailed Description

A line width selection action.

Definition at line 30 of file Kolinewidthaction.h.


Public Slots

void setCurrentWidth (double width)
void setUnit (KoUnit::Unit unit)

Signals

void lineWidthChanged (double)

Public Member Functions

 KoLineWidthAction (const QString &text, const QString &icon, QObject *parent=0, const char *name=0)
 KoLineWidthAction (const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name=0)
 ~KoLineWidthAction ()
double currentWidth () const

Protected Slots

void execute (int index)

Protected Member Functions

void createMenu ()

Constructor & Destructor Documentation

KoLineWidthAction::KoLineWidthAction ( const QString &  text,
const QString &  icon,
QObject *  parent = 0,
const char *  name = 0 
)

Constructs a KoLineWidthAction with a text and an icon.

Parameters:
text The text that will be displayed.
icon The dynamically loaded icon that goes with this action.
parent This action's parent.
name An internal name for this action.

Definition at line 58 of file Kolinewidthaction.cpp.

KoLineWidthAction::KoLineWidthAction ( const QString &  text,
const QString &  icon,
const QObject *  receiver,
const char *  slot,
QObject *  parent,
const char *  name = 0 
)

Same as above, but it also connects a slot to the selectionChanged(int) signal.

Parameters:
text The text that will be displayed.
icon The dynamically loaded icon that goes with this action.
receiver The SLOT's parent.
slot The SLOT to invoke when a lineWidthChanged(double) signal is emited.
parent This action's parent.
name An internal name for this action.

Definition at line 66 of file Kolinewidthaction.cpp.


Member Function Documentation

double KoLineWidthAction::currentWidth (  )  const

Returns the currently selected line width.

Definition at line 128 of file Kolinewidthaction.cpp.

void KoLineWidthAction::lineWidthChanged ( double   )  [signal]

Emited when a new line width have been selected.

void KoLineWidthAction::setCurrentWidth ( double  width  )  [slot]

Set the current width.

Parameters:
width The new width.

Definition at line 133 of file Kolinewidthaction.cpp.

void KoLineWidthAction::setUnit ( KoUnit::Unit  unit  )  [slot]

Set which unit to use in the custom width dialog.

Parameters:
unit The unit to use.

Definition at line 149 of file Kolinewidthaction.cpp.

void KoLineWidthAction::execute ( int  index  )  [protected, virtual, slot]

Reimplemented from KoSelectAction.

Emits lineWidthChanged(double) when a new width is selected.

Parameters:
index Index of the selected item

Reimplemented from KoSelectAction.

Definition at line 104 of file Kolinewidthaction.cpp.

void KoLineWidthAction::createMenu (  )  [protected]

Draws and adds each item of the menu.

Definition at line 81 of file Kolinewidthaction.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys