COLNEO Pro 1.2
Loading...
Searching...
No Matches
GuiAPI

Description

GUI API interface.

Access to elements in the graphical user interface.
Object name: cnGuiAPI.

Remarks
This API is not available in COLNEO console.
Since
1.0, 05.2025

Functions

ApiJsonResponse getMarkedItemsObjectIds (QStringList &domains)
ApiJsonResponse runClashRun (QString &id)
TREE VIEWS
ApiJsonResponse getDynamicColumns (QString &domainCode, QString &window)
ApiJsonResponse setDynamicColumns (QString &domainCode, QString &window, QStringList &columns)
STARTPAGE
ApiJsonResponse openStartPage ()
ApiJsonResponse closeStartPage ()
INFOHUB
ApiJsonResponse showLoginDialog ()
ApiJsonResponse showConnectDialog ()
ApiJsonResponse syncCoordinationModel ()
PROJECT
ApiJsonResponse newProject ()
ApiJsonResponse openProject (QString filepath=QString())
ApiJsonResponse saveProject ()
ApiJsonResponse saveProjectAs ()
ApiJsonResponse archiveProject ()
ApiJsonResponse importFiles ()
WEBMODULES
ApiJsonResponse openUrl (QString &url, QString &target=QString())
ApiJsonResponse selectFile (QString &initialDirectory=QString())
3D VIEWER
ApiJsonResponse createViewpoint ()
MENU BAR
ApiJsonResponse menuBarSetConfiguration (QVariantMap configuration)
ApiJsonResponse menuBarGetConfiguration ()
ApiJsonResponse menuBarReset ()
ACTIONS
ApiJsonResponse getAvailableActions ()
ApiJsonResponse triggerAction (QString &actionName, QVariantMap &params=QVariantMap())

Events

SIGNALS/NOTIFICATIONS
 markedItemsChanged (QStringList domain, QStringList addedObjectIds, QStringList removedObjectIds)

Public Member Functions

 setObjectTreeSelectionModels (ObjectTreeSelectionModels &objectTreeSelectionModels)
Interface IApiObject

Function Documentation

◆ archiveProject

ApiJsonResponse archiveProject ( )
slot

Show dialog to archgive project as cnpzip.

Since
1.1, 03.2026, jh

◆ closeStartPage

ApiJsonResponse closeStartPage ( )
slot

Close ColneoPro start page.

Since
1.0.0

◆ createViewpoint

ApiJsonResponse createViewpoint ( )
slot

Opens a dialog to create a new viewpoint.

Since
1.0, 05.2025, jh

◆ getAvailableActions

ApiJsonResponse getAvailableActions ( )
slot

Get list of available actions.

Returns
data : string[]
Since
1.0, Jan 2025

◆ getDynamicColumns

ApiJsonResponse getDynamicColumns ( QString & domainCode,
QString & window )
slot

Gets the dynamic (user-defined) columns for a given domain and tree view.

Each domain contains a least two tree views: the model tree and the SmartSets tree.

Parameters
domainCodeDomain short code (e.g. "geo").
A list of available domains can be found here.
windowIdentifies the target view. Possible values:
  • "objects" (objects hierarchy of domain)
  • "smartsets"
Returns
Array of columns (property type ids) in the displayed order (e.g. "cnGuid##xs:ID")
data: Array<string>
Since
1.0, Nov 2025

◆ getMarkedItemsObjectIds

ApiJsonResponse getMarkedItemsObjectIds ( QStringList & domains)
slot

Gets the object IDs currently marked in the object tree views of the requested domains.

Marking refers to rows selected in a tree view and is independent of the selected object status managed by the core API. Duplicate object IDs are omitted from the result.

Parameters
domainsDomain short codes to query, for example geo, act, or iss. Pass all to query all domain object tree views. An empty list returns an empty result.
Returns
API response containing the marked object IDs.
{
status: 200,
data: Array<string>
}
If a domain code is invalid, the response has status 400 and an empty data array.

JavaScript example:

const response = cnGuiAPI.getMarkedItemsObjectIds(["geo", "iss"]);
const markedObjectIds = response.data;
Since
1.1, 07.2026, jh

◆ importFiles

ApiJsonResponse importFiles ( )
slot

Show import dialog and call import methods.

Returns
ApiResponse object
Since
1.0, Jan 2026

◆ markedItemsChanged

markedItemsChanged ( QStringList domain,
QStringList addedObjectIds,
QStringList removedObjectIds )
signal

Emitted when the marking in a domain's object tree view changes.

Marking refers to the rows selected in the tree view and is independent of the selected object status managed by the core API. The object ID lists describe the change since the previous emission, not the complete marking. An ID occurs at most once in each list. Either list can be empty.

Parameters
domainList containing the short code of the affected domain, for example geo, act, or iss.
addedObjectIdsIDs of objects newly added to the marking.
removedObjectIdsIDs of objects removed from the marking.
cnGuiAPI.markedItemsChanged.connect(
function(domain, addedObjectIds, removedObjectIds) {
// Update consumers with the marking delta.
});
Since
1.1, 07.2026, jh

◆ menuBarGetConfiguration

ApiJsonResponse menuBarGetConfiguration ( )
slot

Return the current configuration of the menubar as JSON-Object.

Returns
{
'status' : 200,
'data' : {}
}
Since
1.0.0

◆ menuBarReset

ApiJsonResponse menuBarReset ( )
slot

Reset the menubar to the default configuration.

Returns
{
'status' : 200
}
Since
1.0, 07.2025

◆ menuBarSetConfiguration

ApiJsonResponse menuBarSetConfiguration ( QVariantMap configuration)
slot

Changes the menubar according to the given configuration

Parameters
configuration
Returns
{
'status' : 200
}
Since
1.0.0

◆ newProject

ApiJsonResponse newProject ( )
slot

Creates an empty project.

Since
1.0, Jan 2026

◆ openProject

ApiJsonResponse openProject ( QString filepath = QString())
slot

Shows an OpenFileDialog, if no file path is specified or 'filepath' is not a valid file path, and opens selected project. Unlike the cnProjectAPI.open(string) function, a progress dialog may be displayed.

Parameters
filepathFull file path
Returns
ApiResponse object
{
status: number (error code)
message: string (error message)
data: string (selected filepath, optional)
}
Since
1.0, Jan 2026

◆ openStartPage

ApiJsonResponse openStartPage ( )
slot

Open ColneoPro start page.

Since
1.0.0

◆ openUrl

ApiJsonResponse openUrl ( QString & url,
QString & target = QString() )
slot

Opens a web URL or local file/folder using the platform desktop services.

Explicit non-file URLs are opened using the appropriate system handler. A file URL, a path beginning with a slash, or an input without a URL scheme is treated as a project-relative file. Absolute file paths are treated as local paths. UNC paths retain their absolute network path. Relative paths may resolve outside the project directory, and absolute and UNC paths are accepted without a project-directory restriction. Existing files and directories are opened; directories use the platform file browser.

Parameters
urlAn explicit web URL or a project file path.
targetOptional UI target for opening the URL. If empty, the default system browser or file manager is used. If target is "webmodule", the page is opened in the webmodule browser.
Returns
Returns a JSON response of the form:
{
"url": "<normalized-url>"
}
On failure, the response contains an error code and message.
Since
1.0, Nov 2025

◆ runClashRun

ApiJsonResponse runClashRun ( QString & id)
slot

Executes a clash run through ClashManager while a modal desktop progress dialog consumes the project ProgressManager updates. Returns the same response as CoreAPI::executeClashRun().

Since
1.1, 09/2026

◆ saveProject

ApiJsonResponse saveProject ( )
slot

Save project, show a SaveFileDialog if project was not saved before (newly created and no file path is available).

Returns
ApiResponse
data :
Since
1.0, Jan 2026

◆ saveProjectAs

ApiJsonResponse saveProjectAs ( )
slot

Shows a SaveFileDialog and saves the project.

Returns
ApiResponse object
Since
1.0, Jan 2026

◆ selectFile

ApiJsonResponse selectFile ( QString & initialDirectory = QString())
slot

Opens a native file dialog in the requested directory.

Parameters
initialDirectoryAbsolute directory shown when the dialog opens.
Returns
The selected file path and metadata. An empty data object indicates that the dialog was cancelled.
Since
1.1, Jul 2026

◆ setDynamicColumns

ApiJsonResponse setDynamicColumns ( QString & domainCode,
QString & window,
QStringList & columns )
slot

Sets the dynamic (user-defined) columns of a tree view in a domain.

Parameters
domainCodeDomain short code (e.g. "geo").
A list of available domains can be found here.
windowIdentifies the target view. Possible values:
  • "objects" (objects hierarchy of domain)
  • "smartsets"
columnsList of columns (property type ids) which should be shown.
An empty list clears all dynamic columns.
Returns
Array of columns which could be set.
data: Array<string>
Since
1.0, Dec 2025

◆ setObjectTreeSelectionModels()

setObjectTreeSelectionModels ( ObjectTreeSelectionModels & objectTreeSelectionModels)

Connects the selection models of the domain object tree views to the API signal.

◆ showConnectDialog

ApiJsonResponse showConnectDialog ( )
slot

Open dialogue which shows the webb app 'connect' to connect this CN pro project to a coordination model on the CN infohub

Since
1.0, 01.2026, jh

◆ showLoginDialog

ApiJsonResponse showLoginDialog ( )
slot

Shows the Login dialog.

Opens the COLNEO Infohub login dialog if the user is not already logged in (get access token).

Returns
The user ID if login was successfully.
data : string
}
Since
1.0, 10.2025, jh

◆ syncCoordinationModel

ApiJsonResponse syncCoordinationModel ( )
slot

Shows the coordination model synchronization dialog.

Since
1.1, 09/2026

◆ triggerAction

ApiJsonResponse triggerAction ( QString & actionName,
QVariantMap & params = QVariantMap() )
slot

Triggers an action.

Parameters
actionNameName of the action
paramsOptional parameters, depending on the action. Example:
{
dockWidgetArea : 'left' | 'right' | 'top' | 'bottom' | 'float'
}
Returns
data:
See also
getAvailableActions();
Since
1.0, Jan 2025