Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgTextShortcutInfo Struct Reference

The SvgTextShortcutInfo class This. More...

+ Inheritance diagram for SvgTextShortcutInfo:

Public Types

enum  ActionType { Set , Toggle , Increase , Decrease }
 

Public Member Functions

bool operator== (const SvgTextShortcutInfo &other) const
 
 SvgTextShortcutInfo ()
 

Static Public Member Functions

static SvgTextShortcutInfo propertyChange (KoSvgTextProperties::PropertyId _propertyId, QVariant _value1, bool _increase)
 
static SvgTextShortcutInfo propertySet (KoSvgTextProperties::PropertyId _propertyId, QVariant _value1)
 
static SvgTextShortcutInfo propertyToggle (KoSvgTextProperties::PropertyId _propertyId, QVariant _value1, QVariant _value2, QVariant _testValue)
 

Public Attributes

KoSvgTextProperties::PropertyId propertyId
 
QVariant testValue
 
ActionType type
 
QVariant value1
 
QVariant value2
 

Detailed Description

The SvgTextShortcutInfo class This.

Definition at line 16 of file SvgTextShortCuts.cpp.

Member Enumeration Documentation

◆ ActionType

Enumerator
Set 

Will set value1, cannot be toggled.

Toggle 

Toggle will test "testValue", and toggle between value1 and value 2;.

Increase 
Decrease 

Definition at line 18 of file SvgTextShortCuts.cpp.

18 {
19 Set,
20 Toggle,
21 Increase, //< Will increase by value 1.
22 Decrease //< Will decrease by value 1.
23 };
@ Set
Will set value1, cannot be toggled.
@ Toggle
Toggle will test "testValue", and toggle between value1 and value 2;.

Constructor & Destructor Documentation

◆ SvgTextShortcutInfo()

SvgTextShortcutInfo::SvgTextShortcutInfo ( )
inline

Definition at line 24 of file SvgTextShortCuts.cpp.

24{}

Member Function Documentation

◆ operator==()

bool SvgTextShortcutInfo::operator== ( const SvgTextShortcutInfo & other) const
inline

Definition at line 61 of file SvgTextShortCuts.cpp.

61 {
62 return (propertyId == other.propertyId
63 && type == other.type
64 && value1 == other.value1
65 && value2 == other.value2
66 && testValue == other.testValue);
67 }
KoSvgTextProperties::PropertyId propertyId

References propertyId, testValue, type, value1, and value2.

◆ propertyChange()

static SvgTextShortcutInfo SvgTextShortcutInfo::propertyChange ( KoSvgTextProperties::PropertyId _propertyId,
QVariant _value1,
bool _increase )
inlinestatic

Definition at line 37 of file SvgTextShortCuts.cpp.

37 {
39 info.propertyId = _propertyId;
40 info.type = _increase? Increase: Decrease;
41 info.value1 = _value1;
42 return info;
43 }
The SvgTextShortcutInfo class This.

References Decrease, Increase, propertyId, type, and value1.

◆ propertySet()

static SvgTextShortcutInfo SvgTextShortcutInfo::propertySet ( KoSvgTextProperties::PropertyId _propertyId,
QVariant _value1 )
inlinestatic

Definition at line 45 of file SvgTextShortCuts.cpp.

45 {
47 info.propertyId = _propertyId;
48 info.type = Set;
49 info.value1 = _value1;
50 return info;
51 }

References propertyId, Set, type, and value1.

◆ propertyToggle()

static SvgTextShortcutInfo SvgTextShortcutInfo::propertyToggle ( KoSvgTextProperties::PropertyId _propertyId,
QVariant _value1,
QVariant _value2,
QVariant _testValue )
inlinestatic

Definition at line 26 of file SvgTextShortCuts.cpp.

27 {
29 info.propertyId = _propertyId;
30 info.type = Toggle;
31 info.value1 = _value1;
32 info.value2 = _value2;
33 info.testValue = _testValue;
34 return info;
35 }

References propertyId, testValue, Toggle, type, value1, and value2.

Member Data Documentation

◆ propertyId

KoSvgTextProperties::PropertyId SvgTextShortcutInfo::propertyId

Definition at line 53 of file SvgTextShortCuts.cpp.

◆ testValue

QVariant SvgTextShortcutInfo::testValue

Definition at line 57 of file SvgTextShortCuts.cpp.

◆ type

ActionType SvgTextShortcutInfo::type

Definition at line 54 of file SvgTextShortCuts.cpp.

◆ value1

QVariant SvgTextShortcutInfo::value1

Definition at line 55 of file SvgTextShortCuts.cpp.

◆ value2

QVariant SvgTextShortcutInfo::value2

Definition at line 56 of file SvgTextShortCuts.cpp.


The documentation for this struct was generated from the following file: