MvcCore/views/abstractdocview.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  abstractdocview.h
00004  *  Digest
00005  * 
00006  *  Imported into Digest by Aidan Lane on Thu Jun 9 2005.
00007  *  Modifications Copyright (c) 2005 Optimisation and Constraint Solving Group,
00008  *  Monash University. All rights reserved.
00009  *
00010  *  Nodal file:
00011  *
00012  *    projectobserver.h
00013  *    Nodal
00014  *
00015  *    Imported into Nodal by Aidan Lane on Thu Feb 24 2005.
00016  *    Modifications Copyright (c) 2005 CEMA, Monash University. All rights reserved.
00017  *
00018  *    Original file:
00019  *
00020  *      projectview.h
00021  *      EverGreen
00022  *
00023  *      Created by Aidan Lane on Wed Jul 14 2004.
00024  *      Copyright (c) 2004 Aidan Lane. All rights reserved.
00025  *
00026  *  This program is free software; you can redistribute it and/or modify
00027  *  it under the terms of the GNU General Public License as published by
00028  *  the Free Software Foundation; either version 2 of the License, or
00029  *  (at your option) any later version.
00030  *
00031  *  This program is distributed in the hope that it will be useful,
00032  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00033  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00034  *  GNU General Public License for more details.
00035  *
00036  *  You should have received a copy of the GNU General Public License
00037  *  along with this program; if not, write to the Free Software
00038  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00039  */
00040 
00041 
00042 #ifndef ABSTRACTDOCVIEW_H
00043 #define ABSTRACTDOCVIEW_H
00044 
00045 
00046 #include "abstractview.h"
00047 
00048 #include <QPointer>
00049 
00050 #include "docviewevents.h"
00051 
00052 class Doc;
00053 class DocController;
00054 
00055 
00059 class AbstractDocView : public AbstractView {
00060 
00061 public:
00062   AbstractDocView( QObject* objectPtr );
00063 
00064   DocController* docController() const;
00065   Doc* doc() const;
00066 
00067 
00068 protected:
00069   virtual void dispatchEvent( VEvent* );
00070 
00071   virtual void changeControllerEvent( VChangeControllerEvent* );
00072   virtual void modelChangedEvent( VModelChangedEvent* );
00073 
00074   // The following implementations do nothing, derivative classes are left to
00075   // add functionality.
00076   virtual void renamedEvent( VRenamedEvent* ) {}
00077   virtual void filenameChangedEvent( VFilenameChangedEvent* ) {}
00078   virtual void modifiedStateChangedEvent( VModifiedStateChangedEvent* ) {}
00079 
00080 
00081 private:
00082   // Temporary caches:
00083   QPointer<DocController> c_docController;
00084   QPointer<Doc>           c_doc;
00085 };
00086 
00087 
00088 #endif // ! ABSTRACTDOCVIEW_H

Generated on Mon Jul 30 09:46:50 2007 for Digest by  doxygen 1.5.2