QEditorPart Class Reference
This is a KTextEditor interface for Qeditor. More...
#include <qeditor_part.h>
Inheritance diagram for QEditorPart:

Public Slots | |
virtual void | readConfig () |
Read/Write the config to the standard place where this editor part saves it config, say: read/save default values for that editor part. | |
virtual void | writeConfig () |
virtual void | readConfig (KConfig *) |
Read/Write the config of the part to a given kconfig object to store the settings in a different place than the standard. | |
virtual void | writeConfig (KConfig *) |
virtual void | readSessionConfig (KConfig *) |
Read/Write session config of only this document/view/plugin. | |
virtual void | writeSessionConfig (KConfig *) |
virtual void | configDialog () |
Shows a config dialog for the part. | |
virtual void | undo () |
virtual void | redo () |
void | fileReload () |
Signals | |
void | fileNameChanged () |
void | configWidget (KDialogBase *) |
void | marksChanged () |
virtual void | markChanged (KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action) |
void | hlChanged () |
void | undoChanged () |
void | textChanged () |
void | newStatus () |
void | charactersInteractivelyInserted (int, int, const QString &) |
void | selectionChanged () |
Public Member Functions | |
QEditorPart (QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList &args) | |
Default constructor. | |
virtual | ~QEditorPart () |
Destructor. | |
virtual void | setReadWrite (bool rw) |
This is a virtual function inherited from KParts::ReadWritePart. | |
virtual void | setModified (bool modified) |
Reimplemented to disable and enable Save action. | |
QSourceColorizer * | colorizer () const |
QEditorIndenter * | indenter () const |
virtual uint | mark (uint line) |
virtual void | setMark (uint line, uint markType) |
virtual void | clearMark (uint line) |
virtual void | addMark (uint line, uint markType) |
virtual void | removeMark (uint line, uint markType) |
virtual QPtrList< KTextEditor::Mark > | marks () |
virtual void | clearMarks () |
virtual void | setPixmap (MarkInterface::MarkTypes, const QPixmap &) |
virtual void | setDescription (MarkInterface::MarkTypes, const QString &) |
virtual void | setMarksUserChangable (uint markMask) |
virtual bool | searchText (unsigned int startLine, unsigned int startCol, const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive=true, bool backwards=false) |
virtual bool | searchText (unsigned int startLine, unsigned int startCol, const QRegExp ®exp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards=false) |
QEditorView * | currentView () const |
virtual KTextEditor::View * | createView (QWidget *parent, const char *name=0) |
Create a view that will display the document data. | |
virtual QPtrList< KTextEditor::View > | views () const |
virtual unsigned int | hlMode () |
returns the current active highlighting mode | |
virtual bool | setHlMode (unsigned int mode) |
set the current active highlighting mode | |
virtual unsigned int | hlModeCount () |
returns the number of available highlightings | |
virtual QString | hlModeName (unsigned int mode) |
returns the name of the highlighting with number "mode" | |
virtual QString | hlModeSectionName (unsigned int mode) |
returns the sectionname of the highlighting with number "mode" | |
virtual void | clearUndo () |
virtual void | clearRedo () |
virtual unsigned int | undoCount () const |
virtual unsigned int | redoCount () const |
virtual unsigned int | undoSteps () const |
virtual void | setUndoSteps (unsigned int steps) |
virtual QString | text () const |
virtual QString | text (unsigned int startLine, unsigned int startCol, unsigned int endLine, unsigned int endCol) const |
virtual QString | textLine (unsigned int line) const |
virtual unsigned int | numLines () const |
virtual unsigned int | length () const |
virtual int | lineLength (unsigned int line) const |
virtual bool | setText (const QString &text) |
Set the given text into the view. | |
virtual bool | clear () |
clears the document Warning: This will overwrite any data currently held in this view. | |
virtual bool | insertText (unsigned int line, unsigned int col, const QString &text) |
Inserts text at line "line", column "col" returns true if success. | |
virtual bool | removeText (unsigned int startLine, unsigned int startCol, unsigned int endLine, unsigned int endCol) |
remove text at line "line", column "col" returns true if success | |
virtual bool | insertLine (unsigned int line, const QString &text) |
Insert line(s) at the given line number. | |
virtual bool | removeLine (unsigned int line) |
Insert line(s) at the given line number. | |
virtual KTextEditor::Cursor * | createCursor () |
Create a new cursor object. | |
virtual QPtrList< KTextEditor::Cursor > | cursors () const |
virtual bool | setSelection (unsigned int startLine, unsigned int startCol, unsigned int endLine, unsigned int endCol) |
virtual bool | clearSelection () |
removes the current Selection (not Text) | |
virtual bool | hasSelection () const |
virtual QString | selection () const |
virtual bool | removeSelectedText () |
removes the selected Text | |
virtual bool | selectAll () |
select the whole text | |
Protected Slots | |
void | fileOpen () |
void | fileSaveAs () |
Protected Member Functions | |
virtual bool | openFile () |
This must be implemented by each part. | |
virtual bool | saveFile () |
This must be implemented by each read-write part. | |
Private Member Functions | |
void | setupHighlighting () |
int | findMode (const QString &) |
Private Attributes | |
QPtrList< HLMode > | m_modes |
unsigned int | m_currentMode |
QEditorView * | m_currentView |
QPtrList< KTextEditor::View > | m_views |
QPtrList< KTextEditor::Cursor > | m_cursors |
QPtrList< KTextEditor::Mark > | m_marks |
QEditorBrowserExtension * | m_extension |
Detailed Description
This is a KTextEditor interface for Qeditor.
- Feature(s):
- A KTextEditor interface for Qeditor
Highlight code:
- Ada ( and indentation )
- bash
- c#
- c++
- javascript
- jsp
- Pascal ( and indentation )
- python ( and indentation )
- ocaml
- SQL
code folding: C#, c++ and java
Reload action
Notify KDevelop if the status of the file has changed
emacs like wordwrap mode and indent mode
breakpoint support
problem reporter marker widget
keyboard macro support
find/replace dialogs
Take a look at Editors Support Status (doc/api/EditorsSupportStatus.dox file) to see the current status/features of this editor.
- Requirement(s):
- QT 3.0.3
Definition at line 57 of file qeditor_part.h.
Constructor & Destructor Documentation
|
Default constructor.
Definition at line 104 of file qeditor_part.cpp. References createView(), endl(), kdDebug(), m_cursors, m_extension, m_marks, m_views, QEditorPart(), KParts::ReadWritePart::setModified(), setReadWrite(), and setupHighlighting(). Referenced by QEditorPart(). |
|
Destructor.
Definition at line 132 of file qeditor_part.cpp. |
Member Function Documentation
|
Implements KTextEditor::MarkInterface. Definition at line 742 of file qeditor_part.cpp. References addMark(), QEditor::document(), QEditorView::editor(), m_currentView, ParagData::mark(), marksChanged(), and ParagData::setMark(). Referenced by addMark(). |
|
Implements KTextEditor::EditInterface. |
|
clears the document Warning: This will overwrite any data currently held in this view.
Implements KTextEditor::EditInterface. Definition at line 309 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::MarkInterface. Definition at line 737 of file qeditor_part.cpp. References clearMark(), and setMark(). Referenced by clearMark(). |
|
Implements KTextEditor::MarkInterface. Definition at line 791 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, and ParagData::setMark(). |
|
Implements KTextEditor::UndoInterface. Definition at line 370 of file qeditor_part.cpp. |
|
removes the current Selection (not Text)
Implements KTextEditor::SelectionInterface. Definition at line 431 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::UndoInterface. Definition at line 364 of file qeditor_part.cpp. |
|
Definition at line 894 of file qeditor_part.cpp. References QEditor::colorizer(), QEditorView::editor(), and m_currentView. Referenced by configDialog(). |
|
Shows a config dialog for the part.
Implements KTextEditor::ConfigInterface. Definition at line 852 of file qeditor_part.cpp. References KDialogBase::addVBoxPage(), colorizer(), QEditorSettings::config(), QEditorView::configChanged(), configWidget(), QEditorIndenter::createConfigPage(), indenter(), m_currentView, QEditorSettings::self(), HighlightingConfigPage::setEditor(), GeneralConfigPage::setPart(), and KConfigBase::sync(). |
|
Referenced by configDialog(). |
|
Create a new cursor object.
Implements KTextEditor::CursorInterface. Definition at line 412 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, and m_cursors. |
|
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. Implements KTextEditor::Document. Definition at line 342 of file qeditor_part.cpp. References createView(), endl(), kdDebug(), m_currentView, and m_views. Referenced by createView(), and QEditorPart(). |
|
Definition at line 167 of file qeditor_part.h. References m_currentView. Referenced by QEditorBrowserExtension::copy(). |
|
Implements KTextEditor::CursorInterface. Definition at line 419 of file qeditor_part.cpp. References m_cursors. |
|
Referenced by openFile(), and saveFile(). |
|
Definition at line 242 of file qeditor_part.cpp. |
|
Definition at line 234 of file qeditor_part.cpp. References newStatus(), KParts::ReadWritePart::setModified(), and KParts::ReadOnlyPart::url(). |
|
Definition at line 253 of file qeditor_part.cpp. Referenced by saveFile(). |
|
Definition at line 591 of file qeditor_part.cpp. References HLMode::extensions, findMode(), and m_modes. Referenced by findMode(), openFile(), and saveFile(). |
|
Implements KTextEditor::SelectionInterface. Definition at line 437 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. Referenced by QEditorBrowserExtension::slotSelectionChanged(). |
|
Implements KTextEditor::HighlightingInterface. Referenced by setHlMode(). |
|
returns the current active highlighting mode
Implements KTextEditor::HighlightingInterface. Definition at line 556 of file qeditor_part.cpp. References m_currentMode. |
|
returns the number of available highlightings
Implements KTextEditor::HighlightingInterface. Definition at line 574 of file qeditor_part.cpp. References m_modes. |
|
returns the name of the highlighting with number "mode"
Implements KTextEditor::HighlightingInterface. Definition at line 579 of file qeditor_part.cpp. References hlModeName(), m_modes, and HLMode::name. Referenced by hlModeName(). |
|
returns the sectionname of the highlighting with number "mode"
Implements KTextEditor::HighlightingInterface. Definition at line 585 of file qeditor_part.cpp. References hlModeSectionName(), m_modes, and HLMode::section. Referenced by hlModeSectionName(). |
|
Definition at line 899 of file qeditor_part.cpp. References QEditorView::editor(), QEditor::indenter(), and m_currentView. Referenced by configDialog(). |
|
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 Definition at line 330 of file qeditor_part.cpp. References QEditorView::editor(), insertLine(), m_currentView, and text(). Referenced by insertLine(). |
|
Inserts text at line "line", column "col" returns true if success.
Definition at line 315 of file qeditor_part.cpp. References QEditorView::editor(), insertText(), m_currentView, and text(). Referenced by insertText(). |
|
Implements KTextEditor::EditInterface. Definition at line 290 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Definition at line 295 of file qeditor_part.cpp. References QEditorView::editor(), lineLength(), and m_currentView. Referenced by lineLength(). |
|
Implements KTextEditor::MarkInterface. Definition at line 711 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, ParagData::mark(), and mark(). |
|
Implements KTextEditor::MarkInterfaceExtension. |
|
Implements KTextEditor::MarkInterface. Definition at line 768 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, mark(), ParagData::mark(), and marks(). Referenced by marks(). |
|
Implements KTextEditor::MarkInterface. Referenced by addMark(), removeMark(), and setMark(). |
|
Referenced by fileReload(), and setModified(). |
|
Implements KTextEditor::EditInterface. Definition at line 285 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. Referenced by searchText(). |
|
This must be implemented by each part.
Implements KParts::ReadOnlyPart. Definition at line 177 of file qeditor_part.cpp. References QEditorView::editor(), file, fileNameChanged(), findMode(), m_currentView, setHlMode(), KParts::ReadWritePart::setModified(), and QEditor::setText(). |
|
Read/Write the config of the part to a given kconfig object to store the settings in a different place than the standard.
Implements KTextEditor::ConfigInterface. Definition at line 832 of file qeditor_part.cpp. |
|
Read/Write the config to the standard place where this editor part saves it config, say: read/save default values for that editor part.
Implements KTextEditor::ConfigInterface. Definition at line 821 of file qeditor_part.cpp. References QEditorView::configChanged(), m_currentView, QEditorSettings::readConfig(), and QEditorSettings::self(). |
|
Read/Write session config of only this document/view/plugin.
Implements KTextEditor::ConfigInterface. Definition at line 842 of file qeditor_part.cpp. References endl(), kdDebug(), and readSessionConfig(). Referenced by readSessionConfig(). |
|
Implements KTextEditor::UndoInterface. Definition at line 407 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::UndoInterface. Definition at line 383 of file qeditor_part.cpp. |
|
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 Definition at line 336 of file qeditor_part.cpp. References QEditorView::editor(), m_currentView, and removeLine(). Referenced by removeLine(). |
|
Implements KTextEditor::MarkInterface. Definition at line 755 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, ParagData::mark(), marksChanged(), removeMark(), and ParagData::setMark(). Referenced by removeMark(). |
|
removes the selected Text
Implements KTextEditor::SelectionInterface. Definition at line 447 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
remove text at line "line", column "col" returns true if success
Definition at line 321 of file qeditor_part.cpp. References QEditorView::editor(), m_currentView, and removeText(). Referenced by removeText(). |
|
This must be implemented by each read-write part.
Implements KParts::ReadWritePart. Definition at line 203 of file qeditor_part.cpp. References QEditorView::editor(), file, fileNameChanged(), fileSaveAs(), findMode(), KParts::ReadWritePart::isReadWrite(), m_currentView, setHlMode(), and KParts::ReadWritePart::setModified(). |
|
Implements KTextEditor::SearchInterface. Definition at line 681 of file qeditor_part.cpp. References numLines(), searchText(), and textLine(). |
|
Implements KTextEditor::SearchInterface. Definition at line 606 of file qeditor_part.cpp. References endl(), kdDebug(), numLines(), searchText(), text(), and textLine(). Referenced by searchText(). |
|
select the whole text
Implements KTextEditor::SelectionInterface. Definition at line 453 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::SelectionInterface. Definition at line 442 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::SelectionInterface. |
|
Implements KTextEditor::MarkInterfaceExtension. Definition at line 809 of file qeditor_part.cpp. References m_currentView, QEditorView::markerWidget(), MarkerWidget::setDescription(), and setDescription(). Referenced by setDescription(). |
|
set the current active highlighting mode
Implements KTextEditor::HighlightingInterface. Definition at line 561 of file qeditor_part.cpp. References hlChanged(), m_currentMode, m_currentView, m_modes, HLMode::name, setHlMode(), and QEditorView::setLanguage(). Referenced by openFile(), saveFile(), and setHlMode(). |
|
Implements KTextEditor::MarkInterface. Definition at line 724 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, marksChanged(), ParagData::setMark(), and setMark(). Referenced by clearMark(), and setMark(). |
|
Implements KTextEditor::MarkInterfaceExtension. Definition at line 814 of file qeditor_part.cpp. References m_currentView, QEditorView::markerWidget(), MarkerWidget::setMarksUserChangable(), and setMarksUserChangable(). Referenced by setMarksUserChangable(). |
|
Reimplemented to disable and enable Save action.
Reimplemented from KParts::ReadWritePart. Definition at line 152 of file qeditor_part.cpp. References KActionCollection::action(), KXMLGUIClient::actionCollection(), QEditorView::editor(), m_currentView, and newStatus(). |
|
Implements KTextEditor::MarkInterfaceExtension. Definition at line 804 of file qeditor_part.cpp. References m_currentView, QEditorView::markerWidget(), MarkerWidget::setPixmap(), and setPixmap(). Referenced by setPixmap(). |
|
This is a virtual function inherited from KParts::ReadWritePart. A shell will use this to inform this Part if it should act read-only Reimplemented from KParts::ReadWritePart. Definition at line 137 of file qeditor_part.cpp. References QEditorView::editor(), m_currentView, KParts::ReadWritePart::setModified(), setReadWrite(), and textChanged(). Referenced by QEditorPart(), and setReadWrite(). |
|
Implements KTextEditor::SelectionInterface. Definition at line 424 of file qeditor_part.cpp. References QEditorView::editor(), m_currentView, and setSelection(). Referenced by setSelection(). |
|
Set the given text into the view. Warning: This will overwrite any data currently held in this view. Implements KTextEditor::EditInterface. Definition at line 303 of file qeditor_part.cpp. References QEditorView::editor(), m_currentView, QEditor::setText(), setText(), and text(). Referenced by setText(). |
|
Implements KTextEditor::UndoInterface. Definition at line 396 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), m_currentView, and setUndoSteps(). Referenced by setUndoSteps(). |
|
Definition at line 459 of file qeditor_part.cpp. References HLMode::extensions, m_currentMode, m_modes, HLMode::name, and HLMode::section. Referenced by QEditorPart(). |
|
Definition at line 267 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::EditInterface. Definition at line 262 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::EditInterface. Referenced by setReadWrite(). |
|
Definition at line 280 of file qeditor_part.cpp. References QEditorView::editor(), m_currentView, QEditor::textLine(), and textLine(). Referenced by QEditorArgHint::cursorPositionChanged(), searchText(), and textLine(). |
|
Implements KTextEditor::UndoInterface. Definition at line 402 of file qeditor_part.cpp. References QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::UndoInterface. |
|
Implements KTextEditor::UndoInterface. Definition at line 376 of file qeditor_part.cpp. |
|
Implements KTextEditor::UndoInterface. Definition at line 390 of file qeditor_part.cpp. References QEditor::document(), QEditorView::editor(), and m_currentView. |
|
Implements KTextEditor::Document. Definition at line 358 of file qeditor_part.cpp. References m_views. |
|
Implements KTextEditor::ConfigInterface. Definition at line 837 of file qeditor_part.cpp. |
|
Implements KTextEditor::ConfigInterface. Definition at line 827 of file qeditor_part.cpp. |
|
Implements KTextEditor::ConfigInterface. Definition at line 847 of file qeditor_part.cpp. References endl(), kdDebug(), and writeSessionConfig(). Referenced by writeSessionConfig(). |
Member Data Documentation
|
Definition at line 219 of file qeditor_part.h. Referenced by hlMode(), setHlMode(), and setupHighlighting(). |
|
Definition at line 376 of file qeditor_part.h. Referenced by addMark(), clear(), clearMarks(), clearSelection(), colorizer(), configDialog(), createCursor(), createView(), currentView(), hasSelection(), indenter(), insertLine(), insertText(), length(), lineLength(), mark(), marks(), numLines(), openFile(), readConfig(), redo(), removeLine(), removeMark(), removeSelectedText(), removeText(), saveFile(), selectAll(), selection(), setDescription(), setHlMode(), setMark(), setMarksUserChangable(), setModified(), setPixmap(), setReadWrite(), setSelection(), setText(), setUndoSteps(), text(), textLine(), undo(), and undoSteps(). |
|
Definition at line 378 of file qeditor_part.h. Referenced by createCursor(), cursors(), and QEditorPart(). |
|
Definition at line 380 of file qeditor_part.h. Referenced by QEditorPart(). |
|
Definition at line 379 of file qeditor_part.h. Referenced by QEditorPart(). |
|
Definition at line 218 of file qeditor_part.h. Referenced by findMode(), hlModeCount(), hlModeName(), hlModeSectionName(), setHlMode(), and setupHighlighting(). |
|
Definition at line 377 of file qeditor_part.h. Referenced by createView(), QEditorPart(), and views(). |
The documentation for this class was generated from the following files:
- editors/qeditor/qeditor_part.h
- editors/qeditor/qeditor_part.cpp