src/GLViewer/GLViewer_MimeSource.h

Go to the documentation of this file.
00001 //  Copyright (C) 2005 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 //  Author : OPEN CASCADE
00020 //
00021 
00022 // File:      GLViewer_MimeSource.h
00023 // Created:   November, 2004
00024 
00025 #ifndef GLVIEWER_MIMESOURCE_H
00026 #define GLVIEWER_MIMESOURCE_H
00027 
00028 #ifdef WNT
00029 #include <windows.h>
00030 #endif
00031 
00032 #include "GLViewer.h"
00033 
00034 #include <qmime.h>
00035 #include <qvaluelist.h>
00036 
00037 #ifdef WNT
00038 #pragma warning( disable:4251 )
00039 #endif
00040 
00041 class GLViewer_Object;
00042 
00047 class GLVIEWER_API GLViewer_MimeSource: public QMimeSource
00048 {
00049 public:
00050   GLViewer_MimeSource():QMimeSource(){};
00051   ~GLViewer_MimeSource();
00052   
00054   bool                                setObjects( QValueList<GLViewer_Object*> );
00056   /*If you want to use new class, following two method must be redefined*/
00057   static QValueList<GLViewer_Object*> getObjects( QByteArray, QString theType);
00059   /*If you want to use new class, following two method must be redefined*/
00060   static GLViewer_Object*             getObject( QByteArray, QString theType);
00061   
00062   // Redefined methods
00063   virtual const char*                 format( int theIndex = 0 ) const;
00064   virtual QByteArray                  encodedData( const char* ) const;
00065   
00066 private:
00067   QByteArray                          myByteArray;
00068 };
00069 
00070 #ifdef WNT
00071 #pragma warning ( default:4251 )
00072 #endif
00073 
00074 #endif