forked from qt-creator/qt-creator
experiment with a different way of doing parenthesis matching. This is not finished and
work in progress.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <QtGui/QPlainTextEdit>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtCore/QTimeLine>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLabel;
|
||||
@@ -219,6 +220,43 @@ public:
|
||||
|
||||
class BaseTextEditorEditable;
|
||||
|
||||
class TEXTEDITOR_EXPORT BaseTextEditorAnimator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BaseTextEditorAnimator(QObject *parent);
|
||||
|
||||
void setPosition(int position) { m_position = position; }
|
||||
int position() const { return m_position; }
|
||||
|
||||
void setData(QFont f, QPalette pal, const QString &text);
|
||||
|
||||
void draw(QPainter *p, const QPointF &pos);
|
||||
QRectF rect() const;
|
||||
|
||||
qreal value() const { return m_value; }
|
||||
|
||||
void finish();
|
||||
|
||||
signals:
|
||||
void updateRequest(int position, QRectF rect);
|
||||
|
||||
|
||||
private slots:
|
||||
void step(qreal v);
|
||||
|
||||
private:
|
||||
QTimeLine *m_timeline;
|
||||
qreal m_value;
|
||||
int m_position;
|
||||
QFont m_font;
|
||||
QPalette m_palette;
|
||||
QString m_text;
|
||||
QSizeF m_size;
|
||||
};
|
||||
|
||||
|
||||
class TEXTEDITOR_EXPORT BaseTextEditor
|
||||
: public QPlainTextEdit
|
||||
{
|
||||
@@ -468,6 +506,7 @@ private slots:
|
||||
void _q_matchParentheses();
|
||||
void _q_highlightBlocks();
|
||||
void slotSelectionChanged();
|
||||
void _q_animateUpdate(int position, QRectF rect);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user