From 6d989b8b4866c89c3940acac2121a8797ac7fbf6 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Fri, 7 Jun 2002 15:08:07 +0000 Subject: [PATCH] Removed the old sources for libkdeedu -- they confused me, as there were two versions. I also updated the Makefile.am and FlashKard to reflect the new location. svn path=/trunk/kdeedu/libkdeedu/; revision=159765 --- Makefile.am | 23 +---------- kedudata.cpp | 111 --------------------------------------------------- kedudata.h | 45 --------------------- 3 files changed, 2 insertions(+), 177 deletions(-) delete mode 100644 kedudata.cpp delete mode 100644 kedudata.h diff --git a/Makefile.am b/Makefile.am index 4e9ad05..89c13ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,2 @@ -INCLUDES= $(all_includes) -SUBDIRS = kdeeduui kdeeducore - -lib_LTLIBRARIES = libkdeedu.la - -libkdeedu_la_SOURCES = kedudata.cpp - -libkdeedu_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 1:0 - -include_HEADERS = kedudata.h -# noinst_HEADERS = - -libkdeedu_la_LIBADD = $(LIB_KDECORE) - -METASOURCES = AUTO - -# updatedir = -# update_DATA = - -# messages: -# $(XGETTEXT) *.cpp *.h -o $(podir)/libkdeedu.pot +COMPILE_FIRST = kdeeducore +SUBDIRS = $(COMPILE_FIRST) kdeeduui diff --git a/kedudata.cpp b/kedudata.cpp deleted file mode 100644 index 285b5d9..0000000 --- a/kedudata.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* This file is part of the KDE Edu Library - Copyright (C) 2002 Scott Wheeler - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include "kedudata.h" - -#include - -#include - -//////////////////////////////////////////////////////////////////////////////// -// class KEduDataItem -//////////////////////////////////////////////////////////////////////////////// - -// public methods - -KEduDataItem::KEduDataItem() -{ - -} - -KEduDataItem::KEduDataItem(QDomElement &entry) -{ - domElement = entry; -} - -KEduDataItem::~KEduDataItem() -{ - -} - -QString KEduDataItem::originalText() -{ - return getText("o"); -} - -QString KEduDataItem::translatedText() -{ - return getText("t"); -} - -// protected methods - -QString KEduDataItem::getText(const QString tagName) -{ - if(!domElement.isNull()) { - - QDomNodeList list = domElement.elementsByTagName(tagName); - - if(list.count() > 0) { - - QDomElement element = list.item(0).toElement(); - - if(!element.isNull()) { - return element.text(); - } - else - return QString::null; - } - else - return QString::null; - } - else - return QString::null; -} - -//////////////////////////////////////////////////////////////////////////////// -// class KEduData -//////////////////////////////////////////////////////////////////////////////// - -// public static methods - -KEduDataItemList KEduData::parse(const QString fileName) -{ - KEduDataItemList list; - - QDomDocument document; - QFile file(fileName); - document.setContent(&file); - - QDomNodeList entries = document.elementsByTagName("e"); - - // loop through the "e" (entry) tags looking for data - for(uint i = 0 ; i < entries.count() ; i++) { - - // get an entry to operate on - QDomElement entry = entries.item(i).toElement(); - - // if the "node" is in fact an element -- i.e. not null - if(!entry.isNull()) { - KEduDataItem item(entry); - list.append(item); - } - } - - return list; -} diff --git a/kedudata.h b/kedudata.h deleted file mode 100644 index 9ae59d4..0000000 --- a/kedudata.h +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is part of the KDE Edu Library - Copyright (C) 2002 Scott Wheeler - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include - -class KEduDataItem -{ -public: - KEduDataItem(); - KEduDataItem(QDomElement &entry); - virtual ~KEduDataItem(); - - QString originalText(); - QString translatedText(); - -protected: - QString getText(const QString tagName); - -private: - QDomElement domElement; -}; - -typedef QValueList KEduDataItemList; - -class KEduData -{ -public: - static KEduDataItemList parse(const QString fileName); -}; -- 2.47.3