All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::Application Class Reference

Base class for writing new applications. More...

#include <MultiWidgets/Application.hpp>

Inheritance diagram for MultiWidgets::Application:
Valuable::Node Valuable::Attribute Patterns::NotCopyable Valuable::Serializable

Public Types

enum  VersionType {
  FULL, VERSION_ONLY, VERSION_MAJOR, VERSION_MINOR,
  VERSION_PATCH, VERSION_GIT_HASH
}
 Version string type. More...
 
- Public Types inherited from Valuable::Node
typedef container::const_iterator const_iterator
 
typedef Radiant::ArrayMap
< QByteArray, Attribute * > 
container
 Container for attributes, key is the attribute name.
 
typedef container::iterator iterator
 Iterator for the container.
 
typedef std::function< void(Radiant::BinaryData &)> ListenerFuncBd
 Listener function type that takes a BinaryData reference as a parameter, similar to eventProcess.
 
typedef std::function< void()> ListenerFuncVoid
 Default listener function type.
 
enum  ListenerType { DIRECT =1, AFTER_UPDATE =2, AFTER_UPDATE_ONCE =4 }
 Types of event listeners. More...
 
typedef int64_t Uuid
 Unique identifier type.
 
- Public Types inherited from Valuable::Attribute
enum  Layer {
  DEFAULT = 0, STYLE, USER, STYLE_IMPORTANT,
  LAYER_COUNT, LAYER_CURRENT
}
 Attribute has multiple independent attribute values on LAYER_COUNT different layers. More...
 
typedef std::function< void()> ListenerFunc
 Callback function type in the listener API.
 
enum  ListenerRole { DELETE_ROLE = 1 << 0, CHANGE_ROLE = 1 << 1, ALL_ROLES = (CHANGE_ROLE << 1) -1 }
 Different listener roles, used when adding a new listener.
 
enum  ValueUnit {
  VU_UNKNOWN, VU_PXS, VU_PERCENTAGE, VU_EMS,
  VU_EXS
}
 Units of a value. More...
 

Valuable Attributes

QString audio-config = QString ()
 Path to the audio configuration file. More...
 
QString audio-devices = QString ()
 Path to the audio devices file which is fed to Resonant::AudioLoop::setDevicesFile. More...
 
QString background = ""
 If set the background for the whole application is loaded from this path. More...
 
QString config = ""
 Input configuration file loaded in the initialization of application. More...
 
QString console = ""
 If set, opens javascript-terminal accessed by telnet to the designated location. More...
 
QStringList css = QStringList ()
 Paths to CSS files to be used for the application. More...
 
bool dev = true
 Is the application using developer mode? In non-developer mode the only keyboard shortcuts are Ctrl+Q for exiting the application, Ctrl+M for minimizing all application windows and Ctrl+F12 for toggling this developer mode. More...
 
bool dummy = false
 If enabled the application does not try to use real touchscreen. More...
 
bool enable-site-manager = false
 Is the application MultiTaction Site Manager enabled?. More...
 
QString fonts-dir = ""
 If value provided, loads every otf- and ttf- file inside the given directory. More...
 
float fps = std::numeric_limits<float>::quiet_NaN()
 If using ImageMovieWidget as background this is the fps used in that. More...
 
int input-timeout = 15
 How many milliseconds the updates of the touchscreen is waited. More...
 
QString license = ""
 Path to the license file. More...
 
bool minimize = false
 Is the application minimized? More...
 
int minimum-update-frequency = 4
 This attribute acts as a minimum frame rate of the application. More...
 
float rotation = 0.F
 Rotation for the root of the whole widget hierarchy. More...
 
float scale = 1.F
 Scale for the root of the whole widget hierarchy. More...
 
QString screen = ""
 Name of the screen configuration file loaded in initialization. More...
 
bool simultaneous-virtual -input = false
 Whether the virtual input is allowed to be fed simultaneously with the real input to the application. More...
 
QString trace-file = QString ()
 All of the output of Radiant is directed to the file defined by this path. More...
 
Nimble::Vector2f translation = Nimble::Vector2(0.F, 0.F)
 Location for the root of the whole widget hierarchy. More...
 
int update-frequency = 59
 This attribute controls the frame rate of the application. More...
 
bool verbose = false
 If enabled the application will be more verbose. More...
 
QString verbose-modules = QString ()
 List of verbose modules separated with comma (,). More...
 
bool with-input-visualizer = false
 If enabled MultiWidgets::InputVisualizerWidget is created to overlay layer. More...
 
bool with-ripple = false
 If enabled the application has ripple-effect as its overlay. More...
 
- Valuable Attributes inherited from Valuable::Node
Node::Uuid id = generateId()
 Returns the unique id. More...
 

Node Events

[OUT] after-update
 Sent from main thread after the widgets has been updated and AFTER_UPDATE-callbacks are called.
 
[OUT] before-input (int32_t begin, int32_t end)
 Sent from main thread before samples at interval [begin, end] (inclusively) are handled.
 
[OUT] before-sample-input (int32_t frame, float dt)
 Sent from main thread before single sample is processed. dt is the absolute time from the previous sample.
 
[OUT] before-update
 Sent from main thread after input is handled before updating widgets.
 
[IN] css-changed
 Makes the application to reload its style by reading its stylesheet files.
 
[OUT] frame
 Sent from main thread in the beginning of each frame (before input-update-render -loop is started).
 
[IN] gfx-driver-init
 Initializes the graphics subsystem related to the application.
 
[OUT] gfx-driver-inited
 Sent from main thread after the graphics subsystem is initialized.
 
[IN] gfx-driver-stop
 Shuts down the graphics subsystem related to the application.
 
[OUT] gfx-driver-stopped
 Sent from main thread after the graphics subsystem is shut down.
 
[OUT] initialized
 Sent from main thread after the application is succesfully initialized.
 
[IN] reload-signal-handlers
 Called if someone messes with breakpad signal handlers and they need to be reapplied.
 
[OUT] render-complete (Luminous::RenderContext *r, int32_t w)
 Sent after window w in render context r is rendered.
 
[OUT] shutdown
 Called from main thread when the application is about to be destructed (in the beginning of destructor).
 

Public Member Functions

int addFont (const QString &filename)
 Loads the specified font and makes it available to the application. More...
 
template<class Filter >
void addPostProcessFilter ()
 Adds a post process filter to the rendering pipeline. More...
 
void addPostProcessFilter (std::shared_ptr< Luminous::PostProcessFilter > filter)
 Adds a post process filter to the rendering pipeline. More...
 
void addStyleFilename (const QString &filename)
 Adds new CSS file to application. More...
 
 Application ()
 Creates an application object.
 
const QStringList & arguments () const
 Returns the list of extra command line arguments that weren't processed by command line parser. More...
 
const QString & audioConfig () const
 Path to the audio configuration file. More...
 
const QString & audioDevices () const
 Path to the audio devices file which is fed to Resonant::AudioLoop::setDevicesFile. More...
 
const QString & background () const
 If set the background for the whole application is loaded from this path. More...
 
float backgroundFps () const
 If using ImageMovieWidget as background this is the fps used in that. More...
 
const MultiWidgets::WidgetPtrbackgroundLayer ()
 Get the background layer widget. More...
 
const MultiWidgets::WidgetPtrbase ()
 The base widget for the application. More...
 
virtual bool dropEvent (const Radiant::DropEvent &event)
 Used to handle drop events. More...
 
std::shared_ptr
< Resonant::DSPNetwork
dspNetwork ()
 Get a pointer to the DSP network used by the application. More...
 
const std::shared_ptr
< Resonant::DSPNetwork
dspNetwork () const
 
void enableInputVisualization (bool enable)
 Setter for attribute with-input-visualizer. More...
 
void enableRipple (bool enable)
 Setter for attribute with-ripple. More...
 
virtual void eventProcess (const QByteArray &type, Radiant::BinaryData &data)
 An entry point for processing a message to the Application. More...
 
QStringList fontFamilies (int fontId)
 Get a list of font families for the specified font. More...
 
const QString & fontsDir () const
 If value provided, loads every otf- and ttf- file inside the given directory. More...
 
const MultiWidgets::FrameInfoframeInfo () const
 FrameInfo in the current frame.
 
int framesPerSecond () const
 This attribute controls the frame rate of the application. More...
 
const QString & getCSSMedia () const
 Returns the CSS media (file contents). More...
 
std::unique_ptr< GfxDriver > & gfxDriver ()
 Get the graphics driver used to by the application. More...
 
GrabManagergrabManager ()
 Gets the grab manager used by this application. More...
 
const GrabManagergrabManager () const
 
virtual void handleWindowCloseEvent ()
 
virtual void handleWindowIconifyEvent ()
 Handle the event where a window is iconified If the function is overridden, the default implementation should also be called. More...
 
virtual void handleWindowRestoreEvent ()
 Handle the case where a window is restored If the function is overridden, the default implementation should also be called. More...
 
virtual bool init (int &argc, char **argv, std::unique_ptr< MultiWidgets::GfxDriver > gfxDriver=std::unique_ptr< MultiWidgets::GfxDriver >(), bool qtGui=false)
 Initialize the application object, and set up the touch-screen interface and graphics environment. More...
 
virtual bool initGfxContext (Luminous::RenderContext &context)
 Initialize a render context. More...
 
const QString & initialInputConfig () const
 Input configuration file loaded in the initialization of application. More...
 
Radiant::ConfiginputConfig ()
 Returns the input configuration in the form of a Radiant::Config object. More...
 
QString & inputConfigFilename ()
 Returns the name of the tracking configuration file used by the application. More...
 
int inputTimeout () const
 How many milliseconds the updates of the touchscreen is waited. More...
 
bool isDeveloperMode () const
 Is the application using developer mode? In non-developer mode the only keyboard shortcuts are Ctrl+Q for exiting the application, Ctrl+M for minimizing all application windows and Ctrl+F12 for toggling this developer mode. More...
 
bool isDummyTrackerInUse () const
 If enabled the application does not try to use real touchscreen. More...
 
bool isInputVisualized () const
 If enabled MultiWidgets::InputVisualizerWidget is created to overlay layer. More...
 
bool isMinimized () const
 Is the application minimized? More...
 
bool isRippleEnabled () const
 If enabled the application has ripple-effect as its overlay. More...
 
bool isSimultaneousVirtualInputEnabled () const
 Whether the virtual input is allowed to be fed simultaneously with the real input to the application. More...
 
bool isSiteManagerEnabled () const
 Is the application MultiTaction Site Manager enabled?. More...
 
bool isVerbose () const
 If enabled the application will be more verbose. More...
 
const QString & jsConsoleConfig () const
 If set, opens javascript-terminal accessed by telnet to the designated location. More...
 
Scripting::JSContextjsContext ()
 Returns the Javascript context object.
 
virtual bool keyPressEvent (const Radiant::KeyEvent &event)
 Used to handle key-press events. More...
 
virtual bool keyReleaseEvent (const Radiant::KeyEvent &event)
 Used to handle key-release events. More...
 
const QString & licenseFile () const
 Path to the license file. More...
 
Nimble::Vector2f location () const
 Location for the root of the whole widget hierarchy. More...
 
const MultiWidgets::WidgetPtrmainLayer ()
 Get the main layer widget. More...
 
int minFramesPerSecond () const
 This attribute acts as a minimum frame rate of the application. More...
 
void minimize ()
 Minimize the application. More...
 
virtual bool mouseMoveEvent (const Radiant::MouseEvent &event)
 Used to handle mouse move events. More...
 
virtual bool mousePressEvent (const Radiant::MouseEvent &event)
 Used to handle mouse button press events. More...
 
virtual bool mouseReleaseEvent (const Radiant::MouseEvent &event)
 Used to handle mouse button release events. More...
 
virtual bool mouseWheelEvent (const Radiant::MouseEvent &event)
 Used to handle mouse wheel events. More...
 
const MultiWidgets::WidgetPtroverlayLayer ()
 Get the overlay layer widget. More...
 
PerformanceData & performanceData ()
 Get the performance counter of the application. More...
 
const PerformanceData & performanceData () const
 
void processEvents ()
 Processes pending events for the application sent by OS. More...
 
void reloadInputConfiguration ()
 Request the application to reload the input configuration.
 
bool removeFont (int fontId)
 Removes the previously loaded font from the application. More...
 
void removeStyleFilename (const QString &filename)
 Remove one CSS file from the application. More...
 
virtual void render (Luminous::RenderContext &r, const Nimble::Rectf &bounds, int index=0)
 Renders the application, using the given RenderContext object. More...
 
virtual void renderComplete (Luminous::RenderContext &r, const Luminous::MultiHead::Window &window)
 This function gets called by each rendering thread after all rendering is done for one frame. More...
 
void restore ()
 Restore the application. More...
 
float rotation () const
 Rotation for the root of the whole widget hierarchy. More...
 
virtual int run ()
 Runs the application. More...
 
bool saveInputConfigToFile ()
 Saves the current input configuration to the current inputConfigFilename. More...
 
bool saveScreenConfigToFile ()
 Saves the current screen configuration to the current screenConfigFilename. More...
 
float scale () const
 Scale for the root of the whole widget hierarchy. More...
 
const QString & screenConfigFilename () const
 Name of the screen configuration file loaded in initialization. More...
 
void setArguments (const QStringList &arguments)
 Set the command line arguments for the application. More...
 
void setAudioConfig (const QString &conf)
 Setter for attribute audio-config. More...
 
void setAudioDevices (const QString &conf)
 Setter for attribute audio-devices. More...
 
void setBackground (const QString &bg)
 Setter for attribute background. More...
 
void setBackgroundFps (float fps)
 Setter for attribute fps. More...
 
void setCSSMedia (const QString &media)
 Sets the CSS media (CSS file contents) More...
 
void setDeveloperMode (bool developerMode)
 Setter for attribute dev. More...
 
void setFontsDir (const QString &fontsDir)
 Setter for attribute fonts-dir. More...
 
void setFramesPerSecond (int fps)
 Setter for attribute update-frequency. More...
 
void setInputTimeout (int timeout)
 Setter for attribute input-timeout. More...
 
void setIsSiteManagerEnabled (bool enabled)
 Setter for attribute enable-site-manager. More...
 
void setJsConsoleConfig (const QString &conf)
 Setter for attribute console. More...
 
void setLicenseFile (const QString &licenseFile)
 Setter for attribute license. More...
 
void setLocation (const Nimble::Vector2f &loc)
 Setter for attribute translation. More...
 
void setMinFramesPerSecond (int minFps)
 Setter for attribute minimum-update-frequency. More...
 
void setMinimized (bool isMinimized)
 Setter for attribute minimize. More...
 
void setRotation (float rotation)
 Setter for attribute rotation. More...
 
void setScale (float scale)
 Setter for attribute scale. More...
 
void setSimultaneousVirtualInputEnabled (bool enable)
 Setter for attribute simultaneous-virtual-input. More...
 
void setStyleFilenames (const QStringList &filenames)
 Setter for attribute CSS. More...
 
void setTraceFile (const QString &traceFile)
 Setter for attribute trace-file. More...
 
void setVerbose (bool enable)
 Setter for attribute verbose. More...
 
void setVerboseModules (const QString &modules)
 Setter for attribute verbose-modules. More...
 
std::shared_ptr
< Stylish::StyleSheet
style () const
 Returns the current style sheet object. More...
 
const QStringList & styleFilenames () const
 Paths to CSS files to be used for the application. More...
 
virtual bool tabletMoveEvent (const Radiant::TabletEvent &event)
 Used to handle tablet move events. More...
 
virtual bool tabletPressEvent (const Radiant::TabletEvent &event)
 Used to handle tablet press events. More...
 
virtual bool tabletReleaseEvent (const Radiant::TabletEvent &event)
 Used to handle tablet release events. More...
 
virtual bool touchEvent (const Radiant::TouchEvent &event)
 Used to handle window system touch events. More...
 
MultiTouch::ScreentouchScreen ()
 Get the multi-touch tracker API object. More...
 
const MultiTouch::ScreentouchScreen () const
 
const QString & traceFile () const
 All of the output of Radiant is directed to the file defined by this path. More...
 
void updateCmdArguments ()
 Reload any unused command line arguments.
 
const QString & verboseModules () const
 List of verbose modules separated with comma (,). More...
 
virtual ~Application ()
 Deletes the application object.
 
- Public Member Functions inherited from Valuable::Node
bool acceptsEvent (const QByteArray &messageId) const
 Returns true if this object accepts event 'id' in eventProcess.
 
bool addAttribute (Attribute *const attribute)
 Adds a new Attribute to the list of attribute objects. More...
 
bool addAttribute (const QByteArray &name, Attribute *const attribute)
 Adds a new Attribute to the list of attribute objects.
 
template<typename Widget >
bool addAttribute (const QByteArray &name, const Radiant::IntrusivePtr< Widget > &attribute)
 Adds a new Attribute to the list of attribute objects. More...
 
long addListener (const QByteArray &attribute, v8::Persistent< v8::Function > func, int role=Attribute::CHANGE_ROLE)
 Add a JavaScript attribute listener to attribute belonging this Node. More...
 
virtual Attributeattribute (const QByteArray &name) const
 Gets an Attribute with the given name. More...
 
template<typename T >
AttributeT< T > * attribute (const QByteArray &name) const
 Gets an Attribute with the given name. More...
 
const containerattributes () const
 
void clearValues (Layer layer)
 Clears all Attribute values of the given layer. More...
 
void debugDump ()
 Prints the contents of this Attribute to the terminal.
 
virtual bool deserialize (const ArchiveElement &element)
 De-serializes this object (and its children) from a DOM node.
 
void eventAddDeprecated (const QByteArray &deprecatedId, const QByteArray &newId)
 Register a deprecated event that is automatically converted to new event id and a warning is issued when it is used. More...
 
void eventAddIn (const QByteArray &messageId)
 Registers a new event that this class handles in eventProcess.
 
template<typename Widget >
long eventAddListener (const QByteArray &eventId, const QByteArray &messageId, Radiant::IntrusivePtr< Widget > &listener, ListenerType listenerType=DIRECT, const Radiant::BinaryData *defaultData=0)
 Add an event listener to this object. More...
 
long eventAddListener (const QByteArray &eventId, const QByteArray &messageId, Valuable::Node *listener, ListenerType listenerType=DIRECT, const Radiant::BinaryData *defaultData=0)
 Add an event listener to this object. More...
 
long eventAddListener (const QByteArray &eventId, ListenerFuncVoid func, ListenerType listenerType=DIRECT)
 Add an event listener to this object. More...
 
long eventAddListener (const QByteArray &eventId, Node *dstNode, ListenerFuncVoid func, ListenerType listenerType=DIRECT)
 
long eventAddListenerBd (const QByteArray &eventId, Node *dstNode, ListenerFuncBd func, ListenerType listenerType=DIRECT)
 
long eventAddListenerBd (const QByteArray &eventId, ListenerFuncBd func, ListenerType listenerType=DIRECT)
 Add an event listener to this object. More...
 
void eventAddOut (const QByteArray &eventId)
 Registers a new event this class can send with eventSend.
 
const QSet< QByteArray > & eventInNames () const
 Returns set of all registered IN events.
 
unsigned eventListenerCount () const
 Returns the number of event listeners.
 
const QSet< QByteArray > & eventOutNames () const
 Returns set of all registered OUT events.
 
void eventPassingEnable (bool enable)
 Control whether events are passed.
 
template<typename Widget >
int eventRemoveListener (Radiant::IntrusivePtr< Widget > &listener)
 Removes all events from this object to given listener. More...
 
template<typename Widget >
int eventRemoveListener (const QByteArray &eventId=QByteArray(), const QByteArray &messageId=QByteArray(), Radiant::IntrusivePtr< Widget > &listener=Radiant::IntrusivePtr< Widget >())
 Removes events from this object that match the parameters. More...
 
int eventRemoveListener (const QByteArray &eventId=QByteArray(), const QByteArray &messageId=QByteArray(), Valuable::Node *listener=0)
 Removes event listeners from this object. More...
 
int eventRemoveListener (Valuable::Node *listener)
 Removes all events from this object to given listener. More...
 
bool eventRemoveListener (long listenerId)
 Removes event listener with given id. More...
 
void eventSend (const QByteArray &eventId, Radiant::BinaryData &bd)
 Sends an event and bd to all listeners on this eventId.
 
void eventSend (const QByteArray &eventId)
 Sends an event to all listeners on this eventId.
 
template<typename P1 >
void eventSend (const QByteArray &eventId, const P1 &p1)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 , typename P3 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 , typename P3 , typename P4 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 , typename P3 , typename P4 , typename P5 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5)
 Sends an event to all listeners on this eventId. More...
 
unsigned eventSourceCount () const
 Returns the number of event sources.
 
Uuid id () const
 Returns the unique id.
 
bool isBeingDestroyed () const
 Returns true if we are about to delete this object. More...
 
bool loadFromFileXML (const QString &filename)
 Reads this object (and its children) from an XML file.
 
bool loadFromMemoryXML (const QByteArray &buffer)
 Reads this object (and its children) from a memory buffer.
 
 Node (Node *host, const QByteArray &name="", bool transit=false)
 Constructs a new Node and adds it under the given host. More...
 
 Node (Node &&node)
 Moves a node, including all its attributes, events etc. More...
 
Nodeoperator= (Node &&node)
 Moves a node, replacing this. More...
 
virtual bool readElement (const ArchiveElement &element)
 Handles a serialization element that lacks automatic handlers. More...
 
void removeAttribute (Attribute *const attribute)
 Removes an Attribute from the list of attribute objects.
 
bool saveToFileXML (const QString &filename, unsigned int opts=SerializationOptions::DEFAULTS) const
 Saves this object (and its children) to an XML file.
 
bool saveToMemoryXML (QByteArray &buffer, unsigned int opts=SerializationOptions::DEFAULTS) const
 Saves this object (and its children) to binary data buffer.
 
virtual ArchiveElement serialize (Archive &doc) const
 Serializes this object (and its children) to a DOM node.
 
virtual void setAsDefaults ()
 Sets the current USER attribute value as the default value and clears the USER value. More...
 
void setId (Uuid newId)
 Sets the unique id. More...
 
template<class T >
bool setValue (const QByteArray &name, const T &v)
 Uses a query string to find a Attribute, and sets a new value to that if found. More...
 
bool setValue (const QByteArray &name, v8::Handle< v8::Value > v)
 Set attribute value from JavaScript. More...
 
- Public Member Functions inherited from Valuable::Attribute
long addListener (ListenerFunc func, int role=CHANGE_ROLE)
 Adds a listener that is invoked whenever the value is changed. More...
 
long addListener (Node *listener, ListenerFunc func, int role=CHANGE_ROLE)
 Adds a listener that is invoked whenever the value is changed. More...
 
long addListener (v8::Persistent< v8::Function > func, int role=CHANGE_ROLE)
 Adds a JavaScript listener that is invoked whenever the value is changed. More...
 
virtual float asFloat (bool *const ok=0, Layer layer=LAYER_CURRENT) const
 Converts the value object in a floating point number. More...
 
virtual int asInt (bool *const ok=0, Layer layer=LAYER_CURRENT) const
 Converts the value object in an integer. More...
 
virtual QString asString (bool *const ok=0, Layer layer=LAYER_CURRENT) const
 Converts the value object to a string. More...
 
 Attribute (const Attribute &o)
 Create a copy of the given Attribute WITHOUT the link to host, listeners, or the attribute name. More...
 
 Attribute (Node *host, const QByteArray &name, bool transit=false)
 Constructs a new value object and attaches it to its host. More...
 
virtual void clearValue (Layer layer)
 Unsets the value from a specific layer. More...
 
virtual void emitChange ()
 Invokes the change valueChanged function of all listeners.
 
void eventProcessFloat (const char *id, float v)
 Utility function for sending a float message to the object.
 
void eventProcessInt (const char *id, int v)
 Utility function for sending an int message to the object.
 
void eventProcessString (const char *id, const QString &str)
 Utility function for sending string message to the object.
 
void eventProcessString (const char *id, const char *str)
 Utility function for sending string message to the object.
 
void eventProcessVector2 (const char *id, Nimble::Vector2)
 Utility function for sending a Nimble::Vector2f message to the object.
 
void eventProcessVector3 (const char *id, Nimble::Vector3)
 Utility function for sending a Vector3 message to the object.
 
void eventProcessVector4 (const char *id, Nimble::Vector4)
 Utility function for sending a Vector4 message to the object.
 
virtual bool handleShorthand (const Valuable::StyleValue &value, Radiant::ArrayMap< Valuable::Attribute *, Valuable::StyleValue > &expanded)
 If attribute supports shorthand properties, this should be used to parse those. More...
 
Nodehost () const
 The host object of the value object (is any). More...
 
virtual bool isChanged () const
 
virtual bool isValueDefinedOnLayer (Layer layer) const
 Check if the given layer defines a value. More...
 
bool layerForSerialization (SerializationOptions flags, Layer &layer) const
 
const QByteArray & name () const
 Returns the name of the object.
 
const Attributeoperator= (const Attribute &)
 Create a copy of the given Attribute WITHOUT the link to host, listeners, or the attribute name. More...
 
AttributeownerShorthand () const
 
QByteArray path () const
 Returns the path (separated by '/'s) from the root.
 
void removeHost ()
 Sets the host pointer to zero and removes this object from the host. More...
 
bool removeListener (Node *listener, int role=ALL_ROLES)
 Removes a listener from the listener list. More...
 
bool removeListener (long id)
 Removes a listener from the listener list. More...
 
void removeListeners (int role=ALL_ROLES)
 Removes listeners from the listener list.
 
virtual bool set (float v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN)
 Sets the value of the object.
 
virtual bool set (int v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN)
 Sets the value of the object.
 
virtual bool set (const QString &v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN)
 Sets the value of the object.
 
virtual bool set (const Nimble::Vector2f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >())
 Sets the value of the object.
 
virtual bool set (const Nimble::Vector3f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >())
 Sets the value of the object.
 
virtual bool set (const Nimble::Vector4f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >())
 Sets the value of the object.
 
virtual bool set (const StyleValue &value, Layer layer=USER)
 Sets the value of the object.
 
void setName (const QByteArray &s)
 Sets the name of the object.
 
void setOwnerShorthand (Attribute *owner)
 
virtual QByteArray type () const
 Get the type id of the attribute. More...
 
- Public Member Functions inherited from Valuable::Serializable
virtual bool deserializeXML (const DOMElement &element)
 Deserializes (reads) this object from an XML element. More...
 
bool isSerializable () const
 
void setSerializable (bool v)
 

Static Public Member Functions

static void addInitCallback (std::function< bool(Application &app)> func)
 Add a callback function to be run in Application::init. More...
 
static Applicationinstance ()
 Returns a reference to the global application instance.
 
static ApplicationinstancePtr ()
 Returns a pointer to the global application instance.
 
static bool isTimeToQuit ()
 Returns true if the application should quit.
 
static void quit ()
 Instructs the application to quit.
 
static QString versionString (VersionType type=FULL)
 Get the Cornerstone version string. More...
 
- Static Public Member Functions inherited from Valuable::Node
static bool copyValues (const Node &from, Node &to)
 Copies attribute values from one node to another. More...
 
static void disableQueue ()
 Disables all AFTER_UPDATE event processing, no new events will be accepted and the current queue will be cleared. More...
 
static Uuid generateId ()
 Generates a unique identifier. More...
 
static void invokeAfterUpdate (ListenerFuncVoid function)
 Queue function to be called in the main thread after the next update() More...
 
static int processQueue ()
 Triggers any pending AFTER_UPDATE-events. More...
 
static void reEnableQueue ()
 Enables queue after calling disableQueue. More...
 
static void setFatalOnEventMismatch (bool haltApplication)
 Controls what to do when an event mismatch is detected The default behavior is to output a warning to the terminal (haltApplication = false). More...
 

Protected Member Functions

virtual void input (float dt)
 Runs the input logic for a single input sample.
 
void processInput ()
 Fetches the samples from touch screens and processes them. More...
 
virtual void update (const MultiWidgets::FrameInfo &frameInfo)
 Update the application state. More...
 
- Protected Member Functions inherited from Valuable::Node
virtual void attributeAdded (Attribute *attribute)
 This is called when new attribute is added to Node. More...
 
virtual void attributeRemoved (Attribute *attribute)
 This is called when attribute is removed from Node. More...
 
Nodesender ()
 Get the sender of the event, only valid in DIRECT events. More...
 
void setBeingDestroyed ()
 Sets 'isBeginDestroyed' flag to true and removes all event listeners to this object. More...
 
- Protected Member Functions inherited from Valuable::Attribute
virtual void emitDelete ()
 Invokes the change valueDeleted function of all listeners.
 

Friends

class Application::D
 
class CaptureQtApplicationCloseEvents
 
class RenderThread
 
class ThreadedGfxDriver
 

Detailed Description

Base class for writing new applications.

Application can be used as such, by adding proper widgets to it, or by extending it via inheritance. To use the application, you need create one application object - either a Application object directly, or some class derived from it. Application has an internal pointer to the application instance which is used by the other run-time components for the input-, update-, and rendering callbacks.

Application is a platform-independent class, that manages touchscreen and OpenGL resources. These resources are handled by Driver classes, that are platform-specific, and internal to the MultiWidgets library.

It should be noted that in general one does not need to create a custom application class. It is recommended to write all the functionality into widget plugins. With that approach it is easier to mix widgets from different projects and create new applications with fast prototyping approach.

See application attributes for command line arguments

Examples:
AdvancedRenderingExample.cpp, AnimationExample.cpp, AnimatorExample.cpp, AttributesExample.cpp, AutoRotateExample.cpp, BookExample.cpp, ButtonExample.cpp, CustomInputWidgetExample.cpp, CustomKeyboardLayoutExample.cpp, CustomRenderWidgetExample.cpp, DropHandlerExample.cpp, EventsExample.cpp, HelloImagesExample.cpp, HelloWorldExample.cpp, ImageMovieExample.cpp, InputFlagsExample.cpp, LegacyGLExample.cpp, MarkerExample.cpp, PenExample.cpp, PluginExample.cpp, PositionalSoundsExample.cpp, PostProcessingExample.cpp, SamplePlayerExample.cpp, TextRenderingExample.cpp, ViewExample.cpp, VirtualInputExample.cpp, WebBrowserExample.cpp, and Widget3DExample.cpp.

Member Enumeration Documentation

Version string type.

Enumerator
FULL 

Full version string, including build time and platform.

VERSION_ONLY 

Only version number, without build info.

VERSION_MAJOR 

Major version number only.

VERSION_MINOR 

Minor version number only.

VERSION_PATCH 

Patch version number only.

VERSION_GIT_HASH 

Git hash.

Member Function Documentation

int MultiWidgets::Application::addFont ( const QString &  filename)

Loads the specified font and makes it available to the application.

Parameters
filenamefilename of the font to load
Returns
font id that can be used to remove the font later
See Also
removeFont, fontFamilies
static void MultiWidgets::Application::addInitCallback ( std::function< bool(Application &app)>  func)
static

Add a callback function to be run in Application::init.

This function can be used to add custom initialization functions to be called from Application::init

Parameters
funccallback function to call
template<class Filter >
void MultiWidgets::Application::addPostProcessFilter ( )
inline

Adds a post process filter to the rendering pipeline.

Filters can be added at any time outside the render thread and the filter will be active beginning from the next frame. Filters are applied based on their order attribute. Two filters with the same order attribute are applied in the order they are inserted.

See Also
Luminous::PostProcessFilter.
Template Parameters
FilterType of the filter to add
Examples:
PostProcessingExample.cpp.
void MultiWidgets::Application::addPostProcessFilter ( std::shared_ptr< Luminous::PostProcessFilter filter)

Adds a post process filter to the rendering pipeline.

Filters can be added at any time outside the render thread and the filter will be active beginning from the next frame. Filters are applied based on their order attribute. Two filters with the same order attribute are applied in the order they are inserted.

See Also
Luminous::PostProcessFilter.
Template Parameters
FilterType of the filter to add
void MultiWidgets::Application::addStyleFilename ( const QString &  filename)

Adds new CSS file to application.

Parameters
filenamepath to CSS file
Examples:
AttributesExample.cpp, ButtonExample.cpp, EventsExample.cpp, InputFlagsExample.cpp, TextRenderingExample.cpp, and WebBrowserExample.cpp.
const QStringList& MultiWidgets::Application::arguments ( ) const

Returns the list of extra command line arguments that weren't processed by command line parser.

Returns
List of unprocessed command line arguments
const QString & MultiWidgets::Application::audioConfig ( ) const

Path to the audio configuration file.

See Also
setAudioconfig
Returns
Current value of the audio-config attribute
const QString & MultiWidgets::Application::audioDevices ( ) const

Path to the audio devices file which is fed to Resonant::AudioLoop::setDevicesFile.

See Also
setAudioDevices
Returns
Current value of the audio-devices attribute
const QString& MultiWidgets::Application::background ( ) const

If set the background for the whole application is loaded from this path.

If This points to the file it is loaded with Mime-class. If this points to the directory the images of the directory are cycled with ImageMovieWidget using fps as frame rate. Plugins can be loaded as the background by having prefix "plugin:" in the string. For example:

./MyApp --background plugin:cornerstone.champagne
float MultiWidgets::Application::backgroundFps ( ) const

If using ImageMovieWidget as background this is the fps used in that.

Returns
Current value of the fps attribute
const MultiWidgets::WidgetPtr& MultiWidgets::Application::backgroundLayer ( )

Get the background layer widget.

The background layer is placed behind the main layer in the widget hierarchy. Typically it acts as a container for different backgrounds effects, animations, etc.

Returns
the background layer widget
See Also
mainLayer
overlayLayer
base
const MultiWidgets::WidgetPtr& MultiWidgets::Application::base ( )

The base widget for the application.

The base widget is the root of the widget hiearchy. Typically you do not add widgets to the base widget directly, but to the various layer widgets that are children of the base widget.

Returns
the base widget
See Also
mainLayer
backgroundLayer
overlayLayer
virtual bool MultiWidgets::Application::dropEvent ( const Radiant::DropEvent event)
virtual

Used to handle drop events.

Parameters
eventEvent to be handled
std::shared_ptr<Resonant::DSPNetwork> MultiWidgets::Application::dspNetwork ( )

Get a pointer to the DSP network used by the application.

This allows access to the audio system.

Returns
pointer to the DSP network object
void MultiWidgets::Application::enableInputVisualization ( bool  enable)

Setter for attribute with-input-visualizer.

See Also
isInputVisualized
Parameters
enablenew attribute value
void MultiWidgets::Application::enableRipple ( bool  enable)

Setter for attribute with-ripple.

See Also
isRippleEnabled
Parameters
enablenew attribute value
virtual void MultiWidgets::Application::eventProcess ( const QByteArray &  type,
Radiant::BinaryData data 
)
virtual

An entry point for processing a message to the Application.

Parameters
typeName of the event
dataData associated to the event

Reimplemented from Valuable::Attribute.

QStringList MultiWidgets::Application::fontFamilies ( int  fontId)

Get a list of font families for the specified font.

Parameters
fontIdfont id to list families for
Returns
list of font families
See Also
addFont, removeFont
const QString & MultiWidgets::Application::fontsDir ( ) const

If value provided, loads every otf- and ttf- file inside the given directory.

See Also
setFontsDir
Returns
Current value of the fonts-dir attribute
int MultiWidgets::Application::framesPerSecond ( ) const

This attribute controls the frame rate of the application.

Note
The value of this attribute is requested frame rate, not the guaranteed. If processing takes too much time, the actual frame rate can be lower.
See Also
setFramesPerSecond
Returns
Current value of the update-frequency attribute
const QString& MultiWidgets::Application::getCSSMedia ( ) const

Returns the CSS media (file contents).

Returns
CSS media used in parsing the style
std::unique_ptr<GfxDriver>& MultiWidgets::Application::gfxDriver ( )

Get the graphics driver used to by the application.

Returns
graphics driver used by the application
GrabManager& MultiWidgets::Application::grabManager ( )

Gets the grab manager used by this application.

Returns
grab manager used by the application
virtual void MultiWidgets::Application::handleWindowIconifyEvent ( )
virtual

Handle the event where a window is iconified If the function is overridden, the default implementation should also be called.

virtual void MultiWidgets::Application::handleWindowRestoreEvent ( )
virtual

Handle the case where a window is restored If the function is overridden, the default implementation should also be called.

virtual bool MultiWidgets::Application::init ( int &  argc,
char **  argv,
std::unique_ptr< MultiWidgets::GfxDriver gfxDriver = std::unique_ptr< MultiWidgets::GfxDriver >(),
bool  qtGui = false 
)
virtual

Initialize the application object, and set up the touch-screen interface and graphics environment.

Parameters
argcNumber of command line arguments.
argvValues of command line arguments.
gfxDriverGraphics driver for the cornerstone rendering.
qtGuiDo we initialize QT GUI. It is initialized if this is true or graphics driver needs GUI.
Examples:
AdvancedRenderingExample.cpp, AnimationExample.cpp, AnimatorExample.cpp, AttributesExample.cpp, AutoRotateExample.cpp, BookExample.cpp, ButtonExample.cpp, CustomInputWidgetExample.cpp, CustomKeyboardLayoutExample.cpp, CustomRenderWidgetExample.cpp, DropHandlerExample.cpp, EventsExample.cpp, HelloImagesExample.cpp, HelloWorldExample.cpp, ImageMovieExample.cpp, InputFlagsExample.cpp, LegacyGLExample.cpp, MarkerExample.cpp, PenExample.cpp, PluginExample.cpp, PositionalSoundsExample.cpp, PostProcessingExample.cpp, SamplePlayerExample.cpp, TextRenderingExample.cpp, ViewExample.cpp, VirtualInputExample.cpp, WebBrowserExample.cpp, and Widget3DExample.cpp.
virtual bool MultiWidgets::Application::initGfxContext ( Luminous::RenderContext context)
virtual

Initialize a render context.

This function gets called by every rendering thread when the rendering thread is initialized. It allows you to perform any custom initialization that might depend on a valid OpenGL context. Note that if you override this function you must call the base implementation and your function must be thread-safe!

Parameters
contextrender context associated with the rendering thread
Returns
true on success; otherwise false
const QString & MultiWidgets::Application::initialInputConfig ( ) const

Input configuration file loaded in the initialization of application.

By default this is config.txt which is located in Windows in "%APPDATA%\MultiTouch" -directory and in Unix in "~/.MultiTouch" -directory.

Returns
Current value of the config attribute
Radiant::Config& MultiWidgets::Application::inputConfig ( )

Returns the input configuration in the form of a Radiant::Config object.

Returns
Configuration of the input
QString& MultiWidgets::Application::inputConfigFilename ( )

Returns the name of the tracking configuration file used by the application.

Returns
name of the tracking configuration file
int MultiWidgets::Application::inputTimeout ( ) const

How many milliseconds the updates of the touchscreen is waited.

If touchscreen uses NetBridge the default waiting time is 0 milliseconds.

See Also
setInputTimeout
Returns
Current value of the input-timeout attribute
bool MultiWidgets::Application::isDeveloperMode ( ) const

Is the application using developer mode? In non-developer mode the only keyboard shortcuts are Ctrl+Q for exiting the application, Ctrl+M for minimizing all application windows and Ctrl+F12 for toggling this developer mode.

This is the same as –dev command line argument.

Returns
Current value of the dev attribute
bool MultiWidgets::Application::isDummyTrackerInUse ( ) const

If enabled the application does not try to use real touchscreen.

Returns
Current value of the dummy attribute
bool MultiWidgets::Application::isInputVisualized ( ) const

If enabled MultiWidgets::InputVisualizerWidget is created to overlay layer.

See Also
enableInputVisualization
Returns
Current value of the with-input-visualizer attribute
bool MultiWidgets::Application::isMinimized ( ) const

Is the application minimized?

Returns
Current value of the minimize attribute
bool MultiWidgets::Application::isRippleEnabled ( ) const

If enabled the application has ripple-effect as its overlay.

Returns
Current value of the with-ripple attribute
bool MultiWidgets::Application::isSimultaneousVirtualInputEnabled ( ) const

Whether the virtual input is allowed to be fed simultaneously with the real input to the application.

This is needed for avoiding the duplication of the input when using native touch capabilites of some platforms, since the touch is usually forwarded as mouse clicks to the applications.

See Also
setSimultaneousVirtualInputEnabled
Returns
Current value of the simultaneous-virtual-input attribute
bool MultiWidgets::Application::isSiteManagerEnabled ( ) const

Is the application MultiTaction Site Manager enabled?.

If true, the application can be monitored and managed using MultiTaction Site Manager software.

See Also
setIsSiteManagerEnabled
Returns
Current value of the enable-site-manager attribute
bool MultiWidgets::Application::isVerbose ( ) const

If enabled the application will be more verbose.

See Also
setVerbose
Returns
Current value of the verbose attribute
const QString & MultiWidgets::Application::jsConsoleConfig ( ) const

If set, opens javascript-terminal accessed by telnet to the designated location.

The format of this string is [hostname:]port

See Also
setJsConsoleConfig
Returns
Current value of the console attribute
virtual bool MultiWidgets::Application::keyPressEvent ( const Radiant::KeyEvent event)
virtual

Used to handle key-press events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::keyReleaseEvent ( const Radiant::KeyEvent event)
virtual

Used to handle key-release events.

Parameters
eventEvent to be handled
const QString & MultiWidgets::Application::licenseFile ( ) const

Path to the license file.

Returns
Current value of the license attribute
Nimble::Vector2f MultiWidgets::Application::location ( ) const

Location for the root of the whole widget hierarchy.

See Also
setLocation
Returns
Current value of the translation attribute
int MultiWidgets::Application::minFramesPerSecond ( ) const

This attribute acts as a minimum frame rate of the application.

If the actual frame rate drops below the updates are calculated pretending this to be the actual frame rate.

See Also
setMinFramesPerSecond
Returns
Current value of the minimum-update-frequency attribute
void MultiWidgets::Application::minimize ( )

Minimize the application.

See Also
isMinimized()
setMinimized()
virtual bool MultiWidgets::Application::mouseMoveEvent ( const Radiant::MouseEvent event)
virtual

Used to handle mouse move events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::mousePressEvent ( const Radiant::MouseEvent event)
virtual

Used to handle mouse button press events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::mouseReleaseEvent ( const Radiant::MouseEvent event)
virtual

Used to handle mouse button release events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::mouseWheelEvent ( const Radiant::MouseEvent event)
virtual

Used to handle mouse wheel events.

Parameters
eventEvent to be handled
const MultiWidgets::WidgetPtr& MultiWidgets::Application::overlayLayer ( )

Get the overlay layer widget.

The overlay layer is placed in front of the main layer. It can be used to overlay effects on top of the application, like debugging visualizations.

Returns
overlay layer widget
See Also
mainLayer
backgroundLayer
base
PerformanceData& MultiWidgets::Application::performanceData ( )

Get the performance counter of the application.

Returns
performance counter
void MultiWidgets::Application::processEvents ( )

Processes pending events for the application sent by OS.

This is not required to be called unless Application is not run is run is not called but application is executed manually. Processes Qt events for the application.

Note
this can be only called in the main thread
void MultiWidgets::Application::processInput ( )
protected

Fetches the samples from touch screens and processes them.

Practically handles the connections to the touchscreens and calls of Application::input .

bool MultiWidgets::Application::removeFont ( int  fontId)

Removes the previously loaded font from the application.

Parameters
fontIdfont id to remove
Returns
true if the font was unloaded; otherwise false
See Also
addFont, fontFamilies
void MultiWidgets::Application::removeStyleFilename ( const QString &  filename)

Remove one CSS file from the application.

Parameters
filenamepath to CSS file
virtual void MultiWidgets::Application::render ( Luminous::RenderContext r,
const Nimble::Rectf bounds,
int  index = 0 
)
virtual

Renders the application, using the given RenderContext object.

This function must be thread-safe, to support multi-threaded rendering.

Parameters
ractive render context
boundsbounding box of the drawn area in graphics coordinates
indexindex of the calling rendering thread
virtual void MultiWidgets::Application::renderComplete ( Luminous::RenderContext r,
const Luminous::MultiHead::Window window 
)
virtual

This function gets called by each rendering thread after all rendering is done for one frame.

Parameters
ractive render context
windowwindow configuration associated with the calling rendering thread
void MultiWidgets::Application::restore ( )

Restore the application.

See Also
isMinimized()
setMinimized()
float MultiWidgets::Application::rotation ( ) const

Rotation for the root of the whole widget hierarchy.

See Also
setRotation
bool MultiWidgets::Application::saveInputConfigToFile ( )

Saves the current input configuration to the current inputConfigFilename.

Returns
Was the save succesful
bool MultiWidgets::Application::saveScreenConfigToFile ( )

Saves the current screen configuration to the current screenConfigFilename.

Returns
Was the save succesful
float MultiWidgets::Application::scale ( ) const

Scale for the root of the whole widget hierarchy.

See Also
setScale
const QString & MultiWidgets::Application::screenConfigFilename ( ) const

Name of the screen configuration file loaded in initialization.

By default this is screen.xml which is located in Windows in "%APPDATA%\MultiTouch" -directory and in Unix in "~/.MultiTouch" -directory.

Returns
Current value of the screen attribute
void MultiWidgets::Application::setArguments ( const QStringList &  arguments)

Set the command line arguments for the application.

Typically these are handled automatically by Application::init. This function can be used to override the arguments.

Parameters
argumentscommand line arguments
void MultiWidgets::Application::setAudioConfig ( const QString &  conf)

Setter for attribute audio-config.

See Also
audioConfig
Parameters
confnew attribute value
void MultiWidgets::Application::setAudioDevices ( const QString &  conf)

Setter for attribute audio-devices.

See Also
audioDevices
Parameters
confnew attribute value
void MultiWidgets::Application::setBackground ( const QString &  bg)

Setter for attribute background.

Parameters
bgnew attribute value
void MultiWidgets::Application::setBackgroundFps ( float  fps)

Setter for attribute fps.

See Also
backgroundFps
Parameters
fpsnew attribute value
void MultiWidgets::Application::setCSSMedia ( const QString &  media)

Sets the CSS media (CSS file contents)

Parameters
mediaCSS media used in parsing the style
void MultiWidgets::Application::setDeveloperMode ( bool  developerMode)

Setter for attribute dev.

Parameters
developerModenew attribute value
void MultiWidgets::Application::setFontsDir ( const QString &  fontsDir)

Setter for attribute fonts-dir.

See Also
fontsDir
Parameters
fontsDirnew attribute value
void MultiWidgets::Application::setFramesPerSecond ( int  fps)

Setter for attribute update-frequency.

See Also
framesPerSecond
Parameters
fpsnew attribute value
void MultiWidgets::Application::setInputTimeout ( int  timeout)

Setter for attribute input-timeout.

See Also
inputTimeout
Parameters
timeoutnew attribute value
void MultiWidgets::Application::setIsSiteManagerEnabled ( bool  enabled)

Setter for attribute enable-site-manager.

See Also
isSiteManagerEnabled
Parameters
enablednew attribute value
void MultiWidgets::Application::setJsConsoleConfig ( const QString &  conf)

Setter for attribute console.

See Also
jsConsoleConfig
Parameters
confnew attribute value
void MultiWidgets::Application::setLicenseFile ( const QString &  licenseFile)

Setter for attribute license.

Parameters
licenseFilenew attribute value
void MultiWidgets::Application::setLocation ( const Nimble::Vector2f loc)

Setter for attribute translation.

See Also
location
Parameters
locnew attribute value
void MultiWidgets::Application::setMinFramesPerSecond ( int  minFps)

Setter for attribute minimum-update-frequency.

See Also
minFramesPerSecond
Parameters
minFpsnew attribute value
void MultiWidgets::Application::setMinimized ( bool  isMinimized)

Setter for attribute minimize.

Parameters
isMinimizednew attribute value
void MultiWidgets::Application::setRotation ( float  rotation)

Setter for attribute rotation.

See Also
rotation
Parameters
rotationnew attribute value
void MultiWidgets::Application::setScale ( float  scale)

Setter for attribute scale.

See Also
scale
Parameters
scalenew attribute value
void MultiWidgets::Application::setSimultaneousVirtualInputEnabled ( bool  enable)

Setter for attribute simultaneous-virtual-input.

See Also
isSimultaneousVirtualInputEnabled
Parameters
enablenew attribute value
void MultiWidgets::Application::setStyleFilenames ( const QStringList &  filenames)

Setter for attribute CSS.

See Also
styleFilename
Parameters
filenamesnew attribute value
void MultiWidgets::Application::setTraceFile ( const QString &  traceFile)

Setter for attribute trace-file.

See Also
traceFile
Parameters
traceFilenew attribute value
void MultiWidgets::Application::setVerbose ( bool  enable)

Setter for attribute verbose.

See Also
isVerbose
Parameters
enablenew attribute value
void MultiWidgets::Application::setVerboseModules ( const QString &  modules)

Setter for attribute verbose-modules.

See Also
verboseModules
Parameters
modulesnew attribute value
std::shared_ptr<Stylish::StyleSheet> MultiWidgets::Application::style ( ) const

Returns the current style sheet object.

Returns
StyleSheet for the whole application
const QStringList & MultiWidgets::Application::styleFilenames ( ) const

Paths to CSS files to be used for the application.

See Also
setStylefilename
Returns
Current value of the CSS attribute
virtual bool MultiWidgets::Application::tabletMoveEvent ( const Radiant::TabletEvent event)
virtual

Used to handle tablet move events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::tabletPressEvent ( const Radiant::TabletEvent event)
virtual

Used to handle tablet press events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::tabletReleaseEvent ( const Radiant::TabletEvent event)
virtual

Used to handle tablet release events.

Parameters
eventEvent to be handled
virtual bool MultiWidgets::Application::touchEvent ( const Radiant::TouchEvent event)
virtual

Used to handle window system touch events.

Parameters
eventEvent to be handled
MultiTouch::Screen& MultiWidgets::Application::touchScreen ( )

Get the multi-touch tracker API object.

This function returns the tracker object used by the application.

Returns
tracker API used by the application
const QString & MultiWidgets::Application::traceFile ( ) const

All of the output of Radiant is directed to the file defined by this path.

See Also
setTraceFile
Returns
Current value of the trace-file attribute
virtual void MultiWidgets::Application::update ( const MultiWidgets::FrameInfo frameInfo)
protectedvirtual

Update the application state.

This function gets called periodically to update the application state. The default implementation propagates the update call to the widget hierarchy.

Parameters
frameInfoframe information about elapsed time
const QString & MultiWidgets::Application::verboseModules ( ) const

List of verbose modules separated with comma (,).

See Also
setVerboseModules
Returns
Current value of the verbose-modules attribute
static QString MultiWidgets::Application::versionString ( VersionType  type = FULL)
static

Get the Cornerstone version string.

Parameters
typeversion string type to get
Returns
Cornerstone version of requested type