* Created basic layer movement functionality (up, down) * Replaced `and` and `or` with `&&` and `||`, added constructor initialization * Added move icons. Added that moving layers pushes state to undo stack. * Cleaned svgs. * Circle counter doesn't change nubmer when reordered anymore * Changed move arrow SVGs * Make down arrow in size with up arrow, fix white colors from #feffff to #fff * SVGs in unitilypanel for buttons now choose color depending on color theme * Refactor tool removing code, removed fixme, fixed bug with minimal circleCount * Set minimal width for buttons Co-authored-by: Feskow Vega <affirvega@krutt.org>
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// SPDX-FileCopyrightText: 2021 Yurii Puchkov & Contributors
|
|
|
|
#ifndef FLAMESHOT_CAPTURETOOLOBJECTS_H
|
|
#define FLAMESHOT_CAPTURETOOLOBJECTS_H
|
|
|
|
#include "src/tools/capturetool.h"
|
|
#include <QList>
|
|
#include <QPointer>
|
|
|
|
class CaptureToolObjects : public QObject
|
|
{
|
|
public:
|
|
explicit CaptureToolObjects(QObject* parent = nullptr);
|
|
QList<QPointer<CaptureTool>> captureToolObjects();
|
|
void append(const QPointer<CaptureTool>& captureTool);
|
|
void insert(int index, const QPointer<CaptureTool>& captureTool);
|
|
void removeAt(int index);
|
|
void clear();
|
|
int size();
|
|
int find(const QPoint& pos, const QSize& captureSize);
|
|
QPointer<CaptureTool> at(int index);
|
|
CaptureToolObjects& operator=(const CaptureToolObjects& other);
|
|
|
|
private:
|
|
int findWithRadius(QPainter& painter,
|
|
QPixmap& pixmap,
|
|
const QPoint& pos,
|
|
int radius = 0);
|
|
|
|
// class members
|
|
QList<QPointer<CaptureTool>> m_captureToolObjects;
|
|
QVector<QImage> m_imageCache;
|
|
};
|
|
|
|
#endif // FLAMESHOT_CAPTURETOOLOBJECTS_H
|