qoccdocument.h

Go to the documentation of this file.
00001 /************************************************************************************
00002 **
00003 ** This file is part of the QtOPENCASCADE Toolkit.
00004 **
00005 ** Copyright (C) 2006, 2007, 2008 QtOCC Team Members
00006 **               Peter Dolbey, Marc Britten, Stephane Routelous
00007 **               Stefan Boeykens, Pawel Dobrolowski, Walter Steffe
00008 **               Álvaro Castro Castilla, Dirk Burski, Fotis Sioutis
00009 **
00010 ** This library is free software; you can redistribute it and/or
00011 ** modify it under the terms of the GNU Lesser General Public
00012 ** License as published by the Free Software Foundation; either
00013 ** version 2.1 of the License, or (at your option) any later version.
00014 **
00015 ** This library is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 ** Lesser General Public License for more details.
00019 **
00020 ** You should have received a copy of the GNU Lesser General Public
00021 ** License along with this library; if not, write to the Free Software
00022 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023 **
00024 ***********************************************************************************/
00025 #ifndef QOCCDOCUMENT_H
00026 #define QOCCDOCUMENT_H
00027 
00028 #include <QtCore/QObject>
00029 #include "qocc.h"
00030 
00031 #include <GEOMImpl_Gen.hxx>
00032 #include <TPrsStd_AISPresentation.hxx>
00033 
00034 class QOCC_DECLSPEC QoccDocument : public QObject
00035 {
00036 
00037         Q_OBJECT
00038 
00039 public:
00040 
00041     QoccDocument(const Handle(TDocStd_Document)& aDoc, int anID = 0);
00042     ~QoccDocument( );
00043 
00044         Handle(TDocStd_Document)& getDocument() { return myDocument; }
00045 
00046         int id() { return myID; }
00047         Handle(TPrsStd_AISPresentation) RegisterPresentation(Handle(GEOM_Object) TheGeomObject);
00048         bool RemovePresentation(Handle(GEOM_Object) TheGeomObject);
00049 
00050         void undo();
00051         void redo();
00052 
00053         void UpdatePresentations(TDF_Label theRoot);
00054         void SetDocumentAndID(Handle(TDocStd_Document) aDocument, int anID);
00055 
00056 private:
00057 
00058         Handle(TDocStd_Document) myDocument;
00059         int myID;
00060 
00061 };
00062 
00063 #endif // QOCCDOCUMENT_H

Generated on Sat Feb 23 21:22:15 2008 for QtGEOM by  doxygen 1.4.7