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

tdeui

Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Friends | List of all members
KDockMainWindow Class Reference

#include <kdockwidget.h>

Inheritance diagram for KDockMainWindow:
TDEMainWindow KXMLGUIBuilder KXMLGUIClient

Signals

void dockWidgetHasUndocked (KDockWidget *)
 

Public Member Functions

 KDockMainWindow (TQWidget *parent=0L, const char *name=0L, WFlags f=(WFlags)(WType_TopLevel|WDestructiveClose))
 
virtual ~KDockMainWindow ()
 
KDockManager * manager () const
 
void setMainDockWidget (KDockWidget *dockwidget)
 
KDockWidget * getMainDockWidget () const
 
KDockWidget * createDockWidget (const TQString &name, const TQPixmap &pixmap, TQWidget *parent=0L, const TQString &strCaption=TQString::null, const TQString &strTabPageLabel=TQString::fromLatin1(" "))
 
void writeDockConfig (TQDomElement &base)
 
void readDockConfig (TQDomElement &base)
 
void writeDockConfig (TDEConfig *c=0L, TQString group=TQString::null)
 
void readDockConfig (TDEConfig *c=0L, TQString group=TQString::null)
 
void activateDock ()
 
TQPopupMenu * dockHideShowMenu () const
 
void makeDockVisible (KDockWidget *dock)
 
void makeDockInvisible (KDockWidget *dock)
 
void makeWidgetDockVisible (TQWidget *widget)
 
void setView (TQWidget *widget)
 
- Public Member Functions inherited from TDEMainWindow
 TDEMainWindow (TQWidget *parent=0, const char *name=0, WFlags f=(WFlags)(WType_TopLevel|WDestructiveClose))
 
 TDEMainWindow (int cflags, TQWidget *parent=0, const char *name=0, WFlags f=(WFlags)(WType_TopLevel|WDestructiveClose))
 
virtual ~TDEMainWindow ()
 
TDEPopupMenu * helpMenu (const TQString &aboutAppText=TQString::null, bool showWhatsThis=true)
 
TDEPopupMenu * customHelpMenu (bool showWhatsThis=true)
 
virtual void show ()
 
virtual void hide ()
 
bool restore (int number, bool show=true)
 
virtual KXMLGUIFactory * guiFactory ()
 
void createGUI (const TQString &xmlfile=TQString::null, bool _conserveMemory=true)
 
void setHelpMenuEnabled (bool showHelpMenu=true)
 
bool isHelpMenuEnabled ()
 
bool hasMenuBar ()
 
KMenuBar * menuBar ()
 
KStatusBar * statusBar ()
 
TDEToolBar * toolBar (const char *name=0)
 
TQPtrListIterator< TDEToolBar > toolBarIterator ()
 
TDEAccel * accel ()
 
void setFrameBorderWidth (int)
 
void setAutoSaveSettings (const TQString &groupName=TQString::fromLatin1("MainWindow"), bool saveWindowSize=true)
 
void resetAutoSaveSettings ()
 
bool autoSaveSettings () const
 
TQString autoSaveGroup () const
 
void applyMainWindowSettings (TDEConfig *config, const TQString &groupName, bool force)
 
void applyMainWindowSettings (TDEConfig *config, const TQString &groupName=TQString::null)
 
void saveMainWindowSettings (TDEConfig *config, const TQString &groupName=TQString::null)
 
void setStandardToolBarMenuEnabled (bool enable)
 
bool isStandardToolBarMenuEnabled () const
 
void createStandardStatusBarAction ()
 
void setupGUI (int options=ToolBar|Keys|StatusBar|Save|Create, const TQString &xmlfile=TQString::null)
 
void setupGUI (TQSize defaultSize, int options=ToolBar|Keys|StatusBar|Save|Create, const TQString &xmlfile=TQString::null)
 
TDEAction * toolBarMenuAction ()
 
void setupToolbarMenuActions ()
 
virtual void finalizeGUI (KXMLGUIClient *client)
 
void finalizeGUI (bool force)
 
bool initialGeometrySet () const
 
void ignoreInitialGeometry ()
 
TQSize sizeForCentralWidgetSize (TQSize size) TDE_DEPRECATED
 
virtual void setIcon (const TQPixmap &)
 
- Public Member Functions inherited from KXMLGUIBuilder
 KXMLGUIBuilder (TQWidget *widget)
 
KXMLGUIClient * builderClient () const
 
void setBuilderClient (KXMLGUIClient *client)
 
TDEInstance * builderInstance () const
 
void setBuilderInstance (TDEInstance *instance)
 
TQWidget * widget ()
 
virtual TQStringList containerTags () const
 
virtual TQWidget * createContainer (TQWidget *parent, int index, const TQDomElement &element, int &id)
 
virtual void removeContainer (TQWidget *container, TQWidget *parent, TQDomElement &element, int id)
 
virtual TQStringList customTags () const
 
virtual int createCustomElement (TQWidget *parent, int index, const TQDomElement &element)
 
virtual void removeCustomElement (TQWidget *parent, int id)
 
virtual void finalizeGUI (KXMLGUIClient *client)
 
- 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 slotDockWidgetUndocked ()
 
- Protected Slots inherited from TDEMainWindow
void saveNewToolbarConfig ()
 
virtual void showAboutApplication ()
 
void saveAutoSaveSettings ()
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from TDEMainWindow
void paintEvent (TQPaintEvent *e)
 
void childEvent (TQChildEvent *e)
 
void resizeEvent (TQResizeEvent *e)
 
virtual void closeEvent (TQCloseEvent *)
 
virtual bool queryExit ()
 
virtual bool queryClose ()
 
virtual void saveProperties (TDEConfig *)
 
virtual void readProperties (TDEConfig *)
 
virtual void saveGlobalProperties (TDEConfig *sessionConfig)
 
virtual void readGlobalProperties (TDEConfig *sessionConfig)
 
void savePropertiesInternal (TDEConfig *, int)
 
bool readPropertiesInternal (TDEConfig *, int)
 
bool settingsDirty () const
 
TQString settingsGroup () const
 
void saveWindowSize (TDEConfig *config) const
 
void restoreWindowSize (TDEConfig *config)
 
void parseGeometry (bool parsewidth)
 
virtual void virtual_hook (int id, void *data)
 
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)
 

Protected Attributes

KDockWidget * mainDockWidget
 
KDockManager * dockManager
 

Friends

class KDockManager
 

Additional Inherited Members

- Public Types inherited from TDEMainWindow
enum  CreationFlags { NoDCOPObject = 1 , NewRefCountMode = 2 }
 
enum  StandardWindowOptions {
  ToolBar = 1 , Keys = 2 , StatusBar = 4 , Save = 8 ,
  Create = 16
}
 
- Public Types inherited from KXMLGUIClient
enum  ReverseStateChange { StateNoReverse , StateReverse }
 
- Public Slots inherited from TDEMainWindow
int configureToolbars ()
 
virtual void setCaption (const TQString &caption)
 
virtual void setCaption (const TQString &caption, bool modified)
 
virtual void setPlainCaption (const TQString &caption)
 
void appHelpActivated (void)
 
virtual void slotStateChanged (const TQString &newstate)
 
void slotStateChanged (const TQString &newstate, KXMLGUIClient::ReverseStateChange)
 
void setSettingsDirty ()
 
- Static Public Member Functions inherited from TDEMainWindow
static bool canBeRestored (int number)
 
static const TQString classNameOfToplevel (int number)
 
static TQPtrList< TDEMainWindow > * getMemberList ()
 
- Static Public Member Functions inherited from KXMLGUIClient
static TQString findMostRecentXMLFile (const TQStringList &files, TQString &doc)
 
- Static Public Attributes inherited from TDEMainWindow
static TQPtrList< TDEMainWindow > * memberList = 0L
 

Detailed Description

A special kind of TDEMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set).

The main widget should be a KDockWidget where other KDockWidget can be docked to the left, right, top, bottom or to the middle. Note: dock to the middle means to drop on a dockwidget and to unite them to a new widget, a tab control.

Furthermore, the KDockMainWindow has got the KDockManager and some data about the dock states.

If you've got some dockwidgets, you can dock them to the dockmainwindow to initialize a start scene: Here an example:

DockApplication::DockApplication( const char* name) : KDockMainWindow( name)
{
...
KDockWidget* mainDock;
mainDock = createDockWidget( "Falk's MainDockWidget", mainPixmap, 0L, "main_dock_widget");
AnyContentsWidget* cw = new AnyContentsWidget( mainDock);
mainDock->setWidget( cw);
// allow others to dock to the 4 sides
mainDock->setDockSite(KDockWidget::DockCorner);
// forbit docking abilities of mainDock itself
mainDock->setEnableDocking(KDockWidget::DockNone);
setView( mainDock); // central widget in a KDE mainwindow
setMainDockWidget( mainDock); // master dockwidget
...
KDockWidget* dockLeft;
dockLeft = createDockWidget( "Intially left one", anyOtherPixmap, 0L, i18n("The left dockwidget"));
AnotherWidget* aw = new AnotherWidget( dockLeft);
dockLeft->setWidget( aw);
dockLeft->manualDock( mainDock, // dock target
KDockWidget::DockLeft, // dock site
20 ); // relation target/this (in percent)
...
KDockMainWindow
A special kind of TDEMainWindow that is able to have dockwidget child widgets (and member of the dock...
Definition: kdockwidget.h:1315
KDockWidget
Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...
Definition: kdockwidget.h:429
KDockWidget::setEnableDocking
void setEnableDocking(int pos)
Specify where it is either possible or impossible for this to dock to another dockwidget.
Definition: kdockwidget.cpp:762
KDockWidget::setWidget
void setWidget(TQWidget *w)
Sets the embedded widget.
Definition: kdockwidget.cpp:1448
KDockWidget::manualDock
KDockWidget * manualDock(KDockWidget *target, DockPosition dockPos, int spliPos=50, TQPoint pos=TQPoint(0, 0), bool check=false, int tabIndex=-1)
This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...
Definition: kdockwidget.cpp:947
KDockWidget::setDockSite
void setDockSite(int pos)
Specify where it is either possible or impossible for another dockwidget to dock to this.
Definition: kdockwidget.h:523

Docking is fully dynamic at runtime. That means you can always move dockwidgets via drag and drop.

And last but not least you can use the popupmenu for showing or hiding any controlled dockwidget of this class and insert it to your main menu bar or anywhere else.

Author
Max Judin (documentation: Falk Brettschneider).

Definition at line 1314 of file kdockwidget.h.

Constructor & Destructor Documentation

◆ KDockMainWindow()

KDockMainWindow::KDockMainWindow ( TQWidget *  parent = 0L,
const char *  name = 0L,
WFlags  f = (WFlags)(WType_TopLevel | WDestructiveClose) 
)

Constructs a dockmainwindow.

A special kind of TDEMainWindow that is able to have dockwidget child widgets.

It calls its base class constructor and does additional things concerning to the dock stuff:

  • information about the dock state of this' children gets initialized
  • a dockmanager is created...
  • ...and gets initialized
  • the main dockwidget is set to 0
Parameters
parentParent widget for the dock main widget
nameinternal object name
fTQt::WidgetFlags widget flags

The main widget should be a dockwidget where other dockwidgets can be docked to the left, right, top, bottom or to the middle. Furthermore, the KDockMainWindow has got the KDocManager and some data about the dock states.

Author
Max Judin.

Definition at line 102 of file kdockwidget.cpp.

◆ ~KDockMainWindow()

KDockMainWindow::~KDockMainWindow ( )
virtual

Destructs a dockmainwindow.

Definition at line 110 of file kdockwidget.cpp.

Member Function Documentation

◆ activateDock()

void KDockMainWindow::activateDock ( )
inline

It runs through all dockwidgets which are under control of the dockmanager and calls show() for every encapsulated widget and show() for the dockwidget itself if it is not in tab mode.

Additionally, if the main dockwidget is not a TQDialog, it will be shown.

Definition at line 1414 of file kdockwidget.h.

◆ createDockWidget()

KDockWidget * KDockMainWindow::createDockWidget ( const TQString &  name,
const TQPixmap &  pixmap,
TQWidget *  parent = 0L,
const TQString &  strCaption = TQString::null,
const TQString &  strTabPageLabel = TQString::fromLatin1( " " ) 
)

This is one of the most important methods! The KDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.

The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow.

Parameters
nameTQObject name (default dockwidget caption)
pixmapwindow icon (for instance shown when docked as tabwidget entry)
parentparent widget for the new dockwidget
strCaptionwindow title (shown when toplevel)
strTabPageLabeltitle of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption
Returns
a pointer to the new created dockwidget

Definition at line 135 of file kdockwidget.cpp.

◆ dockHideShowMenu()

TQPopupMenu * KDockMainWindow::dockHideShowMenu ( ) const
inline

Returns a popup menu that contains entries for all controlled dockwidgets making hiding and showing them possible.

Returns
the wanted popup menu

Definition at line 1422 of file kdockwidget.h.

◆ dockWidgetHasUndocked

void KDockMainWindow::dockWidgetHasUndocked ( KDockWidget *  )
signal

Signals a certain dockwidget is undocked now.

◆ getMainDockWidget()

KDockWidget * KDockMainWindow::getMainDockWidget ( ) const
inline

Returns the main dockwidget.

Returns
pointer to the main dockwidget

Definition at line 1365 of file kdockwidget.h.

◆ makeDockInvisible()

void KDockMainWindow::makeDockInvisible ( KDockWidget *  dock)

This method hides the given dockwidget.

Parameters
dockthe dockwidget that is to be shown

Definition at line 146 of file kdockwidget.cpp.

◆ makeDockVisible()

void KDockMainWindow::makeDockVisible ( KDockWidget *  dock)

This method shows the given dockwidget.

The clue is that it also considers the dockwidget could be a tab page and must set to be the activate one.

Parameters
dockthe dockwidget that is to be shown

Definition at line 140 of file kdockwidget.cpp.

◆ makeWidgetDockVisible()

void KDockMainWindow::makeWidgetDockVisible ( TQWidget *  widget)

This is an overloaded member function, provided for convenience.

It differs from the above function only in what argument(s) it accepts.

Definition at line 152 of file kdockwidget.cpp.

◆ manager()

KDockManager * KDockMainWindow::manager ( ) const
inline

Returns the dockmanager of this.

(see KDockManager)

Returns
pointer to the wanted dockmanager

Definition at line 1350 of file kdockwidget.h.

◆ readDockConfig() [1/2]

void KDockMainWindow::readDockConfig ( TDEConfig *  c = 0L,
TQString  group = TQString::null 
)

It reads the current dock state from the given section of TDEConfig.

Parameters
cKDE class for saving configurations
groupname of section to read from

Definition at line 173 of file kdockwidget.cpp.

◆ readDockConfig() [2/2]

void KDockMainWindow::readDockConfig ( TQDomElement &  base)

Reads the current dock window layout from a DOM tree below the given element.

Definition at line 162 of file kdockwidget.cpp.

◆ setMainDockWidget()

void KDockMainWindow::setMainDockWidget ( KDockWidget *  dockwidget)

Sets a new main dockwidget.

Additionally, the toolbar is re-initialized.

Parameters
dockwidgetdockwidget that become the new main dockwidget

Definition at line 115 of file kdockwidget.cpp.

◆ setView()

void KDockMainWindow::setView ( TQWidget *  widget)

This method calls the base class method.

If the given widget inherits KDockWidget, applyToWidget(this) is called.

Parameters
widgetany widget that should become the main view

Definition at line 122 of file kdockwidget.cpp.

◆ slotDockWidgetUndocked

void KDockMainWindow::slotDockWidgetUndocked ( )
protectedslot

Called whenever one of the dockwidgets of this has been undocked.

Definition at line 179 of file kdockwidget.cpp.

◆ virtual_hook()

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

Reimplemented from TDEMainWindow.

Definition at line 3322 of file kdockwidget.cpp.

◆ writeDockConfig() [1/2]

void KDockMainWindow::writeDockConfig ( TDEConfig *  c = 0L,
TQString  group = TQString::null 
)

It writes the current dock state in the given section of TDEConfig.

Parameters
cKDE class for saving configurations
groupname of section to write to

Definition at line 168 of file kdockwidget.cpp.

◆ writeDockConfig() [2/2]

void KDockMainWindow::writeDockConfig ( TQDomElement &  base)

Saves the current dock window layout into a DOM tree below the given element.

Definition at line 157 of file kdockwidget.cpp.

Friends And Related Function Documentation

◆ KDockManager

friend class KDockManager
friend

Definition at line 1319 of file kdockwidget.h.

Member Data Documentation

◆ dockManager

KDockManager* KDockMainWindow::dockManager
protected

A pointer to the manager for the dock process.

Definition at line 1470 of file kdockwidget.h.

◆ mainDockWidget

KDockWidget* KDockMainWindow::mainDockWidget
protected

A pointer to the main dockwidget (where one can manualDock() to.

Definition at line 1465 of file kdockwidget.h.


The documentation for this class was generated from the following files:
  • kdockwidget.h
  • kdockwidget.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.