File indexing completed on 2024-12-22 04:12:54
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "kis_stop_gradient_editor_test.h" 0008 0009 #include <simpletest.h> 0010 #include <QDialog> 0011 #include <QVBoxLayout> 0012 #include <QLinearGradient> 0013 0014 #include "kis_debug.h" 0015 #include "KisStopGradientEditor.h" 0016 0017 0018 void KisStopGradientEditorTest::test() 0019 { 0020 QLinearGradient gradient; 0021 QSharedPointer<KoStopGradient> koGradient(KoStopGradient::fromQGradient(&gradient)); 0022 QDialog dialog; 0023 0024 KisStopGradientEditor *widget = new KisStopGradientEditor(&dialog); 0025 widget->setGradient(koGradient); 0026 0027 QVBoxLayout *layout = new QVBoxLayout(&dialog); 0028 layout->setContentsMargins(0,0,0,0); 0029 0030 layout->addWidget(widget); 0031 dialog.setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 0032 0033 //dlg.exec(); 0034 qWarning() << "WARNING: showing of the dialogs in the unittest is disabled!"; 0035 } 0036 0037 SIMPLE_TEST_MAIN(KisStopGradientEditorTest)