summaryrefslogtreecommitdiffstats
path: root/kttsd/libkttsd/utils.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit00bb99ac80741fc50ef8a289719373032f2391eb (patch)
tree3a5a9bf72f942784b38bf77dd66c534662fab5f2 /kttsd/libkttsd/utils.h
downloadtdeaccessibility-00bb99ac80741fc50ef8a289719373032f2391eb.tar.gz
tdeaccessibility-00bb99ac80741fc50ef8a289719373032f2391eb.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd/libkttsd/utils.h')
-rw-r--r--kttsd/libkttsd/utils.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/kttsd/libkttsd/utils.h b/kttsd/libkttsd/utils.h
new file mode 100644
index 0000000..63e95bc
--- /dev/null
+++ b/kttsd/libkttsd/utils.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+ Class of utility functions.
+ -------------------
+ Copyright : (C) 2004 Paul Giannaros
+ -------------------
+ Original author: Paul Giannaros <ceruleanblaze@gmail.com>
+ Current Maintainer: Paul Giannaros <ceruleanblaze@gmail.com>
+ ****************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+#ifndef UTILS_H
+#define UTILS_H
+
+#include <kdemacros.h>
+#include "kdeexportfix.h"
+
+class QString;
+class QComboBox;
+
+class KDE_EXPORT KttsUtils {
+
+public:
+ /// Constructor
+ KttsUtils();
+ /// Destructor
+ ~KttsUtils();
+
+ /**
+ * Check if an XML document has a certain root element.
+ * @param xmldoc The document to check for the element.
+ * @param elementName The element to check for in the document.
+ * @returns true if the root element exists in the document, false otherwise.
+ */
+ static bool hasRootElement(const QString &xmldoc, const QString &elementName);
+
+ /**
+ * Check if an XML document has a certain DOCTYPE.
+ * @param xmldoc The document to check for the doctype.
+ * @param name The doctype name to check for. Pass QString::null to not check the name.
+ * @param publicId The public ID to check for. Pass QString::null to not check the ID.
+ * @param systemId The system ID to check for. Pass QString::null to not check the ID.
+ * @returns true if the parameters match the doctype, false otherwise.
+ */
+ static bool hasDoctype(const QString &xmldoc, const QString &name/*, const QString &publicId, const QString &systemId*/);
+
+ /**
+ * Sets the current item in the given combobox to the item with the given text.
+ * If item with the text not found, does nothing.
+ */
+ static void setCbItemFromText(QComboBox* cb, const QString& text);
+
+};
+
+#endif