23 #include <QHeaderView> 24 #include <QPushButton> 26 #include <QToolButton> 27 #include <QFileDialog> 28 #include <QMessageBox> 29 #include <QDesktopWidget> 30 #include <QMouseEvent> 32 #include <QInputDialog> 33 #include <QVBoxLayout> 39 connect( mHueRadio, &QRadioButton::toggled,
this, &QgsCompoundColorWidget::mHueRadio_toggled );
40 connect( mSaturationRadio, &QRadioButton::toggled,
this, &QgsCompoundColorWidget::mSaturationRadio_toggled );
41 connect( mValueRadio, &QRadioButton::toggled,
this, &QgsCompoundColorWidget::mValueRadio_toggled );
42 connect( mRedRadio, &QRadioButton::toggled,
this, &QgsCompoundColorWidget::mRedRadio_toggled );
43 connect( mGreenRadio, &QRadioButton::toggled,
this, &QgsCompoundColorWidget::mGreenRadio_toggled );
44 connect( mBlueRadio, &QRadioButton::toggled,
this, &QgsCompoundColorWidget::mBlueRadio_toggled );
45 connect( mAddColorToSchemeButton, &QPushButton::clicked,
this, &QgsCompoundColorWidget::mAddColorToSchemeButton_clicked );
46 connect( mAddCustomColorButton, &QPushButton::clicked,
this, &QgsCompoundColorWidget::mAddCustomColorButton_clicked );
47 connect( mSampleButton, &QPushButton::clicked,
this, &QgsCompoundColorWidget::mSampleButton_clicked );
48 connect( mTabWidget, &QTabWidget::currentChanged,
this, &QgsCompoundColorWidget::mTabWidget_currentChanged );
49 connect( mActionShowInButtons, &QAction::toggled,
this, &QgsCompoundColorWidget::mActionShowInButtons_toggled );
54 QVBoxLayout *newLayout =
new QVBoxLayout();
55 newLayout->setMargin( 0 );
56 newLayout->setContentsMargins( 0, 0, 0, 0 );
57 newLayout->addWidget( mTabWidget );
58 newLayout->addWidget( mSlidersWidget );
59 newLayout->addWidget( mPreviewWidget );
60 newLayout->addWidget( mSwatchesWidget );
62 setLayout( newLayout );
67 mSchemeList->header()->hide();
68 mSchemeList->setColumnWidth( 0, 44 );
71 refreshSchemeComboBox();
75 int activeScheme = settings.
value( QStringLiteral(
"Windows/ColorDialog/activeScheme" ), 0 ).toInt();
76 activeScheme = activeScheme >= mSchemeComboBox->count() ? 0 : activeScheme;
78 mSchemeList->setScheme( schemeList.at( activeScheme ) );
80 mSchemeComboBox->setCurrentIndex( activeScheme );
81 updateActionsForCurrentScheme();
84 connect( mSchemeList->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &QgsCompoundColorWidget::listSelectionChanged );
86 mActionCopyColors->setEnabled(
false );
92 connect( mActionImportPalette, &QAction::triggered,
this, &QgsCompoundColorWidget::importPalette );
93 connect( mActionRemovePalette, &QAction::triggered,
this, &QgsCompoundColorWidget::removePalette );
94 connect( mActionNewPalette, &QAction::triggered,
this, &QgsCompoundColorWidget::newPalette );
97 QMenu *schemeMenu =
new QMenu( mSchemeToolButton );
98 schemeMenu->addAction( mActionCopyColors );
99 schemeMenu->addAction( mActionPasteColors );
100 schemeMenu->addSeparator();
101 schemeMenu->addAction( mActionImportColors );
102 schemeMenu->addAction( mActionExportColors );
103 schemeMenu->addSeparator();
104 schemeMenu->addAction( mActionNewPalette );
105 schemeMenu->addAction( mActionImportPalette );
106 schemeMenu->addAction( mActionRemovePalette );
107 schemeMenu->addAction( mActionShowInButtons );
108 mSchemeToolButton->setMenu( schemeMenu );
110 connect( mSchemeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsCompoundColorWidget::schemeIndexChanged );
113 mOldColorLabel->hide();
116 mVerticalRamp->setInteriorMargin( 2 );
117 mVerticalRamp->setShowFrame(
true );
127 mSwatchButton1->setShowMenu(
false );
129 mSwatchButton2->setShowMenu(
false );
131 mSwatchButton3->setShowMenu(
false );
133 mSwatchButton4->setShowMenu(
false );
135 mSwatchButton5->setShowMenu(
false );
137 mSwatchButton6->setShowMenu(
false );
139 mSwatchButton7->setShowMenu(
false );
141 mSwatchButton8->setShowMenu(
false );
143 mSwatchButton9->setShowMenu(
false );
145 mSwatchButton10->setShowMenu(
false );
147 mSwatchButton11->setShowMenu(
false );
149 mSwatchButton12->setShowMenu(
false );
151 mSwatchButton13->setShowMenu(
false );
153 mSwatchButton14->setShowMenu(
false );
155 mSwatchButton15->setShowMenu(
false );
157 mSwatchButton16->setShowMenu(
false );
160 mSwatchButton1->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor1" ), QVariant( QColor() ) ).value<QColor>() );
161 mSwatchButton2->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor2" ), QVariant( QColor() ) ).value<QColor>() );
162 mSwatchButton3->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor3" ), QVariant( QColor() ) ).value<QColor>() );
163 mSwatchButton4->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor4" ), QVariant( QColor() ) ).value<QColor>() );
164 mSwatchButton5->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor5" ), QVariant( QColor() ) ).value<QColor>() );
165 mSwatchButton6->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor6" ), QVariant( QColor() ) ).value<QColor>() );
166 mSwatchButton7->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor7" ), QVariant( QColor() ) ).value<QColor>() );
167 mSwatchButton8->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor8" ), QVariant( QColor() ) ).value<QColor>() );
168 mSwatchButton9->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor9" ), QVariant( QColor() ) ).value<QColor>() );
169 mSwatchButton10->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor10" ), QVariant( QColor() ) ).value<QColor>() );
170 mSwatchButton11->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor11" ), QVariant( QColor() ) ).value<QColor>() );
171 mSwatchButton12->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor12" ), QVariant( QColor() ) ).value<QColor>() );
172 mSwatchButton13->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor13" ), QVariant( QColor() ) ).value<QColor>() );
173 mSwatchButton14->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor14" ), QVariant( QColor() ) ).value<QColor>() );
174 mSwatchButton15->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor15" ), QVariant( QColor() ) ).value<QColor>() );
175 mSwatchButton16->setColor( settings.
value( QStringLiteral(
"Windows/ColorDialog/customColor16" ), QVariant( QColor() ) ).value<QColor>() );
178 mSpinBoxRadius->setValue( settings.
value( QStringLiteral(
"Windows/ColorDialog/sampleRadius" ), 1 ).toInt() );
179 mSamplePreview->setColor( QColor() );
181 if ( color.isValid() )
187 int activeRadio = settings.
value( QStringLiteral(
"Windows/ColorDialog/activeComponent" ), 2 ).toInt();
188 switch ( activeRadio )
191 mHueRadio->setChecked(
true );
194 mSaturationRadio->setChecked(
true );
197 mValueRadio->setChecked(
true );
200 mRedRadio->setChecked(
true );
203 mGreenRadio->setChecked(
true );
206 mBlueRadio->setChecked(
true );
209 int currentTab = settings.
value( QStringLiteral(
"Windows/ColorDialog/activeTab" ), 0 ).toInt();
210 mTabWidget->setCurrentIndex( currentTab );
256 return mColorPreview->color();
261 mAllowAlpha = allowOpacity;
262 mAlphaLabel->setVisible( allowOpacity );
263 mAlphaSlider->setVisible( allowOpacity );
266 mAlphaLayout->setContentsMargins( 0, 0, 0, 0 );
267 mAlphaLayout->setSpacing( 0 );
271 void QgsCompoundColorWidget::refreshSchemeComboBox()
273 mSchemeComboBox->blockSignals(
true );
274 mSchemeComboBox->clear();
276 QList<QgsColorScheme *>::const_iterator schemeIt = schemeList.constBegin();
277 for ( ; schemeIt != schemeList.constEnd(); ++schemeIt )
279 mSchemeComboBox->addItem( ( *schemeIt )->schemeName() );
281 mSchemeComboBox->blockSignals(
false );
288 QString lastDir = s.
value( QStringLiteral(
"/UI/lastGplPaletteDir" ), QDir::homePath() ).toString();
289 QString filePath = QFileDialog::getOpenFileName( parent, tr(
"Select Palette File" ), lastDir, QStringLiteral(
"GPL (*.gpl);;All files (*.*)" ) );
291 parent->activateWindow();
292 if ( filePath.isEmpty() )
298 QFileInfo fileInfo( filePath );
299 if ( !fileInfo.exists() || !fileInfo.isReadable() )
301 QMessageBox::critical(
nullptr, tr(
"Import Color Palette" ), tr(
"Error, file does not exist or is not readable." ) );
305 s.
setValue( QStringLiteral(
"/UI/lastGplPaletteDir" ), fileInfo.absolutePath() );
306 QFile file( filePath );
314 QMessageBox::critical(
nullptr, tr(
"Import Color Palette" ), tr(
"Palette file is not readable." ) );
318 if ( importedColors.length() == 0 )
321 QMessageBox::critical(
nullptr, tr(
"Import Color Palette" ), tr(
"No colors found in palette file." ) );
327 importedScheme->
setName( paletteName );
328 importedScheme->
setColors( importedColors );
331 return importedScheme;
334 void QgsCompoundColorWidget::importPalette()
339 refreshSchemeComboBox();
340 mSchemeComboBox->setCurrentIndex( mSchemeComboBox->count() - 1 );
347 if ( QMessageBox::question( parent, tr(
"Remove Color Palette" ),
348 QString( tr(
"Are you sure you want to remove %1?" ) ).arg( scheme->
schemeName() ),
349 QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) != QMessageBox::Yes )
356 if ( !scheme->
erase() )
367 void QgsCompoundColorWidget::removePalette()
371 int prevIndex = mSchemeComboBox->currentIndex();
372 if ( prevIndex >= schemeList.length() )
386 refreshSchemeComboBox();
387 prevIndex = std::max( std::min( prevIndex, mSchemeComboBox->count() - 1 ), 0 );
388 mSchemeComboBox->setCurrentIndex( prevIndex );
395 QString name = QInputDialog::getText( parent, tr(
"Create New Palette" ), tr(
"Enter a name for the new palette:" ),
396 QLineEdit::Normal, tr(
"New palette" ), &ok );
398 if ( !ok || name.isEmpty() )
405 QDir palettePath( gplFilePath() );
406 QRegExp badChars(
"[,^@={}\\[\\]~!?:&*\"|#%<>$\"'();`' /\\\\]" );
407 QString filename = name.simplified().toLower().replace( badChars, QStringLiteral(
"_" ) );
408 if ( filename.isEmpty() )
410 filename = tr(
"new_palette" );
412 QFileInfo destFileInfo( palettePath.filePath( filename +
".gpl" ) );
414 while ( destFileInfo.exists() )
417 destFileInfo = QFileInfo( palettePath.filePath( filename + QStringLiteral(
"%1.gpl" ).arg( fileNumber ) ) );
428 void QgsCompoundColorWidget::newPalette()
433 refreshSchemeComboBox();
434 mSchemeComboBox->setCurrentIndex( mSchemeComboBox->count() - 1 );
438 QString QgsCompoundColorWidget::gplFilePath()
443 if ( !localDir.mkpath( palettesDir ) )
451 void QgsCompoundColorWidget::schemeIndexChanged(
int index )
454 if ( mSchemeList->isDirty() )
456 mSchemeList->saveColorsToScheme();
461 if ( index >= schemeList.length() )
467 mSchemeList->setScheme( scheme );
469 updateActionsForCurrentScheme();
472 mActionCopyColors->setEnabled(
false );
475 void QgsCompoundColorWidget::listSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected )
477 Q_UNUSED( deselected );
478 mActionCopyColors->setEnabled( selected.length() > 0 );
481 void QgsCompoundColorWidget::mAddCustomColorButton_clicked()
483 switch ( mLastCustomColorIndex )
486 mSwatchButton1->setColor( mColorPreview->color() );
489 mSwatchButton2->setColor( mColorPreview->color() );
492 mSwatchButton3->setColor( mColorPreview->color() );
495 mSwatchButton4->setColor( mColorPreview->color() );
498 mSwatchButton5->setColor( mColorPreview->color() );
501 mSwatchButton6->setColor( mColorPreview->color() );
504 mSwatchButton7->setColor( mColorPreview->color() );
507 mSwatchButton8->setColor( mColorPreview->color() );
510 mSwatchButton9->setColor( mColorPreview->color() );
513 mSwatchButton10->setColor( mColorPreview->color() );
516 mSwatchButton11->setColor( mColorPreview->color() );
519 mSwatchButton12->setColor( mColorPreview->color() );
522 mSwatchButton13->setColor( mColorPreview->color() );
525 mSwatchButton14->setColor( mColorPreview->color() );
528 mSwatchButton15->setColor( mColorPreview->color() );
531 mSwatchButton16->setColor( mColorPreview->color() );
534 mLastCustomColorIndex++;
535 if ( mLastCustomColorIndex >= 16 )
537 mLastCustomColorIndex = 0;
541 void QgsCompoundColorWidget::mSampleButton_clicked()
547 mPickingColor =
true;
548 setMouseTracking(
true );
551 void QgsCompoundColorWidget::mTabWidget_currentChanged(
int index )
554 bool enabled = index == 0;
555 mRedRadio->setEnabled( enabled );
556 mBlueRadio->setEnabled( enabled );
557 mGreenRadio->setEnabled( enabled );
558 mHueRadio->setEnabled( enabled );
559 mSaturationRadio->setEnabled( enabled );
560 mValueRadio->setEnabled( enabled );
563 void QgsCompoundColorWidget::mActionShowInButtons_toggled(
bool state )
572 QScreen *QgsCompoundColorWidget::findScreenAt( QPoint pos )
574 for ( QScreen *screen : QGuiApplication::screens() )
576 if ( screen->geometry().contains( pos ) )
584 void QgsCompoundColorWidget::saveSettings()
587 if ( mSchemeList->isDirty() )
589 mSchemeList->saveColorsToScheme();
596 if ( mHueRadio->isChecked() )
598 if ( mSaturationRadio->isChecked() )
600 if ( mValueRadio->isChecked() )
602 if ( mRedRadio->isChecked() )
604 if ( mGreenRadio->isChecked() )
606 if ( mBlueRadio->isChecked() )
608 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/activeComponent" ), activeRadio );
611 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/activeScheme" ), mSchemeComboBox->currentIndex() );
614 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/activeTab" ), mTabWidget->currentIndex() );
617 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor1" ), QVariant( mSwatchButton1->color() ) );
618 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor2" ), QVariant( mSwatchButton2->color() ) );
619 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor3" ), QVariant( mSwatchButton3->color() ) );
620 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor4" ), QVariant( mSwatchButton4->color() ) );
621 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor5" ), QVariant( mSwatchButton5->color() ) );
622 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor6" ), QVariant( mSwatchButton6->color() ) );
623 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor7" ), QVariant( mSwatchButton7->color() ) );
624 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor8" ), QVariant( mSwatchButton8->color() ) );
625 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor9" ), QVariant( mSwatchButton9->color() ) );
626 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor10" ), QVariant( mSwatchButton10->color() ) );
627 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor11" ), QVariant( mSwatchButton11->color() ) );
628 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor12" ), QVariant( mSwatchButton12->color() ) );
629 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor13" ), QVariant( mSwatchButton13->color() ) );
630 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor14" ), QVariant( mSwatchButton14->color() ) );
631 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor15" ), QVariant( mSwatchButton15->color() ) );
632 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/customColor16" ), QVariant( mSwatchButton16->color() ) );
635 settings.
setValue( QStringLiteral(
"Windows/ColorDialog/sampleRadius" ), mSpinBoxRadius->value() );
638 void QgsCompoundColorWidget::stopPicking( QPoint eventPos,
const bool takeSample )
644 setMouseTracking(
false );
645 mPickingColor =
false;
654 QColor snappedColor = sampleColor( eventPos );
655 mSamplePreview->setColor( snappedColor );
656 mColorPreview->setColor( snappedColor,
true );
661 if ( !color.isValid() )
666 QColor fixedColor = QColor( color );
670 fixedColor.setAlpha( 255 );
672 QList<QgsColorWidget *> colorWidgets = this->findChildren<QgsColorWidget *>();
675 if ( widget == mSamplePreview )
679 widget->blockSignals(
true );
681 widget->blockSignals(
false );
688 mOldColorLabel->setVisible( color.isValid() );
689 mColorPreview->setColor2( color );
701 QWidget::mousePressEvent( e );
704 QColor QgsCompoundColorWidget::averageColor(
const QImage &image )
const 712 for (
int heightIndex = 0; heightIndex < image.height(); ++heightIndex )
714 QRgb *scanLine = ( QRgb * )image.constScanLine( heightIndex );
715 for (
int widthIndex = 0; widthIndex < image.width(); ++widthIndex )
717 tmpRgb = scanLine[widthIndex];
718 sumRed += qRed( tmpRgb );
719 sumBlue += qBlue( tmpRgb );
720 sumGreen += qGreen( tmpRgb );
725 double avgRed = ( double )sumRed / ( 255.0 * colorCount );
726 double avgGreen = ( double )sumGreen / ( 255.0 * colorCount );
727 double avgBlue = ( double )sumBlue / ( 255.0 * colorCount );
730 return QColor::fromRgbF( avgRed, avgGreen, avgBlue );
733 QColor QgsCompoundColorWidget::sampleColor( QPoint point )
const 735 int sampleRadius = mSpinBoxRadius->value() - 1;
736 QScreen *screen = findScreenAt( point );
741 QPixmap snappedPixmap = screen->grabWindow( QApplication::desktop()->winId(),
742 point.x() - sampleRadius,
743 point.y() - sampleRadius,
744 1 + sampleRadius * 2,
745 1 + sampleRadius * 2 );
746 QImage snappedImage = snappedPixmap.toImage();
748 return averageColor( snappedImage );
757 QColor hoverColor = sampleColor( e->globalPos() );
758 mSamplePreview->setColor( hoverColor );
764 QWidget::mouseMoveEvent( e );
772 stopPicking( e->globalPos() );
777 QWidget::mouseReleaseEvent( e );
782 if ( !mPickingColor )
790 stopPicking( QCursor::pos(), e->key() == Qt::Key_Space );
793 void QgsCompoundColorWidget::mHueRadio_toggled(
bool checked )
802 void QgsCompoundColorWidget::mSaturationRadio_toggled(
bool checked )
811 void QgsCompoundColorWidget::mValueRadio_toggled(
bool checked )
820 void QgsCompoundColorWidget::mRedRadio_toggled(
bool checked )
829 void QgsCompoundColorWidget::mGreenRadio_toggled(
bool checked )
838 void QgsCompoundColorWidget::mBlueRadio_toggled(
bool checked )
847 void QgsCompoundColorWidget::mAddColorToSchemeButton_clicked()
852 void QgsCompoundColorWidget::updateActionsForCurrentScheme()
856 mActionImportColors->setEnabled( scheme->
isEditable() );
857 mActionPasteColors->setEnabled( scheme->
isEditable() );
858 mAddColorToSchemeButton->setEnabled( scheme->
isEditable() );
859 mRemoveColorsFromSchemeButton->setEnabled( scheme->
isEditable() );
862 mActionRemovePalette->setEnabled( static_cast< bool >( userScheme ) );
865 mActionShowInButtons->setEnabled(
true );
871 mActionShowInButtons->setEnabled(
false );
A color scheme which stores its colors in a gpl palette file within the "palettes" subfolder off the ...
void setName(const QString &name)
Sets the name for the scheme.
void colorSelected(const QColor &color)
Emitted when a color is selected from the list.
bool erase()
Erases the associated gpl palette file from the users "palettes" folder.
static QString qgisSettingsDirPath()
Returns the path to the settings directory in user's home dir.
void removeSelection()
Removes any selected colors from the list.
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
Abstract base class for color schemes.
bool setColors(const QgsNamedColorList &colors, const QString &context=QString(), const QColor &baseColor=QColor()) override
Sets the colors for the scheme.
QgsColorScheme::SchemeFlags flags() const override
Returns the current flags for the color scheme.
void pasteColors()
Pastes colors from clipboard to the list.
Show scheme in color button drop-down menu.
bool removeColorScheme(QgsColorScheme *scheme)
Removes all matching color schemes from the registry.
QList< QgsColorScheme * > schemes() const
Returns all color schemes in the registry.
void showExportColorsDialog()
Displays a file picker dialog allowing users to export colors from the list into a file...
static QgsNamedColorList importColorsFromGpl(QFile &file, bool &ok, QString &name)
Imports colors from a gpl GIMP palette file.
void setShowSchemeInMenu(bool show)
Sets whether a this scheme should be shown in color button menus.
void showImportColorsDialog()
Displays a file picker dialog allowing users to import colors into the list from a file...
static QString colorToName(const QColor &color)
Returns a friendly display name for a color.
QList< QPair< QColor, QString > > QgsNamedColorList
List of colors paired with a friendly display name identifying the color.
void addColorScheme(QgsColorScheme *scheme)
Adds a color scheme to the registry.
static void addRecentColor(const QColor &color)
Adds a color to the list of recent colors.
Show scheme in color picker dialog.
virtual bool isEditable() const
Returns whether the color scheme is editable.
static QgsColorSchemeRegistry * colorSchemeRegistry()
Returns the application's color scheme registry, used for managing color schemes. ...
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
QString schemeName() const override
Gets the name for the color scheme.
void copyColors()
Copies colors from the list to the clipboard.
static QCursor getThemeCursor(Cursor cursor)
Helper to get a theme cursor.