Salome HOME
updated copyright message
[modules/gui.git] / src / LightApp / LightApp_Plot2dSelector.h
1 // Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
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 LIGHTAPP_PLOT2DSELECTOR_H
21 #define LIGHTAPP_PLOT2DSELECTOR_H
22
23 #include "LightApp.h"
24
25 #include <SUIT_Selector.h>
26 #include <SUIT_DataOwner.h>
27 #include <Plot2d_ViewModel.h>
28
29 class LightApp_DataObject;
30
31 /*!
32   \class LightApp_Plot2dSelector
33   Custom selector to get/set selection from object browser
34 */
35 class LIGHTAPP_EXPORT LightApp_Plot2dSelector : public QObject, public SUIT_Selector
36 {
37   Q_OBJECT
38
39 public:
40   LightApp_Plot2dSelector( Plot2d_Viewer*, SUIT_SelectionMgr* );
41   virtual ~LightApp_Plot2dSelector();
42
43   /*!Return "ObjectBrowser"*/
44   virtual QString type() const { return "PLot2dViewer"; }
45
46 private slots:
47   void         onSelectionChanged( const QString& );
48   void         onClearSelected();
49
50 protected:
51   virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
52   virtual void setSelection( const SUIT_DataOwnerPtrList& );
53
54 private:
55   QString             myCurEntry;
56   Plot2d_Viewer*      myViewer;
57 };
58
59 #endif