OpenWalnut
1.5.0dev
src
qtgui
WApplication.h
1
//---------------------------------------------------------------------------
2
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
7
//
8
// This file is part of OpenWalnut.
9
//
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22
//
23
//---------------------------------------------------------------------------
24
25
#ifndef WAPPLICATION_H
26
#define WAPPLICATION_H
27
28
#include <QApplication>
29
30
class
WMainWindow
;
31
32
/**
33
* Overloaded base class for our application that has initial handling of
34
* session data and catches uncaught exceptions.
35
*/
36
class
WApplication
:
public
QApplication
37
{
38
Q_OBJECT
39
public
:
40
/**
41
* default constructor, see QApplication
42
* \param argc number of arguments (may be modified internally)
43
* \param argv values of arguments (may be modified interanlly)
44
* \param GUIenabled true if we want a gui
45
*/
46
WApplication
(
int
& argc,
char
** argv,
bool
GUIenabled =
true
);
47
48
/**
49
* store the main widget for error reporting and session management
50
* \param widget the main widget used, e.g., when application data
51
* should be stored
52
*/
53
void
setMyMainWidget
( QWidget* widget );
54
55
/**
56
* Overloaded to catch uncaught exceptions in event handlers and displays a bug-warning.
57
*
58
* \param receiver Target of the notification
59
* \param e The event that the target will be notified of.
60
* \return Value that is returned from the receiver's event handler
61
*/
62
virtual
bool
notify
(
QObject
* receiver,
QEvent
* e );
63
64
protected
:
65
/**
66
* Reference to the main widget set by setMyMainWidget
67
*/
68
QWidget*
myMainWidget
;
69
};
70
71
#endif
// WAPPLICATION_H
QApplication
QEvent
QObject
WApplication
Overloaded base class for our application that has initial handling of session data and catches uncau...
Definition:
WApplication.h:37
WApplication::setMyMainWidget
void setMyMainWidget(QWidget *widget)
store the main widget for error reporting and session management
Definition:
WApplication.cpp:44
WApplication::myMainWidget
QWidget * myMainWidget
Reference to the main widget set by setMyMainWidget.
Definition:
WApplication.h:68
WApplication::notify
virtual bool notify(QObject *receiver, QEvent *e)
Overloaded to catch uncaught exceptions in event handlers and displays a bug-warning.
Definition:
WApplication.cpp:49
WApplication::WApplication
WApplication(int &argc, char **argv, bool GUIenabled=true)
default constructor, see QApplication
Definition:
WApplication.cpp:38
WMainWindow
This class contains the main window and the layout of the widgets within the window.
Definition:
WMainWindow.h:66
Generated by
1.9.1