.TH "KActionSelector" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KActionSelector \- A widget for selecting and arranging actions/objects.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kactionselector.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBMoveButton\fP { \fBButtonAdd\fP, \fBButtonRemove\fP, \fBButtonUp\fP, \fBButtonDown\fP }"
.br
.ti -1c
.RI "enum \fBButtonIconSize\fP { \fBSmallIcon\fP, \fBSmall\fP, \fBMedium\fP, \fBLarge\fP, \fBXLarge\fP }"
.br
.ti -1c
.RI "enum \fBInsertionPolicy\fP { \fBBelowCurrent\fP, \fBSorted\fP, \fBAtTop\fP, \fBAtBottom\fP }"
.br
.in -1c
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBpolish\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBadded\fP (\fBQListBoxItem\fP *item)"
.br
.ti -1c
.RI "void \fBremoved\fP (\fBQListBoxItem\fP *item)"
.br
.ti -1c
.RI "void \fBmovedUp\fP (\fBQListBoxItem\fP *item)"
.br
.ti -1c
.RI "void \fBmovedDown\fP (\fBQListBoxItem\fP *item)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKActionSelector\fP (\fBQWidget\fP *parent=0, const char *name=0)"
.br
.ti -1c
.RI "\fBQListBox\fP * \fBavailableListBox\fP () const "
.br
.ti -1c
.RI "\fBQListBox\fP * \fBselectedListBox\fP () const "
.br
.ti -1c
.RI "bool \fBmoveOnDoubleClick\fP () const "
.br
.ti -1c
.RI "void \fBsetMoveOnDoubleClick\fP (bool enable)"
.br
.ti -1c
.RI "bool \fBkeyboardEnabled\fP () const "
.br
.ti -1c
.RI "void \fBsetKeyboardEnabled\fP (bool enable)"
.br
.ti -1c
.RI "\fBQString\fP \fBavailableLabel\fP () const "
.br
.ti -1c
.RI "void \fBsetAvailableLabel\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "\fBQString\fP \fBselectedLabel\fP () const "
.br
.ti -1c
.RI "void \fBsetSelectedLabel\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "\fBButtonIconSize\fP \fBbuttonIconSize\fP () const "
.br
.ti -1c
.RI "void \fBsetButtonIconSize\fP (\fBButtonIconSize\fP \fBsize\fP)"
.br
.ti -1c
.RI "\fBInsertionPolicy\fP \fBavailableInsertionPolicy\fP () const "
.br
.ti -1c
.RI "void \fBsetAvailableInsertionPolicy\fP (\fBInsertionPolicy\fP policy)"
.br
.ti -1c
.RI "\fBInsertionPolicy\fP \fBselectedInsertionPolicy\fP () const "
.br
.ti -1c
.RI "void \fBsetSelectedInsertionPolicy\fP (\fBInsertionPolicy\fP policy)"
.br
.ti -1c
.RI "bool \fBshowUpDownButtons\fP () const "
.br
.ti -1c
.RI "void \fBsetShowUpDownButtons\fP (bool \fBshow\fP)"
.br
.ti -1c
.RI "void \fBsetButtonIcon\fP (const \fBQString\fP &\fBicon\fP, \fBMoveButton\fP button)"
.br
.ti -1c
.RI "void \fBsetButtonIconSet\fP (const \fBQIconSet\fP &iconset, \fBMoveButton\fP button)"
.br
.ti -1c
.RI "void \fBsetButtonTooltip\fP (const \fBQString\fP &tip, \fBMoveButton\fP button)"
.br
.ti -1c
.RI "void \fBsetButtonWhatsThis\fP (const \fBQString\fP &text, \fBMoveButton\fP button)"
.br
.ti -1c
.RI "void \fBsetButtonsEnabled\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBkeyPressEvent\fP (\fBQKeyEvent\fP *)"
.br
.ti -1c
.RI "bool \fBeventFilter\fP (\fBQObject\fP *, \fBQEvent\fP *)"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "bool \fBmoveOnDoubleClick\fP"
.br
.ti -1c
.RI "bool \fBkeyboardEnabled\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBavailableLabel\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBselectedLabel\fP"
.br
.ti -1c
.RI "\fBButtonIconSize\fP \fBbuttonIconSize\fP"
.br
.ti -1c
.RI "\fBInsertionPolicy\fP \fBavailableInsertionPolicy\fP"
.br
.ti -1c
.RI "\fBInsertionPolicy\fP \fBselectedInsertionPolicy\fP"
.br
.ti -1c
.RI "bool \fBshowUpDownButtons\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
A widget for selecting and arranging actions/objects. 

This widget allows the user to select from a set of objects and arrange the order of the selected ones using two list boxes labeled 'Available' and 'Used' with horizontal arrows in between to move selected objects between the two, and vertical arrows on the right to arrange the order of the selected objects.
.PP
The widget moves objects to the other listbox when doubleclicked if the property moveOnDoubleClick is set to true (default). See \fBmoveOnDoubleClick()\fP and \fBsetMoveOnDoubleClick()\fP.
.PP
The user control the widget using the keyboard if enabled (default), see keyboardEnabled.
.PP
Note that this may conflist with keyboard selection in the selected list box, if you set that to anything else than QListBox::Single (which is the default).
.PP
To use it, simply construct an instance and then add items to the two listboxes, available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve the selected options using \fBQListBox\fP methods on lbSelected().
.PP
This way, you can use your own \fBQListBoxItem\fP class, allowing you to easily store object data in those.
.PP
When an item is moved to a listbox, it is placed below the current item of that listbox.
.PP
Standard arrow icons are used, but you can use icons of your own choice if desired, see \fBsetButtonIcon()\fP. It is also possible to set tooltips and whatsthis help for the buttons. See \fBsetButtonTooltip()\fP and \fBsetButtonWhatsThis()\fP.
.PP
To set whatsthis or tooltips for the listboxes, access them through availableListbox() and \fBselectedListBox()\fP.
.PP
All the moving buttons are automatically set enabled as expected.
.PP
Signals are sent each time an item is moved, allowing you to follow the users actions if you need to. See addedToSelection(), removedFromSelection(), \fBmovedUp()\fP and \fBmovedDown()\fP
.PP
\fBAuthor:\fP
.RS 4
Anders Lund <anders@alweb.dk> 
.RE
.PP

.PP
Definition at line 79 of file kactionselector.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "\fBenum\fP \fBKActionSelector::MoveButton\fP"
.PP
This enum indentifies the moving buttons. 
.PP
Definition at line 108 of file kactionselector.h.
.SS "\fBenum\fP \fBKActionSelector::ButtonIconSize\fP"
.PP
This enum identifies the icon sizes, used for the move buttons. 
.PP
The values correspond to the following pixel sizes: 
.PD 0

.IP "\(bu" 2
SmallIcon - the return value of IconSize( KIcon::Small ), the user defined size of a small icon in \fBKDE\fP. This is the default setting. 
.IP "\(bu" 2
Small - 16px 
.IP "\(bu" 2
Medium - 22px 
.IP "\(bu" 2
Large - 32px 
.IP "\(bu" 2
XLarge - 48px 
.PP

.PP
Definition at line 125 of file kactionselector.h.
.SS "\fBenum\fP \fBKActionSelector::InsertionPolicy\fP"
.PP
This enum defines policies for where to insert moved items in a listbox. 
.PP
The following policies are currently defined: 
.PD 0

.IP "\(bu" 2
BelowCurrent - The item is inserted below the listbox' currentItem() or at the end if there is no curent item. 
.IP "\(bu" 2
Sorted - The listbox is sort()ed after one or more items are inserted. 
.IP "\(bu" 2
AtTop - The item is inserted at index 0 in the listbox. 
.IP "\(bu" 2
AtBottom - The item is inserted at the end of the listbox.
.PP
\fBSee also:\fP
.RS 4
\fBavailableInsertionPolicy()\fP, \fBsetAvailableInsertionPolicy()\fP, \fBselectedInsertionPolicy()\fP, \fBsetSelectedInsertionPolicy()\fP. 
.RE
.PP

.PP
Definition at line 145 of file kactionselector.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBQListBox\fP * KActionSelector::availableListBox () const"
.PP
\fBReturns:\fP
.RS 4
The \fBQListBox\fP holding the available actions 
.RE
.PP

.PP
Definition at line 128 of file kactionselector.cpp.
.SS "\fBQListBox\fP * KActionSelector::selectedListBox () const"
.PP
\fBReturns:\fP
.RS 4
The \fBQListBox\fP holding the selected actions 
.RE
.PP

.PP
Definition at line 133 of file kactionselector.cpp.
.SS "bool KActionSelector::moveOnDoubleClick () const"
.PP
\fBReturns:\fP
.RS 4
Wheather moveOnDoubleClcik is enabled.
.RE
.PP
If enabled, an item in any listbox will be moved to the other one whenever doubleclicked. 
.PP
\fBSee also:\fP
.RS 4
\fBsetMoveOnDoubleClick()\fP 
.RE
.PP

.SS "void KActionSelector::setMoveOnDoubleClick (bool enable)"
.PP
Sets moveOnDoubleClick to \fCenable\fP. 
.PP
\fBSee also:\fP
.RS 4
\fBmoveOnDoubleClick()\fP 
.RE
.PP

.PP
Definition at line 244 of file kactionselector.cpp.
.SS "bool KActionSelector::keyboardEnabled () const"
.PP
\fBReturns:\fP
.RS 4
Weather keyboard control is enabled.
.RE
.PP
When Keyboard control is enabled, the widget will react to the following keyboard actions: 
.PD 0

.IP "\(bu" 2
CTRL + Right - simulate clicking the add button 
.IP "\(bu" 2
CTRL + Left - simulate clicking the remove button 
.IP "\(bu" 2
CTRL + Up - simulate clicking the up button 
.IP "\(bu" 2
CTRL + Down - simulate clicking the down button
.PP
Additionally, pressing RETURN or ENTER on one of the list boxes will cause the current item of that listbox to be moved to the other listbox.
.PP
The keyboard actions are enabled by default.
.PP
\fBSee also:\fP
.RS 4
\fBsetKeyboardEnabled()\fP 
.RE
.PP

.SS "void KActionSelector::setKeyboardEnabled (bool enable)"
.PP
Sets the keyboard enabled depending on \fCenable\fP. 
.PP
\fBSee also:\fP
.RS 4
\fBkeyboardEnabled()\fP 
.RE
.PP

.PP
Definition at line 254 of file kactionselector.cpp.
.SS "\fBQString\fP KActionSelector::availableLabel () const"
.PP
\fBReturns:\fP
.RS 4
The text of the label for the available items listbox. 
.RE
.PP

.SS "void KActionSelector::setAvailableLabel (const \fBQString\fP & text)"
.PP
Sets the label for the available items listbox to \fCtext\fP. 
.PP
Note that this label has the listbox as its \fIbuddy\fP, so that if you have a single ampersand in the text, the following character will become the accellerator to focus te listbox. 
.PP
Definition at line 264 of file kactionselector.cpp.
.SS "\fBQString\fP KActionSelector::selectedLabel () const"
.PP
\fBReturns:\fP
.RS 4
the label of the selected items listbox. 
.RE
.PP

.SS "void KActionSelector::setSelectedLabel (const \fBQString\fP & text)"
.PP
Sets the label for the selected items listbox to \fCtext\fP. 
.PP
Note that this label has the listbox as its \fIbuddy\fP, so that if you have a single ampersand in the text, the following character will become the accellerator to focus te listbox. 
.PP
Definition at line 274 of file kactionselector.cpp.
.SS "\fBButtonIconSize\fP KActionSelector::buttonIconSize () const"
.PP
\fBReturns:\fP
.RS 4
the current ButtonIconSize. 
.RE
.PP

.SS "void KActionSelector::setButtonIconSize (\fBButtonIconSize\fP size)"
.PP
Sets the button icon size. 
.PP
See ButtonIconSize for the possible values and their pixel meaning. 
.PP
Definition at line 284 of file kactionselector.cpp.
.SS "\fBInsertionPolicy\fP KActionSelector::availableInsertionPolicy () const"
.PP
\fBReturns:\fP
.RS 4
The current insertion policy for the available listbox. The default policy for the available listbox is Sorted. See also InsertionPolicy, \fBsetAvailableInsertionPolicy()\fP. 
.RE
.PP

.SS "void KActionSelector::setAvailableInsertionPolicy (\fBInsertionPolicy\fP policy)"
.PP
Sets the insertion policy for the available listbox. 
.PP
See also InsertionPolicy, \fBavailableInsertionPolicy()\fP. 
.PP
Definition at line 296 of file kactionselector.cpp.
.SS "\fBInsertionPolicy\fP KActionSelector::selectedInsertionPolicy () const"
.PP
\fBReturns:\fP
.RS 4
The current insertion policy for the selected listbox. The default policy for the selected listbox is BelowCurrent. See also InsertionPolicy, \fBsetSelectedInsertionPolicy()\fP. 
.RE
.PP

.SS "void KActionSelector::setSelectedInsertionPolicy (\fBInsertionPolicy\fP policy)"
.PP
Sets the insertion policy for the selected listbox. 
.PP
See also InsertionPolicy, \fBselectedInsertionPolicy()\fP. 
.PP
Definition at line 306 of file kactionselector.cpp.
.SS "bool KActionSelector::showUpDownButtons () const"
.PP
\fBReturns:\fP
.RS 4
wheather the Up and Down buttons should be displayed. 
.RE
.PP

.SS "void KActionSelector::setShowUpDownButtons (bool show)"
.PP
Sets wheather the Up and Down buttons should be displayed according to \fCshow\fP. 
.PP
Definition at line 316 of file kactionselector.cpp.
.SS "void KActionSelector::setButtonIcon (const \fBQString\fP & icon, \fBMoveButton\fP button)"
.PP
Sets the pixmap of the button \fCbutton\fP to \fCicon\fP. 
.PP
It calls SmallIconSet(pm) to generate the icon set. 
.PP
Definition at line 138 of file kactionselector.cpp.
.PP
References endl(), and kdDebug().
.SS "void KActionSelector::setButtonIconSet (const \fBQIconSet\fP & iconset, \fBMoveButton\fP button)"
.PP
Sets the iconset for button \fCbutton\fP to \fCiconset\fP. 
.PP
You can use this method to et a costum icon set. Either created by \fBQIconSet\fP, or use the application instance of \fBKIconLoader\fP (recommended). 
.PP
Definition at line 163 of file kactionselector.cpp.
.PP
References endl(), and kdDebug().
.SS "void KActionSelector::setButtonTooltip (const \fBQString\fP & tip, \fBMoveButton\fP button)"
.PP
Sets the tooltip for the button \fCbutton\fP to \fCtip\fP. 
.PP
Definition at line 184 of file kactionselector.cpp.
.PP
References endl(), and kdDebug().
.SS "void KActionSelector::setButtonWhatsThis (const \fBQString\fP & text, \fBMoveButton\fP button)"
.PP
Sets the whatsthis help for button \fCbutton\fP to \fCtext\fP. 
.PP
Definition at line 205 of file kactionselector.cpp.
.PP
References QWhatsThis::add(), endl(), and kdDebug().
.SS "void KActionSelector::setButtonsEnabled ()"
.PP
Sets the enabled state of all moving buttons to reflect the current options. 
.PP
Be sure to call this if you add or removes items to either listbox after the widget is \fBshow()\fPn 
.PP
Definition at line 226 of file kactionselector.cpp.
.PP
Referenced by polish().
.SS "void KActionSelector::added (\fBQListBoxItem\fP * item)\fC [signal]\fP"
.PP
Emitted when an item is moved to the 'selected' listbox. 
.PP
.SS "void KActionSelector::removed (\fBQListBoxItem\fP * item)\fC [signal]\fP"
.PP
Emitted when an item is moved out of the 'selected' listbox. 
.PP
.SS "void KActionSelector::movedUp (\fBQListBoxItem\fP * item)\fC [signal]\fP"
.PP
Emitted when an item is moved upwards in the 'selected' listbox. 
.PP
.SS "void KActionSelector::movedDown (\fBQListBoxItem\fP * item)\fC [signal]\fP"
.PP
Emitted when an item is moved downwards in the 'selected' listbox. 
.PP
.SS "void KActionSelector::polish ()\fC [slot]\fP"
.PP
Reimplemented for internal reasons. 
.PP
(calls \fBsetButtonsEnabled()\fP) 
.PP
Reimplemented from \fBQWidget\fP.
.PP
Definition at line 335 of file kactionselector.cpp.
.PP
References setButtonsEnabled().
.SS "void KActionSelector::keyPressEvent (\fBQKeyEvent\fP *)\fC [protected]\fP"
.PP
Reimplamented for internal reasons. 
.PP
Reimplemented from \fBQWidget\fP.
.PP
Definition at line 343 of file kactionselector.cpp.
.SS "bool KActionSelector::eventFilter (\fBQObject\fP *, \fBQEvent\fP *)\fC [protected]\fP"
.PP
Reimplemented for internal reasons. 
.PP
Definition at line 369 of file kactionselector.cpp.
.PP
References QListBox::currentItem(), and QListBox::item().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
