This class defines the API for the project explorer object.
#include <projectexplorer.h>
◆ closeProject
bool closeProject |
( |
Project * | pProject | ) |
|
|
slot |
Closes the given project. The project is removed from the ProjectExplorer.
- Parameters
-
pProject | The project handle. |
- Returns
- True if the closing was successful.
◆ connectProject
int connectProject |
( |
Project * | pProject | ) |
|
|
slot |
Connects the given project with the device drivers (the ComObjects). Furthermore, Script objects included in the project, will call their connect functions (if they exists). Be aware of sending messages to other Objects or calling functions of other objects in this function. Since the Objects gets connected one by one, it can happen, that the other Object is not connected to this time. It can work, but on next program run, the scheduler from the operating system can call the connect() functions in a different order. It is better to use the start() function for this.
function connect()
{
trace("This function is called when the project is connected");
}
- Parameters
-
pProject | The project handle |
- Returns
- The new number of connected projects
◆ disconnectProject
int disconnectProject |
( |
Project * | pProject | ) |
|
|
slot |
Disconnects the given project from the device drivers (the ComObjects). On disconnecting, no special code is executed in the included ScriptObjects.
- Parameters
-
pProject | The project handle |
- Returns
- The new number of connected projects
◆ openProject
Project * openProject |
( |
QString | strProject | ) |
|
|
slot |
Opens the given project. The project is shown in the ProjectExplorer, but not connected nor started.
- Parameters
-
strProject | The full qualified name of the project file (*.klp) |
- Returns
- The project handle.
◆ readProjectSettings()
void readProjectSettings |
( |
Project * | pProject | ) |
|
Forces a project to read its settings from the project file (*.klp). This is useful only for automatically changed but already loaded projects.
- Parameters
-
pProject | The project handle |
◆ startProject
void startProject |
( |
Project * | pProject | ) |
|
|
slot |
Starts the given project. That means, Script objects included in the project, will call their start functions (if they exists).
function start()
{
trace("This function is called when the project is starting");
}
- Parameters
-
pProject | The project handle. |
◆ stopProject
void stopProject |
( |
Project * | pProject | ) |
|
|
slot |
Stops the given project. That means, Script objects included in the project, will call their stop functions (if they exists).
function stop()
{
trace("This function is called when the project is stopping");
}
- Parameters
-
pProject | The project handle. |