48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
|
|
#ifndef JFJOCH_JFJOCHVIEWERREFLECTIONLISTWINDOW_H
|
|
#define JFJOCH_JFJOCHVIEWERREFLECTIONLISTWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QTableView>
|
|
#include <QStandardItemModel>
|
|
#include <QSortFilterProxyModel>
|
|
#include <QCloseEvent>
|
|
#include <vector>
|
|
#include "../../common/Reflection.h"
|
|
#include "../../reader/JFJochReaderImage.h"
|
|
|
|
class JFJochViewerReflectionListWindow : public QMainWindow {
|
|
Q_OBJECT
|
|
|
|
std::shared_ptr<const JFJochReaderImage> image;
|
|
|
|
void setupTableModel();
|
|
void addReflectionRow(int index, const Reflection& r);
|
|
|
|
void closeEvent(QCloseEvent *event) override;
|
|
|
|
QTableView* tableView = nullptr;
|
|
QStandardItemModel* tableModel = nullptr;
|
|
QSortFilterProxyModel* proxyModel = nullptr;
|
|
|
|
public:
|
|
explicit JFJochViewerReflectionListWindow(QWidget* parent = nullptr);
|
|
|
|
signals:
|
|
void reflectionSelected(float x, float y);
|
|
void closing();
|
|
|
|
private slots:
|
|
void onTableRowDoubleClicked(const QModelIndex& index);
|
|
|
|
public slots:
|
|
void open();
|
|
void datasetLoaded(std::shared_ptr<const JFJochReaderDataset> dataset);
|
|
void imageLoaded(std::shared_ptr<const JFJochReaderImage> image);
|
|
};
|
|
|
|
|
|
#endif //JFJOCH_JFJOCHVIEWERREFLECTIONLISTWINDOW_H
|