AngleSelector
#include <AngleSelector.h>
Signals | |
void | angleChanged (qreal angle) |
Public Slots | |
qreal | angle () const |
qreal | closestCoterminalAngleInRange (qreal angle, bool *ok=nullptr) const |
static qreal | closestCoterminalAngleInRange (qreal angle, qreal minimum, qreal maximum, bool *ok=nullptr) |
int | decimals () const |
void | flip (Qt::Orientations orientations) |
static qreal | flipAngle (qreal angle, qreal minimum, qreal maximum, Qt::Orientations orientations, bool *ok=nullptr) |
static qreal | flipAngle (qreal angle, Qt::Orientations orientations) |
QString | flipOptionsMode () const |
QString | increasingDirection () const |
bool | isUsingFlatSpinBox () const |
qreal | maximum () const |
qreal | minimum () const |
QString | prefix () const |
void | reset () |
qreal | resetAngle () const |
void | setAngle (qreal newAngle) |
void | setDecimals (int newNumberOfDecimals) |
void | setFlipOptionsMode (QString newMode) |
void | setIncreasingDirection (QString newIncreasingDirection) |
void | setMaximum (qreal newMaximum) |
void | setMinimum (qreal newMinimum) |
void | setPrefix (const QString &newPrefix) |
void | setRange (qreal newMinimum, qreal newMaximum) |
void | setResetAngle (qreal newResetAngle) |
void | setSnapAngle (qreal newSnapAngle) |
void | setWidgetsHeight (int newHeight) |
void | setWrapping (bool newWrapping) |
qreal | snapAngle () const |
void | useFlatSpinBox (bool newUseFlatSpinBox) |
QWidget * | widget () const |
int | widgetsHeight () const |
bool | wrapping () const |
Additional Inherited Members | |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties inherited from QObject | |
objectName | |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () const const |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () const const |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
A wrapper around KisAngleSelector, a widget with several options to select an angle.
The widget itself is accessed with the widget() function.
This widget is a combination of a KisAngleGauge and a spin box, along with some flipping options
Definition at line 21 of file AngleSelector.h.
Constructor & Destructor Documentation
◆ AngleSelector()
|
explicit |
Definition at line 29 of file AngleSelector.cpp.
◆ ~AngleSelector()
|
override |
Definition at line 39 of file AngleSelector.cpp.
Member Function Documentation
◆ angle
|
slot |
Gets the current angle.
- Returns
- The current angle
- See also
- setAngle(qreal)
Definition at line 49 of file AngleSelector.cpp.
◆ closestCoterminalAngleInRange [1/2]
|
slot |
Gets the closest coterminal angle to the provided angle that is in the range established.
A coterminal angle to the provided angle is one that differs in size by an integer multiple of a turn (360 degrees)
- Parameters
-
angle The reference angle for which the function will try to find a coterminal angle [out] ok This parameter will be set to true if a coterminal angle exists in the specified range, or to false otherwise
- Returns
- The closest coterminal angle in the specified range if one exists, or the closest value in the range (the minimum or maximum) otherwise. If the reference angle is already in the range then it is returned
Definition at line 204 of file AngleSelector.cpp.
◆ closestCoterminalAngleInRange [2/2]
|
staticslot |
Gets the closest coterminal angle to the provided angle that is in the range provided.
A coterminal angle to the provided angle is one that differs in size by an integer multiple of a turn (360 degrees)
- Parameters
-
angle The reference angle for which the function will try to find a coterminal angle minimum The range's lower bound maximum The range's upper bound [out] ok This parameter will be set to true if a coterminal angle exists in the provided range, or to false otherwise
- Returns
- The closest coterminal angle in the provided range if one exists, or the closest value in the range (the minimum or maximum) otherwise. If the reference angle is already in the range then it is returned
Definition at line 199 of file AngleSelector.cpp.
◆ decimals
|
slot |
Gets the number of decimals (precision) used by the angle.
If you want to simulate integer angles, set it to 0. The default is 2.
- Returns
- The number of decimals being used
- See also
- setDecimals(int)
Definition at line 64 of file AngleSelector.cpp.
◆ flip
|
slot |
Flips the angle horizontally, vertically, or both.
This function will always try to set the closest angle to the stablished one that satisfies the flipping requirements
- Parameters
-
orientations Flags indicating in which directions the angle should be flipped
Definition at line 219 of file AngleSelector.cpp.
◆ flipAngle [1/2]
|
staticslot |
Flips an angle horizontally, vertically, or both.
This function will always try to get the closest angle to the provided one that satisfies the flipping requirements
- Parameters
-
angle The angle to be flipped minimum The lower bound of the valid range maximum The upper bound of the valid range orientations Flags indicating in which directions the angle should be flipped [out] ok This parameter will be set to true if the flipped angle is in the provided range, or to false otherwise
- Returns
- The flipped angle if it lies in the provided range or the closest value in the range (the minimum or maximum) otherwise
Definition at line 214 of file AngleSelector.cpp.
◆ flipAngle [2/2]
|
staticslot |
Flips an angle horizontally, vertically, or both.
This function will always try to get the closest angle to the provided one that satisfies the flipping requirements
- Parameters
-
angle The angle to be flipped orientations Flags indicating in which directions the angle should be flipped
- Returns
- The flipped angle
Definition at line 209 of file AngleSelector.cpp.
◆ flipOptionsMode
|
slot |
Gets the mode in which the flip options should be shown.
The default is Buttons
- Returns
- The mode in which the flip options should be shown.
- See also
- setFlipOptionsMode(QString)
Definition at line 89 of file AngleSelector.cpp.
◆ increasingDirection
|
slot |
Gets the direction in which the angle increases in the angle gauge.
- Returns
- The direction in which the angle increases
- See also
- setIncreasingDirection(QString)
Definition at line 104 of file AngleSelector.cpp.
◆ isUsingFlatSpinBox
|
slot |
Gets if the spin box is flat (no border or background)
- Returns
- True if the spin box is flat, false otherwise
- See also
- useFlatSpinBox(bool)
Definition at line 114 of file AngleSelector.cpp.
◆ maximum
|
slot |
Gets the maximum value for the angle.
The default is 360
- Returns
- The maximum value for the angle
Definition at line 69 of file AngleSelector.cpp.
◆ minimum
|
slot |
Gets the minimum value for the angle.
The default is 0
- Returns
- The minimum value for the angle
Definition at line 74 of file AngleSelector.cpp.
◆ prefix
|
slot |
Gets the prefix shown in the spin box.
- Returns
- The prefix shown in the spin box
- See also
- setPrefix(const QString&)
Definition at line 79 of file AngleSelector.cpp.
◆ reset
|
slot |
Sets the current angle to the reset angle.
- See also
- resetAngle() const
- setResetAngle(qreal) const
Definition at line 194 of file AngleSelector.cpp.
◆ resetAngle
|
slot |
Gets the angle that is used to reset the current angle.
This angle is used when the user double clicks on the widget
- Returns
- The angle that is used to reset the current angle
- See also
- setResetAngle(qreal)
Definition at line 59 of file AngleSelector.cpp.
◆ setAngle
|
slot |
Sets the current angle.
- Parameters
-
newAngle the new angle
- See also
- angle() const
Definition at line 119 of file AngleSelector.cpp.
◆ setDecimals
|
slot |
Sets the number of decimals (precision) used by the angle.
- Parameters
-
newNumberOfDecimals the new number of decimals used by the angle
- See also
- decimals() const
Definition at line 134 of file AngleSelector.cpp.
◆ setFlipOptionsMode
|
slot |
Sets the mode in which the flip options should be shown.
- Parameters
-
newMode the new mode in which the flip options should be shown Valid arguments: - NoFlipOptions - There are no flip options available
- MenuButton - The flip options are shown as a menu accessible via a options button
- Buttons - The flip options are shown as individual buttons
-
ContextMenu - The flip options are shown only as a context menu when right-clicking the gauge widget
Definition at line 164 of file AngleSelector.cpp.
◆ setIncreasingDirection
|
slot |
Sets the increasing direction in the angle gauge.
- Parameters
-
newIncreasingDirection The new increasing direction Valid arguments: CounterClockwise or Clockwise.
- See also
- increasingDirection() const
Definition at line 179 of file AngleSelector.cpp.
◆ setMaximum
|
slot |
Sets the maximum value for the angle.
- Parameters
-
newMaximum the new maximum value for the angle
Definition at line 139 of file AngleSelector.cpp.
◆ setMinimum
|
slot |
Sets the minimum value for the angle.
- Parameters
-
newMinimum the new minimum value for the angle
Definition at line 144 of file AngleSelector.cpp.
◆ setPrefix
|
slot |
Sets the prefix shown in the spin box.
- Parameters
-
newPrefix the new prefix for the spin box
- See also
- prefix() const
Definition at line 154 of file AngleSelector.cpp.
◆ setRange
|
slot |
Sets the minimum and maximum values for the angle.
- Parameters
-
newMinimum the new minimum value for the angle newMaximum the new maximum value for the angle
Definition at line 149 of file AngleSelector.cpp.
◆ setResetAngle
|
slot |
Sets the angle that is used to reset the current angle.
- Parameters
-
newResetAngle the new angle that is used to reset the current angle
- See also
- resetAngle() const
Definition at line 129 of file AngleSelector.cpp.
◆ setSnapAngle
|
slot |
Sets the angle to which multiples the selected angle will snap.
- Parameters
-
newSnapAngle the new angle to which multiples the selected angle will snap
- See also
- snapAngle() const
Definition at line 124 of file AngleSelector.cpp.
◆ setWidgetsHeight
|
slot |
Sets the common height of the widgets inside this angle selector.
Use 0 to reset widgets to default height.
- Parameters
-
newHeight the new height of the internal widgets (angle gauge, spin box, etc.)
- See also
- widgetsHeight() const
Definition at line 174 of file AngleSelector.cpp.
◆ setWrapping
|
slot |
Sets if the angle should wrap pass the minimum or maximum angles.
- Parameters
-
newWrapping true if the angle should wrap pass the minimum or maximum angles, false otherwise
- See also
- wrapping() const
Definition at line 159 of file AngleSelector.cpp.
◆ snapAngle
|
slot |
Gets the angle to which multiples the selected angle will snap.
The default snap angle is 15 degrees so the selected angle will snap to its multiples (0, 15, 30, 45, etc.)
- Returns
- The angle to which multiples the selected angle will snap
- See also
- setSnapAngle(qreal)
Definition at line 54 of file AngleSelector.cpp.
◆ useFlatSpinBox
|
slot |
Sets if the spin box should be flat.
- Parameters
-
newUseFlatSpinBox True if the spin box should be flat, false otherwise
- See also
- isUsingFlatSpinBox() const
Definition at line 189 of file AngleSelector.cpp.
◆ widget
|
slot |
Get the internal KisAngleSelector as a QWidget, so it may be added to a UI.
- Returns
- the internal KisAngleSelector as a QWidget
Definition at line 44 of file AngleSelector.cpp.
◆ widgetsHeight
|
slot |
Gets the common height of the widgets inside this angle selector.
- Returns
- The height of the internal widgets (angle gauge, spin box, etc.). Returns 0 if each widget has its default height.
- See also
- setWidgetsHeight(int)
Definition at line 99 of file AngleSelector.cpp.
◆ wrapping
|
slot |
Gets if the angle should wrap pass the minimum or maximum angles.
- Returns
- True if the angle should wrap pass the minimum or maximum angles, false otherwise
- See also
- setWrapping(bool)
Definition at line 84 of file AngleSelector.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:16 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.