SessionChangeNotifier Class Reference

The SessionChangeNotifier JavaScript class. Execute client code upon session change events. More...

Public Slots

void disconnectAll ()
 Disconnect all signals, to stop callback invocation. More...
 

Signals

void saveSuccessful ()
 Signal emitted when the project has been saved. More...
 

Public Member Functions

 SessionChangeNotifier (QObject parent)
 Create a new SessionChangeNotifier. More...
 

Detailed Description

The SessionChangeNotifier JavaScript class. Execute client code upon session change events.

User can connect a function to any available signal from this class. Once a function is connected to a signal, the client code will be executed when the specific event is triggered in the session, until the parent object is destroyed.

Constructor & Destructor Documentation

◆ SessionChangeNotifier()

SessionChangeNotifier::SessionChangeNotifier ( QObject  parent)

Create a new SessionChangeNotifier.

Parameters
parentThe parent object, controlling the newly created object life duration.
Note
It's important that the parent object is valid, and will exist as long as the callback receiver. If the callback receiver will be destroyed before the parent of the SessionChangeNotifier, disconnectAll() should be called to avoid crashes or unexpected behaviours.
var dialog = UiLoader.load( "myDialog.ui");
var myNotifier = new SessionChangeNotifier(dialog);

Member Function Documentation

◆ disconnectAll

void SessionChangeNotifier::disconnectAll ( )
slot

Disconnect all signals, to stop callback invocation.

myNotifier.disconnectAll();

◆ saveSuccessful

void SessionChangeNotifier::saveSuccessful ( )
signal

Signal emitted when the project has been saved.

myNotifier.saveSuccessful.connect( function()
{
//Code your callback logic here...
MessageLog.trace("saveSuccessful Callback!");
});