Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

StoryEditor Class Reference

#include <story.h>

Collaboration diagram for StoryEditor:

Collaboration graph
[legend]

List of all members.

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)
ScribusDoccurrentDocument () const
PageItemcurrentItem () const

Public Attributes

SEditorEditor
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

CharSelectcharSelect
 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
PrefsManagerprefsManager
PrefsContextprefs
QMap< QString, QPointer
< ScrAction > > 
seActions
QStringList unicodeCharActionNames
MenuManagerseMenuMgr
QPixmap noIcon
QToolBar * FileTools
SToolBFontFontTools
SToolBAlignAlignTools
SToolBColorFFillTools
SToolBColorSStrokeTools
SToolBStyleStyleTools
QSplitter * EdSplit
SideBarEditorBar
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
ScribusDoccurrDoc
PageItemcurrItem
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 (  ) 

Definition at line 1428 of file story.cpp.

References savePrefs().


Member Function Documentation

void StoryEditor::changeEvent ( QEvent *  e  )  [virtual]

Definition at line 1813 of file story.cpp.

References languageChange().

void StoryEditor::setCurrentDocumentAndItem ( ScribusDoc doc = NULL,
PageItem item = NULL 
)

ScribusDoc * StoryEditor::currentDocument (  )  const

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]

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]

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]

Definition at line 3115 of file story.cpp.

References textChanged.

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]

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]

void StoryEditor::updateProps ( QTextCursor &  cur  )  [protected, slot]

Definition at line 2261 of file story.cpp.

References updateProps().

void StoryEditor::updateProps ( int  p,
int  ch 
) [protected, slot]

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]

void StoryEditor::changeStyle (  )  [protected, slot]

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]

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]

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]

Definition at line 2643 of file story.cpp.

Referenced by initActions().

void StoryEditor::Do_copy (  )  [protected, slot]

Definition at line 2661 of file story.cpp.

Referenced by initActions().

void StoryEditor::Do_paste (  )  [protected, slot]

Definition at line 2666 of file story.cpp.

Referenced by initActions().

void StoryEditor::Do_cut (  )  [protected, slot]

Definition at line 2671 of file story.cpp.

Referenced by initActions().

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]

void StoryEditor::Do_fontPrev (  )  [protected, slot]

void StoryEditor::CopyAvail ( bool  u  )  [protected, slot]

Definition at line 2687 of file story.cpp.

References seActions.

Referenced by connectSignals().

void StoryEditor::PasteAvail (  )  [protected, slot]

Definition at line 2695 of file story.cpp.

References seActions.

Referenced by connectSignals().

void StoryEditor::updateTextFrame (  )  [protected, slot]

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]

void StoryEditor::modifiedText (  )  [protected, slot]

void StoryEditor::LoadTextFile (  )  [protected, slot]

void StoryEditor::SaveTextFile (  )  [protected, slot]

void StoryEditor::setSmart ( bool  newSmartSelection  )  [protected, slot]

Definition at line 1980 of file story.cpp.

References smartSelection.

Referenced by initActions().

void StoryEditor::languageChange (  )  [protected, slot]

void StoryEditor::specialActionKeyEvent ( const QString &  actionName,
int  unicodevalue 
) [protected, slot]

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().

void StoryEditor::slot_insertUserSpecialChar ( QChar  c  )  [protected, slot]

Definition at line 2526 of file story.cpp.

References