Add actions for peak and star find
This commit is contained in:
+15
-5
@@ -22,7 +22,7 @@ void Image::load()
|
||||
{
|
||||
m_loading = true;
|
||||
m_released = false;
|
||||
QThreadPool::globalInstance()->start(new LoadRunable(m_name, this, m_ringList->calculateStats()));
|
||||
QThreadPool::globalInstance()->start(new LoadRunable(m_name, this, m_ringList->analyzeLevel()));
|
||||
}
|
||||
if(!m_loading && !m_pixmap.isNull())
|
||||
emit pixmapLoaded(this);
|
||||
@@ -68,7 +68,7 @@ void Image::imageLoaded(QImage img, ImageInfoData info)
|
||||
|
||||
ImageRingList::ImageRingList(QObject *parent) : QObject(parent)
|
||||
, m_liveMode(false)
|
||||
, m_calculateStats(false)
|
||||
, m_analyzeLevel(None)
|
||||
{
|
||||
connect(&m_fileSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(dirChanged(QString)));
|
||||
}
|
||||
@@ -150,12 +150,22 @@ void ImageRingList::setLiveMode(bool live)
|
||||
|
||||
void ImageRingList::setCalculateStats(bool stats)
|
||||
{
|
||||
m_calculateStats = stats;
|
||||
m_analyzeLevel = stats ? Statistics : None;
|
||||
}
|
||||
|
||||
bool ImageRingList::calculateStats() const
|
||||
void ImageRingList::setFindPeaks(bool findPeaks)
|
||||
{
|
||||
return m_calculateStats;
|
||||
m_analyzeLevel = findPeaks ? Peaks : None;
|
||||
}
|
||||
|
||||
void ImageRingList::setFindStars(bool findStars)
|
||||
{
|
||||
m_analyzeLevel = findStars ? Stars : None;
|
||||
}
|
||||
|
||||
AnalyzeLevel ImageRingList::analyzeLevel() const
|
||||
{
|
||||
return m_analyzeLevel;
|
||||
}
|
||||
|
||||
void ImageRingList::setFiles(const QStringList files, const QString ¤tFile)
|
||||
|
||||
Reference in New Issue
Block a user