summaryrefslogtreecommitdiff
path: root/src/backend/managers/btstringmgr.h
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-10-21 22:48:19 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-10-21 22:48:19 -0400
commit1af3b165c9377702ca62a64112bc089a6f575c30 (patch)
tree4df9cca5543b2cab5ca56dbb1214d7d3b1f291e3 /src/backend/managers/btstringmgr.h
parent5b5fd0dce407556f98ed8edee89dc830bf1437b1 (diff)
Imported Upstream version 2.0~beta2
Diffstat (limited to 'src/backend/managers/btstringmgr.h')
-rw-r--r--src/backend/managers/btstringmgr.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/backend/managers/btstringmgr.h b/src/backend/managers/btstringmgr.h
new file mode 100644
index 0000000..d202c7f
--- /dev/null
+++ b/src/backend/managers/btstringmgr.h
@@ -0,0 +1,53 @@
+/*********
+*
+* This file is part of BibleTime's source code, http://www.bibletime.info/.
+*
+* Copyright 1999-2008 by the BibleTime developers.
+* The BibleTime source code is licensed under the GNU General Public License version 2.0.
+*
+**********/
+
+#ifndef BTSTRINGMGR_H
+#define BTSTRINGMGR_H
+
+//Sword includes
+#include <stringmgr.h>
+
+//Qt includes
+#include <QString>
+
+/** Unicode string manager implementation.
+ * This is the StringManager implementation which works with QString.
+ * @author The BibleTime developers
+ */
+
+class BTStringMgr : public sword::StringMgr {
+
+public:
+ /** Converts the param to an upper case Utf8 string
+ * @param The text encoded in utf8 which should be turned into an upper case string
+ */
+ virtual char *upperUTF8(char *text, unsigned int max = 0) const;
+
+ /** Converts the param to an uppercase latin1 string
+ * @param The text encoded in latin1 which should be turned into an upper case string
+ */
+ virtual char *upperLatin1(char *text, unsigned int max = 0) const;
+
+protected:
+ /** Enable Unicode support.
+ * Reimplementation to show unicode support.
+ */
+ virtual bool supportsUnicode() const;
+
+ /** CODE TAKEN FROM KDELIBS 3.2, which is licensed under the LGPL 2.
+ *
+ * This code was taken from KStringHandler, which is part of the KDE libraries.
+ *
+ * This function checks whether a string is utf8 or not.
+ * It was taken from kdelibs so we do not depend on KDE 3.2.
+ */
+ bool isUtf8(const char *buf) const;
+};
+
+#endif