BALL 1.5.0
Loading...
Searching...
No Matches
textEditorWidget.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_VIEW_WIDGETS_TEXTEDITORWIDGET_H
6#define BALL_VIEW_WIDGETS_TEXTEDITORWIDGET_H
7
8#ifndef BALL_VIEW_KERNEL_COMMON_H
10#endif
11
12#ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
14#endif
15
16#include <QPlainTextEdit>
17#include <QObject>
18
19class QPaintEvent;
20class QResizeEvent;
21class QSize;
22class QWidget;
23
24namespace BALL
25{
26 namespace VIEW
27 {
32 : public QPlainTextEdit
33 {
34 Q_OBJECT
35
36 public:
37
39
40 void lineNumbersPaintEvent(QPaintEvent *event);
42
43 protected:
44
46 : public QWidget
47 {
48 public:
50 QSize sizeHint() const;
51
52 protected:
53 void paintEvent(QPaintEvent *event);
54
55 private:
56 TextEditorWidget *editor_;
57 };
58
59 void resizeEvent(QResizeEvent *event);
60
61 private Q_SLOTS:
62 void updateLineNumbersWidth(int newBlockCount);
63 void highlightCurrentLine();
64 void updateLineNumbers(const QRect &, int);
65
66 private:
67 QWidget *line_numbers_;
68 };
69
70 }
71}
72
73#endif // BALL_VIEW_WIDGETS_TEXTEDITORWIDGET_H
TextEditorWidget(QWidget *parent=0)
void resizeEvent(QResizeEvent *event)
void lineNumbersPaintEvent(QPaintEvent *event)
LineNumbers(TextEditorWidget *editor)
#define BALL_VIEW_EXPORT