lib

#include <kopalettemanager.h>

Public Slots

void slotTogglePalette (int paletteIndex)
void slotToggleAllPalettes ()
void showAllPalettes (bool shown)
virtual void slotReset ()
virtual void slotResetFont ()

Public Member Functions

 KoPaletteManager (KoView *view, TDEActionCollection *ac, const char *name)
virtual void addWidget (TQWidget *widget, const TQString &name, const TQString &paletteName, int position=-1, enumKoPaletteStyle style=PALETTE_DOCKER, bool shown=true)
virtual TQWidget * widget (const TQString &name)
virtual void showWidget (const TQString &name)
virtual void hideWidget (const TQString &name)
virtual void removeWidget (const TQString &name)
virtual KoPalette * createPalette (const TQString &name, const TQString &caption, enumKoPaletteStyle style=PALETTE_DOCKER)
virtual void placePalette (const TQString &name, Dock location=DockRight)
virtual void addPalette (KoPalette *palette, const TQString &name, Dock location=DockRight)
virtual void setFixedWidth (int w)

Protected Member Functions

bool eventFilter (TQObject *o, TQEvent *e)

Detailed Description

Manages the set of dockwindow palettes and their widgets.

You create one palette manager per view; then you can add widgets to your hearts content. Widgets are grouped into dock windows by palette names. To see the menu entries, add a the following line to your .rc file:

There are two styles: one that uses tabs and one that uses the vertical TQToolBox style to separate and show individual widgets. By implementing the kopalette interface and extending the above enum, you can add more types.

TODO:

  • Drag & Drop
  • Restore order of tabs in a docker
  • Set initial position of floating dockers on first startup
  • Restoration of the application default state
  • Make it impossible to close a floating palette window with alt-f4

Definition at line 85 of file kopalettemanager.h.

Constructor & Destructor Documentation

◆ KoPaletteManager()

KoPaletteManager::KoPaletteManager ( KoView * view,
TDEActionCollection * ac,
const char * name )

Definition at line 45 of file kopalettemanager.cpp.

◆ ~KoPaletteManager()

KoPaletteManager::~KoPaletteManager ( )
virtual

Definition at line 118 of file kopalettemanager.cpp.

Member Function Documentation

◆ addPalette()

void KoPaletteManager::addPalette ( KoPalette * palette,
const TQString & name,
Dock location = DockRight )
virtual

Add a palette; this can be used to add palettes other than those in the two default styles.

Definition at line 431 of file kopalettemanager.cpp.

◆ addWidget()

void KoPaletteManager::addWidget ( TQWidget * widget,
const TQString & name,
const TQString & paletteName,
int position = -1,
enumKoPaletteStyle style = PALETTE_DOCKER,
bool shown = true )
virtual

Add a new tab with the given name an description to the specified palette.

The widget's caption is used, where necessary. If there is no palette with this name, a new palette is created with the given palette name and the widget's caption.

If there is already a widget with the given name, that widget will be unplugged (but not destroyed) and the given widget will be plugged in place.

If the widget occurs in the saved configuration, it is not added to the specified palette, but in the place where it was left.

Parameters
widgetthe widget that will be inserted as a tab or entry in the palette
namethe name under which the palette will be stored. Not the caption – do not i18n this.
paletteNamethe unique name of the palette this widget will be a child of. If the palette already exists, the current widget is added to it.
positionthe position of the widget in the palettes
styledocker, toolbox or slider

Definition at line 132 of file kopalettemanager.cpp.

◆ createPalette()

KoPalette * KoPaletteManager::createPalette ( const TQString & name,
const TQString & caption,
enumKoPaletteStyle style = PALETTE_DOCKER )
virtual

Create an empty palette in the given style.

with the given name and caption. If the palette already exists, nothing is done.

Definition at line 328 of file kopalettemanager.cpp.

◆ eventFilter()

bool KoPaletteManager::eventFilter ( TQObject * o,
TQEvent * e )
protected

Definition at line 498 of file kopalettemanager.cpp.

◆ hideWidget()

void KoPaletteManager::hideWidget ( const TQString & name)
virtual

hide the specified widget

Definition at line 292 of file kopalettemanager.cpp.

◆ placePalette()

void KoPaletteManager::placePalette ( const TQString & name,
Dock location = DockRight )
virtual

Move the specified palette to the specified location.

If there is already a location for the palette in the saved settings, then move it there instead of the specified location.

Definition at line 362 of file kopalettemanager.cpp.

◆ removeWidget()

void KoPaletteManager::removeWidget ( const TQString & name)
virtual

Remove the widget with the specified name from whichever palette it is currently in.

If it is the last widget in the palette, the palette is destroyed. If the name does not occur, nothing is done.

Definition at line 307 of file kopalettemanager.cpp.

◆ setFixedWidth()

void KoPaletteManager::setFixedWidth ( int w)
virtual

Sets all palettes to the specified fixed width.

Definition at line 610 of file kopalettemanager.cpp.

◆ showAllPalettes

void KoPaletteManager::showAllPalettes ( bool shown)
slot

Definition at line 490 of file kopalettemanager.cpp.

◆ showWidget()

void KoPaletteManager::showWidget ( const TQString & name)
virtual

Show a the specified palette wherever it currently is.

Definition at line 277 of file kopalettemanager.cpp.

◆ slotReset

void KoPaletteManager::slotReset ( )
virtualslot

Restores the palette configuration to the default layout, i.e, the layout preferred by each docker.

Definition at line 223 of file kopalettemanager.cpp.

◆ slotResetFont

void KoPaletteManager::slotResetFont ( )
virtualslot

Reset the font for all palettes.

Definition at line 263 of file kopalettemanager.cpp.

◆ slotToggleAllPalettes

void KoPaletteManager::slotToggleAllPalettes ( )
slot

Definition at line 452 of file kopalettemanager.cpp.

◆ slotTogglePalette

void KoPaletteManager::slotTogglePalette ( int paletteIndex)
slot

Definition at line 440 of file kopalettemanager.cpp.

◆ widget()

TQWidget * KoPaletteManager::widget ( const TQString & name)
virtual

Get a certain widget by name.

Definition at line 272 of file kopalettemanager.cpp.


The documentation for this class was generated from the following files: