kspread

ksploadinginfo.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Laurent Montel <montel@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KSPLOADINGINFO_H
21#define KSPLOADINGINFO_H
22
23#include <tqpoint.h>
24#include <tqstringlist.h>
25
26#include <KoPoint.h>
27
28namespace KSpread
29{
30class Sheet;
31
33class KSPLoadingInfo
34{
35public:
36 KSPLoadingInfo() { m_loadTemplate = false;}
37 ~KSPLoadingInfo() {}
38 void addWordInAreaList( const TQString & word) { m_areaNamed.append( word ); }
39 bool findWordInAreaList(const TQString & word) const { return (m_areaNamed.find( word ) != m_areaNamed.end());}
40 void appendValidation( const TQString &name, const TQDomElement &element){ m_validationList.insert( name, element);}
41 TQDomElement validation( const TQString &name) { return m_validationList[name];}
42
46 const TQMap<Sheet*, TQPoint>& cursorPositions() const { return m_cursorPositions; }
47
51 void setCursorPosition( Sheet* sheet, const TQPoint& point ) { m_cursorPositions.insert( sheet, point );}
52
56 const TQMap<Sheet*, KoPoint>& scrollingOffsets() const { return m_scrollingOffsets; }
57
61 void setScrollingOffset( Sheet* sheet, const KoPoint& point ) { m_scrollingOffsets.insert( sheet, point );}
62
63 void setLoadTemplate( bool _b ) {
64 m_loadTemplate = _b;
65 }
66 bool loadTemplate() const {
67 return m_loadTemplate;
68 }
69
70private:
71 TQStringList m_areaNamed;
72 TQMap<TQString,TQDomElement> m_validationList;
73 TQMap<Sheet*, TQPoint> m_cursorPositions;
74 TQMap<Sheet*, KoPoint> m_scrollingOffsets;
75 bool m_loadTemplate;
76};
77
78} // namespace KSpread
79
80#endif /* KPRLOADINGINFO_H */
81
const TQMap< Sheet *, TQPoint > & cursorPositions() const
void setScrollingOffset(Sheet *sheet, const KoPoint &point)
Stores the scrolling offset point for sheet .
const TQMap< Sheet *, KoPoint > & scrollingOffsets() const
void setCursorPosition(Sheet *sheet, const TQPoint &point)
Stores the cursor position point for sheet .
The KSpread namespace.
Definition commands.h:39