Files
qt-creator/doc/examples/htmleditor/htmleditor.h
Abhishek Patil abcb9358c2 Qt Creator Plugin HOWTO documentation first and second cut
Signed-off-by: Abhishek Patil <abhishek.patil@vcreatelogic.com>

Merge-request: 145
Reviewed-by: con <qtc-committer@nokia.com>
2010-06-21 17:32:15 +02:00

45 lines
991 B
C++

#ifndef HTMLEDITOR_H
#define HTMLEDITOR_H
#include "coreplugin/editormanager/ieditor.h"
#include <QToolBar>
class HTMLEditorWidget;
struct HTMLEditorData;
class HTMLEditor : public Core::IEditor
{
Q_OBJECT
public:
HTMLEditor(HTMLEditorWidget* editorWidget);
~HTMLEditor();
bool createNew(const QString& contents = QString());
QString displayName() const;
IEditor* duplicate(QWidget* parent);
bool duplicateSupported() const;
Core::IFile* file();
bool isTemporary() const;
const char* kind() const;
bool open(const QString& fileName = QString()) ;
bool restoreState(const QByteArray& state);
QByteArray saveState() const;
void setDisplayName(const QString &title);
QToolBar* toolBar();
// From Core::IContext
QWidget* widget();
QList<int> context() const;
protected slots:
void slotTitleChanged(const QString& title)
{ setDisplayName(title); }
private:
HTMLEditorData* d;
};
#endif // HTMLEDITOR_H