291 Q_PROPERTY(
int scoreGeneration READ scoreGeneration WRITE setScoreGeneration NOTIFY scoreGenerationChanged)
292 Q_PROPERTY(
int listGeneration READ listGeneration WRITE setListGeneration NOTIFY listGenerationChanged)
293 Q_PROPERTY(QVariant item READ item WRITE setItem NOTIFY itemChanged)
294 Q_PROPERTY(QVariant chartData READ chartData WRITE setChartData NOTIFY chartDataChanged)
295 Q_PROPERTY(QObject* summary READ summaryObject CONSTANT)
296 Q_PROPERTY(QObject* bestStats READ bestStatsObject NOTIFY bestStatsChanged)
297 Q_PROPERTY(QObject* scoreCounts READ scoreCountsObject CONSTANT)
298 Q_PROPERTY(QVariant scoreOptionIds READ scoreOptionIds WRITE setScoreOptionIds NOTIFY scoreOptionIdsChanged)
300 Q_PROPERTY(
int selectedItemRevision READ selectedItemRevision NOTIFY selectedItemRevisionChanged)
301 Q_PROPERTY(
int selectedChartRevision READ selectedChartRevision NOTIFY selectedChartRevisionChanged)
302 Q_PROPERTY(
int selectedScoreRevision READ selectedScoreRevision NOTIFY selectedScoreRevisionChanged)
303 Q_PROPERTY(
int selectedDifficultyRevision READ selectedDifficultyRevision NOTIFY selectedDifficultyRevisionChanged)
308 int scoreGeneration() const;
309 void setScoreGeneration(
int value);
311 int listGeneration() const;
312 void setListGeneration(
int value);
314 QVariant item() const;
315 void setItem(const QVariant&
value);
317 QVariant chartData() const;
318 void setChartData(const QVariant&
value);
320 QObject* summaryObject() const;
323 QObject* bestStatsObject() const;
325 QObject* scoreCountsObject() const;
328 QVariant scoreOptionIds() const;
329 void setScoreOptionIds(const QVariant&
value);
332 int selectedItemRevision() const;
333 int selectedChartRevision() const;
334 int selectedScoreRevision() const;
335 int selectedDifficultyRevision() const;
337 Q_INVOKABLE
bool selectedIdentityMatches(const QString& itemKey,
338 const QString& targetItemKey,
342 bool useBeatorajaSemantics,
343 bool buildScoreOptionIds,
344 bool difficultyStateUsed,
345 bool difficultyLampStateUsed) const;
346 Q_INVOKABLE
bool refreshSelectedFromVariantIdentityForIdentifier(const QString& itemKey,
347 const QString& targetItemKey,
351 const QVariant& item,
352 const QVariant& chartData,
353 const QVariantList& scoreList,
354 const QString& scoreIdentifier,
355 int selectedDifficulty,
356 const QVariantList& difficultyCounts,
357 const QVariantList& difficultyLevels,
358 const QVariantList& difficultyLamps,
359 bool useBeatorajaSemantics,
360 bool buildScoreOptionIds,
361 bool difficultyStateUsed,
362 bool difficultyLampStateUsed);
363 Q_INVOKABLE QObject* cachedScoreSummaryForIdentifier(const QString& identifier,
365 const QVariantList& scoreList,
366 bool useBeatorajaSemantics,
367 bool buildScoreOptionIds);
368 Q_INVOKABLE
bool hasCachedScoreSummaryForIdentifier(const QString& identifier,
370 bool useBeatorajaSemantics,
371 bool buildScoreOptionIds);
372 Q_INVOKABLE
bool resolvesSelectedNumberValue(
int num) const;
373 Q_INVOKABLE QVariant resolvedSelectedNumberValue(
int num) const;
374 Q_INVOKABLE
int selectedNumberValue(
int num) const;
375 Q_INVOKABLE
double selectedBarGraphValue(
int type) const;
376 Q_INVOKABLE
void clearScoreSummaryCache();
377 Q_INVOKABLE
void clear();
380 void scoreGenerationChanged();
381 void listGenerationChanged();
383 void chartDataChanged();
384 void summaryChanged();
385 void bestStatsChanged();
386 void scoreCountsChanged();
387 void scoreOptionIdsChanged();
388 void selectedItemRevisionChanged();
389 void selectedChartRevisionChanged();
390 void selectedScoreRevisionChanged();
391 void selectedDifficultyRevisionChanged();
394 bool selectedRefreshMatches(const QString& itemKey,
395 const QString& targetItemKey,
399 bool useBeatorajaSemantics,
400 bool buildScoreOptionIds,
401 bool difficultyStateUsed,
402 bool difficultyLampStateUsed) const;
403 void rememberSelectedIdentity(const QString& itemKey,
404 const QString& targetItemKey,
406 bool difficultyStateUsed,
407 bool difficultyLampStateUsed);
408 void clearSelectedIdentity();
409 bool applyRefreshData(
int scoreGeneration,
411 const QVariant& item,
412 const QVariant& chartData,
413 bool useBeatorajaSemantics,
414 bool buildScoreOptionIds,
417 bool& chartDidChange,
418 bool& scoreDidChange);
420 const QVariantList& scoreList,
421 bool useBeatorajaSemantics,
422 bool buildScoreOptionIds);
423 void ensureScoreSummaryCacheSemantics(
bool useBeatorajaSemantics,
424 bool buildScoreOptionIds);
425 void advanceSelectedRevisions(
bool itemDidChange,
428 bool difficultyDidChange);
430 int m_scoreGeneration = -1;
431 int m_listGeneration = -1;
432 bool m_useBeatorajaSemantics = false;
433 bool m_buildScoreOptionIds = true;
434 bool m_selectedIdentityValid = false;
435 QString m_selectedItemKey;
436 QString m_selectedTargetItemKey;
437 bool m_selectedRankingMode = false;
438 bool m_selectedDifficultyStateUsed = true;
439 bool m_selectedDifficultyLampStateUsed = true;
441 QVariant m_chartData;
443 QVariant m_scoreOptionIds;
445 int m_selectedItemRevision = 0;
446 int m_selectedChartRevision = 0;
447 int m_selectedScoreRevision = 0;
448 int m_selectedDifficultyRevision = 0;
449 struct CachedScoreSummary {
453 QHash<Lr2SelectScoreSummaryCacheKey, CachedScoreSummary> m_scoreSummaryCache;
454 bool m_scoreSummaryCacheSemanticsInitialized =
false;
455 bool m_scoreSummaryCacheUseBeatorajaSemantics =
false;
456 bool m_scoreSummaryCacheBuildScoreOptionIds =
true;