From 3ffbf4041ee2f9cc210621d6adad928b1bcfe525 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 17 Jan 2020 18:49:30 +0000 Subject: qsui: added options for ColorWidget git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9206 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/qsui/colorwidget.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/plugins/Ui/qsui/colorwidget.cpp') diff --git a/src/plugins/Ui/qsui/colorwidget.cpp b/src/plugins/Ui/qsui/colorwidget.cpp index b02e3a46b..d774dbfdc 100644 --- a/src/plugins/Ui/qsui/colorwidget.cpp +++ b/src/plugins/Ui/qsui/colorwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by Ilya Kotov * + * Copyright (C) 2005-2020 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include #include #include "colorwidget.h" @@ -31,10 +30,20 @@ ColorWidget::ColorWidget(QWidget *parent) : QFrame(parent) ColorWidget::~ColorWidget() {} +QColorDialog::ColorDialogOptions ColorWidget::options() const +{ + return m_options; +} + +void ColorWidget::setOptions(QColorDialog::ColorDialogOptions options) +{ + m_options = options; +} + void ColorWidget::mousePressEvent(QMouseEvent *) { QColor color = QColorDialog::getColor(palette().color(backgroundRole()), parentWidget(), - tr("Select Color")); + tr("Select Color"), m_options); if (color.isValid()) { setColor(color.name()); -- cgit v1.2.3-13-gbd6f