summaryrefslogtreecommitdiff
path: root/src/mobile/ui/moduleinterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mobile/ui/moduleinterface.h')
-rw-r--r--src/mobile/ui/moduleinterface.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/mobile/ui/moduleinterface.h b/src/mobile/ui/moduleinterface.h
new file mode 100644
index 0000000..165c30f
--- /dev/null
+++ b/src/mobile/ui/moduleinterface.h
@@ -0,0 +1,48 @@
+#ifndef MODULE_INTERFACE_H
+#define MODULE_INTERFACE_H
+
+#include "mobile/models/roleitemmodel.h"
+#include <QObject>
+#include <QList>
+#include <QSet>
+#include <QString>
+
+class QQuickItem;
+class QStringList;
+class CSwordModuleInfo;
+
+namespace btm {
+
+class GridChooser;
+
+class BtWindowInterface;
+
+class ModuleInterface : public QObject {
+ Q_OBJECT
+
+public:
+ ModuleInterface();
+ Q_INVOKABLE void updateCategoryAndLanguageModels();
+ Q_INVOKABLE void updateWorksModel();
+ Q_INVOKABLE QString category(int index);
+ Q_INVOKABLE QString language(int index);
+ Q_INVOKABLE QString module(int index);
+
+private:
+ void getCategoriesAndLanguages();
+ void setProperties(const QStringList& list);
+ QString currentLanguage() const;
+ QString currentCategory() const;
+
+ QSet<QString> m_categories;
+ QSet<QString> m_languages;
+ RoleItemModel m_categoryModel;
+ RoleItemModel m_languageModel;
+ RoleItemModel m_worksModel;
+ QList<CSwordModuleInfo*> m_modules;
+
+};
+
+} // end namespace
+
+#endif