src/widgets/colorbutton.h

Tue, 07 Jun 2022 01:37:26 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 07 Jun 2022 01:37:26 +0300
changeset 201
5d201ee4a9c3
parent 39
caac957e9834
permissions
-rw-r--r--

Continue giant refactor

#pragma once
#include <QPushButton>

/**
 * @brief A button that can be used to select a color
 */
class ColorButton : public QPushButton
{
public:
	ColorButton(const QColor& color = {}, QWidget* parent = nullptr);
	ColorButton(QWidget* parent = nullptr);
	QColor selectedColor() const;
	void setSelectedColor(const QColor& newSelectedColor);
private:
	QColor storedSelectedColor;
};

mercurial