INIInterface.hh 3.19 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
//=============================================================================
//
//                               OpenFlipper
//        Copyright (C) 2008 by Computer Graphics Group, RWTH Aachen
//                           www.openflipper.org
//
//-----------------------------------------------------------------------------
//
//                                License
//
//  OpenFlipper is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  OpenFlipper is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
// 
//  You should have received a copy of the GNU Lesser General Public License
//  along with OpenFlipper.  If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
//
//   $Revision$
//   $Author$
//   $Date$
//
//=============================================================================




//
// C++ Interface: BasePlugin
//
// Description: 
//
//
// Author: Jan Moebius <jan_moebius@web.de>, (C) 2007
//

#ifndef INIINTERFACE_HH 
#define INIINTERFACE_HH 

 #include <QtGui>
 #include <QMenuBar>
 #include <ACG/QtWidgets/QtExaminerViewer.hh>
 #include <OpenFlipper/common/Types.hh>
 
 #include <OpenFlipper/INIFile/INIFile.hh>
 
 /** \brief Interface class for Plugins which have to store information in ini files 
  * 
  * Using this interface you can store additional information to ini file on an
  * per object basis. After the basic information is written to the ini file by the core 
  * ( or loaded by the core ) the corresponding functions in this Interface will be executed.
  * You get the object id for the object which has to be used. For every object the functions
  * will get called and you have to save your data only for the given object!\n
  * the ini file in the functions is already open. You may not close it!
 */
class INIInterface {
   public : 
       
      /// Destructor
      virtual ~INIInterface() {};
      
   private slots:
      /** Load object information from an ini file as well as plugin options.\n
       *  @param _ini ini file
       *  @param _id Id of the object to load data for
       */
Dirk Wilden's avatar
Dirk Wilden committed
74
      virtual void loadIniFile( INIFile& /*_ini*/ ,int /*_id*/ ) {};
Jan Möbius's avatar
 
Jan Möbius committed
75 76 77 78 79
      
      /** Save object information to an ini file
       * @param _ini ini file
       * @param _id Identifier of the object to save (-1 for all)
       */
Dirk Wilden's avatar
Dirk Wilden committed
80
      virtual void saveIniFile( INIFile& /*_ini*/ ,int /*_id*/) {};
Jan Möbius's avatar
 
Jan Möbius committed
81 82 83 84
      
      /** Load Plugin options (state information) to an ini file
       * @param _ini  ini file
       */
Dirk Wilden's avatar
Dirk Wilden committed
85
      virtual void loadIniFileOptions( INIFile& /*_ini*/ ) {};
Jan Möbius's avatar
 
Jan Möbius committed
86 87 88 89
      
      /** Save Plugin options (state information) to an ini file
       * @param _ini ini file
       */
Dirk Wilden's avatar
Dirk Wilden committed
90
      virtual void saveIniFileOptions( INIFile& /*_ini*/ ) {};
Jan Möbius's avatar
 
Jan Möbius committed
91 92 93 94 95 96
      
};

Q_DECLARE_INTERFACE(INIInterface,"OpenFlipper.INIInterface/1.2")
      
#endif // INIINTERFACE_HH