summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-09-11 22:15:52 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-09-11 22:15:52 (GMT)
commit2b77d52d20bd9d9760f298b46599cd68a55c52fe (patch)
treeada412bb483d33662d6a9ee13a6e34ce99e5b0fb
parent61283b4455c40648878616c6d3cd4aab98993665 (diff)
Add align tab so it can be inspected separately from preview or batch images
-rw-r--r--kstars/fitsviewer/fitscommon.h2
-rw-r--r--kstars/fitsviewer/fitsdata.cpp8
-rw-r--r--kstars/fitsviewer/fitsviewer.cpp14
3 files changed, 14 insertions, 10 deletions
diff --git a/kstars/fitsviewer/fitscommon.h b/kstars/fitsviewer/fitscommon.h
index 30b41eb..b5b96ba 100644
--- a/kstars/fitsviewer/fitscommon.h
+++ b/kstars/fitsviewer/fitscommon.h
@@ -17,7 +17,7 @@
#ifndef FITSCOMMON_H
#define FITSCOMMON_H
-typedef enum { FITS_NORMAL, FITS_FOCUS, FITS_GUIDE, FITS_CALIBRATE, FITS_WCSM } FITSMode;
+typedef enum { FITS_NORMAL, FITS_FOCUS, FITS_GUIDE, FITS_CALIBRATE, FITS_ALIGN } FITSMode;
typedef enum { FITS_WCS, FITS_VALUE, FITS_POSITION, FITS_ZOOM , FITS_RESOLUTION, FITS_LED, FITS_MESSAGE } FITSBar;
typedef enum { FITS_NONE, FITS_AUTO_STRETCH, FITS_HIGH_CONTRAST, FITS_EQUALIZE, FITS_HIGH_PASS, FITS_MEDIAN, FITS_ROTATE_CW, FITS_ROTATE_CCW, FITS_FLIP_H, FITS_FLIP_V, FITS_AUTO , FITS_LINEAR, FITS_LOG, FITS_SQRT, FITS_CUSTOM } FITSScale;
typedef enum { ZOOM_FIT_WINDOW, ZOOM_KEEP_LEVEL, ZOOM_FULL } FITSZoom;
diff --git a/kstars/fitsviewer/fitsdata.cpp b/kstars/fitsviewer/fitsdata.cpp
index 384dad9..46e73c6 100644
--- a/kstars/fitsviewer/fitsdata.cpp
+++ b/kstars/fitsviewer/fitsdata.cpp
@@ -615,13 +615,13 @@ int FITSData::findOneStar(const QRectF &boundary)
pass++;
}
- qDebug() << "Testing for radius " << r << " passes # " << pass << " @ threshold " << running_threshold;
+ //qDebug() << "Testing for radius " << r << " passes # " << pass << " @ threshold " << running_threshold;
//if (pass >= 6)
if (pass >= 5)
{
center->width = r*2;
break;
- }
+ }
}
if (center->width > 0)
@@ -774,7 +774,7 @@ void FITSData::findCentroid(const QRectF &boundary, int initStdDev, int minEdgeW
subX = 0;
subY = 0;
subW = stats.width;
- subH = stats.height;
+ subH = stats.height;
}
}
else
@@ -993,7 +993,7 @@ void FITSData::findCentroid(const QRectF &boundary, int initStdDev, int minEdgeW
{
FSum += image_buffer[cen_x-k+(cen_y*stats.width)] - min;
//qDebug() << image_buffer[cen_x-k+(cen_y*stats.width)] - min;
- }
+ }
// Half flux
HF = FSum / 2.0;
diff --git a/kstars/fitsviewer/fitsviewer.cpp b/kstars/fitsviewer/fitsviewer.cpp
index 9146bc1..5a5d7a9 100644
--- a/kstars/fitsviewer/fitsviewer.cpp
+++ b/kstars/fitsviewer/fitsviewer.cpp
@@ -94,7 +94,7 @@ FITSViewer::FITSViewer (QWidget *parent)
fitsWCS.setVisible(false);
statusBar()->insertPermanentWidget(FITS_WCS, &fitsWCS);
- statusBar()->insertPermanentWidget(FITS_VALUE, &fitsValue);
+ statusBar()->insertPermanentWidget(FITS_VALUE, &fitsValue);
statusBar()->insertPermanentWidget(FITS_POSITION, &fitsPosition);
statusBar()->insertPermanentWidget(FITS_ZOOM, &fitsZoom);
statusBar()->insertPermanentWidget(FITS_RESOLUTION, &fitsResolution);
@@ -160,7 +160,7 @@ FITSViewer::FITSViewer (QWidget *parent)
KStandardAction::copy(this, SLOT(copyFITS()), actionCollection());
KStandardAction::zoomIn(this, SLOT(ZoomIn()), actionCollection());
- KStandardAction::zoomOut(this, SLOT(ZoomOut()), actionCollection());
+ KStandardAction::zoomOut(this, SLOT(ZoomOut()), actionCollection());
KStandardAction::actualSize(this, SLOT(ZoomDefault()), actionCollection());
QAction *kundo = KStandardAction::undo(undoGroup, SLOT(undo()), actionCollection());
@@ -300,6 +300,10 @@ int FITSViewer::addFITS(const QUrl *imageName, FITSMode mode, FITSScale filter,
fitsTab->addTab(tab, i18n("Guide"));
break;
+ case FITS_ALIGN:
+ fitsTab->addTab(tab, i18n("Align"));
+ break;
+
default:
break;
@@ -313,7 +317,7 @@ int FITSViewer::addFITS(const QUrl *imageName, FITSMode mode, FITSScale filter,
saveFileAction->setEnabled(true);
saveFileAsAction->setEnabled(true);
- undoGroup->addStack(tab->getUndoStack());
+ undoGroup->addStack(tab->getUndoStack());
fitsTabs.push_back(tab);
@@ -440,7 +444,7 @@ void FITSViewer::tabFocusUpdated(int currentIndex)
// No need to warn users about unsaved changes in a "viewer".
/*void FITSViewer::slotClose()
-{
+{
int rc=0;
fitsTab->disconnect();
@@ -598,7 +602,7 @@ int FITSViewer::saveUnsaved(int index)
if (index < 0 || index >= fitsTabs.size())
return -1;
- targetTab = fitsTabs[index];
+ targetTab = fitsTabs[index];
if (targetTab->getView()->getMode() != FITS_NORMAL)
targetTab->getUndoStack()->clear();