Back to index

salome-gui  6.5.0
GLViewer_MimeData.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 //  Author : OPEN CASCADE
00021 // File:      GLViewer_MimeData.h
00022 // Created:   November, 2004
00023 //
00024 #ifndef GLVIEWER_MIMEDATA_H
00025 #define GLVIEWER_MIMEDATA_H
00026 
00027 #ifdef WIN32
00028 #include <windows.h>
00029 #endif
00030 
00031 #include "GLViewer.h"
00032 
00033 #include <QMimeData>
00034 
00035 #ifdef WIN32
00036 #pragma warning( disable:4251 )
00037 #endif
00038 
00039 class GLViewer_Object;
00040 
00045 class GLVIEWER_API GLViewer_MimeData: public QMimeData
00046 {
00047 public:
00048   GLViewer_MimeData():QMimeData(){};
00049   ~GLViewer_MimeData();
00050   
00052   bool                                setObjects( QList<GLViewer_Object*> );
00054   /*If you want to use new class, following two method must be redefined*/
00055   static QList<GLViewer_Object*>      getObjects( QByteArray, QString theType);
00057   /*If you want to use new class, following two method must be redefined*/
00058   static GLViewer_Object*             getObject( QByteArray, QString theType);
00059   
00060   const char*                         format( int theIndex = 0 ) const;
00061   QByteArray                          encodedData( const char* ) const;
00062   
00063 private:
00064   QByteArray                          myByteArray;
00065 };
00066 
00067 #ifdef WIN32
00068 #pragma warning ( default:4251 )
00069 #endif
00070 
00071 #endif