Public Methods
- Document ( QObject *parent = 0, const char *name = 0 )
- virtual ~Document ()
- virtual View * createView ( QWidget *parent, const char *name = 0 )
- virtual QList<View> views () const
- virtual QString textLine ( int line ) const
- virtual void setSelection ( int row_from, int col_from, int row_to, int col_t )
- virtual bool hasSelection () const
- virtual QString selection () const
- virtual int numLines () const
- virtual void insertLine ( const QString &s, int line = -1 )
- virtual void insertAt ( const QString &s, int line, int col, bool mark = FALSE )
- virtual void removeLine ( int line )
- virtual QString text () const
- virtual int length () const
- virtual void addView ( View *view )
- virtual void removeView ( View *view )
Public Slots
Signals
Protected Methods
- Document ( QObject *parent = 0, const char *name = 0 )
- virtual ~Document ()
- virtual View * createView ( QWidget *parent, const char *name = 0 )
- virtual QList<View> views () const
- virtual QString textLine ( int line ) const
- virtual void setSelection ( int row_from, int col_from, int row_to, int col_t )
- virtual bool hasSelection () const
- virtual QString selection () const
- virtual int numLines () const
- virtual void insertLine ( const QString &s, int line = -1 )
- virtual void insertAt ( const QString &s, int line, int col, bool mark = FALSE )
- virtual void removeLine ( int line )
- virtual QString text () const
- virtual int length () const
- virtual void addView ( View *view )
- virtual void removeView ( View *view )
Protected Members
Document ( QObject *parent = 0, const char *name = 0 )
|
[virtual]
View * createView ( QWidget *parent, const char *name = 0 )
|
[pure virtual]
Create a view that will display the document data. You can create as many
views as you like. When the user modifies data in one view then all other
views will be updated as well.
[const virtual]
QString textLine ( int line )
|
[const pure virtual]
Returns: All the text from the requested line.
void setSelection ( int row_from, int col_from, int row_to, int col_t )
|
[pure virtual]
[const pure virtual]
[const pure virtual]
[const pure virtual]
Returns: The current number of lines in the document
void insertLine ( const QString &s, int line = -1 )
|
[pure virtual]
Insert line(s) at the given line number. If the line number is -1
(the default) then the line is added to end of the document
void insertAt ( const QString &s, int line, int col, bool mark = FALSE )
|
[pure virtual]
Add the line(s) into the document at the given line and column.
void removeLine ( int line )
|
[pure virtual]
[const pure virtual]
Returns: the complete document as a single QString
[const pure virtual]
Returns: the number of characters in the document
void setText ( const QString &t )
|
[pure virtual slot]
Set the given text into the view.
Warning: This will overwrite any data currently held in this view.
[signal]
When the user changes the text then this signal is emitted
TODO: - explain why and what type of change trigger this?
void deleted ( int startLine, int endLine )
|
[signal]
void inserted ( int startLine, int endLine )
|
[signal]
void addView ( View *view )
|
[protected:
virtual]
Call this method in your document implementation whenever you created a new
view.
(like in createView )
void removeView ( View *view )
|
[protected:
virtual]
Call this method in your document implementation whenever you delete a view.
[protected:
]
Generated by: marc@yogi on Tue Mar 27 13:10:07 2001, using kdoc 2.0a48. |