feat: tap simple toujours createur d'impact + ecran de plotting renomme Synthese
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/// Écran principal de Plotting et d'analyse - Interface centrale de traitement des cibles.
|
||||
/// Écran principal de Synthèse et d'analyse - Interface centrale de traitement des cibles.
|
||||
///
|
||||
/// Affiche d'abord la calibration de la cible, puis l'overlay des anneaux et impacts détectés.
|
||||
/// Permet le calcul des scores et statistiques de groupement (Plotting).
|
||||
/// Permet le calcul des scores et statistiques de groupement (Synthèse), et
|
||||
/// c'est de là que l'on termine la session. L'ajout des impacts, lui, se fait
|
||||
/// dans l'éditeur d'impacts plein écran.
|
||||
library;
|
||||
|
||||
import 'dart:io';
|
||||
@@ -143,7 +145,7 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
|
||||
/// Repasse en mode calibration.
|
||||
///
|
||||
/// La cible du mode Plotting est désormais un élément fixe (aucun zoom à
|
||||
/// La cible du mode Synthèse est désormais un élément fixe (aucun zoom à
|
||||
/// réinitialiser) : on se contente donc de rebasculer l'état.
|
||||
void _enterCalibration() {
|
||||
setState(() {
|
||||
@@ -161,8 +163,8 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
/// déplacés ou supprimés sont donc immédiatement répercutés ici.
|
||||
///
|
||||
/// Au retour, quel que soit le résultat (validation OU retour arrière), on
|
||||
/// revient TOUJOURS sur le Plotting. L'éditeur d'impacts n'est ouvert que
|
||||
/// depuis le Plotting : il doit donc y ramener, jamais sur la calibration.
|
||||
/// revient TOUJOURS sur la Synthèse. L'éditeur d'impacts n'est ouvert que
|
||||
/// depuis la Synthèse : il doit donc y ramener, jamais sur la calibration.
|
||||
Future<void> _openImpactEditor(AnalysisProvider provider) async {
|
||||
await Navigator.of(context).push<bool>(
|
||||
MaterialPageRoute(
|
||||
@@ -297,11 +299,11 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
);
|
||||
}
|
||||
|
||||
/// Indication affichée sous le titre en mode Plotting.
|
||||
/// Indication affichée sous le titre en mode Synthèse.
|
||||
///
|
||||
/// Rien n'indiquait comment ajouter un impact une fois la calibration
|
||||
/// validée : ce rappel pointe vers le geste (toucher la cible).
|
||||
Widget _buildPlottingHint(AnalysisProvider provider) {
|
||||
Widget _buildSyntheseHint(AnalysisProvider provider) {
|
||||
final hasShots = provider.shotCount > 0;
|
||||
|
||||
return Padding(
|
||||
@@ -330,14 +332,14 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
|
||||
/// Bouton flottant du bas de l'écran.
|
||||
///
|
||||
/// En calibration : VALIDER. En plotting : tant qu'aucun impact n'est placé,
|
||||
/// En calibration : VALIDER. En synthèse : tant qu'aucun impact n'est placé,
|
||||
/// on ne propose pas de terminer la session mais de placer un impact (le
|
||||
/// bouton ouvre l'éditeur, comme un tap sur la cible).
|
||||
Widget _buildBottomAction(BuildContext context, AnalysisProvider provider) {
|
||||
if (_isCalibrating) {
|
||||
return FloatingActionButton.extended(
|
||||
// Même bouton bleu flottant que « TERMINER LA SESSION » :
|
||||
// on fige la calibration puis on bascule sur le Plotting.
|
||||
// on fige la calibration puis on bascule sur la Synthèse.
|
||||
onPressed: () {
|
||||
_calibrationKey.currentState?.commitCalibration();
|
||||
setState(() => _isCalibrating = false);
|
||||
@@ -373,10 +375,10 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
? sessionProvider.targetCount + 1
|
||||
: null;
|
||||
|
||||
final titlePrefix = _isCalibrating ? 'Calibration' : 'Plotting';
|
||||
final titlePrefix = _isCalibrating ? 'Calibration' : 'Synthèse';
|
||||
final title = targetNumber != null
|
||||
? '$titlePrefix - Cible $targetNumber'
|
||||
: (_isCalibrating ? 'Calibration' : 'Plotting du Tir');
|
||||
: (_isCalibrating ? 'Calibration' : 'Synthèse du Tir');
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
@@ -400,7 +402,7 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Retour Plotting -> Calibration : on réinitialise le zoom.
|
||||
// Retour Synthèse -> Calibration : on réinitialise le zoom.
|
||||
_enterCalibration();
|
||||
}
|
||||
},
|
||||
@@ -426,7 +428,7 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
if (_isCalibrating)
|
||||
_buildCalibrationSettings(provider)
|
||||
else
|
||||
_buildPlottingHint(provider),
|
||||
_buildSyntheseHint(provider),
|
||||
|
||||
AspectRatio(
|
||||
aspectRatio: provider.imageAspectRatio,
|
||||
@@ -663,7 +665,7 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
);
|
||||
}
|
||||
|
||||
/// Affichage du plotting en LECTURE SEULE.
|
||||
/// Affichage de la synthèse en LECTURE SEULE.
|
||||
///
|
||||
/// La cible est un élément d'écran FIXE : elle ne se déplace pas et ne se
|
||||
/// zoome pas (plus d'InteractiveViewer). Un tap n'importe où sur la cible
|
||||
|
||||
Reference in New Issue
Block a user