MainPage   Related pages 
 All Classes Functions Pages
ProjectAPI.h
1 
2 //
3 // $Id: ProjectAPI.h 3712 2020-06-29 11:35:48Z 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 
16 namespace desiteCore
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 
138  QString showOpenFileDialog( QString caption = "", QString directory = "", QString filter = "" );
139 
151  QString showSaveFileDialog( QString caption = "", QString directory = "", QString filter = "" );
152 
153 
155 #pragma endregion
156 
157 
158 #pragma region PROJECT
159 
168  void openProject( QString url, bool useSessionData );
169 
179  int saveProject();
180 
194  int saveCPA( QString cpa_filename, QString pack_bookmark );
195 
196  // ah: hidden until documented and properly implemented
197  // since, supported domains, error codes
199  int saveDomain( QString domainName );
215  QVariant importModel( QString filename, bool showDialog = true, QVariantMap options = QVariantMap() );
216 
238  QString exportBCF(QStringList sourceIds, QString targetPath, QString targetFileBaseName, QString bcfVersion = "2.1");
239 
249  bool importBCF(QString sourceFilePath);
250 
252 #pragma endregion
253 
254 
255 #pragma region FILTER OBJECTS
256 
262  void filterElements(QString pName, QString pType, QString pattern, bool checkInh = true, QString domainCombination = "geometry" );
263 
265 #pragma endregion
266 
267 
268 #pragma region MATERIALS
269 
281  int showColorSchema(QString name);
282 
284 #pragma endregion
285 
286 
287 #pragma region VISIBILITY, SELECTION
288 
295  void showAll(bool repaint, QString domainCombination = "geometry" );
296 
303  void hideAll(bool repaint, QString domainCombination = "geometry" );
304 
313  void showElements( QString idList, bool includeBlocked = false, QString domainCombination = "geometry" );
314 
322  void showElementsOnly( QString idList, QString domainCombination = "geometry");
323 
332  void hideElements( QString idList, bool ignoreObjectLocking = false, QString domainCombination = "geometry" );
333 
342  void clearSelection( bool repaint, QString domainCombination = "geometry" );
343 
348  void selectVisible();
349 
354  void selectVisibleGeometric();
355 
364  void selectElements( QString idList, bool flag, QString domainCombination = "geometry" );
365 
374  void zoomToSelected();
375 
384  void zoomToVisible();
385 
396  void zoomToObjects( QString objIDs );
397 
402  void zoomToAllDocuments();
403 
409 
414  void zoomToVisibleDocuments();
415 
423  void zoomToDocuments( QStringList idList );
424 
429  void zoomToAllResources();
430 
436 
440  void zoomToVisibleResources();
441 
446  void zoomToResources( QStringList idList );
447 
452  void zoomToLocationGK( double rw, double hw, double h);
453 
458  void zoomToLocationGps( double lat, double lon );
459 
464  void moveToLocationGps( double lat, double lon );
465 
470  void zoomTopView();
471 
483  QString getAll( QString domainFilter = "geometry" );
484 
496  QStringList getAllElements( QString domainFilter = "geometry" );
497 
509  QString getVisible( QString domainFilter = "geometry" );
510 
522  QStringList getVisibleElements( QString domainFilter = "geometry" );
523 
533  bool hasVisible( QString domainFilter = "all" );
534 
543  int countVisible( QString domainFilter = "geometry" );
544 
556  QString getSelected( QString domainFilter = "geometry" );
557 
569  QStringList getSelectedElements( QString domainFilter = "geometry" );
570 
571 
581  bool hasSelected( QString domainFilter = "all" );
582 
592  int countSelected( QString domainFilter = "geometry" );
593 
603  void setVisualisationMode(int mode, bool repaint = true );
604 
608  int getVisualisationMode();
609 
626  QVariantMap showElementsOOBBSide( QString IDList, double prec = 1.e-2 );
627 
638  QVariantMap showElementsOOBBTop( QString IDList, double prec = 1.e-2 );
639 
650  QVariantMap showElementsOOBBFront( QString idList, double prec = 1.e-2 );
651 
661  void showDimensionsPainter( bool showAABB, bool showOOBB );
662 
667  void hideDimensionsPainter();
668 
673  void repaint3DView();
674 
676 #pragma endregion
677 
678 
679 #pragma region VIEWPOINTS
680 
692  int showViewpoint(QString name);
693 
704  int showViewpointByID(QString id);
705 
731  QVariantMap getViewpointList();
732 
753  QVariantMap getViewpointMetadata( QString id );
754 
760  void addToViewPoint( QString vpID, QString objIdList );
761 
767  void removeFromViewPoint( QString vpID, QString objIdList );
768 
782  QString saveViewpoint(QString name, bool saveVisible = true, bool saveSelected = false, QString desc = QString(), bool saveRedlining = false, bool copyMeasureItems = false );
783 
788  bool deleteViewpointByID( QString id );
789 
794  bool deleteAllViewpoints();
795 
823  QString getCurrentViewAsImage();
824 
840  bool saveCurrentViewToFile( QString filename );
841 
922  QVariantMap getViewpointAsJsonObject( const QString& vpID, const QStringList& blacklist = QStringList() );
923 
930  QString createViewpointFromJsonObject( const QVariantMap& vm );
931 
938  QVariantMap getViewpointObjectDataAsJsonObject( const QString& vpID );
939 
949  int setViewpointObjectDataFromJsonObject( const QString& vpID, const QVariantMap& vm );
950 
957  QVariantMap getViewpointMeasureItemsAsJsonObject( const QString& vpID );
958 
968  int addMeasureItemsToViewpointFromJsonObject( const QString& vpID, const QVariantMap& vm );
969 
976  void applyViewByJsonObject( const QVariantMap& vm );
977 
982  void applyMeasureItemsFromJsonObject( const QVariantMap& vm );
983 
985 #pragma endregion
986 
987 
988 #pragma region CAMERA / LIGHT SOURCES
989 
1017  QVariantMap getClipping(int i);
1018 
1031  void setClipping(int i, QVariantMap clp);
1032 
1056  QVariantMap getCamera();
1057 
1090  QVariantMap getCameraAsJsonObject();
1091 
1118  void setCamera(QVariantMap cam);
1119 
1128  void setCameraFromJsonObject(QVariantMap camJSON);
1129 
1152  QList<QVariant> getLightSources();
1153 
1159  void setLightSources( QList<QVariant> lList );
1160 
1201  QVariantMap getVisualizationOptions();
1202 
1217  void setVisualizationOptions(QVariantMap opt);
1218 
1267  QVariantMap getPainterOptions();
1268 
1283  void setPainterOptions(QVariantMap opt);
1284 
1286 #pragma endregion
1287 
1288 
1289 #pragma region OBJECT TOOLTIPS, DOCUMENTS TOOLTIPS, RESOURCES TOOLTIPS
1290 
1299  int activateObjTooltip(QString name);
1300 
1305  void deactivateObjTooltip();
1306 
1312  QString getActiveTooltipName() const;
1313 
1317  void setDocumentsTooltipsVisible( bool v );
1318 
1323 
1328  void setResourcesTooltipsVisible( bool v );
1329 
1335 
1336 
1338 #pragma endregion
1339 
1340 
1341 #pragma region _4D_SIMULATION
1342 
1344 
1349  void set4dIsActive( bool active );
1350 
1355  bool get4dIsActive();
1356 
1362  bool set4dDateTime( QDateTime dt );
1363 
1368  QDateTime get4dDateTime();
1369 
1391  QVariantMap get4dOptions();
1392 
1401  void set4dOptions( QVariantMap opt );
1402 
1407  QDateTime get4dProjectStart();
1408 
1413  QDateTime get4dProjectFinish();
1414 
1419  QStringList get4dActiveTaskList( QDateTime dt, bool linkedToObjectsOnly = false );
1420 
1425  QStringList get4dActiveTaskListByInterval( QDateTime dtStart, QDateTime dtEnd, bool linkedToObjectsOnly = false );
1426 
1431  QStringList get4dFinishedTaskList( QDateTime, bool linkedToObjectsOnly = false );
1432 
1437  QStringList get4dProspectiveTaskList( QDateTime, bool linkedToObjectsOnly = false );
1438 
1443  QString get4dTaskColor( QString taskID, QDateTime dt, QString defaultColorName = "#000" );
1444 
1446 
1447 #pragma endregion
1448 
1449 
1450 #pragma region BUILDING STRUCTURE
1451 
1463  void setBsPlanUnderlayActive(bool active);
1464 
1470  bool getBsPlanUnderlayActive();
1471 
1473 #pragma endregion
1474 
1475 
1476 #pragma region NAVIGATION MODES
1477 
1479 
1491  QString getNavigationMode();
1492 
1505  void setNavigationMode( QString mode, QString pinModeContainerID = QString() );
1506 
1507 
1515  QVariantMap getHandlerMode();
1516 
1594  bool setHandlerMode( QVariantMap handlerInfo );
1595 
1600  QStringList getCreatedPins();
1601 
1603 #pragma endregion
1604 
1605 
1606 #pragma region PICK POINTS, MEASURE
1607 
1626  QVariantMap getPickedPoint();
1627 
1656  QVariantMap getAllPickedPoints();
1657 
1674  QVariantMap getPickedPointGPS();
1675 
1693  QVariantMap getPickedPointGK();
1694 
1699  void clearMeasureItems();
1700 
1702 #pragma endregion
1703 
1704 
1705 #pragma region CLASH_DETECTION
1706 
1712  void showClashList( QString clashIdList );
1713 
1715 #pragma endregion
1716 
1717 
1718 #pragma region WEBFORMS
1719 
1743  QVariantMap getWebFormLocations();
1744 
1749  void createWebFormBookmark(QString url, QString name);
1750 
1759  int removeWebFormBookmark(QString url );
1760 
1762 #pragma endregion
1763 
1764 
1765 //#pragma region SURVEYPOINTS
1766 // ///@{ \name SURVEY POINTS
1767 //
1768 // /*
1769 // Import survey points from file and create model with object points.
1770 //
1771 // \param fileName Full file name with path
1772 // \param propName Name of property which will store value of survey point
1773 // \param delimiter Column delimiter (default: Tab)
1774 //
1775 // \return number of survey points imported if import was successful<br>
1776 // -1 file not found / file could not be opened<br>
1777 // -2 model could not be created
1778 // \since 2.2.1, 21 jun 2018, sl
1779 // */
1780 // int importSurveyPoints( QString fileName, QString propName = "spValue", QChar delimiter = '\t' );
1781 //
1782 // ///@}
1783 //#pragma endregion
1784 
1785  private:
1786 
1787  void _setElementVisibility( const QString& idListStr, eElementVisibilityMode mode, const QString& domainCombination = "geometry" );
1788 
1789  void zoomToDocumentsByList( QList<model::Element*> eleList );
1790  void zoomToResourcesByList( QList<model::Element*> eleList );
1791 
1795  NavigatorProject* getNavigatorProject();
1796 
1797  int _isPainting_;
1798 
1799  xqtgl::xQGLView* _redliningView;
1800 
1801  };
1802 
1803 }
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)
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()
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())
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 getActiveTooltipName() const
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)
void setPainterOptions(QVariantMap opt)
void applyMeasureItemsFromJsonObject(const QVariantMap &vm)
QDateTime get4dProjectStart()

Created: Tue Sep 1 2020 16:05:27