karbon

karbon_grid_data.cpp
1/*
2 * Karbon - 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,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#include "karbon_grid_data.h"
22#include <tqdom.h>
23
24KarbonGridData::KarbonGridData()
25{
26 color = TQColor( 228, 228, 228 );
27 freq = KoSize( 20, 20 );
28 snap = KoSize( 20, 20 );
29 isSnap = false;
30 isShow = false;
31}
32
33KarbonGridData::~KarbonGridData()
34{
35}
36
37void KarbonGridData::save(TQDomElement& /*element*/, const TQString& /*name*/)
38{
39/* Karbon::saveSize(element, name + "Freg", freq);
40 Karbon::saveSize(element, name + "Snap", snap);
41 XmlWriteColor(element, name + "Color", color);
42 element.setAttribute(name + "IsSnap", (int)isSnap);
43 element.setAttribute(name + "IsShow", (int)isShow);*/
44}
45
46void KarbonGridData::load(const TQDomElement& /*element*/, const TQString& /*name*/)
47{
48/* KoSize sdef;
49 sdef = KoSize(10.0, 10.0);
50 freq = Karbon::loadSize(element, name + "Freg", sdef);
51 snap = Karbon::loadSize(element, name + "Snap", sdef);
52
53 TQColor def(TQColor(228, 228, 228));
54 color = XmlReadColor(element, name + "Color", def);
55
56 isSnap = (bool)element.attribute(name + "IsSnap", "1").toInt();
57 isShow = (bool)element.attribute(name + "IsShow", "1").toInt();*/
58}
59