Carousel
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
AbstractApplication Class Reference

The AbstractApplication object is the core object in the carousel and Qt applications. More...

#include <AbstractApplication.h>

Inherits QApplication.

Public Member Functions

 AbstractApplication (int &argc, char **argv, int flags=ApplicationFlags)
 Initializes a new instance of the AbstractApplication class using argc command line arguments in argv. More...
 
virtual int runApplicationLoop (IBootloader &bootloader)
 
- Public Member Functions inherited from QApplication
 QApplication (int &argc, char **argv)
 
 QApplication (int &argc, char **argv, Type type)
 
 QApplication (Display *display, Qt::HANDLE visual, Qt::HANDLE colormap)
 
 QApplication (Display *display, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE colormap)
 
 QApplication (QApplication::QS60MainApplicationFactory factory, int &argc, char **argv)
 
 QApplication (int &argc, char **argv, bool GUIenabled)
 
void aboutToReleaseGpuResources ()
 
void aboutToUseGpuResources ()
 
int autoMaximizeThreshold () const
 
bool autoSipEnabled () const
 
virtual void commitData (QSessionManager &manager)
 
void commitDataRequest (QSessionManager &manager)
 
void focusChanged (QWidget *old, QWidget *now)
 
void fontDatabaseChanged ()
 
QInputContextinputContext () const
 
bool isSessionRestored () const
 
void lastWindowClosed ()
 
virtual bool macEventFilter (EventHandlerCallRef caller, EventRef event)
 
virtual bool notify (QObject *receiver, QEvent *e)
 
virtual bool qwsEventFilter (QWSEvent *event)
 
void qwsSetCustomColors (QRgb *colorTable, int start, int numColors)
 
virtual void saveState (QSessionManager &manager)
 
void saveStateRequest (QSessionManager &manager)
 
QString sessionId () const
 
QString sessionKey () const
 
void setAutoMaximizeThreshold (const int threshold)
 
void setAutoSipEnabled (const bool enabled)
 
void setInputContext (QInputContext *inputContext)
 
void setStyleSheet (const QString &sheet)
 
QString styleSheet () const
 
virtual bool symbianEventFilter (const QSymbianEvent *event)
 
int symbianProcessEvent (const QSymbianEvent *event)
 
virtual bool x11EventFilter (XEvent *event)
 
int x11ProcessEvent (XEvent *event)
 
- Public Member Functions inherited from QCoreApplication
 QCoreApplication (int &argc, char **argv)
 
void aboutToQuit ()
 
bool filterEvent (void *message, long *result)
 
void lock ()
 
bool locked ()
 
EventFilter setEventFilter (EventFilter filter)
 
bool tryLock ()
 
void unlock (bool wakeUpGui)
 
virtual bool winEventFilter (MSG *msg, long *result)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
bool blockSignals (bool block)
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThreadthread () const
 

Protected Slots

virtual void finishLoadingSequence (IServiceLocator *serviceLocator)
 
virtual void onAboutToQuit ()
 
virtual IServiceLocatorstartLoadingSequence (IBootloader &bootloader)
 

Protected Member Functions

virtual void showMainWindow (QMainWindow *mainWindow)
 
virtual void shutdownComponentManager (IComponentManager *componentManager)
 
virtual void startComponentManager (IComponentManager *componentManager)
 
- Protected Member Functions inherited from QApplication
virtual bool event (QEvent *e)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Static Public Member Functions inherited from QApplication
void aboutQt ()
 
QWidgetactiveModalWidget ()
 
QWidgetactivePopupWidget ()
 
QWidgetactiveWindow ()
 
void alert (QWidget *widget, int msec)
 
QWidgetList allWidgets ()
 
void beep ()
 
void changeOverrideCursor (const QCursor &cursor)
 
QClipboardclipboard ()
 
void closeAllWindows ()
 
ColorMode colorMode ()
 
int colorSpec ()
 
int cursorFlashTime ()
 
QDesktopWidgetdesktop ()
 
bool desktopSettingsAware ()
 
int doubleClickInterval ()
 
int exec ()
 
void flushX ()
 
QWidgetfocusWidget ()
 
QFont font (const QWidget *widget)
 
QFont font ()
 
QFont font (const char *className)
 
QFontMetrics fontMetrics ()
 
QSize globalStrut ()
 
bool hasGlobalMouseTracking ()
 
Qt::Alignment horizontalAlignment (QFlags< Qt::AlignmentFlag > align)
 
bool isEffectEnabled (Qt::UIEffect effect)
 
bool isLeftToRight ()
 
bool isRightToLeft ()
 
Qt::LayoutDirection keyboardInputDirection ()
 
int keyboardInputInterval ()
 
QLocale keyboardInputLocale ()
 
Qt::KeyboardModifiers keyboardModifiers ()
 
bool keypadNavigationEnabled ()
 
Qt::LayoutDirection layoutDirection ()
 
Qt::MacintoshVersion macVersion ()
 
QWidgetmainWidget ()
 
Qt::MouseButtons mouseButtons ()
 
Qt::NavigationMode navigationMode ()
 
QCursoroverrideCursor ()
 
QPalette palette (const QWidget *widget)
 
QPalette palette ()
 
QPalette palette (const char *className)
 
Qt::KeyboardModifiers queryKeyboardModifiers ()
 
bool quitOnLastWindowClosed ()
 
QDecorationqwsDecoration ()
 
void qwsSetDecoration (QDecoration *decoration)
 
QDecorationqwsSetDecoration (const QString &decoration)
 
void restoreOverrideCursor ()
 
bool reverseLayout ()
 
void setActiveWindow (QWidget *active)
 
void setColorMode (ColorMode mode)
 
void setColorSpec (int spec)
 
void setCursorFlashTime (int)
 
void setDesktopSettingsAware (bool on)
 
void setDoubleClickInterval (int)
 
void setEffectEnabled (Qt::UIEffect effect, bool enable)
 
void setFont (const QFont &font, bool b, const char *className)
 
void setFont (const QFont &font, const char *className)
 
void setGlobalMouseTracking (bool dummy)
 
void setGlobalStrut (const QSize &)
 
void setGraphicsSystem (const QString &system)
 
void setKeyboardInputInterval (int)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
void setMainWidget (QWidget *mainWidget)
 
void setNavigationMode (Qt::NavigationMode mode)
 
void setOverrideCursor (const QCursor &cursor)
 
void setOverrideCursor (const QCursor &cursor, bool replace)
 
void setPalette (const QPalette &pal, bool b, const char *className)
 
void setPalette (const QPalette &palette, const char *className)
 
void setQuitOnLastWindowClosed (bool quit)
 
void setReverseLayout (bool reverse)
 
void setStartDragDistance (int l)
 
void setStartDragTime (int ms)
 
void setStyle (QStyle *style)
 
QStylesetStyle (const QString &style)
 
void setWheelScrollLines (int)
 
void setWindowIcon (const QIcon &icon)
 
void setWinStyleHighlightColor (const QColor &c)
 
int startDragDistance ()
 
int startDragTime ()
 
QStylestyle ()
 
void syncX ()
 
QWidgettopLevelAt (const QPoint &point)
 
QWidgettopLevelAt (int x, int y)
 
QWidgetList topLevelWidgets ()
 
Type type ()
 
int wheelScrollLines ()
 
QWidgetwidgetAt (const QPoint &point)
 
QWidgetwidgetAt (int x, int y, bool child)
 
QWidgetwidgetAt (const QPoint &point, bool child)
 
QWidgetwidgetAt (int x, int y)
 
QIcon windowIcon ()
 
const QColorwinStyleHighlightColor ()
 
Qt::WindowsVersion winVersion ()
 
- Static Public Member Functions inherited from QCoreApplication
void addLibraryPath (const QString &path)
 
QString applicationDirPath ()
 
QString applicationFilePath ()
 
QString applicationName ()
 
qint64 applicationPid ()
 
QString applicationVersion ()
 
int argc ()
 
QStringList arguments ()
 
char ** argv ()
 
bool closingDown ()
 
int enter_loop ()
 
int exec ()
 
void exit (int returnCode)
 
void exit_loop ()
 
void flush ()
 
bool hasPendingEvents ()
 
void installTranslator (QTranslator *translationFile)
 
QCoreApplicationinstance ()
 
QStringList libraryPaths ()
 
int loopLevel ()
 
QString organizationDomain ()
 
QString organizationName ()
 
void postEvent (QObject *receiver, QEvent *event)
 
void postEvent (QObject *receiver, QEvent *event, int priority)
 
void processEvents (QFlags< QEventLoop::ProcessEventsFlag > flags)
 
void processEvents (QFlags< QEventLoop::ProcessEventsFlag > flags, int maxtime)
 
void processOneEvent ()
 
void quit ()
 
void removeLibraryPath (const QString &path)
 
void removePostedEvents (QObject *receiver, int eventType)
 
void removePostedEvents (QObject *receiver)
 
void removeTranslator (QTranslator *translationFile)
 
bool sendEvent (QObject *receiver, QEvent *event)
 
void sendPostedEvents (QObject *receiver, int event_type)
 
void sendPostedEvents ()
 
void setApplicationName (const QString &application)
 
void setApplicationVersion (const QString &version)
 
void setAttribute (Qt::ApplicationAttribute attribute, bool on)
 
void setLibraryPaths (const QStringList &paths)
 
void setOrganizationDomain (const QString &orgDomain)
 
void setOrganizationName (const QString &orgName)
 
bool startingUp ()
 
bool testAttribute (Qt::ApplicationAttribute attribute)
 
QString translate (const char *context, const char *sourceText, const char *disambiguation, Encoding encoding, int n)
 
QString translate (const char *context, const char *sourceText, const char *disambiguation, Encoding encoding)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QApplication
typedef ColorMode
 
typedef QS60MainApplicationFactory
 
- Public Attributes inherited from QCoreApplication
typedef EventFilter
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QApplication
 autoMaximizeThreshold
 
 autoSipEnabled
 
 cursorFlashTime
 
 doubleClickInterval
 
 globalStrut
 
 keyboardInputInterval
 
 layoutDirection
 
 quitOnLastWindowClosed
 
 startDragDistance
 
 startDragTime
 
 styleSheet
 
 wheelScrollLines
 
 windowIcon
 
- Properties inherited from QCoreApplication
 applicationName
 
 applicationVersion
 
 organizationDomain
 
 organizationName
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The AbstractApplication object is the core object in the carousel and Qt applications.

This object represents the application itself that handles message loop (a QApplication). Instead of QApplication or QCoreApplication to start carousel AbstractApplication you should provide customized bootloader, that populates your application with components.

To start application call runApplicationLoop() method, that performs loading sequence and then starts exec() loop:

* #include "MyBootloader.h"
* #include <carousel/framework/AbstractApplication.h>
*
* int main(int argc, char *argv[])
* {
* AbstractApplication application(argc, argv);
*
* MyBootloader bootloader;
* return application.runApplicationLoop(bootloader);
* }
*

During the loading sequence AbstractApplication runs a bootloader, connects to the QCoreApplication::aboutToQuit(), starts component manager and, finaly, shows a main window, which was created during the loading sequence. An AbstractApplication also stops component manager as a reaction on the QCoreApplication::aboutToQuit() signal.

You can create your own application class where you should setup application and organization name, or override default behaviour.

Constructor & Destructor Documentation

AbstractApplication::AbstractApplication ( int &  argc,
char **  argv,
int  flags = ApplicationFlags 
)

Initializes a new instance of the AbstractApplication class using argc command line arguments in argv.

Member Function Documentation

virtual int AbstractApplication::runApplicationLoop ( IBootloader bootloader)
virtual

Performs loading sequence using bootloader and then starts exec() loop.

See Also
startLoadingSequence(), finishLoadingSequence()
virtual void AbstractApplication::shutdownComponentManager ( IComponentManager componentManager)
protectedvirtual

Shuts down a component manager, obtained from the bootloader after the loading sequence.

virtual void AbstractApplication::startComponentManager ( IComponentManager componentManager)
protectedvirtual

Starts a component manager, obtained from the bootloader after the loading sequence.

virtual void AbstractApplication::showMainWindow ( QMainWindow mainWindow)
protectedvirtual

Starts a main window, obtained from the bootloader after the loading sequence.

virtual IServiceLocator* AbstractApplication::startLoadingSequence ( IBootloader bootloader)
protectedvirtualslot

Runs loading sequence using bootloader and connects to the QCoreApplication::aboutToQuit().

virtual void AbstractApplication::finishLoadingSequence ( IServiceLocator serviceLocator)
protectedvirtualslot

Finishes the loading sequence starting component manager and showing a main window.

virtual void AbstractApplication::onAboutToQuit ( )
protectedvirtualslot

Performs a finalazing actions such as shutting down a component manager. This slot is invoked on QCoreApplication::aboutToQuit() signal.