Files
flameshot/src/widgets/capture/colorpicker.h
Sergey Zolotarev 065aa98ce4 Fix some compile warnings in macOS build (#2027)
* Fix some compile warnings in macOS build

* Update macOS Info.plist template
2021-11-01 09:59:51 +01:00

32 lines
726 B
C++

// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
#pragma once
#include <QWidget>
class ColorPicker : public QWidget
{
Q_OBJECT
public:
explicit ColorPicker(QWidget* parent = nullptr);
signals:
void colorSelected(QColor c);
protected:
void paintEvent(QPaintEvent* event) override;
void repaint(int i, QPainter& painter);
void mouseMoveEvent(QMouseEvent*) override;
void showEvent(QShowEvent* event) override;
void hideEvent(QHideEvent* event) override;
private:
int m_colorAreaSize;
int m_selectedIndex, m_lastIndex;
QVector<QRect> m_colorAreaList;
QVector<QColor> m_colorList;
QColor m_uiColor;
};