KDevelop API Documentation

MainWindow Class Reference

Handles the multiple document interface modes.. More...

#include <mainwindow.h>

Inheritance diagram for MainWindow:

KMdiMainFrm KDevMainWindow List of all members.

Public Types

enum  EView { OutputView, TreeView }

Public Slots

void setCaption (const QString &)
void createGUI (KParts::Part *part)
void gotoNextWindow ()
void gotoPreviousWindow ()
void gotoFirstWindow ()
void gotoLastWindow ()
virtual void fillWindowMenu ()
 Reimplemented from KMdiMainFrm.

virtual void switchToToplevelMode ()
 Reimplemented from KMdiMainFrm to save chosen mode.

virtual void switchToChildframeMode ()
 Reimplemented from KMdiMainFrm to save chosen mode.

virtual void switchToTabPageMode ()
 Reimplemented from KMdiMainFrm to save chosen mode.

virtual void switchToIDEAlMode ()
 Reimplemented from KMdiMainFrm to save chosen mode.

virtual void raiseEditor ()
virtual void fillOutputToolViewsMenu ()
 Fills the show-hide menu for the output views.

virtual void fillTreeToolViewsMenu ()
 Fills the show-hide menu for the tree views.

virtual void toggleSingleToolWin (const ViewMenuActionPrivateData &ActionData)
 Changes the show-hide state of a single tree or output tool window.

virtual void toggleToolDockBaseState (const ViewMenuActionPrivateData &ActionData)
 Changes the show-hide state of a tool dock base (either output or tree tool view).

virtual void showAllToolWin (EView eView, bool show)
 Shows all tools views of a type (OutputView or TreeView.

virtual void updateActionState ()
 Updates the toggle state of the actions to show or hide the tool windows.


Public Member Functions

 MainWindow (QWidget *parent=0, const char *name=0)
 ~MainWindow ()
void embedPartView (QWidget *view, const QString &title, const QString &toolTip=QString::null)
 Embeds a view as part view in the main working area at position (0,0).

void embedSelectView (QWidget *view, const QString &title, const QString &toolTip)
 Embeds a view as select view in the left docking area.

void embedOutputView (QWidget *view, const QString &title, const QString &toolTip)
 Embeds a view as output view in the bottom docking area.

void embedSelectViewRight (QWidget *view, const QString &title, const QString &toolTip)
 We do not have a right pane so this is just a wrapper to embedSelectView(.

void removeView (QWidget *view)
void setViewAvailable (QWidget *pView, bool bEnabled)
void raiseView (QWidget *view)
void lowerView (QWidget *view)
void lowerAllViews ()
void loadSettings ()
KMainWindowmain ()
 Returns a pointer to the KMainWindow base class of this.

void init ()
void prepareToCloseViews ()
void guiRestoringFinished ()
virtual void setUserInterfaceMode (const QString &uiMode)
virtual void callCommand (const QString &command)
 this allows to order the mainwindow to do anything special, we use it to trigger the execution of a hack

virtual void childWindowCloseRequest (KMdiChildView *pWnd)
 Reimplemented from KMdiChildView to handle save prompt.

void storeOutputViewTab ()
 Store the currently active view tab/window of the output view/window.

void restoreOutputViewTab ()
 Restore the previously saved view tab/window to the output view/window.


Protected Member Functions

KParts::ReadOnlyPartgetPartFromWidget (const QWidget *pWidget) const
void resizeEvent (QResizeEvent *ev)
 Reimplemented from QWidget just to get the info, that the window will now be shown.


Private Slots

void slotReactToProjectOpened ()
 Adds a tool view window to the output or tree views.

void slotRestoreAdditionalViewProperties (const QString &viewName, const QDomElement *viewEl)
void slotSaveAdditionalViewProperties (const QString &viewName, QDomElement *viewEl)
void slotToggleViewbar ()
void slotViewActivated (KMdiChildView *view)
void slotPartURLChanged (KParts::ReadOnlyPart *)

Private Member Functions

void fillToolViewsMenu (EView eView)
 Fills the show-hide menu for a tool view (output or tree view).

void setWindowMenu (QPopupMenu *menu)
 Allows to override kmdi default "Window" menu.

virtual bool queryClose ()
virtual bool queryExit ()
KMdiChildView * wrapper (QWidget *view, const QString &name)
 Creates a wrapper of type KMdiChildView for the given view.

void createStatusBar ()
void createFramework ()
void createActions ()
 This function adds a number of actions to the KActionCollection of the base class KXMLGUIClient.

void saveSettings ()
void saveMDISettings ()
void loadMDISettings ()
void clearWindowMenu ()
void checkAndFixToolViewObjectName (QWidget *view, const QString &shortName)

Private Attributes

QMap< QWidget *, KMdiChildView * > m_widgetMap
 Key: QWidget* --> Data:KMdiChildView*.
< Contains the same pairs as m_childViewMap.

QMap< KMdiChildView *, QWidget * > m_childViewMap
 Key: KMdiChildView* --> Data:QWidget*.
< Contains the same pairs as m_widgetMap.

QDict< KMdiChildView > m_captionDict
 Key: caption string --> Data:KMdiChildView*.

QPtrList< QWidgetm_outputViews
 Lists all output tool views.

QPtrList< QWidgetm_selectViews
 Lists all select tool views.

QPtrList< KMdiChildView > m_partViews
 Lists all part views.

QPtrList< QWidgetm_unavailableViews
 Lists all tool views set to unavailable.

bool m_myWindowsReady
 true: kdevelop s windows are ready

ViewMenuActionm_pShowOutputViews
 Shows or hides all output views.

ViewMenuActionm_pShowTreeViews
 Shows or hides all tree views.

KActionMenum_pTreeToolViewsMenu
 Menu for changing the show-hide state of the tree tool views.

KActionMenum_pOutputToolViewsMenu
 Menu for changing the show-hide state of the output tool views.

QString m_CurrentOutputTab
 Holds the previously active output tool view, if all output views have been hidden.

QString m_CurrentTreeTab
 Holds the previously active tree tool view, if all output views have been hidden.

KToggleActionm_toggleViewbar
MainWindowSharem_pMainWindowShare
QValueList< int > m_windowMenus
bool m_bUiModeSwitchPending
bool m_bRemoveViewPending
int mdiStyle

Detailed Description

Handles the multiple document interface modes..

Definition at line 42 of file mainwindow.h.


Member Enumeration Documentation

enum MainWindow::EView
 

Enumeration values:
OutputView 
TreeView 

Definition at line 80 of file mainwindow.h.


Constructor & Destructor Documentation

MainWindow::MainWindow QWidget parent = 0,
const char *  name = 0
 

Definition at line 237 of file mainwindow.cpp.

References m_pMainWindowShare, MainWindow(), mdiStyle, KConfigBase::readNumEntry(), and KConfigBase::setGroup().

Referenced by MainWindow().

MainWindow::~MainWindow  ) 
 

Definition at line 325 of file mainwindow.cpp.


Member Function Documentation

void MainWindow::callCommand const QString command  )  [virtual]
 

this allows to order the mainwindow to do anything special, we use it to trigger the execution of a hack

Reimplemented from KDevMainWindow.

Definition at line 1349 of file mainwindow.cpp.

References callCommand().

Referenced by callCommand().

void MainWindow::checkAndFixToolViewObjectName QWidget view,
const QString shortName
[private]
 

Definition at line 471 of file mainwindow.cpp.

References checkAndFixToolViewObjectName().

Referenced by checkAndFixToolViewObjectName(), embedOutputView(), embedSelectView(), and embedSelectViewRight().

void MainWindow::childWindowCloseRequest KMdiChildView *  pWnd  )  [virtual]
 

Reimplemented from KMdiChildView to handle save prompt.

Definition at line 766 of file mainwindow.cpp.

References childWindowCloseRequest(), PartController::closePartForWidget(), PartController::getInstance(), and m_childViewMap.

Referenced by childWindowCloseRequest().

void MainWindow::clearWindowMenu  )  [private]
 

Definition at line 1417 of file mainwindow.cpp.

References m_windowMenus.

Referenced by fillWindowMenu().

void MainWindow::createActions  )  [private]
 

This function adds a number of actions to the KActionCollection of the base class KXMLGUIClient.

They are added to menus by means of the GUI-File kdevelopui.rc.

Definition at line 364 of file mainwindow.cpp.

References MainWindowShare::createActions(), ViewMenuActionPrivateData::eView, fillOutputToolViewsMenu(), fillTreeToolViewsMenu(), gotoFirstWindow(), gotoLastWindow(), gotoNextWindow(), gotoPreviousWindow(), m_pMainWindowShare, m_pOutputToolViewsMenu, m_pShowOutputViews, m_pShowTreeViews, m_pTreeToolViewsMenu, m_toggleViewbar, OutputView, ViewMenuActionPrivateData::pChildView, ViewMenuActionPrivateData::pDockWidget, KActionMenu::popupMenu(), raiseEditor(), KAction::setEnabled(), KAction::setStatusText(), KAction::setText(), KAction::setToolTip(), KAction::setWhatsThis(), KStdAction::showToolbar(), slotToggleViewbar(), toggleToolDockBaseState(), TreeView, and updateActionState().

Referenced by init().

void MainWindow::createFramework  )  [private]
 

Definition at line 353 of file mainwindow.cpp.

Referenced by init().

void MainWindow::createGUI KParts::Part part  )  [slot]
 

Definition at line 671 of file mainwindow.cpp.

References createGUI(), m_pMainWindowShare, setCaption(), and MainWindowShare::slotGUICreated().

Referenced by createGUI(), and init().

void MainWindow::createStatusBar  )  [private]
 

Definition at line 347 of file mainwindow.cpp.

Referenced by init().

void MainWindow::embedOutputView QWidget view,
const QString title,
const QString toolTip
[virtual]
 

Embeds a view as output view in the bottom docking area.

Implements KDevMainWindow.

Definition at line 551 of file mainwindow.cpp.

References checkAndFixToolViewObjectName(), embedOutputView(), length(), and m_outputViews.

Referenced by embedOutputView().

void MainWindow::embedPartView QWidget view,
const QString title,
const QString toolTip = QString::null
[virtual]
 

Embeds a view as part view in the main working area at position (0,0).

Implements KDevMainWindow.

Definition at line 443 of file mainwindow.cpp.

References embedPartView(), m_captionDict, m_partViews, and wrapper().

Referenced by embedPartView().

void MainWindow::embedSelectView QWidget view,
const QString title,
const QString toolTip
[virtual]
 

Embeds a view as select view in the left docking area.

Implements KDevMainWindow.

Definition at line 497 of file mainwindow.cpp.

References checkAndFixToolViewObjectName(), embedSelectView(), endl(), kdDebug(), length(), and m_selectViews.

Referenced by embedSelectView(), and embedSelectViewRight().

void MainWindow::embedSelectViewRight QWidget view,
const QString title,
const QString toolTip
[virtual]
 

We do not have a right pane so this is just a wrapper to embedSelectView(.

Implements KDevMainWindow.

Definition at line 522 of file mainwindow.cpp.

References checkAndFixToolViewObjectName(), embedSelectView(), embedSelectViewRight(), endl(), kdDebug(), length(), and m_selectViews.

Referenced by embedSelectViewRight().

void MainWindow::fillOutputToolViewsMenu  )  [virtual, slot]
 

Fills the show-hide menu for the output views.

Definition at line 927 of file mainwindow.cpp.

References fillToolViewsMenu(), and OutputView.

Referenced by createActions().

void MainWindow::fillToolViewsMenu EView  eView  )  [private]
 

Fills the show-hide menu for a tool view (output or tree view).

The menu has the following entries:

  • An item to show or hide the dock base window ("All Tree Views" or " All Ouput Views")
  • A seperator
  • An item for each tool window. The item is disabled, if the dock base is not visible. It is checked, if the tool window would be visible or has a tab page if the dock base is made visible

Definition at line 948 of file mainwindow.cpp.

References ToolDockBaseState::dockBaseIsHidden, ViewMenuActionPrivateData::eView, fillToolViewsMenu(), ToolDockBaseState::hasDockBaseWindow, KActionMenu::insert(), m_myWindowsReady, m_outputViews, m_pOutputToolViewsMenu, m_pShowOutputViews, m_pShowTreeViews, m_pTreeToolViewsMenu, m_selectViews, m_unavailableViews, ToolDockBaseState::noViews, OutputView, ViewMenuActionPrivateData::pChildView, ViewMenuActionPrivateData::pDockWidget, KActionMenu::popupMenu(), KDockWidget::tabPageLabel(), toggleSingleToolWin(), and ToolWindowState::viewMenuChecked.

Referenced by fillOutputToolViewsMenu(), fillToolViewsMenu(), and fillTreeToolViewsMenu().

void MainWindow::fillTreeToolViewsMenu  )  [virtual, slot]
 

Fills the show-hide menu for the tree views.

Definition at line 933 of file mainwindow.cpp.

References fillToolViewsMenu(), and TreeView.

Referenced by createActions().

void MainWindow::fillWindowMenu  )  [virtual, slot]
 

Reimplemented from KMdiMainFrm.

Definition at line 793 of file mainwindow.cpp.

References clearWindowMenu(), getPartFromWidget(), m_childViewMap, and m_windowMenus.

Referenced by setWindowMenu().

KParts::ReadOnlyPart * MainWindow::getPartFromWidget const QWidget pWidget  )  const [protected]
 

Definition at line 1168 of file mainwindow.cpp.

References getPartFromWidget(), and KParts::Part::widget().

Referenced by fillWindowMenu(), and getPartFromWidget().

void MainWindow::gotoFirstWindow  )  [slot]
 

Definition at line 781 of file mainwindow.cpp.

Referenced by createActions().

void MainWindow::gotoLastWindow  )  [slot]
 

Definition at line 786 of file mainwindow.cpp.

Referenced by createActions().

void MainWindow::gotoNextWindow  )  [slot]
 

Definition at line 771 of file mainwindow.cpp.

Referenced by createActions().

void MainWindow::gotoPreviousWindow  )  [slot]
 

Definition at line 776 of file mainwindow.cpp.

Referenced by createActions().

void MainWindow::guiRestoringFinished  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 731 of file mainwindow.cpp.

void MainWindow::init  ) 
 

Definition at line 263 of file mainwindow.cpp.

References createActions(), createFramework(), createGUI(), createStatusBar(), MainWindowShare::init(), m_pMainWindowShare, main(), setWindowMenu(), slotPartURLChanged(), slotReactToProjectOpened(), slotRestoreAdditionalViewProperties(), slotSaveAdditionalViewProperties(), and slotViewActivated().

Referenced by TopLevel::getInstance().

void MainWindow::loadMDISettings  )  [private]
 

Definition at line 689 of file mainwindow.cpp.

References KConfigBase::readBoolEntry(), KConfigBase::readNumEntry(), KConfigBase::setGroup(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

Referenced by loadSettings().

void MainWindow::loadSettings  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 681 of file mainwindow.cpp.

References ProjectManager::getInstance(), loadMDISettings(), and ProjectManager::loadSettings().

void MainWindow::lowerAllViews  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 665 of file mainwindow.cpp.

void MainWindow::lowerView QWidget view  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 660 of file mainwindow.cpp.

References lowerView().

Referenced by lowerView().

KMainWindow * MainWindow::main  )  [virtual]
 

Returns a pointer to the KMainWindow base class of this.

Implements KDevMainWindow.

Definition at line 341 of file mainwindow.cpp.

Referenced by init().

void MainWindow::prepareToCloseViews  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 736 of file mainwindow.cpp.

bool MainWindow::queryClose  )  [private, virtual]
 

Definition at line 330 of file mainwindow.cpp.

References Core::getInstance(), and Core::queryClose().

bool MainWindow::queryExit  )  [private, virtual]
 

Definition at line 335 of file mainwindow.cpp.

References saveSettings().

void MainWindow::raiseEditor  )  [virtual, slot]
 

Definition at line 1455 of file mainwindow.cpp.

References KParts::PartManager::activePart(), endl(), API::getInstance(), k_funcinfo, kdDebug(), and API::partController().

Referenced by createActions().

void MainWindow::raiseView QWidget view  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 643 of file mainwindow.cpp.

References m_myWindowsReady, m_widgetMap, raiseView(), and wrapper().

Referenced by raiseView().

void MainWindow::removeView QWidget view  )  [virtual]
 

Implements KDevMainWindow.

Definition at line 592 of file mainwindow.cpp.

References endl(), kdDebug(), m_bRemoveViewPending, m_captionDict, m_childViewMap, m_outputViews, m_partViews, m_selectViews, m_widgetMap, removeView(), and wrapper().

Referenced by removeView().

void MainWindow::resizeEvent QResizeEvent ev  )  [protected]
 

Reimplemented from QWidget just to get the info, that the window will now be shown.

Definition at line 760 of file mainwindow.cpp.

References resizeEvent().

Referenced by resizeEvent().

void MainWindow::restoreOutputViewTab  )  [virtual]
 

Restore the previously saved view tab/window to the output view/window.

Todo:
implement this properly look at MainWindow::slotReactToProjectOpened() to hide a view MainWindow::toggleSingleToolWin() to show it and also to check the visibility
if ( previous_output_view == NULL) { If no previous exists then hide current if (m_bottomBar->current()) lowerView(m_bottomBar->current()); } else { previous exist, so raise it m_bottomBar->raiseWidget(previous_output_view); } previous_output_view = NULL;

Implements KDevMainWindow.

Definition at line 1399 of file mainwindow.cpp.

void MainWindow::saveMDISettings  )  [private]
 

Definition at line 749 of file mainwindow.cpp.

References mdiStyle, KConfigBase::setGroup(), and KConfigBase::writeEntry().

Referenced by saveSettings(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

void MainWindow::saveSettings  )  [private]
 

Definition at line 741 of file mainwindow.cpp.

References ProjectManager::getInstance(), saveMDISettings(), and ProjectManager::saveSettings().

Referenced by queryExit().

void MainWindow::setCaption const QString  )  [slot]
 

Definition at line 1434 of file mainwindow.cpp.

References API::getInstance(), KDevApi::project(), KDevProject::projectName(), and setCaption().

Referenced by createGUI(), and setCaption().

void MainWindow::setUserInterfaceMode const QString uiMode  )  [virtual]
 

Reimplemented from KDevMainWindow.

Definition at line 1332 of file mainwindow.cpp.

References setUserInterfaceMode(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

Referenced by setUserInterfaceMode().

void MainWindow::setViewAvailable QWidget pView,
bool  bEnabled
[virtual]
 

Implements KDevMainWindow.

Definition at line 571 of file mainwindow.cpp.

References m_unavailableViews, KDockWidget::makeDockVisible(), setViewAvailable(), and KDockWidget::undock().

Referenced by setViewAvailable().

void MainWindow::setWindowMenu QPopupMenu menu  )  [private]
 

Allows to override kmdi default "Window" menu.

This allows to use "Window" menu actions from KParts among with kmdi default window actions.

Definition at line 1425 of file mainwindow.cpp.

References fillWindowMenu(), and setWindowMenu().

Referenced by init(), and setWindowMenu().

void MainWindow::showAllToolWin EView  eView,
bool  show
[virtual, slot]
 

Shows all tools views of a type (OutputView or TreeView.

Definition at line 1048 of file mainwindow.cpp.

References ToolDockBaseState::dockBaseIsHidden, ViewMenuActionPrivateData::eView, m_myWindowsReady, m_outputViews, m_selectViews, m_unavailableViews, OutputView, ViewMenuActionPrivateData::pChildView, ViewMenuActionPrivateData::pDockWidget, showAllToolWin(), toggleSingleToolWin(), toggleToolDockBaseState(), and ToolWindowState::viewMenuChecked.

Referenced by showAllToolWin(), and toggleToolDockBaseState().

void MainWindow::slotPartURLChanged KParts::ReadOnlyPart  )  [private, slot]
 

Definition at line 431 of file mainwindow.cpp.

References KURL::fileName(), m_widgetMap, slotPartURLChanged(), KParts::ReadOnlyPart::url(), and KParts::Part::widget().

Referenced by init(), and slotPartURLChanged().

void MainWindow::slotReactToProjectOpened  )  [private, slot]
 

Adds a tool view window to the output or tree views.

Definition at line 1244 of file mainwindow.cpp.

References m_unavailableViews, and KDockWidget::undock().

Referenced by init().

void MainWindow::slotRestoreAdditionalViewProperties const QString viewName,
const QDomElement viewEl
[private, slot]
 

Definition at line 1259 of file mainwindow.cpp.

References m_captionDict, and slotRestoreAdditionalViewProperties().

Referenced by init(), and slotRestoreAdditionalViewProperties().

void MainWindow::slotSaveAdditionalViewProperties const QString viewName,
QDomElement viewEl
[private, slot]
 

Definition at line 1297 of file mainwindow.cpp.

References m_captionDict, and slotSaveAdditionalViewProperties().

Referenced by init(), and slotSaveAdditionalViewProperties().

void MainWindow::slotToggleViewbar  )  [private, slot]
 

Definition at line 1327 of file mainwindow.cpp.

Referenced by createActions(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

void MainWindow::slotViewActivated KMdiChildView *  view  )  [private, slot]
 

Definition at line 319 of file mainwindow.cpp.

References endl(), PartController::getInstance(), kdDebug(), PartController::slotCurrentChanged(), and slotViewActivated().

Referenced by init(), and slotViewActivated().

void MainWindow::storeOutputViewTab  )  [virtual]
 

Store the currently active view tab/window of the output view/window.

Todo:
implement this properly look at MainWindow::slotReactToProjectOpened() to hide a view MainWindow::toggleSingleToolWin() to show it and also to check the visibility
if (m_bottomBar->isRaised()) { If m_bottomBar->isRaised then store the current view previous_output_view = m_bottomBar->current(); }else { If not hide the bottom view by storing NULL previous_output_view = NULL; }

Implements KDevMainWindow.

Definition at line 1379 of file mainwindow.cpp.

void MainWindow::switchToChildframeMode  )  [virtual, slot]
 

Reimplemented from KMdiMainFrm to save chosen mode.

Definition at line 1196 of file mainwindow.cpp.

References m_bUiModeSwitchPending, m_toggleViewbar, saveMDISettings(), KAction::setEnabled(), slotToggleViewbar(), and updateActionState().

Referenced by setUserInterfaceMode().

void MainWindow::switchToIDEAlMode  )  [virtual, slot]
 

Reimplemented from KMdiMainFrm to save chosen mode.

Definition at line 1228 of file mainwindow.cpp.

References m_bUiModeSwitchPending, m_toggleViewbar, saveMDISettings(), KAction::setEnabled(), slotToggleViewbar(), and updateActionState().

Referenced by loadMDISettings(), and setUserInterfaceMode().

void MainWindow::switchToTabPageMode  )  [virtual, slot]
 

Reimplemented from KMdiMainFrm to save chosen mode.

Definition at line 1212 of file mainwindow.cpp.

References m_bUiModeSwitchPending, m_toggleViewbar, saveMDISettings(), KAction::setEnabled(), slotToggleViewbar(), and updateActionState().

Referenced by loadMDISettings(), and setUserInterfaceMode().

void MainWindow::switchToToplevelMode  )  [virtual, slot]
 

Reimplemented from KMdiMainFrm to save chosen mode.

Definition at line 1180 of file mainwindow.cpp.

References m_bUiModeSwitchPending, m_toggleViewbar, saveMDISettings(), KAction::setEnabled(), slotToggleViewbar(), and updateActionState().

Referenced by loadMDISettings(), and setUserInterfaceMode().

void MainWindow::toggleSingleToolWin const ViewMenuActionPrivateData ActionData  )  [virtual, slot]
 

Changes the show-hide state of a single tree or output tool window.

Definition at line 1089 of file mainwindow.cpp.

References KDockWidget::changeHideShowState(), ViewMenuActionPrivateData::eView, first(), ToolWindowState::hasDockWidget, ToolWindowState::hasTabGroup, m_outputViews, m_partViews, m_selectViews, KDockWidget::manualDock(), KDockWidget::mayBeHide(), ToolWindowState::mayBeHide, ToolWindowState::mayBeShown, ToolDockBaseState::noViews, OutputView, KDockWidget::parentDockTabGroup(), ViewMenuActionPrivateData::pChildView, ViewMenuActionPrivateData::pDockWidget, ToolWindowState::pTabGroup, and toggleSingleToolWin().

Referenced by fillToolViewsMenu(), showAllToolWin(), and toggleSingleToolWin().

void MainWindow::toggleToolDockBaseState const ViewMenuActionPrivateData ActionData  )  [virtual, slot]
 

Changes the show-hide state of a tool dock base (either output or tree tool view).

Definition at line 1020 of file mainwindow.cpp.

References KDockWidget::dockBack(), ToolDockBaseState::dockBaseIsHidden, ToolDockBaseState::dockBaseIsVisible, ToolDockBaseState::dockBaseMayBeDockBack, ViewMenuActionPrivateData::eView, m_myWindowsReady, m_outputViews, m_selectViews, OutputView, ToolDockBaseState::pDockBaseWindow, KDockWidget::show(), showAllToolWin(), toggleToolDockBaseState(), and KDockWidget::undock().

Referenced by createActions(), showAllToolWin(), and toggleToolDockBaseState().

void MainWindow::updateActionState  )  [virtual, slot]
 

Updates the toggle state of the actions to show or hide the tool windows.

Definition at line 1008 of file mainwindow.cpp.

References ToolDockBaseState::dockBaseIsVisible, m_bRemoveViewPending, m_bUiModeSwitchPending, m_outputViews, m_pShowOutputViews, m_pShowTreeViews, m_selectViews, and KToggleAction::setChecked().

Referenced by createActions(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

KMdiChildView * MainWindow::wrapper QWidget view,
const QString name
[private]
 

Creates a wrapper of type KMdiChildView for the given view.

After a call to wrapper(), the given view is included in the frame of kdevelop in the following way:

  • The view gets a new parent of type KMdiChildView.
  • A horizontal layout manager (QHBoxLayout) is generated which has a the new KMdiChildView as parent and the given view as Widget to layout.
  • The given view and the new KMdiChildView are appended to m_childViewMap and m_widgetMap
  • The new KMdiChildView gets the given name as caption (full path name) and just the extracted file name as TabCaption.
The newly created KMdiChildView is not yet connected to any other widget of KDevelop, althoug it is appended to m_childViewMap and m_widgetMap.

Definition at line 417 of file mainwindow.cpp.

References length(), m_childViewMap, m_widgetMap, and wrapper().

Referenced by embedPartView(), raiseView(), removeView(), and wrapper().


Member Data Documentation

bool MainWindow::m_bRemoveViewPending [private]
 

Definition at line 210 of file mainwindow.h.

Referenced by removeView(), and updateActionState().

bool MainWindow::m_bUiModeSwitchPending [private]
 

Definition at line 209 of file mainwindow.h.

Referenced by switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), switchToToplevelMode(), and updateActionState().

QDict<KMdiChildView> MainWindow::m_captionDict [private]
 

Key: caption string --> Data:KMdiChildView*.

Definition at line 188 of file mainwindow.h.

Referenced by embedPartView(), removeView(), slotRestoreAdditionalViewProperties(), and slotSaveAdditionalViewProperties().

QMap<KMdiChildView*,QWidget*> MainWindow::m_childViewMap [private]
 

Key: KMdiChildView* --> Data:QWidget*.
< Contains the same pairs as m_widgetMap.

Definition at line 186 of file mainwindow.h.

Referenced by childWindowCloseRequest(), fillWindowMenu(), removeView(), and wrapper().

QString MainWindow::m_CurrentOutputTab [private]
 

Holds the previously active output tool view, if all output views have been hidden.

Definition at line 201 of file mainwindow.h.

QString MainWindow::m_CurrentTreeTab [private]
 

Holds the previously active tree tool view, if all output views have been hidden.

Definition at line 202 of file mainwindow.h.

bool MainWindow::m_myWindowsReady [private]
 

true: kdevelop s windows are ready

Definition at line 196 of file mainwindow.h.

Referenced by fillToolViewsMenu(), raiseView(), showAllToolWin(), and toggleToolDockBaseState().

QPtrList<QWidget> MainWindow::m_outputViews [private]
 

Lists all output tool views.

Definition at line 190 of file mainwindow.h.

Referenced by embedOutputView(), fillToolViewsMenu(), removeView(), showAllToolWin(), toggleSingleToolWin(), toggleToolDockBaseState(), and updateActionState().

QPtrList<KMdiChildView> MainWindow::m_partViews [private]
 

Lists all part views.

Definition at line 192 of file mainwindow.h.

Referenced by embedPartView(), removeView(), and toggleSingleToolWin().

MainWindowShare* MainWindow::m_pMainWindowShare [private]
 

Definition at line 205 of file mainwindow.h.

Referenced by createActions(), createGUI(), init(), and MainWindow().

KActionMenu* MainWindow::m_pOutputToolViewsMenu [private]
 

Menu for changing the show-hide state of the output tool views.

Definition at line 200 of file mainwindow.h.

Referenced by createActions(), and fillToolViewsMenu().

ViewMenuAction* MainWindow::m_pShowOutputViews [private]
 

Shows or hides all output views.

Definition at line 197 of file mainwindow.h.

Referenced by createActions(), fillToolViewsMenu(), and updateActionState().

ViewMenuAction* MainWindow::m_pShowTreeViews [private]
 

Shows or hides all tree views.

Definition at line 198 of file mainwindow.h.

Referenced by createActions(), fillToolViewsMenu(), and updateActionState().

KActionMenu* MainWindow::m_pTreeToolViewsMenu [private]
 

Menu for changing the show-hide state of the tree tool views.

Definition at line 199 of file mainwindow.h.

Referenced by createActions(), and fillToolViewsMenu().

QPtrList<QWidget> MainWindow::m_selectViews [private]
 

Lists all select tool views.

Definition at line 191 of file mainwindow.h.

Referenced by embedSelectView(), embedSelectViewRight(), fillToolViewsMenu(), removeView(), showAllToolWin(), toggleSingleToolWin(), toggleToolDockBaseState(), and updateActionState().

KToggleAction* MainWindow::m_toggleViewbar [private]
 

Definition at line 203 of file mainwindow.h.

Referenced by createActions(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

QPtrList<QWidget> MainWindow::m_unavailableViews [private]
 

Lists all tool views set to unavailable.

Definition at line 193 of file mainwindow.h.

Referenced by fillToolViewsMenu(), setViewAvailable(), showAllToolWin(), and slotReactToProjectOpened().

QMap<QWidget*,KMdiChildView*> MainWindow::m_widgetMap [private]
 

Key: QWidget* --> Data:KMdiChildView*.
< Contains the same pairs as m_childViewMap.

Definition at line 184 of file mainwindow.h.

Referenced by raiseView(), removeView(), slotPartURLChanged(), and wrapper().

QValueList<int> MainWindow::m_windowMenus [private]
 

Definition at line 207 of file mainwindow.h.

Referenced by clearWindowMenu(), and fillWindowMenu().

int MainWindow::mdiStyle [private]
 

Definition at line 212 of file mainwindow.h.

Referenced by MainWindow(), and saveMDISettings().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:26 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003