Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_aspect_ratio_locker.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_ASPECT_RATIO_LOCKER_H
8#define __KIS_ASPECT_RATIO_LOCKER_H
9
10#include <QScopedPointer>
11#include <QObject>
12#include "kritaui_export.h"
13
14class QSpinBox;
15class QDoubleSpinBox;
18class KoAspectButton;
19
20
46class KRITAUI_EXPORT KisAspectRatioLocker : public QObject
47{
48 Q_OBJECT
49public:
50 KisAspectRatioLocker(QObject *parent = 0);
51 ~KisAspectRatioLocker() override;
52
56 template <class SpinBoxType>
57 void connectSpinBoxes(SpinBoxType *spinOne, SpinBoxType *spinTwo, KoAspectButton *aspectButton);
58
62 template <class AngleBoxType>
63 void connectAngleBoxes(AngleBoxType *spinOne, AngleBoxType *spinTwo, KoAspectButton *aspectButton);
64
70 void setBlockUpdateSignalOnDrag(bool block);
71
95 void updateAspect();
96
97private Q_SLOTS:
98 void slotSpinOneChanged();
99 void slotSpinTwoChanged();
100 void slotAspectButtonChanged();
101 void slotSpinDraggingFinished();
102
103Q_SIGNALS:
113
118
124
125private:
126 struct Private;
127 const QScopedPointer<Private> m_d;
128};
129
130#endif /* __KIS_ASPECT_RATIO_LOCKER_H */
float value(const T *src, size_t ch)
const QScopedPointer< Private > m_d
void aspectButtonToggled(bool value)
This class is a spinbox in which you can click and drag to set the value. A slider like bar is displa...
This class is a spinbox in which you can click and drag to set the value. A slider like bar is displa...