Home · All Classes · Main Classes · Deprecated
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

MComponentData Class Reference

MComponentData manages the GUI application's control flow and main settings. More...

Inherits QObject.

List of all members.

Signals

void localeSettingsChanged ()
void chainTaskDataChanged ()

Public Member Functions

 MComponentData (int &argc, char **argv, const QString &appIdentifier=QString(), MApplicationService *service=0)
 MComponentData (MApplicationService *service)
virtual ~MComponentData ()

Static Public Member Functions

static MComponentDatainstance ()
static MComponentDatacreateInstance (int &argc, char **argv, const QString &appIdentifier=QString(), MApplicationService *service=0)
static MComponentDatacreateInstance (MApplicationService *service)
static QString deviceName ()
static bool softwareRendering ()
static bool fullScreen ()
static bool showBoundingRect ()
static bool showFps ()
static bool logFps ()
static bool showSize ()
static bool showPosition ()
static bool showMargins ()
static bool showObjectNames ()
static bool showStyleNames ()
static bool showCursor ()
static bool prestarted ()
static M::PrestartMode prestartMode ()
static bool emulateTwoFingerGestures ()
static void setShowPosition (bool show)
static void setShowMargins (bool show)
static void setShowObjectNames (bool show)
static void setShowStyleNames (bool show)
static void setShowSize (bool show)
static void setShowBoundingRect (bool show)
static void setShowFps (bool show)
static void setLogFps (bool show)
static void setShowCursor (bool show)
static void setPrestarted (bool flag)
static void setPrestartMode (M::PrestartMode mode)
static void setEmulateTwoFingerGestures (bool flag)
static bool setSyslogServer (const QUrl &url)
static MApplicationWindowactiveApplicationWindow ()
static MWindowactiveWindow ()
static QList< MWindow * > windows ()
static QString appName ()
static QString binaryName ()
static QString serviceName ()
static MFeedbackPlayerfeedbackPlayer ()
static bool isLoadMInputContextEnabled ()
static void setLoadMInputContext (bool enable)
static bool isMeeGoWindowManagerRunning ()

Protected Member Functions

 MComponentData (MComponentDataPrivate &dd, int &argc, char **argv, const QString &appIdentifier=QString())

Protected Attributes

MComponentDataPrivate *const d_ptr

Detailed Description

MComponentData manages the GUI application's control flow and main settings.

MComponentData provides all the settings that are necessary for a QApplication in order to initialize the MeeGo Touch UI framework. As such it is used by MApplication, which adds the event loop. MComponentData can be used by plain Qt applications in order to provide access to resources of the MeeGo Touch UI framework.

MComponentData instance automatically extracts application name from the arguments given in the constructor. It also loads css - stylesheet, svg file and adds application specific image paths to the pixmap search paths used by the current MTheme instance.

CSS and SVG files are searched for in order from the following places:

  1. Directory in which application was launched.
  2. Application specific theme path (global theme path appended with the application name)
  3. Global theme path (Qt data path appended by themes/m)

When first instance of CSS or SVG file is found it is loaded to the current MTheme. Also image - subdirectory of each of the aforementioned paths is appended to the pixmap search paths used by MTheme.

MComponentData will also create a QDBus service with name made by prepending 'com.nokia.' to the application name provided in the constructor (or the binary name if no name is provided in the constructor). Due to this, the application name can't contain characters not allowed by dbus. It will provide an interface called MComponentDataIf which calls service methods in an instance of MApplicationService. By default, MComponentData will construct an instance of MApplicationService, but the application programmer can derive a class from MApplicationService and provide a pointer to that in the constructor for MComponentData to use instead. This way, the application programmer can override the methods in MComponentDataSerivce and change the behaviour of the application's interface.

For some applications, it is necessary to implement a custom MApplicationService. See MApplicationService for more information.


Constructor & Destructor Documentation

MComponentData::MComponentData ( int &  argc,
char **  argv,
const QString appIdentifier = QString(),
MApplicationService service = 0 
)

Initializes the window system and constructs an application object.

Parameters:
argc number of arguments passed to the application from the command line
argv argument strings passed to the application from the command line
appIdentifier an optional identifier for the application. Can contain alphabetical characters, numbers, dashes and underscores. If an empty string is given (the default) the application binary file name is used.
MComponentData::MComponentData ( MApplicationService service  )  [explicit]
MComponentData::~MComponentData (  )  [virtual]

Cleans up any window system resources that were allocated by this application.

MComponentData::MComponentData ( MComponentDataPrivate &  dd,
int &  argc,
char **  argv,
const QString appIdentifier = QString() 
) [protected]

Member Function Documentation

MApplicationWindow * MComponentData::activeApplicationWindow (  )  [static]

Returns the currently active application window.

Note:
If the active window is of type MWindow (and not MApplicationWindow) this method will return a null pointer.
See also:
activeWindow()
MWindow * MComponentData::activeWindow (  )  [static]

Returns the currently active window.

QString MComponentData::appName (  )  [static]

Returns the application's app name.

QString MComponentData::binaryName (  )  [static]

Returns the application's binary name.

void MComponentData::chainTaskDataChanged (  )  [signal]
MComponentData * MComponentData::createInstance ( int &  argc,
char **  argv,
const QString appIdentifier = QString(),
MApplicationService service = 0 
) [static]

returns the MComponentData instance

always returns a MComponentData pointer if no instance was created yet, it creates a new instance and returns the pointer if an instance was already created it returns the pointer to the existing instance

See also:
instance()
MComponentData * MComponentData::createInstance ( MApplicationService service  )  [static]
QString MComponentData::deviceName (  )  [static]

Target device name.

bool MComponentData::emulateTwoFingerGestures (  )  [static]

Emulate two finger gestures.

MFeedbackPlayer * MComponentData::feedbackPlayer (  )  [static]

Returns object which provide interface for nonvisual feedback or NULL.

bool MComponentData::fullScreen (  )  [static]

Full screen command line option set.

MComponentData * MComponentData::instance (  )  [static]

returns the MComponentData instance or 0 if no instance is created yet

See also:
createInstance()
bool MComponentData::isLoadMInputContextEnabled (  )  [static]

Returns whether automatic loading of MInputContext is enabled.

bool MComponentData::isMeeGoWindowManagerRunning (  )  [static]

Returns whether MCompositor is present.

void MComponentData::localeSettingsChanged (  )  [signal]

Signal emitted when the default system locale changes.

bool MComponentData::logFps (  )  [static]

Log frame rate command line option set.

bool MComponentData::prestarted (  )  [static]

Return true if prestarted state active.

M::PrestartMode MComponentData::prestartMode (  )  [static]

Returns the prestart mode.

QString MComponentData::serviceName (  )  [static]

Returns the application's service name.

void MComponentData::setEmulateTwoFingerGestures ( bool  flag  )  [static]

Set if two finger gestures should be emulated or not.

void MComponentData::setLoadMInputContext ( bool  enable  )  [static]

Sets whether MComponentData should automatically load m input context.

void MComponentData::setLogFps ( bool  show  )  [static]

Sets if whether fps logging should be enabled or not.

void MComponentData::setPrestarted ( bool  flag  )  [static]

Sets the prestarted flag.

void MComponentData::setPrestartMode ( M::PrestartMode  mode  )  [static]

Sets the prestart mode.

void MComponentData::setShowBoundingRect ( bool  show  )  [static]

Sets if bounding rects of widgets should be shown or not.

void MComponentData::setShowCursor ( bool  show  )  [static]

Sets if the cursor should be shown or not.

void MComponentData::setShowFps ( bool  show  )  [static]

Sets if a frames-per-second counter should be shown or not.

void MComponentData::setShowMargins ( bool  show  )  [static]

Sets if margins of widgets should be shown or not.

void MComponentData::setShowObjectNames ( bool  show  )  [static]

Sets if names of objects should be shown or not.

void MComponentData::setShowPosition ( bool  show  )  [static]

Sets if position of widgets should be shown or not.

void MComponentData::setShowSize ( bool  show  )  [static]

Sets if sizes of widgets should be shown or not.

void MComponentData::setShowStyleNames ( bool  show  )  [static]

Sets if names of styles should be shown or not.

bool MComponentData::setSyslogServer ( const QUrl url  )  [static]

Set the syslog server to log to:

Parameters:
url can point to either a local domain socket, for example 'file:///dev/log', or a remote server specified as 'udp://servername[:port]'.
Note:
It is not safe to change the syslog server, while your process has more than one active threads.
bool MComponentData::showBoundingRect (  )  [static]

Show bounding rectangles command line option set.

bool MComponentData::showCursor (  )  [static]

Show cursor.

bool MComponentData::showFps (  )  [static]

Show frame rate command line option set.

bool MComponentData::showMargins (  )  [static]

Show widgets margins.

bool MComponentData::showObjectNames (  )  [static]

Show object names.

bool MComponentData::showPosition (  )  [static]

Show widgets positions.

bool MComponentData::showSize (  )  [static]

Show widgets sizes.

bool MComponentData::showStyleNames (  )  [static]

Show style names.

bool MComponentData::softwareRendering (  )  [static]

Software rendering command line option set.

QList< MWindow * > MComponentData::windows (  )  [static]

Returns a list of all windows in the application.


Member Data Documentation

MComponentDataPrivate* const MComponentData::d_ptr [protected]

Copyright © 2010 Nokia Corporation
MeeGo Touch