-// GeometryDoc.h : interface of the CGeometryDoc class\r
-//\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#if !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)\r
-#define AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_\r
-\r
-#if _MSC_VER >= 1000\r
-#pragma once\r
-#endif // _MSC_VER >= 1000\r
-\r
-#include "ISession2D_InteractiveContext.h"\r
-#include "ResultDialog.h"\r
-\r
-class Handle_AIS_Point;\r
-\r
-class CGeometryDoc : public CDocument\r
-{\r
-public:\r
- void Put2DOnTop(bool isMax = true);\r
- void Put3DOnTop(bool isMax = true);\r
- void Fit2DViews();\r
- void Set3DViewsZoom(const Quantity_Factor& Coef );\r
- void Fit3DViews(Quantity_Coefficient Coef);\r
- void simplify(const TopoDS_Shape& aShape);\r
-\r
-\r
- static void Fit();\r
-\r
- // 2D\r
-\r
- void DragEvent2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Standard_Integer TheState,\r
- const Handle_V2d_View& aView );\r
- void InputEvent2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Handle_V2d_View& aView ); \r
- void MoveEvent2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Handle_V2d_View& aView ); \r
- void ShiftMoveEvent2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Handle_V2d_View& aView ); \r
- void ShiftDragEvent2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Standard_Integer TheState,\r
- const Handle_V2d_View& aView ); \r
- void ShiftInputEvent2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Handle_V2d_View& aView ); \r
- void Popup2D (const Standard_Integer x ,\r
- const Standard_Integer y ,\r
- const Handle_V2d_View& aView ); \r
-\r
- Handle_AIS_InteractiveObject drawSurface\r
- (const Handle_Geom_Surface& theSurface,\r
- const Quantity_Color& theColor,\r
- const Standard_Boolean toDisplay);\r
-\r
+// GeometryDoc.h : interface of the CGeometryDoc class
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)
+#define AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif // _MSC_VER >= 1000
+
+#include "ISession2D_InteractiveContext.h"
+#include "ResultDialog.h"
+
+class Handle_AIS_Point;
+
+class CGeometryDoc : public CDocument
+{
+public:
+ void Put2DOnTop(bool isMax = true);
+ void Put3DOnTop(bool isMax = true);
+ void Fit2DViews();
+ void Set3DViewsZoom(const Quantity_Factor& Coef );
+ void Fit3DViews(Quantity_Coefficient Coef);
+ void simplify(const TopoDS_Shape& aShape);
+
+
+ static void Fit();
+
+ // 2D
+
+ void DragEvent2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Standard_Integer TheState,
+ const Handle_V2d_View& aView );
+ void InputEvent2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Handle_V2d_View& aView );
+ void MoveEvent2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Handle_V2d_View& aView );
+ void ShiftMoveEvent2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Handle_V2d_View& aView );
+ void ShiftDragEvent2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Standard_Integer TheState,
+ const Handle_V2d_View& aView );
+ void ShiftInputEvent2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Handle_V2d_View& aView );
+ void Popup2D (const Standard_Integer x ,
+ const Standard_Integer y ,
+ const Handle_V2d_View& aView );
+
+ Handle_AIS_InteractiveObject drawSurface
+ (const Handle_Geom_Surface& theSurface,
+ const Quantity_Color& theColor,
+ const Standard_Boolean toDisplay);
+
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
- // Waits for a user input or a period of time has been elapsed\r
-\r
+ // Waits for a user input or a period of time has been elapsed
+
Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given point
- // and displays it in the viewer if toDisplay = Standard_True\r
-\r
+ // and displays it in the viewer if toDisplay = Standard_True
+
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
const Standard_Boolean toDisplay = Standard_True);
// creates a presentation of the given shape with the given material
// (color is default for a given material)
- // and displays it in the viewer if toDisplay = Standard_True\r
-\r
-protected: // create from serialization only\r
- CGeometryDoc();\r
- DECLARE_DYNCREATE(CGeometryDoc)\r
-\r
-// Attributes\r
-public:\r
-\r
-// Operations\r
-public:\r
-\r
-// Overrides\r
- // ClassWizard generated virtual function overrides\r
- //{{AFX_VIRTUAL(CGeometryDoc)\r
- public:\r
- virtual BOOL OnNewDocument();\r
- virtual void Serialize(CArchive& ar);\r
- virtual void OnCloseDocument();\r
- //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-public:\r
- virtual ~CGeometryDoc();\r
-#ifdef _DEBUG\r
- virtual void AssertValid() const;\r
- virtual void Dump(CDumpContext& dc) const;\r
-#endif\r
-\r
-protected:\r
-\r
-// Generated message map functions\r
-protected:\r
- //{{AFX_MSG(CGeometryDoc)\r
- afx_msg void OnWindowNew2d();\r
- afx_msg void OnBUTTONTest1();\r
- afx_msg void OnBUTTONTest2();\r
- afx_msg void OnBUTTONTest3();\r
- afx_msg void OnBUTTONTest4();\r
- afx_msg void OnBUTTONTest5();\r
- afx_msg void OnBUTTONTest6();\r
- afx_msg void OnBUTTONTest7();\r
- afx_msg void OnBUTTONTest8();\r
- afx_msg void OnBUTTONTest9();\r
- afx_msg void OnBUTTONTest10();\r
- afx_msg void OnBUTTONTest11();\r
- afx_msg void OnBUTTONTest12();\r
- afx_msg void OnBUTTONTest13();\r
- afx_msg void OnBUTTONTest14();\r
- afx_msg void OnBUTTONTest15();\r
- afx_msg void OnBUTTONTest16();\r
- afx_msg void OnBUTTONTest17();\r
- afx_msg void OnBUTTONTest18();\r
- afx_msg void OnBUTTONTest19();\r
- afx_msg void OnBUTTONTest20();\r
- afx_msg void OnBUTTONTest21();\r
- afx_msg void OnBUTTONTest22();\r
- afx_msg void OnBUTTONTest23();\r
- afx_msg void OnBUTTONTest24();\r
- afx_msg void OnBUTTONTest25();\r
- afx_msg void OnBUTTONTest26();\r
- afx_msg void OnBUTTONTest27();\r
- afx_msg void OnBUTTONTest28();\r
- afx_msg void OnBUTTONTest29();\r
- afx_msg void OnBUTTONTest30();\r
- afx_msg void OnBUTTONTest31();\r
- afx_msg void OnBUTTONTest32();\r
- afx_msg void OnBUTTONTest33();\r
- afx_msg void OnBUTTONTest34();\r
- afx_msg void OnBUTTONTest35();\r
- afx_msg void OnBUTTONTest36();\r
- afx_msg void OnBUTTONTest37();\r
- afx_msg void OnBUTTONTest38();\r
- afx_msg void OnBUTTONTest39();\r
- afx_msg void OnBUTTONTest40();\r
- afx_msg void OnBUTTONTest41();\r
- afx_msg void OnBUTTONTest42();\r
- afx_msg void OnBUTTONTest43();\r
- afx_msg void OnBUTTONTest44();\r
- afx_msg void OnBUTTONTest45();\r
- afx_msg void OnBUTTONTest46();\r
- afx_msg void OnBUTTONTest47();\r
- afx_msg void OnBUTTONTest48();\r
- afx_msg void OnBUTTONTest49();\r
- afx_msg void OnBUTTONTest50();\r
- afx_msg void OnUpdateBUTTONTest1(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest2(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest3(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest4(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest5(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest6(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest7(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest8(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest9(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest10(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest11(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest12(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest13(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest14(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest15(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest16(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest17(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest18(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest19(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest20(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest21(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest22(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest23(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest24(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest25(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest26(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest27(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest28(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest29(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest30(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest31(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest32(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest33(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest34(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest35(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest36(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest37(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest38(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest39(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest40(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest41(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest42(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest43(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest44(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest45(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest46(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest47(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest48(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest49(CCmdUI* pCmdUI);\r
- afx_msg void OnUpdateBUTTONTest50(CCmdUI* pCmdUI);\r
- afx_msg void OnCreateSol();\r
- afx_msg void OnSimplify();\r
- //}}AFX_MSG\r
- DECLARE_MESSAGE_MAP()\r
-\r
-\r
-private:\r
- Handle_V3d_Viewer myViewer;\r
- Handle_V3d_Viewer myViewerCollector;\r
- Handle_AIS_InteractiveContext myAISContext;\r
-public :\r
- Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; };\r
- Handle_V3d_Viewer GetViewer() { return myViewer; };\r
- Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; };\r
-\r
-\r
-private:\r
- Handle_V2d_Viewer myViewer2D;\r
- Handle_ISession2D_InteractiveContext myISessionContext;\r
-public :\r
- int Current;\r
- void Minimize3D();\r
- void Minimize2D();\r
- Handle_V2d_Viewer GetViewer2D() { return myViewer2D; };\r
- Handle_ISession2D_InteractiveContext& GetISessionContext(){ return myISessionContext; };\r
- BOOL FitMode;\r
-\r
-public :\r
- CResultDialog myCResultDialog;\r
-\r
-};\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#endif // !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)\r
+ // and displays it in the viewer if toDisplay = Standard_True
+
+protected: // create from serialization only
+ CGeometryDoc();
+ DECLARE_DYNCREATE(CGeometryDoc)
+
+// Attributes
+public:
+
+// Operations
+public:
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CGeometryDoc)
+ public:
+ virtual BOOL OnNewDocument();
+ virtual void Serialize(CArchive& ar);
+ virtual void OnCloseDocument();
+ //}}AFX_VIRTUAL
+
+// Implementation
+public:
+ virtual ~CGeometryDoc();
+#ifdef _DEBUG
+ virtual void AssertValid() const;
+ virtual void Dump(CDumpContext& dc) const;
+#endif
+
+protected:
+
+// Generated message map functions
+protected:
+ //{{AFX_MSG(CGeometryDoc)
+ afx_msg void OnWindowNew2d();
+ afx_msg void OnBUTTONTest1();
+ afx_msg void OnBUTTONTest2();
+ afx_msg void OnBUTTONTest3();
+ afx_msg void OnBUTTONTest4();
+ afx_msg void OnBUTTONTest5();
+ afx_msg void OnBUTTONTest6();
+ afx_msg void OnBUTTONTest7();
+ afx_msg void OnBUTTONTest8();
+ afx_msg void OnBUTTONTest9();
+ afx_msg void OnBUTTONTest10();
+ afx_msg void OnBUTTONTest11();
+ afx_msg void OnBUTTONTest12();
+ afx_msg void OnBUTTONTest13();
+ afx_msg void OnBUTTONTest14();
+ afx_msg void OnBUTTONTest15();
+ afx_msg void OnBUTTONTest16();
+ afx_msg void OnBUTTONTest17();
+ afx_msg void OnBUTTONTest18();
+ afx_msg void OnBUTTONTest19();
+ afx_msg void OnBUTTONTest20();
+ afx_msg void OnBUTTONTest21();
+ afx_msg void OnBUTTONTest22();
+ afx_msg void OnBUTTONTest23();
+ afx_msg void OnBUTTONTest24();
+ afx_msg void OnBUTTONTest25();
+ afx_msg void OnBUTTONTest26();
+ afx_msg void OnBUTTONTest27();
+ afx_msg void OnBUTTONTest28();
+ afx_msg void OnBUTTONTest29();
+ afx_msg void OnBUTTONTest30();
+ afx_msg void OnBUTTONTest31();
+ afx_msg void OnBUTTONTest32();
+ afx_msg void OnBUTTONTest33();
+ afx_msg void OnBUTTONTest34();
+ afx_msg void OnBUTTONTest35();
+ afx_msg void OnBUTTONTest36();
+ afx_msg void OnBUTTONTest37();
+ afx_msg void OnBUTTONTest38();
+ afx_msg void OnBUTTONTest39();
+ afx_msg void OnBUTTONTest40();
+ afx_msg void OnBUTTONTest41();
+ afx_msg void OnBUTTONTest42();
+ afx_msg void OnBUTTONTest43();
+ afx_msg void OnBUTTONTest44();
+ afx_msg void OnBUTTONTest45();
+ afx_msg void OnBUTTONTest46();
+ afx_msg void OnBUTTONTest47();
+ afx_msg void OnBUTTONTest48();
+ afx_msg void OnBUTTONTest49();
+ afx_msg void OnBUTTONTest50();
+ afx_msg void OnUpdateBUTTONTest1(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest2(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest3(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest4(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest5(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest6(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest7(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest8(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest9(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest10(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest11(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest12(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest13(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest14(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest15(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest16(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest17(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest18(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest19(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest20(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest21(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest22(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest23(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest24(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest25(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest26(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest27(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest28(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest29(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest30(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest31(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest32(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest33(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest34(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest35(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest36(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest37(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest38(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest39(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest40(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest41(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest42(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest43(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest44(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest45(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest46(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest47(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest48(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest49(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateBUTTONTest50(CCmdUI* pCmdUI);
+ afx_msg void OnCreateSol();
+ afx_msg void OnSimplify();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+
+private:
+ Handle_V3d_Viewer myViewer;
+ Handle_V3d_Viewer myViewerCollector;
+ Handle_AIS_InteractiveContext myAISContext;
+public :
+ Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; };
+ Handle_V3d_Viewer GetViewer() { return myViewer; };
+ Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; };
+
+
+private:
+ Handle_V2d_Viewer myViewer2D;
+ Handle_ISession2D_InteractiveContext myISessionContext;
+public :
+ int Current;
+ void Minimize3D();
+ void Minimize2D();
+ Handle_V2d_Viewer GetViewer2D() { return myViewer2D; };
+ Handle_ISession2D_InteractiveContext& GetISessionContext(){ return myISessionContext; };
+ BOOL FitMode;
+
+public :
+ CResultDialog myCResultDialog;
+
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+#endif // !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)
#include <stdio.h>
-\r
+
#include <AIS_InteractiveContext.hxx>
#include <OSD_Timer.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
#include <Sphere_Sphere.hxx>
#include <AIS_Trihedron.hxx>
-#include <qapplication.h>\r
+#include <qapplication.h>
#include <qframe.h>
#include <qworkspace.h>
#include <qstatusbar.h>
#include <qmenubar.h>
#include <qmessagebox.h>
#include <qtextedit.h>
-#include <qlayout.h>\r
+#include <qlayout.h>
#include <qevent.h>
#include "global.h"
stApp = this;
myIsDocuments = false;
- // create and define the central widget\r
- QFrame* vBox = new QFrame( this );\r
+ // create and define the central widget
+ QFrame* vBox = new QFrame( this );
vBox->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- QVBoxLayout* main = new QVBoxLayout( vBox );\r
- main->setMargin( 0 );\r
-\r
- myWorkSpace = new QWorkspace( vBox );\r
+ QVBoxLayout* main = new QVBoxLayout( vBox );
+ main->setMargin( 0 );
+
+ myWorkSpace = new QWorkspace( vBox );
main->addWidget( myWorkSpace );
- setCentralWidget( vBox );\r
+ setCentralWidget( vBox );
createActions();
createCCActions();
myOutput->show();
#else
myOutput = 0;
-#endif\r
- myViewDlg = NULL;\r
+#endif
+ myViewDlg = NULL;
}
Application::~Application()
-{\r
+{
if (myViewDlg) delete myViewDlg;
if (myOutput) delete myOutput;
}
helpIcon( dir + tr( "ICON_HELP" ) ),
closeIcon( dir + tr( "ICON_CLOSE" ) ),
autoIcon( dir + tr( "ICON_AUTO_TEST" ) ),
- optimIcon( dir + tr( "ICON_OPTIM" ) ),\r
+ optimIcon( dir + tr( "ICON_OPTIM" ) ),
stopIcon( dir + tr( "ICON_STOP" ) ),
tileIcon( dir + tr( "ICON_TILE" ) ),
cascadeIcon( dir + tr( "ICON_CASCADE" ) );
// toolbar with standard actions: new, save...
- myStdToolBar = new QToolBar( this );\r
+ myStdToolBar = new QToolBar( this );
addToolBar( Qt::TopToolBarArea, myStdToolBar );
// menu with all actions
QMenu* help = menuBar()->addMenu( tr( "MEN_HELP" ) );
menuBar()->addSeparator();
- QAction* a = new QAction( newIcon, tr( "MEN_NEW" ), this );\r
- a->setToolTip( tr( "TBR_NEW" ) );\r
+ QAction* a = new QAction( newIcon, tr( "MEN_NEW" ), this );
+ a->setToolTip( tr( "TBR_NEW" ) );
a->setShortcut( Qt::CTRL+Qt::Key_N );
verify( connect( a, SIGNAL( activated() ), this, SLOT( onNewDocument() ) ) );
- myStdActions.insert( FileNewId, a ); \r
- myStdToolBar->addAction( a );\r
+ myStdActions.insert( FileNewId, a );
+ myStdToolBar->addAction( a );
myFilePopup ->addAction( a );
a = new QAction( tr( "MEN_QUIT" ), this );
- a->setShortcut( Qt::CTRL+Qt::Key_Q );\r
- a->setToolTip( tr( "TBR_QUIT" ) );\r
+ a->setShortcut( Qt::CTRL+Qt::Key_Q );
+ a->setToolTip( tr( "TBR_QUIT" ) );
verify( connect( a, SIGNAL( activated() ), qApp, SLOT( closeAllWindows() ) ) );
myStdActions.insert( FileQuitId, a );
- myFilePopup ->addAction( a );\r
+ myFilePopup ->addAction( a );
a = new QAction( tr( "MEN_TOOL_BAR" ), this );
- a->setToolTip( tr( "TBR_TOOL_BAR" ) );\r
+ a->setToolTip( tr( "TBR_TOOL_BAR" ) );
verify( connect( a, SIGNAL( activated() ), this, SLOT( onViewToolBar() ) ) );
a->setCheckable(true);
a->setChecked( true );
myStdActions.insert( ViewToolId, a );
- view->addAction( a );\r
+ view->addAction( a );
a = new QAction( tr("MEN_STATUS_BAR"), this );
- a->setToolTip( tr( "TBR_STATUS_BAR" ) );\r
+ a->setToolTip( tr( "TBR_STATUS_BAR" ) );
verify( connect( a, SIGNAL( activated() ), this, SLOT( onViewStatusBar() ) ) );
a->setCheckable(true);
a->setChecked( true );
myStdActions.insert( ViewStatusId, a );
- view->addAction( a );\r
+ view->addAction( a );
a = new QAction( helpIcon, tr( "MEN_ABOUT" ), this );
- a->setShortcut( Qt::Key_F1 );\r
- a->setToolTip( tr( "TBR_ABOUT" ) );\r
+ a->setShortcut( Qt::Key_F1 );
+ a->setToolTip( tr( "TBR_ABOUT" ) );
verify( connect( a, SIGNAL( activated() ) , this, SLOT( onAbout() ) ) );
myStdActions.insert( HelpAboutId, a );
myStdToolBar->addAction( a );
- help->addAction( a );\r
+ help->addAction( a );
myStdToolBar->addSeparator();
// Tools menu actions
a = new QAction( optimIcon, tr( "MEN_OPTIM" ), this );
- a->setToolTip( tr( "TBR_OPTIM" ) );\r
+ a->setToolTip( tr( "TBR_OPTIM" ) );
verify( connect( a, SIGNAL( toggled(bool) ) , this, SLOT( onToggleOptim(bool) ) ) );
a->setCheckable(true);
a->setChecked(Graphic3d_ArrayOfPrimitives::IsEnable());
myStdActions.insert( OptimId, a );
- myToolsMenu->addAction( a );\r
+ myToolsMenu->addAction( a );
a = new QAction( autoIcon, tr( "TBR_AUTO_TEST" ), this );
- a->setToolTip( tr( "TBR_AUTO_TEST" ) );\r
+ a->setToolTip( tr( "TBR_AUTO_TEST" ) );
verify( connect( a, SIGNAL( activated() ) , this, SLOT( onAutoTest() ) ) );
myStdActions.insert( AutoTestId, a );
- myToolsMenu->addAction( a );\r
- \r
- a = new QAction( stopIcon, tr( "TBR_STOP" ), this );\r
- a->setToolTip( tr( "TBR_STOP" ) );\r
- verify( connect( a, SIGNAL( activated() ) , this, SLOT( onStop() ) ) );\r
- myStdActions.insert( StopId, a ); \r
- myToolsMenu->addAction( a );\r
+ myToolsMenu->addAction( a );
+
+ a = new QAction( stopIcon, tr( "TBR_STOP" ), this );
+ a->setToolTip( tr( "TBR_STOP" ) );
+ verify( connect( a, SIGNAL( activated() ) , this, SLOT( onStop() ) ) );
+ myStdActions.insert( StopId, a );
+ myToolsMenu->addAction( a );
// Window menu action
a = new QAction( cascadeIcon, tr( "MEN_CASCADE" ), this );
verify( connect( a, SIGNAL( activated() ) , myWorkSpace, SLOT( cascade() ) ) );
myStdActions.insert( CascadeId, a );
- myWinMenu->addAction( a );\r
+ myWinMenu->addAction( a );
a = new QAction( tileIcon, tr( "MEN_TILE" ), this );
verify( connect( a, SIGNAL( activated() ), myWorkSpace, SLOT( tile() ) ) );
myStdActions.insert( TileId, a );
- myWinMenu->addAction( a );\r
+ myWinMenu->addAction( a );
}
{
myImportPopup = new QMenu( tr( "MEN_FILE_IMPORT" ), this );
- QAction* a = new QAction( tr( "MEN_IMPORT_BREP" ), this );\r
+ QAction* a = new QAction( tr( "MEN_IMPORT_BREP" ), this );
a->setToolTip( tr( "TBR_IMPORT_BREP" ) );
verify( connect( a, SIGNAL( activated() ) , SLOT( onTranslate() ) ) );
myCCActions.insert( FileImportBREPId, a );
for ( int i = 0; i < int(lst.count()); ++i )
{
QAction* a = myWinMenu->addAction( lst.at(i)->windowTitle(),
- this, SLOT( activateWindow() ) );\r
- a->setCheckable( true );\r
+ this, SLOT( activateWindow() ) );
+ a->setCheckable( true );
a->setChecked( myWorkSpace->activeWindow() == lst.at(i) );
}
}
}
void Application::activateWindow()
-{\r
- QAction* a = qobject_cast<QAction*>( sender() );\r
- if ( !a ) return;\r
+{
+ QAction* a = qobject_cast<QAction*>( sender() );
+ if ( !a ) return;
int idx = myWinMenu->actions().indexOf( a ) - 3; // tile, cascade and separator
QWidget* w = myWorkSpace->windowList().at( idx );
if ( w ) {
w->showNormal();
- w->setFocus();\r
+ w->setFocus();
// w->setActiveWindow();
}
}
{
QAction* optim = myStdActions.at(OptimId);
QAction* autoTest = myStdActions.at(AutoTestId);
- QAction* stop = myStdActions.at(StopId);\r
+ QAction* stop = myStdActions.at(StopId);
if( myNbDocuments ) {
myFilePopup->insertMenu( myFilePopup->actions().last(), myImportPopup );
if (optim) myStdToolBar->addAction( optim );
if (autoTest) myStdToolBar->addAction( autoTest );
- if (stop) myStdToolBar->addAction( stop );\r
+ if (stop) myStdToolBar->addAction( stop );
stop->setEnabled(false);
myIsDocuments = true;
}
{
bool show = myStdActions.at( ViewStatusId )->isChecked();
if ( show == statusBar()->isVisible() )
- return;\r
- if ( show )\r
- statusBar()->show();\r
- else\r
+ return;
+ if ( show )
+ statusBar()->show();
+ else
statusBar()->hide();
}
void Application::onWindowActivated( QWidget* w )
{
if ( w != NULL && w->inherits( "MDIWindow" ) ){
- myActiveMDI = (MDIWindow*)w;\r
- w->setFocus();\r
- }\r
- else if (myViewDlg)\r
- {\r
- delete myViewDlg; myViewDlg = NULL; \r
- }\r
+ myActiveMDI = (MDIWindow*)w;
+ w->setFocus();
+ }
+ else if (myViewDlg)
+ {
+ delete myViewDlg; myViewDlg = NULL;
+ }
}
void Application::startTimer()
{
QString qmes(mes);
MDIWindow::ResultType type = MDIWindow::Undefined;
- bool isOptOn = false;\r
- if(aOpt >= 0) {\r
- isOptOn |= (aOpt > 0);\r
- } else {\r
- isOptOn = Graphic3d_ArrayOfPrimitives::IsEnable();\r
+ bool isOptOn = false;
+ if(aOpt >= 0) {
+ isOptOn |= (aOpt > 0);
+ } else {
+ isOptOn = Graphic3d_ArrayOfPrimitives::IsEnable();
}
if (qmes.contains(tr("MES_DISPLAY"), Qt::CaseInsensitive))
type = isOptOn ? MDIWindow::DisplayOpt : MDIWindow::DisplayNonOpt;
activeWin->addResult(item, nbTriangles, value);
}
-QWorkspace* Application::workspace() const\r
-{\r
- return myWorkSpace;\r
-}\r
-\r
+QWorkspace* Application::workspace() const
+{
+ return myWorkSpace;
+}
+
void Application::keyPressEvent(QKeyEvent* e)
{
if (e->key() == Qt::Key_Escape)
if (autoDlg.exec() == QDialog::Accepted)
{
QApplication::setOverrideCursor( Qt::WaitCursor );
- myEscPressed = false;\r
+ myEscPressed = false;
myStopPressed = false;
- QAction* stop = myStdActions.at(StopId);\r
-\r
- stop->setEnabled(true);\r
+ QAction* stop = myStdActions.at(StopId);
+
+ stop->setEnabled(true);
// Define the range for testing
int startItems = autoDlg.getStartNbItems();
int stopItems = autoDlg.getStopNbItems();
- int step = autoDlg.getStep();\r
+ int step = autoDlg.getStep();
bool isTe = autoDlg.isText();
if (stopItems < startItems) stopItems = startItems;
qApp->processEvents();
if (myEscPressed || myStopPressed)
{
- QApplication::restoreOverrideCursor();\r
+ QApplication::restoreOverrideCursor();
stop->setEnabled(false);
return;
}
if (!obj->IsKind(STANDARD_TYPE(AIS_Trihedron)))
ctx->Remove(obj, false);
}
- ctx->UpdateCurrentViewer();\r
-\r
+ ctx->UpdateCurrentViewer();
+
getActiveMDI()->getView()->SetScale(3.0316);
// Generate new sphere
ctx->Display( sphere, false );
Application::stopTimer( 0, "Display Sphere::Sphere", true, useOptim);
- qApp->processEvents();\r
- if (myEscPressed || myStopPressed)\r
- {\r
- QApplication::restoreOverrideCursor();\r
- stop->setEnabled(false);\r
- return;\r
- }\r
-\r
+ qApp->processEvents();
+ if (myEscPressed || myStopPressed)
+ {
+ QApplication::restoreOverrideCursor();
+ stop->setEnabled(false);
+ return;
+ }
+
// Update the viewer
Application::startTimer();
getActiveMDI()->getView()->Update();
- Application::stopTimer( 0, "UPDATE", true, useOptim);\r
- }\r
+ Application::stopTimer( 0, "UPDATE", true, useOptim);
+ }
}
- QApplication::restoreOverrideCursor();\r
+ QApplication::restoreOverrideCursor();
stop->setEnabled(false);
}
}
myLineEdit->append( QString().setNum( myLineCounter ) + s );
myLineCounter++;
}
-\r
-void Application::InitApp()\r
-{\r
- onNewDocument();\r
-}\r
-\r
-void Application::onStop()\r
-{\r
- myStopPressed = true;\r
-}\r
-\r
-void Application::onEditViewProperties()\r
-{\r
- if ( !myViewDlg ) {\r
- myViewDlg = new ViewDlg(this);\r
- verify( connect( myWorkSpace, SIGNAL( windowActivated( QWidget* ) ),\r
- myViewDlg, SLOT( Update() ) ) );\r
- }\r
- myViewDlg->raise();\r
- myViewDlg->show();\r
-}\r
-\r
-void Application::updateViewDlg()\r
-{\r
- if(myViewDlg) myViewDlg->Update();\r
+
+void Application::InitApp()
+{
+ onNewDocument();
+}
+
+void Application::onStop()
+{
+ myStopPressed = true;
+}
+
+void Application::onEditViewProperties()
+{
+ if ( !myViewDlg ) {
+ myViewDlg = new ViewDlg(this);
+ verify( connect( myWorkSpace, SIGNAL( windowActivated( QWidget* ) ),
+ myViewDlg, SLOT( Update() ) ) );
+ }
+ myViewDlg->raise();
+ myViewDlg->show();
+}
+
+void Application::updateViewDlg()
+{
+ if(myViewDlg) myViewDlg->Update();
}
\ No newline at end of file
AutoTestDlg::AutoTestDlg(QWidget* parent)
: QDialog(parent)
-{\r
+{
setModal( true );
setWindowTitle(tr("DLG_AUTO_TEST"));
QString dir = Application::getResourceDir();
pMainLayout->addWidget(lab, 1, 0);
lab = new QLabel(tr("LAB_STEP"), this);
- pMainLayout->addWidget(lab, 2, 0);\r
-\r
- const int MinNbOfItems = 100000; // to see noticable effect\r
- const int MaxNbOfItems = 1000000; // to avoid too long computations\r
- const int ItemsStep = 100000;\r
- const int MinStep = 50000;\r
+ pMainLayout->addWidget(lab, 2, 0);
+
+ const int MinNbOfItems = 100000; // to see noticable effect
+ const int MaxNbOfItems = 1000000; // to avoid too long computations
+ const int ItemsStep = 100000;
+ const int MinStep = 50000;
const int StepStep = 50000;
- myStartSpin = new QSpinBox(this);\r
- myStartSpin->setMinimum(MinNbOfItems);\r
- myStartSpin->setMaximum(MaxNbOfItems);\r
+ myStartSpin = new QSpinBox(this);
+ myStartSpin->setMinimum(MinNbOfItems);
+ myStartSpin->setMaximum(MaxNbOfItems);
myStartSpin->setSingleStep(ItemsStep);
pMainLayout->addWidget(myStartSpin, 0, 1);
- verify(connect(myStartSpin, SIGNAL(valueChanged(int)), SLOT(checkStepSpinState())));\r
+ verify(connect(myStartSpin, SIGNAL(valueChanged(int)), SLOT(checkStepSpinState())));
myStopSpin = new QSpinBox(this);
- myStopSpin->setMinimum(MinNbOfItems);\r
- myStopSpin->setMaximum(MaxNbOfItems);\r
- myStartSpin->setSingleStep(ItemsStep);\r
- pMainLayout->addWidget(myStopSpin, 1, 1);\r
- verify(connect(myStopSpin, SIGNAL(valueChanged(int)), SLOT(setStartMaxValue(int))));\r
- verify(connect(myStopSpin, SIGNAL(valueChanged(int)), SLOT(checkStepSpinState())));\r
-\r
- const int StopSpinDefaultValue = 2 * myStartSpin -> minimum();\r
- myStopSpin -> setValue(StopSpinDefaultValue);\r
- myStartSpin -> setMaximum(myStopSpin -> value());\r
+ myStopSpin->setMinimum(MinNbOfItems);
+ myStopSpin->setMaximum(MaxNbOfItems);
+ myStartSpin->setSingleStep(ItemsStep);
+ pMainLayout->addWidget(myStopSpin, 1, 1);
+ verify(connect(myStopSpin, SIGNAL(valueChanged(int)), SLOT(setStartMaxValue(int))));
+ verify(connect(myStopSpin, SIGNAL(valueChanged(int)), SLOT(checkStepSpinState())));
+
+ const int StopSpinDefaultValue = 2 * myStartSpin -> minimum();
+ myStopSpin -> setValue(StopSpinDefaultValue);
+ myStartSpin -> setMaximum(myStopSpin -> value());
myStepSpin = new QSpinBox(this);
- myStepSpin->setMinimum(MinStep);\r
- myStepSpin->setMaximum(MaxNbOfItems - MinNbOfItems);\r
- myStepSpin->setSingleStep(StepStep);\r
+ myStepSpin->setMinimum(MinStep);
+ myStepSpin->setMaximum(MaxNbOfItems - MinNbOfItems);
+ myStepSpin->setSingleStep(StepStep);
pMainLayout->addWidget(myStepSpin, 2, 1);
lab = new QLabel(tr("LAB_ITEMS"), this);
lab = new QLabel(tr("LAB_ITEMS"), this);
pMainLayout->addWidget(lab, 2, 2);
- QFrame* separator = new QFrame(this);\r
- separator->setFrameStyle(QFrame::HLine | QFrame::Sunken);\r
- pMainLayout->addWidget(separator, 3, 0, 1, 3 );\r
-\r
+ QFrame* separator = new QFrame(this);
+ separator->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ pMainLayout->addWidget(separator, 3, 0, 1, 3 );
+
QHBoxLayout* hcbox = new QHBoxLayout();
- hcbox->setSpacing(5);\r
-\r
- myTeCheck = new QCheckBox(tr( "MEN_BTN_TEXT" ), this);\r
- hcbox->addWidget(myTeCheck);\r
- verify(connect(myTeCheck, SIGNAL(clicked()), this, SLOT(onText())));\r
- \r
- hcbox->addSpacing( 5 );\r
-\r
- pMainLayout->addLayout(hcbox, 4, 0, 1, 3);\r
-\r
- QHBoxLayout* hbox = new QHBoxLayout();\r
- hbox->setSpacing(5);\r
-\r
+ hcbox->setSpacing(5);
+
+ myTeCheck = new QCheckBox(tr( "MEN_BTN_TEXT" ), this);
+ hcbox->addWidget(myTeCheck);
+ verify(connect(myTeCheck, SIGNAL(clicked()), this, SLOT(onText())));
+
+ hcbox->addSpacing( 5 );
+
+ pMainLayout->addLayout(hcbox, 4, 0, 1, 3);
+
+ QHBoxLayout* hbox = new QHBoxLayout();
+ hbox->setSpacing(5);
+
QPushButton* btn = new QPushButton(tr("BTN_START"), this);
// btn->setDefault(true);
verify(connect(btn, SIGNAL(clicked()), this, SLOT(onStart())));
btn->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
hbox->addWidget(btn);
hbox->addSpacing(5);
- pMainLayout->addLayout(hbox, 5, 0, 1, 3);\r
+ pMainLayout->addLayout(hbox, 5, 0, 1, 3);
}
void AutoTestDlg::onStart()
void AutoTestDlg::onCancel()
{
reject();
-}\r
-\r
-void AutoTestDlg::setStartMaxValue(int i)\r
-{\r
- myStartSpin -> setMaximum(i); \r
- if (myStartSpin -> value() > myStartSpin -> maximum())\r
- myStartSpin -> setValue(myStartSpin -> maximum());\r
-}\r
-\r
-void AutoTestDlg::checkStepSpinState()\r
-{\r
- if (isVisible())\r
- {\r
- if (myStartSpin -> value() == myStopSpin -> value())\r
- myStepSpin -> setEnabled(false);\r
- else\r
- myStepSpin -> setEnabled(true);\r
- }\r
-}\r
-\r
-void AutoTestDlg::onText()\r
-{\r
- int MinNbOfItems, MaxNbOfItems, DefaultStartSpinVal, DefaultStopSpinVal,\r
- ItemsStep, MinStep, StepStep;\r
-\r
- if (myTeCheck -> isChecked())\r
- {\r
- MinNbOfItems = 1000; // to see noticeable effect\r
- MaxNbOfItems = 100000; // to avoid too long computations\r
- DefaultStartSpinVal = 10000;\r
- DefaultStopSpinVal = 20000;\r
- ItemsStep = 10000;\r
- MinStep = 5000;\r
- StepStep = 5000;\r
- }\r
- else\r
- {\r
- MinNbOfItems = 100000; // to see noticeable effect\r
- MaxNbOfItems = 1000000; // to avoid too long computations\r
- DefaultStartSpinVal = 100000;\r
- DefaultStopSpinVal = 200000;\r
- ItemsStep = 100000;\r
- MinStep = 50000;\r
- StepStep = 50000;\r
- }\r
-\r
- myStartSpin -> setRange(MinNbOfItems, MaxNbOfItems);\r
- myStartSpin -> setSingleStep(ItemsStep);\r
- myStartSpin -> setValue(DefaultStartSpinVal);\r
-\r
- myStopSpin -> setRange(MinNbOfItems, MaxNbOfItems);\r
- myStopSpin -> setSingleStep(ItemsStep);\r
-\r
- myStopSpin -> setValue(DefaultStopSpinVal);\r
- myStartSpin -> setMaximum(myStopSpin -> value());\r
-\r
- myStepSpin -> setRange(MinStep, MaxNbOfItems - MinNbOfItems);\r
- myStepSpin -> setSingleStep(StepStep);\r
- myStepSpin -> setValue(MinStep);\r
+}
+
+void AutoTestDlg::setStartMaxValue(int i)
+{
+ myStartSpin -> setMaximum(i);
+ if (myStartSpin -> value() > myStartSpin -> maximum())
+ myStartSpin -> setValue(myStartSpin -> maximum());
+}
+
+void AutoTestDlg::checkStepSpinState()
+{
+ if (isVisible())
+ {
+ if (myStartSpin -> value() == myStopSpin -> value())
+ myStepSpin -> setEnabled(false);
+ else
+ myStepSpin -> setEnabled(true);
+ }
+}
+
+void AutoTestDlg::onText()
+{
+ int MinNbOfItems, MaxNbOfItems, DefaultStartSpinVal, DefaultStopSpinVal,
+ ItemsStep, MinStep, StepStep;
+
+ if (myTeCheck -> isChecked())
+ {
+ MinNbOfItems = 1000; // to see noticeable effect
+ MaxNbOfItems = 100000; // to avoid too long computations
+ DefaultStartSpinVal = 10000;
+ DefaultStopSpinVal = 20000;
+ ItemsStep = 10000;
+ MinStep = 5000;
+ StepStep = 5000;
+ }
+ else
+ {
+ MinNbOfItems = 100000; // to see noticeable effect
+ MaxNbOfItems = 1000000; // to avoid too long computations
+ DefaultStartSpinVal = 100000;
+ DefaultStopSpinVal = 200000;
+ ItemsStep = 100000;
+ MinStep = 50000;
+ StepStep = 50000;
+ }
+
+ myStartSpin -> setRange(MinNbOfItems, MaxNbOfItems);
+ myStartSpin -> setSingleStep(ItemsStep);
+ myStartSpin -> setValue(DefaultStartSpinVal);
+
+ myStopSpin -> setRange(MinNbOfItems, MaxNbOfItems);
+ myStopSpin -> setSingleStep(ItemsStep);
+
+ myStopSpin -> setValue(DefaultStopSpinVal);
+ myStartSpin -> setMaximum(myStopSpin -> value());
+
+ myStepSpin -> setRange(MinStep, MaxNbOfItems - MinNbOfItems);
+ myStepSpin -> setSingleStep(StepStep);
+ myStepSpin -> setValue(MinStep);
}
\ No newline at end of file
Document::Document( int theIndex, Application* app )
: QObject( app )
-{\r
+{
myIndex = theIndex;
myNbViews = 0;
myApp = app;
myViewer->SetDefaultLights();
myViewer->SetLightOn();
myViewer->SetZBufferManagment(false);
- myContext = new AIS_InteractiveContext( myViewer );\r
-\r
- createNewView();\r
+ myContext = new AIS_InteractiveContext( myViewer );
+
+ createNewView();
myOperations = new ViewOperations( myContext );
}
Document::~Document()
-{\r
- qDeleteAll( myViews );\r
+{
+ qDeleteAll( myViews );
}
Application* Document::getApplication()
QWorkspace* ws = myApp->getWorkspace();
MDIWindow* w = new MDIWindow( this, ws, type );
- myViews.append( w );\r
+ myViews.append( w );
ws->addWindow( w );
//connect( w, SIGNAL( message(const QString&, int) ), myApp->statusBar(), SLOT( message(const QString&, int )) );
QString dir = Application::getResourceDir();
w->setWindowIcon( QPixmap( dir + tr( "ICON_DOC" ) ) );
- // show the very first window in maximized mode\r
+ // show the very first window in maximized mode
if ( ws->windowList().isEmpty() )
w->showMaximized();
else
- w->show();\r
+ w->show();
}
void Document::createMagView( int xMin, int yMin, int xMax, int yMax )
#include <qmainwindow.h>
#include <qapplication.h>
#include <qtranslator.h>
-#include <qpixmap.h>\r
+#include <qpixmap.h>
#include <qtranslator.h>
#include "global.h"
#include "Application.h"
-\r
-#define GLOBAL_CONTEXT "@default"\r
-\r
-class Translator : public QTranslator\r
-{\r
-public:\r
- Translator( QObject* parent = 0 ) : QTranslator( parent ) {}\r
- virtual QString translate( const char* context, \r
- const char* sourceText,\r
- const char* comment = 0 ) const\r
- {\r
- QString res = QTranslator::translate( context, sourceText, comment );\r
- if( res.isNull() )\r
- res = QTranslator::translate( GLOBAL_CONTEXT, sourceText, comment );\r
- return res;\r
- }\r
-};\r
+
+#define GLOBAL_CONTEXT "@default"
+
+class Translator : public QTranslator
+{
+public:
+ Translator( QObject* parent = 0 ) : QTranslator( parent ) {}
+ virtual QString translate( const char* context,
+ const char* sourceText,
+ const char* comment = 0 ) const
+ {
+ QString res = QTranslator::translate( context, sourceText, comment );
+ if( res.isNull() )
+ res = QTranslator::translate( GLOBAL_CONTEXT, sourceText, comment );
+ return res;
+ }
+};
int main(int argc, char* argv[])
{
app->setWindowIcon( pix );
QApplication::setOverrideCursor( Qt::WaitCursor );
- app->show();\r
- app->InitApp();\r
+ app->show();
+ app->InitApp();
QApplication::restoreOverrideCursor();
return a.exec();
#include <qmessagebox.h>
#include <qaction.h>
#include <qsplitter.h>
-#include <qmenu.h>\r
+#include <qmenu.h>
#include <qevent.h>
#include "MDIWindow.h"
myDocument = aDocument;
Handle(AIS_InteractiveContext) cxt = myDocument->getContext();
cxt->CurrentViewer()->SetDefaultTypeOfView( type );
- myView = new View( cxt, central, this );\r
- verify(connect(myView, SIGNAL(ViewInitialized()), \r
+ myView = new View( cxt, central, this );
+ verify(connect(myView, SIGNAL(ViewInitialized()),
Application::getApplication(), SLOT(updateViewDlg())));
// Graph initialization
pGraph->setYTitle(tr("LAB_SECONDS"));
pGraph->installEventFilter(this);
pGraph->setOperationEnabled(GraphView::voRect, true);
- pGraph->setOperationEnabled(GraphView::voZoom, true);\r
+ pGraph->setOperationEnabled(GraphView::voZoom, true);
pGraph->setOperationEnabled(GraphView::voZoomX, true);
pGraph->setOperationEnabled(GraphView::voZoomY, true);
- pGraph->setOperationEnabled(GraphView::voPan, true);\r
- pGraph->setOperationEnabled(GraphView::voPanX, true);\r
- pGraph->setOperationEnabled(GraphView::voPanY, true);\r
-\r
- central->setStretchFactor(0, 5);\r
- central->setStretchFactor(1, 1);\r
+ pGraph->setOperationEnabled(GraphView::voPan, true);
+ pGraph->setOperationEnabled(GraphView::voPanX, true);
+ pGraph->setOperationEnabled(GraphView::voPanY, true);
+
+ central->setStretchFactor(0, 5);
+ central->setStretchFactor(1, 1);
setCentralWidget( central );
myGraphPopup = new QMenu(pGraph);
verify( connect( myOperations, SIGNAL( setCursor( const QCursor& ) ),
SLOT( setCursor( const QCursor& ) ) ) );
- createViewActions();\r
- createGraphActions();\r
+ createViewActions();
+ createGraphActions();
}
MDIWindow::~MDIWindow()
void MDIWindow::createViewActions()
{
- QToolBar* aToolBar = new QToolBar( tr( "View Operations" ), this );\r
+ QToolBar* aToolBar = new QToolBar( tr( "View Operations" ), this );
addToolBar( Qt::TopToolBarArea, aToolBar );
QList<QAction*> aList = myOperations->getToolActions();
QActionGroup* dModeGroup = new QActionGroup( aToolBar );
- QAction* a;\r
-\r
- int i = 0;\r
- foreach( a, aList ) {\r
+ QAction* a;
+
+ int i = 0;
+ foreach( a, aList ) {
aToolBar->addAction( a );
// if ( i == 1 )
// aToolBar->addSeparator();
}
aToolBar->addSeparator();
- aList = myOperations->getViewActions();\r
+ aList = myOperations->getViewActions();
foreach( a, aList ) aToolBar->addAction( a );
}
void MDIWindow::createGraphActions()
{
- QAction* a = new QAction( tr( "MEN_GRAPH_FIT_ALL" ), this );\r
+ QAction* a = new QAction( tr( "MEN_GRAPH_FIT_ALL" ), this );
a->setToolTip( tr( "TBR_GRAPH_FIT_ALL" ) );
verify( connect( a, SIGNAL( activated() ) , this, SLOT( onGraphFitAll() ) ) );
myGraphPopup->addAction( a );
myGraphPopup->addSeparator();
a = new QAction( tr( "MEN_GRAPH_CLEAR" ), this );
- a->setToolTip( tr( "TBR_GRAPH_CLEAR" ) );\r
+ a->setToolTip( tr( "TBR_GRAPH_CLEAR" ) );
verify( connect( a, SIGNAL( activated() ) , this, SLOT( onGraphClear() ) ) );
- myGraphPopup->addAction( a );\r
+ myGraphPopup->addAction( a );
}
void MDIWindow::graphPopup(const QPoint& pos)
Handle(AIS_InteractiveContext)& cxt )
: QDialog( parent ),
myAutoApply( true ), myView( view ), myContext( cxt )
-{\r
+{
setModal( false );
setWindowTitle( tr( "TITLE_OBJECT_DLG" ) );
topLayout->addSpacing( 10 );
// view properties
- QGridLayout* pLayout = new QGridLayout( mainFrame );\r
+ QGridLayout* pLayout = new QGridLayout( mainFrame );
pLayout->setMargin( 5 );
myDegModelLabel = new QLabel( tr("MEN_DLG_DEGMODEL"), mainFrame );
myDegRatioLabel = new QLabel( tr("MEN_DLG_DEGRATIO"), mainFrame );
//QSpinBox* degRatioSpin = new QSpinBox( mainFrame );
//QSpinBox ( QWidget * parent = 0, const char * name = 0 )
- myDegRatioSpin = new QSpinBox( mainFrame );\r
- myDegRatioSpin->setRange(0, 10);\r
+ myDegRatioSpin = new QSpinBox( mainFrame );
+ myDegRatioSpin->setRange(0, 10);
myDegRatioSpin->setSingleStep(1);
verify( connect( myDegRatioSpin, SIGNAL( valueChanged( int ) ), SLOT( onDegRatio( int ) ) ) );
verify( connect( myEdgeBox, SIGNAL( activated( int ) ), SLOT( onEdgeStyle( int ) ) ) );
//myEdgeSpin = new QSpinBox( mainFrame );
- myEdgeSpin = new QSpinBox( mainFrame );\r
- myEdgeSpin->setRange(1, 10);\r
+ myEdgeSpin = new QSpinBox( mainFrame );
+ myEdgeSpin->setRange(1, 10);
myEdgeSpin->setSingleStep(10);
verify( connect( myEdgeSpin, SIGNAL( valueChanged( int ) ), SLOT( onEdgeWidth( int ) ) ) );
QHBoxLayout* applyLayout = new QHBoxLayout();
applyLayout->addWidget( autoApply );
- applyLayout->addStretch( 10 );\r
+ applyLayout->addStretch( 10 );
topLayout->addLayout(applyLayout);
topLayout->addSpacing( 10 );
verify( connect( bOk, SIGNAL( clicked() ), SLOT( onOk() ) ) );
bCancel = new QPushButton( tr( "BTN_CANCEL" ), this );
verify( connect( bCancel, SIGNAL( clicked() ), SLOT( onCancel() ) ) );
-// bHelp = new QPushButton( tr( "BTN_HELP" ), this );\r
-// verify( connect( bHelp, SIGNAL( clicked() ), SLOT( onHelp() ) ) );\r
+// bHelp = new QPushButton( tr( "BTN_HELP" ), this );
+// verify( connect( bHelp, SIGNAL( clicked() ), SLOT( onHelp() ) ) );
QHBoxLayout* btnLayout = new QHBoxLayout();
btnLayout->setSpacing( 5 );
- btnLayout->addStretch( 10 );\r
+ btnLayout->addStretch( 10 );
btnLayout->addWidget( bOk );
btnLayout->addWidget( bCancel );
btnLayout->addStretch( 10 );
// btnLayout->addWidget( bHelp );
- topLayout->addLayout(btnLayout);\r
+ topLayout->addLayout(btnLayout);
QSize s = topLayout->totalMinimumSize();
s.setWidth( s.width() + topLayout->margin() + 10 );
}
void ObjectDlg::updateEdgeAspect( bool edgeStyle )
-{\r
- Aspect_TypeOfLine type;\r
- if ( edgeStyle ) \r
- switch( myCurrentEdgeStyle ) {\r
- case SolidEdgeId :\r
- type = Aspect_TOL_SOLID;\r
- break;\r
- case DashEdgeId :\r
- type = Aspect_TOL_DASH;\r
- break;\r
- case DotEdgeId :\r
- type = Aspect_TOL_DOT;\r
- break;\r
- case DotDashEdgeId :\r
- type = Aspect_TOL_DOTDASH;\r
- break;\r
- }\r
- Handle(AIS_InteractiveObject) object;\r
- Handle(Prs3d_ShadingAspect) aspect;\r
- myContext->InitSelected();\r
- for( ; myContext->MoreSelected(); myContext->NextSelected() ) {\r
- object = myContext->SelectedInteractive();\r
- aspect = object->Attributes()->ShadingAspect();\r
- if ( edgeStyle )\r
- aspect->Aspect()->SetEdgeLineType( type );\r
- else\r
- aspect->Aspect()->SetEdgeWidth( myCurrentEdgeWidth );\r
- object->SetAspect( aspect );\r
- }\r
- if ( myAutoApply )\r
- //myContext->UpdateCurrentViewer();\r
- myView->Viewer()->Update();\r
+{
+ Aspect_TypeOfLine type;
+ if ( edgeStyle )
+ switch( myCurrentEdgeStyle ) {
+ case SolidEdgeId :
+ type = Aspect_TOL_SOLID;
+ break;
+ case DashEdgeId :
+ type = Aspect_TOL_DASH;
+ break;
+ case DotEdgeId :
+ type = Aspect_TOL_DOT;
+ break;
+ case DotDashEdgeId :
+ type = Aspect_TOL_DOTDASH;
+ break;
+ }
+ Handle(AIS_InteractiveObject) object;
+ Handle(Prs3d_ShadingAspect) aspect;
+ myContext->InitSelected();
+ for( ; myContext->MoreSelected(); myContext->NextSelected() ) {
+ object = myContext->SelectedInteractive();
+ aspect = object->Attributes()->ShadingAspect();
+ if ( edgeStyle )
+ aspect->Aspect()->SetEdgeLineType( type );
+ else
+ aspect->Aspect()->SetEdgeWidth( myCurrentEdgeWidth );
+ object->SetAspect( aspect );
+ }
+ if ( myAutoApply )
+ //myContext->UpdateCurrentViewer();
+ myView->Viewer()->Update();
}
void ObjectDlg::updateDegenerationModel()
#include <Prs3d_ShadingAspect.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Drawer.hxx>
-#include <Graphic3d_ArrayOfPrimitives.hxx>\r
+#include <Graphic3d_ArrayOfPrimitives.hxx>
#include <Sphere_Sphere.hxx>
#include <gp_Pnt.hxx>
Handle(AIS_InteractiveContext)& cxt )
: QDialog( parent ),
myView( view ), myContext( cxt )
-{\r
+{
setModal( false );
setWindowTitle( tr( "TITLE_SHAPE_DLG" ) );
myNbPanes = 0;
myNbItems = 0;
- QVBoxLayout* topLayout = new QVBoxLayout( this );\r
+ QVBoxLayout* topLayout = new QVBoxLayout( this );
topLayout->setMargin( 5 );
// radius frame
topLayout->addSpacing( 10 );
QHBoxLayout* rBox = new QHBoxLayout( rFrame );
- rBox->setMargin( 5 );\r
+ rBox->setMargin( 5 );
QLabel* rad = new QLabel( tr( "MEN_DLG_RADIUS" ), rFrame );
- QDoubleSpinBox* rSpin = new QDoubleSpinBox( rFrame );\r
- rSpin->setRange( 1, 10000 );\r
- rSpin->setSingleStep( 1 );\r
+ QDoubleSpinBox* rSpin = new QDoubleSpinBox( rFrame );
+ rSpin->setRange( 1, 10000 );
+ rSpin->setSingleStep( 1 );
// rSpin->setValueDouble( myRadius );
- rSpin->setValue( myRadius );\r
+ rSpin->setValue( myRadius );
// verify( connect( rSpin, SIGNAL( sbdValueChanged( double ) ), SLOT( onRadiusChanged( double ) ) ) );
- verify( connect( rSpin, SIGNAL( valueChanged( double ) ), SLOT( onRadiusChanged( double ) ) ) );\r
+ verify( connect( rSpin, SIGNAL( valueChanged( double ) ), SLOT( onRadiusChanged( double ) ) ) );
rBox->addWidget( rad );
rBox->addWidget( rSpin );
// sphere position frame
QFrame* pFrame = new QFrame( this );
QHBoxLayout* pBox = new QHBoxLayout( pFrame );
- pBox->setMargin( 5 );\r
+ pBox->setMargin( 5 );
pFrame->setFrameStyle( QFrame::Box | QFrame::Sunken );
topLayout->addWidget( pFrame );
lY = new QLabel( tr( "MEN_DLG_Y" ), pFrame );
lZ = new QLabel( tr( "MEN_DLG_Z" ), pFrame );
- myXSpin = new QDoubleSpinBox( pFrame );\r
- myXSpin->setRange( -10000, 10000 );\r
- myXSpin->setSingleStep( 1 );\r
- myXSpin->setValue( 0 );\r
- connect(myXSpin, SIGNAL(valueChanged (double)), SLOT(onPositionChanged()));\r
- myYSpin = new QDoubleSpinBox( pFrame );\r
- myYSpin->setRange( -10000, 10000 );\r
- myYSpin->setSingleStep( 1 );\r
- myYSpin->setValue( 0 );\r
- connect(myYSpin, SIGNAL(valueChanged (double)), SLOT(onPositionChanged()));\r
- myZSpin = new QDoubleSpinBox( pFrame );\r
- myZSpin->setRange( -10000, 10000 );\r
- myZSpin->setSingleStep( 1 );\r
- myZSpin->setValue( 0 );\r
- connect(myZSpin, SIGNAL(valueChanged (double)), SLOT(onPositionChanged()));\r
- \r
+ myXSpin = new QDoubleSpinBox( pFrame );
+ myXSpin->setRange( -10000, 10000 );
+ myXSpin->setSingleStep( 1 );
+ myXSpin->setValue( 0 );
+ connect(myXSpin, SIGNAL(valueChanged (double)), SLOT(onPositionChanged()));
+ myYSpin = new QDoubleSpinBox( pFrame );
+ myYSpin->setRange( -10000, 10000 );
+ myYSpin->setSingleStep( 1 );
+ myYSpin->setValue( 0 );
+ connect(myYSpin, SIGNAL(valueChanged (double)), SLOT(onPositionChanged()));
+ myZSpin = new QDoubleSpinBox( pFrame );
+ myZSpin->setRange( -10000, 10000 );
+ myZSpin->setSingleStep( 1 );
+ myZSpin->setValue( 0 );
+ connect(myZSpin, SIGNAL(valueChanged (double)), SLOT(onPositionChanged()));
+
pBox->addStretch( 2 );
pBox->addWidget( lX );
// sphere aspect frame
QFrame* aFrame = new QFrame( this );
QHBoxLayout* aBox = new QHBoxLayout( aFrame );
- aBox->setMargin( 5 );\r
+ aBox->setMargin( 5 );
aFrame->setFrameStyle( QFrame::Box | QFrame::Sunken );
topLayout->addWidget( aFrame );
myVTexel->setText( tr( "MEN_BTN_VTEXEL" ) );
//verify( connect( myVTexel, SIGNAL( toggled( bool ) ), SLOT( onShowEdges( bool ) ) ) );
- myText = new QCheckBox( aFrame );\r
- myText->setText( tr( "MEN_BTN_TEXT" ) );\r
- verify( connect( myText, SIGNAL( clicked() ), SLOT( onText() ) ) );\r
-\r
+ myText = new QCheckBox( aFrame );
+ myText->setText( tr( "MEN_BTN_TEXT" ) );
+ verify( connect( myText, SIGNAL( clicked() ), SLOT( onText() ) ) );
+
aBox->addStretch( 2 );
aBox->addWidget( myVNormal );
aBox->addStretch( 2 );
aBox->addStretch( 2 );
aBox->addWidget( myVTexel );
aBox->addStretch( 2 );
- aBox->addWidget( myText );\r
- aBox->addStretch( 2 );\r
+ aBox->addWidget( myText );
+ aBox->addStretch( 2 );
// tesselation frame
QFrame* tFrame = new QFrame( this );
QHBoxLayout* tBox = new QHBoxLayout( tFrame );
- tBox->setMargin( 5 );\r
+ tBox->setMargin( 5 );
tFrame->setFrameStyle( QFrame::Box | QFrame::Sunken );
topLayout->addWidget( tFrame );
panes = new QLabel( tr( "MEN_DLG_PANES" ), tFrame );
items = new QLabel( tr( "MEN_DLG_ITEMS" ), tFrame );
- myDefSpin = new QDoubleSpinBox( tFrame );\r
- myDefSpin->setRange( 0.1, 13 );\r
- myDefSpin->setSingleStep( 0.1 );\r
- myDefSpin->setValue( 1 );\r
- verify( connect( myDefSpin, SIGNAL( valueChanged( double ) ), SLOT( onDeflectionChanged( double ) ) ) );\r
- myPanesSpin = new QSpinBox( tFrame );\r
- myPanesSpin->setRange( 8, 10000 );\r
- myPanesSpin->setSingleStep( 1 );\r
+ myDefSpin = new QDoubleSpinBox( tFrame );
+ myDefSpin->setRange( 0.1, 13 );
+ myDefSpin->setSingleStep( 0.1 );
+ myDefSpin->setValue( 1 );
+ verify( connect( myDefSpin, SIGNAL( valueChanged( double ) ), SLOT( onDeflectionChanged( double ) ) ) );
+ myPanesSpin = new QSpinBox( tFrame );
+ myPanesSpin->setRange( 8, 10000 );
+ myPanesSpin->setSingleStep( 1 );
verify( connect( myPanesSpin, SIGNAL( valueChanged( int ) ), SLOT( onPanesChanged( int ) ) ) );
myItemsSpin = new QSpinBox( tFrame );
- myItemsSpin->setRange( 25, 10000000 );\r
- myItemsSpin->setSingleStep( 1 );\r
+ myItemsSpin->setRange( 25, 10000000 );
+ myItemsSpin->setSingleStep( 1 );
verify( connect( myItemsSpin, SIGNAL( valueChanged( int ) ), SLOT( onItemsChanged( int ) ) ) );
tBox->addWidget( defl );
bOk->setDefault(true);
verify( connect( bOk, SIGNAL( clicked() ), SLOT( onOk() ) ) );
bCancel = new QPushButton( tr( "BTN_CANCEL" ), this );
- verify( connect( bCancel, SIGNAL( clicked() ), SLOT( onCancel() ) ) );\r
+ verify( connect( bCancel, SIGNAL( clicked() ), SLOT( onCancel() ) ) );
verify( connect( this, SIGNAL( destroyed() ), SLOT( onCancel() ) ) );
-// bHelp = new QPushButton( tr( "BTN_HELP" ), this );\r
-// verify( connect( bHelp, SIGNAL( clicked() ), SLOT( onHelp() ) ) );\r
+// bHelp = new QPushButton( tr( "BTN_HELP" ), this );
+// verify( connect( bHelp, SIGNAL( clicked() ), SLOT( onHelp() ) ) );
QHBoxLayout* btnLayout = new QHBoxLayout();
- btnLayout->setSpacing( 5 );\r
+ btnLayout->setSpacing( 5 );
btnLayout->addStretch( 10 );
btnLayout->addWidget( bOk );
btnLayout->addWidget( bCancel );
- btnLayout->addStretch( 10 );\r
-// btnLayout->addWidget( bHelp );\r
- topLayout->addLayout( btnLayout );\r
+ btnLayout->addStretch( 10 );
+// btnLayout->addWidget( bHelp );
+ topLayout->addLayout( btnLayout );
QSize s = topLayout->totalMinimumSize();
s.setWidth( s.width() + topLayout->margin() + 10 );
// myXSpin->setValueDouble( 0 );
// myYSpin->setValueDouble( 0 );
// myZSpin->setValueDouble( 0 );
- myXSpin->setValue( 0 );\r
- myYSpin->setValue( 0 );\r
- myZSpin->setValue( 0 );\r
+ myXSpin->setValue( 0 );
+ myYSpin->setValue( 0 );
+ myZSpin->setValue( 0 );
onRadiusChanged( myRadius );
}
myPanesSpin->blockSignals( false );
myItemsSpin->blockSignals( false );
-\r
+
updateSphere();
}
myPanesSpin->blockSignals( true );
// myDefSpin->setValueDouble( myDeflection );
- myDefSpin->setValue( myDeflection );\r
+ myDefSpin->setValue( myDeflection );
myPanesSpin->setValue( myNbPanes );
myDefSpin->blockSignals( false );
myItemsSpin->blockSignals( true );
// myDefSpin->setValueDouble( myDeflection );
- myDefSpin->setValue( myDeflection );\r
+ myDefSpin->setValue( myDeflection );
myItemsSpin->setValue( myNbItems );
myDefSpin->blockSignals( false );
updateSphere();
}
-\r
-void ShapeDlg::onText()\r
-{\r
- updateSphere();\r
-}\r
-\r
+
+void ShapeDlg::onText()
+{
+ updateSphere();
+}
+
void ShapeDlg::updateSphere()
{
Application::stopTimer( 0, "UPDATE", !visible );
QApplication::restoreOverrideCursor();
}
-\r
-void ShapeDlg::onPositionChanged()\r
-{\r
- updateSphere();\r
-}\r
-\r
-void ShapeDlg::closeEvent ( QCloseEvent* e )\r
-{\r
- onCancel();\r
-}\r
+
+void ShapeDlg::onPositionChanged()
+{
+ updateSphere();
+}
+
+void ShapeDlg::closeEvent ( QCloseEvent* e )
+{
+ onCancel();
+}
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#endif
-\r
-#include <Graphic3d_AspectText3d.hxx>\r
-\r
-Standard_CString stText="Test";\r
-Standard_Integer stTextHeight=10;\r
+
+#include <Graphic3d_AspectText3d.hxx>
+
+Standard_CString stText="Test";
+Standard_Integer stTextHeight=10;
static void ShadeWithVertex(const Handle(Graphic3d_Group) aGroup,
const gp_Pnt aPosition,
const Standard_Real aRadius,
- const Standard_Real aDeflection,\r
- const Standard_Boolean isText,\r
+ const Standard_Real aDeflection,
+ const Standard_Boolean isText,
const Standard_Boolean isOptText)
{
Standard_Real R1,R2;
Standard_Real Dalpha = 2.*Standard_PI/nbpanes;
Standard_Integer i,j;
- aPosition.Coord (Xc, Yc, Zc);\r
- if(isText) {\r
- Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();\r
- Text3d->SetTextureMappedFont(isOptText);\r
- aGroup->SetPrimitivesAspect(Text3d);\r
- }\r
+ aPosition.Coord (Xc, Yc, Zc);
+ if(isText) {
+ Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();
+ Text3d->SetTextureMappedFont(isOptText);
+ aGroup->SetPrimitivesAspect(Text3d);
+ }
#ifdef G005
if( Graphic3d_ArrayOfPrimitives::IsEnable() ) {
Standard_False,Standard_False,Standard_False,Standard_False);
Handle(Graphic3d_ArrayOfQuadrangles) pquad =
new Graphic3d_ArrayOfQuadrangles(4*nbpanes*(nbpanes/2-2),0,
- Standard_False,Standard_False,Standard_False,Standard_False);\r
- aGroup->BeginPrimitives();\r
+ Standard_False,Standard_False,Standard_False,Standard_False);
+ aGroup->BeginPrimitives();
for( j=0; j<nbpanes/2; j++ ) {
Alpha = 0.;
R1 = aRadius*sin(Beta);
X4 = R1*cos(Alpha);
Y4 = R1*sin(Alpha);
if( j == 0 ) {
- ptri->AddVertex(X1+Xc,Y1+Yc,Z1+Zc);\r
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
- ptri->AddVertex(X2+Xc,Y2+Yc,Z2+Zc);\r
+ ptri->AddVertex(X1+Xc,Y1+Yc,Z1+Zc);
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
+ ptri->AddVertex(X2+Xc,Y2+Yc,Z2+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
- ptri->AddVertex(X3+Xc,Y3+Yc,Z3+Zc);\r
+ ptri->AddVertex(X3+Xc,Y3+Yc,Z3+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
} else if( j == nbpanes/2-1 ) {
- ptri->AddVertex(X1+Xc,Y1+Yc,Z1+Zc);\r
+ ptri->AddVertex(X1+Xc,Y1+Yc,Z1+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
- ptri->AddVertex(X2+Xc,Y2+Yc,Z2+Zc);\r
+ ptri->AddVertex(X2+Xc,Y2+Yc,Z2+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
- ptri->AddVertex(X4+Xc,Y4+Yc,Z4+Zc);\r
+ ptri->AddVertex(X4+Xc,Y4+Yc,Z4+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
} else {
- pquad->AddVertex(X1+Xc,Y1+Yc,Z1+Zc);\r
+ pquad->AddVertex(X1+Xc,Y1+Yc,Z1+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
- pquad->AddVertex(X2+Xc,Y2+Yc,Z2+Zc);\r
+ pquad->AddVertex(X2+Xc,Y2+Yc,Z2+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
- pquad->AddVertex(X3+Xc,Y3+Yc,Z3+Zc);\r
+ pquad->AddVertex(X3+Xc,Y3+Yc,Z3+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
- pquad->AddVertex(X4+Xc,Y4+Yc,Z4+Zc);\r
+ pquad->AddVertex(X4+Xc,Y4+Yc,Z4+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
}
}
} else
#endif
{
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
Graphic3d_Array1OfVertex TriVertex(1,3*nbpanes*2);
Graphic3d_Array1OfVertex QuadVertex(1,4*nbpanes*(nbpanes/2-2));
Aspect_Array1OfEdge TriEdge(1,3*nbpanes*2);
Y4 = R1*sin(Alpha);
if( j == 0 ) {
nt++;
- TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);\r
+ TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
- TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);\r
+ TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
- TriVertex(nt).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);\r
+ TriVertex(nt).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else if( j == nbpanes/2-1 ) {
nt++;
- TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);\r
+ TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
- TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);\r
+ TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
- TriVertex(nt).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);\r
+ TriVertex(nt).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else {
nq++;
- QuadVertex(nq).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);\r
+ QuadVertex(nq).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
- QuadVertex(nq).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);\r
+ QuadVertex(nq).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
- QuadVertex(nq).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);\r
+ QuadVertex(nq).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
- QuadVertex(nq).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);\r
+ QuadVertex(nq).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
QuadEdge(nq).SetValues(nq,nq-3,Aspect_TOE_VISIBLE);
}
static void ShadeWithVertexN(const Handle(Graphic3d_Group) aGroup,
const gp_Pnt aPosition,
const Standard_Real aRadius,
- const Standard_Real aDeflection,\r
- const Standard_Boolean isText,\r
+ const Standard_Real aDeflection,
+ const Standard_Boolean isText,
const Standard_Boolean isOptText)
{
Standard_Real R1,R2;
Standard_Real Dalpha = 2.*Standard_PI/nbpanes;
Standard_Integer i,j;
- aPosition.Coord (Xc, Yc, Zc);\r
- if(isText) {\r
- Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();\r
- Text3d->SetTextureMappedFont(isOptText);\r
- aGroup->SetPrimitivesAspect(Text3d);\r
- }\r
+ aPosition.Coord (Xc, Yc, Zc);
+ if(isText) {
+ Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();
+ Text3d->SetTextureMappedFont(isOptText);
+ aGroup->SetPrimitivesAspect(Text3d);
+ }
#ifdef G005
if( Graphic3d_ArrayOfPrimitives::IsEnable() ) {
Handle(Graphic3d_ArrayOfTriangles) ptri =
Standard_True,Standard_False,Standard_False,Standard_False);
Handle(Graphic3d_ArrayOfQuadrangles) pquad =
new Graphic3d_ArrayOfQuadrangles(4*nbpanes*(nbpanes/2-2),0,
- Standard_True,Standard_False,Standard_False,Standard_False);\r
- aGroup->BeginPrimitives();\r
+ Standard_True,Standard_False,Standard_False,Standard_False);
+ aGroup->BeginPrimitives();
for( j=0; j<nbpanes/2; j++ ) {
Alpha = 0.;
R1 = aRadius*sin(Beta);
X4 = R1*cos(Alpha);
Y4 = R1*sin(Alpha);
if( j == 0 ) {
- ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),\r
+ ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),
gp_Vec(X3/aRadius,Y3/aRadius,Z3/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
} else if( j == nbpanes/2-1 ) {
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),
gp_Vec(X4/aRadius,Y4/aRadius,Z4/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
} else {
pquad->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),
gp_Vec(X3/aRadius,Y3/aRadius,Z3/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),
gp_Vec(X4/aRadius,Y4/aRadius,Z4/aRadius));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
}
}
}
aGroup->EndPrimitives();
} else
#endif
- {\r
- aGroup->BeginPrimitives();\r
+ {
+ aGroup->BeginPrimitives();
Graphic3d_Array1OfVertexN TriVertex(1,3*nbpanes*2);
Graphic3d_Array1OfVertexN QuadVertex(1,4*nbpanes*(nbpanes/2-2));
Aspect_Array1OfEdge TriEdge(1,3*nbpanes*2);
if( j == 0 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
TriVertex(nt).SetNormal(X3/aRadius,Y3/aRadius,Z3/aRadius);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else if( j == nbpanes/2-1 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
TriVertex(nt).SetNormal(X4/aRadius,Y4/aRadius,Z4/aRadius);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else {
nq++;
QuadVertex(nq).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X3/aRadius,Y3/aRadius,Z3/aRadius);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X4/aRadius,Y4/aRadius,Z4/aRadius);
QuadEdge(nq).SetValues(nq,nq-3,Aspect_TOE_VISIBLE);
}
static void ShadeWithVertexC(const Handle(Graphic3d_Group) aGroup,
const gp_Pnt aPosition,
const Standard_Real aRadius,
- const Standard_Real aDeflection,\r
- const Standard_Boolean isText,\r
+ const Standard_Real aDeflection,
+ const Standard_Boolean isText,
const Standard_Boolean isOptText)
{
Standard_Real R1,R2;
Standard_Integer i,j;
aPosition.Coord (Xc, Yc, Zc);
- if(isText) {\r
- Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();\r
- Text3d->SetTextureMappedFont(isOptText);\r
- aGroup->SetPrimitivesAspect(Text3d);\r
- }\r
+ if(isText) {
+ Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();
+ Text3d->SetTextureMappedFont(isOptText);
+ aGroup->SetPrimitivesAspect(Text3d);
+ }
#ifdef G005
if( Graphic3d_ArrayOfPrimitives::IsEnable() ) {
Handle(Graphic3d_ArrayOfTriangles) ptri =
Handle(Graphic3d_ArrayOfQuadrangles) pquad =
new Graphic3d_ArrayOfQuadrangles(4*nbpanes*(nbpanes/2-2),0,
Standard_False,Standard_True,Standard_False,Standard_False);
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
for( j=0; j<nbpanes/2; j++ ) {
Alpha = 0.;
R1 = aRadius*sin(Beta);
0.5+Y4/aRadius/2.,0.5+Z4/aRadius/2.,Quantity_TOC_RGB);
if( j == 0 ) {
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),C1);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),C2);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),C3);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
} else if( j == nbpanes/2-1 ) {
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),C1);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),C2);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),C4);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
} else {
pquad->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),C1);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),C2);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),C3);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),C4);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
}
}
}
} else
#endif
{
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
Graphic3d_Array1OfVertexC TriVertex(1,3*nbpanes*2);
Graphic3d_Array1OfVertexC QuadVertex(1,4*nbpanes*(nbpanes/2-2));
Aspect_Array1OfEdge TriEdge(1,3*nbpanes*2);
if( j == 0 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetColor(C1);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetColor(C2);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
TriVertex(nt).SetColor(C3);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else if( j == nbpanes/2-1 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetColor(C1);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetColor(C2);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
TriVertex(nt).SetColor(C4);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else {
nq++;
QuadVertex(nq).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
QuadVertex(nq).SetColor(C1);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
QuadVertex(nq).SetColor(C2);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
QuadVertex(nq).SetColor(C3);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
QuadVertex(nq).SetColor(C4);
QuadEdge(nq).SetValues(nq,nq-3,Aspect_TOE_VISIBLE);
}
static void ShadeWithVertexNC(const Handle(Graphic3d_Group) aGroup,
const gp_Pnt aPosition,
const Standard_Real aRadius,
- const Standard_Real aDeflection,\r
- const Standard_Boolean isText,\r
+ const Standard_Real aDeflection,
+ const Standard_Boolean isText,
const Standard_Boolean isOptText)
{
Standard_Real R1,R2;
Standard_Integer i,j;
aPosition.Coord (Xc, Yc, Zc);
- if(isText) {\r
- Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();\r
- Text3d->SetTextureMappedFont(isOptText);\r
- aGroup->SetPrimitivesAspect(Text3d);\r
- }\r
+ if(isText) {
+ Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();
+ Text3d->SetTextureMappedFont(isOptText);
+ aGroup->SetPrimitivesAspect(Text3d);
+ }
#ifdef G005
if( Graphic3d_ArrayOfPrimitives::IsEnable() ) {
Handle(Graphic3d_ArrayOfTriangles) ptri =
Handle(Graphic3d_ArrayOfQuadrangles) pquad =
new Graphic3d_ArrayOfQuadrangles(4*nbpanes*(nbpanes/2-2),0,
Standard_True,Standard_True,Standard_False,Standard_False);
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
for( j=0; j<nbpanes/2; j++ ) {
Alpha = 0.;
R1 = aRadius*sin(Beta);
if( j == 0 ) {
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius),C1);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius),C2);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),
gp_Vec(X3/aRadius,Y3/aRadius,Z3/aRadius),C3);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
} else if( j == nbpanes/2-1 ) {
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius),C1);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius),C2);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),
gp_Vec(X4/aRadius,Y4/aRadius,Z4/aRadius),C4);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
} else {
pquad->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius),C1);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius),C2);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),
gp_Vec(X3/aRadius,Y3/aRadius,Z3/aRadius),C3);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),
gp_Vec(X4/aRadius,Y4/aRadius,Z4/aRadius),C4);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
}
}
}
} else
#endif
{
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
Graphic3d_Array1OfVertexNC TriVertex(1,3*nbpanes*2);
Graphic3d_Array1OfVertexNC QuadVertex(1,4*nbpanes*(nbpanes/2-2));
Aspect_Array1OfEdge TriEdge(1,3*nbpanes*2);
if( j == 0 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
TriVertex(nt).SetColor(C1);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
TriVertex(nt).SetColor(C2);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
TriVertex(nt).SetNormal(X3/aRadius,Y3/aRadius,Z3/aRadius);
TriVertex(nt).SetColor(C3);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else if( j == nbpanes/2-1 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
TriVertex(nt).SetColor(C1);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
TriVertex(nt).SetColor(C2);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
TriVertex(nt).SetNormal(X4/aRadius,Y4/aRadius,Z4/aRadius);
TriVertex(nt).SetColor(C4);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else {
nq++;
QuadVertex(nq).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
QuadVertex(nq).SetColor(C1);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
QuadVertex(nq).SetColor(C2);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X3/aRadius,Y3/aRadius,Z3/aRadius);
QuadVertex(nq).SetColor(C3);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X4/aRadius,Y4/aRadius,Z4/aRadius);
QuadVertex(nq).SetColor(C4);
QuadEdge(nq).SetValues(nq,nq-3,Aspect_TOE_VISIBLE);
static void ShadeWithVertexNT(const Handle(Graphic3d_Group) aGroup,
const gp_Pnt aPosition,
const Standard_Real aRadius,
- const Standard_Real aDeflection,\r
- const Standard_Boolean isText,\r
+ const Standard_Real aDeflection,
+ const Standard_Boolean isText,
const Standard_Boolean isOptText)
{
Standard_Real R1,R2;
Standard_Integer i,j;
aPosition.Coord (Xc, Yc, Zc);
- if(isText) {\r
- Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();\r
- Text3d->SetTextureMappedFont(isOptText);\r
- aGroup->SetPrimitivesAspect(Text3d);\r
- }\r
+ if(isText) {
+ Handle(Graphic3d_AspectText3d) Text3d = new Graphic3d_AspectText3d();
+ Text3d->SetTextureMappedFont(isOptText);
+ aGroup->SetPrimitivesAspect(Text3d);
+ }
#ifdef G005
if( Graphic3d_ArrayOfPrimitives::IsEnable() ) {
Handle(Graphic3d_ArrayOfTriangles) ptri =
Handle(Graphic3d_ArrayOfQuadrangles) pquad =
new Graphic3d_ArrayOfQuadrangles(4*nbpanes*(nbpanes/2-2),0,
Standard_True,Standard_False,Standard_True,Standard_False);
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
for( j=0; j<nbpanes/2; j++ ) {
Alpha = 0.;
R1 = aRadius*sin(Beta);
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius),
gp_Pnt2d(Tx1,Ty1));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius),
gp_Pnt2d(Tx1,Ty2));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),
gp_Vec(X3/aRadius,Y3/aRadius,Z3/aRadius),
gp_Pnt2d(Tx2,Ty2));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
} else if( j == nbpanes/2-1 ) {
ptri->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius),
gp_Pnt2d(Tx1,Ty1));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius),
gp_Pnt2d(Tx1,Ty2));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
ptri->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),
gp_Vec(X4/aRadius,Y4/aRadius,Z4/aRadius),
gp_Pnt2d(Tx2,Ty1));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
} else {
pquad->AddVertex(gp_Pnt(X1+Xc,Y1+Yc,Z1+Zc),
gp_Vec(X1/aRadius,Y1/aRadius,Z1/aRadius),
gp_Pnt2d(Tx1,Ty1));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X2+Xc,Y2+Yc,Z2+Zc),
gp_Vec(X2/aRadius,Y2/aRadius,Z2/aRadius),
gp_Pnt2d(Tx1,Ty2));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X3+Xc,Y3+Yc,Z3+Zc),
gp_Vec(X3/aRadius,Y3/aRadius,Z3/aRadius),
gp_Pnt2d(Tx2,Ty2));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
pquad->AddVertex(gp_Pnt(X4+Xc,Y4+Yc,Z4+Zc),
gp_Vec(X4/aRadius,Y4/aRadius,Z4/aRadius),
gp_Pnt2d(Tx2,Ty1));
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
}
}
}
} else
#endif
{
- aGroup->BeginPrimitives();\r
+ aGroup->BeginPrimitives();
Graphic3d_Array1OfVertexNT TriVertex(1,3*nbpanes*2);
Graphic3d_Array1OfVertexNT QuadVertex(1,4*nbpanes*(nbpanes/2-2));
Aspect_Array1OfEdge TriEdge(1,3*nbpanes*2);
if( j == 0 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
TriVertex(nt).SetTextureCoordinate(Tx1,Ty1);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
TriVertex(nt).SetTextureCoordinate(Tx1,Ty2);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
TriVertex(nt).SetNormal(X3/aRadius,Y3/aRadius,Z3/aRadius);
TriVertex(nt).SetTextureCoordinate(Tx2,Ty2);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else if( j == nbpanes/2-1 ) {
nt++;
TriVertex(nt).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
TriVertex(nt).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
TriVertex(nt).SetTextureCoordinate(Tx1,Ty1);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
TriVertex(nt).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
TriVertex(nt).SetTextureCoordinate(Tx1,Ty2);
TriEdge(nt).SetValues(nt,nt+1,Aspect_TOE_VISIBLE);
nt++;
TriVertex(nt).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
TriVertex(nt).SetNormal(X4/aRadius,Y4/aRadius,Z4/aRadius);
TriVertex(nt).SetTextureCoordinate(Tx2,Ty1);
TriEdge(nt).SetValues(nt,nt-2,Aspect_TOE_VISIBLE);
} else {
nq++;
QuadVertex(nq).SetCoord(X1+Xc,Y1+Yc,Z1+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X1+Xc,Y1+Yc,Z1+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X1/aRadius,Y1/aRadius,Z1/aRadius);
QuadVertex(nq).SetTextureCoordinate(Tx1,Ty1);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X2+Xc,Y2+Yc,Z2+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X2+Xc,Y2+Yc,Z2+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X2/aRadius,Y2/aRadius,Z2/aRadius);
QuadVertex(nq).SetTextureCoordinate(Tx1,Ty2);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X3+Xc,Y3+Yc,Z3+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X3+Xc,Y3+Yc,Z3+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X3/aRadius,Y3/aRadius,Z3/aRadius);
QuadVertex(nq).SetTextureCoordinate(Tx2,Ty2);
QuadEdge(nq).SetValues(nq,nq+1,Aspect_TOE_VISIBLE);
nq++;
QuadVertex(nq).SetCoord(X4+Xc,Y4+Yc,Z4+Zc);
- if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);\r
+ if(isText) aGroup->Text(stText,Graphic3d_Vertex(X4+Xc,Y4+Yc,Z4+Zc), stTextHeight);
QuadVertex(nq).SetNormal(X4/aRadius,Y4/aRadius,Z4/aRadius);
QuadVertex(nq).SetTextureCoordinate(Tx2,Ty1);
QuadEdge(nq).SetValues(nq,nq-3,Aspect_TOE_VISIBLE);
const Standard_Real aDeflection,
const Standard_Boolean hasVNormals,
const Standard_Boolean hasVColors,
- const Standard_Boolean hasVTexels,\r
- const Standard_Boolean hasText,\r
+ const Standard_Boolean hasVTexels,
+ const Standard_Boolean hasText,
const Standard_Boolean isOptText
) :
Sphere_BasicShape(BRepPrimAPI_MakeSphere(aRadius).Shape(),
aDeflection,hasVNormals,hasVColors,hasVTexels),
-myRadius(aRadius),\r
+myRadius(aRadius),
myText(hasText),
-myOptText(isOptText)\r
+myOptText(isOptText)
{
gp_Trsf trsf;
trsf.SetTranslation(gp_Vec(aPosition.X(),aPosition.Y(),aPosition.Z()));
'filter'
*/
QString Translate::selectFileName( const QString& filter, bool isImport ) const
-{\r
- return isImport ? \r
- QFileDialog::getOpenFileName( QApplication::activeWindow(), tr("INF_APP_IMPORT"), QString::null, filter ) : \r
- QFileDialog::getSaveFileName( QApplication::activeWindow(), tr("INF_APP_EXPORT"), QString::null, filter );\r
+{
+ return isImport ?
+ QFileDialog::getOpenFileName( QApplication::activeWindow(), tr("INF_APP_IMPORT"), QString::null, filter ) :
+ QFileDialog::getSaveFileName( QApplication::activeWindow(), tr("INF_APP_EXPORT"), QString::null, filter );
/*
QFileDialog fd ( 0, 0, true );
fd.setFilters( filter );
qApp->processEvents();
- return ( ret == QDialog::Accepted ? fd.selectedFile() : QString::null );\r
+ return ( ret == QDialog::Accepted ? fd.selectedFile() : QString::null );
*/
}
#include <qpainter.h>
#include <qmenu.h>
#include <qcolordialog.h>
-#include <qcursor.h>\r
-#include <qevent.h>\r
+#include <qcursor.h>
+#include <qevent.h>
#include <qrubberband.h>
#include "View.h"
View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent, MDIWindow* mdi )
: QWidget( parent ), myMDI( mdi ), myRubberBand( 0 )
{
- setBackgroundRole( QPalette::NoRole );//NoBackground );\r
- // set focus policy to threat QContextMenuEvent from keyboard \r
- setFocusPolicy( Qt::StrongFocus );\r
- setAttribute( Qt::WA_PaintOnScreen );\r
- setAttribute( Qt::WA_NoSystemBackground );\r
-\r
+ setBackgroundRole( QPalette::NoRole );//NoBackground );
+ // set focus policy to threat QContextMenuEvent from keyboard
+ setFocusPolicy( Qt::StrongFocus );
+ setAttribute( Qt::WA_PaintOnScreen );
+ setAttribute( Qt::WA_NoSystemBackground );
+
#ifndef WNT
XSynchronize( x11Display(), true ); // it is possible to use QApplication::syncX();
#endif
*/
Visual *v = DefaultVisual( x11Display(), DefaultScreen( x11Display() ) );
int visualID = XVisualIDFromVisual( v );
-\r
+
/* Here we use the settings from
Optimizer_ViewInfo::TxglCreateWindow()
*/
int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1,
GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER,
- None };\r
+ None };
pVisualInfo = ::glXChooseVisual (x11Display(), DefaultScreen(x11Display()), visualAttr);
- if ( isVisible() )\r
+ if ( isVisible() )
hide();
XSetWindowAttributes a;
int count;
if ( XGetWMColormapWindows( x11Display(), topLevelWidget()->winId(),
&cmwret, &count ) ) {
- cmw = new Window[count+1];\r
- memcpy( (char *)cmw, (char *)cmwret, sizeof(Window)*count );\r
- XFree( (char *)cmwret );\r
- int i;\r
- for (i = 0; i < count; i++) {\r
- if ( cmw[i] == winId() ) { /* replace old window */\r
- cmw[i] = w;\r
- break;\r
- }\r
- }\r
- if ( i >= count ) /* append new window */\r
- cmw[count++] = w;\r
- } else {\r
- count = 1;\r
- cmw = new Window[count];\r
- cmw[0] = w;\r
- }\r
- /* Creating new window (with good VisualID) for this widget */\r
- create( w );\r
- XSetWMColormapWindows( x11Display(), topLevelWidget()->winId(), cmw, count );\r
- delete [] cmw;\r
-\r
- if ( isVisible() )\r
- show();\r
- if ( pVisualInfo ) {\r
- XFree( (char *)pVisualInfo );\r
- }\r
- XFlush( x11Display() );\r
- }\r
-#endif // !defined WNT\r
- \r
- // will be set in OnInitial update, but, for more security :\r
- myCurrentMode = CurAction3d_Nothing;\r
- setMouseTracking( true );\r
- myView = NULL;\r
+ cmw = new Window[count+1];
+ memcpy( (char *)cmw, (char *)cmwret, sizeof(Window)*count );
+ XFree( (char *)cmwret );
+ int i;
+ for (i = 0; i < count; i++) {
+ if ( cmw[i] == winId() ) { /* replace old window */
+ cmw[i] = w;
+ break;
+ }
+ }
+ if ( i >= count ) /* append new window */
+ cmw[count++] = w;
+ } else {
+ count = 1;
+ cmw = new Window[count];
+ cmw[0] = w;
+ }
+ /* Creating new window (with good VisualID) for this widget */
+ create( w );
+ XSetWMColormapWindows( x11Display(), topLevelWidget()->winId(), cmw, count );
+ delete [] cmw;
+
+ if ( isVisible() )
+ show();
+ if ( pVisualInfo ) {
+ XFree( (char *)pVisualInfo );
+ }
+ XFlush( x11Display() );
+ }
+#endif // !defined WNT
+
+ // will be set in OnInitial update, but, for more security :
+ myCurrentMode = CurAction3d_Nothing;
+ setMouseTracking( true );
+ myView = NULL;
}
View::~View()
-{\r
+{
}
void View::init()
-{\r
- myView = myContext->CurrentViewer()->CreateView();\r
- int windowHandle = (int) winId();\r
- short hi, lo;\r
- lo = (short) windowHandle;\r
- hi = (short) ( windowHandle >> 16 );\r
-#ifdef WNT\r
- Handle(WNT_Window) hWnd = \r
- new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::\r
- DownCast( myContext->CurrentViewer()->Device() ) , (int) hi, (int) lo );\r
-#else\r
- Handle(Xw_Window) hWnd = \r
- new Xw_Window( Handle(Graphic3d_GraphicDevice)::\r
- DownCast( myContext->CurrentViewer()->Device() ),\r
- (int) hi, (int) lo, Xw_WQ_SAMEQUALITY, Quantity_NOC_BLACK );\r
-#endif // WNT\r
- myView->SetWindow( hWnd );\r
- if ( !hWnd->IsMapped() )\r
- hWnd->Map();\r
- myView->SetBackgroundColor(Quantity_NOC_GRAY40);\r
- myView->MustBeResized();\r
-\r
- Handle(Geom_Axis2Placement) anAxis = new Geom_Axis2Placement( gp::XOY() );\r
- myTrihedron = new AIS_Trihedron( anAxis );\r
- myContext->Display( myTrihedron );\r
-\r
- //myView->SetAntialiasingOn();\r
- myComputedModeIsOn = true;\r
- myView->SetScale(3.0316);\r
-\r
- // This is to update View properties dialog\r
- emit ViewInitialized();\r
-}\r
+{
+ myView = myContext->CurrentViewer()->CreateView();
+ int windowHandle = (int) winId();
+ short hi, lo;
+ lo = (short) windowHandle;
+ hi = (short) ( windowHandle >> 16 );
+#ifdef WNT
+ Handle(WNT_Window) hWnd =
+ new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::
+ DownCast( myContext->CurrentViewer()->Device() ) , (int) hi, (int) lo );
+#else
+ Handle(Xw_Window) hWnd =
+ new Xw_Window( Handle(Graphic3d_GraphicDevice)::
+ DownCast( myContext->CurrentViewer()->Device() ),
+ (int) hi, (int) lo, Xw_WQ_SAMEQUALITY, Quantity_NOC_BLACK );
+#endif // WNT
+ myView->SetWindow( hWnd );
+ if ( !hWnd->IsMapped() )
+ hWnd->Map();
+ myView->SetBackgroundColor(Quantity_NOC_GRAY40);
+ myView->MustBeResized();
+
+ Handle(Geom_Axis2Placement) anAxis = new Geom_Axis2Placement( gp::XOY() );
+ myTrihedron = new AIS_Trihedron( anAxis );
+ myContext->Display( myTrihedron );
+
+ //myView->SetAntialiasingOn();
+ myComputedModeIsOn = true;
+ myView->SetScale(3.0316);
+
+ // This is to update View properties dialog
+ emit ViewInitialized();
+}
void View::paintEvent ( QPaintEvent * e)
{
case CurAction3d_GlobalPanning :// noting
break;
case CurAction3d_DynamicRotation :
- if (!myComputedModeIsOn){\r
- myView->SetComputedMode(false);\r
- }\r
+ if (!myComputedModeIsOn){
+ myView->SetComputedMode(false);
+ }
myView->SetAnimationModeOn();
myView->StartRotation(point.x(),point.y());
break;
void View::onRButtonDown( Qt::KeyboardModifiers nFlags, const QPoint point )
{
- if ( nFlags == CASCADESHORTCUTKEY ) {\r
+ if ( nFlags == CASCADESHORTCUTKEY ) {
if ( !myComputedModeIsOn )
myView->SetComputedMode(false);
-// Standard_Boolean anim, deg;\r
-// anim = myView->AnimationMode( deg );\r
-// if ( anim /*&& deg*/ ) {\r
+// Standard_Boolean anim, deg;
+// anim = myView->AnimationMode( deg );
+// if ( anim /*&& deg*/ ) {
myCycleCounter = 0;
Application::startTimer();
- myView->SetAnimationModeOn();\r
+ myView->SetAnimationModeOn();
// myView->SetAnimationMode(true,true);
// myContext->DeactivateStandardMode( TopAbs_SHAPE );
// }
emit noActiveActions();
break;
case CurAction3d_DynamicRotation :
- myCurrentMode = CurAction3d_Nothing;\r
+ myCurrentMode = CurAction3d_Nothing;
myView->SetAnimationModeOff();
emit noActiveActions();
break;
QApplication::setOverrideCursor( Qt::WaitCursor );
// reset computed mode according to the stored one
// --> dynamic rotation may have change it
-\r
+
if (!myComputedModeIsOn)
- { \r
+ {
myView->SetComputedMode(false);
myComputedModeIsOn = Standard_False;
} else
- {\r
+ {
myView->SetComputedMode(false);
myComputedModeIsOn = Standard_True;
- }\r
+ }
//if ( myView->AnimationModeIsOn() ) {
myView->SetAnimationModeOff();
{
QMenu* popMenu = new QMenu( this );
- if( myContext->NbCurrents()) {\r
- QAction* a;\r
- myContext->InitCurrent();\r
- if (! myContext->Current()->IsKind(STANDARD_TYPE(AIS_Trihedron)))\r
+ if( myContext->NbCurrents()) {
+ QAction* a;
+ myContext->InitCurrent();
+ if (! myContext->Current()->IsKind(STANDARD_TYPE(AIS_Trihedron)))
{
a = new QAction( tr( "MEN_POP_OBJPROP" ), this );
- verify( connect( a, SIGNAL( activated() ), SLOT( onEditObjectProperties() ) ) );\r
+ verify( connect( a, SIGNAL( activated() ), SLOT( onEditObjectProperties() ) ) );
popMenu->addAction( a );
QMenu* dMode = popMenu->addMenu( tr( "MEN_POP_DISPLAYMODE" ) );
a = new QAction( tr( "MEN_POP_WIREFRAME" ), this );
- verify( connect( a, SIGNAL( activated() ), SLOT( onWireframeMode() ) ) );\r
+ verify( connect( a, SIGNAL( activated() ), SLOT( onWireframeMode() ) ) );
dMode->addAction( a );
-\r
+
a = new QAction( tr( "MEN_POP_SHADING" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onShadingMode() ) ) );
- dMode->addAction( a );\r
+ dMode->addAction( a );
}
a = new QAction( tr( "MEN_POP_REMOVEOBJECT" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onRemoveObject() ) ) );
- popMenu->addAction( a );\r
+ popMenu->addAction( a );
}
else {
QAction* a = new QAction( tr( "MEN_POP_VIEWPROP" ), this );
verify( connect( a, SIGNAL( activated() ), Application::getApplication(), SLOT( onEditViewProperties() ) ) );
- popMenu->addAction( a );\r
+ popMenu->addAction( a );
a = new QAction( tr( "MEN_POP_IMPORT" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onImportObject() ) ) );
- popMenu->addAction( a );\r
+ popMenu->addAction( a );
popMenu->addSeparator();
if ( myContext->IsDisplayed( myTrihedron ) ) {
a = new QAction( tr( "MEN_POP_ERASETRIHEDRON" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onEraseTrihedron() ) ) );
- popMenu->addAction( a );\r
+ popMenu->addAction( a );
}
else {
a = new QAction( tr( "MEN_POP_DISPLAYTRIHEDRON" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onDisplayTrihedron() ) ) );
- popMenu->addAction( a );\r
+ popMenu->addAction( a );
}
popMenu->addSeparator();
a = new QAction( tr( "MEN_POP_CREATESHAPE" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onCreateShape() ) ) );
- popMenu->addAction( a );\r
+ popMenu->addAction( a );
QMenu* loadObj = popMenu->addMenu( tr( "MEN_POP_LOADOBJECT" ) );
a = new QAction( tr( "MEN_POP_BOX" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onLoadBox() ) ) );
- loadObj->addAction( a );\r
+ loadObj->addAction( a );
a = new QAction( tr( "MEN_POP_SPHERE" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onLoadSphere() ) ) );
- loadObj->addAction( a );\r
+ loadObj->addAction( a );
a = new QAction( tr( "MEN_POP_TORUS" ), this );
verify( connect( a, SIGNAL( activated() ), SLOT( onLoadTorus() ) ) );
- loadObj->addAction( a );\r
+ loadObj->addAction( a );
-// a = new QAction( tr( "MEN_POP_LINE" ), this );\r
-// verify( connect( a, SIGNAL( activated() ), SLOT( onLoadLine() ) ) );\r
-// loadObj->addAction( a );\r
+// a = new QAction( tr( "MEN_POP_LINE" ), this );
+// verify( connect( a, SIGNAL( activated() ), SLOT( onLoadLine() ) ) );
+// loadObj->addAction( a );
}
popMenu->exec( QCursor::pos() );
}
void View::DrawRectangle( int MinX, int MinY, int MaxX, int MaxY, bool Draw )
-{\r
- if ( !myRubberBand )\r
- myRubberBand = new QRubberBand( QRubberBand::Rectangle, this );\r
- \r
- myRubberBand->setGeometry( QRect( QPoint( MinX, MinY ), QPoint( MaxX, MaxY ) ).normalized() );\r
- myRubberBand->setVisible( Draw );\r
+{
+ if ( !myRubberBand )
+ myRubberBand = new QRubberBand( QRubberBand::Rectangle, this );
+
+ myRubberBand->setGeometry( QRect( QPoint( MinX, MinY ), QPoint( MaxX, MaxY ) ).normalized() );
+ myRubberBand->setVisible( Draw );
/*
QPainter thePainter(this);
thePainter.setRasterOp(Qt::XorROP);
thePainter.drawRect(aRect);
m_IsVisible = true;
}
- */\r
+ */
}
void View::onImportObject()
}
void View::onCreateShape()
-{\r
+{
myView->SetScale(3.0316);
if ( !myShapeDlg )
myShapeDlg = new ShapeDlg( Application::getApplication(), myView, myContext );
}
void View::onLoadBox()
-{\r
+{
myView->SetScale(1.0);
Standard_Real size = myContext->CurrentViewer()->DefaultViewSize() / 4.;
gp_Pnt origin( -size / 2., -size / 2., -size / 2. );
}
void View::onLoadSphere()
-{\r
+{
myView->SetScale(1.0);
Standard_Real radius = myContext->CurrentViewer()->DefaultViewSize() / 4.;
Handle(AIS_Shape) sphere =
}
void View::onLoadTorus()
-{\r
+{
myView->SetScale(1.0);
Handle(V3d_Viewer) viewer = myContext->CurrentViewer();
Standard_Real r1 = viewer->DefaultViewSize() / 3.;
}
void View::onLoadLine()
-{\r
+{
myView->SetScale(1.0);
Handle(AIS_Line) line =
new AIS_Line( new Geom_Line( gp_Pnt( 0, 0, 0), gp_Dir( 0, 0, 1) ) );
}
void View::onShadingMode()
-{\r
- \r
- myContext->InitSelected();\r
- for( ; myContext->MoreSelected(); myContext->NextSelected() ) {\r
- Handle(AIS_InteractiveObject) obj = myContext->SelectedInteractive();\r
- //myContext->Erase( obj, false );\r
- //myContext->Display( obj /*, 1, 0*/, false );\r
- //myContext->Activate( obj, 0 );\r
- myContext->SetDisplayMode( obj, 1 );\r
- }\r
- myContext->UpdateCurrentViewer();\r
- \r
+{
+
+ myContext->InitSelected();
+ for( ; myContext->MoreSelected(); myContext->NextSelected() ) {
+ Handle(AIS_InteractiveObject) obj = myContext->SelectedInteractive();
+ //myContext->Erase( obj, false );
+ //myContext->Display( obj /*, 1, 0*/, false );
+ //myContext->Activate( obj, 0 );
+ myContext->SetDisplayMode( obj, 1 );
+ }
+ myContext->UpdateCurrentViewer();
+
}
void View::onDisplayTrihedron()
#include <qcombobox.h>
#include <V3d_TypeOfVisualization.hxx>
-\r
+
#include "Application.h"
#include "ViewDlg.h"
#include "global.h"
ViewDlg::ViewDlg( QWidget* parent/*, Handle(V3d_View)& view*/ )
:QDialog( parent ),
myAutoApply( true ), /*myView( view ),*/ myApplyAllViews(false)
-{\r
+{
setModal( false );
setWindowTitle( tr( "TITLE_VIEW_DLG" ) );
topLayout->addSpacing( 10 );
// view properties
- QGridLayout* pLayout = new QGridLayout( mainFrame );\r
+ QGridLayout* pLayout = new QGridLayout( mainFrame );
pLayout->setMargin( 5 );
myZBufferBox = new QCheckBox( mainFrame );;
myZBufferBox->setText( tr( "BTN_ZBUFFER" ) );
- verify( connect( myZBufferBox, SIGNAL( toggled( bool ) ), SLOT( onZBuffer( bool ) ) ) );\r
+ verify( connect( myZBufferBox, SIGNAL( toggled( bool ) ), SLOT( onZBuffer( bool ) ) ) );
myAnimBox = new QCheckBox( mainFrame );
myAnimBox->setText( tr( "BTN_ANIMATION" ) );
- verify( connect( myAnimBox, SIGNAL( toggled( bool ) ), SLOT( onAnimation( bool ) ) ) );\r
+ verify( connect( myAnimBox, SIGNAL( toggled( bool ) ), SLOT( onAnimation( bool ) ) ) );
myDegBox = new QCheckBox( mainFrame );
myDegBox->setText( tr( "BTN_DEGENERATION" ) );
pLayout->addWidget( myAnimBox, 1, 0 );
pLayout->addWidget( myDegBox, 2, 0 );
pLayout->setRowStretch( 3, 10 );
- pLayout->setColumnStretch( 1, 10 );\r
+ pLayout->setColumnStretch( 1, 10 );
// apply controls
QCheckBox *autoApply, *applyAllViews;
QHBoxLayout* applyLayout = new QHBoxLayout();
applyLayout->addWidget( autoApply );
applyLayout->addStretch( 10 );
- applyLayout->addWidget( applyAllViews );\r
+ applyLayout->addWidget( applyAllViews );
topLayout->addLayout( applyLayout );
topLayout->addSpacing( 10 );
// control buttons
- QPushButton *bOk, *bCancel/*, *bHelp*/;\r
- \r
+ QPushButton *bOk, *bCancel/*, *bHelp*/;
+
bOk = new QPushButton( tr( "BTN_OK" ), this );
- verify( connect( bOk, SIGNAL( clicked() ), SLOT( onOk() ) ) );\r
+ verify( connect( bOk, SIGNAL( clicked() ), SLOT( onOk() ) ) );
bOk->setDefault(true);
bCancel = new QPushButton( tr( "BTN_CANCEL" ), this );
- verify( connect( bCancel, SIGNAL( clicked() ), SLOT( onCancel() ) ) );\r
-\r
+ verify( connect( bCancel, SIGNAL( clicked() ), SLOT( onCancel() ) ) );
+
-// bHelp = new QPushButton( tr( "BTN_HELP" ), this );\r
-// verify( connect( bHelp, SIGNAL( clicked() ), SLOT( onHelp() ) ) );\r
+// bHelp = new QPushButton( tr( "BTN_HELP" ), this );
+// verify( connect( bHelp, SIGNAL( clicked() ), SLOT( onHelp() ) ) );
QHBoxLayout* btnLayout = new QHBoxLayout();
- btnLayout->setSpacing( 5 );\r
- btnLayout->addStretch( 10 );\r
+ btnLayout->setSpacing( 5 );
+ btnLayout->addStretch( 10 );
btnLayout->addWidget( bOk );
btnLayout->addWidget( bCancel );
btnLayout->addStretch( 10 );
-// btnLayout->addWidget( bHelp );\r
+// btnLayout->addWidget( bHelp );
topLayout->addLayout( btnLayout );
QSize s = topLayout->totalMinimumSize();
s.setWidth( s.width() + topLayout->margin() + 10 );
s.setHeight( s.height() + topLayout->margin() + 10 );
- setFixedSize( s );\r
-\r
- Handle(V3d_View) aView = Application::getApplication()->getActiveMDI()->getView();\r
- myIsAnim = aView->AnimationMode(myIsDeg);\r
+ setFixedSize( s );
+
+ Handle(V3d_View) aView = Application::getApplication()->getActiveMDI()->getView();
+ myIsAnim = aView->AnimationMode(myIsDeg);
}
ViewDlg::~ViewDlg()
}
void ViewDlg::showEvent ( QShowEvent* e )
-{\r
- Update();\r
- QWidget::showEvent( e );\r
+{
+ Update();
+ QWidget::showEvent( e );
}
void ViewDlg::onOk()
{
- hide();\r
- bool Auto = myAutoApply;\r
-\r
- myAutoApply = true;\r
- onZBuffer(myZBufferBox->isChecked());\r
- onAnimation(myAnimBox->isChecked());\r
- onDegeneration(myDegBox->isChecked());\r
+ hide();
+ bool Auto = myAutoApply;
+
+ myAutoApply = true;
+ onZBuffer(myZBufferBox->isChecked());
+ onAnimation(myAnimBox->isChecked());
+ onDegeneration(myDegBox->isChecked());
myAutoApply = Auto;
}
{
hide();
}
-\r
+
void ViewDlg::onHelp()
{
}
void ViewDlg::onZBuffer( bool on )
-{\r
- QWidgetList aWidgetList;\r
- Handle(V3d_View) aView;\r
- QWidget* aWidget;\r
-\r
- if (!myApplyAllViews)\r
- aWidgetList.append(Application::getApplication()->getActiveMDI());\r
- else\r
- aWidgetList = Application::getWorkspace()->windowList();\r
-\r
- if ( myAutoApply ){\r
- foreach(aWidget, aWidgetList){\r
- if ( !aWidget ) continue;\r
- MDIWindow* aMDIWindow = (MDIWindow*)aWidget;\r
- aView = aMDIWindow->getView();\r
+{
+ QWidgetList aWidgetList;
+ Handle(V3d_View) aView;
+ QWidget* aWidget;
+
+ if (!myApplyAllViews)
+ aWidgetList.append(Application::getApplication()->getActiveMDI());
+ else
+ aWidgetList = Application::getWorkspace()->windowList();
+
+ if ( myAutoApply ){
+ foreach(aWidget, aWidgetList){
+ if ( !aWidget ) continue;
+ MDIWindow* aMDIWindow = (MDIWindow*)aWidget;
+ aView = aMDIWindow->getView();
if ( on )
aView->SetVisualization( V3d_ZBUFFER );
else
- aView->SetVisualization( V3d_WIREFRAME );\r
- }\r
+ aView->SetVisualization( V3d_WIREFRAME );
+ }
}
}
void ViewDlg::onAnimation( bool on )
-{\r
- QWidgetList aWidgetList;\r
- Handle(V3d_View) aView;\r
-\r
- myIsAnim = on;\r
- myDegBox->setEnabled( myIsAnim );\r
- if (!myIsAnim) myDegBox->setChecked(false);\r
-\r
- if (!myApplyAllViews)\r
- aWidgetList.append(Application::getApplication()->getActiveMDI());\r
- else\r
- aWidgetList = Application::getWorkspace()->windowList();\r
- \r
- if ( myAutoApply ){\r
- QWidget* aWidget;\r
- foreach(aWidget, aWidgetList){\r
- if ( !aWidget ) continue;\r
- MDIWindow* aMDIWindow = (MDIWindow*)aWidget;\r
+{
+ QWidgetList aWidgetList;
+ Handle(V3d_View) aView;
+
+ myIsAnim = on;
+ myDegBox->setEnabled( myIsAnim );
+ if (!myIsAnim) myDegBox->setChecked(false);
+
+ if (!myApplyAllViews)
+ aWidgetList.append(Application::getApplication()->getActiveMDI());
+ else
+ aWidgetList = Application::getWorkspace()->windowList();
+
+ if ( myAutoApply ){
+ QWidget* aWidget;
+ foreach(aWidget, aWidgetList){
+ if ( !aWidget ) continue;
+ MDIWindow* aMDIWindow = (MDIWindow*)aWidget;
aView = aMDIWindow->getView();
- aView->SetAnimationMode( myIsAnim, myIsDeg );\r
- aView->Redraw();\r
- aView->SetImmediateUpdate(true);\r
- aView->Update();\r
+ aView->SetAnimationMode( myIsAnim, myIsDeg );
+ aView->Redraw();
+ aView->SetImmediateUpdate(true);
+ aView->Update();
}
- } \r
+ }
}
void ViewDlg::onDegeneration( bool on )
-{\r
- QWidgetList aWidgetList;\r
- Handle(V3d_View) aView;\r
- QWidget* aWidget;\r
-\r
- if (!myApplyAllViews)\r
- aWidgetList.append(Application::getApplication()->getActiveMDI());\r
- else\r
- aWidgetList = Application::getWorkspace()->windowList();\r
-\r
+{
+ QWidgetList aWidgetList;
+ Handle(V3d_View) aView;
+ QWidget* aWidget;
+
+ if (!myApplyAllViews)
+ aWidgetList.append(Application::getApplication()->getActiveMDI());
+ else
+ aWidgetList = Application::getWorkspace()->windowList();
+
myIsDeg = on;
- if ( myAutoApply ){\r
- foreach(aWidget, aWidgetList){\r
- if ( !aWidget ) continue;\r
- MDIWindow* aMDIWindow = (MDIWindow*)aWidget;\r
- aView = aMDIWindow->getView();\r
- aView->SetAnimationMode( myIsAnim, myIsDeg );\r
- }\r
+ if ( myAutoApply ){
+ foreach(aWidget, aWidgetList){
+ if ( !aWidget ) continue;
+ MDIWindow* aMDIWindow = (MDIWindow*)aWidget;
+ aView = aMDIWindow->getView();
+ aView->SetAnimationMode( myIsAnim, myIsDeg );
+ }
}
}
}
void ViewDlg::onApplyAllViews( bool on )
-{\r
+{
myApplyAllViews = on;
}
-\r
-void ViewDlg::Update()\r
-{\r
- MDIWindow* anActiveMDIWindow = Application::getApplication()->getActiveMDI();\r
- if (anActiveMDIWindow){\r
- Handle(V3d_View) aView = anActiveMDIWindow->getView();\r
- if(!aView.IsNull()){\r
- \r
- myIsAnim = aView->AnimationMode( myIsDeg );\r
- myAnimBox->blockSignals( true );\r
- myDegBox->blockSignals( true );\r
- myAnimBox->setChecked( myIsAnim );\r
- myDegBox->setChecked( myIsDeg );\r
- myDegBox->setEnabled( myIsAnim );\r
- myAnimBox->blockSignals( false );\r
- myDegBox->blockSignals( false );\r
-\r
- myZBufferBox->blockSignals(true);\r
- V3d_TypeOfVisualization aVisuType = aView->Visualization();\r
- if(aVisuType == V3d_WIREFRAME)\r
- myZBufferBox -> setChecked(false);\r
- else\r
- myZBufferBox -> setChecked(true);\r
- myZBufferBox->blockSignals(false);\r
- }\r
- }\r
-}\r
+
+void ViewDlg::Update()
+{
+ MDIWindow* anActiveMDIWindow = Application::getApplication()->getActiveMDI();
+ if (anActiveMDIWindow){
+ Handle(V3d_View) aView = anActiveMDIWindow->getView();
+ if(!aView.IsNull()){
+
+ myIsAnim = aView->AnimationMode( myIsDeg );
+ myAnimBox->blockSignals( true );
+ myDegBox->blockSignals( true );
+ myAnimBox->setChecked( myIsAnim );
+ myDegBox->setChecked( myIsDeg );
+ myDegBox->setEnabled( myIsAnim );
+ myAnimBox->blockSignals( false );
+ myDegBox->blockSignals( false );
+
+ myZBufferBox->blockSignals(true);
+ V3d_TypeOfVisualization aVisuType = aView->Visualization();
+ if(aVisuType == V3d_WIREFRAME)
+ myZBufferBox -> setChecked(false);
+ else
+ myZBufferBox -> setChecked(true);
+ myZBufferBox->blockSignals(false);
+ }
+ }
+}
void ViewOperations::initViewActions()
{
- if ( myViewActions.count() )\r
+ if ( myViewActions.count() )
return;
QString dir = Application::getResourceDir();
QAction* a;
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_FITALL" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_FITALL" ) ), "", this );
a->setToolTip( tr( "TBR_FITALL" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewFitAllId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_FITAREA" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_FITAREA" ) ), "", this );
a->setToolTip( tr( "TBR_FITAREA" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
a->setCheckable( true );
verify( connect( a, SIGNAL( toggled( bool ) ), SLOT( updateToggled( bool ) ) ) );
myViewActions.insert( ViewFitAreaId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_ZOOM" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_ZOOM" ) ), "", this );
a->setToolTip( tr( "TBR_ZOOM" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
a->setCheckable( true );
verify( connect( a, SIGNAL( toggled( bool ) ), SLOT( updateToggled( bool ) ) ) );
myViewActions.insert( ViewZoomId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_PAN" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_PAN" ) ), "", this );
a->setToolTip( tr( "TBR_PAN" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
a->setCheckable( true );
verify( connect( a, SIGNAL( toggled( bool ) ), SLOT( updateToggled( bool ) ) ) );
myViewActions.insert( ViewPanId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_GLOBALPAN" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_GLOBALPAN" ) ), "", this );
a->setToolTip( tr( "TBR_GLOBALPAN" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
a->setCheckable( true );
verify( connect( a, SIGNAL( toggled( bool ) ), SLOT( updateToggled( bool ) ) ) );
myViewActions.insert( ViewGlobalPanId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_FRONT" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_FRONT" ) ), "", this );
a->setToolTip( tr( "TBR_FRONT" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewFrontId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_BACK" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_BACK" ) ), "", this );
a->setToolTip( tr( "TBR_BACK" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewBackId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_TOP" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_TOP" ) ), "", this );
a->setToolTip( tr( "TBR_TOP" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewTopId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_BOTTOM" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_BOTTOM" ) ), "", this );
a->setToolTip( tr( "TBR_BOTTOM" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewBottomId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_LEFT" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_LEFT" ) ), "", this );
a->setToolTip( tr( "TBR_LEFT" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewLeftId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_RIGHT" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_RIGHT" ) ), "", this );
a->setToolTip( tr( "TBR_RIGHT" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewRightId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_AXO" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_AXO" ) ), "", this );
a->setToolTip( tr( "TBR_AXO" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewAxoId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_ROTATION" ) ), "", this );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_ROTATION" ) ), "", this );
a->setToolTip( tr( "TBR_ROTATION" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
a->setCheckable( true );
verify( connect( a, SIGNAL( toggled( bool ) ), SLOT( updateToggled( bool ) ) ) );
myViewActions.insert( ViewRotationId, a );
- a = new QAction( QPixmap( dir + tr( "ICON_VIEW_RESET" ) ), "", this );\r
- a->setToolTip( tr( "TBR_RESET" ) );\r
+ a = new QAction( QPixmap( dir + tr( "ICON_VIEW_RESET" ) ), "", this );
+ a->setToolTip( tr( "TBR_RESET" ) );
verify( connect( a, SIGNAL( activated() ), SLOT( onActionActivated() ) ) );
myViewActions.insert( ViewResetId, a );
}
// verify( connect( a, SIGNAL( activated() ), SLOT( onToolAction() ) ) );
// myToolActions->insert( PerViewId, a );
- QAction* a = new QAction( QPixmap( dir + tr( "ICON_TOOL_WIRE" ) ), "", this );\r
+ QAction* a = new QAction( QPixmap( dir + tr( "ICON_TOOL_WIRE" ) ), "", this );
a->setToolTip( tr( "TBR_TOOL_WIRE" ) );
a->setCheckable( true );
verify( connect( a, SIGNAL( activated() ), SLOT( onToolAction() ) ) );
myToolActions.insert( ToolWireframeId, a );
a = new QAction( QPixmap( dir + tr( "ICON_TOOL_SHAD") ), "", this );
- a->setToolTip( tr( "TBR_TOOL_SHAD" ) );\r
+ a->setToolTip( tr( "TBR_TOOL_SHAD" ) );
a->setCheckable( true );
a->setChecked( true );
verify( connect( a, SIGNAL( activated() ), SLOT( onToolAction() ) ) );
BRepMesh_BaseAllocator.hxx
BRepMesh_PairOfIndex.hxx
BRepMesh_Status.hxx
+BRepMesh_CMPLRS.edl
EXTERNLIB