#include <ChangeFollower.h>
Fonctions membres publiques | |
ChangeFollower (QTextDocument *parent, KoStyleManager *manager) | |
~ChangeFollower () | |
Destructor, called when the parant is deleted. | |
void | processUpdates (const QList< int > &changedStyles) |
const QTextDocument * | document () const |
return the document this follower is following. | |
Attributs privés | |
QTextDocument * | m_document |
QPointer< KoStyleManager > | m_styleManager |
Définition à la ligne 33 du fichier ChangeFollower.h.
ChangeFollower::ChangeFollower | ( | QTextDocument * | parent, | |
KoStyleManager * | manager | |||
) |
Create a new ChangeFollower that can update the document with any changes made in the styles managed by the style manager. This class is created by the KoStyleManager to proxy for a document. The reason this is a proxy class instead of simply a couple of methods inside KoStyleManager is for memory management. A stylemanager can maintain a lot of documents and these documents can be deleted without telling the styleManager. We use the QObject principle of children getting deleted when the parant gets deleted to track the document, which we use as the parant document.
Définition à la ligne 29 du fichier ChangeFollower.cpp.
ChangeFollower::~ChangeFollower | ( | ) |
Destructor, called when the parant is deleted.
Définition à la ligne 36 du fichier ChangeFollower.cpp.
Références m_styleManager.
void ChangeFollower::processUpdates | ( | const QList< int > & | changedStyles | ) |
Will update all the text in the document with the changes. The document this follower is associated with is scanned for text that has one of the changed styles and on those portions of the text the style will be (re)applied.
changedStyles | a list of styleIds. from KoParagraphStyle::styleId and KoCharacterStyle::styleId |
Définition à la ligne 41 du fichier ChangeFollower.cpp.
Références KoCharacterStyle::applyStyle(), KoParagraphStyle::applyStyle(), m_document, m_styleManager, KoCharacterStyle::StyleId, et KoParagraphStyle::StyleId.
Référencé par KoStyleManager::updateAlteredStyles().
Voici le graphe d'appel pour cette fonction :
const QTextDocument* ChangeFollower::document | ( | ) | const [inline] |
return the document this follower is following.
Définition à la ligne 60 du fichier ChangeFollower.h.
Références m_document.
Référencé par KoStyleManager::add(), et KoStyleManager::remove().
Voici le graphe d'appel pour cette fonction :
QTextDocument* ChangeFollower::m_document [private] |
Définition à la ligne 63 du fichier ChangeFollower.h.
Référencé par document(), et processUpdates().
QPointer<KoStyleManager> ChangeFollower::m_styleManager [private] |
Définition à la ligne 64 du fichier ChangeFollower.h.
Référencé par processUpdates(), et ~ChangeFollower().