From 4f508adbb9ebb0ca86ac12fdec7c38f4550408e5 Mon Sep 17 00:00:00 2001 From: T'JAMPENS QUENTIN p2406187 Date: Thu, 19 Jun 2025 23:22:19 +0200 Subject: [PATCH] Display path number --- mainwindow.cpp | 5 +++++ mainwindow.ui | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 340d269..582913c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -100,6 +100,11 @@ void MainWindow::loadPath() if(!steps.isEmpty()) { ui->stepTitle->setText(p->getStep().first().getTitle()); } + + int pathCount = path.length(); + ui->pathNumber->setMaximum(pathCount); + ui->pathNumber->setSuffix("/" + QString::number(pathCount)); + ui->pathNumber->setValue(path.indexOf(currentPath)+1); } void MainWindow::addNewPath() diff --git a/mainwindow.ui b/mainwindow.ui index 019029d..3781e08 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -57,7 +57,7 @@ QFrame::Shadow::Raised - + 10