src/widgets/colorbutton.h

Thu, 27 Feb 2020 12:23:42 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 27 Feb 2020 12:23:42 +0200
changeset 58
b7841cd31fb7
parent 39
caac957e9834
permissions
-rw-r--r--

use glm::project instead of figuring out the conversion manually...

#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