Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d288810d5d | |||
| fb66e82428 | |||
| 71486efeef | |||
| 8213f6213f |
@@ -286,6 +286,7 @@ DataBaseView::DataBaseView(Database *database, QWidget *parent) : QWidget(parent
|
|||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
m_filterKeyword[i] = new QComboBox(this);
|
m_filterKeyword[i] = new QComboBox(this);
|
||||||
|
m_filterKeyword[i]->setMaximumWidth(300);
|
||||||
addFilterItems(m_filterKeyword[i], fitsKeywords);
|
addFilterItems(m_filterKeyword[i], fitsKeywords);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -188,12 +188,6 @@ void ImageWidget::bestFit()
|
|||||||
setOffset(0, 0);
|
setOffset(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageWidget::blockRepaint(bool block)
|
|
||||||
{
|
|
||||||
m_blockRepaint = block;
|
|
||||||
if(!block)update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImageWidget::allocateThumbnails(const QStringList &paths)
|
void ImageWidget::allocateThumbnails(const QStringList &paths)
|
||||||
{
|
{
|
||||||
makeCurrent();
|
makeCurrent();
|
||||||
@@ -323,8 +317,6 @@ void ImageWidget::showThumbnail(bool enable)
|
|||||||
|
|
||||||
void ImageWidget::paintGL()
|
void ImageWidget::paintGL()
|
||||||
{
|
{
|
||||||
if(m_blockRepaint)return;
|
|
||||||
|
|
||||||
float dx = m_dx;
|
float dx = m_dx;
|
||||||
float dy = m_dy;
|
float dy = m_dy;
|
||||||
if(m_width > m_image->width() * m_scale)
|
if(m_width > m_image->width() * m_scale)
|
||||||
@@ -333,9 +325,9 @@ void ImageWidget::paintGL()
|
|||||||
dy = -height() * 0.5f + m_image->height() * m_scale * 0.5f;
|
dy = -height() * 0.5f + m_image->height() * m_scale * 0.5f;
|
||||||
QBrush highlight = style()->standardPalette().highlight();
|
QBrush highlight = style()->standardPalette().highlight();
|
||||||
|
|
||||||
|
f->glClear(GL_COLOR_BUFFER_BIT);
|
||||||
if(m_showThumbnails)
|
if(m_showThumbnails)
|
||||||
{
|
{
|
||||||
f->glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
m_vaoThumb->bind();
|
m_vaoThumb->bind();
|
||||||
m_thumbnailTexture->bind(1);
|
m_thumbnailTexture->bind(1);
|
||||||
if(m_sizesDirty)
|
if(m_sizesDirty)
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ class ImageWidget : public QOpenGLWidget
|
|||||||
float m_scale = 1.0f;
|
float m_scale = 1.0f;
|
||||||
int m_scaleStop = 0;
|
int m_scaleStop = 0;
|
||||||
bool m_bestFit = false;
|
bool m_bestFit = false;
|
||||||
bool m_blockRepaint = false;
|
|
||||||
bool m_bwImg = false;
|
bool m_bwImg = false;
|
||||||
bool m_falseColor = false;
|
bool m_falseColor = false;
|
||||||
bool m_invert = false;
|
bool m_invert = false;
|
||||||
@@ -78,7 +77,6 @@ public:
|
|||||||
void setWCS(std::shared_ptr<WCSData> wcs);
|
void setWCS(std::shared_ptr<WCSData> wcs);
|
||||||
void zoom(int zoom, const QPointF &mousePos = QPointF());
|
void zoom(int zoom, const QPointF &mousePos = QPointF());
|
||||||
void bestFit();
|
void bestFit();
|
||||||
void blockRepaint(bool block);
|
|
||||||
void allocateThumbnails(const QStringList &paths);
|
void allocateThumbnails(const QStringList &paths);
|
||||||
QVector2D getImagePixelCoord(const QVector2D &pos);
|
QVector2D getImagePixelCoord(const QVector2D &pos);
|
||||||
void setBayerMask(int mask);
|
void setBayerMask(int mask);
|
||||||
|
|||||||
+9
-9
@@ -536,21 +536,21 @@ void MainWindow::saveAs()
|
|||||||
auto filterToFormat = [](const QString &file, const QString &filter) -> const char*
|
auto filterToFormat = [](const QString &file, const QString &filter) -> const char*
|
||||||
{
|
{
|
||||||
QString suffix = QFileInfo(file).suffix();
|
QString suffix = QFileInfo(file).suffix();
|
||||||
if(!suffix.compare("jpg", Qt::CaseInsensitive) || !suffix.compare("jpeg", Qt::CaseInsensitive))return "JPEG";
|
if(!suffix.compare("jpg", Qt::CaseInsensitive) || !suffix.compare("jpeg", Qt::CaseInsensitive))return "jpeg";
|
||||||
if(!suffix.compare("png", Qt::CaseInsensitive))return "PNG";
|
if(!suffix.compare("png", Qt::CaseInsensitive))return "png";
|
||||||
if(!suffix.compare("fits", Qt::CaseInsensitive) || !suffix.compare("fit", Qt::CaseInsensitive))return "FITS";
|
if(!suffix.compare("fits", Qt::CaseInsensitive) || !suffix.compare("fit", Qt::CaseInsensitive))return "fits";
|
||||||
if(!suffix.compare("xisf", Qt::CaseInsensitive))return "XISF";
|
if(!suffix.compare("xisf", Qt::CaseInsensitive))return "xisf";
|
||||||
if(filter.contains("png"))return "PNG";
|
if(filter.contains("png"))return "png";
|
||||||
if(filter.contains("fits"))return "FITS";
|
if(filter.contains("fits"))return "fits";
|
||||||
if(filter.contains("xisf"))return "XISF";
|
if(filter.contains("xisf"))return "xisf";
|
||||||
return "JPEG";
|
return "jpeg";
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!file.isEmpty())
|
if(!file.isEmpty())
|
||||||
{
|
{
|
||||||
QString format = filterToFormat(file, selectedFilter);
|
QString format = filterToFormat(file, selectedFilter);
|
||||||
|
|
||||||
if(format == "FITS" || format == "XISF")
|
if(format == "fits" || format == "xisf")
|
||||||
{
|
{
|
||||||
convert(file, format);
|
convert(file, format);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ let compression = {"compressionType": "zstd+sh"};
|
|||||||
|
|
||||||
for(file of files)
|
for(file of files)
|
||||||
{
|
{
|
||||||
if(file.suffix() == "fits" || file.suffix() == "fit")
|
if(file.suffix() == "fits" || file.suffix() == "fit")
|
||||||
{
|
{
|
||||||
core.log("Converting " + file.fileName());
|
core.log("Converting " + file.fileName());
|
||||||
convertedFiles.push(file.convertAsync(file.relativeFilePath(), "XISF", compression));
|
file.convertAsync(file.relativeFilePath(), "XISF", compression);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,11 @@
|
|||||||
</screenshots>
|
</screenshots>
|
||||||
<content_rating type="oars-1.1"/>
|
<content_rating type="oars-1.1"/>
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="20240816" date="2024-08-16">
|
||||||
|
<description>
|
||||||
|
Fix saving image
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
<release version="20240616" date="2024-06-16">
|
<release version="20240616" date="2024-06-16">
|
||||||
<description>
|
<description>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user