Commit 3336e1311a07a89b1462c418c4659b951b06e9ce
1 parent
f1ef0460
added clear command to GUI
Showing
5 changed files
with
23 additions
and
1 deletions
CHANGELOG.md
| 1 | 1 | 0.4.0 - ??/??/?? |
| 2 | 2 | ================ |
| 3 | +* Added simple GUI frontend | |
| 3 | 4 | * Added -evalLandmarking and -plotLandmarking for evaluating and plotting landmarking accuracy (#9) |
| 4 | 5 | * Added -evalDetection and -plotDetection for evaluating and plotting object detection accuracy (#9) |
| 5 | 6 | * Deprecated Transform::backProject | ... | ... |
app/OpenBR/OpenBR.cpp
| ... | ... | @@ -44,6 +44,11 @@ public: |
| 44 | 44 | gridLayout->setRowStretch(2, 0); |
| 45 | 45 | |
| 46 | 46 | QMenuBar *menuBar = new QMenuBar(); |
| 47 | + QMenu *file = new QMenu("File"); | |
| 48 | + QAction *clear = new QAction("Clear", this); | |
| 49 | + clear->setShortcut(QKeySequence("Ctrl+C")); | |
| 50 | + connect(clear, SIGNAL(triggered()), tail, SLOT(clear())); | |
| 51 | + file->addAction(clear); | |
| 47 | 52 | Algorithm *algorithm = new Algorithm(); |
| 48 | 53 | algorithm->addAlgorithm("FaceRecognition", "Face Recognition"); |
| 49 | 54 | algorithm->addAlgorithm("PP5", "PittPatt"); |
| ... | ... | @@ -54,6 +59,7 @@ public: |
| 54 | 59 | helpMenu->addAction(contactAction); |
| 55 | 60 | connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); |
| 56 | 61 | connect(contactAction, SIGNAL(triggered()), this, SLOT(contact())); |
| 62 | + menuBar->addMenu(file); | |
| 57 | 63 | menuBar->addMenu(algorithm); |
| 58 | 64 | menuBar->addMenu(helpMenu); |
| 59 | 65 | ... | ... |
openbr/gui/progress.cpp
| 1 | 1 | #include <openbr/openbr.h> |
| 2 | -#include <QDebug> | |
| 2 | + | |
| 3 | 3 | #include "progress.h" |
| 4 | 4 | |
| 5 | 5 | /**** PROGRESS ****/ |
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | br::Progress::Progress(QWidget *parent) |
| 8 | 8 | : QStatusBar(parent) |
| 9 | 9 | { |
| 10 | + setContentsMargins(0, 0, 0, 0); | |
| 10 | 11 | pbProgress.setVisible(false); |
| 11 | 12 | pbProgress.setMaximum(100); |
| 12 | 13 | pbProgress.setMinimum(0); | ... | ... |
openbr/gui/tail.cpp
| ... | ... | @@ -10,6 +10,7 @@ Tail::Tail(QWidget *parent) |
| 10 | 10 | : QWidget(parent) |
| 11 | 11 | { |
| 12 | 12 | layout = new QHBoxLayout(this); |
| 13 | + layout->setContentsMargins(0, 0, 0, 0); | |
| 13 | 14 | slider = new QSlider(this); |
| 14 | 15 | slider->setOrientation(Qt::Horizontal); |
| 15 | 16 | lhs = new QLabel(this); |
| ... | ... | @@ -24,6 +25,18 @@ Tail::Tail(QWidget *parent) |
| 24 | 25 | } |
| 25 | 26 | |
| 26 | 27 | /*** PUBLIC SLOTS ***/ |
| 28 | +void Tail::clear() | |
| 29 | +{ | |
| 30 | + targetGallery = File(); | |
| 31 | + queryGallery = File(); | |
| 32 | + targetFiles.clear(); | |
| 33 | + queryFiles.clear(); | |
| 34 | + scores.clear(); | |
| 35 | + slider->setMaximum(0); | |
| 36 | + setIndex(0); | |
| 37 | + setVisible(false); | |
| 38 | +} | |
| 39 | + | |
| 27 | 40 | void Tail::setIndex(int index) |
| 28 | 41 | { |
| 29 | 42 | index = std::min(std::max(slider->minimum(), index), slider->maximum()); | ... | ... |