File indexing completed on 2024-04-21 04:43:08

0001 // SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
0002 // SPDX-License-Identifier: BSD-2-Clause OR MIT
0003 
0004 #include <colordialog.h>
0005 #include <qapplication.h>
0006 #include <qcolordialog.h>
0007 #include <qglobal.h>
0008 #include <rgbcolorspacefactory.h>
0009 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0010 #include <qcoreapplication.h>
0011 #include <qnamespace.h>
0012 #endif
0013 
0014 int main(int argc, char *argv[])
0015 {
0016 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0017     // Prepare configuration before instantiating the application object
0018     QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
0019 #endif
0020     QApplication app(argc, argv);
0021     auto myColorSpace = PerceptualColor::RgbColorSpaceFactory::createSrgb();
0022     PerceptualColor::ColorDialog m_colorDialog(myColorSpace);
0023     m_colorDialog.setOption(QColorDialog::ColorDialogOption::ShowAlphaChannel, true);
0024     m_colorDialog.show();
0025     return app.exec();
0026 }