diff --git a/CHANGELOG.md b/CHANGELOG.md index 6445816..9384244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ 0.4.0 - ??/??/?? ================ +* Added simple GUI frontend * Added -evalLandmarking and -plotLandmarking for evaluating and plotting landmarking accuracy (#9) * Added -evalDetection and -plotDetection for evaluating and plotting object detection accuracy (#9) * Deprecated Transform::backProject diff --git a/app/OpenBR/OpenBR.cpp b/app/OpenBR/OpenBR.cpp index bf5429e..a1cd522 100644 --- a/app/OpenBR/OpenBR.cpp +++ b/app/OpenBR/OpenBR.cpp @@ -44,6 +44,11 @@ public: gridLayout->setRowStretch(2, 0); QMenuBar *menuBar = new QMenuBar(); + QMenu *file = new QMenu("File"); + QAction *clear = new QAction("Clear", this); + clear->setShortcut(QKeySequence("Ctrl+C")); + connect(clear, SIGNAL(triggered()), tail, SLOT(clear())); + file->addAction(clear); Algorithm *algorithm = new Algorithm(); algorithm->addAlgorithm("FaceRecognition", "Face Recognition"); algorithm->addAlgorithm("PP5", "PittPatt"); @@ -54,6 +59,7 @@ public: helpMenu->addAction(contactAction); connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); connect(contactAction, SIGNAL(triggered()), this, SLOT(contact())); + menuBar->addMenu(file); menuBar->addMenu(algorithm); menuBar->addMenu(helpMenu); diff --git a/openbr/gui/progress.cpp b/openbr/gui/progress.cpp index 4ac8318..fbe2bf6 100644 --- a/openbr/gui/progress.cpp +++ b/openbr/gui/progress.cpp @@ -1,5 +1,5 @@ #include -#include + #include "progress.h" /**** PROGRESS ****/ @@ -7,6 +7,7 @@ br::Progress::Progress(QWidget *parent) : QStatusBar(parent) { + setContentsMargins(0, 0, 0, 0); pbProgress.setVisible(false); pbProgress.setMaximum(100); pbProgress.setMinimum(0); diff --git a/openbr/gui/tail.cpp b/openbr/gui/tail.cpp index 788b351..7a78c81 100644 --- a/openbr/gui/tail.cpp +++ b/openbr/gui/tail.cpp @@ -10,6 +10,7 @@ Tail::Tail(QWidget *parent) : QWidget(parent) { layout = new QHBoxLayout(this); + layout->setContentsMargins(0, 0, 0, 0); slider = new QSlider(this); slider->setOrientation(Qt::Horizontal); lhs = new QLabel(this); @@ -24,6 +25,18 @@ Tail::Tail(QWidget *parent) } /*** PUBLIC SLOTS ***/ +void Tail::clear() +{ + targetGallery = File(); + queryGallery = File(); + targetFiles.clear(); + queryFiles.clear(); + scores.clear(); + slider->setMaximum(0); + setIndex(0); + setVisible(false); +} + void Tail::setIndex(int index) { index = std::min(std::max(slider->minimum(), index), slider->maximum()); diff --git a/openbr/gui/tail.h b/openbr/gui/tail.h index aa35c93..e5146cb 100644 --- a/openbr/gui/tail.h +++ b/openbr/gui/tail.h @@ -28,6 +28,7 @@ public: explicit Tail(QWidget *parent = 0); public slots: + void clear(); void setIndex(int index); void setTargetGallery(const File &gallery); void setQueryGallery(const File &gallery);