libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

test_window.h (1381B)


      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_FLICKER_TEST_TEST_WINDOW_H_
      7 #define TOOLS_FLICKER_TEST_TEST_WINDOW_H_
      8 
      9 #include <QByteArray>
     10 #include <QDir>
     11 #include <QMainWindow>
     12 #include <QStringList>
     13 #include <QTextStream>
     14 
     15 #include "tools/comparison_viewer/image_loading.h"
     16 #include "tools/flicker_test/parameters.h"
     17 #include "tools/flicker_test/ui_test_window.h"
     18 
     19 namespace jpegxl {
     20 namespace tools {
     21 
     22 class FlickerTestWindow : public QMainWindow {
     23   Q_OBJECT
     24 
     25  public:
     26   explicit FlickerTestWindow(FlickerTestParameters parameters,
     27                              QWidget* parent = nullptr);
     28   ~FlickerTestWindow() override = default;
     29 
     30   bool proceedWithTest() const { return proceed_; }
     31 
     32  private slots:
     33   void processTestResult(const QString& imageName, SplitView::Side originalSide,
     34                          SplitView::Side clickedSide, int clickDelayMSecs);
     35 
     36  private:
     37   void nextImage();
     38 
     39   Ui::FlickerTestWindow ui_;
     40   bool proceed_ = true;
     41   const QByteArray monitorProfile_;
     42   FlickerTestParameters parameters_;
     43   QDir originalFolder_, alteredFolder_;
     44   QFile outputFile_;
     45   QTextStream outputStream_;
     46   QStringList remainingImages_;
     47 };
     48 
     49 }  // namespace tools
     50 }  // namespace jpegxl
     51 
     52 #endif  // TOOLS_FLICKER_TEST_TEST_WINDOW_H_