NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class represents an abstract window handled by the window manager. More...
#include <windowmanager.hpp>
Public Member Functions | |
Window () | |
Default constructor. Initializes an invalid window. More... | |
Window (const Window &window) | |
Copy constructor. More... | |
Window (WindowType type, WindowManager *manager, const WindowSettings &settings) | |
Generic window constructor. More... | |
Window (WindowType type, WindowManager *manager, GraphHelper *graph) | |
Graph window constructor. More... | |
Window (WindowType type, WindowManager *manager, tinyxml2::XMLDocument *layoutString) | |
Custom window constructor. More... | |
~Window () | |
Destructor. Unregisters the current window in the window manager and deletes the layout pointer, if it is non-zero. More... | |
Window & | operator= (const Window &window) |
This member function is the public overload of the assignment operator. More... | |
WindowType | getType () const |
GraphHelper * | getGraph () |
const WindowSettings & | getWindowSettings () const |
size_t | getId () const |
const tinyxml2::XMLDocument * | getLayout () const |
void | connect (CustomWindow *_window) |
bool | creationFinished () |
void | updateWindowInformation (int status, const std::string &_return) |
This public member function can be used to update the stored window information in the window manager for the current window. More... | |
std::vector< int > | getWindowItems (const std::string &_selection) const |
Returns a vector of item ids corresponding to the available window items of this window. More... | |
bool | closeWindow () |
Closes the current window. More... | |
WinItemValue | getItemValue (int windowItemID) const |
Returns the value of the selected window item as a string. More... | |
std::string | getItemLabel (int windowItemID) const |
Returns the label of the selected window item as a string. More... | |
std::string | getItemState (int windowItemID) const |
Returns the state of the selected window item as a string. More... | |
std::string | getItemColor (int windowItemID) const |
Returns the color of the selected window item as a string. More... | |
std::string | getPropValue (const std::string &varName) const |
Returns the value of the selected property as a string. More... | |
std::string | getProperties () const |
Returns a list of all available window properties (comp. prop ) in this window. More... | |
bool | setItemValue (const WinItemValue &_value, int windowItemID) |
Enables changing the value of the selected window item to the passed value. More... | |
bool | setItemLabel (const std::string &_label, int windowItemID) |
Enables changing the label of the selected window item to the passed label. More... | |
bool | setItemState (const std::string &_state, int windowItemID) |
Enables changing the state of the selected window item to the passed state. More... | |
bool | setItemColor (const std::string &_color, int windowItemID) |
Enables changing the color of the selected window item to the passed color. More... | |
bool | setItemGraph (GraphHelper *_helper, int windowItemID) |
Updates the graph in the custom window. More... | |
bool | setPropValue (const std::string &_value, const std::string &varName) |
This function sets the value of the selected window property. More... | |
Private Member Functions | |
void | registerWindow () |
This private member function registers the current window in the window manager. This will automatically take the ownership from a copied window. More... | |
void | unregisterWindow () |
This private member function will unregister the current window in the window manager. More... | |
void | assignWindow (const Window &window) |
This private member function is the generalisation of the assignment operator and the copy constructor. More... | |
void | detach () |
This private member function is used by the window manager to detach itself from this window to avoid segmentation faults at application shutdown. More... | |
Private Attributes | |
WindowType | nType |
GraphHelper * | m_graph |
WindowManager * | m_manager |
CustomWindow * | m_customWindow |
WindowSettings | m_settings |
tinyxml2::XMLDocument * | m_layout |
size_t | nWindowID |
Friends | |
class | WindowManager |
This class represents an abstract window handled by the window manager.
Definition at line 128 of file windowmanager.hpp.
NumeRe::Window::Window | ( | ) |
Default constructor. Initializes an invalid window.
Definition at line 38 of file windowmanager.cpp.
References m_customWindow, m_graph, m_layout, m_manager, nType, nWindowID, and NumeRe::WINDOW_NONE.
NumeRe::Window::Window | ( | const Window & | window | ) |
Copy constructor.
window | const Window& |
Definition at line 55 of file windowmanager.cpp.
References assignWindow().
NumeRe::Window::Window | ( | WindowType | type, |
WindowManager * | manager, | ||
const WindowSettings & | settings | ||
) |
Generic window constructor.
type | WindowType |
manager | WindowManager* |
settings | const WindowSettings& |
Definition at line 69 of file windowmanager.cpp.
References m_manager, m_settings, nType, and registerWindow().
NumeRe::Window::Window | ( | WindowType | type, |
WindowManager * | manager, | ||
GraphHelper * | graph | ||
) |
Graph window constructor.
type | WindowType |
manager | WindowManager* |
graph | GraphHelper* |
Definition at line 87 of file windowmanager.cpp.
References m_graph, m_manager, nType, and registerWindow().
NumeRe::Window::Window | ( | WindowType | type, |
WindowManager * | manager, | ||
tinyxml2::XMLDocument * | layoutString | ||
) |
Custom window constructor.
type | WindowType |
manager | WindowManager* |
layoutString | tinyxml2::XMLDocument* |
Definition at line 105 of file windowmanager.cpp.
References m_layout, m_manager, nType, and registerWindow().
NumeRe::Window::~Window | ( | ) |
Destructor. Unregisters the current window in the window manager and deletes the layout pointer, if it is non-zero.
Definition at line 120 of file windowmanager.cpp.
References m_layout, and unregisterWindow().
|
private |
This private member function is the generalisation of the assignment operator and the copy constructor.
window | const Window& |
Definition at line 169 of file windowmanager.cpp.
References m_graph, m_layout, m_manager, m_settings, nType, nWindowID, registerWindow(), and unregisterWindow().
Referenced by operator=(), and Window().
bool NumeRe::Window::closeWindow | ( | ) |
Closes the current window.
Definition at line 502 of file windowmanager.cpp.
References CustomWindow::closeWindow(), and m_customWindow.
Referenced by windowCommand().
|
inline |
Definition at line 180 of file windowmanager.hpp.
References m_customWindow.
|
inline |
Definition at line 185 of file windowmanager.hpp.
References m_customWindow.
Referenced by windowCommand().
|
private |
This private member function is used by the window manager to detach itself from this window to avoid segmentation faults at application shutdown.
Definition at line 524 of file windowmanager.cpp.
References m_manager.
|
inline |
Definition at line 160 of file windowmanager.hpp.
References m_graph.
Referenced by NumeReWindow::showGraph().
|
inline |
Definition at line 170 of file windowmanager.hpp.
References nWindowID.
Referenced by NumeRe::WindowManager::createWindow(), and CustomWindow::handleEvent().
std::string NumeRe::Window::getItemColor | ( | int | windowItemID | ) | const |
Returns the color of the selected window item as a string.
windowItemID | int |
Definition at line 340 of file windowmanager.cpp.
References CustomWindow::getItemColor(), and m_customWindow.
Referenced by getParametersFromWindow().
std::string NumeRe::Window::getItemLabel | ( | int | windowItemID | ) | const |
Returns the label of the selected window item as a string.
windowItemID | int |
Definition at line 306 of file windowmanager.cpp.
References CustomWindow::getItemLabel(), and m_customWindow.
Referenced by getParametersFromWindow().
std::string NumeRe::Window::getItemState | ( | int | windowItemID | ) | const |
Returns the state of the selected window item as a string.
windowItemID | int |
Definition at line 323 of file windowmanager.cpp.
References CustomWindow::getItemState(), and m_customWindow.
Referenced by getParametersFromWindow().
NumeRe::WinItemValue NumeRe::Window::getItemValue | ( | int | windowItemID | ) | const |
Returns the value of the selected window item as a string.
windowItemID | int |
Definition at line 281 of file windowmanager.cpp.
References CustomWindow::getItemValue(), m_customWindow, WindowItemValue::stringValue, NumeRe::WinItemValue::stringValue, WindowItemValue::tableValue, NumeRe::WinItemValue::tableValue, WindowItemValue::type, and NumeRe::WinItemValue::type.
Referenced by getParametersFromWindow().
|
inline |
Definition at line 175 of file windowmanager.hpp.
References m_layout.
Referenced by CustomWindow::layout().
std::string NumeRe::Window::getProperties | ( | ) | const |
Returns a list of all available window properties (comp. prop
) in this window.
Definition at line 373 of file windowmanager.cpp.
References CustomWindow::getProperties(), and m_customWindow.
Referenced by windowCommand().
std::string NumeRe::Window::getPropValue | ( | const std::string & | varName | ) | const |
Returns the value of the selected property as a string.
varName | const std::string& |
Definition at line 357 of file windowmanager.cpp.
References CustomWindow::getPropValue(), and m_customWindow.
Referenced by getParametersFromWindow().
|
inline |
Definition at line 155 of file windowmanager.hpp.
References nType.
Referenced by NumeReWindow::showWindow(), and NumeRe::WindowManager::unregisterWindow().
std::vector< int > NumeRe::Window::getWindowItems | ( | const std::string & | _selection | ) | const |
Returns a vector of item ids corresponding to the available window items of this window.
_selection | const std::string& |
Definition at line 233 of file windowmanager.cpp.
References CustomWindow::BUTTON, CustomWindow::CHECKBOX, CustomWindow::COMBOBOX, CustomWindow::DROPDOWN, CustomWindow::GAUGE, CustomWindow::getWindowItems(), CustomWindow::GRAPHER, CustomWindow::IMAGE, m_customWindow, CustomWindow::MENUITEM, CustomWindow::RADIOGROUP, CustomWindow::SLIDER, CustomWindow::SPINCTRL, CustomWindow::TABLE, CustomWindow::TEXT, CustomWindow::TEXTCTRL, and CustomWindow::TREELIST.
Referenced by windowCommand().
|
inline |
Definition at line 165 of file windowmanager.hpp.
References m_settings.
Referenced by NumeReWindow::showDirDialog(), NumeReWindow::showFileDialog(), NumeReWindow::showListDialog(), NumeReWindow::showMessageBox(), NumeReWindow::showSelectionDialog(), NumeReWindow::showTextEntry(), and NumeReWindow::showWindow().
This member function is the public overload of the assignment operator.
window | const Window& |
Definition at line 199 of file windowmanager.cpp.
References assignWindow().
|
private |
This private member function registers the current window in the window manager. This will automatically take the ownership from a copied window.
Definition at line 138 of file windowmanager.cpp.
References m_manager, nWindowID, and NumeRe::WindowManager::registerWindow().
Referenced by assignWindow(), and Window().
bool NumeRe::Window::setItemColor | ( | const std::string & | _color, |
int | windowItemID | ||
) |
Enables changing the color of the selected window item to the passed color.
_color | const std::string& |
windowItemID | int |
Definition at line 451 of file windowmanager.cpp.
References m_customWindow, and CustomWindow::setItemColor().
Referenced by setParametersInWindow().
bool NumeRe::Window::setItemGraph | ( | GraphHelper * | _helper, |
int | windowItemID | ||
) |
Updates the graph in the custom window.
_helper | GraphHelper* |
windowItemID | int |
Definition at line 469 of file windowmanager.cpp.
References m_customWindow, and CustomWindow::setItemGraph().
Referenced by createPlot().
bool NumeRe::Window::setItemLabel | ( | const std::string & | _label, |
int | windowItemID | ||
) |
Enables changing the label of the selected window item to the passed label.
_label | const std::string& |
windowItemID | int |
Definition at line 415 of file windowmanager.cpp.
References m_customWindow, and CustomWindow::setItemLabel().
Referenced by setParametersInWindow().
bool NumeRe::Window::setItemState | ( | const std::string & | _state, |
int | windowItemID | ||
) |
Enables changing the state of the selected window item to the passed state.
_state | const std::string& |
windowItemID | int |
Definition at line 433 of file windowmanager.cpp.
References m_customWindow, and CustomWindow::setItemState().
Referenced by setParametersInWindow().
bool NumeRe::Window::setItemValue | ( | const WinItemValue & | _value, |
int | windowItemID | ||
) |
Enables changing the value of the selected window item to the passed value.
_value | const NumeRe::WinItemValue& |
windowItemID | int |
Definition at line 391 of file windowmanager.cpp.
References m_customWindow, CustomWindow::setItemValue(), WindowItemValue::stringValue, NumeRe::WinItemValue::stringValue, WindowItemValue::tableValue, NumeRe::WinItemValue::tableValue, WindowItemValue::type, and NumeRe::WinItemValue::type.
Referenced by setParametersInWindow().
bool NumeRe::Window::setPropValue | ( | const std::string & | _value, |
const std::string & | varName | ||
) |
This function sets the value of the selected window property.
_value | const std::string& |
varName | const std::string& |
Definition at line 487 of file windowmanager.cpp.
References m_customWindow, and CustomWindow::setPropValue().
Referenced by setParametersInWindow().
|
private |
This private member function will unregister the current window in the window manager.
Definition at line 153 of file windowmanager.cpp.
References m_manager, nWindowID, and NumeRe::WindowManager::unregisterWindow().
Referenced by assignWindow(), and ~Window().
void NumeRe::Window::updateWindowInformation | ( | int | status, |
const std::string & | _return | ||
) |
This public member function can be used to update the stored window information in the window manager for the current window.
status | int |
_return | const std::string& |
Definition at line 217 of file windowmanager.cpp.
References m_manager, nWindowID, NumeRe::STATUS_RUNNING, and NumeRe::WindowManager::updateWindowInformation().
Referenced by CustomWindow::OnClose(), NumeReWindow::showDirDialog(), NumeReWindow::showFileDialog(), NumeReWindow::showListDialog(), NumeReWindow::showMessageBox(), NumeReWindow::showSelectionDialog(), and NumeReWindow::showTextEntry().
|
friend |
Definition at line 131 of file windowmanager.hpp.
|
private |
Definition at line 135 of file windowmanager.hpp.
Referenced by closeWindow(), connect(), creationFinished(), getItemColor(), getItemLabel(), getItemState(), getItemValue(), getProperties(), getPropValue(), getWindowItems(), setItemColor(), setItemGraph(), setItemLabel(), setItemState(), setItemValue(), setPropValue(), and Window().
|
private |
Definition at line 133 of file windowmanager.hpp.
Referenced by assignWindow(), getGraph(), and Window().
|
mutableprivate |
Definition at line 137 of file windowmanager.hpp.
Referenced by assignWindow(), getLayout(), Window(), and ~Window().
|
private |
Definition at line 134 of file windowmanager.hpp.
Referenced by assignWindow(), detach(), registerWindow(), unregisterWindow(), updateWindowInformation(), and Window().
|
private |
Definition at line 136 of file windowmanager.hpp.
Referenced by assignWindow(), getWindowSettings(), and Window().
|
private |
Definition at line 132 of file windowmanager.hpp.
Referenced by assignWindow(), getType(), and Window().
|
private |
Definition at line 138 of file windowmanager.hpp.
Referenced by assignWindow(), getId(), registerWindow(), unregisterWindow(), updateWindowInformation(), and Window().