You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
7 years ago
|
#ifndef QTMVVM_EXPORTSETUPVIEWMODEL_P_H
|
||
|
#define QTMVVM_EXPORTSETUPVIEWMODEL_P_H
|
||
|
|
||
|
#include <tuple>
|
||
|
|
||
|
#include <QtMvvmCore/ViewModel>
|
||
|
|
||
|
#include "qtmvvmdatasynccore_global.h"
|
||
|
|
||
|
namespace QtMvvm {
|
||
|
|
||
|
class Q_MVVMDATASYNCCORE_EXPORT ExportSetupViewModel : public ViewModel
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
Q_PROPERTY(bool trusted READ trusted WRITE setTrusted NOTIFY trustedChanged)
|
||
|
Q_PROPERTY(bool includeServer READ includeServer WRITE setIncludeServer NOTIFY includeServerChanged)
|
||
|
Q_PROPERTY(QString password READ password WRITE setPassword NOTIFY passwordChanged)
|
||
|
|
||
|
Q_PROPERTY(bool valid READ isValid NOTIFY validChanged)
|
||
|
|
||
|
public:
|
||
|
static std::tuple<bool, bool, QString> result(const QVariant &data);
|
||
|
|
||
|
Q_INVOKABLE explicit ExportSetupViewModel(QObject *parent = nullptr);
|
||
|
|
||
|
bool trusted() const;
|
||
|
bool includeServer() const;
|
||
|
QString password() const;
|
||
|
bool isValid() const;
|
||
|
|
||
|
public Q_SLOTS:
|
||
|
bool completeSetup();
|
||
|
|
||
|
void setTrusted(bool trusted);
|
||
|
void setIncludeServer(bool includeServer);
|
||
|
void setPassword(QString password);
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
void trustedChanged(bool trusted);
|
||
|
void includeServerChanged(bool includeServer);
|
||
|
void passwordChanged(QString password);
|
||
|
void validChanged();
|
||
|
|
||
|
private:
|
||
|
bool _trusted;
|
||
|
QString _password;
|
||
|
bool _includeServer;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif // QTMVVM_EXPORTSETUPVIEWMODEL_P_H
|