lib Library API Documentation

KoLineWidthAction Class Reference

A line width selection action. More...

#include <kolinewidthaction.h>

Inheritance diagram for KoLineWidthAction:

Inheritance graph
[legend]
Collaboration diagram for KoLineWidthAction:

Collaboration graph
[legend]
List of all members.

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)
double currentWidth () const

Protected Slots

void execute (int index)

Protected Member Functions

void createMenu ()

Detailed Description

A line width selection action.

Definition at line 30 of file kolinewidthaction.h.


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.

References createMenu().

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.

References createMenu(), and lineWidthChanged().


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.

Referenced by execute(), and KoLineWidthAction().

void KoLineWidthAction::setCurrentWidth double  width  )  [slot]
 

Set the current width.

Parameters:
width The new width.

Definition at line 133 of file kolinewidthaction.cpp.

References KoSelectAction::setCurrentSelection(), and KoUnit::toPoint().

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.

References lineWidthChanged(), KoSelectAction::setCurrentSelection(), KoLineWidthChooser::setUnit(), KoLineWidthChooser::setWidth(), and KoLineWidthChooser::width().

void KoLineWidthAction::createMenu  )  [protected]
 

Draws and adds each item of the menu.

Definition at line 81 of file kolinewidthaction.cpp.

References KoSelectAction::popup(), and KoSelectAction::popupMenu().

Referenced by KoLineWidthAction().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:41:02 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003