OpenWalnut  1.5.0dev
Public Member Functions | Protected Attributes | List of all members
WApplication Class Reference

Overloaded base class for our application that has initial handling of session data and catches uncaught exceptions. More...

#include <WApplication.h>

+ Inheritance diagram for WApplication:
+ Collaboration diagram for WApplication:

Public Member Functions

 WApplication (int &argc, char **argv, bool GUIenabled=true)
 default constructor, see QApplication More...
 
void setMyMainWidget (QWidget *widget)
 store the main widget for error reporting and session management More...
 
virtual bool notify (QObject *receiver, QEvent *e)
 Overloaded to catch uncaught exceptions in event handlers and displays a bug-warning. More...
 

Protected Attributes

QWidget * myMainWidget
 Reference to the main widget set by setMyMainWidget. More...
 

Detailed Description

Overloaded base class for our application that has initial handling of session data and catches uncaught exceptions.

Definition at line 36 of file WApplication.h.

Constructor & Destructor Documentation

◆ WApplication()

WApplication::WApplication ( int &  argc,
char **  argv,
bool  GUIenabled = true 
)

default constructor, see QApplication

Parameters
argcnumber of arguments (may be modified internally)
argvvalues of arguments (may be modified interanlly)
GUIenabledtrue if we want a gui

Definition at line 38 of file WApplication.cpp.

Member Function Documentation

◆ notify()

bool WApplication::notify ( QObject receiver,
QEvent e 
)
virtual

Overloaded to catch uncaught exceptions in event handlers and displays a bug-warning.

Parameters
receiverTarget of the notification
eThe event that the target will be notified of.
Returns
Value that is returned from the receiver's event handler

Definition at line 49 of file WApplication.cpp.

References wlog::error(), myMainWidget, and WException::what().

+ Here is the call graph for this function:

◆ setMyMainWidget()

void WApplication::setMyMainWidget ( QWidget *  widget)

store the main widget for error reporting and session management

Parameters
widgetthe main widget used, e.g., when application data should be stored

Definition at line 44 of file WApplication.cpp.

References myMainWidget.

Referenced by WQtGui::run().

+ Here is the caller graph for this function:

Member Data Documentation

◆ myMainWidget

QWidget* WApplication::myMainWidget
protected

Reference to the main widget set by setMyMainWidget.

Definition at line 68 of file WApplication.h.

Referenced by notify(), and setMyMainWidget().


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