viewer_window.h (1005B)
1 // Copyright (c) the JPEG XL Project Authors. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 #ifndef TOOLS_VIEWER_VIEWER_WINDOW_H_ 7 #define TOOLS_VIEWER_VIEWER_WINDOW_H_ 8 9 #include <QByteArray> 10 #include <QMainWindow> 11 #include <QStringList> 12 13 #include "tools/viewer/ui_viewer_window.h" 14 15 namespace jpegxl { 16 namespace tools { 17 18 class ViewerWindow : public QMainWindow { 19 Q_OBJECT 20 public: 21 explicit ViewerWindow(QWidget* parent = nullptr); 22 23 public slots: 24 void loadFilesAndDirectories(QStringList entries); 25 26 private slots: 27 void on_actionOpen_triggered(); 28 void on_actionPreviousImage_triggered(); 29 void on_actionNextImage_triggered(); 30 void refreshImage(); 31 32 private: 33 const QByteArray monitorProfile_; 34 Ui::ViewerWindow ui_; 35 QStringList filenames_; 36 int currentFileIndex_ = 0; 37 bool hasWarnedAboutMonitorProfile_ = false; 38 }; 39 40 } // namespace tools 41 } // namespace jpegxl 42 43 #endif // TOOLS_VIEWER_VIEWER_WINDOW_H_