kivio

kivio_map.h

00001 /*
00002  * Kivio - Visual Modelling and Flowcharting
00003  * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 #ifndef __kivio_map_h__
00020 #define __kivio_map_h__
00021 
00022 class KivioPage;
00023 class KivioMap;
00024 class KivioDoc;
00025 
00026 class KoStore;
00027 class KoXmlWriter;
00028 class KoGenStyles;
00029 
00030 class QDomElement;
00031 class QDomDocument;
00032 class DCOPObject;
00033 
00034 #include <qintdict.h>
00035 #include <qobject.h>
00036 #include <qptrlist.h>
00037 #include <qstringlist.h>
00038 
00039 /*
00040  * A map is a simple container for all pages. Usually a complete map is saved in one file.
00041  */
00042 
00043 class KivioMap : public QObject
00044 {
00045   public:
00049     KivioMap( KivioDoc* doc, const char* name = 0 );
00053     virtual ~KivioMap();
00054   
00055     QDomElement save( QDomDocument& doc );
00056     void saveOasis(KoStore* store, KoXmlWriter* docWriter, KoGenStyles* styles);
00057     bool loadXML( const QDomElement& mymap );
00058   
00062     void addPage( KivioPage* );
00063   
00064     void takePage( KivioPage* page );
00065     void insertPage( KivioPage* page );
00066   
00072     void movePage( const QString & _from, const QString & _to, bool _before = true );
00073   
00074     KivioPage* findPage( const QString& name );
00075   
00082     KivioPage* firstPage();
00083 
00087     KivioPage* lastPage();
00088 
00095     KivioPage* nextPage();
00096   
00097     QPtrList<KivioPage>& pageList() { return m_lstPages; }
00098     
00102     QStringList visiblePages() const;
00103     
00107     QStringList hiddenPages() const;
00108   
00112     int count()const;
00113   
00114     void update();
00115   
00116     KivioDoc* doc()const;
00117   
00118     virtual DCOPObject* dcopObject();
00119 
00120     void clear();
00121 
00122   private:
00123     QPtrList<KivioPage> m_lstPages;
00124     QPtrList<KivioPage> m_lstDeletedPages;
00125   
00126     KivioDoc* m_pDoc;
00127     DCOPObject* m_dcop;
00128 };
00129 
00130 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys