StoryEditor Class Reference
#include <story.h>

Public Slots | |
| void | newAlign (int st) |
| void | newTxFill (int c, int s) |
| void | newTxStroke (int c, int s) |
| void | newTxFont (const QString &f) |
| void | newTxSize (double s) |
| void | newTxStyle (int s) |
Signals | |
| void | DocChanged () |
| void | EditSt () |
Public Member Functions | |
| StoryEditor (QWidget *parent) | |
| ~StoryEditor () | |
| virtual void | changeEvent (QEvent *e) |
| void | setCurrentDocumentAndItem (ScribusDoc *doc=NULL, PageItem *item=NULL) |
| ScribusDoc * | currentDocument () const |
| PageItem * | currentItem () const |
Public Attributes | |
| SEditor * | Editor |
| bool | activFromApp |
Protected Slots | |
| void | setBackPref () |
| void | setFontPref () |
| void | newTxScale () |
| void | newTxScaleV () |
| void | newTxKern (double s) |
| void | newShadowOffs (double x, double y) |
| void | newTxtOutline (double o) |
| void | newTxtUnderline (double p, double w) |
| void | newTxtStrike (double p, double w) |
| void | updateProps () |
| void | updateProps (QTextCursor &cur) |
| void | updateProps (int p, int ch) |
| void | newStyle (const QString &) |
| void | changeStyleSB (int pa, const QString &) |
| void | changeStyle () |
| void | updateStatus () |
| void | Do_leave () |
| void | Do_leave2 () |
| void | Do_saveDocument () |
| Saves the document with editation continued. Signal called from menu. | |
| bool | Do_new () |
| void | slotFileRevert () |
| void | Do_selectAll () |
| void | Do_copy () |
| void | Do_paste () |
| void | Do_cut () |
| void | Do_del () |
| void | Do_insSp () |
| void | Do_fontPrev () |
| void | CopyAvail (bool u) |
| void | PasteAvail () |
| void | updateTextFrame () |
| void | SearchText () |
| void | slotEditStyles () |
| void | modifiedText () |
| void | LoadTextFile () |
| void | SaveTextFile () |
| void | setSmart (bool) |
| void | languageChange () |
| void | specialActionKeyEvent (const QString &actionName, int unicodevalue) |
| void | slot_insertSpecialChar () |
| Slot to insert special characters from charSelect widget. | |
| void | slot_insertUserSpecialChar (QChar) |
| void | doubleClick (int para, int pos) |
Protected Member Functions | |
| void | initActions () |
| void | updateUnicodeActions () |
| void | buildMenus () |
| void | buildGUI () |
| void | connectSignals () |
| void | disconnectSignals () |
| void | loadPrefs () |
| Loading the preferences (position). It's in separate method due the 2 constructors. | |
| void | savePrefs () |
| Saving the preferences (position). | |
| void | showEvent (QShowEvent *) |
| void | hideEvent (QHideEvent *) |
| void | closeEvent (QCloseEvent *) |
| void | keyPressEvent (QKeyEvent *e) |
| bool | eventFilter (QObject *ob, QEvent *ev) |
Protected Attributes | |
| CharSelect * | charSelect |
| Special Characters dialog. It uses a little bit ugly method to operate with. It's a duplication of the main window's charPalette due the lack of setParent() in qt3 and a ugly behaviour of the reparent(). charSelect is created as a copy of the charPalette. | |
| bool | charSelectUsed |
| QHBoxLayout * | StoryEd2Layout |
| QGridLayout * | ButtonGroup1Layout |
| QGridLayout * | ButtonGroup2Layout |
| PrefsManager * | prefsManager |
| PrefsContext * | prefs |
| QMap< QString, QPointer < ScrAction > > | seActions |
| QStringList | unicodeCharActionNames |
| MenuManager * | seMenuMgr |
| QPixmap | noIcon |
| QToolBar * | FileTools |
| SToolBFont * | FontTools |
| SToolBAlign * | AlignTools |
| SToolBColorF * | FillTools |
| SToolBColorS * | StrokeTools |
| SToolBStyle * | StyleTools |
| QSplitter * | EdSplit |
| SideBar * | EditorBar |
| QFrame * | ButtonGroup1 |
| QFrame * | ButtonGroup2 |
| QLabel * | WordCT1 |
| QLabel * | WordCT3 |
| QLabel * | ParCT |
| QLabel * | ParC |
| QLabel * | WordCT |
| QLabel * | WordC |
| QLabel * | CharCT |
| QLabel * | CharC |
| QLabel * | WordCT2 |
| QLabel * | WordC2 |
| QLabel * | CharCT2 |
| QLabel * | CharC2 |
Private Member Functions | |
| void | changeAlign (int align) |
| bool | textDataChanged () const |
Private Attributes | |
| int | result |
| bool | smartSelection |
| Enables/disables the "smart" selection (#1203) - 10/16/2004 pv. | |
| int | smartSel |
| ScribusDoc * | currDoc |
| PageItem * | currItem |
| bool | textChanged |
| bool | firstSet |
| bool | blockUpdate |
| int | CurrPara |
| int | CurrChar |
Friends | |
| class | SEditor |
Detailed Description
Definition at line 373 of file story.h.
Constructor & Destructor Documentation
| StoryEditor::StoryEditor | ( | QWidget * | parent | ) |
Definition at line 1401 of file story.cpp.
References buildGUI(), PrefsManager::instance(), loadIcon(), loadPrefs(), noIcon, and prefsManager.
| StoryEditor::~StoryEditor | ( | ) |
Member Function Documentation
| void StoryEditor::changeEvent | ( | QEvent * | e | ) | [virtual] |
| void StoryEditor::setCurrentDocumentAndItem | ( | ScribusDoc * | doc = NULL, |
|
| PageItem * | item = NULL | |||
| ) |
Definition at line 1920 of file story.cpp.
References AlignTools, connectSignals(), currDoc, currItem, data, disconnectSignals(), SideBar::doRepaint(), EditorBar, FillTools, firstSet, SToolBFont::Fonts, FontTools, PageItem::isAnnotation(), PageItem::itemName, SideBar::offs, SToolBAlign::paraStyleCombo, FontCombo::RebuildList(), seActions, SToolBColorF::setCurrentDocument(), SToolBColorS::setCurrentDocument(), ParaStyleComboBox::setDoc(), SideBar::setRepaint(), StrokeTools, textChanged, tr(), updateProps(), and updateStatus().
Referenced by closeEvent(), Do_leave(), Do_leave2(), and ScribusDoc::itemSelection_DeleteItem().
| ScribusDoc * StoryEditor::currentDocument | ( | ) | const |
Definition at line 3125 of file story.cpp.
References currDoc.
Referenced by ScribusWin::closeEvent(), ScribusMainWindow::DoFileClose(), ScribusDoc::itemSelection_DeleteItem(), ScribusMainWindow::slotEditCut(), and ScribusMainWindow::slotFileRevert().
| PageItem * StoryEditor::currentItem | ( | ) | const |
Definition at line 3120 of file story.cpp.
References currItem.
Referenced by ScribusDoc::itemSelection_DeleteItem(), and ScribusMainWindow::slotEditCut().
| void StoryEditor::newAlign | ( | int | st | ) | [slot] |
Definition at line 2816 of file story.cpp.
References changeAlign().
Referenced by connectSignals(), and SearchReplace::slotDoReplace().
| void StoryEditor::newTxFill | ( | int | c, | |
| int | s | |||
| ) | [slot] |
Definition at line 2099 of file story.cpp.
References FillTools, modifiedText(), and SToolBColorF::TxFill.
Referenced by connectSignals(), and SearchReplace::slotDoReplace().
| void StoryEditor::newTxStroke | ( | int | c, | |
| int | s | |||
| ) | [slot] |
Definition at line 2113 of file story.cpp.
References modifiedText(), StrokeTools, and SToolBColorS::TxStroke.
Referenced by connectSignals(), and SearchReplace::slotDoReplace().
| void StoryEditor::newTxFont | ( | const QString & | f | ) | [slot] |
Definition at line 2127 of file story.cpp.
References ScribusDoc::AddFont(), ScribusDoc::AllFonts, currDoc, SToolBFont::Fonts, FontTools, modifiedText(), FontCombo::RebuildList(), updateUnicodeActions(), and ScribusDoc::UsedFonts.
Referenced by connectSignals(), Do_fontPrev(), and SearchReplace::slotDoReplace().
| void StoryEditor::newTxSize | ( | double | s | ) | [slot] |
Definition at line 2146 of file story.cpp.
References modifiedText().
Referenced by connectSignals(), and SearchReplace::slotDoReplace().
| void StoryEditor::newTxStyle | ( | int | s | ) | [slot] |
Definition at line 2156 of file story.cpp.
References modifiedText(), SToolBColorS::PM1, ScStyle_Outline, ScStyle_Shadowed, CharStyle::setStyle(), StrokeTools, and SToolBColorS::TxStroke.
Referenced by connectSignals(), and SearchReplace::slotDoReplace().
| void StoryEditor::DocChanged | ( | ) | [signal] |
Referenced by updateTextFrame().
| void StoryEditor::EditSt | ( | ) | [signal] |
| void StoryEditor::changeAlign | ( | int | align | ) | [private] |
Definition at line 2987 of file story.cpp.
References SideBar::doRepaint(), EditorBar, modifiedText(), newStyle(), p, textChanged, and updateProps().
Referenced by newAlign().
| bool StoryEditor::textDataChanged | ( | ) | const [private] |
| void StoryEditor::setBackPref | ( | ) | [protected, slot] |
Definition at line 2073 of file story.cpp.
References PrefsManager::appPrefs, blockUpdate, prefsManager, and ApplicationPrefs::STEcolor.
Referenced by initActions().
| void StoryEditor::setFontPref | ( | ) | [protected, slot] |
Definition at line 2090 of file story.cpp.
References PrefsManager::appPrefs, blockUpdate, SideBar::doRepaint(), EditorBar, prefsManager, and ApplicationPrefs::STEfont.
Referenced by initActions().
| void StoryEditor::newTxScale | ( | ) | [protected, slot] |
Definition at line 2177 of file story.cpp.
References SToolBFont::ChScale, FontTools, and modifiedText().
Referenced by connectSignals().
| void StoryEditor::newTxScaleV | ( | ) | [protected, slot] |
Definition at line 2188 of file story.cpp.
References SToolBFont::ChScaleV, FontTools, and modifiedText().
Referenced by connectSignals().
| void StoryEditor::newTxKern | ( | double | s | ) | [protected, slot] |
Definition at line 2199 of file story.cpp.
References modifiedText().
Referenced by connectSignals().
| void StoryEditor::newShadowOffs | ( | double | x, | |
| double | y | |||
| ) | [protected, slot] |
Definition at line 2209 of file story.cpp.
References modifiedText().
Referenced by connectSignals().
| void StoryEditor::newTxtOutline | ( | double | o | ) | [protected, slot] |
Definition at line 2221 of file story.cpp.
References modifiedText().
Referenced by connectSignals().
| void StoryEditor::newTxtUnderline | ( | double | p, | |
| double | w | |||
| ) | [protected, slot] |
Definition at line 2231 of file story.cpp.
References modifiedText().
Referenced by connectSignals().
| void StoryEditor::newTxtStrike | ( | double | p, | |
| double | w | |||
| ) | [protected, slot] |
Definition at line 2243 of file story.cpp.
References modifiedText().
Referenced by connectSignals().
| void StoryEditor::updateProps | ( | ) | [protected, slot] |
Definition at line 2255 of file story.cpp.
Referenced by changeAlign(), changeStyle(), changeStyleSB(), connectSignals(), Do_new(), doubleClick(), setCurrentDocumentAndItem(), SearchReplace::slotDoSearch(), and updateProps().
| void StoryEditor::updateProps | ( | QTextCursor & | cur | ) | [protected, slot] |
| void StoryEditor::updateProps | ( | int | p, | |
| int | ch | |||
| ) | [protected, slot] |
Definition at line 2269 of file story.cpp.
References AlignTools, ParagraphStyle::charStyle(), StoryText::charStyle(), currDoc, currItem, StoryText::defaultStyle(), FillTools, firstSet, FontTools, PageItem::itemText, CommonStrings::None, ScribusDoc::PageColors, SToolBColorS::PM1, ScStyle_Outline, ScStyle_Shadowed, SToolBAlign::SetAlign(), SToolBColorS::SetColor(), SToolBColorF::SetColor(), SToolBFont::SetFont(), SToolBStyle::SetKern(), SToolBStyle::setOutline(), SToolBAlign::SetParaStyle(), SToolBFont::SetScale(), SToolBFont::SetScaleV(), SToolBColorF::SetShade(), SToolBColorS::SetShade(), SToolBStyle::SetShadow(), SToolBFont::SetSize(), SToolBStyle::setStrike(), SToolBStyle::SetStyle(), SToolBStyle::setUnderline(), StrokeTools, StyleTools, SToolBColorS::TxStroke, updateStatus(), and updateUnicodeActions().
| void StoryEditor::newStyle | ( | const QString & | name | ) | [protected, slot] |
Definition at line 2823 of file story.cpp.
References changeStyle().
Referenced by changeAlign(), changeStyle(), changeStyleSB(), and connectSignals().
| void StoryEditor::changeStyleSB | ( | int | pa, | |
| const QString & | name | |||
| ) | [protected, slot] |
Definition at line 2830 of file story.cpp.
References ParagraphStyle::charStyle(), currDoc, SideBar::doRepaint(), EditorBar, CharStyle::effects(), CharStyle::font, StyleSet< STYLE >::get(), modifiedText(), newStyle(), ScribusDoc::paragraphStyles(), SToolBColorS::PM1, ScStyle_Outline, ScStyle_Shadowed, Style::setParent(), CharStyle::setStyle(), StrokeTools, textChanged, SToolBColorS::TxStroke, and updateProps().
Referenced by connectSignals().
| void StoryEditor::changeStyle | ( | ) | [protected, slot] |
Definition at line 2900 of file story.cpp.
References ParagraphStyle::charStyle(), currDoc, SideBar::doRepaint(), EditorBar, CharStyle::effects(), CharStyle::font, StyleSet< STYLE >::get(), modifiedText(), newStyle(), p, ScribusDoc::paragraphStyles(), SToolBColorS::PM1, ScStyle_Outline, ScStyle_Shadowed, Style::setParent(), CharStyle::setStyle(), StrokeTools, textChanged, SToolBColorS::TxStroke, and updateProps().
Referenced by newStyle().
| void StoryEditor::updateStatus | ( | ) | [protected, slot] |
Definition at line 2474 of file story.cpp.
References CharC, CharC2, p, ParC, WordC, and WordC2.
Referenced by Do_new(), eventFilter(), modifiedText(), setCurrentDocumentAndItem(), slotFileRevert(), and updateProps().
| void StoryEditor::Do_leave | ( | ) | [protected, slot] |
Definition at line 2567 of file story.cpp.
References blockUpdate, currDoc, result, setCurrentDocumentAndItem(), textChanged, tr(), CommonStrings::trWarning, and ScMessageBox::warning().
Referenced by initActions().
| void StoryEditor::Do_leave2 | ( | ) | [protected, slot] |
Definition at line 2558 of file story.cpp.
References blockUpdate, currDoc, result, setCurrentDocumentAndItem(), and updateTextFrame().
Referenced by initActions().
| void StoryEditor::Do_saveDocument | ( | ) | [protected, slot] |
Saves the document with editation continued. Signal called from menu.
Definition at line 2588 of file story.cpp.
References blockUpdate, ScribusCore::primaryMainWindow(), ScCore, ScribusMainWindow::slotFileSave(), and updateTextFrame().
Referenced by initActions().
| bool StoryEditor::Do_new | ( | ) | [protected, slot] |
Definition at line 2596 of file story.cpp.
References blockUpdate, SideBar::doRepaint(), EditorBar, seActions, SideBar::setRepaint(), tr(), CommonStrings::trWarning, updateProps(), updateStatus(), and ScMessageBox::warning().
Referenced by initActions(), LoadTextFile(), and slotFileRevert().
| void StoryEditor::slotFileRevert | ( | ) | [protected, slot] |
Definition at line 2630 of file story.cpp.
References currItem, Do_new(), SideBar::doRepaint(), EditorBar, SideBar::setRepaint(), and updateStatus().
Referenced by initActions().
| void StoryEditor::Do_selectAll | ( | ) | [protected, slot] |
| void StoryEditor::Do_copy | ( | ) | [protected, slot] |
| void StoryEditor::Do_paste | ( | ) | [protected, slot] |
| void StoryEditor::Do_cut | ( | ) | [protected, slot] |
| void StoryEditor::Do_del | ( | ) | [protected, slot] |
Definition at line 2676 of file story.cpp.
References SideBar::doRepaint(), EditorBar, and SideBar::setRepaint().
Referenced by initActions().
| void StoryEditor::Do_insSp | ( | ) | [protected, slot] |
Definition at line 2507 of file story.cpp.
References charSelect, charSelectUsed, currDoc, CharSelect::setDoc(), CharSelect::setEnabled(), and CharSelect::show().
Referenced by initActions().
| void StoryEditor::Do_fontPrev | ( | ) | [protected, slot] |
Definition at line 2533 of file story.cpp.
References blockUpdate, currDoc, FontTools, PluginManager::getPlugin(), PluginManager::instance(), newTxFont(), result, ScActionPlugin::run(), ScActionPlugin::runResult(), and SToolBFont::SetFont().
Referenced by initActions().
| void StoryEditor::CopyAvail | ( | bool | u | ) | [protected, slot] |
| void StoryEditor::PasteAvail | ( | ) | [protected, slot] |
| void StoryEditor::updateTextFrame | ( | ) | [protected, slot] |
Definition at line 2700 of file story.cpp.
References PageItem::asTextFrame(), StoryText::clear(), PageItem::CPos, currDoc, currItem, PageItem::Dirty, DocChanged(), ScribusView::DrawNew(), PageItem::firstInFrame(), ScribusDoc::FrameItems, PageItem::invalidateLayout(), StoryText::item(), PageItem::itemText, PageItem::lastInFrame(), PageItem::layout(), PageItem::nextInChain(), SpecialChars::OBJECT, PageItem::prevInChain(), ScribusCore::primaryMainWindow(), ScCore, seActions, StoryText::text(), textChanged, ScribusDoc::updateFrameItems(), and ScribusMainWindow::view.
Referenced by closeEvent(), Do_leave2(), Do_saveDocument(), eventFilter(), and initActions().
| void StoryEditor::SearchText | ( | ) | [protected, slot] |
Definition at line 2798 of file story.cpp.
References blockUpdate, currDoc, currItem, SideBar::doRepaint(), EditorBar, and SideBar::setRepaint().
Referenced by initActions().
| void StoryEditor::slotEditStyles | ( | ) | [protected, slot] |
Definition at line 2811 of file story.cpp.
References ScrPaletteBase::exec(), ScribusCore::primaryMainWindow(), ScCore, and ScribusMainWindow::styleMgr().
Referenced by connectSignals(), and initActions().
| void StoryEditor::modifiedText | ( | ) | [protected, slot] |
Definition at line 3042 of file story.cpp.
References firstSet, seActions, textChanged, and updateStatus().
Referenced by changeAlign(), changeStyle(), changeStyleSB(), connectSignals(), newShadowOffs(), newTxFill(), newTxFont(), newTxKern(), newTxScale(), newTxScaleV(), newTxSize(), newTxStroke(), newTxStyle(), newTxtOutline(), newTxtStrike(), newTxtUnderline(), and specialActionKeyEvent().
| void StoryEditor::LoadTextFile | ( | ) | [protected, slot] |
Definition at line 3052 of file story.cpp.
References currItem, Do_new(), PrefsManager::documentDir(), SideBar::doRepaint(), EditorBar, fdExistingFiles, fdShowCodecs, PrefsContext::get(), PrefsFile::getContext(), PrefsManager::prefsFile, prefsManager, Serializer::readWithEncoding(), seActions, CustomFDialog::selectedFile(), PrefsContext::set(), SideBar::setRepaint(), tr(), and CustomFDialog::TxCodeM.
Referenced by initActions().
| void StoryEditor::SaveTextFile | ( | ) | [protected, slot] |
Definition at line 3089 of file story.cpp.
References PrefsManager::appPrefs, blockUpdate, ApplicationPrefs::DocDir, fdShowCodecs, PrefsContext::get(), PrefsFile::getContext(), PrefsManager::prefsFile, prefsManager, CustomFDialog::selectedFile(), PrefsContext::set(), tr(), CustomFDialog::TxCodeM, and Serializer::writeWithEncoding().
Referenced by initActions().
| void StoryEditor::setSmart | ( | bool | newSmartSelection | ) | [protected, slot] |
| void StoryEditor::languageChange | ( | ) | [protected, slot] |
Definition at line 1823 of file story.cpp.
References CharCT, CharCT2, FileTools, ActionManager::languageChangeUnicodeActions(), ParCT, seActions, seMenuMgr, MenuManager::setText(), tr(), WordCT, WordCT1, WordCT2, and WordCT3.
Referenced by buildGUI(), and changeEvent().
| void StoryEditor::specialActionKeyEvent | ( | const QString & | actionName, | |
| int | unicodevalue | |||
| ) | [protected, slot] |
Definition at line 3130 of file story.cpp.
References SideBar::doRepaint(), EditorBar, modifiedText(), seActions, and SideBar::setRepaint().
| void StoryEditor::slot_insertSpecialChar | ( | ) | [protected, slot] |
Slot to insert special characters from charSelect widget.
Definition at line 2518 of file story.cpp.
References blockUpdate, charSelect, and CharSelect::getCharacters().
Referenced by hideEvent(), and showEvent().
