Scribus
Open source desktop publishing at your fingertips
|
Signals | |
void | deleteDone () |
void | selectionDirty () |
Public Member Functions | |
virtual void | changeEvent (QEvent *e) |
QTabWidget * | widget () |
return the QWidget for editing style's properties More... | |
QString | typeNamePlural () |
name of the style (plural) (Paragraph Styles, Character Styles...) | |
QString | typeNameSingular () |
name of the style (singular) (Paragraph Style, Character Style...) | |
void | setCurrentDoc (ScribusDoc *doc) |
Whenever style manager is shown attached StyleItems get the current doc. More... | |
QList< StyleName > | styles (bool reloadFromDoc=true) |
existing styles in this category More... | |
void | reload () |
Reload styles and remove all cached (and possibly changed ones). More... | |
void | selected (const QStringList &styleNames) |
Whenever this function is called StyleItem must update the main. More... | |
QString | fromSelection () const |
Return the name of the style in this category applied to the. More... | |
void | toSelection (const QString &styleName) const |
Apply style called styleName to the documents current selection. More... | |
QString | newStyle () |
Create a new temp. style with default values and return the. More... | |
QString | newStyle (const QString &fromStyle) |
Create a new temp. style which is a clone of the style called fromStyle. More... | |
void | apply () |
apply changes made to the currently selected style(s) More... | |
bool | isDefaultStyle (const QString &stylename) const |
returns if the style is a default style | |
void | setDefaultStyle (bool ids) |
set if the style is a default style | |
QString | shortcut (const QString &stylename) const |
returns the key combination for the style's shortcut | |
void | setShortcut (const QString &shortcut) |
set the key combination for the selected style's shortcut | |
void | deleteStyles (const QList< RemoveItem > &removeList) |
User has requested to delete all the selected styles. More... | |
void | nameChanged (const QString &newName) |
Called when the currently selected style's name has changed. | |
QString | getUniqueName (const QString &name) |
Return a unique name for a style using the base in the name. | |
void | languageChange () |
reload all the gui strings whenever this method is called | |
void | unitChange () |
document unit has been changed, upgrade widgets | |
Public Member Functions inherited from StyleItem | |
virtual void | editMode (bool isOn) |
When SM switches to or away from edit mode this function is called. More... | |
QString | typeName () |
Friends | |
class | StyleManager |
|
virtual |
apply changes made to the currently selected style(s)
When a user has edited a style (s)he can either cancel or apply changes. On cancel and ok button clicks no action is needed from the StyleItem but if a user chooses to press button apply StyleItem's function apply() is called and StyleItem must upgrade the style and apply it where ever that style is used in the document. (cancel will be disabled after this)
Implements StyleItem.
|
virtual |
User has requested to delete all the selected styles.
removeList | list of styles to be deleted. RemoveItem::first is the style to be deleted and RemoveItem::second is the style to replace the deleted style with. If no replacement was requested RemoveItem::second has been set to QString::null. |
Implements StyleItem.
|
virtual |
Return the name of the style in this category applied to the.
selected object(s) in the current document or QString::null if there is no selection in the document.
If there are multiple objects selected only return a style name if the same style is applied on all selected objects. If they doesn't share the same style then return QString::null.
Implements StyleItem.
|
virtual |
Create a new temp. style with default values and return the.
name of the newly created style.
Implements StyleItem.
|
virtual |
Create a new temp. style which is a clone of the style called fromStyle.
fromStyle | name of the style to clone |
Implements StyleItem.
|
virtual |
Reload styles and remove all cached (and possibly changed ones).
This function will be called whenever a user clicks on the reset button. Resetting styles means loading them from the doc replacing all cached styles and without applying changes to the previously cached styles.
Implements StyleItem.
|
virtual |
Whenever this function is called StyleItem must update the main.
widget with the corresponding data.
Whenever user selects a style from the style list in the manager this slot is called from the StyleItem. StyleItem must then update the main widget with the data related to the selected item and then just wait for apply() to apply the changes user made (with the main widget). When implementing this method one should note that there may be more than a single style selected.
styleNames | styles selected for editing |
Implements StyleItem.
|
virtual |
Whenever style manager is shown attached StyleItems get the current doc.
passed to them with this function.
Implements StyleItem.
|
virtual |
existing styles in this category
return the names of cached styles (even if those are changed)
reloadFromDoc | should the styles be loaded from the document or should function return currently cached and possibly changed styles |
Implements StyleItem.
|
virtual |
Apply style called styleName to the documents current selection.
styleName | name of the style to be applied to the documents current selection |
Implements StyleItem.
|
virtual |
return the QWidget for editing style's properties
This is the widget where the attributes of style are edited. It will be placed on the main tab widget's Properties page. Whenever a selected style is edited StyleItem should emit the signal selectionDirty() if it is the first time style is edited after applying previous changes.
Implements StyleItem.