karbon

karbon_grid_data.cpp

00001 /*
00002  * Karbon - 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,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #include "karbon_grid_data.h"
00022 #include <qdom.h>
00023 
00024 KarbonGridData::KarbonGridData()
00025 {
00026     color = QColor( 228, 228, 228 );
00027     freq = KoSize( 20, 20 );
00028     snap = KoSize( 20, 20 );
00029     isSnap = false;
00030     isShow = false;
00031 }
00032 
00033 KarbonGridData::~KarbonGridData()
00034 {
00035 }
00036 
00037 void KarbonGridData::save(QDomElement& /*element*/, const QString& /*name*/)
00038 {
00039 /*  Karbon::saveSize(element, name + "Freg", freq);
00040   Karbon::saveSize(element, name + "Snap", snap);
00041   XmlWriteColor(element, name + "Color", color);
00042   element.setAttribute(name + "IsSnap", (int)isSnap);
00043   element.setAttribute(name + "IsShow", (int)isShow);*/
00044 }
00045 
00046 void KarbonGridData::load(const QDomElement& /*element*/, const QString& /*name*/)
00047 {
00048 /*  KoSize sdef;
00049   sdef = KoSize(10.0, 10.0);
00050   freq = Karbon::loadSize(element, name + "Freg", sdef);
00051   snap = Karbon::loadSize(element, name + "Snap", sdef);
00052 
00053   QColor def(QColor(228, 228, 228));
00054   color = XmlReadColor(element, name + "Color", def);
00055 
00056   isSnap = (bool)element.attribute(name + "IsSnap", "1").toInt();
00057   isShow = (bool)element.attribute(name + "IsShow", "1").toInt();*/
00058 }
00059 
KDE Home | KDE Accessibility Home | Description of Access Keys