File indexing completed on 2024-12-22 04:12:58
0001 /* 0002 * SPDX-License-Identifier: GPL-2.0-or-later 0003 */ 0004 0005 #ifndef KISRECTANGLECONSTRAINTWIDGET_H 0006 #define KISRECTANGLECONSTRAINTWIDGET_H 0007 0008 #include "ui_wdgrectangleconstraints.h" 0009 #include <kritaui_export.h> 0010 0011 class KisToolRectangleBase; 0012 class KisAspectRatioLocker; 0013 0014 class KRITAUI_EXPORT KisRectangleConstraintWidget : public QWidget, public Ui::WdgRectangleConstraints 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 KisRectangleConstraintWidget(QWidget *parentWidget, KisToolRectangleBase *tool, bool showRoundCornersGUI); 0020 0021 Q_SIGNALS: 0022 void constraintsChanged(bool forceRatio, bool forceWidth, bool forceHeight, float ratio, float width, float height); 0023 0024 protected Q_SLOTS: 0025 void rectangleChanged(const QRectF &rect); 0026 void inputsChanged(); 0027 void inputWidthChanged(); 0028 void inputHeightChanged(); 0029 void inputRatioChanged(); 0030 0031 void slotRoundCornersChanged(); 0032 void slotRoundCornersAspectLockChanged(); 0033 0034 void slotReloadConfig(); 0035 0036 protected: 0037 KisToolRectangleBase* m_tool; 0038 Ui_WdgRectangleConstraints *m_widget; 0039 KisAspectRatioLocker *m_cornersAspectLocker; 0040 }; 0041 0042 #endif