2 * Copyright 2010, Robert Bieber
3 * Licensed under the LGPLv2.1, see the COPYING file for more information
6 #ifndef VARIANTEDITOR_H
7 #define VARIANTEDITOR_H
9 #include <QTextDocument>
17 * A simple class that transparently wraps a pointer to either
18 * a QPlainTextEdit or a QTextEdit, providing access to functions common
25 VariantEditor(QTextEdit
* textEdit
);
26 VariantEditor(QPlainTextEdit
* textEdit
);
28 void connectToSetEnabled(QPushButton
* button
);
30 QTextDocument
* document();
31 void setTextCursor(const QTextCursor
& cursor
);
32 bool find(const QString
& exp
, QTextDocument::FindFlags flags
);
33 QTextCursor
textCursor() const;
36 QPlainTextEdit
* plainTextEdit
;
39 enum{ Plain
, Rich
} type
;
43 #endif // VARIANTEDITOR_H