From c7233b2c23937a492644c68094eeb4edd5b5cf04 Mon Sep 17 00:00:00 2001 From: Peter Hedlund Date: Tue, 27 Feb 2007 21:58:59 +0000 Subject: [PATCH] Delete obsolete files svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=637813 --- kdeeducore/CMakeLists.txt | 2 - kdeeducore/keduvocdocument.cpp | 9 --- kdeeducore/keduvocwqlwriter.cpp | 129 -------------------------------- kdeeducore/keduvocwqlwriter.h | 50 ------------- 4 files changed, 190 deletions(-) delete mode 100644 kdeeducore/keduvocwqlwriter.cpp delete mode 100644 kdeeducore/keduvocwqlwriter.h diff --git a/kdeeducore/CMakeLists.txt b/kdeeducore/CMakeLists.txt index e61d7e9..594d269 100644 --- a/kdeeducore/CMakeLists.txt +++ b/kdeeducore/CMakeLists.txt @@ -12,7 +12,6 @@ set(kdeeducore_LIB_SRCS keduvocpaukerreader.cpp keduvocvokabelnreader.cpp keduvocwqlreader.cpp - keduvocwqlwriter.cpp leitnerbox.cpp leitnersystem.cpp leitnersystemview.cpp @@ -46,7 +45,6 @@ install(FILES keduvocpaukerreader.h keduvocvokabelnreader.h keduvocwqlreader.h - keduvocwqlwriter.h leitnerbox.h leitnersystem.h leitnersystemview.h diff --git a/kdeeducore/keduvocdocument.cpp b/kdeeducore/keduvocdocument.cpp index 480d524..0e08f32 100644 --- a/kdeeducore/keduvocdocument.cpp +++ b/kdeeducore/keduvocdocument.cpp @@ -34,7 +34,6 @@ #include "keduvockvtmlwriter.h" #include "keduvoccsvreader.h" #include "keduvockvtmlreader.h" -#include "keduvocwqlwriter.h" #include "keduvocwqlreader.h" #include "keduvocpaukerreader.h" #include "keduvocvokabelnreader.h" @@ -280,8 +279,6 @@ bool KEduVocDocument::saveAs(QObject *parent, const KUrl & url, FileType ft, con { if (tmp.path().right(strlen("." KVTML_EXT)) == "." KVTML_EXT) ft = kvtml; - else if (tmp.path().right(strlen("." WQL_EXT)) == "." WQL_EXT) - ft = wql; else if (tmp.path().right(strlen("." CSV_EXT)) == "." CSV_EXT) ft = csv; else @@ -311,12 +308,6 @@ bool KEduVocDocument::saveAs(QObject *parent, const KUrl & url, FileType ft, con } break; - case wql: { - KEduVocWqlWriter wqlWriter(&f); - saved = wqlWriter.writeDoc(this); - } - break; - case csv: { QTextStream os( &f ); // serialize using f //TODO saved = saveToCsv(os, title); diff --git a/kdeeducore/keduvocwqlwriter.cpp b/kdeeducore/keduvocwqlwriter.cpp deleted file mode 100644 index d1ce9e5..0000000 --- a/kdeeducore/keduvocwqlwriter.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - export a KEduVocDocument to a WQL file - ----------------------------------------------------------------------- - copyright : (C) 2004 Peter Hedlund - (C) 2005 Eric Pignet - email : peter.hedlund@kdemail.net - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include -#include -#include - -#include - -#include "keduvocwqlwriter.h" -#include "keduvocdocument.h" - -#define winendl "\r\n" - -KEduVocWqlWriter::KEduVocWqlWriter(QFile *file) -{ - // the file must be already open - m_outputFile = file; -} - -KEduVocWqlWriter::~KEduVocWqlWriter() -{ -} - -bool KEduVocWqlWriter::writeDoc(KEduVocDocument *doc) -{ - m_doc = doc; - - m_outputStream.setDevice(m_outputFile); - m_outputStream.setCodec("ISO-8851-1"); - - m_outputStream << "WordQuiz" << winendl; - m_outputStream << "5.9.0" << winendl << winendl; - - if (doc->font() != NULL) - writeFont(*(doc->font())); - // TODO writeCharacters(Prefs::specialCharacters()); - // TODO Find the vertical header width, handle the case where there are not exactly two languages - writeGridInfo(10, m_doc->sizeHint(0), m_doc->sizeHint(1), m_doc->numEntries()); - /* TODO Find the selected cells - if (g->numSelections() > 0) - { - QTableSelection qts = g->selection(0); - writeSelection(qts.leftCol(), qts.topRow(), qts.rightCol(), qts.bottomRow()); - } - else - { - writeSelection(g->currentColumn(), g->currentRow(), g->currentColumn(), g->currentRow()); - }*/ - writeFirstItem(m_doc->originalIdentifier(), m_doc->identifier(1)); - int r = m_doc->numEntries(); - for (int w=0; w < r; w++) - { - // TODO Find the row height (g->rowHeight(w)) - writeItem(m_doc->entry(w)->original(), m_doc->entry(w)->translation(1), 30); - } - return true; -} - -void KEduVocWqlWriter::writeFont( const QFont & font ) -{ - m_outputStream << "[Font Info]" << winendl; - m_outputStream << "FontName1=\"" << font.family() << "\"" << winendl; - m_outputStream << "FontSize1=" << QString::number(font.pointSize()) << winendl; - m_outputStream << QString("FontBold1=%1").arg(font.bold() ? "1" : "0") < - -#include -#include -#include - -class KEduVocDocument; - -class KDEEDUCORE_EXPORT KEduVocWqlWriter -{ -public: - KEduVocWqlWriter(QFile *file); - ~KEduVocWqlWriter(); - - bool writeDoc(KEduVocDocument *doc); - - void writeFont(const QFont & font); - void writeCharacters(const QString & s); - void writeGridInfo(int col0, int col1, int col2, int numRows); - void writeSelection(int lc, int tr, int rc, int br); - void writeFirstItem(const QString &ll, const QString &rl); - void writeItem(const QString &left, const QString &right, int rh); - -private: - QFile *m_outputFile; - QTextStream m_outputStream; - KEduVocDocument *m_doc; -}; - -#endif -- 2.47.3