Class for the application's windows, both the main window and additional windows.
More...
#include <Window.h>
|
void | windowActivated (Window *window) |
| Signal that is emitted when the window has become active.
|
|
void | windowRenamed (Window *window) |
| Signal that is emitted when the window's title has changed.
|
|
void | windowClosed (Window *window, QCloseEvent *event) |
| Signal that is emitted when the window has been closed.
|
|
void | createWindowRequested (const QString &panelTypeName, const QPoint &position, const QSize &panelSize) |
| Signal that is emitted when a new window should be created.
|
|
void | viewPanelCreated (ViewPanel *viewPanel) |
| Signal that is emitted when a ViewPanel-derived widget has been created for the window.
|
|
void | nodeContextMenuRequested (const QPoint &position) |
| Signal to notify connected objects that the context menu for creating new nodes should be displayed at the given position.
|
|
|
| Window (QObject *parent, const QString &applicationName, const QString &title, const QString &layoutName, bool isMainWindow=false) |
| Constructor of the Window class.
|
|
virtual | ~Window () |
| Destructor of the Window class.
|
|
void | getLayoutSettings (QSettings &settings, QObject *rootChild) const |
| Returns the window layout state.
|
|
QWidget * | setLayoutSettings (QSettings &settings, QString index="0") |
| Sets the window layout states.
|
|
void | setLayoutIds (QObject *rootChild) |
| Insert unique IDs to the splitter and panel wedget names.
|
|
bool | isMainWindow () |
| Returns whether the window is the application's main window.
|
|
bool | hasDocumentation () |
| Returns whether the window contains a documentation panel.
|
|
void | showDocumentationMainPage () |
| Opens the documentation main page in the first documentation panel found in the window's layout.
|
|
QString | title () |
| Returns the window's title.
|
|
void | setTitle (const QString &title) |
| Sets the window's title.
|
|
void | setFullscreen (bool fullscreen) |
| Set fullscreen.
|
|
void | clearLayout () |
| Deletes all layout widgets on contral widget.
|
|
|
static const QString | DefaultLayout = "Default" |
| The name of the default window layout.
|
|
static const QString | SingleViewLayout = "Single View" |
| The name of the window layout with only a single view.
|
|
static const QString | FullscreenViewLayout = "Fullscreen View" |
| The name of the window layout with a fullscreen view.
|
|
|
void | contextMenuEvent (QContextMenuEvent *event) |
| Event handler for context menu events.
|
|
void | changeEvent (QEvent *event) |
| Event handler for widget state change events.
|
|
void | closeEvent (QCloseEvent *event) |
| Event handler for widget close events.
|
|
|
QString | m_applicationName |
| The name of the application that this window is a part of.
|
|
bool | m_isMainWindow |
| Flag that states whether the window is the application's main window.
|
|
QString | m_title |
| The window's title.
|
|
Class for the application's windows, both the main window and additional windows.
Inheritance Diagram
Frapper::Window::Window |
( |
QObject * |
parent, |
|
|
const QString & |
applicationName, |
|
|
const QString & |
title, |
|
|
const QString & |
layoutName, |
|
|
bool |
isMainWindow = false |
|
) |
| |
Constructor of the Window class.
Constructors and Destructors.
Creates a new application window using the given layout.
- Parameters
-
parent | The parent object (should be the Application object). |
applicationName | The name of the application that the window will be a part of. |
title | The title to give to the new window. |
layoutName | The name of the layout to apply to the window. |
isMainWindow | Flag that states whether the window to create is the application's main window. |
Constructor of the Window class.
Creates a new application window using the layout with the given name.
- Parameters
-
parent | The parent object (should be the Application object). |
applicationName | The name of the application that the window will be a part of. |
title | The title to give to the new window. |
layoutName | The name of the layout to apply to the window. |
isMainWindow | Flag that states whether the window to create is the application's main window. |
Frapper::Window::~Window |
( |
| ) |
|
|
virtual |
Destructor of the Window class.
Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.
void Frapper::Window::getLayoutSettings |
( |
QSettings & |
settings, |
|
|
QObject * |
rootChild |
|
) |
| const |
Returns the window layout state.
Public Functions.
- Parameters
-
settings | The window layout settings state reference. |
rootChild | The root widget. |
Returns the window layout state
- Parameters
-
settings | The window layout settings state reference. |
rootChild | The root widget. |
QWidget * Frapper::Window::setLayoutSettings |
( |
QSettings & |
settings, |
|
|
QString |
index = "0" |
|
) |
| |
Sets the window layout states.
- Parameters
-
The | window layout settings state reference. |
rootChild | The root widget. |
void Frapper::Window::setLayoutIds |
( |
QObject * |
rootChild | ) |
|
Insert unique IDs to the splitter and panel wedget names.
bool Frapper::Window::isMainWindow |
( |
| ) |
|
Returns whether the window is the application's main window.
- Returns
- True if the window is the application's main window, otherwise False.
bool Frapper::Window::hasDocumentation |
( |
| ) |
|
Returns whether the window contains a documentation panel.
- Returns
- True if the window contains a documentation panel, otherwise False.
void Frapper::Window::showDocumentationMainPage |
( |
| ) |
|
Opens the documentation main page in the first documentation panel found in the window's layout.
QString Frapper::Window::title |
( |
| ) |
|
Returns the window's title.
- Returns
- The window's title.
void Frapper::Window::setTitle |
( |
const QString & |
title | ) |
|
Sets the window's title.
- Parameters
-
title | The title to set for the window. |
void Frapper::Window::setFullscreen |
( |
bool |
fullscreen | ) |
|
void Frapper::Window::clearLayout |
( |
| ) |
|
Deletes all layout widgets on contral widget.
void Frapper::Window::updateWindowTitle |
( |
const QString & |
panelTypeName | ) |
|
|
slot |
Updates the window title according to the given panel type name if there is only one panel in the window.
Public Slots.
- Parameters
-
panelTypeName | The name of the new panel type. |
Updates the window title according to the given panel type name if there is only one panel in the window.
- Parameters
-
panelTypeName | The name of the new panel type. |
void Frapper::Window::duplicatePanelFrame |
( |
PanelFrame * |
panelFrame | ) |
|
|
slot |
Duplicates the given panel frame by creating a new window.
Duplicates the given panel by creating a new window.
- Parameters
-
panelFrame | The panel frame to duplicate. |
void Frapper::Window::extractPanelFrame |
( |
PanelFrame * |
panelFrame | ) |
|
|
slot |
Extracts the given panel frame to a new window.
- Parameters
-
panelFrame | The panel frame to extract to a new window. |
void Frapper::Window::closePanelFrame |
( |
PanelFrame * |
panelFrame | ) |
|
|
slot |
Closes and deletes the given panel.
Closes and deletes the given panel frame.
- Parameters
-
panelFrame | The panel frame to close. |
void Frapper::Window::windowActivated |
( |
Window * |
window | ) |
|
|
signal |
Signal that is emitted when the window has become active.
- Parameters
-
window | The window that was activated. |
void Frapper::Window::windowRenamed |
( |
Window * |
window | ) |
|
|
signal |
Signal that is emitted when the window's title has changed.
- Parameters
-
window | The window whose title has been changed. |
void Frapper::Window::windowClosed |
( |
Window * |
window, |
|
|
QCloseEvent * |
event |
|
) |
| |
|
signal |
Signal that is emitted when the window has been closed.
- Parameters
-
window | The window that has been closed. |
event | The object containing details about the window close event. |
void Frapper::Window::createWindowRequested |
( |
const QString & |
panelTypeName, |
|
|
const QPoint & |
position, |
|
|
const QSize & |
panelSize |
|
) |
| |
|
signal |
Signal that is emitted when a new window should be created.
- Parameters
-
panelTypeName | The name of the panel type that the new window should contain. |
position | The position for the new window. |
panelSize | The size of the panel to be contained in the new window. |
void Frapper::Window::viewPanelCreated |
( |
ViewPanel * |
viewPanel | ) |
|
|
signal |
Signal that is emitted when a ViewPanel-derived widget has been created for the window.
- Parameters
-
viewPanel | The ViewPanel-derived widget that has been created for the window. |
void Frapper::Window::nodeContextMenuRequested |
( |
const QPoint & |
position | ) |
|
|
signal |
Signal to notify connected objects that the context menu for creating new nodes should be displayed at the given position.
- Parameters
-
position | The position at which to display the node context menu. |
void Frapper::Window::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
protected |
Event handler for context menu events.
Protected Events.
- Parameters
-
event | The object that contains details about the event. |
Event handler for context menu events.
- Parameters
-
event | The object that contains details about the event. |
void Frapper::Window::changeEvent |
( |
QEvent * |
event | ) |
|
|
protected |
Event handler for widget state change events.
- Parameters
-
event | The object that contains details about the event. |
void Frapper::Window::closeEvent |
( |
QCloseEvent * |
event | ) |
|
|
protected |
Event handler for widget close events.
- Parameters
-
event | The object that contains details about the event. |
Applies the layout with the given name to the window. The given panel type is used only in specific layouts.
Private Functions.
- Parameters
-
layoutName | The name of the layout to apply to the window. |
panelType | A panel type that is used only in specific layout. |
Applies the layout with the given name to the window. The given panel type is used only in specific layouts.
- Parameters
-
layoutName | The name of the layout to apply to the window. |
panelType | A panel type that is used only in specific layout. |
void Frapper::Window::applyDefaultLayout |
( |
| ) |
|
|
privateslot |
Apply the default layout on the window.
Private Slots.
void Frapper::Window::applyViewportOnlyLayout |
( |
| ) |
|
|
privateslot |
Apply the viewport layout on the window, which means that only a viewport panel is displayed.
const QString Frapper::Window::DefaultLayout = "Default" |
|
static |
The name of the default window layout.
Static Constants.
const QString Frapper::Window::SingleViewLayout = "Single View" |
|
static |
The name of the window layout with only a single view.
const QString Frapper::Window::FullscreenViewLayout = "Fullscreen View" |
|
static |
The name of the window layout with a fullscreen view.
QString Frapper::Window::m_applicationName |
|
private |
The name of the application that this window is a part of.
bool Frapper::Window::m_isMainWindow |
|
private |
Flag that states whether the window is the application's main window.
QString Frapper::Window::m_title |
|
private |
The documentation for this class was generated from the following files: