Krita Source Code Documentation
Loading...
Searching...
No Matches
KisResourceItemChooserSync Class Reference

#include <KisResourceItemChooserSync.h>

+ Inheritance diagram for KisResourceItemChooserSync:

Signals

void baseLengthChanged (int length)
 

Public Member Functions

int baseLength ()
 
 KisResourceItemChooserSync ()
 
void setBaseLength (int length)
 
 ~KisResourceItemChooserSync () override
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Static Public Member Functions

static KisResourceItemChooserSyncinstance ()
 

Public Attributes

int baseLength
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Private Member Functions

 KisResourceItemChooserSync (const KisResourceItemChooserSync &)
 
KisResourceItemChooserSync operator= (const KisResourceItemChooserSync &)
 

Private Attributes

const QScopedPointer< Privated
 

Detailed Description

KisResourceItemChooserSync is a singleton that syncs the size of entries in the resource item choosers between different choosers To use the syncing it has to be turned on in the KisResourceItemChooser

Definition at line 14 of file KisResourceItemChooserSync.cpp.

Constructor & Destructor Documentation

◆ KisResourceItemChooserSync() [1/2]

KisResourceItemChooserSync::KisResourceItemChooserSync ( )

Definition at line 20 of file KisResourceItemChooserSync.cpp.

21 : d(new Private)
22{
23 d->baseLength = 50;
24}
const QScopedPointer< Private > d

References d.

◆ ~KisResourceItemChooserSync()

KisResourceItemChooserSync::~KisResourceItemChooserSync ( )
override

Definition at line 26 of file KisResourceItemChooserSync.cpp.

27{
28}

◆ KisResourceItemChooserSync() [2/2]

KisResourceItemChooserSync::KisResourceItemChooserSync ( const KisResourceItemChooserSync & )
private

Member Function Documentation

◆ baseLength()

int KisResourceItemChooserSync::baseLength ( )

Gets the base length

Returns
the base length of items

◆ baseLengthChanged

void KisResourceItemChooserSync::baseLengthChanged ( int length)
signal

Signal is emitted when the base length is changed and will trigger and update in the resource item choosers

◆ instance()

KisResourceItemChooserSync * KisResourceItemChooserSync::instance ( )
static

Definition at line 30 of file KisResourceItemChooserSync.cpp.

31{
32 return s_instance;
33}

◆ operator=()

KisResourceItemChooserSync KisResourceItemChooserSync::operator= ( const KisResourceItemChooserSync & )
private

◆ setBaseLength()

void KisResourceItemChooserSync::setBaseLength ( int length)

Set the base length

Parameters
lengthbase length for the items, will be clamped if outside range

Definition at line 40 of file KisResourceItemChooserSync.cpp.

41{
42 d->baseLength = qBound(25, length, 100);
43 Q_EMIT baseLengthChanged(d->baseLength);
44}
qreal length(const QPointF &vec)
Definition Ellipse.cc:82
void baseLengthChanged(int length)

References baseLengthChanged(), d, and length().

Member Data Documentation

◆ baseLength

int KisResourceItemChooserSync::baseLength

Definition at line 16 of file KisResourceItemChooserSync.cpp.

◆ d

const QScopedPointer<Private> KisResourceItemChooserSync::d
private

Definition at line 50 of file KisResourceItemChooserSync.h.


The documentation for this class was generated from the following files: