okular
documentcommands.cpp
Go to the documentation of this file.
21 AddAnnotationCommand::AddAnnotationCommand( Okular::DocumentPrivate * docPriv, Okular::Annotation* annotation, int pageNumber )
51 RemoveAnnotationCommand::RemoveAnnotationCommand(Okular::DocumentPrivate * doc, Okular::Annotation* annotation, int pageNumber)
91 setText(i18nc("Modify an annotation's internal properties (Color, line-width, etc.)", "modify annotation properties"));
173 // If There was a selection then edit was not a simple single character backspace, delete, or insert
180 newContentsLeftOfCursor() == oldContentsLeftOfCursor().left(oldContentsLeftOfCursor().length() - 1) &&
187 newContentsRightOfCursor() == oldContentsRightOfCursor().right(oldContentsRightOfCursor().length() - 1) &&
194 newContentsLeftOfCursor().left( newContentsLeftOfCursor().length() - 1) == oldContentsLeftOfCursor() &&
264 emit m_docPriv->m_parent->annotationContentsChangedByUndoRedo( m_annotation, m_prevContents, m_prevCursorPos, m_prevAnchorPos );
270 emit m_docPriv->m_parent->annotationContentsChangedByUndoRedo( m_annotation, m_newContents, m_newCursorPos, m_newCursorPos );
311 m_doc->formTextChangedByUndoRedo( m_pageNumber, m_form, m_prevContents, m_prevCursorPos, m_prevAnchorPos );
317 m_doc->formTextChangedByUndoRedo( m_pageNumber, m_form, m_newContents, m_newCursorPos, m_newCursorPos );
407 m_doc->formComboChangedByUndoRedo( m_pageNumber, m_form, m_prevContents, m_prevCursorPos, m_prevAnchorPos );
420 m_doc->formComboChangedByUndoRedo( m_pageNumber, m_form, m_newContents, m_newCursorPos, m_newCursorPos );
virtual void setEditChoice(const QString &text)
Sets the text entered into an editable combo box choice field.
Definition: form.cpp:247
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition: area.h:47
virtual bool mergeWith(const QUndoCommand *uc)
Definition: documentcommands.cpp:278
void performAddPageAnnotation(int page, Annotation *annotation)
Definition: document.cpp:1035
EditFormComboCommand(Okular::Document *doc, FormFieldChoice *form, int pageNumber, const QString &newText, int newCursorPos, const QString &prevText, int prevCursorPos, int prevAnchorPos)
Definition: documentcommands.cpp:365
RemoveAnnotationCommand(Okular::DocumentPrivate *doc, Okular::Annotation *annotation, int pageNumber)
Definition: documentcommands.cpp:51
void formListChangedByUndoRedo(int page, Okular::FormFieldChoice *form, const QList< int > &choices)
This signal is emmitted whenever the selected choices for the given list form on the given page are c...
Okular::NormalizedPoint minusDelta()
Definition: documentcommands.cpp:153
TranslateAnnotationCommand(Okular::DocumentPrivate *docPriv, Okular::Annotation *annotation, int pageNumber, const Okular::NormalizedPoint &delta, bool completeDrag)
Definition: documentcommands.cpp:106
virtual int id() const
Definition: documentcommands.cpp:273
void translate(const NormalizedPoint &coord)
Move the annotation by the specified coordinates.
Definition: annotations.cpp:622
virtual void redo()
Definition: documentcommands.cpp:100
void performSetAnnotationContents(const QString &newContents, Annotation *annot, int pageNumber)
Definition: document.cpp:1150
virtual ~AddAnnotationCommand()
Definition: documentcommands.cpp:30
EditAnnotationContentsCommand(Okular::DocumentPrivate *docPriv, Okular::Annotation *annotation, int pageNumber, const QString &newContents, int newCursorPos, const QString &prevContents, int prevCursorPos, int prevAnchorPos)
Definition: documentcommands.cpp:245
void annotationContentsChangedByUndoRedo(Okular::Annotation *annotation, const QString &contents, int cursorPos, int anchorPos)
This signal is emmitted whenever the contents of the given annotation are changed by an undo or redo ...
ModifyAnnotationPropertiesCommand(Okular::DocumentPrivate *docPriv, Okular::Annotation *annotation, int pageNumber, QDomNode oldProperties, QDomNode newProperties)
Definition: documentcommands.cpp:80
virtual QStringList choices() const =0
The possible choices of the choice field.
virtual void setCurrentChoices(const QList< int > &choices)
Sets the selected choices to choices .
Definition: form.cpp:238
EditFormListCommand(Okular::Document *doc, FormFieldChoice *form, int pageNumber, const QList< int > &newChoices, const QList< int > &prevChoices)
Definition: documentcommands.cpp:339
AddAnnotationCommand(Okular::DocumentPrivate *docPriv, Okular::Annotation *annotation, int pageNumber)
Definition: documentcommands.cpp:21
Definition: document_p.h:83
virtual bool mergeWith(const QUndoCommand *uc)
Definition: documentcommands.cpp:207
void performRemovePageAnnotation(int page, Annotation *annotation)
Definition: document.cpp:1068
void formComboChangedByUndoRedo(int page, Okular::FormFieldChoice *form, const QString &text, int cursorPos, int anchorPos)
This signal is emmitted whenever the active text for the given combo form on the given page is change...
virtual void setState(bool state)
Sets the state of the button to the new state .
Definition: form.cpp:110
Annotation struct holds properties shared by all annotations.
Definition: annotations.h:90
virtual void setText(const QString &text)
Sets the new text in the text field.
Definition: form.cpp:148
void performModifyPageAnnotation(int page, Annotation *annotation, bool appearanceChanged)
Definition: document.cpp:1106
virtual ~RemoveAnnotationCommand()
Definition: documentcommands.cpp:60
virtual bool mergeWith(const QUndoCommand *uc)
Definition: documentcommands.cpp:428
void formButtonsChangedByUndoRedo(int page, const QList< Okular::FormFieldButton * > &formButtons)
This signal is emmitted whenever the state of the specified group of form buttons (formButtons) on th...
virtual bool mergeWith(const QUndoCommand *uc)
Definition: documentcommands.cpp:325
virtual bool mergeWith(const QUndoCommand *uc)
Definition: documentcommands.cpp:137
void formTextChangedByUndoRedo(int page, Okular::FormFieldText *form, const QString &contents, int cursorPos, int anchorPos)
This signal is emmitted whenever the text contents of the given text form on the given page are chang...
EditFormTextCommand(Okular::Document *doc, Okular::FormFieldText *form, int pageNumber, const QString &newContents, int newCursorPos, const QString &prevContents, int prevCursorPos, int prevAnchorPos)
Definition: documentcommands.cpp:292
EditFormButtonsCommand(Okular::Document *doc, int pageNumber, const QList< FormFieldButton * > &formButtons, const QList< bool > &newButtonStates)
Definition: documentcommands.cpp:447
EditTextCommand(const QString &newContents, int newCursorPos, const QString &prevContents, int prevCursorPos, int prevAnchorPos)
Definition: documentcommands.cpp:159
virtual void undo()
Definition: documentcommands.cpp:94
void setAnnotationProperties(const QDomNode &node)
Sets annotations internal properties according to the contents of node.
Definition: annotations.cpp:810
Definition: documentcommands_p.h:102
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.