Version: 6.3.1

src/SUIT/SUIT_PreferenceMgr.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 // File:      SUIT_PreferenceMgr.h
00021 // Author:    Sergey TELKOV
00022 //
00023 #ifndef SUIT_PREFERENCEMGR_H
00024 #define SUIT_PREFERENCEMGR_H
00025 
00026 // This class is obsoleted.
00027 // It was created for backward compatibility with ResourceEdit from Salome version 3.x.x
00028 
00029 #include "SUIT.h"
00030 
00031 #include "QtxPagePrefMgr.h"
00032 
00033 class SUIT_EXPORT SUIT_PreferenceMgr : public QtxPagePrefMgr
00034 {
00035   Q_OBJECT
00036 
00037 public:
00038   typedef enum { Auto, Space, Bool, Color, String, Selector,
00039                  DblSpin, IntSpin, Double, Integer,
00040                  GroupBox, Tab, Frame, Font, DirList, File, Slider, Shortcut, ShortcutTree, 
00041                  UserDefined = 1000 } PrefItemType;
00042 
00043 public:
00044   SUIT_PreferenceMgr( QtxResourceMgr*, QWidget* = 0 );
00045   virtual ~SUIT_PreferenceMgr();
00046 
00047   QIcon              itemIcon( const int ) const;
00048   void               setItemIcon( const int, const QIcon& );
00049 
00050   QVariant           itemProperty( const QString&, const int = -1 ) const;
00051   void               setItemProperty( const QString&, const QVariant&, const int = -1 );
00052 
00053   int                addItem( const QString&, const int pId = -1, const PrefItemType = Auto,
00054                               const QString& = QString(), const QString& = QString() );
00055 
00056 protected:
00057   virtual QVariant   optionValue( const QString& ) const;
00058   virtual void       setOptionValue( const QString&, const QVariant& );
00059 
00060 private:
00061   QtxPreferenceItem* myRoot;
00062 };
00063 
00064 #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