IEditor Class
(Core::IEditor)The IEditor class is an interface for providing different editors for different file types. More...
Header: | #include <IEditor> |
Inherits: | Core::IContext |
Inherited By: |
Public Functions
IEditor(QObject *parent = 0) | |
virtual int | currentColumn() const |
virtual int | currentLine() const |
virtual IDocument * | document() = 0 |
virtual IEditor * | duplicate() |
bool | duplicateSupported() const |
virtual void | gotoLine(int line, int column = 0, bool centerLine = true) |
virtual bool | isDesignModePreferred() const |
virtual bool | restoreState(const QByteArray &state) |
virtual QByteArray | saveState() const |
void | setDuplicateSupported(bool duplicateSupported) |
virtual QWidget * | toolBar() = 0 |
- 6 public functions inherited from Core::IContext
- 32 public functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The IEditor class is an interface for providing different editors for different file types.
Classes that implement this interface are for example the editors for C++ files, UI files and resource files.
Whenever a user wants to edit or create a file, the EditorManager scans all EditorFactoryInterfaces for suitable editors. The selected EditorFactory is then asked to create an editor, which must implement this interface.
Guidelines for implementing:
displayName()
is used as a user visible description of the document (usually filename w/o path).kind()
must be the same value as thekind()
of the corresponding EditorFactory.- If duplication is supported, you need to ensure that all duplicates return the same
file()
. - QString
preferredMode()
const is the mode the editor manager should activate. Some editors use a special mode (such as Design mode).
See also Core::EditorFactoryInterface and Core::IContext.
Member Function Documentation
IEditor::IEditor(QObject *parent = 0)
Default constructs an instance of IEditor.
[virtual]
int IEditor::currentColumn() const
[virtual]
int IEditor::currentLine() const
[pure virtual]
IDocument *IEditor::document()
[virtual]
IEditor *IEditor::duplicate()
bool IEditor::duplicateSupported() const
See also setDuplicateSupported().
[virtual]
void IEditor::gotoLine(int line, int column = 0, bool centerLine = true)
[virtual]
bool IEditor::isDesignModePreferred() const
[virtual]
bool IEditor::restoreState(const QByteArray &state)
[virtual]
QByteArray IEditor::saveState() const
void IEditor::setDuplicateSupported(bool duplicateSupported)
See also duplicateSupported().