kivio

kivio_map.h
1/*
2 * Kivio - Visual Modelling and Flowcharting
3 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef __kivio_map_h__
20#define __kivio_map_h__
21
22class KivioPage;
23class KivioMap;
24class KivioDoc;
25
26class KoStore;
27class KoXmlWriter;
28class KoGenStyles;
29
30class TQDomElement;
31class TQDomDocument;
32class DCOPObject;
33
34#include <tqintdict.h>
35#include <tqobject.h>
36#include <tqptrlist.h>
37#include <tqstringlist.h>
38
39/*
40 * A map is a simple container for all pages. Usually a complete map is saved in one file.
41 */
42
43class KivioMap : public TQObject
44{
45 public:
49 KivioMap( KivioDoc* doc, const char* name = 0 );
53 virtual ~KivioMap();
54
55 TQDomElement save( TQDomDocument& doc );
56 void saveOasis(KoStore* store, KoXmlWriter* docWriter, KoGenStyles* styles);
57 bool loadXML( const TQDomElement& mymap );
58
62 void addPage( KivioPage* );
63
64 void takePage( KivioPage* page );
65 void insertPage( KivioPage* page );
66
72 void movePage( const TQString & _from, const TQString & _to, bool _before = true );
73
74 KivioPage* findPage( const TQString& name );
75
82 KivioPage* firstPage();
83
87 KivioPage* lastPage();
88
95 KivioPage* nextPage();
96
97 TQPtrList<KivioPage>& pageList() { return m_lstPages; }
98
102 TQStringList visiblePages() const;
103
107 TQStringList hiddenPages() const;
108
112 int count()const;
113
114 void update();
115
116 KivioDoc* doc()const;
117
118 virtual DCOPObject* dcopObject();
119
120 void clear();
121
122 private:
123 TQPtrList<KivioPage> m_lstPages;
124 TQPtrList<KivioPage> m_lstDeletedPages;
125
126 KivioDoc* m_pDoc;
127 DCOPObject* m_dcop;
128};
129
130#endif