Add init function to qmlmanager

In order to get autocomplete to work on manual dive add
we apparently need a separate init function.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Joakim Bygdell 2016-05-20 18:48:35 +02:00 committed by Dirk Hohndel
parent 6be5aba799
commit 80274b0968
2 changed files with 58 additions and 0 deletions

View file

@ -29,6 +29,9 @@ class QMLManager : public QObject {
Q_PROPERTY(bool syncToCloud READ syncToCloud WRITE setSyncToCloud NOTIFY syncToCloudChanged)
Q_PROPERTY(int updateSelectedDive READ updateSelectedDive WRITE setUpdateSelectedDive NOTIFY updateSelectedDiveChanged)
Q_PROPERTY(int selectedDiveTimestamp READ selectedDiveTimestamp WRITE setSelectedDiveTimestamp NOTIFY selectedDiveTimestampChanged)
Q_PROPERTY(QStringList suitInit READ suitInit CONSTANT)
Q_PROPERTY(QStringList buddyInit READ buddyInit CONSTANT)
Q_PROPERTY(QStringList divemasterInit READ divemasterInit CONSTANT)
public:
QMLManager();
@ -97,6 +100,10 @@ public:
typedef void (QMLManager::*execute_function_type)();
DiveListSortModel *dlSortModel;
QStringList suitInit() const;
QStringList buddyInit() const;
QStringList divemasterInit() const;
public slots:
void applicationStateChanged(Qt::ApplicationState state);
void savePreferences();