Version: 6.3.1

src/LightApp/LightApp_Selection.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  LightApp_Selection
00024 //  File   : LightApp_Selection.h
00025 //  Author : Alexander SOLOVYOV
00026 //  Module : GUI
00027 //  $Header: /home/server/cvs/GUI/GUI_SRC/src/LightApp/LightApp_Selection.h,v 1.7.2.1.4.1.12.1 2011-06-01 13:53:27 vsr Exp $
00028 //
00029 #ifndef LIGHTAPP_SELECTION_HeaderFile
00030 #define LIGHTAPP_SELECTION_HeaderFile
00031 
00032 #include "LightApp.h"
00033 #include <QtxPopupMgr.h>
00034 
00035 class LightApp_SelectionMgr;
00036 class LightApp_DataOwner;
00037 class LightApp_Study;
00038 class SUIT_ViewWindow;
00039 
00047 class LIGHTAPP_EXPORT LightApp_Selection : public QtxPopupSelection
00048 {
00049 public:
00050   LightApp_Selection();
00051   virtual ~LightApp_Selection();
00052 
00053   virtual void                   init( const QString&, LightApp_SelectionMgr* );
00054   virtual bool                   processOwner( const LightApp_DataOwner* );
00055 
00056   virtual int                    count() const;
00057   virtual QVariant               parameter( const int, const QString& ) const;
00058   virtual QVariant               parameter( const QString& ) const;
00059   void                           setModuleName( const QString );
00060 
00061 protected:
00062   QString                        entry( const int ) const;
00063   bool                           isReference( const int ) const;
00065   LightApp_Study*                study() const { return myStudy; }
00066   QString                        activeViewType() const;
00067   SUIT_ViewWindow*               activeVW() const;
00068   virtual QString                referencedToEntry( const QString& ) const;
00069 
00070 private:
00071   QString                        myPopupClient;
00072   QMap<int,QString>              myEntries; // entries of selected objects
00073   QMap<int,bool>                 myIsReferences; // whether i-th selected object was a reference
00074   LightApp_Study*                myStudy;
00075 };
00076 
00077 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS