Add basic logic in colorPicker

This commit is contained in:
lupoDharkael
2017-05-17 21:47:15 +02:00
parent f14d1e755d
commit 1dc2220afb
6 changed files with 65 additions and 14 deletions

View File

@@ -16,22 +16,20 @@
// along with Flameshot. If not, see <http://www.gnu.org/licenses/>.
#include "capturemodification.h"
#include <QSettings>
#include <QColor>
// CaptureModification is a single modification in the screenshot drawn
// by the user.
CaptureModification::CaptureModification(
const Button::Type t, QPoint p) : m_type(t) {
const Button::Type t, QPoint p, const QColor c) : m_type(t) {
m_coords.append(p);
if (m_type == Button::Type::circle || m_type == Button::Type::rectangle
|| m_type == Button::Type::arrow || m_type == Button::Type::line ||
m_type == Button::Type::marker) {
m_coords.append(p);
}
QSettings settings;
m_color = settings.value("drawColor").value<QColor>();
m_color = c;
}
CaptureModification::CaptureModification() {