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

#include <kis_composite_progress_proxy.h>

+ Inheritance diagram for KisCompositeProgressProxy:

Public Member Functions

void addProxy (KoProgressProxy *proxy)
 
int maximum () const override
 
void removeProxy (KoProgressProxy *proxy)
 
void setAutoNestedName (const QString &name) override
 
void setFormat (const QString &format) override
 
void setRange (int minimum, int maximum) override
 
void setValue (int value) override
 
- Public Member Functions inherited from KoProgressProxy
virtual ~KoProgressProxy ()
 

Private Attributes

QList< KoProgressProxy * > m_proxies
 
QList< KoProgressProxy * > m_uniqueProxies
 

Detailed Description

Definition at line 15 of file kis_composite_progress_proxy.h.

Member Function Documentation

◆ addProxy()

void KisCompositeProgressProxy::addProxy ( KoProgressProxy * proxy)

Definition at line 11 of file kis_composite_progress_proxy.cpp.

12{
13 m_proxies.append(proxy);
14 if (!m_uniqueProxies.contains(proxy)) {
15 m_uniqueProxies.append(proxy);
16 }
17}
QList< KoProgressProxy * > m_proxies
QList< KoProgressProxy * > m_uniqueProxies

References m_proxies, and m_uniqueProxies.

◆ maximum()

int KisCompositeProgressProxy::maximum ( ) const
overridevirtual

Implements KoProgressProxy.

Definition at line 27 of file kis_composite_progress_proxy.cpp.

28{
29 if(m_proxies.isEmpty()) return 0;
30
31 return m_proxies.first()->maximum();
32}

References m_proxies.

◆ removeProxy()

void KisCompositeProgressProxy::removeProxy ( KoProgressProxy * proxy)

Definition at line 19 of file kis_composite_progress_proxy.cpp.

20{
21 m_proxies.removeOne(proxy);
22 if (!m_proxies.contains(proxy)) {
23 m_uniqueProxies.removeOne(proxy);
24 }
25}

References m_proxies, and m_uniqueProxies.

◆ setAutoNestedName()

void KisCompositeProgressProxy::setAutoNestedName ( const QString & name)
overridevirtual

Reimplemented from KoProgressProxy.

Definition at line 55 of file kis_composite_progress_proxy.cpp.

56{
57 Q_FOREACH (KoProgressProxy *proxy, m_uniqueProxies) {
58 proxy->setAutoNestedName(name);
59 }
60}
virtual void setAutoNestedName(const QString &name)

References m_uniqueProxies, and KoProgressProxy::setAutoNestedName().

◆ setFormat()

void KisCompositeProgressProxy::setFormat ( const QString & format)
overridevirtual

Implements KoProgressProxy.

Definition at line 48 of file kis_composite_progress_proxy.cpp.

49{
50 Q_FOREACH (KoProgressProxy *proxy, m_uniqueProxies) {
51 proxy->setFormat(format);
52 }
53}
virtual void setFormat(const QString &format)=0

References m_uniqueProxies, and KoProgressProxy::setFormat().

◆ setRange()

void KisCompositeProgressProxy::setRange ( int minimum,
int maximum )
overridevirtual

Implements KoProgressProxy.

Definition at line 41 of file kis_composite_progress_proxy.cpp.

42{
43 Q_FOREACH (KoProgressProxy *proxy, m_uniqueProxies) {
44 proxy->setRange(minimum, maximum);
45 }
46}
virtual void setRange(int minimum, int maximum)=0

References m_uniqueProxies, maximum(), and KoProgressProxy::setRange().

◆ setValue()

void KisCompositeProgressProxy::setValue ( int value)
overridevirtual

Implements KoProgressProxy.

Definition at line 34 of file kis_composite_progress_proxy.cpp.

35{
36 Q_FOREACH (KoProgressProxy *proxy, m_uniqueProxies) {
37 proxy->setValue(value);
38 }
39}
float value(const T *src, size_t ch)
virtual void setValue(int value)=0

References m_uniqueProxies, KoProgressProxy::setValue(), and value().

Member Data Documentation

◆ m_proxies

QList<KoProgressProxy*> KisCompositeProgressProxy::m_proxies
private

Definition at line 28 of file kis_composite_progress_proxy.h.

◆ m_uniqueProxies

QList<KoProgressProxy*> KisCompositeProgressProxy::m_uniqueProxies
private

Definition at line 29 of file kis_composite_progress_proxy.h.


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