MainPage   Files   Related pages 
Public Slots | Public Member Functions | Protected Member Functions | List of all members
desiteCore::CoreAPI Class Reference

#include <desiteCore/CoreAPI.h>

Inheritance diagram for desiteCore::CoreAPI:
desiteCore::ProjectAPI desiteCore::NavigatorProjectAPI

Public Slots

QString addDays (QString dateStr, int nrDays)
 
QString timeStamp ()
 
QString getUserName ()
 
QString getProjectID ()
 
int getProjectVariantNumber ()
 
QString getProjectNumber ()
 
QString getProjectName ()
 
QString getProjectShortDescription ()
 
QString getProjectLongDescription ()
 
QString getApplicationDirectory ()
 
QString getProjectDirectory ()
 
bool isVisible (QString objID)
 
bool isSelected (QString objID)
 
double calcSlantedArea (QString objID, double angleMin=0.0, double angleMax=45.0)
 
Properties
QVariant getPropertyValue (QString objID, QString propName, QString propType, bool inh=true)
 
bool isPropertyInherited (QString objID, QString propName, QString propType)
 
QString getPropertyValueRange (QString IDList, QString propName, QString propType)
 
QStringList getPropertyValueList (QString propName, QString propType, int maxValues)
 
QString getPropertyValueAsString (QString objID, QString propName, QString propType, bool inh=true)
 
LINKS BETWEEN OBJECTS/ACTIVITIES/DOCUMENTS
QStringList getLinkedObjects (QString IDList)
 
QStringList getTasksByObjectList (QString IDList)
 
QStringList getObjectsByTaskList (QString IDList)
 
QStringList getDocumentsByObjectList (QString IDList)
 
QStringList getObjectsByDocumentList (QString IDList)
 
Object Hierarchy
QStringList getContainedElements (QString containerID, int maxDepth)
 
int countContainedElements (QString containerID, int maxDepth)
 
QString getParent (QString objID)
 

Public Member Functions

model::IGlobalProject * getGlobalProject () const
 
Constructors
 CoreAPI (domainGeometry3D::Project *gp, domainActivities::ActivityProject *ap, domainDocuments::DocumentModel *dm, model::IGlobalProject *globalP, QObject *parent=0)
 
virtual ~CoreAPI ()
 
MODELS
domainActivities::ActivityProject * getActivityProject ()
 
domainGeometry3D::Project * getGeometryProject ()
 
domainDocuments::DocumentModel * getDocumentModel ()
 

Protected Member Functions

 CoreAPI (QObject *parent=0)
 
void setProjects (domainGeometry3D::Project *gProject, domainActivities::ActivityProject *aProject, domainDocuments::DocumentModel *dModel)
 
void setGlobalProject (model::IGlobalProject *gp)
 
model::IContainerObject * getIContainerObject (const QString &id)
 
model::IObject * getContainer (const QString &id)
 

Detailed Description

Core API. Baseclass for all API classes
JavaScript Objectname: desiteAPI

Since
1.0.16, 23 apr 2012 by jh
Id
CoreAPI.h 4263 2015-12-17 15:53:58Z stefan.losch

(c) ceapoint aec technologies GmbH

Member Function Documentation

QString desiteCore::CoreAPI::addDays ( QString  dateStr,
int  nrDays 
)
slot

Add days to a given date and return the new date as ISO format (yyyy-MM-dd)

Since
1.0.16
double desiteCore::CoreAPI::calcSlantedArea ( QString  objID,
double  angleMin = 0.0,
double  angleMax = 45.0 
)
slot

Calculate slanted area of object. 0 <= angleMin < angleMax <= 180.

Check if top surface is slanted:
angleMin = 0.01, angleMax = 45.0
If result is 0, the surface is not slanted.

Check if bottom surface is slanted:
angleMin = 135.0, angleMax = 179.9
If result is 0, the surface is not slanted.

Parameters
objID: ID of object
angleMin: Min. deviation angle in relation to z-axis (0,0,1), default = 0.0 [deg]
angleMin: Max. deviation angle in relation to z-axis (0,0,1), default = 45.0 [deg] (top area criteria)
Returns
calculated area
Since
1.4.13, 17 dec 2015, sl
int desiteCore::CoreAPI::countContainedElements ( QString  containerID,
int  maxDepth 
)
slot

Count objects contained in 'containerID' Travers recursively all contained elements and count them. Also counts containers.

Parameters
maxDepthMaximum Depth of hierarchy to be traversed
0 : count all elements
Since
1.0.20, 29 nov 2012, jh
domainActivities::ActivityProject* desiteCore::CoreAPI::getActivityProject ( )
inline
Since
1.0.17, 16 jun 2012, jh
QString desiteCore::CoreAPI::getApplicationDirectory ( )
slot
Since
1.0.17, 18 jul 2012, jh
QStringList desiteCore::CoreAPI::getContainedElements ( QString  containerID,
int  maxDepth 
)
slot

Get list of objects contained in 'containerID' Traverses recursively all contained elements and append them to list. Also appends containers to list.

Parameters
maxDepthMaximum Depth of hierarchy to be traversed
0 : get all elements
Since
1.0.18, 18 aug 2012, jh
domainDocuments::DocumentModel* desiteCore::CoreAPI::getDocumentModel ( )
inline
Since
1.0.17, 16 jun 2012, jh
QStringList desiteCore::CoreAPI::getDocumentsByObjectList ( QString  IDList)
slot
Returns
List of document IDs separated by ';'
Since
1.3.3, 03 apr 2014, jh
domainGeometry3D::Project* desiteCore::CoreAPI::getGeometryProject ( )
inline
Since
1.0.17, 16 jun 2012, jh
model::IGlobalProject* desiteCore::CoreAPI::getGlobalProject ( ) const
inline

Get pointer to global project.

The following properties are provider by a global project:

type_string, "ShortDescription" type_string, "LongDescription" type_string, "NumberCode" type_string, "ProjectDirectory"

Since
1.0.20, 15 nov 2012, jh
model::IContainerObject* desiteCore::CoreAPI::getIContainerObject ( const QString &  id)
protected

get object, loks up also containers in geometry project

QStringList desiteCore::CoreAPI::getLinkedObjects ( QString  IDList)
slot
Since
1.0.18, 14 aug 2012, jh
QStringList desiteCore::CoreAPI::getObjectsByDocumentList ( QString  IDList)
slot
Returns
List of object IDs separated by ';'
Since
1.3.3, 03 apr 2014, jh
QStringList desiteCore::CoreAPI::getObjectsByTaskList ( QString  IDList)
slot
Since
1.0.18, 14 aug 2012, jh
QString desiteCore::CoreAPI::getParent ( QString  objID)
slot

Get parent element.

Parameters
errCode0 - ok
-1 - object 'objID' not found
Since
1.0.18, 18 aug 2012, jh
QString desiteCore::CoreAPI::getProjectDirectory ( )
slot
Since
1.0.17, 18 jul 2012, jh
QString desiteCore::CoreAPI::getProjectID ( )
slot
Since
1.3.0, 21 oct 2013, jh
QString desiteCore::CoreAPI::getProjectLongDescription ( )
slot
Since
1.0.17, 15 jun 2012, jh
QString desiteCore::CoreAPI::getProjectName ( )
slot
Since
1.3.6, 26 apr 2014, jh
QString desiteCore::CoreAPI::getProjectNumber ( )
slot
Since
1.0.17, 15 jun 2012, jh
QString desiteCore::CoreAPI::getProjectShortDescription ( )
slot
Since
1.0.17, 15 jun 2012, jh
int desiteCore::CoreAPI::getProjectVariantNumber ( )
slot
Since
1.3.0, 21 oct 2013, jh
QVariant desiteCore::CoreAPI::getPropertyValue ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get property value for a single object.

To access project properties use 'GlobalProject' as objID.

Parameters
inh: Check inherited property values. Default is 'true'
Since
1.0.16
QString desiteCore::CoreAPI::getPropertyValueAsString ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get property value for a single object. Convert result to 'string'. This method returns a valid result even if the property or the object does not exist.

Since
1.0.16
Deprecated:
This method will be removed in a later version.
QStringList desiteCore::CoreAPI::getPropertyValueList ( QString  propName,
QString  propType,
int  maxValues 
)
slot

Get available property values for visible objects.

Since
1.0.17, 27 jun 2012, jh
QString desiteCore::CoreAPI::getPropertyValueRange ( QString  IDList,
QString  propName,
QString  propType 
)
slot

Get property values/range for a list of objects.

Since
1.0.16
QStringList desiteCore::CoreAPI::getTasksByObjectList ( QString  IDList)
slot
Returns
List of task IDs separated by ';'
Since
1.0.17, 16 jun 2012, jh
QString desiteCore::CoreAPI::getUserName ( )
slot
Since
1.0.17, 15 jun 2012, jh
bool desiteCore::CoreAPI::isPropertyInherited ( QString  objID,
QString  propName,
QString  propType 
)
slot

Check if a property value is inherited.

Since
1.3.5, 21 apr 2014, jh
bool desiteCore::CoreAPI::isSelected ( QString  objID)
slot
Since
1.0.20, 24 nov 2012, jh
bool desiteCore::CoreAPI::isVisible ( QString  objID)
slot
Since
1.0.20, 24 nov 2012, jh
QString desiteCore::CoreAPI::timeStamp ( )
slot

Get current date/time in ISO format: yyyy-MM-ddThh-mm-ss

Since
1.0.18, 14 jun 2012, jh

The documentation for this class was generated from the following file:

Created: Wed Jan 6 2016 14:55:50