mirror of https://github.com/vitalif/openscad
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "editor.h"
|
|
|
|
class LegacyEditor : public EditorInterface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
LegacyEditor(class QWidget *parent);
|
|
virtual ~LegacyEditor();
|
|
QSize sizeHint() const;
|
|
void setInitialSizeHint(const QSize&);
|
|
QString toPlainText();
|
|
QString selectedText();
|
|
bool find(const QString &, bool findNext = false, bool findBackwards = false);
|
|
void replaceSelectedText(const QString &newText);
|
|
bool findString(const QString & exp, bool findBackwards) const;
|
|
QStringList colorSchemes();
|
|
|
|
public slots:
|
|
void zoomIn();
|
|
void zoomOut();
|
|
void setContentModified(bool);
|
|
bool isContentModified();
|
|
void indentSelection();
|
|
void unindentSelection();
|
|
void commentSelection();
|
|
void uncommentSelection();
|
|
void setPlainText(const QString&);
|
|
void highlightError(int);
|
|
void unhighlightLastError();
|
|
void setHighlightScheme(const QString&);
|
|
void insert(const QString&);
|
|
void replaceAll(const QString&);
|
|
void undo();
|
|
void redo();
|
|
void cut();
|
|
void copy();
|
|
void paste();
|
|
void initFont(const QString&, uint);
|
|
private:
|
|
class QTextEdit *textedit;
|
|
class Highlighter *highlighter;
|
|
QSize initialSizeHint;
|
|
};
|