Sat, 29 Aug 2015 16:29:11 +0300
Move colorSelector.cc to dialogs/colorselector.cpp
CMakeLists.txt | file | annotate | diff | comparison | revisions | |
src/actionsEdit.cc | file | annotate | diff | comparison | revisions | |
src/addObjectDialog.cc | file | annotate | diff | comparison | revisions | |
src/colorSelector.cc | file | annotate | diff | comparison | revisions | |
src/colorSelector.h | file | annotate | diff | comparison | revisions | |
src/configDialog.cc | file | annotate | diff | comparison | revisions | |
src/dialogs/colorselector.cpp | file | annotate | diff | comparison | revisions | |
src/dialogs/colorselector.h | file | annotate | diff | comparison | revisions | |
src/dialogs/colorselector.ui | file | annotate | diff | comparison | revisions | |
ui/colorsel.ui | file | annotate | diff | comparison | revisions |
--- a/CMakeLists.txt Sun Aug 23 00:25:21 2015 +0300 +++ b/CMakeLists.txt Sat Aug 29 16:29:11 2015 +0300 @@ -38,7 +38,6 @@ src/addObjectDialog.cc src/basics.cc src/colors.cc - src/colorSelector.cc src/configuration.cc src/configDialog.cc src/crashCatcher.cc @@ -60,6 +59,7 @@ src/radioGroup.cc src/ringFinder.cc src/version.cc + src/dialogs/colorselector.cpp src/editmodes/abstractEditMode.cc src/editmodes/circleMode.cc src/editmodes/drawMode.cc @@ -87,7 +87,6 @@ src/documentation.h src/main.h src/basics.h - src/colorSelector.h src/configDialog.h src/glRenderer.h src/glCompiler.h @@ -95,6 +94,7 @@ src/mainWindow.h src/editHistory.h src/format.h + src/dialogs/colorselector.h src/editmodes/abstractEditMode.h src/editmodes/circleMode.h src/editmodes/drawMode.h @@ -108,7 +108,6 @@ ui/about.ui ui/addhistoryline.ui ui/bombbox.ui - ui/colorsel.ui ui/config.ui ui/coverer.ui ui/downloadfrom.ui @@ -128,6 +127,7 @@ ui/replcoords.ui ui/rotpoint.ui ui/ytruder.ui + src/dialogs/colorselector.ui ) add_custom_target (codegeneration ALL
--- a/src/actionsEdit.cc Sun Aug 23 00:25:21 2015 +0300 +++ b/src/actionsEdit.cc Sat Aug 29 16:29:11 2015 +0300 @@ -25,7 +25,7 @@ #include "mainWindow.h" #include "main.h" #include "ldDocument.h" -#include "colorSelector.h" +#include "dialogs/colorselector.h" #include "miscallenous.h" #include "radioGroup.h" #include "glRenderer.h"
--- a/src/addObjectDialog.cc Sun Aug 23 00:25:21 2015 +0300 +++ b/src/addObjectDialog.cc Sat Aug 29 16:29:11 2015 +0300 @@ -29,7 +29,7 @@ #include "addObjectDialog.h" #include "ldDocument.h" #include "colors.h" -#include "colorSelector.h" +#include "dialogs/colorselector.h" #include "editHistory.h" #include "radioGroup.h" #include "miscallenous.h"
--- a/src/colorSelector.cc Sun Aug 23 00:25:21 2015 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013, 2014 Teemu Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * ===================================================================== - * - * colorSelectDialog.cxx: Color selector box. - */ - -#include <QGraphicsScene> -#include <QGraphicsItem> -#include <QMouseEvent> -#include <QScrollBar> -#include <QColorDialog> -#include "main.h" -#include "mainWindow.h" -#include "colorSelector.h" -#include "colors.h" -#include "configuration.h" -#include "miscallenous.h" -#include "ui_colorsel.h" - -enum { NUM_COLUMNS = 16 }; - -EXTERN_CFGENTRY (String, MainColor) -EXTERN_CFGENTRY (Float, MainColorAlpha) - -ColorSelector::ColorSelector (LDColor defaultvalue, QWidget* parent) : - QDialog (parent), - ui (*new Ui_ColorSelUi) -{ - m_firstResize = true; - ui.setupUi (this); - setSelection (defaultvalue); - - QGridLayout* layout = new QGridLayout (this); - - // Spawn color selector buttons - for (LDColor ldcolor; ldcolor.isLDConfigColor(); ++ldcolor) - { - QPushButton* button = new QPushButton (this); - button->setMinimumSize (QSize (32, 32)); - button->setMaximumSize (button->minimumSize()); - - if (ldcolor.isValid ()) - { - QColor color (ldcolor.faceColor()); - - if (ldcolor == MainColor) - { - color = QColor (cfg::MainColor); - color.setAlphaF (cfg::MainColorAlpha); - } - - QString color2name (Luma (color) < 80 ? "white" : "black"); - button->setAutoFillBackground (true); - button->setStyleSheet (format ("background-color: rgba(%1, %2, %3, %4); color: %5", - color.red(), color.green(), color.blue(), color.alpha(), color2name)); - button->setCheckable (true); - button->setText (QString::number (ldcolor.index())); - button->setToolTip (format ("%1: %2", ldcolor.index(), ldcolor.name())); - m_buttons[ldcolor.index()] = button; - m_buttonsReversed[button] = ldcolor.index(); - connect (button, SIGNAL (clicked(bool)), this, SLOT (colorButtonClicked())); - - if (ldcolor == selection()) - button->setChecked (true); - } - else - { - button->setEnabled (false); - } - - layout->addWidget (button, ldcolor.index() / NUM_COLUMNS, ldcolor.index() % NUM_COLUMNS); - } - - QWidget* widget = new QWidget(); - widget->setLayout (layout); - ui.definedColors->setWidget (widget); - connect (ui.directColor, SIGNAL (clicked (bool)), this, SLOT (chooseDirectColor())); - - ui.definedColors->setMinimumWidth (ui.definedColors->widget()->width() + 16); - -#ifdef TRANSPARENT_DIRECT_COLORS - connect (ui.transparentDirectColor, SIGNAL (clicked (bool)), this, SLOT (transparentCheckboxClicked())); -#else - ui.transparentDirectColor->hide(); -#endif - - drawColorInfo(); -} - -ColorSelector::~ColorSelector() -{ - delete &ui; -} - -void ColorSelector::colorButtonClicked() -{ - QPushButton* button = qobject_cast<QPushButton*> (sender()); - auto it = m_buttonsReversed.find (button); - LDColor color; - - if (Q_UNLIKELY (button == null or it == m_buttonsReversed.end() - or not (color = *it).isValid())) - { - print ("colorButtonClicked() called with invalid sender"); - return; - } - - if (selection().isValid()) - { - auto button = m_buttons.find (selection().index()); - - if (button != m_buttons.end()) - (*button)->setChecked (false); - } - - setSelection (color); - button->setChecked (true); - drawColorInfo(); -} - -void ColorSelector::drawColorInfo() -{ - if (not selection().isValid()) - { - ui.colorLabel->setText ("---"); - ui.iconLabel->setPixmap (QPixmap()); - ui.transparentDirectColor->setChecked (false); - return; - } - - ui.colorLabel->setText (format ("%1 - %2", selection().indexString(), - (selection().isDirect() ? "<direct color>" : selection().name()))); - ui.iconLabel->setPixmap (MakeColorIcon (selection(), 16).pixmap (16, 16)); - -#ifdef TRANSPARENT_DIRECT_COLORS - ui.transparentDirectColor->setEnabled (selection().isDirect()); - ui.transparentDirectColor->setChecked (selection().isDirect() and selection().faceColor().alphaF() < 1.0); -#else - ui.transparentDirectColor->setChecked (false); - ui.transparentDirectColor->setEnabled (false); -#endif -} - -void ColorSelector::selectDirectColor (QColor color) -{ - qint32 colorIndex = (ui.transparentDirectColor->isChecked() ? 0x03000000 : 0x02000000); - colorIndex |= (color.red() << 16) | (color.green() << 8) | (color.blue()); - setSelection (colorIndex); - drawColorInfo(); -} - -void ColorSelector::chooseDirectColor() -{ - QColor defcolor = selection() != -1 ? selection().faceColor() : Qt::white; - QColor newcolor = QColorDialog::getColor (defcolor); - - if (not newcolor.isValid()) - return; // canceled - - selectDirectColor (newcolor); -} - -void ColorSelector::transparentCheckboxClicked() -{ - if (selection().isDirect()) - selectDirectColor (selection().faceColor()); -} - -bool ColorSelector::selectColor (LDColor& val, LDColor defval, QWidget* parent) -{ - ColorSelector dlg (defval, parent); - - if (dlg.exec() and dlg.selection().isValid()) - { - val = dlg.selection(); - return true; - } - - return false; -}
--- a/src/colorSelector.h Sun Aug 23 00:25:21 2015 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013, 2014 Teemu Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once -#include <QDialog> -#include "main.h" -#include "colors.h" - -class ColorSelector : public QDialog -{ - Q_OBJECT - PROPERTY (private, LDColor, selection, setSelection, STOCK_WRITE) - -public: - explicit ColorSelector (LDColor defaultvalue = LDColor::nullColor(), QWidget* parent = null); - virtual ~ColorSelector(); - static bool selectColor (LDColor& val, LDColor defval = LDColor::nullColor(), QWidget* parent = null); - -private: - class Ui_ColorSelUi& ui; - QMap<int, QPushButton*> m_buttons; - QMap<QPushButton*, int> m_buttonsReversed; - bool m_firstResize; - - void drawColorInfo(); - void selectDirectColor (QColor col); - -private slots: - void colorButtonClicked(); - void chooseDirectColor(); - void transparentCheckboxClicked(); -};
--- a/src/configDialog.cc Sun Aug 23 00:25:21 2015 +0300 +++ b/src/configDialog.cc Sat Aug 29 16:29:11 2015 +0300 @@ -35,7 +35,7 @@ #include "configuration.h" #include "miscallenous.h" #include "colors.h" -#include "colorSelector.h" +#include "dialogs/colorselector.h" #include "glRenderer.h" #include "ui_config.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dialogs/colorselector.cpp Sat Aug 29 16:29:11 2015 +0300 @@ -0,0 +1,192 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013, 2014 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <QGraphicsScene> +#include <QGraphicsItem> +#include <QMouseEvent> +#include <QScrollBar> +#include <QColorDialog> +#include "../main.h" +#include "../mainWindow.h" +#include "../colors.h" +#include "../configuration.h" +#include "../miscallenous.h" +#include "colorselector.h" +#include "ui_colorselector.h" + +enum { NUM_COLUMNS = 16 }; + +EXTERN_CFGENTRY (String, MainColor) +EXTERN_CFGENTRY (Float, MainColorAlpha) + +ColorSelector::ColorSelector (LDColor defaultvalue, QWidget* parent) : + QDialog (parent), + ui (*new Ui_ColorSelUi) +{ + m_firstResize = true; + ui.setupUi (this); + setSelection (defaultvalue); + + QGridLayout* layout = new QGridLayout (this); + + // Spawn color selector buttons + for (LDColor ldcolor; ldcolor.isLDConfigColor(); ++ldcolor) + { + QPushButton* button = new QPushButton (this); + button->setMinimumSize (QSize (32, 32)); + button->setMaximumSize (button->minimumSize()); + + if (ldcolor.isValid ()) + { + QColor color (ldcolor.faceColor()); + + if (ldcolor == MainColor) + { + color = QColor (cfg::MainColor); + color.setAlphaF (cfg::MainColorAlpha); + } + + QString color2name (Luma (color) < 80 ? "white" : "black"); + button->setAutoFillBackground (true); + button->setStyleSheet (format ("background-color: rgba(%1, %2, %3, %4); color: %5", + color.red(), color.green(), color.blue(), color.alpha(), color2name)); + button->setCheckable (true); + button->setText (QString::number (ldcolor.index())); + button->setToolTip (format ("%1: %2", ldcolor.index(), ldcolor.name())); + m_buttons[ldcolor.index()] = button; + m_buttonsReversed[button] = ldcolor.index(); + connect (button, SIGNAL (clicked(bool)), this, SLOT (colorButtonClicked())); + + if (ldcolor == selection()) + button->setChecked (true); + } + else + { + button->setEnabled (false); + } + + layout->addWidget (button, ldcolor.index() / NUM_COLUMNS, ldcolor.index() % NUM_COLUMNS); + } + + QWidget* widget = new QWidget(); + widget->setLayout (layout); + ui.definedColors->setWidget (widget); + connect (ui.directColor, SIGNAL (clicked (bool)), this, SLOT (chooseDirectColor())); + + ui.definedColors->setMinimumWidth (ui.definedColors->widget()->width() + 16); + +#ifdef TRANSPARENT_DIRECT_COLORS + connect (ui.transparentDirectColor, SIGNAL (clicked (bool)), this, SLOT (transparentCheckboxClicked())); +#else + ui.transparentDirectColor->hide(); +#endif + + drawColorInfo(); +} + +ColorSelector::~ColorSelector() +{ + delete &ui; +} + +void ColorSelector::colorButtonClicked() +{ + QPushButton* button = qobject_cast<QPushButton*> (sender()); + auto it = m_buttonsReversed.find (button); + LDColor color; + + if (Q_UNLIKELY (button == null or it == m_buttonsReversed.end() + or not (color = *it).isValid())) + { + print ("colorButtonClicked() called with invalid sender"); + return; + } + + if (selection().isValid()) + { + auto button = m_buttons.find (selection().index()); + + if (button != m_buttons.end()) + (*button)->setChecked (false); + } + + setSelection (color); + button->setChecked (true); + drawColorInfo(); +} + +void ColorSelector::drawColorInfo() +{ + if (not selection().isValid()) + { + ui.colorLabel->setText ("---"); + ui.iconLabel->setPixmap (QPixmap()); + ui.transparentDirectColor->setChecked (false); + return; + } + + ui.colorLabel->setText (format ("%1 - %2", selection().indexString(), + (selection().isDirect() ? "<direct color>" : selection().name()))); + ui.iconLabel->setPixmap (MakeColorIcon (selection(), 16).pixmap (16, 16)); + +#ifdef TRANSPARENT_DIRECT_COLORS + ui.transparentDirectColor->setEnabled (selection().isDirect()); + ui.transparentDirectColor->setChecked (selection().isDirect() and selection().faceColor().alphaF() < 1.0); +#else + ui.transparentDirectColor->setChecked (false); + ui.transparentDirectColor->setEnabled (false); +#endif +} + +void ColorSelector::selectDirectColor (QColor color) +{ + qint32 colorIndex = (ui.transparentDirectColor->isChecked() ? 0x03000000 : 0x02000000); + colorIndex |= (color.red() << 16) | (color.green() << 8) | (color.blue()); + setSelection (colorIndex); + drawColorInfo(); +} + +void ColorSelector::chooseDirectColor() +{ + QColor defcolor = selection() != -1 ? selection().faceColor() : Qt::white; + QColor newcolor = QColorDialog::getColor (defcolor); + + if (not newcolor.isValid()) + return; // canceled + + selectDirectColor (newcolor); +} + +void ColorSelector::transparentCheckboxClicked() +{ + if (selection().isDirect()) + selectDirectColor (selection().faceColor()); +} + +bool ColorSelector::selectColor (LDColor& val, LDColor defval, QWidget* parent) +{ + ColorSelector dlg (defval, parent); + + if (dlg.exec() and dlg.selection().isValid()) + { + val = dlg.selection(); + return true; + } + + return false; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dialogs/colorselector.h Sat Aug 29 16:29:11 2015 +0300 @@ -0,0 +1,47 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013, 2014 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once +#include <QDialog> +#include "../main.h" +#include "../colors.h" + +class ColorSelector : public QDialog +{ + Q_OBJECT + PROPERTY (private, LDColor, selection, setSelection, STOCK_WRITE) + +public: + explicit ColorSelector (LDColor defaultvalue = LDColor::nullColor(), QWidget* parent = null); + virtual ~ColorSelector(); + static bool selectColor (LDColor& val, LDColor defval = LDColor::nullColor(), QWidget* parent = null); + +private: + class Ui_ColorSelUi& ui; + QMap<int, QPushButton*> m_buttons; + QMap<QPushButton*, int> m_buttonsReversed; + bool m_firstResize; + + void drawColorInfo(); + void selectDirectColor (QColor col); + +private slots: + void colorButtonClicked(); + void chooseDirectColor(); + void transparentCheckboxClicked(); +};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dialogs/colorselector.ui Sat Aug 29 16:29:11 2015 +0300 @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ColorSelUi</class> + <widget class="QDialog" name="ColorSelUi"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>588</width> + <height>404</height> + </rect> + </property> + <property name="windowTitle"> + <string>Select Color</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QScrollArea" name="definedColors"> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOn</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <widget class="QWidget" name="definedColorsWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>384</width> + <height>287</height> + </rect> + </property> + </widget> + </widget> + </item> + <item row="1" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="iconLabel"> + <property name="text"> + <string>[[ COLOR ICON HERE]]</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="colorLabel"> + <property name="text"> + <string>[[ COLOR HERE ]]</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QPushButton" name="directColor"> + <property name="toolTip"> + <string>Direct Color...</string> + </property> + <property name="text"> + <string>Direct Color...</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="transparentDirectColor"> + <property name="text"> + <string>Transparent</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item row="2" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources> + <include location="../ldforge.qrc"/> + </resources> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>ColorSelUi</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>ColorSelUi</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui>
--- a/ui/colorsel.ui Sun Aug 23 00:25:21 2015 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ColorSelUi</class> - <widget class="QDialog" name="ColorSelUi"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>588</width> - <height>404</height> - </rect> - </property> - <property name="windowTitle"> - <string>Select Color</string> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QScrollArea" name="definedColors"> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOn</enum> - </property> - <property name="horizontalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOff</enum> - </property> - <widget class="QWidget" name="definedColorsWidget"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>384</width> - <height>287</height> - </rect> - </property> - </widget> - </widget> - </item> - <item row="1" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="iconLabel"> - <property name="text"> - <string>[[ COLOR ICON HERE]]</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="colorLabel"> - <property name="text"> - <string>[[ COLOR HERE ]]</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QPushButton" name="directColor"> - <property name="toolTip"> - <string>Direct Color...</string> - </property> - <property name="text"> - <string>Direct Color...</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="transparentDirectColor"> - <property name="text"> - <string>Transparent</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item row="2" column="0"> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - </layout> - </widget> - <resources> - <include location="../ldforge.qrc"/> - </resources> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>ColorSelUi</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - <connection> - <sender>buttonBox</sender> - <signal>rejected()</signal> - <receiver>ColorSelUi</receiver> - <slot>reject()</slot> - <hints> - <hint type="sourcelabel"> - <x>316</x> - <y>260</y> - </hint> - <hint type="destinationlabel"> - <x>286</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> -</ui>