42 lines
		
	
	
	
		
			739 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
	
		
			739 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef MAINWINDOW_H
 | |
| #define MAINWINDOW_H
 | |
| 
 | |
| #include <QMainWindow>
 | |
| #include <vector>
 | |
| #include <QStatusBar>
 | |
| 
 | |
| #include "imagemeta.h"
 | |
| 
 | |
| QT_BEGIN_NAMESPACE
 | |
| namespace Ui {
 | |
| class MainWindow;
 | |
| }
 | |
| QT_END_NAMESPACE
 | |
| 
 | |
| class MainWindow : public QMainWindow
 | |
| {
 | |
| 	Q_OBJECT
 | |
| 
 | |
| 	bool modified = false;
 | |
| 	std::vector<ImageMeta> imageMetas;
 | |
| 	size_t index = 0;
 | |
| 	std::filesystem::path dir;
 | |
| 	QStatusBar status;
 | |
| 
 | |
| public:
 | |
| 	MainWindow(QWidget *parent = nullptr);
 | |
| 	~MainWindow();
 | |
| 
 | |
| private slots:
 | |
| 	void open();
 | |
| 	void save();
 | |
| 
 | |
| private:
 | |
| 	void openDir(const std::filesystem::path& path);
 | |
| 	bool loadMetadata(const std::filesystem::path& path);
 | |
| 	bool imageIsKnown(const std::filesystem::path& path);
 | |
| 	void setImage(ssize_t index);
 | |
| 
 | |
| 	Ui::MainWindow *ui;
 | |
| };
 | |
| #endif // MAINWINDOW_H
 |