~gabriel1984sibiu/qosmic/trunk

« back to all changes in this revision

Viewing changes to src/lua/luaeditor.h

  • Committer: bitsed
  • Date: 2016-05-16 02:57:27 UTC
  • Revision ID: git-v1:64fcad0fb3df21dda930e4e4cb58bb7a91459668
Display line numbers with the lua editor

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        public:
32
32
                LuaEditor(QWidget* pa=0);
33
33
                ~LuaEditor();
 
34
                void lineWidgetPaintEvent(QPaintEvent*);
 
35
            int lineWidgetWidth();
34
36
 
35
37
        public slots:
36
38
                bool save();
44
46
                void scriptSaved();
45
47
 
46
48
        protected:
 
49
                void resizeEvent(QResizeEvent*);
47
50
                void keyPressEvent(QKeyEvent*);
 
51
                void scrollContentsBy(int dx, int dy);
 
52
                QTextBlock getFirstVisibleBlock();
48
53
                QString script_filename;
49
54
                QWidget* parent;
 
55
                QWidget* lineWidget;
50
56
                Highlighter* highlighter;
51
 
};
 
57
 
 
58
        private slots:
 
59
                void highlightCurrentLine();
 
60
                void updateLineWidgetWidth(int);
 
61
};
 
62
 
 
63
 
 
64
class LineWidget : public QWidget
 
65
{
 
66
        Q_OBJECT
 
67
 
 
68
        public:
 
69
                LineWidget(LuaEditor* editor);
 
70
                QSize sizeHint() const;
 
71
 
 
72
        protected:
 
73
                void paintEvent(QPaintEvent *event);
 
74
 
 
75
        private:
 
76
                LuaEditor* luaEditor;
 
77
};
 
78
 
 
79
 
52
80
 
53
81
}
54
82