• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KEditToolbarWidget Class Reference

#include <kedittoolbar.h>

Inheritance diagram for KEditToolbarWidget:
KXMLGUIClient

Signals

void enableOk (bool)
 

Public Member Functions

 KEditToolbarWidget (TDEActionCollection *collection, const TQString &xmlfile=TQString::null, bool global=true, TQWidget *parent=0L)
 
 KEditToolbarWidget (const TQString &defaultToolbar, TDEActionCollection *collection, const TQString &file=TQString::null, bool global=true, TQWidget *parent=0L)
 
 KEditToolbarWidget (KXMLGUIFactory *factory, TQWidget *parent=0L)
 
 KEditToolbarWidget (const TQString &defaultToolbar, KXMLGUIFactory *factory, TQWidget *parent=0L)
 
virtual ~KEditToolbarWidget ()
 
virtual TDEActionCollection * actionCollection () const
 
bool save ()
 
void rebuildKXMLGUIClients ()
 
- Public Member Functions inherited from KXMLGUIClient
 KXMLGUIClient ()
 
 KXMLGUIClient (KXMLGUIClient *parent)
 
virtual ~KXMLGUIClient ()
 
TDEAction * action (const char *name) const
 
virtual TDEAction * action (const TQDomElement &element) const
 
virtual TDEActionCollection * actionCollection () const
 
virtual TDEInstance * instance () const
 
virtual TQDomDocument domDocument () const
 
virtual TQString xmlFile () const
 
virtual TQString localXMLFile () const
 
void setXMLGUIBuildDocument (const TQDomDocument &doc)
 
TQDomDocument xmlguiBuildDocument () const
 
void setFactory (KXMLGUIFactory *factory)
 
KXMLGUIFactory * factory () const
 
KXMLGUIClient * parentClient () const
 
void insertChildClient (KXMLGUIClient *child)
 
void removeChildClient (KXMLGUIClient *child)
 
const TQPtrList< KXMLGUIClient > * childClients ()
 
void setClientBuilder (KXMLGUIBuilder *builder)
 
KXMLGUIBuilder * clientBuilder () const
 
void reloadXML ()
 
void plugActionList (const TQString &name, const TQPtrList< TDEAction > &actionList)
 
void unplugActionList (const TQString &name)
 
void addStateActionEnabled (const TQString &state, const TQString &action)
 
void addStateActionDisabled (const TQString &state, const TQString &action)
 
StateChange getActionsToChangeForState (const TQString &state)
 
void beginXMLPlug (TQWidget *)
 
void endXMLPlug ()
 
void prepareXMLUnplug (TQWidget *)
 

Protected Slots

void slotToolbarSelected (const TQString &text)
 
void slotInactiveSelected (TQListViewItem *item)
 
void slotActiveSelected (TQListViewItem *item)
 
void slotDropped (TDEListView *list, TQDropEvent *e, TQListViewItem *after)
 
void slotInsertButton ()
 
void slotRemoveButton ()
 
void slotUpButton ()
 
void slotDownButton ()
 
void slotChangeIcon ()
 

Protected Member Functions

void setupLayout ()
 
void insertActive (KEditToolbarInternal::ToolbarItem *item, TQListViewItem *before, bool prepend=false)
 
void removeActive (KEditToolbarInternal::ToolbarItem *item)
 
void moveActive (KEditToolbarInternal::ToolbarItem *item, TQListViewItem *before)
 
void initNonKPart (TDEActionCollection *collection, const TQString &file, bool global)
 
void initKPart (KXMLGUIFactory *factory)
 
void loadToolbarCombo (const TQString &defaultToolbar=TQString::null)
 
void loadActionList (TQDomElement &elem)
 
void updateLocal (TQDomElement &elem)
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from KXMLGUIClient
virtual void setInstance (TDEInstance *instance)
 
virtual void setXMLFile (const TQString &file, bool merge=false, bool setXMLDoc=true)
 
virtual void setLocalXMLFile (const TQString &file)
 
virtual void setXML (const TQString &document, bool merge=false)
 
virtual void setDOMDocument (const TQDomDocument &document, bool merge=false)
 
virtual void conserveMemory ()
 
virtual void stateChanged (const TQString &newstate, ReverseStateChange reverse=StateNoReverse)
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Public Types inherited from KXMLGUIClient
enum  ReverseStateChange { StateNoReverse , StateReverse }
 
- Static Public Member Functions inherited from KXMLGUIClient
static TQString findMostRecentXMLFile (const TQStringList &files, TQString &doc)
 

Detailed Description

A widget used to customize or configure toolbars.

This is the widget that does all of the work for the KEditToolbar dialog. In most cases, you will want to use the dialog instead of this widget directly.

Typically, you would use this widget only if you wanted to embed the toolbar editing directly into your existing configure or preferences dialog.

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.

Author
Kurt Granroth granr.nosp@m.oth@.nosp@m.kde.o.nosp@m.rg
Version
$Id$

Definition at line 269 of file kedittoolbar.h.

Constructor & Destructor Documentation

◆ KEditToolbarWidget() [1/4]

KEditToolbarWidget::KEditToolbarWidget ( TDEActionCollection *  collection,
const TQString &  xmlfile = TQString::null,
bool  global = true,
TQWidget *  parent = 0L 
)

Constructor.

This is the only entry point to this class. You must pass along your collection of actions (some of which appear in your toolbars). The other three parameters are optional.

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 TDEMainWindow so you're usually pretty safe in leaving it blank.

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)

The last parameter, parent, is the standard parent stuff.

Parameters
collectionThe collection of actions to work on
xmlfileThe application's local resource file
globalIf true, then the global resource file will also be parsed
parentThis widget's parent

Definition at line 539 of file kedittoolbar.cpp.

◆ KEditToolbarWidget() [2/4]

KEditToolbarWidget::KEditToolbarWidget ( const TQString &  defaultToolbar,
TDEActionCollection *  collection,
const TQString &  file = TQString::null,
bool  global = true,
TQWidget *  parent = 0L 
)

Definition at line 552 of file kedittoolbar.cpp.

◆ KEditToolbarWidget() [3/4]

KEditToolbarWidget::KEditToolbarWidget ( KXMLGUIFactory *  factory,
TQWidget *  parent = 0L 
)

Constructor for KParts based apps.

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.

The second parameter, parent, is the standard parent

Use this like so:

KEditToolbar edit(factory());
if ( edit.exec() )
...
KEditToolbar
A dialog used to customize or configure toolbars.
Definition: kedittoolbar.h:110
KXMLGUIClient::factory
KXMLGUIFactory * factory() const
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return 0L if the clien...
Definition: kxmlguiclient.cpp:555
Parameters
factoryYour application's factory object
parentThis widget's parent

Definition at line 566 of file kedittoolbar.cpp.

◆ KEditToolbarWidget() [4/4]

KEditToolbarWidget::KEditToolbarWidget ( const TQString &  defaultToolbar,
KXMLGUIFactory *  factory,
TQWidget *  parent = 0L 
)

Definition at line 578 of file kedittoolbar.cpp.

◆ ~KEditToolbarWidget()

KEditToolbarWidget::~KEditToolbarWidget ( )
virtual

Destructor.

Note that any changes done in this widget will NOT be saved in the destructor. You must call save() to do that.

Definition at line 591 of file kedittoolbar.cpp.

Member Function Documentation

◆ actionCollection()

TDEActionCollection * KEditToolbarWidget::actionCollection ( ) const
virtual

Reimplemented for internal purposes.

Reimplemented from KXMLGUIClient.

Definition at line 1062 of file kedittoolbar.cpp.

◆ enableOk

void KEditToolbarWidget::enableOk ( bool  )
signal

Emitted whenever any modifications are made by the user.

◆ initKPart()

void KEditToolbarWidget::initKPart ( KXMLGUIFactory *  factory)
protected

Definition at line 638 of file kedittoolbar.cpp.

◆ initNonKPart()

void KEditToolbarWidget::initNonKPart ( TDEActionCollection *  collection,
const TQString &  file,
bool  global 
)
protected

Definition at line 596 of file kedittoolbar.cpp.

◆ insertActive()

void KEditToolbarWidget::insertActive ( KEditToolbarInternal::ToolbarItem *  item,
TQListViewItem *  before,
bool  prepend = false 
)
protected

Definition at line 1195 of file kedittoolbar.cpp.

◆ loadActionList()

void KEditToolbarWidget::loadActionList ( TQDomElement &  elem)
protected

Definition at line 942 of file kedittoolbar.cpp.

◆ loadToolbarCombo()

void KEditToolbarWidget::loadToolbarCombo ( const TQString &  defaultToolbar = TQString::null)
protected

Definition at line 903 of file kedittoolbar.cpp.

◆ moveActive()

void KEditToolbarWidget::moveActive ( KEditToolbarInternal::ToolbarItem *  item,
TQListViewItem *  before 
)
protected

Definition at line 1282 of file kedittoolbar.cpp.

◆ rebuildKXMLGUIClients()

void KEditToolbarWidget::rebuildKXMLGUIClients ( )

Remove and readd all KMXLGUIClients to update the GUI.

Since
3.5

Definition at line 708 of file kedittoolbar.cpp.

◆ removeActive()

void KEditToolbarWidget::removeActive ( KEditToolbarInternal::ToolbarItem *  item)
protected

Definition at line 1242 of file kedittoolbar.cpp.

◆ save()

bool KEditToolbarWidget::save ( )

Save any changes the user made.

The file will be in the user's local directory (usually $HOME/.trinity/share/apps/<appname>). The filename will be the one specified in the constructor.. or the made up one if the filename was NULL.

Returns
The status of whether or not the save succeeded.

Definition at line 679 of file kedittoolbar.cpp.

◆ setupLayout()

void KEditToolbarWidget::setupLayout ( )
protected

Definition at line 757 of file kedittoolbar.cpp.

◆ slotActiveSelected

void KEditToolbarWidget::slotActiveSelected ( TQListViewItem *  item)
protectedslot

Definition at line 1112 of file kedittoolbar.cpp.

◆ slotChangeIcon

void KEditToolbarWidget::slotChangeIcon ( )
protectedslot

Definition at line 1380 of file kedittoolbar.cpp.

◆ slotDownButton

void KEditToolbarWidget::slotDownButton ( )
protectedslot

Definition at line 1322 of file kedittoolbar.cpp.

◆ slotDropped

void KEditToolbarWidget::slotDropped ( TDEListView *  list,
TQDropEvent *  e,
TQListViewItem *  after 
)
protectedslot

Definition at line 1144 of file kedittoolbar.cpp.

◆ slotInactiveSelected

void KEditToolbarWidget::slotInactiveSelected ( TQListViewItem *  item)
protectedslot

Definition at line 1096 of file kedittoolbar.cpp.

◆ slotInsertButton

void KEditToolbarWidget::slotInsertButton ( )
protectedslot

Definition at line 1172 of file kedittoolbar.cpp.

◆ slotRemoveButton

void KEditToolbarWidget::slotRemoveButton ( )
protectedslot

Definition at line 1185 of file kedittoolbar.cpp.

◆ slotToolbarSelected

void KEditToolbarWidget::slotToolbarSelected ( const TQString &  text)
protectedslot

Definition at line 1067 of file kedittoolbar.cpp.

◆ slotUpButton

void KEditToolbarWidget::slotUpButton ( )
protectedslot

Definition at line 1267 of file kedittoolbar.cpp.

◆ updateLocal()

void KEditToolbarWidget::updateLocal ( TQDomElement &  elem)
protected

Definition at line 1337 of file kedittoolbar.cpp.

◆ virtual_hook()

void KEditToolbarWidget::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Reimplemented from KXMLGUIClient.

Definition at line 1458 of file kedittoolbar.cpp.


The documentation for this class was generated from the following files:
  • kedittoolbar.h
  • kedittoolbar.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.