|
Krita Source Code Documentation
|
#include <TextPropertyConfigModel.h>
Inheritance diagram for TextPropertyConfigModel:Classes | |
| struct | Private |
| struct | TextPropertyData |
Public Types | |
| enum | PropertyType { Character , Paragraph , Mixed } |
| enum | Roles { Visibility = Qt::UserRole + 1 , SearchTerms , Type , Name } |
| enum | VisibilityState { FollowDefault = 0 , WhenRelevant = 1 , WhenSet = 2 , AlwaysVisible = 3 , NeverVisible = 4 } |
Signals | |
| void | defaultVisibilityStateChanged () |
| void | shouldFilterChanged () |
Public Member Functions | |
| Q_INVOKABLE void | addProperty (const QString &name, const int propertyType=0, const QString title=QString(), const QString toolTip=QString(), const QString searchTerms=QString(), const int visibilityState=-1) |
| QVariant | data (const QModelIndex &index, int role) const override |
| VisibilityState | defaultVisibilityState () const |
| Q_INVOKABLE void | loadFromConfiguration () |
| bool | moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override |
| QHash< int, QByteArray > | roleNames () const override |
| int | rowCount (const QModelIndex &parent) const override |
| void | saveConfiguration () |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| void | setDefaultVisibilityState (const VisibilityState state) |
| bool | shouldFilter () const |
| TextPropertyConfigModel (QObject *parent=nullptr) | |
| Q_INVOKABLE int | visibilityStateForName (const QString &name) const |
| ~TextPropertyConfigModel () | |
Properties | |
| VisibilityState | defaultVisibilityState |
| bool | shouldFilter |
Private Attributes | |
| const QScopedPointer< Private > | d |
Definition at line 15 of file TextPropertyConfigModel.h.
| Enumerator | |
|---|---|
| Character | This property can be applied on a character level. |
| Paragraph | This property only does something when applied to a paragraph. |
| Mixed | This property can be in either. |
Definition at line 31 of file TextPropertyConfigModel.h.
| Enumerator | |
|---|---|
| Visibility | |
| SearchTerms | |
| Type | |
| Name | |
Definition at line 38 of file TextPropertyConfigModel.h.
| Enumerator | |
|---|---|
| FollowDefault | Follow the default property. |
| WhenRelevant | Show when either set or inherited. |
| WhenSet | Show only when set. |
| AlwaysVisible | Always show property. |
| NeverVisible | Never show property. |
Definition at line 22 of file TextPropertyConfigModel.h.
|
explicit |
Definition at line 35 of file TextPropertyConfigModel.cpp.
| TextPropertyConfigModel::~TextPropertyConfigModel | ( | ) |
Definition at line 41 of file TextPropertyConfigModel.cpp.
| void TextPropertyConfigModel::addProperty | ( | const QString & | name, |
| const int | propertyType = 0, | ||
| const QString | title = QString(), | ||
| const QString | toolTip = QString(), | ||
| const QString | searchTerms = QString(), | ||
| const int | visibilityState = -1 ) |
Definition at line 160 of file TextPropertyConfigModel.cpp.
|
override |
Definition at line 78 of file TextPropertyConfigModel.cpp.
References d, data(), Name, SearchTerms, Type, and Visibility.
| TextPropertyConfigModel::VisibilityState TextPropertyConfigModel::defaultVisibilityState | ( | ) | const |
Definition at line 45 of file TextPropertyConfigModel.cpp.
References d.
|
signal |
| void TextPropertyConfigModel::loadFromConfiguration | ( | ) |
Definition at line 152 of file TextPropertyConfigModel.cpp.
References d, DEFAULT_VISIBILITY_STATE, and visibilityConfigNames.
|
override |
Definition at line 120 of file TextPropertyConfigModel.cpp.
References d.
|
override |
Definition at line 131 of file TextPropertyConfigModel.cpp.
References Name, SearchTerms, Type, and Visibility.
|
override |
Definition at line 72 of file TextPropertyConfigModel.cpp.
References d.
| void TextPropertyConfigModel::saveConfiguration | ( | ) |
Definition at line 142 of file TextPropertyConfigModel.cpp.
References d, data(), DEFAULT_VISIBILITY_STATE, and visibilityConfigNames.
|
override |
Definition at line 102 of file TextPropertyConfigModel.cpp.
References d, shouldFilterChanged(), value(), and Visibility.
| void TextPropertyConfigModel::setDefaultVisibilityState | ( | const VisibilityState | state | ) |
Definition at line 49 of file TextPropertyConfigModel.cpp.
References d, defaultVisibilityStateChanged(), and shouldFilterChanged().
| bool TextPropertyConfigModel::shouldFilter | ( | ) | const |
Definition at line 57 of file TextPropertyConfigModel.cpp.
References AlwaysVisible, d, shouldFilter, WhenRelevant, and WhenSet.
|
signal |
| int TextPropertyConfigModel::visibilityStateForName | ( | const QString & | name | ) | const |
|
private |
Definition at line 81 of file TextPropertyConfigModel.h.
|
readwrite |
Definition at line 18 of file TextPropertyConfigModel.h.
|
read |
Definition at line 19 of file TextPropertyConfigModel.h.