Compare commits

..

7 Commits

Author SHA1 Message Date
nou f9f005e7ea Another test 2025-07-16 23:17:22 +02:00
nou 5ba6b4863c Fix metainfo linter 2025-07-16 09:07:08 +02:00
nou 6c7e078340 Testing filetree crash on ARM 2025-07-16 07:44:19 +02:00
nou b58559a18a Update modify FITS header script 2025-07-13 10:43:15 +02:00
nou 2ac14a6c04 Fix thumbnailer compilation 2025-07-13 10:42:59 +02:00
nou b84256625c Add stellarsolver6 as name 2025-06-12 16:48:09 +02:00
nou 202a2b11b7 Add marked files in batch processing 2025-06-09 19:09:50 +02:00
10 changed files with 91 additions and 21 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ find_library(FITS_LIB cfitsio REQUIRED)
find_library(RAW_LIB NAMES raw_r REQUIRED)
find_library(WCS_LIB wcs wcslib REQUIRED)
find_library(LCMS2_LIB lcms2 REQUIRED)
find_library(STELLARSOLVER_LIB stellarsolver)
find_library(STELLARSOLVER_LIB NAMES stellarsolver stellarsolver6)
add_subdirectory(libXISF)
+45 -12
View File
@@ -12,10 +12,12 @@ if(files.length == 0)
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 proceed = false;
if(action == "UPDATE")
{
let keywords = files[0].fitsKeywords().filter(checkFITS);
@@ -25,28 +27,59 @@ if(action == "UPDATE")
value = core.getString("Enter new value", value);
else
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")
{
let keyword = core.getString("Enter keyword to add");
let value = core.getString("Enter new value");
keyword = keyword.toUpperCase();
modify.addKeyword(keyword, value);
if(keyword && value)
{
proceed = true;
keyword = keyword.toUpperCase();
modify.addKeyword(keyword, value);
}
}
else if(action == "REMOVE")
{
let keywords = files[0].fitsKeywords().filter(checkFITS);
let keyword = core.getItem(keywords, "Select keyword to remove");
modify.removeKeyword(keyword);
}
for(file of files)
{
if(file.suffix() == "fits" || file.suffix() == "fit" || file.suffix() == "xisf")
if(keyword)
{
core.log("Modifing " + file.fileName());
file.modifyFITSRecords(modify);
proceed = true;
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");
}
+1 -1
View File
@@ -118,7 +118,7 @@
</release>
<release version="20240816" date="2024-08-16">
<description>
Fix saving image
<p>Fix saving image</p>
</description>
</release>
<release version="20240616" date="2024-06-16">
+12
View File
@@ -100,6 +100,7 @@ BatchProcessing::BatchProcessing(Database *database, QWidget *parent) : QDialog(
connect(_ui->addFilesButton, &QPushButton::released, this, &BatchProcessing::addFiles);
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->removeAllButton, &QPushButton::released, this, &BatchProcessing::removeAllPaths);
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()
{
for(auto &item : _ui->pathsList->selectedItems())
+1
View File
@@ -28,6 +28,7 @@ protected:
public slots:
void addFiles();
void addDir();
void addMarked();
void removePath();
void removeAllPaths();
void browse();
+7
View File
@@ -52,6 +52,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addMarkedButton">
<property name="text">
<string>Add marked</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="removeButton">
<property name="text">
+17
View File
@@ -5,9 +5,26 @@
#include <QCommandLineParser>
#include <stdlib.h>
#include "../thumbnailer/genthumbnail.h"
#include <QTreeView>
#include <QFileSystemModel>
#include <QTimer>
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__
setenv("LC_NUMERIC", "C", 1);
#endif
+5 -5
View File
@@ -6,9 +6,9 @@ if(BUILD_THUMBNAILER)
Dll.cpp
loadimage.cpp
TenmonThumbnailProvider.cpp
../rawimage.h
../rawimage.cpp
../rawimage_sse.cpp)
../src/rawimage.h
../src/rawimage.cpp
../src/rawimage_sse.cpp)
set_target_properties(tenmonthumbnailer PROPERTIES PREFIX "")
target_compile_definitions(tenmonthumbnailer PRIVATE NO_QT)
@@ -19,8 +19,8 @@ if(BUILD_THUMBNAILER)
qt_add_executable(tenmonthumbnailer
main.cpp
loadimage.cpp
../rawimage.cpp
../rawimage_sse.cpp)
../src/rawimage.cpp
../src/rawimage_sse.cpp)
target_link_libraries(tenmonthumbnailer PRIVATE ${FITS_LIB} XISF)
+1 -1
View File
@@ -2,7 +2,7 @@
#include <thumbcache.h> // For IThumbnailProvider.
#include <new>
#include "libxisf.h"
#include "../rawimage.h"
#include "../src/rawimage.h"
bool loadXISF(const LibXISF::ByteArray &data, std::shared_ptr<RawImage> &rawImage);
bool loadFITS(const LibXISF::ByteArray &data, std::shared_ptr<RawImage> &rawImage);
+1 -1
View File
@@ -1,5 +1,5 @@
#include "libxisf.h"
#include "../rawimage.h"
#include "../src/rawimage.h"
#ifdef WIN32
#include <windows.h>
#endif