Multiple search support and SQL optimization
This commit is contained in:
+5
-4
@@ -25,12 +25,13 @@ class FITSFileModel : public QSqlQueryModel
|
||||
Q_OBJECT
|
||||
QStringList m_columns;
|
||||
QString m_sort;
|
||||
QString m_having;
|
||||
QStringList m_key;
|
||||
QStringList m_value;
|
||||
public:
|
||||
FITSFileModel(QObject *parent = nullptr);
|
||||
void sort(int column, Qt::SortOrder order);
|
||||
void setColumns(const QStringList &columns);
|
||||
void setFilter(const QString &key, const QString &value);
|
||||
void setFilter(const QStringList &key, const QStringList &value);
|
||||
protected:
|
||||
void prepareQuery();
|
||||
};
|
||||
@@ -41,8 +42,8 @@ class DataBaseView : public QWidget
|
||||
Database *m_database;
|
||||
QTableView *m_tableView;
|
||||
FITSFileModel *m_model;
|
||||
QComboBox *m_filterKeyword;
|
||||
QLineEdit *m_search;
|
||||
QComboBox *m_filterKeyword[3];
|
||||
QLineEdit *m_search[3];
|
||||
public:
|
||||
explicit DataBaseView(Database *database, QWidget *parent = nullptr);
|
||||
~DataBaseView();
|
||||
|
||||
Reference in New Issue
Block a user