mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile cleanup: restyle construction of locationlist
See also e6e1473e6. The construction of the locationlist
was not the same as the 3 previous lists, and it needs
the inclusion of a new model file (divelocationmodel.cpp)
in the mobile app. In addition, as the mobile app is mainly
interested in a simple stringList (model) to populate a HintsText
field (or maybe later a combobox), this stringlist is added
to the model, to easy interfacing with QML.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
83259008e7
commit
494ad26540
8 changed files with 24 additions and 24 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include "core/downloadfromdcthread.h"
|
||||
#include "qt-models/divelistmodel.h"
|
||||
#include "qt-models/completionmodels.h"
|
||||
#include "qt-models/divelocationmodel.h"
|
||||
|
||||
class QMLManager : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
@ -39,6 +40,7 @@ class QMLManager : public QObject {
|
|||
Q_PROPERTY(QStringList suitList READ suitList NOTIFY suitListChanged)
|
||||
Q_PROPERTY(QStringList buddyList READ buddyList NOTIFY buddyListChanged)
|
||||
Q_PROPERTY(QStringList divemasterList READ divemasterList NOTIFY divemasterListChanged)
|
||||
Q_PROPERTY(QStringList locationList READ locationList NOTIFY locationListChanged)
|
||||
Q_PROPERTY(QStringList cylinderInit READ cylinderInit CONSTANT)
|
||||
Q_PROPERTY(bool showPin MEMBER m_showPin WRITE setShowPin NOTIFY showPinChanged)
|
||||
Q_PROPERTY(QString progressMessage MEMBER m_progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged)
|
||||
|
|
@ -134,6 +136,7 @@ public:
|
|||
QStringList suitList() const;
|
||||
QStringList buddyList() const;
|
||||
QStringList divemasterList() const;
|
||||
QStringList locationList() const;
|
||||
QStringList cylinderInit() const;
|
||||
bool showPin() const;
|
||||
void setShowPin(bool enable);
|
||||
|
|
@ -200,6 +203,7 @@ private:
|
|||
BuddyCompletionModel buddyModel;
|
||||
SuitCompletionModel suitModel;
|
||||
DiveMasterCompletionModel divemasterModel;
|
||||
LocationInformationModel locationModel;
|
||||
QString m_cloudUserName;
|
||||
QString m_cloudPassword;
|
||||
QString m_cloudPin;
|
||||
|
|
@ -274,6 +278,7 @@ signals:
|
|||
void suitListChanged();
|
||||
void buddyListChanged();
|
||||
void divemasterListChanged();
|
||||
void locationListChanged();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue