Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_guides_manager.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_GUIDES_MANAGER_H
8#define __KIS_GUIDES_MANAGER_H
9
10#include <QScopedPointer>
11#include <QObject>
12#include "kritaui_export.h"
13#include <KoUnit.h>
14
15class KisView;
18class KisGuidesConfig;
19
20
21class KRITAUI_EXPORT KisGuidesManager : public QObject
22{
23 Q_OBJECT
24public:
25 KisGuidesManager(QObject *parent = 0);
26 ~KisGuidesManager() override;
27
28 void setup(KisActionManager *actionManager);
29 void setView(QPointer<KisView> view);
30
31 bool showGuides() const;
32 bool lockGuides() const;
33 bool snapToGuides() const;
34 bool rulersMultiple2() const;
35
36 KoUnit::Type unitType() const;
37
38 bool eventFilter(QObject *obj, QEvent *event) override;
39
40Q_SIGNALS:
42
43public Q_SLOTS:
44 void setGuidesConfig(const KisGuidesConfig &config);
45 void slotDocumentRequestedConfig(const KisGuidesConfig &config);
46
47 void setShowGuides(bool value);
48 void setLockGuides(bool value);
49 void setSnapToGuides(bool value);
50 void setRulersMultiple2(bool value);
51 void setUnitType(KoUnit::Type type);
52
53 void slotGuideCreationInProgress(Qt::Orientation orientation, const QPoint &globalPos);
54 void slotGuideCreationFinished(Qt::Orientation orientation, const QPoint &globalPos);
55
56 void slotShowSnapOptions();
57
58 void setSnapOrthogonal(bool value);
59 void setSnapNode(bool value);
60 void setSnapExtension(bool value);
61 void setSnapIntersection(bool value);
62 void setSnapBoundingBox(bool value);
63 void setSnapImageBounds(bool value);
64 void setSnapImageCenter(bool value);
65 void setSnapToPixel(bool value);
66
67 void slotUploadConfigToDocument();
68
69private:
70 void setGuidesConfigImpl(const KisGuidesConfig &value, bool emitModified = true);
71 void attachEventFilterImpl(bool value);
72 void syncActionsStatus();
73
74private:
75 struct Private;
76 const QScopedPointer<Private> m_d;
77};
78
79#endif /* __KIS_GUIDES_MANAGER_H */
float value(const T *src, size_t ch)
A KisActionManager class keeps track of KisActions. These actions are always associated with the GUI....
const QScopedPointer< Private > m_d
void sigRequestUpdateGuidesConfig(const KisGuidesConfig &config)