File indexing completed on 2024-05-26 04:29:20

0001 /*
0002  *  SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef TestColorConversionSystem_H
0008 #define TestColorConversionSystem_H
0009 
0010 #include <QObject>
0011 #include <QList>
0012 #include <QString>
0013 
0014 #include <KoColorConversionSystem.h>
0015 
0016 struct ModelDepthProfile {
0017     ModelDepthProfile(const QString& _model, const QString& _depth, const QString& _profile)
0018             : model(_model), depth(_depth), profile(_profile) {
0019     }
0020     QString model;
0021     QString depth;
0022     QString profile;
0023 };
0024 
0025 class TestColorConversionSystem : public QObject
0026 {
0027     Q_OBJECT
0028 public:
0029     TestColorConversionSystem();
0030 private Q_SLOTS:
0031     void testConnections();
0032     void testGoodConnections();
0033     void testAlphaConnectionPaths();
0034     void testAlphaConversions();
0035     void testAlphaU16Conversions();
0036     void testGrayAConnectionPaths();
0037     void testGrayAConversions();
0038     void benchmarkAlphaToRgbConversion();
0039     void benchmarkRgbToAlphaConversion();
0040 
0041     void testCmykBitnessConversion();
0042 
0043 private:
0044     std::vector<KoColorConversionSystem::NodeKey> calcPath(const std::vector<KoColorConversionSystem::NodeKey> &expectedPath);
0045 
0046 private:
0047     QList< ModelDepthProfile > listModels;
0048 };
0049 
0050 #endif