Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_snap_line_strategy.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_SNAP_LINE_STRATEGY_H
8#define __KIS_SNAP_LINE_STRATEGY_H
9
10#include <QScopedPointer>
11
12#include "KoSnapStrategy.h"
13
14
16{
17public:
19 ~KisSnapLineStrategy() override;
20
21 bool snap(const QPointF &mousePosition, KoSnapProxy * proxy, qreal maxSnapDistance) override;
22 QPainterPath decoration(const KoViewConverter &converter) const override;
23
24 void addLine(Qt::Orientation orientation, qreal pos);
25
26 void setHorizontalLines(const QList<qreal> &lines);
27 void setVerticalLines(const QList<qreal> &lines);
28
29private:
30 struct Private;
31 const QScopedPointer<Private> m_d;
32};
33
34#endif /* __KIS_SNAP_LINE_STRATEGY_H */
const QScopedPointer< Private > m_d
void setVerticalLines(const QList< qreal > &lines)
QPainterPath decoration(const KoViewConverter &converter) const override
returns the current snap strategy decoration
void addLine(Qt::Orientation orientation, qreal pos)
KisSnapLineStrategy(KoSnapGuide::Strategy type=KoSnapGuide::CustomSnapping)
bool snap(const QPointF &mousePosition, KoSnapProxy *proxy, qreal maxSnapDistance) override
void setHorizontalLines(const QList< qreal > &lines)
Strategy
the different possible snap Strategies
Definition KoSnapGuide.h:49
KoSnapGuide::Strategy type() const
returns the strategies type