MainPage   Related pages 
ProjectAPI.h
1 
2 //
3 // $Id: ProjectAPI.h 4877 2021-05-03 13:08:18Z ansgar.horstmann $
4 // (c) ceapoint aec technologies GmbH
5 //
6 
7 
8 #pragma once
9 
10 
11 #include <domainBim/AutomationAPI.h>
12 #include <xqtgl/xQGLView.h>
13 
14 
15 namespace desiteCore
16 {
17 
18  class NavigatorProject;
19 
20  enum eElementVisibilityMode {
21  evMode_show,
22  evMode_showExclusively,
23  evMode_hide
24  };
25 
40  {
41  Q_OBJECT
42 
43  public:
44 
45 
47  explicit ProjectAPI(NavigatorProject* np, QObject* parent = 0);
48  virtual ~ProjectAPI();
50 
51 
52  public slots:
53 
67  int message(QString);
68 
77  bool sendRemoteMessage(QString message);
78 
79 
80 #pragma region TOOLS
81 
93  void startEXE(QString prg, QString args);
94 
100  void showOnScreenKeyboard();
101 
117  void openLink( QString url, bool useDesktopService );
118 
141  QString showOpenFileDialog( QString caption = "", QString directory = "", QString filter = "" );
142 
157  QString showSaveFileDialog( QString caption = "", QString directory = "", QString filter = "" );
158 
159 
161 #pragma endregion
162 
163 
164 #pragma region PROJECT
165 
174  void openProject( QString url, bool useSessionData );
175 
185  int saveProject();
186 
200  int saveCPA( QString cpa_filename, QString pack_bookmark );
201 
202  // ah: hidden until documented and properly implemented
203  // since, supported domains, error codes
205  int saveDomain( QString domainName );
221  QVariant importModel( QString filename, bool showDialog = true, QVariantMap options = QVariantMap() );
222 
244  QString exportBCF(QStringList sourceIds, QString targetPath, QString targetFileBaseName, QString bcfVersion = "2.1");
245 
255  bool importBCF(QString sourceFilePath);
256 
272  int redirectDocument( QString modelId, QString newSourceFilePath );
273 
275 #pragma endregion
276 
277 
278 #pragma region FILTER OBJECTS
279 
285  void filterElements(QString pName, QString pType, QString pattern, bool checkInh = true, QString domainCombination = "geometry" );
286 
288 #pragma endregion
289 
290 
291 #pragma region MATERIALS
292 
304  int showColorSchema(QString name);
305 
307 #pragma endregion
308 
309 
310 #pragma region VISIBILITY, SELECTION
311 
318  void showAll(bool repaint, QString domainCombination = "geometry" );
319 
326  void hideAll(bool repaint, QString domainCombination = "geometry" );
327 
336  void showElements( QString idList, bool includeBlocked = false, QString domainCombination = "geometry" );
337 
345  void showElementsOnly( QString idList, QString domainCombination = "geometry");
346 
355  void hideElements( QString idList, bool ignoreObjectLocking = false, QString domainCombination = "geometry" );
356 
365  void clearSelection( bool repaint, QString domainCombination = "geometry" );
366 
371  void selectVisible();
372 
377  void selectVisibleGeometric();
378 
387  void selectElements( QString idList, bool flag, QString domainCombination = "geometry" );
388 
397  void zoomToSelected();
398 
407  void zoomToVisible();
408 
419  void zoomToObjects( QString objIDs );
420 
425  void zoomToAllDocuments();
426 
432 
437  void zoomToVisibleDocuments();
438 
446  void zoomToDocuments( QStringList idList );
447 
452  void zoomToAllResources();
453 
459 
463  void zoomToVisibleResources();
464 
469  void zoomToResources( QStringList idList );
470 
475  void zoomToLocationGK( double rw, double hw, double h);
476 
481  void zoomToLocationGps( double lat, double lon );
482 
487  void moveToLocationGps( double lat, double lon );
488 
493  void zoomTopView();
494 
506  QString getAll( QString domainFilter = "geometry" );
507 
519  QStringList getAllElements( QString domainFilter = "geometry" );
520 
532  QString getVisible( QString domainFilter = "geometry" );
533 
545  QStringList getVisibleElements( QString domainFilter = "geometry" );
546 
556  bool hasVisible( QString domainFilter = "all" );
557 
566  int countVisible( QString domainFilter = "geometry" );
567 
579  QString getSelected( QString domainFilter = "geometry" );
580 
592  QStringList getSelectedElements( QString domainFilter = "geometry" );
593 
594 
604  bool hasSelected( QString domainFilter = "all" );
605 
615  int countSelected( QString domainFilter = "geometry" );
616 
626  void setVisualisationMode(int mode, bool repaint = true );
627 
631  int getVisualisationMode();
632 
649  QVariantMap showElementsOOBBSide( QString IDList, double prec = 1.e-2 );
650 
661  QVariantMap showElementsOOBBTop( QString IDList, double prec = 1.e-2 );
662 
673  QVariantMap showElementsOOBBFront( QString idList, double prec = 1.e-2 );
674 
684  void showDimensionsPainter( bool showAABB, bool showOOBB );
685 
690  void hideDimensionsPainter();
691 
696  void repaint3DView();
697 
699 #pragma endregion
700 
701 
702 #pragma region VIEWPOINTS
703 
715  int showViewpoint(QString name);
716 
727  int showViewpointByID(QString id);
728 
754  QVariantMap getViewpointList();
755 
776  QVariantMap getViewpointMetadata( QString id );
777 
783  void addToViewPoint( QString vpID, QString objIdList );
784 
790  void removeFromViewPoint( QString vpID, QString objIdList );
791 
805  QString saveViewpoint(QString name, bool saveVisible = true, bool saveSelected = false, QString desc = QString(), bool saveRedlining = false, bool copyMeasureItems = false );
806 
811  bool deleteViewpointByID( QString id );
812 
817  bool deleteAllViewpoints();
818 
846  QString getCurrentViewAsImage();
847 
863  bool saveCurrentViewToFile( QString filename );
864 
945  QVariantMap getViewpointAsJsonObject( const QString& vpID, const QStringList& blacklist = QStringList() );
946 
953  QString createViewpointFromJsonObject( const QVariantMap& vm );
954 
961  QVariantMap getViewpointObjectDataAsJsonObject( const QString& vpID );
962 
972  int setViewpointObjectDataFromJsonObject( const QString& vpID, const QVariantMap& vm );
973 
980  QVariantMap getViewpointMeasureItemsAsJsonObject( const QString& vpID );
981 
991  int addMeasureItemsToViewpointFromJsonObject( const QString& vpID, const QVariantMap& vm );
992 
999  void applyViewByJsonObject( const QVariantMap& vm );
1000 
1005  void applyMeasureItemsFromJsonObject( const QVariantMap& vm );
1006 
1008 #pragma endregion
1009 
1010 
1011 #pragma region CAMERA / LIGHT SOURCES
1012 
1040  QVariantMap getClipping(int i);
1041 
1054  void setClipping(int i, QVariantMap clp);
1055 
1079  QVariantMap getCamera();
1080 
1113  QVariantMap getCameraAsJsonObject();
1114 
1141  void setCamera(QVariantMap cam);
1142 
1151  void setCameraFromJsonObject(QVariantMap camJSON);
1152 
1175  QList<QVariant> getLightSources();
1176 
1182  void setLightSources( QList<QVariant> lList );
1183 
1224  QVariantMap getVisualizationOptions();
1225 
1240  void setVisualizationOptions(QVariantMap opt);
1241 
1290  QVariantMap getPainterOptions();
1291 
1306  void setPainterOptions(QVariantMap opt);
1307 
1309 #pragma endregion
1310 
1311 
1312 #pragma region OBJECT TOOLTIPS, DOCUMENTS TOOLTIPS, RESOURCES TOOLTIPS
1313 
1322  int activateObjTooltip(QString name);
1323 
1328  void deactivateObjTooltip();
1329 
1335  QString getActiveTooltipName() const;
1336 
1340  void setDocumentsTooltipsVisible( bool v );
1341 
1346 
1351  void setResourcesTooltipsVisible( bool v );
1352 
1358 
1359 
1361 #pragma endregion
1362 
1363 
1364 #pragma region _4D_SIMULATION
1365 
1367 
1372  void set4dIsActive( bool active );
1373 
1378  bool get4dIsActive();
1379 
1385  bool set4dDateTime( QDateTime dt );
1386 
1391  QDateTime get4dDateTime();
1392 
1418  QVariantMap get4dOptions();
1419 
1428  void set4dOptions( QVariantMap opt );
1429 
1434  QDateTime get4dProjectStart();
1435 
1440  QDateTime get4dProjectFinish();
1441 
1446  QStringList get4dActiveTaskList( QDateTime dt, bool linkedToObjectsOnly = false );
1447 
1452  QStringList get4dActiveTaskListByInterval( QDateTime dtStart, QDateTime dtEnd, bool linkedToObjectsOnly = false );
1453 
1458  QStringList get4dFinishedTaskList( QDateTime, bool linkedToObjectsOnly = false );
1459 
1464  QStringList get4dProspectiveTaskList( QDateTime, bool linkedToObjectsOnly = false );
1465 
1470  QString get4dTaskColor( QString taskID, QDateTime dt, QString defaultColorName = "#000" );
1471 
1473 
1474 #pragma endregion
1475 
1476 
1477 #pragma region BUILDING STRUCTURE
1478 
1490  void setBsPlanUnderlayActive(bool active);
1491 
1497  bool getBsPlanUnderlayActive();
1498 
1500 #pragma endregion
1501 
1502 
1503 #pragma region NAVIGATION MODES
1504 
1506 
1518  QString getNavigationMode();
1519 
1532  void setNavigationMode( QString mode, QString pinModeContainerID = QString() );
1533 
1534 
1542  QVariantMap getHandlerMode();
1543 
1622  bool setHandlerMode( QVariantMap handlerInfo );
1623 
1628  QStringList getCreatedPins();
1629 
1631 #pragma endregion
1632 
1633 
1634 #pragma region PICK POINTS, MEASURE
1635 
1654  QVariantMap getPickedPoint();
1655 
1684  QVariantMap getAllPickedPoints();
1685 
1702  QVariantMap getPickedPointGPS();
1703 
1721  QVariantMap getPickedPointGK();
1722 
1775  QVariantMap getPickedFaces();
1776 
1781  void clearMeasureItems();
1782 
1784 #pragma endregion
1785 
1786 
1787 #pragma region CLASH_DETECTION
1788 
1794  void showClashList( QString clashIdList );
1795 
1797 #pragma endregion
1798 
1799 
1800 #pragma region WEBFORMS
1801 
1825  QVariantMap getWebFormLocations();
1826 
1831  void createWebFormBookmark(QString url, QString name);
1832 
1841  int removeWebFormBookmark(QString url );
1842 
1844 #pragma endregion
1845 
1846 
1847 //#pragma region SURVEYPOINTS
1848 // ///@{ \name SURVEY POINTS
1849 //
1850 // /*
1851 // Import survey points from file and create model with object points.
1852 //
1853 // \param fileName Full file name with path
1854 // \param propName Name of property which will store value of survey point
1855 // \param delimiter Column delimiter (default: Tab)
1856 //
1857 // \return number of survey points imported if import was successful<br>
1858 // -1 file not found / file could not be opened<br>
1859 // -2 model could not be created
1860 // \since 2.2.1, 21 jun 2018, sl
1861 // */
1862 // int importSurveyPoints( QString fileName, QString propName = "spValue", QChar delimiter = '\t' );
1863 //
1864 // ///@}
1865 //#pragma endregion
1866 
1867  private:
1868 
1869  void _setElementVisibility( const QString& idListStr, eElementVisibilityMode mode, const QString& domainCombination = "geometry" );
1870 
1871  void zoomToDocumentsByList( QList<model::Element*> eleList );
1872  void zoomToResourcesByList( QList<model::Element*> eleList );
1873 
1877  NavigatorProject* getNavigatorProject();
1878 
1879  int _isPainting_;
1880 
1881  xqtgl::xQGLView* _redliningView;
1882 
1883  };
1884 
1885 }
void filterElements(QString pName, QString pType, QString pattern, bool checkInh=true, QString domainCombination="geometry")
QStringList getCreatedPins()
QStringList get4dActiveTaskListByInterval(QDateTime dtStart, QDateTime dtEnd, bool linkedToObjectsOnly=false)
QString exportBCF(QStringList sourceIds, QString targetPath, QString targetFileBaseName, QString bcfVersion="2.1")
QVariantMap getViewpointAsJsonObject(const QString &vpID, const QStringList &blacklist=QStringList())
void showElementsOnly(QString idList, QString domainCombination="geometry")
QString getAll(QString domainFilter="geometry")
void setCamera(QVariantMap cam)
void zoomToResources(QStringList idList)
QString showSaveFileDialog(QString caption="", QString directory="", QString filter="")
QVariantMap getClipping(int i)
int addMeasureItemsToViewpointFromJsonObject(const QString &vpID, const QVariantMap &vm)
void setNavigationMode(QString mode, QString pinModeContainerID=QString())
void showDimensionsPainter(bool showAABB, bool showOOBB)
bool getDocumentsTooltipsVisible()
QStringList getAllElements(QString domainFilter="geometry")
void setVisualisationMode(int mode, bool repaint=true)
void moveToLocationGps(double lat, double lon)
QVariantMap getPickedPoint()
void hideElements(QString idList, bool ignoreObjectLocking=false, QString domainCombination="geometry")
QStringList get4dActiveTaskList(QDateTime dt, bool linkedToObjectsOnly=false)
void set4dIsActive(bool active)
int showViewpoint(QString name)
void addToViewPoint(QString vpID, QString objIdList)
int setViewpointObjectDataFromJsonObject(const QString &vpID, const QVariantMap &vm)
QString saveViewpoint(QString name, bool saveVisible=true, bool saveSelected=false, QString desc=QString(), bool saveRedlining=false, bool copyMeasureItems=false)
void selectElements(QString idList, bool flag, QString domainCombination="geometry")
Definition: ProjectAPI.h:39
QDateTime get4dDateTime()
int showViewpointByID(QString id)
void showAll(bool repaint, QString domainCombination="geometry")
bool hasVisible(QString domainFilter="all")
QVariantMap getVisualizationOptions()
QVariantMap showElementsOOBBSide(QString IDList, double prec=1.e-2)
void setDocumentsTooltipsVisible(bool v)
QVariantMap showElementsOOBBTop(QString IDList, double prec=1.e-2)
QVariantMap getPickedFaces()
QStringList get4dProspectiveTaskList(QDateTime, bool linkedToObjectsOnly=false)
QStringList getSelectedElements(QString domainFilter="geometry")
void setLightSources(QList< QVariant > lList)
QVariantMap getViewpointMetadata(QString id)
void setClipping(int i, QVariantMap clp)
QString getCurrentViewAsImage()
int removeWebFormBookmark(QString url)
QList< QVariant > getLightSources()
bool saveCurrentViewToFile(QString filename)
QString getSelected(QString domainFilter="geometry")
void removeFromViewPoint(QString vpID, QString objIdList)
QStringList getVisibleElements(QString domainFilter="geometry")
QVariantMap getPickedPointGPS()
QString getActiveTooltipName() const
bool hasSelected(QString domainFilter="all")
void zoomToLocationGK(double rw, double hw, double h)
void openLink(QString url, bool useDesktopService)
QVariantMap getCameraAsJsonObject()
QVariantMap getViewpointMeasureItemsAsJsonObject(const QString &vpID)
QVariantMap get4dOptions()
QVariantMap getPainterOptions()
int showColorSchema(QString name)
void setCameraFromJsonObject(QVariantMap camJSON)
void openProject(QString url, bool useSessionData)
QVariantMap getHandlerMode()
bool getResourcesTooltipsVisible()
QString createViewpointFromJsonObject(const QVariantMap &vm)
QVariantMap getCamera()
QString get4dTaskColor(QString taskID, QDateTime dt, QString defaultColorName="#000")
Definition: AutomationAPI.h:30
bool deleteViewpointByID(QString id)
bool setHandlerMode(QVariantMap handlerInfo)
void zoomToObjects(QString objIDs)
QVariantMap getPickedPointGK()
void zoomToLocationGps(double lat, double lon)
QVariantMap getWebFormLocations()
QString showOpenFileDialog(QString caption="", QString directory="", QString filter="")
int activateObjTooltip(QString name)
void showClashList(QString clashIdList)
void hideAll(bool repaint, QString domainCombination="geometry")
QVariantMap showElementsOOBBFront(QString idList, double prec=1.e-2)
QVariant importModel(QString filename, bool showDialog=true, QVariantMap options=QVariantMap())
Definition: ProjectAPI.h:15
QDateTime get4dProjectFinish()
bool importBCF(QString sourceFilePath)
void showElements(QString idList, bool includeBlocked=false, QString domainCombination="geometry")
void zoomToDocuments(QStringList idList)
QVariantMap getAllPickedPoints()
void setVisualizationOptions(QVariantMap opt)
int countSelected(QString domainFilter="geometry")
int countVisible(QString domainFilter="geometry")
int saveCPA(QString cpa_filename, QString pack_bookmark)
QStringList get4dFinishedTaskList(QDateTime, bool linkedToObjectsOnly=false)
QVariantMap getViewpointObjectDataAsJsonObject(const QString &vpID)
bool set4dDateTime(QDateTime dt)
void startEXE(QString prg, QString args)
QString getVisible(QString domainFilter="geometry")
void createWebFormBookmark(QString url, QString name)
void setBsPlanUnderlayActive(bool active)
QVariantMap getViewpointList()
void setResourcesTooltipsVisible(bool v)
bool sendRemoteMessage(QString message)
void applyViewByJsonObject(const QVariantMap &vm)
void clearSelection(bool repaint, QString domainCombination="geometry")
void set4dOptions(QVariantMap opt)
int redirectDocument(QString modelId, QString newSourceFilePath)
void setPainterOptions(QVariantMap opt)
void applyMeasureItemsFromJsonObject(const QVariantMap &vm)
QDateTime get4dProjectStart()

Created: Wed May 5 2021 15:16:11