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
20class KRITAUI_EXPORT KisAspectRatioLocker : public QObject
21{
22 Q_OBJECT
23public:
24 KisAspectRatioLocker(QObject *parent = 0);
25 ~KisAspectRatioLocker() override;
26
27 template <class SpinBoxType>
28 void connectSpinBoxes(SpinBoxType *spinOne, SpinBoxType *spinTwo, KoAspectButton *aspectButton);
29
30 template <class AngleBoxType>
31 void connectAngleBoxes(AngleBoxType *spinOne, AngleBoxType *spinTwo, KoAspectButton *aspectButton);
32
33 void setBlockUpdateSignalOnDrag(bool block);
34 void updateAspect();
35
36private Q_SLOTS:
37 void slotSpinOneChanged();
38 void slotSpinTwoChanged();
39 void slotAspectButtonChanged();
40 void slotSpinDraggingFinished();
41
42Q_SIGNALS:
46
47private:
48 struct Private;
49 const QScopedPointer<Private> m_d;
50};
51
52#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...