pdfedit  0.4.5
About: PDFedit is a free and open source library for manipulating PDF documents.
  Fossies Dox: pdfedit-0.4.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Editor Class Reference

#include <editor.h>

Inheritance diagram for Editor:
Collaboration diagram for Editor:

Public Types

enum  Selection { Error = 3, Step = 4 }
 

Signals

void clearErrorMarker ()
 
void intervalChanged ()
 

Public Member Functions

 Editor (const QString &fn, QWidget *parent, const char *name)
 
 ~Editor ()
 
virtual void load (const QString &fn)
 
virtual void save (const QString &fn)
 
QTextDocument * document () const
 
void placeCursor (const QPoint &p, QTextCursor *c)
 
void setDocument (QTextDocument *doc)
 
QTextCursor * textCursor () const
 
void repaintChanged ()
 
virtual EditorCompletioncompletionManager ()
 
virtual EditorBrowserbrowserManager ()
 
virtual void configChanged ()
 
Configconfig ()
 
void setErrorSelection (int line)
 
void setStepSelection (int line)
 
void clearStepSelection ()
 
void clearSelections ()
 
virtual bool supportsErrors () const
 
virtual bool supportsBreakPoints () const
 
virtual void makeFunctionVisible (QTextParagraph *)
 
void drawCursor (bool b)
 
QPopupMenu * createPopupMenu (const QPoint &p)
 
bool eventFilter (QObject *o, QEvent *e)
 
void setEditable (bool b)
 

Protected Member Functions

void doKeyboardAction (KeyboardAction action)
 
void keyPressEvent (QKeyEvent *e)
 

Protected Attributes

ParenMatcherparenMatcher
 
QString filename
 
Configcfg
 
bool hasError
 
QAccel * accelComment
 
QAccel * accelUncomment
 
bool editable
 

Private Slots

void cursorPosChanged (QTextCursor *c)
 
void doChangeInterval ()
 
void commentSelection ()
 
void uncommentSelection ()
 

Detailed Description

Definition at line 38 of file editor.h.

Member Enumeration Documentation

◆ Selection

Enumerator
Error 
Step 

Definition at line 43 of file editor.h.

Constructor & Destructor Documentation

◆ Editor()

Editor::Editor ( const QString &  fn,
QWidget *  parent,
const char *  name 
)

◆ ~Editor()

Editor::~Editor ( )

Definition at line 71 of file editor.cpp.

References cfg, and parenMatcher.

Member Function Documentation

◆ browserManager()

virtual EditorBrowser* Editor::browserManager ( )
inlinevirtual

Reimplemented in QSAEditor.

Definition at line 59 of file editor.h.

◆ clearErrorMarker

void Editor::clearErrorMarker ( )
signal

◆ clearSelections()

void Editor::clearSelections ( )

◆ clearStepSelection()

void Editor::clearStepSelection ( )

Definition at line 143 of file editor.cpp.

References document(), and Step.

◆ commentSelection

void Editor::commentSelection ( )
privateslot

Definition at line 155 of file editor.cpp.

References i, and repaintChanged().

Referenced by createPopupMenu(), and Editor().

◆ completionManager()

virtual EditorCompletion* Editor::completionManager ( )
inlinevirtual

Reimplemented in QSAEditor.

Definition at line 58 of file editor.h.

◆ config()

Config* Editor::config ( )
inline

Definition at line 62 of file editor.h.

References cfg.

Referenced by QSAEditor::configChanged().

◆ configChanged()

void Editor::configChanged ( )
virtual

Reimplemented in QSAEditor.

Definition at line 106 of file editor.cpp.

References document().

Referenced by QSAEditor::configChanged().

◆ createPopupMenu()

QPopupMenu * Editor::createPopupMenu ( const QPoint &  p)

Definition at line 213 of file editor.cpp.

References commentSelection(), and uncommentSelection().

◆ cursorPosChanged

void Editor::cursorPosChanged ( QTextCursor *  c)
privateslot

Definition at line 77 of file editor.cpp.

References clearErrorMarker(), hasError, ParenMatcher::match(), parenMatcher, and repaintChanged().

Referenced by Editor().

◆ doChangeInterval

void Editor::doChangeInterval ( )
privateslot

Definition at line 149 of file editor.cpp.

References intervalChanged().

◆ document()

◆ doKeyboardAction()

void Editor::doKeyboardAction ( KeyboardAction  action)
protected

Definition at line 232 of file editor.cpp.

References editable.

◆ drawCursor()

void Editor::drawCursor ( bool  b)
inline

Definition at line 73 of file editor.h.

Referenced by EditorCompletion::eventFilter().

◆ eventFilter()

bool Editor::eventFilter ( QObject *  o,
QEvent *  e 
)

Definition at line 222 of file editor.cpp.

References accelComment, and accelUncomment.

◆ intervalChanged

void Editor::intervalChanged ( )
signal

◆ keyPressEvent()

void Editor::keyPressEvent ( QKeyEvent *  e)
protected

Definition at line 239 of file editor.cpp.

References editable.

◆ load()

void Editor::load ( const QString &  fn)
virtual

Definition at line 87 of file editor.cpp.

References filename.

Referenced by Editor(), and QSAEditor::QSAEditor().

◆ makeFunctionVisible()

virtual void Editor::makeFunctionVisible ( QTextParagraph *  )
inlinevirtual

Reimplemented in QSAEditor.

Definition at line 71 of file editor.h.

◆ placeCursor()

void Editor::placeCursor ( const QPoint &  p,
QTextCursor *  c 
)
inline

Definition at line 53 of file editor.h.

Referenced by EditorBrowser::eventFilter().

◆ repaintChanged()

void Editor::repaintChanged ( )
inline

◆ save()

void Editor::save ( const QString &  fn)
virtual

Definition at line 100 of file editor.cpp.

References filename.

◆ setDocument()

void Editor::setDocument ( QTextDocument *  doc)
inline

Definition at line 54 of file editor.h.

◆ setEditable()

void Editor::setEditable ( bool  b)
inline

Definition at line 78 of file editor.h.

References editable.

Referenced by QSAEditorInterface::editor().

◆ setErrorSelection()

void Editor::setErrorSelection ( int  line)

Definition at line 112 of file editor.cpp.

References document(), Error, and hasError.

◆ setStepSelection()

void Editor::setStepSelection ( int  line)

Definition at line 128 of file editor.cpp.

References document(), and Step.

◆ supportsBreakPoints()

virtual bool Editor::supportsBreakPoints ( ) const
inlinevirtual

Reimplemented in QSAEditor.

Definition at line 70 of file editor.h.

◆ supportsErrors()

virtual bool Editor::supportsErrors ( ) const
inlinevirtual

Definition at line 69 of file editor.h.

◆ textCursor()

◆ uncommentSelection

void Editor::uncommentSelection ( )
privateslot

Definition at line 177 of file editor.cpp.

References i, and repaintChanged().

Referenced by createPopupMenu(), and Editor().

Member Data Documentation

◆ accelComment

QAccel* Editor::accelComment
protected

Definition at line 99 of file editor.h.

Referenced by Editor(), and eventFilter().

◆ accelUncomment

QAccel * Editor::accelUncomment
protected

Definition at line 99 of file editor.h.

Referenced by Editor(), and eventFilter().

◆ cfg

Config* Editor::cfg
protected

Definition at line 97 of file editor.h.

Referenced by config(), Editor(), and ~Editor().

◆ editable

bool Editor::editable
protected

Definition at line 100 of file editor.h.

Referenced by doKeyboardAction(), Editor(), keyPressEvent(), and setEditable().

◆ filename

QString Editor::filename
protected

Definition at line 96 of file editor.h.

Referenced by load(), and save().

◆ hasError

bool Editor::hasError
protected

Definition at line 98 of file editor.h.

Referenced by QSAEditor::clearError(), cursorPosChanged(), and setErrorSelection().

◆ parenMatcher

ParenMatcher* Editor::parenMatcher
protected

Definition at line 95 of file editor.h.

Referenced by QSAEditor::configChanged(), cursorPosChanged(), Editor(), and ~Editor().


The documentation for this class was generated from the following files: