summaryrefslogtreecommitdiffstats
path: root/src/translators/textimporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/translators/textimporter.cpp')
-rw-r--r--src/translators/textimporter.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/translators/textimporter.cpp b/src/translators/textimporter.cpp
new file mode 100644
index 0000000..3130a0f
--- /dev/null
+++ b/src/translators/textimporter.cpp
@@ -0,0 +1,29 @@
+/***************************************************************************
+ copyright : (C) 2003-2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#include "textimporter.h"
+#include "../filehandler.h"
+
+using Tellico::Import::TextImporter;
+
+TextImporter::TextImporter(const KURL& url_, bool useUTF8_)
+ : Import::Importer(url_) {
+ if(url_.isValid()) {
+ setText(FileHandler::readTextFile(url_, false, useUTF8_));
+ }
+}
+
+TextImporter::TextImporter(const QString& text_) : Import::Importer(text_) {
+}
+
+#include "textimporter.moc"