SHAPER  9.12.0
PartSet_WidgetPoint2DFlyout.h
1 // Copyright (C) 2014-2023 CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef PartSet_WidgetPoint2DFlyout_H
21 #define PartSet_WidgetPoint2DFlyout_H
22 
23 #include "PartSet.h"
24 #include <PartSet_WidgetPoint2d.h>
25 
26 class XGUI_Workshop;
27 
34 {
35  Q_OBJECT
36 public:
42  const Config_WidgetAPI* theData);
45 
50  virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
51  const bool theToValidate);
52 
56  virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
57 
61  virtual bool focusTo();
62 
65  virtual bool useSelectedShapes() const;
66 
67 private:
69  XGUI_Workshop* workshop() const;
70 };
71 
72 #endif
Provides low-level API for WidgetFactory for reading xml definitions of widgets.
Definition: Config_WidgetAPI.h:46
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
virtual bool focusTo()
Set focus to the first control of the current widget.
Definition: ModuleBase_ModelWidget.cpp:267
Implementation of usual point 2d widget with a condition that it can not accept the focus when the AI...
Definition: PartSet_WidgetPoint2DFlyout.h:34
virtual ~PartSet_WidgetPoint2DFlyout()
Destructor.
Definition: PartSet_WidgetPoint2DFlyout.h:44
Implementation of model widget to provide widget to input point 2d In XML can be defined as folloung:
Definition: PartSet_WidgetPoint2d.h:59
virtual bool isValidSelectionCustom(const std::shared_ptr< ModuleBase_ViewerPrs > &theValue)
Checks if the selection presentation is valid in widget.
Definition: PartSet_WidgetPoint2d.cpp:134
virtual bool setSelection(QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues, const bool theToValidate)
Set the given wrapped value to the current widget This value should be processed in the widget accord...
Definition: PartSet_WidgetPoint2d.cpp:272
virtual bool useSelectedShapes() const
Returns true if the attribute can be changed using the selected shapes in the viewer and creating a c...
Definition: PartSet_WidgetPoint2d.cpp:816
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:82