diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-17 16:27:38 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-17 16:27:38 +0200 |
| commit | f91e5c4c83a071ab720417d490fd44a8f4678bc1 (patch) | |
| tree | 9d38fad279c015bea0bf256184b6936171310aa7 /qt/adapter.h | |
| parent | c182f3f16e56e9533060ffa06b25391e239a28ee (diff) | |
| download | nissy-core-f91e5c4c83a071ab720417d490fd44a8f4678bc1.tar.gz nissy-core-f91e5c4c83a071ab720417d490fd44a8f4678bc1.zip | |
Improvements to QT UI
Diffstat (limited to 'qt/adapter.h')
| -rw-r--r-- | qt/adapter.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt/adapter.h b/qt/adapter.h index 856cdad..e961459 100644 --- a/qt/adapter.h +++ b/qt/adapter.h | |||
| @@ -14,7 +14,7 @@ struct SolveOptions { | |||
| 14 | unsigned minmoves; | 14 | unsigned minmoves; |
| 15 | unsigned maxmoves; | 15 | unsigned maxmoves; |
| 16 | unsigned maxsolutions; | 16 | unsigned maxsolutions; |
| 17 | int optimal; | 17 | unsigned optimal; |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | class NissyAdapter : public QObject { | 20 | class NissyAdapter : public QObject { |
| @@ -23,6 +23,8 @@ class NissyAdapter : public QObject { | |||
| 23 | QML_ELEMENT | 23 | QML_ELEMENT |
| 24 | 24 | ||
| 25 | public: | 25 | public: |
| 26 | static constexpr int maxSolutionsHardLimit = 9999; | ||
| 27 | |||
| 26 | NissyAdapter(); | 28 | NissyAdapter(); |
| 27 | 29 | ||
| 28 | Q_INVOKABLE bool isValidScramble(QString); | 30 | Q_INVOKABLE bool isValidScramble(QString); |
| @@ -42,11 +44,12 @@ signals: | |||
| 42 | 44 | ||
| 43 | private: | 45 | private: |
| 44 | std::vector<nissy::solver> solvers; | 46 | std::vector<nissy::solver> solvers; |
| 45 | std::function<void(const char*)> writeLog; | 47 | std::function<void(std::string)> writeLog; |
| 46 | 48 | ||
| 47 | void initSolver(const std::string&); | 49 | void initSolver(const std::string&); |
| 48 | void startSolve(SolveOptions); | 50 | void startSolve(SolveOptions); |
| 49 | bool loadSolverData(nissy::solver&); | 51 | bool loadSolverData(nissy::solver&); |
| 52 | void logLine(std::string); | ||
| 50 | }; | 53 | }; |
| 51 | 54 | ||
| 52 | #endif | 55 | #endif |
