Logo Search packages:      
Sourcecode: qt-creator version File versions  Download package

Core::IEditor Class Reference

#include <ieditor.h>

Inheritance diagram for Core::IEditor:

List of all members.

Detailed Description

The IEditor 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 the kind() of the corresponding EditorFactory. The changed() signal should be emitted when the modified state of the document changes (so /bold{not} every time the document changes, but /bold{only once}). If duplication is supported, you need to ensure that all duplicates return the same file().

See also:
Core::EditorFactoryInterface Core::IContext

Definition at line 68 of file ieditor.h.


void changed ()

Public Member Functions

virtual QList< int > context () const =0
virtual QString contextHelpId () const
virtual bool createNew (const QString &contents=QString())=0
virtual int currentColumn () const
virtual int currentLine () const
virtual QString displayName () const =0
virtual IEditorduplicate (QWidget *parent)=0
virtual bool duplicateSupported () const =0
virtual IFile * file ()=0
 IEditor (QObject *parent=0)
virtual const char * kind () const =0
virtual bool open (const QString &fileName=QString())=0
virtual bool restoreState (const QByteArray &state)=0
virtual QByteArray saveState () const =0
virtual void setDisplayName (const QString &title)=0
virtual QToolBar * toolBar ()=0
virtual QWidget * widget ()=0

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

Generated by  Doxygen 1.6.0   Back to index