Fixed parameter ranges when default=0
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@80 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
3fe16927fc
commit
b111c9996a
@ -151,8 +151,9 @@ ParametersToolBox * MainWindow::parametersToolBox() const
|
|||||||
return ui_->toolBox;
|
return ui_->toolBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::loadObjects(const QString & dirPath)
|
int MainWindow::loadObjects(const QString & dirPath)
|
||||||
{
|
{
|
||||||
|
int loadedObjects = 0;
|
||||||
QDir dir(dirPath);
|
QDir dir(dirPath);
|
||||||
if(dir.exists())
|
if(dir.exists())
|
||||||
{
|
{
|
||||||
@ -166,7 +167,9 @@ void MainWindow::loadObjects(const QString & dirPath)
|
|||||||
{
|
{
|
||||||
this->updateObjects();
|
this->updateObjects();
|
||||||
}
|
}
|
||||||
|
loadedObjects = list.size();
|
||||||
}
|
}
|
||||||
|
return loadedObjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::saveObjects(const QString & dirPath)
|
void MainWindow::saveObjects(const QString & dirPath)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public:
|
|||||||
MainWindow(Camera * camera = 0, QWidget * parent = 0);
|
MainWindow(Camera * camera = 0, QWidget * parent = 0);
|
||||||
virtual ~MainWindow();
|
virtual ~MainWindow();
|
||||||
|
|
||||||
void loadObjects(const QString & dirPath);
|
int loadObjects(const QString & dirPath);
|
||||||
void saveObjects(const QString & dirPath);
|
void saveObjects(const QString & dirPath);
|
||||||
|
|
||||||
ParametersToolBox * parametersToolBox() const;
|
ParametersToolBox * parametersToolBox() const;
|
||||||
|
|||||||
@ -212,10 +212,14 @@ void ParametersToolBox::addParameter(QVBoxLayout * layout,
|
|||||||
widget->setDecimals(3);
|
widget->setDecimals(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(def>0.0)
|
if(def>=0.0)
|
||||||
{
|
{
|
||||||
widget->setMaximum(def*1000000.0);
|
widget->setMaximum(def*1000000.0);
|
||||||
}
|
}
|
||||||
|
else if(def==0.0)
|
||||||
|
{
|
||||||
|
widget->setMaximum(1000000.0);
|
||||||
|
}
|
||||||
else if(def<0.0)
|
else if(def<0.0)
|
||||||
{
|
{
|
||||||
widget->setMinimum(def*1000000.0);
|
widget->setMinimum(def*1000000.0);
|
||||||
@ -238,6 +242,10 @@ void ParametersToolBox::addParameter(QVBoxLayout * layout,
|
|||||||
{
|
{
|
||||||
widget->setMaximum(def*1000000);
|
widget->setMaximum(def*1000000);
|
||||||
}
|
}
|
||||||
|
else if(def == 0)
|
||||||
|
{
|
||||||
|
widget->setMaximum(1000000);
|
||||||
|
}
|
||||||
else if(def<0)
|
else if(def<0)
|
||||||
{
|
{
|
||||||
widget->setMinimum(def*1000000);
|
widget->setMinimum(def*1000000);
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "qtipl.h"
|
#include "qtipl.h"
|
||||||
#include <opencv2/core/core_c.h>
|
#include <opencv2/core/core_c.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
// TODO : support only from gray 8bits ?
|
// TODO : support only from gray 8bits ?
|
||||||
QImage Ipl2QImage(const IplImage *newImage)
|
QImage Ipl2QImage(const IplImage *newImage)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user