GCF LOGO VCL LOGO
GCF Core Module

Classes

class  GCF::ApplicationServices
 This class abstracts the common functionalities provided by the different types of applications in GCF3. More...
 
class  GCF::Component
 Base class for all GCF components. More...
 
class  GCF::InitializeEvent
 Contains parameters that describe an initialization event
#include <GCF3/Component>
. More...
 
class  GCF::SettingsLoadEvent
 Contains parameters that describe an settings load event
#include <GCF3/Component>
. More...
 
class  GCF::SettingsUnloadEvent
 Contains parameters that describe a settings-unload event
#include <GCF3/Component>
. More...
 
class  GCF::ContentLoadEvent
 Contains parameters that describe a content-load event
#include <GCF3/Component>
. More...
 
class  GCF::ContentObjectLoadEvent
 Contains parameters that describe a content-object-load event
#include <GCF3/Component>
. More...
 
class  GCF::ContentObjectMergeEvent
 Contains parameters that describe a content-object-merge event
#include <GCF3/Component>
. More...
 
class  GCF::ContentObjectUnloadEvent
 Contains parameters that describe a content-object-unload event
#include <GCF3/Component>
. More...
 
class  GCF::ContentObjectUnmergeEvent
 Contains parameters that describe a content-object-unmerge event
#include <GCF3/Component>
. More...
 
class  GCF::ContentUnloadEvent
 Contains parameters that describe a content-unload event
#include <GCF3/Component>
. More...
 
class  GCF::ActivationEvent
 Contains parameters that describe an activation event
#include <GCF3/Component>
.  More...
 
class  GCF::DeactivationEvent
 Contains parameters that describe a deactivation event
#include <GCF3/Component>
.  More...
 
class  GCF::ActivateContentObjectEvent
 Contains parameters that describe an content-object-activation event
#include <GCF3/Component>
.  More...
 
class  GCF::DeactivateContentObjectEvent
 Contains parameters that describe an content-object-deactivation event
#include <GCF3/Component>
.  More...
 
class  GCF::FinalizeEvent
 Contains parameters that describe an finalization event
#include <GCF3/Component>
. More...
 
class  GCF::AbstractJob
 This class offers an abstraction for representing and managing time-consuming jobs in your GCF applications.Typically jobs like downloads, uploads, copy, load and save are time-consuming jobs. You might want to offer the ability to showcase their job progress and also the ability to pause, resume or even cancel such jobs. More...
 
class  GCF::JobListModel
 This model provides a model representation for a configured list of GCF::AbstractJob. More...
 
class  GCF::LogMessageHandlerInterface
 This interface is used to represent the class that can do the actual logging. More...
 
class  GCF::Log
 This class offers means to log a hierarchy of messages and process them. More...
 
class  GCF::LogMessage
 Represents a single message in the log. More...
 
class  GCF::LogMessageBranch
 Creates a branch in the log-message hierarchy. More...
 
class  GCF::MapToObjectEventListener
 This listens to GCF::MapToObject's events.When set as event listener on GCF::MapToObject the corresponding virtual functions in this class will be called when a object pointer is added, removed or deleted from the GCF::MapToObject. More...
 
class  GCF::MapToObject< T >
 This class manages a map of <T>-QObject pairs. <T> is a template class. More...
 
class  GCF::MapToObjectEventBroadcaster
 MapToObjectEventBroadcaster broadcasts inserted, removed and deleted events of MapToObject. More...
 
class  GCF::MapToObjectWatcher
 This watches over MapToObject to emit signals when the objects are inserted, removed or deleted from GCF::MapToObject. More...
 
class  GCF::ObjectList
 This class manages a list of live QObject pointers. More...
 
class  GCF::ObjectListEventListener
 ObjectListEventListener listens to GCF::ObjectList's events.When set as event listener of GCF::ObjectList, the corresponding virtual functions of this class will be called when a QObject pointer is added, removed or deleted from the GCF::ObjectList. More...
 
class  GCF::ObjectListEventBroadcaster
 ObjectListEventBroadcaster broadcasts added, removed and deleted events of ObjectList. More...
 
class  GCF::ObjectListWatcher
 This watches over ObjectList to emit signals when the objects are added, removed or deleted from GCF::ObjectList. More...
 
class  GCF::ObjectMapEventListener
 This listens to GCF::ObjectMap 's events.
#include <GCF3/ObjectMap>
. More...
 
class  GCF::ObjectMap< T >
 This class manages a map of QObject-value pairs.
#include <GCF3/ObjectMap>
. More...
 
class  GCF::ObjectMapEventBroadcaster
 ObjectMapEventBroadcaster broadcasts inserted, removed and deleted events of ObjectMap.
#include <GCF3/ObjectMap>
. More...
 
class  GCF::ObjectMapWatcher
 This watches over GCF::ObjectMap to emit signals when the objects are inserted, removed or deleted from GCF::ObjectMap. More...
 
class  GCF::ObjectTree
 A class for representing a logical object-tree structure. More...
 
class  GCF::ObjectTreeNode
 Represents a node in GCF::ObjectTree. More...
 
class  GCF::Result
 This class allows representation of the result of a process and/or function. More...
 
class  GCF::SignalSpy
 Enables introspection of signal emissions from a QObject. More...
 
class  GCF::Version
 Represents version information as a major, minor, revision number triplet. More...
 

Functions

QObject * gFindObject (const QString &path)
 
template<class T >
T * gFindObject (const QString &path, GCF::ObjectTreeNode **objectNode=0)
 
template<class T >
T * gFindObject (GCF::ObjectTreeNode **objectNode=0)
 
template<class T >
QList< T * > gFindObjects (QList< GCF::ObjectTreeNode * > *objectNodes=0)
 
Q_DECL_IMPORT const GCF::VersionGCF::version ()
 
Q_DECL_IMPORT QString GCF::vendor ()
 
Q_DECL_IMPORT QString GCF::url ()
 
Q_DECL_IMPORT QString GCF::buildTimestamp ()
 
Q_DECL_IMPORT void GCF::setContentDirectory (const QString &path)
 
Q_DECL_IMPORT QString GCF::contentDirectory ()
 
Q_DECL_IMPORT void GCF::setSettingsDirectory (const QString &path)
 
Q_DECL_IMPORT QString GCF::settingsDirectory ()
 
Q_DECL_IMPORT QString GCF::applicationDataDirectoryPath ()
 
Q_DECL_IMPORT QStringList GCF::searchPathsForLibs ()
 
Q_DECL_IMPORT QStringList GCF::searchPaths ()
 
Q_DECL_IMPORT QString GCF::findLibrary (const QString &name)
 
Q_DECL_IMPORT QString GCF::findFile (const QString &name)
 
Q_DECL_IMPORT QStringList GCF::findFiles (const QString &name)
 

Detailed Description

The "GCF Core Module" is the foundation of all modules in GCF. The module works on both Qt 4.8 and on Qt 5.

It implements a component model for you to leverage in your applications to build pluggable and extensible applications. Please read the article on GCF Component Model to get a grasp of the component model in GCF.

To include this module in GCF you can add the following line to your project file

CONFIG += GCF3

For this to work, you should have set QMAKEFEATURES environment variable to $GCFDIR/QMakePRF. If you have not configured the QMAKEFEATURES, you can enter the following line in your project file instead.

GCF_SOURCE_DIR = /path/to/gcf/source/
include( $$GCF_SOURCE_DIR/QMakePRF/GCF3.prf )

Important macros

gAppService

#include <GCF3/Application>

Pointer to the only instance of GCF::ApplicationServices in the application. NULL if no GCF application object (GCF::Application, GCF::QmlApplication and GCF::GuiApplication) is created.

gApp

#include <GCF3/Application>

GCF_EXPORT_MACRO

#include <GCF3/Component>

This macro is used to export a component class from a shared-library. This macro is necessary if you want to be able to load the component using loadComponent().

The macro accepts one parameter. That is the name of the component class (including namespaces).

Function Documentation

QObject * gFindObject ( const QString &  path)
#include <GCF3/Application>
#include <GCF3/Application>

Returns the object at path.

template<class T >
T * gFindObject< T > ( const QString &  path,
GCF::ObjectTreeNode **  objectNode = 0 
)
#include <GCF3/Application>

Returns the object at path. If objectNode is specified, then it returns a pointer to the tree-node that has the object registered.

template<class T >
T * gFindObject< T > ( GCF::ObjectTreeNode **  objectNode = 0)
#include <GCF3/Application>

Searches for an object in the object-tree of type T and returns a pointer to it. If no such object was found, then this function returns a NULL pointer.

If objectNode is specified, then it returns a pointer to the tree-node that has the object registered.

template<class T >
QList< T * > gFindObjects< T > ( QList< GCF::ObjectTreeNode * > *  objectNodes = 0)
#include <GCF3/Application>

Searches for all objects in the object-tree of type T and returns a list of pointers to it. If no such object was found, then this function returns an empty list.

If objectNodes is specified, then it returns list of tree-nodes through it.

const GCF::Version & GCF::version ( )
Returns
version of GCF library
QString GCF::vendor ( )
Returns
"VCreate Logic Pvt. Ltd"
QString GCF::url ( )
Returns
"http://gcf.vcreatelogic.com"
QString GCF::buildTimestamp ( )
Returns
date and time when GCF was built
void GCF::setContentDirectory ( const QString &  path)

Use this function to specify the directory where GCF should look for content-files.

Parameters
pathPath (absolute or relative to application executable's path) in which GCF should look for content files.
Note
If a content directory has already been set, then this function is a no-op.
QString GCF::contentDirectory ( )
Returns
the content directory path where GCF will look for content-files by default.
Note
Unless the user specifies a content-directory via setContentDirectory(), the GCF will look for content-files in applicationDataDirectoryPath() /content.
void GCF::setSettingsDirectory ( const QString &  path)

Use this function to specify the directory where GCF should look for settings-files.

Parameters
pathPath (absolute or relative to application executable's path) in which GCF should look for settings files.
Note
If a settings directory has already been set, then this function is a no-op.
QString GCF::settingsDirectory ( )
Returns
the settings directory path where GCF will look for settings-files by default.
Note
Unless the user specifies a settings-directory via setSettingsDirectory(), the GCF will look for content-files in applicationDataDirectoryPath() /content.
QString GCF::applicationDataDirectoryPath ( )
Returns
the directory for loading and saving of user-specific data.
QStringList GCF::searchPathsForLibs ( )

Returns a list of paths where GCF will look for shared libraries and components. The returned list include

  • Application's directory path ( QCoreApplication::applicationDirPath() )
  • Current working directory ( QDir::currentPath() )
  • The current user's home directory ( QDir::homePath() )
  • Libary paths searched by QLibrary ( QCoreApplication::libraryPaths() )
  • Directories in DYLD_LIBRARY_PATH (Mac), LD_LIBRARY_PATH (Linux)
  • QLibraryInfo::LibrariesPath
  • QLibraryInfo::PluginsPath
  • QLibraryInfo::ImportsPath
  • QLibraryInfo::BinariesPath
  • QLibraryInfo::LibraryExecutablesPath
  • QLibraryInfo::SettingsPath
  • QLibraryInfo::HeadersPath
  • QLibraryInfo::PrefixPath
  • Directories in the PATH environment variable
QStringList GCF::searchPaths ( )

Returns a list of paths where GCF will look for files (not shared libraries) The returned list include

  • Application's directory path ( QCoreApplication::applicationDirPath() )
  • Current working directory ( QDir::currentPath() )
  • The current user's home directory ( QDir::homePath() )
  • Libary paths searched by QLibrary ( QCoreApplication::libraryPaths() )
  • QLibraryInfo::LibraryExecutablesPath
  • QLibraryInfo::SettingsPath
  • QLibraryInfo::HeadersPath
  • QLibraryInfo::PrefixPath
  • Directories in the PATH environment variable
QString GCF::findLibrary ( const QString &  name)

This function searches for a library by name name and returns complete path to the library file. If no such library was found the function returns an empty string.

Example:

// On a Mac OS machine
QString libFile = GCF::findLibrary("c++");
// libFile will contain /usr/lib/libc++.dylib
QString GCF::findFile ( const QString &  name)

This function looks for a file by name name and returns complete path to the file on the system. If no such file was found, then the function returns an empty string.

Example:

// On a Windows machine
QString path = GCF::findFile("notepad.exe");
// path will contain C:\\Windows\\System32\\notepad.exe
QStringList GCF::findFiles ( const QString &  name)

This function returns all the paths where a file by name name was found.