MainPage   Related pages 
ProjectAPI.h
1 
2 //
3 // $Id: ProjectAPI.h 3567 2020-04-29 17:53:52Z 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 
19  class NavigatorProject;
20 
35  {
36  Q_OBJECT
37 
38  public:
39 
40 
42  explicit ProjectAPI(NavigatorProject* np, QObject* parent = 0);
43  virtual ~ProjectAPI();
45 
46 
47  public slots:
48 
62  int message(QString);
63 
72  bool sendRemoteMessage(QString message);
73 
74 
75 #pragma region TOOLS
76 
88  void startEXE(QString prg, QString args);
89 
95  void showOnScreenKeyboard();
96 
112  void openLink( QString url, bool useDesktopService );
113 
133  QString showOpenFileDialog( QString caption = "", QString directory = "", QString filter = "" );
134 
146  QString showSaveFileDialog( QString caption = "", QString directory = "", QString filter = "" );
147 
148 
150 #pragma endregion
151 
152 
153 #pragma region PROJECT
154 
163  void openProject( QString url, bool useSessionData );
164 
174  int saveProject();
175 
189  int saveCPA( QString cpa_filename, QString pack_bookmark );
190 
191  // ah: hidden until documented and properly implemented
192  // since, supported domains, error codes
194  int saveDomain( QString domainName );
210  QVariant importModel( QString filename, bool showDialog = true, QVariantMap options = QVariantMap() );
211 
233  QString exportBCF(QStringList sourceIds, QString targetPath, QString targetFileBaseName, QString bcfVersion = "2.1");
234 
244  bool importBCF(QString sourceFilePath);
245 
247 #pragma endregion
248 
249 
250 #pragma region FILTER OBJECTS
251 
257  void filterElements(QString pName, QString pType, QString pattern, bool checkInh = true, QString domainCombination = "geometry" );
258 
260 #pragma endregion
261 
262 
263 #pragma region MATERIALS
264 
276  int showColorSchema(QString name);
277 
279 #pragma endregion
280 
281 
282 #pragma region VISIBILITY, SELECTION
283 
290  void showAll(bool repaint, QString domainCombination = "geometry" );
291 
298  void hideAll(bool repaint, QString domainCombination = "geometry" );
299 
308  void showElements( QString idList, bool includeBlocked = false, QString domainCombination = "geometry" );
309 
317  void showElementsOnly( QString IDList, QString domainCombination = "geometry");
318 
327  void hideElements( QString idList, bool ignoreObjectLocking = false, QString domainCombination = "geometry" );
328 
337  void clearSelection( bool repaint, QString domainCombination = "geometry" );
338 
343  void selectVisible();
344 
349  void selectVisibleGeometric();
350 
359  void selectElements( QString idList, bool flag, QString domainCombination = "geometry" );
360 
369  void zoomToSelected();
370 
379  void zoomToVisible();
380 
391  void zoomToObjects( QString objIDs );
392 
397  void zoomToAllDocuments();
398 
404 
409  void zoomToVisibleDocuments();
410 
418  void zoomToDocuments( QStringList idList );
419 
424  void zoomToAllResources();
425 
431 
435  void zoomToVisibleResources();
436 
441  void zoomToResources( QStringList idList );
442 
447  void zoomToLocationGK( double rw, double hw, double h);
448 
453  void zoomToLocationGps( double lat, double lon );
454 
459  void moveToLocationGps( double lat, double lon );
460 
465  void zoomTopView();
466 
478  QString getAll( QString domainFilter = "geometry" );
479 
491  QStringList getAllElements( QString domainFilter = "geometry" );
492 
504  QString getVisible( QString domainFilter = "geometry" );
505 
517  QStringList getVisibleElements( QString domainFilter = "geometry" );
518 
528  bool hasVisible( QString domainFilter = "all" );
529 
538  int countVisible( QString domainFilter = "geometry" );
539 
551  QString getSelected( QString domainFilter = "geometry" );
552 
564  QStringList getSelectedElements( QString domainFilter = "geometry" );
565 
566 
576  bool hasSelected( QString domainFilter = "all" );
577 
587  int countSelected( QString domainFilter = "geometry" );
588 
598  void setVisualisationMode(int mode, bool repaint = true );
599 
603  int getVisualisationMode();
604 
621  QVariantMap showElementsOOBBSide( QString IDList, double prec = 1.e-2 );
622 
633  QVariantMap showElementsOOBBTop( QString IDList, double prec = 1.e-2 );
634 
645  QVariantMap showElementsOOBBFront( QString idList, double prec = 1.e-2 );
646 
656  void showDimensionsPainter( bool showAABB, bool showOOBB );
657 
662  void hideDimensionsPainter();
663 
668  void repaint3DView();
669 
671 #pragma endregion
672 
673 
674 #pragma region VIEWPOINTS
675 
687  int showViewpoint(QString name);
688 
699  int showViewpointByID(QString id);
700 
726  QVariantMap getViewpointList();
727 
748  QVariantMap getViewpointMetadata( QString id );
749 
755  void addToViewPoint( QString vpID, QString objIdList );
756 
762  void removeFromViewPoint( QString vpID, QString objIdList );
763 
777  QString saveViewpoint(QString name, bool saveVisible = true, bool saveSelected = false, QString desc = QString(), bool saveRedlining = false, bool copyMeasureItems = false );
778 
783  bool deleteViewpointByID( QString id );
784 
789  bool deleteAllViewpoints();
790 
818  QString getCurrentViewAsImage();
819 
835  bool saveCurrentViewToFile( QString filename );
836 
917  QVariantMap getViewpointAsJsonObject( const QString& vpID, const QStringList& blacklist = QStringList() );
918 
925  QString createViewpointFromJsonObject( const QVariantMap& vm );
926 
933  QVariantMap getViewpointObjectDataAsJsonObject( const QString& vpID );
934 
944  int setViewpointObjectDataFromJsonObject( const QString& vpID, const QVariantMap& vm );
945 
952  QVariantMap getViewpointMeasureItemsAsJsonObject( const QString& vpID );
953 
963  int addMeasureItemsToViewpointFromJsonObject( const QString& vpID, const QVariantMap& vm );
964 
971  void applyViewByJsonObject( const QVariantMap& vm );
972 
977  void applyMeasureItemsFromJsonObject( const QVariantMap& vm );
978 
980 #pragma endregion
981 
982 
983 #pragma region CAMERA / LIGHT SOURCES
984 
1012  QVariantMap getClipping(int i);
1013 
1026  void setClipping(int i, QVariantMap clp);
1027 
1051  QVariantMap getCamera();
1052 
1085  QVariantMap getCameraAsJsonObject();
1086 
1113  void setCamera(QVariantMap cam);
1114 
1123  void setCameraFromJsonObject(QVariantMap camJSON);
1124 
1147  QList<QVariant> getLightSources();
1148 
1154  void setLightSources( QList<QVariant> lList );
1155 
1196  QVariantMap getVisualizationOptions();
1197 
1212  void setVisualizationOptions(QVariantMap opt);
1213 
1262  QVariantMap getPainterOptions();
1263 
1278  void setPainterOptions(QVariantMap opt);
1279 
1281 #pragma endregion
1282 
1283 
1284 #pragma region OBJECT TOOLTIPS, DOCUMENTS TOOLTIPS, RESOURCES TOOLTIPS
1285 
1294  int activateObjTooltip(QString name);
1295 
1300  void deactivateObjTooltip();
1301 
1307  QString getActiveTooltipName() const;
1308 
1312  void setDocumentsTooltipsVisible( bool v );
1313 
1318 
1323  void setResourcesTooltipsVisible( bool v );
1324 
1330 
1331 
1333 #pragma endregion
1334 
1335 
1336 #pragma region _4D_SIMULATION
1337 
1339 
1344  void set4dIsActive( bool active );
1345 
1350  bool get4dIsActive();
1351 
1357  bool set4dDateTime( QDateTime dt );
1358 
1363  QDateTime get4dDateTime();
1364 
1386  QVariantMap get4dOptions();
1387 
1396  void set4dOptions( QVariantMap opt );
1397 
1402  QDateTime get4dProjectStart();
1403 
1408  QDateTime get4dProjectFinish();
1409 
1414  QStringList get4dActiveTaskList( QDateTime dt, bool linkedToObjectsOnly = false );
1415 
1420  QStringList get4dActiveTaskListByInterval( QDateTime dtStart, QDateTime dtEnd, bool linkedToObjectsOnly = false );
1421 
1426  QStringList get4dFinishedTaskList( QDateTime, bool linkedToObjectsOnly = false );
1427 
1432  QStringList get4dProspectiveTaskList( QDateTime, bool linkedToObjectsOnly = false );
1433 
1438  QString get4dTaskColor( QString taskID, QDateTime dt, QString defaultColorName = "#000" );
1439 
1441 
1442 #pragma endregion
1443 
1444 
1445 #pragma region BUILDING STRUCTURE
1446 
1458  void setBsPlanUnderlayActive(bool active);
1459 
1465  bool getBsPlanUnderlayActive();
1466 
1468 #pragma endregion
1469 
1470 
1471 #pragma region NAVIGATION MODES
1472 
1474 
1486  QString getNavigationMode();
1487 
1500  void setNavigationMode( QString mode, QString pinModeContainerID = QString() );
1501 
1502 
1510  QVariantMap getHandlerMode();
1511 
1589  bool setHandlerMode( QVariantMap handlerInfo );
1590 
1595  QStringList getCreatedPins();
1596 
1598 #pragma endregion
1599 
1600 
1601 #pragma region PICK POINTS, MEASURE
1602 
1621  QVariantMap getPickedPoint();
1622 
1651  QVariantMap getAllPickedPoints();
1652 
1669  QVariantMap getPickedPointGPS();
1670 
1688  QVariantMap getPickedPointGK();
1689 
1694  void clearMeasureItems();
1695 
1697 #pragma endregion
1698 
1699 
1700 #pragma region CLASH_DETECTION
1701 
1707  void showClashList( QString clashIdList );
1708 
1710 #pragma endregion
1711 
1712 
1713 #pragma region WEBFORMS
1714 
1738  QVariantMap getWebFormLocations();
1739 
1744  void createWebFormBookmark(QString url, QString name);
1745 
1754  int removeWebFormBookmark(QString url );
1755 
1757 #pragma endregion
1758 
1759 
1760 //#pragma region SURVEYPOINTS
1761 // ///@{ \name SURVEY POINTS
1762 //
1763 // /*
1764 // Import survey points from file and create model with object points.
1765 //
1766 // \param fileName Full file name with path
1767 // \param propName Name of property which will store value of survey point
1768 // \param delimiter Column delimiter (default: Tab)
1769 //
1770 // \return number of survey points imported if import was successful<br>
1771 // -1 file not found / file could not be opened<br>
1772 // -2 model could not be created
1773 // \since 2.2.1, 21 jun 2018, sl
1774 // */
1775 // int importSurveyPoints( QString fileName, QString propName = "spValue", QChar delimiter = '\t' );
1776 //
1777 // ///@}
1778 //#pragma endregion
1779 
1780  private:
1781 
1782  void zoomToDocumentsByList( QList<model::Element*> eleList );
1783  void zoomToResourcesByList( QList<model::Element*> eleList );
1784 
1788  NavigatorProject* getNavigatorProject();
1789 
1790  int _isPainting_;
1791 
1792  xqtgl::xQGLView* _redliningView;
1793 
1794  };
1795 
1796 }
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())
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:34
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())
Definition: ProjectAPI.h:16
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 showElementsOnly(QString IDList, QString domainCombination="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 May 5 2020 03:45:29