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

The KoFontChangeTracker class This class keeps track of the paths FontConfig is looking at, and resets the font registry if they change. More...

#include <KoFontChangeTracker.h>

+ Inheritance diagram for KoFontChangeTracker:

Classes

struct  Private
 

Signals

void sigUpdateConfig ()
 

Public Member Functions

 KoFontChangeTracker (QStringList paths, QObject *parent=nullptr)
 
void resetChangeTracker ()
 This should be called after fontregistry initialization is done to start the signal compressor.
 
 ~KoFontChangeTracker ()
 

Private Slots

void directoriesChanged (QString path)
 

Private Attributes

QScopedPointer< Privated
 

Detailed Description

The KoFontChangeTracker class This class keeps track of the paths FontConfig is looking at, and resets the font registry if they change.

Definition at line 16 of file KoFontChangeTracker.h.

Constructor & Destructor Documentation

◆ KoFontChangeTracker()

KoFontChangeTracker::KoFontChangeTracker ( QStringList paths,
QObject * parent = nullptr )
explicit

Definition at line 24 of file KoFontChangeTracker.cpp.

25 : QObject(parent)
26 , d(new Private(paths))
27{
28 connect(&d->fileSystemWatcher, SIGNAL(directoryChanged(QString)), SLOT(directoriesChanged(QString)));
29}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
QScopedPointer< Private > d
void directoriesChanged(QString path)

References connect(), d, and directoriesChanged().

◆ ~KoFontChangeTracker()

KoFontChangeTracker::~KoFontChangeTracker ( )

Definition at line 31 of file KoFontChangeTracker.cpp.

32{
33}

Member Function Documentation

◆ directoriesChanged

void KoFontChangeTracker::directoriesChanged ( QString path)
privateslot

Definition at line 41 of file KoFontChangeTracker.cpp.

42{
43 if (!d->filesChanged) {
44 d->filesChanged = true;
45 emit (sigUpdateConfig());
46 }
47}

References d, and sigUpdateConfig().

◆ resetChangeTracker()

void KoFontChangeTracker::resetChangeTracker ( )

This should be called after fontregistry initialization is done to start the signal compressor.

Definition at line 35 of file KoFontChangeTracker.cpp.

36{
37 d->filesChanged = false;
38}

References d.

◆ sigUpdateConfig

void KoFontChangeTracker::sigUpdateConfig ( )
signal

Member Data Documentation

◆ d

QScopedPointer<Private> KoFontChangeTracker::d
private

Definition at line 31 of file KoFontChangeTracker.h.


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