Add FITS files indexing support to database
This commit is contained in:
+11
@@ -4,6 +4,7 @@
|
||||
#include <QObject>
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
#include <QDir>
|
||||
|
||||
class Database : public QObject
|
||||
{
|
||||
@@ -12,6 +13,12 @@ class Database : public QObject
|
||||
QSqlQuery m_markQuery;
|
||||
QSqlQuery m_unmarkQuery;
|
||||
QSqlQuery m_isMarkedQuery;
|
||||
|
||||
QSqlQuery m_insertFile;
|
||||
QSqlQuery m_insertFitsHeader;
|
||||
QSqlQuery m_checkFile;
|
||||
QSqlQuery m_headerKeywords;
|
||||
QSqlQuery m_deleteFile;
|
||||
public:
|
||||
explicit Database(QObject *parent = 0);
|
||||
bool init();
|
||||
@@ -19,7 +26,11 @@ public:
|
||||
bool unmark(const QString &filename);
|
||||
bool isMarked(const QString &filename);
|
||||
QStringList getMarkedFiles();
|
||||
|
||||
void indexDir(const QDir &dir);
|
||||
QStringList getFitsKeywords();
|
||||
protected:
|
||||
bool indexDir2(const QDir &dir);
|
||||
bool checkError();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user