Frapper  1.0a
Static Public Member Functions | Static Private Attributes | List of all members
Frapper::WindowManager Class Reference

Static class for managing the application's windows. More...

#include <WindowManager.h>

Static Public Member Functions

static QStandardItemModel * getItemModel ()
 Returns the item model that contains the list of the application's windows.
 
static void registerWindowMenu (QMenu *windowMenu)
 Registers the given menu with the window manager so that it updates it with a list of actions that can be used to switch between the windows registered with the window manager.
 
static void registerWindow (Window *window)
 Registers the given window with the window manager.
 
static void unregisterWindow (Window *window)
 Unregisters the given window with the window manager.
 
static WindowgetDocumentationWindow ()
 Returns the first window from the list of registered windows that contains a documentation panel, or 0 if no window in the application contains a documentation panel.
 
static void highlightWindowAction (Window *window)
 Highlights the action that is associated with the given window. Is called when a window of the application has been activated.
 
static void updateWindowActionTitle (Window *window)
 Updates the titles of the item and action that correspond to the given window. Is called when a window title has been changed.
 
static bool hasAdditionalWindows ()
 Returns whether additional windows have been registered with the window manager.
 
static void closeAdditionalWindows ()
 Closes all registered windows but the main window.
 

Static Private Attributes

static QStandardItemModel s_windowItemModel
 The item model that contains the list of the application's windows.
 
static QStandardItem * s_rootItem = s_windowItemModel.invisibleRootItem()
 The root item in the item model that contains the list of windows.
 
static QMenu * s_windowMenu
 The menu to update with actions that can be used for switching between the windows that are registered with the window manager.
 

Detailed Description

Static class for managing the application's windows.

Member Function Documentation

QStandardItemModel * Frapper::WindowManager::getItemModel ( )
static

Returns the item model that contains the list of the application's windows.

Public Static Functions.

Returns
The item model of the application's windows.

Returns the item model that contains the list of the application's windows.

Returns
The item model of the application's windows.
void Frapper::WindowManager::registerWindowMenu ( QMenu *  windowMenu)
static

Registers the given menu with the window manager so that it updates it with a list of actions that can be used to switch between the windows registered with the window manager.

Parameters
windowMenuThe menu to fill with window actions.
void Frapper::WindowManager::registerWindow ( Window window)
static

Registers the given window with the window manager.

Parameters
windowThe window to register with the window manager.
void Frapper::WindowManager::unregisterWindow ( Window window)
static

Unregisters the given window with the window manager.

Parameters
windowThe window to unregister with the window manager.
Window * Frapper::WindowManager::getDocumentationWindow ( )
static

Returns the first window from the list of registered windows that contains a documentation panel, or 0 if no window in the application contains a documentation panel.

Returns
The first window containing a documentation panel, or 0.
void Frapper::WindowManager::highlightWindowAction ( Window window)
static

Highlights the action that is associated with the given window. Is called when a window of the application has been activated.

Parameters
windowThe window that was activated.
void Frapper::WindowManager::updateWindowActionTitle ( Window window)
static

Updates the titles of the item and action that correspond to the given window. Is called when a window title has been changed.

Parameters
windowThe window whose title has been changed.
bool Frapper::WindowManager::hasAdditionalWindows ( )
static

Returns whether additional windows have been registered with the window manager.

Returns
True if additional windows have been registered with the window manager, otherwise False.
void Frapper::WindowManager::closeAdditionalWindows ( )
static

Closes all registered windows but the main window.

Member Data Documentation

QStandardItemModel Frapper::WindowManager::s_windowItemModel
staticprivate

The item model that contains the list of the application's windows.

Private Static Data.

QStandardItem * Frapper::WindowManager::s_rootItem = s_windowItemModel.invisibleRootItem()
staticprivate

The root item in the item model that contains the list of windows.

QMenu * Frapper::WindowManager::s_windowMenu
staticprivate

The menu to update with actions that can be used for switching between the windows that are registered with the window manager.


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