2014-06-07 19:42:41 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "editor.h"
|
|
|
|
|
2014-06-07 19:22:14 +04:00
|
|
|
class LegacyEditor : public EditorInterface
|
2014-06-07 19:42:41 +04:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-08-25 01:40:12 +04:00
|
|
|
LegacyEditor(class QWidget *parent);
|
2014-08-22 22:17:24 +04:00
|
|
|
virtual ~LegacyEditor();
|
2014-06-07 19:42:41 +04:00
|
|
|
QSize sizeHint() const;
|
2014-06-19 21:23:00 +04:00
|
|
|
void setInitialSizeHint(const QSize&);
|
2014-06-07 19:42:41 +04:00
|
|
|
QString toPlainText();
|
2014-08-23 09:25:29 +04:00
|
|
|
QString selectedText();
|
2014-08-14 02:52:01 +04:00
|
|
|
bool find(const QString &, bool findNext = false, bool findBackwards = false);
|
2014-08-23 02:10:58 +04:00
|
|
|
void replaceSelectedText(const QString &newText);
|
2015-03-23 19:51:25 +03:00
|
|
|
void replaceAll(const QString &findText, const QString &replaceText);
|
2014-08-14 02:52:01 +04:00
|
|
|
bool findString(const QString & exp, bool findBackwards) const;
|
2014-11-01 01:30:52 +03:00
|
|
|
QStringList colorSchemes();
|
2014-08-15 12:43:58 +04:00
|
|
|
|
2014-06-07 19:42:41 +04:00
|
|
|
public slots:
|
|
|
|
void zoomIn();
|
|
|
|
void zoomOut();
|
2014-08-25 01:40:12 +04:00
|
|
|
void setContentModified(bool);
|
|
|
|
bool isContentModified();
|
2014-06-07 19:42:41 +04:00
|
|
|
void indentSelection();
|
|
|
|
void unindentSelection();
|
|
|
|
void commentSelection();
|
|
|
|
void uncommentSelection();
|
2014-06-19 21:23:00 +04:00
|
|
|
void setPlainText(const QString&);
|
|
|
|
void highlightError(int);
|
2014-06-07 19:42:41 +04:00
|
|
|
void unhighlightLastError();
|
2014-06-19 21:23:00 +04:00
|
|
|
void setHighlightScheme(const QString&);
|
2014-08-22 22:17:24 +04:00
|
|
|
void insert(const QString&);
|
2015-03-23 19:51:25 +03:00
|
|
|
void setText(const QString&);
|
2014-06-07 19:42:41 +04:00
|
|
|
void undo();
|
|
|
|
void redo();
|
|
|
|
void cut();
|
|
|
|
void copy();
|
|
|
|
void paste();
|
2014-08-15 12:43:58 +04:00
|
|
|
void initFont(const QString&, uint);
|
2014-06-07 19:42:41 +04:00
|
|
|
private:
|
2014-08-25 01:40:12 +04:00
|
|
|
class QTextEdit *textedit;
|
|
|
|
class Highlighter *highlighter;
|
2014-06-07 19:42:41 +04:00
|
|
|
QSize initialSizeHint;
|
|
|
|
};
|