Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9f005e7ea | |||
| 5ba6b4863c | |||
| 6c7e078340 | |||
| b58559a18a | |||
| 2ac14a6c04 | |||
| b84256625c | |||
| 202a2b11b7 |
+1
-1
@@ -23,7 +23,7 @@ find_library(FITS_LIB cfitsio REQUIRED)
|
|||||||
find_library(RAW_LIB NAMES raw_r REQUIRED)
|
find_library(RAW_LIB NAMES raw_r REQUIRED)
|
||||||
find_library(WCS_LIB wcs wcslib REQUIRED)
|
find_library(WCS_LIB wcs wcslib REQUIRED)
|
||||||
find_library(LCMS2_LIB lcms2 REQUIRED)
|
find_library(LCMS2_LIB lcms2 REQUIRED)
|
||||||
find_library(STELLARSOLVER_LIB stellarsolver)
|
find_library(STELLARSOLVER_LIB NAMES stellarsolver stellarsolver6)
|
||||||
|
|
||||||
add_subdirectory(libXISF)
|
add_subdirectory(libXISF)
|
||||||
|
|
||||||
|
|||||||
+45
-12
@@ -12,10 +12,12 @@ if(files.length == 0)
|
|||||||
throw "";
|
throw "";
|
||||||
}
|
}
|
||||||
|
|
||||||
let action = core.getItem(["UPDATE", "ADD", "REMOVE"], "Do you want update, add or remove record?");
|
let action = core.getItem(["UPDATE", "UPDATE_ADD", "ADD", "REMOVE"], "Do you want update, add or remove record?");
|
||||||
|
|
||||||
let modify = new FITSRecordModify();
|
let modify = new FITSRecordModify();
|
||||||
|
|
||||||
|
let proceed = false;
|
||||||
|
|
||||||
if(action == "UPDATE")
|
if(action == "UPDATE")
|
||||||
{
|
{
|
||||||
let keywords = files[0].fitsKeywords().filter(checkFITS);
|
let keywords = files[0].fitsKeywords().filter(checkFITS);
|
||||||
@@ -25,28 +27,59 @@ if(action == "UPDATE")
|
|||||||
value = core.getString("Enter new value", value);
|
value = core.getString("Enter new value", value);
|
||||||
else
|
else
|
||||||
value = core.getFloat("Enter new value", value);
|
value = core.getFloat("Enter new value", value);
|
||||||
modify.updateKeyword(keyword, value);
|
|
||||||
|
if(keyword && value)
|
||||||
|
{
|
||||||
|
proceed = true;
|
||||||
|
modify.updateKeyword(keyword, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(action == "UPDATE_ADD")
|
||||||
|
{
|
||||||
|
let keyword = core.getString("Enter keyword to update");
|
||||||
|
let value = core.getString("Enter new value");
|
||||||
|
if(keyword && value)
|
||||||
|
{
|
||||||
|
proceed = true;
|
||||||
|
keyword = keyword.toUpperCase();
|
||||||
|
modify.updateKeyword(keyword, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(action == "ADD")
|
else if(action == "ADD")
|
||||||
{
|
{
|
||||||
let keyword = core.getString("Enter keyword to add");
|
let keyword = core.getString("Enter keyword to add");
|
||||||
let value = core.getString("Enter new value");
|
let value = core.getString("Enter new value");
|
||||||
keyword = keyword.toUpperCase();
|
if(keyword && value)
|
||||||
modify.addKeyword(keyword, value);
|
{
|
||||||
|
proceed = true;
|
||||||
|
keyword = keyword.toUpperCase();
|
||||||
|
modify.addKeyword(keyword, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(action == "REMOVE")
|
else if(action == "REMOVE")
|
||||||
{
|
{
|
||||||
let keywords = files[0].fitsKeywords().filter(checkFITS);
|
let keywords = files[0].fitsKeywords().filter(checkFITS);
|
||||||
let keyword = core.getItem(keywords, "Select keyword to remove");
|
let keyword = core.getItem(keywords, "Select keyword to remove");
|
||||||
modify.removeKeyword(keyword);
|
if(keyword)
|
||||||
}
|
|
||||||
|
|
||||||
for(file of files)
|
|
||||||
{
|
|
||||||
if(file.suffix() == "fits" || file.suffix() == "fit" || file.suffix() == "xisf")
|
|
||||||
{
|
{
|
||||||
core.log("Modifing " + file.fileName());
|
proceed = true;
|
||||||
file.modifyFITSRecords(modify);
|
modify.removeKeyword(keyword);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(proceed)
|
||||||
|
{
|
||||||
|
for(file of files)
|
||||||
|
{
|
||||||
|
if(file.suffix() == "fits" || file.suffix() == "fit" || file.suffix() == "xisf")
|
||||||
|
{
|
||||||
|
core.log("Modifing " + file.fileName());
|
||||||
|
file.modifyFITSRecords(modify);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
core.log("Canceled");
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
</release>
|
</release>
|
||||||
<release version="20240816" date="2024-08-16">
|
<release version="20240816" date="2024-08-16">
|
||||||
<description>
|
<description>
|
||||||
Fix saving image
|
<p>Fix saving image</p>
|
||||||
</description>
|
</description>
|
||||||
</release>
|
</release>
|
||||||
<release version="20240616" date="2024-06-16">
|
<release version="20240616" date="2024-06-16">
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ BatchProcessing::BatchProcessing(Database *database, QWidget *parent) : QDialog(
|
|||||||
|
|
||||||
connect(_ui->addFilesButton, &QPushButton::released, this, &BatchProcessing::addFiles);
|
connect(_ui->addFilesButton, &QPushButton::released, this, &BatchProcessing::addFiles);
|
||||||
connect(_ui->addDirButton, &QPushButton::released, this, &BatchProcessing::addDir);
|
connect(_ui->addDirButton, &QPushButton::released, this, &BatchProcessing::addDir);
|
||||||
|
connect(_ui->addMarkedButton, &QPushButton::released, this, &BatchProcessing::addMarked);
|
||||||
connect(_ui->removeButton, &QPushButton::released, this, &BatchProcessing::removePath);
|
connect(_ui->removeButton, &QPushButton::released, this, &BatchProcessing::removePath);
|
||||||
connect(_ui->removeAllButton, &QPushButton::released, this, &BatchProcessing::removeAllPaths);
|
connect(_ui->removeAllButton, &QPushButton::released, this, &BatchProcessing::removeAllPaths);
|
||||||
connect(_ui->startButton, &QPushButton::released, this, &BatchProcessing::runScript);
|
connect(_ui->startButton, &QPushButton::released, this, &BatchProcessing::runScript);
|
||||||
@@ -164,6 +165,17 @@ void BatchProcessing::addDir()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BatchProcessing::addMarked()
|
||||||
|
{
|
||||||
|
QStringList files = _database->getMarkedFiles();
|
||||||
|
for(const QString &file : files)
|
||||||
|
{
|
||||||
|
QFileInfo info(file);
|
||||||
|
if(info.exists() && info.isReadable())
|
||||||
|
_ui->pathsList->addItem(file);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void BatchProcessing::removePath()
|
void BatchProcessing::removePath()
|
||||||
{
|
{
|
||||||
for(auto &item : _ui->pathsList->selectedItems())
|
for(auto &item : _ui->pathsList->selectedItems())
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ protected:
|
|||||||
public slots:
|
public slots:
|
||||||
void addFiles();
|
void addFiles();
|
||||||
void addDir();
|
void addDir();
|
||||||
|
void addMarked();
|
||||||
void removePath();
|
void removePath();
|
||||||
void removeAllPaths();
|
void removeAllPaths();
|
||||||
void browse();
|
void browse();
|
||||||
|
|||||||
@@ -52,6 +52,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="addMarkedButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add marked</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="removeButton">
|
<widget class="QPushButton" name="removeButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -5,9 +5,26 @@
|
|||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../thumbnailer/genthumbnail.h"
|
#include "../thumbnailer/genthumbnail.h"
|
||||||
|
#include <QTreeView>
|
||||||
|
#include <QFileSystemModel>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
|
QApplication app(argc, argv);
|
||||||
|
QFileSystemModel model;
|
||||||
|
QTreeView treeView;
|
||||||
|
|
||||||
|
|
||||||
|
QTimer::singleShot(5000, [&model,&treeView](){
|
||||||
|
treeView.setModel(&model);
|
||||||
|
model.setRootPath("/home");
|
||||||
|
});
|
||||||
|
treeView.resize(800, 600);
|
||||||
|
treeView.show();
|
||||||
|
return app.exec();
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
setenv("LC_NUMERIC", "C", 1);
|
setenv("LC_NUMERIC", "C", 1);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ if(BUILD_THUMBNAILER)
|
|||||||
Dll.cpp
|
Dll.cpp
|
||||||
loadimage.cpp
|
loadimage.cpp
|
||||||
TenmonThumbnailProvider.cpp
|
TenmonThumbnailProvider.cpp
|
||||||
../rawimage.h
|
../src/rawimage.h
|
||||||
../rawimage.cpp
|
../src/rawimage.cpp
|
||||||
../rawimage_sse.cpp)
|
../src/rawimage_sse.cpp)
|
||||||
set_target_properties(tenmonthumbnailer PROPERTIES PREFIX "")
|
set_target_properties(tenmonthumbnailer PROPERTIES PREFIX "")
|
||||||
|
|
||||||
target_compile_definitions(tenmonthumbnailer PRIVATE NO_QT)
|
target_compile_definitions(tenmonthumbnailer PRIVATE NO_QT)
|
||||||
@@ -19,8 +19,8 @@ if(BUILD_THUMBNAILER)
|
|||||||
qt_add_executable(tenmonthumbnailer
|
qt_add_executable(tenmonthumbnailer
|
||||||
main.cpp
|
main.cpp
|
||||||
loadimage.cpp
|
loadimage.cpp
|
||||||
../rawimage.cpp
|
../src/rawimage.cpp
|
||||||
../rawimage_sse.cpp)
|
../src/rawimage_sse.cpp)
|
||||||
|
|
||||||
target_link_libraries(tenmonthumbnailer PRIVATE ${FITS_LIB} XISF)
|
target_link_libraries(tenmonthumbnailer PRIVATE ${FITS_LIB} XISF)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include <thumbcache.h> // For IThumbnailProvider.
|
#include <thumbcache.h> // For IThumbnailProvider.
|
||||||
#include <new>
|
#include <new>
|
||||||
#include "libxisf.h"
|
#include "libxisf.h"
|
||||||
#include "../rawimage.h"
|
#include "../src/rawimage.h"
|
||||||
|
|
||||||
bool loadXISF(const LibXISF::ByteArray &data, std::shared_ptr<RawImage> &rawImage);
|
bool loadXISF(const LibXISF::ByteArray &data, std::shared_ptr<RawImage> &rawImage);
|
||||||
bool loadFITS(const LibXISF::ByteArray &data, std::shared_ptr<RawImage> &rawImage);
|
bool loadFITS(const LibXISF::ByteArray &data, std::shared_ptr<RawImage> &rawImage);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "libxisf.h"
|
#include "libxisf.h"
|
||||||
#include "../rawimage.h"
|
#include "../src/rawimage.h"
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user