COLNEO Pro 1.0
Loading...
Searching...
No Matches
ApplicationAPIabstract

Description

Interface for Application API.

Register Javascript object with cnApplicationAPI.

Since
1.0, 2025

Functions

INFO
ApiJsonResponse getInfo ()
 
USER MANAGEMENT
ApiJsonResponse getUser ()
 
ApiJsonResponse loginUser (QString userid, QString authcode)=0
 
ApiJsonResponse logoutUser ()=0
 
ApiJsonResponse getAccessToken ()
 

Public Member Functions

ApiJsonResponse getAvailableLanguages ()
 
ApiJsonResponse getRecentProjects ()
 
ApiJsonResponse getTemplates ()
 
ApiJsonResponse removeFromRecentProjects (QString &filename)
 
Constructors, Destructor
Interface IApiObject

SETTINGS

ApiJsonResponse setSettings (QVariantMap map)
 
ApiJsonResponse getSettingsValue (QString key, bool fallbackToDefault=true)
 
ApiJsonResponse getSettingsDefaultValue (QString key)
 
ApiJsonResponse setSettingsValue (QString key, QVariant &v)
 
ApiJsonResponse getSettingsSupportedKeys ()
 
ApiJsonResponse resetSettings ()
 
ApiJsonResponse resetSettingsValue (QString key)
 
ApiJsonResponse getSettings ()
 

Function Documentation

◆ getAccessToken

ApiJsonResponse getAccessToken ( )
slot

Get Access Token of logged in user.
The user is asked to confirm access to the access token in a dialog.

Returns
status: 403 // access denied
status: 404 // user not logged in
status: 200
data : "hbGciOiJIUzI1NiIsInR5cCI6 ... IUzI1NiIsInR" // access token
Since
1.0, Apr 2025

◆ getAvailableLanguages()

ApiJsonResponse getAvailableLanguages ( )

Get languages which are supported by this application.

Returns
data : List of language codes / list<string>
Since
1.0, 12.2025, jh

◆ getInfo

ApiJsonResponse getInfo ( )
slot

Usable in scripted properties

Get application information.

Returns
data : {
name : "colneopro",
displayName : "COLNEO pro", // not available for COLNEO console
version : "1.0.0",
build : "123",
builddate : "2024-11-01",
organization: "COLNEO GmbH",
domain : "www.colneo.com",
dirPath : "C:/Software/Colneo"
}
Since
1.0, Dec 2024

◆ getRecentProjects()

ApiJsonResponse getRecentProjects ( )
Since
1.0, 11.2025

◆ getSettings

ApiJsonResponse getSettings ( )
slot

Usable in scripted properties

Get application setting.

Returns
data : {
"key" : value,
...
}
Since
1.0, May 2025

◆ getSettingsDefaultValue()

ApiJsonResponse getSettingsDefaultValue ( QString key)
Note
Usable with script properties

Get application settings default value.

Returns
data : value
Since
1.0, May 2025

◆ getSettingsSupportedKeys()

ApiJsonResponse getSettingsSupportedKeys ( )

Usable in scripted properties

Get list of application setting supported keys.

Returns
data : [ ... ] // list of strings
Since
1.0, 07.2025

◆ getSettingsValue()

ApiJsonResponse getSettingsValue ( QString key,
bool fallbackToDefault = true )

Usable in scripted properties

Get application settings value.

Returns
data : value
Since
1.0, May 2025

◆ getTemplates()

ApiJsonResponse getTemplates ( )

Get project templates.

Returns
{
data: []
}
Since
1.0

◆ getUser

ApiJsonResponse getUser ( )
slot

Usable in scripted properties

Get data of the user currently logged in.

Since the user is identified by email 'userid' and 'email' are equvivalent.

Returns

status : 200
data :
{
"userid" : " ... ", // = email
"email" : " ... ", // = userid
"name" : " ... ",
"avatar" : "base64, ..."
}
status : 404 // user not found or not valid
Since
1.0, Apr 2025

◆ loginUser

ApiJsonResponse loginUser ( QString userid,
QString authcode )
pure virtualslot

Login user using an authentication code.

Returns
{
}
Since
1.0, 10.2025, jh

◆ logoutUser

ApiJsonResponse logoutUser ( )
pure virtualslot

Logout user.

Since
1.0, 10.2025, jh

◆ removeFromRecentProjects()

ApiJsonResponse removeFromRecentProjects ( QString & filename)

Removes a recent project with the given filename from the recent project list

Returns
success message or error code
{
}
Since
1.0.0, ...

◆ resetSettings()

ApiJsonResponse resetSettings ( )

Usable in scripted properties

Reset settings to default values. Values of settings without defaiult value are not changed.

Returns
data :
Since
1.0, 07.2025, jh

◆ resetSettingsValue()

ApiJsonResponse resetSettingsValue ( QString key)

Reset a settings key to defualt value.

◆ setSettings()

ApiJsonResponse setSettings ( QVariantMap map)
Note
Usable with script properties

set application settings.

Returns
data : {
"key" : value,
...
}
Since
1.0, May 2025

◆ setSettingsValue()

ApiJsonResponse setSettingsValue ( QString key,
QVariant & v )

Usable in scripted properties

Set application settings value for given key.

Returns
data : {
"key" : value
}
Since
1.0, May 2025