KDevelop API Documentation

ToolWindowState Class Reference

The state of a single tool window (minor helper class). More...

Collaboration diagram for ToolWindowState:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ToolWindowState (KDockWidget *pDockWidget)

Public Attributes

bool hasDockWidget
 Is there a DockWidget (pDockWidget != 0).
KDockTabGrouppTabGroup
 Pointer to the parent tab group or 0.
bool hasTabGroup
 true if there is a parent tab group
bool mayBeShown
 true if there is a DockWidget and it may be shown
bool mayBeHide
 true if there is a DockWidget and it may be hidden
KDockWidgetpDockBaseWindow
 Pointer to the window which contains all tool windows (may be equal to pDockWidget).
bool hasDockBaseWindow
 true, if there is a dockBaseWindow
bool dockBaseMayBeShow
 true if thre is a dock base window and it may be shown
bool dockBaseMayBeHide
 true if thre is a dock base window and it may be hidden
bool dockBaseMayBeDockBack
 true if thre is a dock base window and it may be dock back
bool dockBaseIsTopLevel
QString dockBaseName
bool viewMenuChecked
 true if the view menu item which belongs to pDockWidget should be checked
bool viewMenuEnabled
 true if the view menu item which belongs to pDockWidget should be enabled
bool dockBaseIsHidden
bool dockBaseIsVisible
 true if there is a dock base and it is visible

Detailed Description

The state of a single tool window (minor helper class).

If a tool window (type QWidget) has to be displayed, it is wrapped by a KMdiChildView which in turn is embedded into a KDockWidget.

This class works on the KDockWidget wrapper for the tool windows.

A tool window (type KDockWidget) is embedded into the main window in 2 ways depending on the number of tool windows:

  1. If there is just one tool window, the tool window is embedded into a KDockWidget which is docked directely to the main window or which is top level, depending on the mdi mode.
  2. If there is more than one tool window, the tool windows are put into a KDockTabWidget which is embedded into another KDockWidget which in turn is docked to the main window or which is top level, depending on the mdi mode. A tool windows parent can This class figures out how a single tool window is embedded. It determines the various states of the tool window, its parent tab group and its dock base if those exist.

Usage
if you have a KDockWidget which represents a tool window, just use

 KDockWidget *pDockWidget = ...
 const ToolWindowState winState(pKDockWidget);
 // now you can use all of winState's contents, e. g.
 if (winState.hasDockBaseWindow) winState.pDockBaseWindow->...
 ...
Making winState constant makes shure nobody changes its contents after it has been created. It would have also been possible to make all members private and use access functions, but I don't think it is worth the trouble.

Definition at line 115 of file mainwindow.cpp.


Constructor & Destructor Documentation

ToolWindowState::ToolWindowState KDockWidget pDockWidget  ) 
 

Definition at line 137 of file mainwindow.cpp.

References dockBaseIsHidden, dockBaseIsTopLevel, dockBaseIsVisible, dockBaseMayBeDockBack, dockBaseMayBeHide, dockBaseMayBeShow, dockBaseName, KDockWidget::dockManager(), KDockManager::findWidgetParentDock(), hasDockBaseWindow, hasDockWidget, hasTabGroup, KDockWidget::isDockBackPossible(), KDockWidget::mayBeHide(), mayBeHide, KDockWidget::mayBeShow(), mayBeShown, KDockWidget::parentDockTabGroup(), pDockBaseWindow, pTabGroup, viewMenuChecked, and viewMenuEnabled.


Member Data Documentation

bool ToolWindowState::dockBaseIsHidden
 

Definition at line 133 of file mainwindow.cpp.

Referenced by ToolDockBaseState::ToolDockBaseState(), and ToolWindowState().

bool ToolWindowState::dockBaseIsTopLevel
 

Definition at line 129 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::dockBaseIsVisible
 

true if there is a dock base and it is visible

Definition at line 134 of file mainwindow.cpp.

Referenced by ToolDockBaseState::ToolDockBaseState(), and ToolWindowState().

bool ToolWindowState::dockBaseMayBeDockBack
 

true if thre is a dock base window and it may be dock back

Definition at line 128 of file mainwindow.cpp.

Referenced by ToolDockBaseState::ToolDockBaseState(), and ToolWindowState().

bool ToolWindowState::dockBaseMayBeHide
 

true if thre is a dock base window and it may be hidden

Definition at line 127 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::dockBaseMayBeShow
 

true if thre is a dock base window and it may be shown

Definition at line 126 of file mainwindow.cpp.

Referenced by ToolWindowState().

QString ToolWindowState::dockBaseName
 

Definition at line 130 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::hasDockBaseWindow
 

true, if there is a dockBaseWindow

Definition at line 125 of file mainwindow.cpp.

Referenced by ToolDockBaseState::ToolDockBaseState(), and ToolWindowState().

bool ToolWindowState::hasDockWidget
 

Is there a DockWidget (pDockWidget != 0).

Definition at line 119 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::hasTabGroup
 

true if there is a parent tab group

Definition at line 121 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::mayBeHide
 

true if there is a DockWidget and it may be hidden

Definition at line 123 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::mayBeShown
 

true if there is a DockWidget and it may be shown

Definition at line 122 of file mainwindow.cpp.

Referenced by ToolWindowState().

KDockWidget* ToolWindowState::pDockBaseWindow
 

Pointer to the window which contains all tool windows (may be equal to pDockWidget).

Definition at line 124 of file mainwindow.cpp.

Referenced by ToolDockBaseState::ToolDockBaseState(), and ToolWindowState().

KDockTabGroup* ToolWindowState::pTabGroup
 

Pointer to the parent tab group or 0.

Definition at line 120 of file mainwindow.cpp.

Referenced by ToolWindowState().

bool ToolWindowState::viewMenuChecked
 

true if the view menu item which belongs to pDockWidget should be checked

Definition at line 131 of file mainwindow.cpp.

Referenced by MainWindow::fillToolViewsMenu(), MainWindow::showAllToolWin(), ToolDockBaseState::ToolDockBaseState(), and ToolWindowState().

bool ToolWindowState::viewMenuEnabled
 

true if the view menu item which belongs to pDockWidget should be enabled

Definition at line 132 of file mainwindow.cpp.

Referenced by ToolWindowState().


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:49:19 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003