// Created: 31 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef ConstructionPlugin_Plugin_HeaderFile
-#define ConstructionPlugin_Plugin_HeaderFile
+#ifndef ConstructionPlugin_Plugin_H_
+#define ConstructionPlugin_Plugin_H_
#include "ConstructionPlugin.h"
// Created: 3 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef ConstructionPlugin_Point_HeaderFile
-#define ConstructionPlugin_Point_HeaderFile
+#ifndef ConstructionPlugin_Point_H_
+#define ConstructionPlugin_Point_H_
#include "ConstructionPlugin.h"
#include <ModelAPI_Feature.h>
// Created: Thu Mar 13 2014
// Author: Mikhail PONIKAROV
-#ifndef Events_Listener_HeaderFile
-#define Events_Listener_HeaderFile
+#ifndef Events_Listener_H_
+#define Events_Listener_H_
#include <Events.h>
class Events_Message;
// Created: Thu Mar 13 2014
// Author: Mikhail PONIKAROV
-#ifndef Events_Loop_HeaderFile
-#define Events_Loop_HeaderFile
+#ifndef Events_Loop_H_
+#define Events_Loop_H_
#include <Events_Message.h>
#include <Events_Listener.h>
// Created: Thu Mar 13 2014
// Author: Mikhail PONIKAROV
-#ifndef Events_Message_HeaderFile
-#define Events_Message_HeaderFile
+#ifndef Events_Message_H_
+#define Events_Message_H_
#include <Events.h>
// Created: Thu Mar 13 2014
// Author: Mikhail PONIKAROV
-#ifndef Events_MessageGroup_HeaderFile
-#define Events_MessageGroup_HeaderFile
+#ifndef Events_MessageGroup_H_
+#define Events_MessageGroup_H_
#include <Events_Message.h>
// Created: 30 May 2014
// Author: Vitaly SMETANNIKOV
-#ifndef FeaturesPlugin_Extrusion_HeaderFile
-#define FeaturesPlugin_Extrusion_HeaderFile
+#ifndef FeaturesPlugin_Extrusion_H_
+#define FeaturesPlugin_Extrusion_H_
#include "FeaturesPlugin.h"
#include <ModelAPI_Feature.h>
// Created: 07 July 2014
// Author: Vitaly SMETANNIKOV
-#ifndef FeaturesPlugin_Plugin_HeaderFile
-#define FeaturesPlugin_Plugin_HeaderFile
+#ifndef FeaturesPlugin_Plugin_H_
+#define FeaturesPlugin_Plugin_H_
#include "FeaturesPlugin.h"
// Created: 25 Jun 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_AISObject_HeaderFile
-#define GeomAPI_AISObject_HeaderFile
+#ifndef GeomAPI_AISObject_H_
+#define GeomAPI_AISObject_H_
#include <GeomAPI_Interface.h>
// Created: 24 Jun 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_Circ_HeaderFile
-#define GeomAPI_Circ_HeaderFile
+#ifndef GeomAPI_Circ_H_
+#define GeomAPI_Circ_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 29 May 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_Circ2d_HeaderFile
-#define GeomAPI_Circ2d_HeaderFile
+#ifndef GeomAPI_Circ2d_H_
+#define GeomAPI_Circ2d_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_Dir_HeaderFile
-#define GeomAPI_Dir_HeaderFile
+#ifndef GeomAPI_Dir_H_
+#define GeomAPI_Dir_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_Dir2d_HeaderFile
-#define GeomAPI_Dir2d_HeaderFile
+#ifndef GeomAPI_Dir2d_H_
+#define GeomAPI_Dir2d_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 24 Jul 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_Edge_HeaderFile
-#define GeomAPI_Edge_HeaderFile
+#ifndef GeomAPI_Edge_H_
+#define GeomAPI_Edge_H_
#include <GeomAPI_Shape.h>
// Created: 17 July 2014
// Author: Vitaly SMETANNIKOV
-#ifndef GeomAPI_IPresentable_HeaderFile
-#define GeomAPI_IPresentable_HeaderFile
+#ifndef GeomAPI_IPresentable_H_
+#define GeomAPI_IPresentable_H_
#include "GeomAPI_AISObject.h"
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_Interface_HeaderFile
-#define GeomAPI_Interface_HeaderFile
+#ifndef GeomAPI_Interface_H_
+#define GeomAPI_Interface_H_
#include <GeomAPI.h>
// Created: 29 May 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_Lin_HeaderFile
-#define GeomAPI_Lin_HeaderFile
+#ifndef GeomAPI_Lin_H_
+#define GeomAPI_Lin_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 29 May 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_Lin2d_HeaderFile
-#define GeomAPI_Lin2d_HeaderFile
+#ifndef GeomAPI_Lin2d_H_
+#define GeomAPI_Lin2d_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_Pln_HeaderFile
-#define GeomAPI_Pln_HeaderFile
+#ifndef GeomAPI_Pln_H_
+#define GeomAPI_Pln_H_
#include <boost/shared_ptr.hpp>
#include <GeomAPI_Interface.h>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_Pnt_HeaderFile
-#define GeomAPI_Pnt_HeaderFile
+#ifndef GeomAPI_Pnt_H_
+#define GeomAPI_Pnt_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 29 May 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_Pnt2d_HeaderFile
-#define GeomAPI_Pnt2d_HeaderFile
+#ifndef GeomAPI_Pnt2d_H_
+#define GeomAPI_Pnt2d_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_Shape_HeaderFile
-#define GeomAPI_Shape_HeaderFile
+#ifndef GeomAPI_Shape_H_
+#define GeomAPI_Shape_H_
#include <GeomAPI_Interface.h>
// Created: 30 May 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAPI_XY_HeaderFile
-#define GeomAPI_XY_HeaderFile
+#ifndef GeomAPI_XY_H_
+#define GeomAPI_XY_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAPI_XYZ_HeaderFile
-#define GeomAPI_XYZ_HeaderFile
+#ifndef GeomAPI_XYZ_H_
+#define GeomAPI_XYZ_H_
#include <GeomAPI_Interface.h>
#include <boost/shared_ptr.hpp>
// Created: 24 Apr 2014
// Author: Natalia ERMOLAEVA
-#ifndef GeomAlgoAPI_CompoundBuilder_HeaderFile
-#define GeomAlgoAPI_CompoundBuilder_HeaderFile
+#ifndef GeomAlgoAPI_CompoundBuilder_H_
+#define GeomAlgoAPI_CompoundBuilder_H_
#include <GeomAlgoAPI.h>
#include <GeomAPI_Shape.h>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAlgoAPI_EdgeBuilder_HeaderFile
-#define GeomAlgoAPI_EdgeBuilder_HeaderFile
+#ifndef GeomAlgoAPI_EdgeBuilder_H_
+#define GeomAlgoAPI_EdgeBuilder_H_
#include <GeomAlgoAPI.h>
#include <GeomAPI_Edge.h>
// Created: 06 Jun 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAlgoAPI_Extrusion_HeaderFile
-#define GeomAlgoAPI_Extrusion_HeaderFile
+#ifndef GeomAlgoAPI_Extrusion_H_
+#define GeomAlgoAPI_Extrusion_H_
#include <GeomAlgoAPI.h>
#include <GeomAPI_Shape.h>
// Created: 23 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAlgoAPI_FaceBuilder_HeaderFile
-#define GeomAlgoAPI_FaceBuilder_HeaderFile
+#ifndef GeomAlgoAPI_FaceBuilder_H_
+#define GeomAlgoAPI_FaceBuilder_H_
#include <GeomAlgoAPI.h>
#include <GeomAPI_Shape.h>
// Created: 02 Jun 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomAlgoAPI_PointBuilder_HeaderFile
-#define GeomAlgoAPI_PointBuilder_HeaderFile
+#ifndef GeomAlgoAPI_PointBuilder_H_
+#define GeomAlgoAPI_PointBuilder_H_
#include <GeomAlgoAPI.h>
#include <boost/shared_ptr.hpp>
// Created: 02 Jun 2014
// Author: Artem ZHIDKOV
-#ifndef GeomAlgoAPI_SketchBuilder_HeaderFile
-#define GeomAlgoAPI_SketchBuilder_HeaderFile
+#ifndef GeomAlgoAPI_SketchBuilder_H_
+#define GeomAlgoAPI_SketchBuilder_H_
#include <GeomAlgoAPI.h>
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomData_Dir_HeaderFile
-#define GeomData_Dir_HeaderFile
+#ifndef GeomData_Dir_H_
+#define GeomData_Dir_H_
#include "GeomData.h"
#include "GeomDataAPI_Dir.h"
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomData_Point_HeaderFile
-#define GeomData_Point_HeaderFile
+#ifndef GeomData_Point_H_
+#define GeomData_Point_H_
#include "GeomData.h"
#include "GeomDataAPI_Point.h"
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomData_Point2D_HeaderFile
-#define GeomData_Point2D_HeaderFile
+#ifndef GeomData_Point2D_H_
+#define GeomData_Point2D_H_
#include "GeomData.h"
#include "GeomDataAPI_Point2D.h"
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomDataAPI_Dir_HeaderFile
-#define GeomDataAPI_Dir_HeaderFile
+#ifndef GeomDataAPI_Dir_H_
+#define GeomDataAPI_Dir_H_
#include "GeomDataAPI.h"
#include <ModelAPI_Attribute.h>
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomDataAPI_Point_HeaderFile
-#define GeomDataAPI_Point_HeaderFile
+#ifndef GeomDataAPI_Point_H_
+#define GeomDataAPI_Point_H_
#include "GeomDataAPI.h"
#include <ModelAPI_Attribute.h>
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef GeomDataAPI_Point2D_HeaderFile
-#define GeomDataAPI_Point2D_HeaderFile
+#ifndef GeomDataAPI_Point2D_H_
+#define GeomDataAPI_Point2D_H_
#include "GeomDataAPI.h"
#include <ModelAPI_Attribute.h>
// Author: Mikhail PONIKAROV
// Copyright: CEA 2011
-#ifndef Model_Application_HeaderFile
-#define Model_Application_HeaderFile
+#ifndef Model_Application_H_
+#define Model_Application_H_
#include <Model_Document.h>
#include <TDocStd_Application.hxx>
// Created: 2 june 2014
// Author: Vitaly Smetannikov
-#ifndef Model_AttributeBoolean_HeaderFile
-#define Model_AttributeBoolean_HeaderFile
+#ifndef Model_AttributeBoolean_H_
+#define Model_AttributeBoolean_H_
#include "Model.h"
#include "ModelAPI_AttributeBoolean.h"
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_AttributeDocRef_HeaderFile
-#define Model_AttributeDocRef_HeaderFile
+#ifndef Model_AttributeDocRef_H_
+#define Model_AttributeDocRef_H_
#include "Model.h"
#include "ModelAPI_AttributeDocRef.h"
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_AttributeDouble_HeaderFile
-#define Model_AttributeDouble_HeaderFile
+#ifndef Model_AttributeDouble_H_
+#define Model_AttributeDouble_H_
#include "Model.h"
#include "ModelAPI_AttributeDouble.h"
// Created: 8 May 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_AttributeRefAttr_HeaderFile
-#define Model_AttributeRefAttr_HeaderFile
+#ifndef Model_AttributeRefAttr_H_
+#define Model_AttributeRefAttr_H_
#include "Model.h"
#include "ModelAPI_AttributeRefAttr.h"
// Created: 8 May 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_AttributeRefList_HeaderFile
-#define Model_AttributeRefList_HeaderFile
+#ifndef Model_AttributeRefList_H_
+#define Model_AttributeRefList_H_
#include "Model.h"
#include "ModelAPI_AttributeRefList.h"
// Created: 8 May 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_AttributeReference_HeaderFile
-#define Model_AttributeReference_HeaderFile
+#ifndef Model_AttributeReference_H_
+#define Model_AttributeReference_H_
#include "Model.h"
#include "ModelAPI_AttributeReference.h"
// Created: 21 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_Data_HeaderFile
-#define Model_Data_HeaderFile
+#ifndef Model_Data_H_
+#define Model_Data_H_
#include "Model.h"
#include <ModelAPI_Data.h>
// Created: 28 Feb 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_Document_HeaderFile
-#define Model_Document_HeaderFile
+#ifndef Model_Document_H_
+#define Model_Document_H_
#include <Model.h>
#include <ModelAPI_Document.h>
// Created: 10 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_Events_HeaderFile
-#define Model_Events_HeaderFile
+#ifndef Model_Events_H_
+#define Model_Events_H_
#include <Model.h>
#include <ModelAPI_Events.h>
// Created: 20 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_PluginManager_HeaderFile
-#define Model_PluginManager_HeaderFile
+#ifndef Model_PluginManager_H_
+#define Model_PluginManager_H_
#include "Model.h"
#include <ModelAPI_PluginManager.h>
// Created: 08 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_ResultBody_HeaderFile
-#define Model_ResultBody_HeaderFile
+#ifndef Model_ResultBody_H_
+#define Model_ResultBody_H_
#include "Model.h"
#include <ModelAPI_ResultBody.h>
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_ResultConstruction_HeaderFile
-#define Model_ResultConstruction_HeaderFile
+#ifndef Model_ResultConstruction_H_
+#define Model_ResultConstruction_H_
#include "Model.h"
#include <ModelAPI_ResultConstruction.h>
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_ResultPart_HeaderFile
-#define Model_ResultPart_HeaderFile
+#ifndef Model_ResultPart_H_
+#define Model_ResultPart_H_
#include "Model.h"
#include <ModelAPI_ResultPart.h>
// Created: 25 Jun 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_Update_HeaderFile
-#define Model_Update_HeaderFile
+#ifndef Model_Update_H_
+#define Model_Update_H_
#include "Model.h"
#include "Events_Listener.h"
// Created: 2 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef Model_Validator_HeaderFile
-#define Model_Validator_HeaderFile
+#ifndef Model_Validator_H_
+#define Model_Validator_H_
#include <Model.h>
#include <ModelAPI_Validator.h>
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Attribute_HeaderFile
-#define ModelAPI_Attribute_HeaderFile
+#ifndef ModelAPI_Attribute_H_
+#define ModelAPI_Attribute_H_
#include "ModelAPI.h"
#include <string>
// Created: 2 june 2014
// Author: Vitaly Smetannikov
-#ifndef ModelAPI_AttributeBoolean_HeaderFile
-#define ModelAPI_AttributeBoolean_HeaderFile
+#ifndef ModelAPI_AttributeBoolean_H_
+#define ModelAPI_AttributeBoolean_H_
#include "ModelAPI_Attribute.h"
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_AttributeDocRef_HeaderFile
-#define ModelAPI_AttributeDocRef_HeaderFile
+#ifndef ModelAPI_AttributeDocRef_H_
+#define ModelAPI_AttributeDocRef_H_
#include "ModelAPI_Attribute.h"
#include "ModelAPI_Document.h"
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_AttributeDouble_HeaderFile
-#define ModelAPI_AttributeDouble_HeaderFile
+#ifndef ModelAPI_AttributeDouble_H_
+#define ModelAPI_AttributeDouble_H_
#include "ModelAPI_Attribute.h"
// Created: 8 May 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_AttributeRefAttr_HeaderFile
-#define ModelAPI_AttributeRefAttr_HeaderFile
+#ifndef ModelAPI_AttributeRefAttr_H_
+#define ModelAPI_AttributeRefAttr_H_
#include "ModelAPI_Attribute.h"
#include "ModelAPI_Feature.h"
// Created: 8 May 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_AttributeRefList_HeaderFile
-#define ModelAPI_AttributeRefList_HeaderFile
+#ifndef ModelAPI_AttributeRefList_H_
+#define ModelAPI_AttributeRefList_H_
#include "ModelAPI_Attribute.h"
#include "ModelAPI_Feature.h"
// Created: 8 May 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_AttributeReference_HeaderFile
-#define ModelAPI_AttributeReference_HeaderFile
+#ifndef ModelAPI_AttributeReference_H_
+#define ModelAPI_AttributeReference_H_
#include "ModelAPI_Attribute.h"
#include <ModelAPI_Feature.h>
// Created: 21 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Data_HeaderFile
-#define ModelAPI_Data_HeaderFile
+#ifndef ModelAPI_Data_H_
+#define ModelAPI_Data_H_
#include "ModelAPI.h"
#include <string>
// Created: 28 Feb 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Document_HeaderFile
-#define ModelAPI_Document_HeaderFile
+#ifndef ModelAPI_Document_H_
+#define ModelAPI_Document_H_
#include <ModelAPI.h>
#include <string>
// Created: 10 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Events_HeaderFile
-#define ModelAPI_Events_HeaderFile
+#ifndef ModelAPI_Events_H_
+#define ModelAPI_Events_H_
#include <ModelAPI.h>
#include <Events_MessageGroup.h>
// Created: 21 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Feature_HeaderFile
-#define ModelAPI_Feature_HeaderFile
+#ifndef ModelAPI_Feature_H_
+#define ModelAPI_Feature_H_
#include "ModelAPI_Object.h"
#include "ModelAPI_PluginManager.h"
// Created: 19 May 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Object_HeaderFile
-#define ModelAPI_Object_HeaderFile
+#ifndef ModelAPI_Object_H_
+#define ModelAPI_Object_H_
#include "ModelAPI.h"
// Created: 31 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Plugin_HeaderFile
-#define ModelAPI_Plugin_HeaderFile
+#ifndef ModelAPI_Plugin_H_
+#define ModelAPI_Plugin_H_
#include "ModelAPI.h"
#include <string>
// Created: 20 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_PluginManager_HeaderFile
-#define ModelAPI_PluginManager_HeaderFile
+#ifndef ModelAPI_PluginManager_H_
+#define ModelAPI_PluginManager_H_
#include "ModelAPI.h"
#include <string>
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Result_HeaderFile
-#define ModelAPI_Result_HeaderFile
+#ifndef ModelAPI_Result_H_
+#define ModelAPI_Result_H_
#include "ModelAPI_Object.h"
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_ResultBody_HeaderFile
-#define ModelAPI_ResultBody_HeaderFile
+#ifndef ModelAPI_ResultBody_H_
+#define ModelAPI_ResultBody_H_
#include "ModelAPI_Result.h"
#include <GeomAPI_Shape.h>
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_ResultConstruction_HeaderFile
-#define ModelAPI_ResultConstruction_HeaderFile
+#ifndef ModelAPI_ResultConstruction_H_
+#define ModelAPI_ResultConstruction_H_
#include "ModelAPI_Result.h"
#include <GeomAPI_Shape.h>
// Created: 07 Jul 2014
// Author: Vitaly SMETANNIKOV
-#ifndef ModelAPI_ResultParameters_HeaderFile
-#define ModelAPI_ResultParameters_HeaderFile
+#ifndef ModelAPI_ResultParameters_H_
+#define ModelAPI_ResultParameters_H_
#include "ModelAPI_Result.h"
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_ResultPart_HeaderFile
-#define ModelAPI_ResultPart_HeaderFile
+#ifndef ModelAPI_ResultPart_H_
+#define ModelAPI_ResultPart_H_
#include "ModelAPI_Result.h"
// Created: 2 Jul 2014
// Author: Mikhail PONIKAROV
-#ifndef ModelAPI_Validator_HeaderFile
-#define ModelAPI_Validator_HeaderFile
+#ifndef ModelAPI_Validator_H_
+#define ModelAPI_Validator_H_
#include <ModelAPI.h>
#include <boost/shared_ptr.hpp>
// Created: 20 May 2014
// Author: Mikhail PONIKAROV
-#ifndef PartSetPlugin_Duplicate_HeaderFile
-#define PartSetPlugin_Duplicate_HeaderFile
+#ifndef PartSetPlugin_Duplicate_H_
+#define PartSetPlugin_Duplicate_H_
#include "PartSetPlugin_Part.h"
// Created: 27 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef PartSetPlugin_Part_HeaderFile
-#define PartSetPlugin_Part_HeaderFile
+#ifndef PartSetPlugin_Part_H_
+#define PartSetPlugin_Part_H_
#include "PartSetPlugin.h"
#include <ModelAPI_Feature.h>
// Created: 31 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef PartSetPlugin_Plugin_HeaderFile
-#define PartSetPlugin_Plugin_HeaderFile
+#ifndef PartSetPlugin_Plugin_H_
+#define PartSetPlugin_Plugin_H_
#include "PartSetPlugin.h"
// Created: 20 May 2014
// Author: Mikhail PONIKAROV
-#ifndef PartSetPlugin_Remove_HeaderFile
-#define PartSetPlugin_Remove_HeaderFile
+#ifndef PartSetPlugin_Remove_H_
+#define PartSetPlugin_Remove_H_
#include "PartSetPlugin.h"
#include <ModelAPI_Feature.h>
// Created: 26 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_Arc_HeaderFile
-#define SketchPlugin_Arc_HeaderFile
+#ifndef SketchPlugin_Arc_H_
+#define SketchPlugin_Arc_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Feature.h>
// Created: 26 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_Circle_HeaderFile
-#define SketchPlugin_Circle_HeaderFile
+#ifndef SketchPlugin_Circle_H_
+#define SketchPlugin_Circle_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Feature.h>
// Created: 08 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_Constraint_HeaderFile
-#define SketchPlugin_Constraint_HeaderFile
+#ifndef SketchPlugin_Constraint_H_
+#define SketchPlugin_Constraint_H_
#include "SketchPlugin.h"
#include "SketchPlugin_Feature.h"
// Created: 08 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_ConstraintCoincidence_HeaderFile
-#define SketchPlugin_ConstraintCoincidence_HeaderFile
+#ifndef SketchPlugin_ConstraintCoincidence_H_
+#define SketchPlugin_ConstraintCoincidence_H_
#include "SketchPlugin.h"
#include "SketchPlugin_Constraint.h"
// Created: 23 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_ConstraintDistance_HeaderFile
-#define SketchPlugin_ConstraintDistance_HeaderFile
+#ifndef SketchPlugin_ConstraintDistance_H_
+#define SketchPlugin_ConstraintDistance_H_
#include "SketchPlugin.h"
#include "SketchPlugin_Constraint.h"
// Created: 30 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_ConstraintLength_HeaderFile
-#define SketchPlugin_ConstraintLength_HeaderFile
+#ifndef SketchPlugin_ConstraintLength_H_
+#define SketchPlugin_ConstraintLength_H_
#include "SketchPlugin.h"
#include "SketchPlugin_Constraint.h"
// Created: 26 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_ConstraintParallel_HeaderFile
-#define SketchPlugin_ConstraintParallel_HeaderFile
+#ifndef SketchPlugin_ConstraintParallel_H_
+#define SketchPlugin_ConstraintParallel_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Sketch.h>
// Created: 26 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_ConstraintPerpendicular_HeaderFile
-#define SketchPlugin_ConstraintPerpendicular_HeaderFile
+#ifndef SketchPlugin_ConstraintPerpendicular_H_
+#define SketchPlugin_ConstraintPerpendicular_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Sketch.h>
// Created: 26 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_ConstraintRadius_HeaderFile
-#define SketchPlugin_ConstraintRadius_HeaderFile
+#ifndef SketchPlugin_ConstraintRadius_H_
+#define SketchPlugin_ConstraintRadius_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Sketch.h>
// Created: 27 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef SketchPlugin_Feature_HeaderFile
-#define SketchPlugin_Feature_HeaderFile
+#ifndef SketchPlugin_Feature_H_
+#define SketchPlugin_Feature_H_
#include "SketchPlugin.h"
#include <ModelAPI_Feature.h>
// Created: 24 Apr 2014
// Author: Mikhail PONIKAROV
-#ifndef SketchPlugin_Line_HeaderFile
-#define SketchPlugin_Line_HeaderFile
+#ifndef SketchPlugin_Line_H_
+#define SketchPlugin_Line_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Feature.h>
// Created: 31 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef SketchPlugin_Plugin_HeaderFile
-#define SketchPlugin_Plugin_HeaderFile
+#ifndef SketchPlugin_Plugin_H_
+#define SketchPlugin_Plugin_H_
#include "SketchPlugin.h"
// Created: 07 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchPlugin_Point_HeaderFile
-#define SketchPlugin_Point_HeaderFile
+#ifndef SketchPlugin_Point_H_
+#define SketchPlugin_Point_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Sketch.h>
// Created: 27 Mar 2014
// Author: Mikhail PONIKAROV
-#ifndef SketchPlugin_Sketch_HeaderFile
-#define SketchPlugin_Sketch_HeaderFile
+#ifndef SketchPlugin_Sketch_H_
+#define SketchPlugin_Sketch_H_
#include "SketchPlugin.h"
#include <SketchPlugin_Feature.h>
// Created: 27 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchSolver_Constraint_Headerfile
-#define SketchSolver_Constraint_Headerfile
+#ifndef SketchSolver_Constraint_H_
+#define SketchSolver_Constraint_H_
#include "SketchSolver.h"
// Created: 27 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchSolver_ConstraintGroup_Headerfile
-#define SketchSolver_ConstraintGroup_Headerfile
+#ifndef SketchSolver_ConstraintGroup_H_
+#define SketchSolver_ConstraintGroup_H_
#include "SketchSolver.h"
#include <SketchSolver_Solver.h>
// Created: 08 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchSolver_ConstraintManager_Headerfile
-#define SketchSolver_ConstraintManager_Headerfile
+#ifndef SketchSolver_ConstraintManager_H_
+#define SketchSolver_ConstraintManager_H_
#include "SketchSolver.h"
#include <SketchSolver_Solver.h>
// Created: 07 May 2014
// Author: Artem ZHIDKOV
-#ifndef SketchSolver_Solver_Headerfile
-#define SketchSolver_Solver_Headerfile
+#ifndef SketchSolver_Solver_H_
+#define SketchSolver_Solver_H_
#include "SketchSolver.h"
#include "XGUI_SalomeConnector.h"
#include <ModuleBase_Operation.h>
+#include <Events_Error.h>
#include <QAction>
#ifdef _DEBUG
+#include <iostream>
#include <QDebug>
#endif
XGUI_ActionsMgr::XGUI_ActionsMgr(XGUI_Workshop* theParent)
- : QObject(theParent), myOperationMgr(theParent->operationMgr())
+ : QObject(theParent),
+ myWorkshop(theParent),
+ myOperationMgr(theParent->operationMgr())
{
-
+ // Default shortcuts
+ myShortcuts << QKeySequence::Save;
+ myShortcuts << QKeySequence::Undo;
+ myShortcuts << QKeySequence::Redo;
+ myShortcuts << QKeySequence::Open;
+ myShortcuts << QKeySequence::Close;
}
XGUI_ActionsMgr::~XGUI_ActionsMgr()
return true;
}
return false;
-}
\ No newline at end of file
+}
+
+QKeySequence XGUI_ActionsMgr::registerShortcut(const QString& theKeySequence)
+{
+ if(theKeySequence.isEmpty()) {
+ return QKeySequence();
+ }
+ QKeySequence aResult(theKeySequence);
+ if(myShortcuts.contains(aResult)) {
+ QString aMessage = tr("Shortcut %1 is already defined. Ignore.").arg(theKeySequence);
+ Events_Error::send(aMessage.toStdString());
+ return QKeySequence();
+ }
+ myShortcuts.append(aResult);
+ return aResult;
+}
#include <QObject>
#include <QMap>
+#include <QList>
#include <QStringList>
+#include <QKeySequence>
class XGUI_Command;
class XGUI_Workshop;
bool isNested(const QString& theId) const;
+ QKeySequence registerShortcut(const QString& theKeySequence);
+
public slots:
//! Update workbench actions according to OperationMgr state:
//! No active operations: all actions but nested are available
private:
QMap<QString, QAction*> myActions;
QMap<QString, QStringList> myNestedActions;
+ QList<QKeySequence> myShortcuts;
+ XGUI_Workshop* myWorkshop;
XGUI_OperationMgr* myOperationMgr;
};
#include "XGUI_Command.h"
+#include <QEvent>
-#include <QToolButton>
+
+XGUI_MenuButton::XGUI_MenuButton(const QIcon& theIcon,
+ const QString& theText,
+ QWidget * theParent)
+ : QPushButton(theIcon, theText, theParent)
+
+{
+ setFlat(true);
+ setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
+ setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ QString aStyleSheet = "QPushButton { text-align: left; }";
+ //aStyleSheet += "QPushButton:hover { border: 1px solid gray; border-radius: 3px; }";
+ setStyleSheet(aStyleSheet);
+ installEventFilter(this);
+}
+
+//void XGUI_MenuButton::enterEvent(QEvent * event)
+//{
+// if(isEnabled()) {
+// setFlat(false);
+// }
+//}
+
+//void XGUI_MenuButton::leaveEvent(QEvent * event)
+//{
+// setFlat(true);
+//}
XGUI_Command::XGUI_Command(const QString& theId, QObject * parent, bool isCheckable)
: QWidgetAction(parent), myCheckable(isCheckable)
QWidget* XGUI_Command::createWidget(QWidget* theParent)
{
if (theParent->inherits("XGUI_MenuGroupPanel")) {
- QToolButton* aButton = new QToolButton(theParent);
- aButton->setIcon(icon());
- aButton->setText(text());
- aButton->setStyleSheet("QToolButton::menu-indicator { image: none; }");
- aButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
- aButton->setAutoRaise(true);
- aButton->setArrowType(Qt::NoArrow);
+ XGUI_MenuButton* aButton = new XGUI_MenuButton(icon(), text(), theParent);
aButton->setCheckable(myCheckable);
- aButton->setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
- aButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
QKeySequence aKeys = shortcut();
QString aToolTip = toolTip();
if (!aKeys.isEmpty())
#include "XGUI.h"
#include <QWidgetAction>
+#include <QPushButton>
#define MIN_BUTTON_HEIGHT 25
#define MIN_BUTTON_WIDTH 60
+class XGUI_EXPORT XGUI_MenuButton: public QPushButton
+{
+ Q_OBJECT
+ public:
+ XGUI_MenuButton(const QIcon & icon, const QString & text, QWidget * parent = 0);
+
+// protected:
+// virtual void enterEvent(QEvent * event);
+// virtual void leaveEvent(QEvent * event);
+
+};
+
/**\class XGUI_Command
* \ingroup GUI
* \brief Represents a command item in the application menu (Workbench)
#include <XGUI_MainMenu.h>
#include <XGUI_Workbench.h>
+#include <XGUI_MenuGroupPanel.h>
#include <XGUI_MainWindow.h>
#include <XGUI_Command.h>
#include <QLabel>
#include <QDockWidget>
#include <QEvent>
+#include <QPushButton>
+#include <QTabBar>
XGUI_MainMenu::XGUI_MainMenu(XGUI_MainWindow *parent)
- : QObject(parent), myDesktop(parent)
+ : QWidget(parent), myDesktop(parent)
{
- parent->setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
- myDesktop->setStyleSheet("QTabBar::tab {height: 24px;}");
- myGeneralPage = addWorkbench(tr("General"));
+ myGeneralPage = new XGUI_MenuGroupPanel(this);
+ myGeneralPage->setObjectName("Default");
myGeneralPage->parentWidget()->setMaximumWidth(200);
myGeneralPage->installEventFilter(this);
-// QString aStyle = myDesktop->styleSheet();
-// aStyle += " QTabBar::tab {min-height: 24px;}";
+ myGeneralPage->setFrameStyle(QFrame::StyledPanel);
+
+ myMenuTabs = new QTabWidget(this);
+ myMenuTabs->setStyleSheet("QTabBar::tab {height: 24px;} QTabWidget:pane {border: 0px;}");
+ QHBoxLayout* aMainLayout = new QHBoxLayout(this);
+ aMainLayout->addWidget(myGeneralPage);
+ aMainLayout->addWidget(myMenuTabs);
+ aMainLayout->setContentsMargins(0, 2, 2, 0);
+ aMainLayout->setSpacing(2);
+ setLayout(aMainLayout);
+ setFixedHeight(menuHeight());
}
XGUI_MainMenu::~XGUI_MainMenu(void)
XGUI_Workbench* XGUI_MainMenu::addWorkbench(const QString& theId, const QString& theTitle)
{
- QDockWidget* aDock = new QDockWidget(myDesktop);
- aDock->setFeatures(QDockWidget::DockWidgetVerticalTitleBar);
- aDock->setAllowedAreas(Qt::TopDockWidgetArea);
QString aTitle = theTitle;
if (aTitle.isEmpty()) {
aTitle = tr(theId.toLatin1().constData());
}
- aDock->setWindowTitle(aTitle);
- aDock->setMinimumHeight(30);
- aDock->setContentsMargins(0, 0, 0, 0);
-
- XGUI_Workbench* aPage = new XGUI_Workbench(aDock);
+ XGUI_Workbench* aPage = new XGUI_Workbench(myMenuTabs);
aPage->setObjectName(theId);
- aDock->setWidget(aPage);
-
- myDesktop->addDockWidget(Qt::TopDockWidgetArea, aDock);
- if (myMenuTabs.length() > 1) {
- myDesktop->tabifyDockWidget(myMenuTabs.last(), aDock);
- }
-
- myMenuTabs.append(aDock);
+ myMenuTabs->addTab(aPage, aTitle);
return aPage;
}
return QObject::eventFilter(theWatched, theEvent);
}
+void XGUI_MainMenu::insertConsole(QWidget* theConsole)
+{
+ int aConsoleTabId = myMenuTabs->addTab(theConsole, "Console");
+
+ QTabBar* aTabBar = myMenuTabs->findChild<QTabBar*>();
+ QPushButton* aCloseTabButton = new QPushButton();
+ aCloseTabButton->setFixedSize(16, 16);
+ aCloseTabButton->setIcon(QIcon(":pictures/wnd_close.png"));
+ aCloseTabButton->setFlat(true);
+ aTabBar->setTabButton(aConsoleTabId,
+ QTabBar::RightSide,
+ aCloseTabButton);
+
+ connect(aCloseTabButton, SIGNAL(clicked()),
+ myDesktop, SLOT(dockPythonConsole()));
+}
+
+void XGUI_MainMenu::removeConsole()
+{
+ const int kLastTab = myMenuTabs->count() - 1;
+ myMenuTabs->removeTab(kLastTab);
+}
+
XGUI_Command* XGUI_MainMenu::feature(const QString& theId) const
{
- QList<QDockWidget*>::const_iterator aIt;
- for (aIt = myMenuTabs.constBegin(); aIt != myMenuTabs.constEnd(); ++aIt) {
- XGUI_Workbench* aWbn = static_cast<XGUI_Workbench*>((*aIt)->widget());
- XGUI_Command* aCmd = aWbn->feature(theId);
- if (aCmd)
- return aCmd;
+ XGUI_Command* result;
+ result = myGeneralPage->feature(theId);
+ if (!result) {
+ for (int aTabIdx = 0; aTabIdx < myMenuTabs->count(); ++aTabIdx) {
+ XGUI_Workbench* aWbn = static_cast<XGUI_Workbench*>(myMenuTabs->widget(aTabIdx));
+ result = aWbn->feature(theId);
+ if (result) break;
+ }
}
- return 0;
+ return result;
}
QList<XGUI_Command*> XGUI_MainMenu::features() const
{
- QList<XGUI_Command*> aList;
- QList<QDockWidget*>::const_iterator aIt;
- for (aIt = myMenuTabs.constBegin(); aIt != myMenuTabs.constEnd(); ++aIt) {
- XGUI_Workbench* aWbn = static_cast<XGUI_Workbench*>((*aIt)->widget());
+ QList<XGUI_Command*> aList = myGeneralPage->features();
+ for (int aTabIdx = 0; aTabIdx < myMenuTabs->count(); ++aTabIdx) {
+ XGUI_Workbench* aWbn = static_cast<XGUI_Workbench*>(myMenuTabs->widget(aTabIdx));
aList.append(aWbn->features());
}
return aList;
QList<XGUI_Workbench*> XGUI_MainMenu::workbenches() const
{
QList<XGUI_Workbench*> aList;
- aList.append(myGeneralPage);
- foreach(QDockWidget* aDoc, myMenuTabs) {
- XGUI_Workbench* aWb = dynamic_cast<XGUI_Workbench*>(aDoc->widget());
- if (aWb)
+ for (int aTabIdx = 0; aTabIdx < myMenuTabs->count(); ++aTabIdx) {
+ XGUI_Workbench* aWb = dynamic_cast<XGUI_Workbench*>(myMenuTabs->widget(aTabIdx));
+ if (aWb) {
aList.append(aWb);
+ }
}
return aList;
-}
\ No newline at end of file
+}
+
+int XGUI_MainMenu::menuItemSize() const
+{
+ //TODO(sbh, vsv): get this value from the preferences
+ static const ItemSize DEFAULT_ITEM_SIZE = Medium;
+ return (int) DEFAULT_ITEM_SIZE;
+}
+
+int XGUI_MainMenu::menuHeight() const
+{
+ // Default group has no tabs above --> one extra row
+ int rows = menuItemRowsCount() + 1;
+ const int kMarginsSpacings = 4;
+ return rows * menuItemSize() + kMarginsSpacings;
+}
+
+int XGUI_MainMenu::menuItemRowsCount() const
+{
+ //TODO(sbh, vsv): get this value from the preferences
+ static const int DEFAULT_ITEM_ROWS_COUNT = 3;
+ return DEFAULT_ITEM_ROWS_COUNT;
+}
#include <QObject>
#include <QList>
#include <QMap>
+#include <QWidget>
class XGUI_Command;
class XGUI_MainWindow;
class QDockWidget;
class QEvent;
-
/**\class XGUI_MainMenu
* \ingroup GUI
* \brief Class for creation of main menu (set of workbenches)
*/
-class XGUI_EXPORT XGUI_MainMenu: public QObject
+class XGUI_EXPORT XGUI_MainMenu: public QWidget
{
-Q_OBJECT
+ Q_OBJECT
+
+ //! Size of menu item
+ //TODO(sbh, vsv): Move to the settings
+ enum ItemSize {
+ Small = 20,
+ Medium = 25,
+ Large = 30
+ };
+
public:
XGUI_MainMenu(XGUI_MainWindow *parent);
virtual ~XGUI_MainMenu();
XGUI_Workbench* findWorkbench(const QString& theId) const;
//! Returns General page (predefined workbench)
- XGUI_Workbench* generalPage() const { return myGeneralPage; }
+ XGUI_MenuGroupPanel* generalPage() const { return myGeneralPage; }
//! Rerturns last created workbench in dock widget container
- QDockWidget* getLastDockWindow() const { return myMenuTabs.last(); }
+ //QDockWidget* getLastDockWindow() const;
//! Returns already created command by its ID
XGUI_Command* feature(const QString& theId) const;
virtual bool eventFilter(QObject *theWatched, QEvent *theEvent);
+ //! Displays given console as a tab in the workbench
+ void insertConsole(QWidget*);
+ //! Removes already created tab with python console
+ void removeConsole();
+
+ int menuItemSize() const;
+ int menuItemRowsCount() const;
+ int menuHeight() const;
+
private:
XGUI_MainWindow* myDesktop;
- QList<QDockWidget*> myMenuTabs;
- XGUI_Workbench* myGeneralPage;
+ QTabWidget* myMenuTabs;
+ XGUI_MenuGroupPanel* myGeneralPage;
QMap<XGUI_Command*, bool> myCommandState;
};
XGUI_MainWindow::XGUI_MainWindow(QWidget* parent)
: QMainWindow(parent),
- myPythonConsole(0)
+ myPythonConsole(0),
+ myIsConsoleDocked(false)
{
setWindowTitle(tr("New Geom"));
- myMenuBar = new XGUI_MainMenu(this);
-
+ createMainMenu();
QMdiArea* aMdiArea = new QMdiArea(this);
aMdiArea->setContextMenuPolicy(Qt::ActionsContextMenu);
setCentralWidget(aMdiArea);
void XGUI_MainWindow::showPythonConsole()
{
if (!myPythonConsole) {
-
- QDockWidget* aDoc = new QDockWidget(this);
- aDoc->setFeatures(QDockWidget::AllDockWidgetFeatures | QDockWidget::DockWidgetVerticalTitleBar);
- aDoc->setMinimumHeight(0);
- aDoc->setWindowTitle("Console");
- myPythonConsole = new PyConsole_EnhConsole( aDoc, new PyConsole_EnhInterp());
- aDoc->setWidget(myPythonConsole);
- addDockWidget(Qt::TopDockWidgetArea, aDoc);
- tabifyDockWidget(myMenuBar->getLastDockWindow(), aDoc);
+ myPythonConsole = new PyConsole_EnhConsole(this, new PyConsole_EnhInterp());
+ undockPythonConsole();
}
myPythonConsole->parentWidget()->show();
}
myPythonConsole->parentWidget()->hide();
}
+//******************************************************
+void XGUI_MainWindow::dockPythonConsole()
+{
+ if (!myPythonConsole)
+ return;
+ myMenuBar->removeConsole();
+ QDockWidget* aDock = new QDockWidget(this);
+ aDock->setFeatures(QDockWidget::AllDockWidgetFeatures |
+ QDockWidget::DockWidgetVerticalTitleBar);
+ aDock->setAllowedAreas(Qt::LeftDockWidgetArea |
+ Qt::RightDockWidgetArea |
+ Qt::BottomDockWidgetArea);
+ aDock->setMinimumHeight(0);
+ aDock->setWindowTitle("Console");
+ aDock->setWidget(myPythonConsole);
+ addDockWidget(Qt::BottomDockWidgetArea, aDock);
+ // Undock python console if widget is closed...
+ CloseEventWatcher* aWatcher = new CloseEventWatcher(aDock);
+ connect(aWatcher, SIGNAL(widgetClosed()),
+ this, SLOT(undockPythonConsole()));
+ aDock->installEventFilter(aWatcher);
+}
+
+void XGUI_MainWindow::undockPythonConsole()
+{
+ if (!myPythonConsole)
+ return;
+ QDockWidget* aDock = qobject_cast<QDockWidget*>(myPythonConsole->parentWidget());
+ //When the application starts console will be displayed as
+ //a wokbench tab, so there is no dock yet
+ if(aDock) {
+ aDock->hide();
+ aDock->setWidget(NULL);
+ aDock->deleteLater();
+ }
+ myMenuBar->insertConsole(myPythonConsole);
+}
+
//******************************************************
void XGUI_MainWindow::createSubWindow()
{
emit exitKeySequence();
event->ignore();
}
+
+void XGUI_MainWindow::createMainMenu()
+{
+ myMenuBar = new XGUI_MainMenu(this);
+ QDockWidget* aMenuDock = new QDockWidget(this);
+ aMenuDock->setWidget(myMenuBar);
+ aMenuDock->setAllowedAreas(Qt::TopDockWidgetArea);
+ aMenuDock->setFeatures(QDockWidget::DockWidgetVerticalTitleBar);
+ aMenuDock->setWindowTitle(tr("General"));
+ addDockWidget(Qt::TopDockWidgetArea, aMenuDock);
+}
+
+CloseEventWatcher::CloseEventWatcher(QObject* theParent)
+ : QObject(theParent)
+{}
+
+bool CloseEventWatcher::eventFilter(QObject *obj, QEvent *event) {
+ if (event->type() == QEvent::Close) {
+ emit widgetClosed();
+ event->ignore();
+ return true;
+ } else {
+ // standard event processing
+ return QObject::eventFilter(obj, event);
+ }
+}
+
public slots:
void showPythonConsole();
void hidePythonConsole();
+ void dockPythonConsole();
+ void undockPythonConsole();
void createSubWindow();
protected:
void closeEvent(QCloseEvent* event);
+ void createMainMenu();
private:
XGUI_MainMenu* myMenuBar;
XGUI_Viewer* myViewer;
PyConsole_EnhConsole* myPythonConsole;
+ //! Python console can be a dock widget if true, else as the tab.
+ bool myIsConsoleDocked;
+};
+
+class XGUI_EXPORT CloseEventWatcher: public QObject {
+ Q_OBJECT
+
+ public:
+ CloseEventWatcher(QObject* theParent);
+
+ signals:
+ void widgetClosed();
+
+ protected:
+ bool eventFilter(QObject *obj, QEvent *);
+
};
#endif
#include <iostream>
XGUI_MenuGroupPanel::XGUI_MenuGroupPanel(QWidget *parent)
- : QWidget(parent), myNewRow(0), myNewCol(0), myMaxRow(1)
+ : QFrame(parent), myNewRow(0), myNewCol(0), myMaxRow(1)
{
myLayout = new QGridLayout(this);
myLayout->setSpacing(0);
myLayout->setMargin(0);
myLayout->setContentsMargins(0, 0, 0, 0);
+ setFrameShape(QFrame::NoFrame);
}
+
+
void XGUI_MenuGroupPanel::addCommand(XGUI_Command* theAction)
{
myActions.append(theAction);
{
XGUI_Command* aCommand = new XGUI_Command(theId, theIcon, theTitle, this, isCheckable);
aCommand->setToolTip(theTip);
- if (!theKeys.isEmpty())
+ if (!theKeys.isEmpty()) {
aCommand->setShortcut(theKeys);
-
+ }
addCommand(aCommand);
return aCommand;
}
#define XGUI_MenuGroupPanel_H
#include "XGUI.h"
-#include <QWidget>
+#include <QFrame>
#include <QMap>
class XGUI_Command;
class QGridLayout;
+
/**\class XGUI_MenuGroupPanel
* \ingroup GUI
* \brief Represents a one group in a page of main menu (workbench)
*/
-class XGUI_EXPORT XGUI_MenuGroupPanel: public QWidget
+class XGUI_EXPORT XGUI_MenuGroupPanel: public QFrame
{
-Q_OBJECT
-public:
+ Q_OBJECT
+
+ public:
explicit XGUI_MenuGroupPanel(QWidget *parent = 0);
//! Adding a new feature (Command) in the group
salomeConnector()->addEditMenuSeparator();
return;
}
- XGUI_Workbench* aPage = myMainWindow->menuObject()->generalPage();
-
// File commands group
- XGUI_MenuGroupPanel* aGroup = aPage->addGroup("Default");
+ XGUI_MenuGroupPanel* aGroup = myMainWindow->menuObject()->generalPage();
XGUI_Command* aCommand;
QIcon(":pictures/close.png"), QKeySequence::Close);
aCommand->connectTo(this, SLOT(onExit()));
//FIXME: SBH's test action. Can be used for some GUI tests.
- //#ifdef _DEBUG
- // aCommand = aGroup->addFeature("TEST_CMD", "Test!", "Private debug button",
- // QIcon(":pictures/close.png"));
- // aCommand->connectTo(myActionsMgr, SLOT(update()));
- //#endif
+// #ifdef _DEBUG
+// aCommand = aGroup->addFeature("TEST_CMD", "Test!", "Private debug button",
+// QIcon(":pictures/close.png"), QKeySequence(), true);
+// aCommand->connectTo(myMainWindow, SLOT(dockPythonConsole()));
+// #endif
}
//******************************************************
QString aWchName = QString::fromStdString(theMessage->workbenchId());
QString aNestedFeatures = QString::fromStdString(theMessage->nestedFeatures());
bool isUsePropPanel = theMessage->isUseInput();
- QString aId = QString::fromStdString(theMessage->id());
+ QString aFeatureId = QString::fromStdString(theMessage->id());
if (isSalomeMode()) {
QAction* aAction = salomeConnector()->addFeature(aWchName,
- aId,
+ aFeatureId,
QString::fromStdString(theMessage->text()),
QString::fromStdString(theMessage->tooltip()),
QIcon(theMessage->icon().c_str()),
QKeySequence(), isUsePropPanel);
- salomeConnector()->setNestedActions(aId, aNestedFeatures.split(" "));
+ salomeConnector()->setNestedActions(aFeatureId, aNestedFeatures.split(" "));
myActionsMgr->addCommand(aAction);
myModule->featureCreated(aAction);
} else {
if (!aGroup) {
aGroup = aPage->addGroup(aGroupName);
}
- //Create feature...
- XGUI_Command* aCommand = aGroup->addFeature(aId,
+ // Check if hotkey sequence is already defined:
+ QKeySequence aHotKey = myActionsMgr->registerShortcut(
+ QString::fromStdString(theMessage->keysequence()));
+ // Create feature...
+ XGUI_Command* aCommand = aGroup->addFeature(aFeatureId,
QString::fromStdString(theMessage->text()),
QString::fromStdString(theMessage->tooltip()),
QIcon(theMessage->icon().c_str()),
- QKeySequence(), isUsePropPanel);
+ aHotKey, isUsePropPanel);
aCommand->setNestedCommands(aNestedFeatures.split(" ", QString::SkipEmptyParts));
myActionsMgr->addCommand(aCommand);
myModule->featureCreated(aCommand);
} else {
XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
foreach (XGUI_Workbench* aWb, aMenuBar->workbenches()) {
- if (aWb != aMenuBar->generalPage()) {
- foreach(XGUI_Command* aCmd, aWb->features())
- aCommands.append(aCmd);
- }
+ foreach(XGUI_Command* aCmd, aWb->features())
+ aCommands.append(aCmd);
}
}
return aCommands;
{
for (int i = 0; i < theDoc->size(theGroup); i++)
myDisplayer->display(theDoc->object(theGroup, i), false);
-}
\ No newline at end of file
+}