1 #ifndef H_EXTENSIONS_CUTEHMI_LOCKSCREEN_2_INCLUDE_CUTEHMI_LOCKSCREEN_GATEKEEPER_HPP
2 #define H_EXTENSIONS_CUTEHMI_LOCKSCREEN_2_INCLUDE_CUTEHMI_LOCKSCREEN_GATEKEEPER_HPP
4 #include "internal/common.hpp"
6 #include <cutehmi/Singleton.hpp>
16 friend class test_Gatekeeper;
19 static constexpr
int INITIAL_HASHES_MIN = 9000;
20 static constexpr
int INITIAL_HASHES_MAX = 10000;
22 Q_PROPERTY(
int hashesLow READ hashesLow WRITE setHashesLow NOTIFY hashesLowChanged)
24 Q_PROPERTY(
int hashesHigh READ hashesHigh WRITE setHashesHigh NOTIFY hashesHighChanged)
26 Q_PROPERTY(
QString password READ password WRITE setPassword NOTIFY passwordChanged)
28 Q_PROPERTY(
QByteArray secret READ secret WRITE setSecret NOTIFY secretChanged)
32 int hashesLow() const;
34 void setHashesLow(
int low);
36 int hashesHigh() const;
38 void setHashesHigh(
int high);
42 void setPassword(const
QString & password);
48 Q_INVOKABLE virtual
bool authenticate() const;
53 void hashesLowChanged();
55 void hashesHighChanged();
57 void passwordChanged();
64 int pickNumberOfHashes() const;