.TH "KEditToolbarWidget" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KEditToolbarWidget \- A widget used to customize or configure toolbars.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kedittoolbar.h>\fP
.PP
Inherits \fBQWidget\fP, and \fBKXMLGUIClient\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBenableOk\fP (bool)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKEditToolbarWidget\fP (\fBKActionCollection\fP *collection, const \fBQString\fP &xmlfile=QString::null, bool global=true, \fBQWidget\fP *parent=0L)"
.br
.ti -1c
.RI "\fBKEditToolbarWidget\fP (const \fBQString\fP &defaultToolbar, \fBKActionCollection\fP *collection, const \fBQString\fP &file=QString::null, bool global=true, \fBQWidget\fP *parent=0L)"
.br
.ti -1c
.RI "\fBKEditToolbarWidget\fP (\fBKXMLGUIFactory\fP *factory, \fBQWidget\fP *parent=0L)"
.br
.ti -1c
.RI "\fBKEditToolbarWidget\fP (const \fBQString\fP &defaultToolbar, \fBKXMLGUIFactory\fP *factory, \fBQWidget\fP *parent=0L)"
.br
.ti -1c
.RI "virtual \fB~KEditToolbarWidget\fP ()"
.br
.ti -1c
.RI "virtual \fBKActionCollection\fP * \fBactionCollection\fP () const "
.br
.ti -1c
.RI "bool \fBsave\fP ()"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotToolbarSelected\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "void \fBslotInactiveSelected\fP (\fBQListViewItem\fP *item)"
.br
.ti -1c
.RI "void \fBslotActiveSelected\fP (\fBQListViewItem\fP *item)"
.br
.ti -1c
.RI "void \fBslotDropped\fP (\fBKListView\fP *list, \fBQDropEvent\fP *e, \fBQListViewItem\fP *after)"
.br
.ti -1c
.RI "void \fBslotInsertButton\fP ()"
.br
.ti -1c
.RI "void \fBslotRemoveButton\fP ()"
.br
.ti -1c
.RI "void \fBslotUpButton\fP ()"
.br
.ti -1c
.RI "void \fBslotDownButton\fP ()"
.br
.ti -1c
.RI "void \fBslotChangeIcon\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBsetupLayout\fP ()"
.br
.ti -1c
.RI "void \fBinsertActive\fP (ToolbarItem *item, \fBQListViewItem\fP *before, bool prepend=false)"
.br
.ti -1c
.RI "void \fBremoveActive\fP (ToolbarItem *item)"
.br
.ti -1c
.RI "void \fBinitNonKPart\fP (\fBKActionCollection\fP *collection, const \fBQString\fP &file, bool global)"
.br
.ti -1c
.RI "void \fBinitKPart\fP (\fBKXMLGUIFactory\fP *factory)"
.br
.ti -1c
.RI "void \fBloadToolbarCombo\fP (const \fBQString\fP &defaultToolbar=QString::null)"
.br
.ti -1c
.RI "void \fBloadActionList\fP (\fBQDomElement\fP &elem)"
.br
.ti -1c
.RI "void \fBupdateLocal\fP (\fBQDomElement\fP &elem)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A widget used to customize or configure toolbars. 

This is the widget that does all of the work for the \fBKEditToolbar\fP dialog. In most cases, you will want to use the dialog instead of this widget directly.
.PP
Typically, you would use this widget only if you wanted to embed the toolbar editing directly into your existing configure or preferences dialog.
.PP
This widget only works if your application uses the XML UI framework for creating menus and toolbars. It depends on the XML files to describe the toolbar layouts and it requires the actions to determine which buttons are active.
.PP
\fBAuthor:\fP
.RS 4
Kurt Granroth <granroth@kde.org> 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkedittoolbar.h\fP 353275 2004-10-10 08:07:34Z bhards 
.RE
.PP
.RE
.PP

.PP
Definition at line 265 of file kedittoolbar.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KEditToolbarWidget::KEditToolbarWidget (\fBKActionCollection\fP * collection, const \fBQString\fP & xmlfile = \fCQString::null\fP, bool global = \fCtrue\fP, \fBQWidget\fP * parent = \fC0L\fP)"
.PP
Constructor. 
.PP
This is the only entry point to this class. You \fCmust\fP pass along your collection of actions (some of which appear in your toolbars). The other three parameters are optional.
.PP
The second parameter, xmlfile, is the name (absolute or relative) of your application's UI resource file. If it is left blank, then the resource file: share/apps/appname/appnameui.rc is used. This is the same resource file that is used by the default createGUI function in \fBKMainWindow\fP so you're usually pretty safe in leaving it blank.
.PP
The third parameter, global, controls whether or not the global resource file is used. If this is true, then you may edit all of the actions in your toolbars -- global ones and local one. If it is false, then you may edit only your application's entries. The only time you should set this to false is if your application does not use the global resource file at all (very rare)
.PP
The last parameter, parent, is the standard parent stuff.
.PP
\fBParameters:\fP
.RS 4
\fIcollection\fP The collection of actions to work on 
.br
\fIxmlfile\fP The application's local resource file 
.br
\fIglobal\fP If true, then the global resource file will also be parsed 
.br
\fIparent\fP This widget's parent 
.RE
.PP

.PP
Definition at line 459 of file kedittoolbar.cpp.
.PP
References QWidget::adjustSize(), QWidget::setMinimumSize(), and QWidget::sizeHint().
.SS "KEditToolbarWidget::KEditToolbarWidget (\fBKXMLGUIFactory\fP * factory, \fBQWidget\fP * parent = \fC0L\fP)"
.PP
Constructor for KParts based apps. 
.PP
The first parameter, factory, is a pointer to the XML GUI factory object for your application. It contains a list of all of the GUI clients (along with the action collections and xml files) and the toolbar editor uses that.
.PP
The second parameter, parent, is the standard parent
.PP
Use this like so: 
.PP
.nf
 KEditToolbar edit(factory());
 if ( edit.exec() )
 ...

.fi
.PP
.PP
\fBParameters:\fP
.RS 4
\fIfactory\fP Your application's factory object 
.br
\fIparent\fP This widget's parent 
.RE
.PP

.PP
Definition at line 486 of file kedittoolbar.cpp.
.PP
References QWidget::adjustSize(), QWidget::setMinimumSize(), and QWidget::sizeHint().
.SS "KEditToolbarWidget::~\fBKEditToolbarWidget\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Note that any changes done in this widget will \fCNOT\fP be saved in the destructor. You \fCmust\fP call \fBsave()\fP to do that. 
.PP
Definition at line 511 of file kedittoolbar.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBKActionCollection\fP * KEditToolbarWidget::actionCollection () const\fC [virtual]\fP"
.PP
Retrieves the entire action collection for the GUI client. 
.PP
If you subclass \fBKXMLGUIClient\fP you should call \fBKActionCollection::setWidget( QWidget* )\fP with this object, or you will encounter subtle bugs with \fBKAction\fP keyboard shortcuts. This is not necessary if your \fBKXMLGUIClient\fP is a \fBKMainWindow\fP.
.PP
\fBSee also:\fP
.RS 4
\fBKActionCollection::setWidget( QWidget* )\fP 
.RE
.PP

.PP
Reimplemented from \fBKXMLGUIClient\fP.
.PP
Definition at line 967 of file kedittoolbar.cpp.
.SS "bool KEditToolbarWidget::save ()"
.PP
Save any changes the user made. 
.PP
The file will be in the user's local directory (usually $HOME/.kde/share/apps/<appname>). The filename will be the one specified in the constructor.. or the made up one if the filename was NULL.
.PP
\fBReturns:\fP
.RS 4
The status of whether or not the save succeeded. 
.RE
.PP

.PP
Definition at line 599 of file kedittoolbar.cpp.
.PP
References KXMLGUIFactory::addClient(), QValueList::begin(), QPtrListIterator::current(), endl(), KXMLGUIClient::factory(), QPtrList::first(), kdDebug(), QPtrList::last(), locate(), QPtrList::prev(), KXMLGUIFactory::removeClient(), KXMLGUIClient::setXMLFile(), KXMLGUIClient::setXMLGUIBuildDocument(), QPtrListIterator::toFirst(), and KXMLGUIClient::xmlFile().
.PP
Referenced by KEditToolbar::slotApply(), and KEditToolbar::slotOk().
.SS "void KEditToolbarWidget::enableOk (bool)\fC [signal]\fP"
.PP
Emitted whenever any modifications are made by the user. 
.PP


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