Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.h @ 17962:4a53bcc1a4ae
GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
* libgui/src/m-editor/file-editor-tab.h
(class file_editor_tab): Add _status_bar and row/col_indicator variables, add handle_cursor_moved slot.
* libgui/src/m-editor/file-editor-tab.cc
(file_editor_tab::file_editor_tab): create statusbar and row / col indicator, connect edit cursorPosChange to handle_cursor_moved.
(file_editor_tab::handle_cursor_moved): New slot.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 19 Nov 2013 22:19:41 -0500 |
parents | ebb3ef964372 |
children | 6925dca34807 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.h +++ b/libgui/src/m-editor/file-editor-tab.h @@ -29,6 +29,8 @@ #include <QSettings> #include <QFileInfo> #include <Qsci/qsciapis.h> +#include <QStatusBar> +#include <QLabel> #include "find-dialog.h" #include "octave-qscintilla.h" @@ -150,6 +152,8 @@ // When the numer of lines changes -> adapt width of margin void auto_margin_width (); + void handle_cursor_moved (int line, int col); + private: enum editor_markers @@ -191,6 +195,10 @@ octave_qscintilla *_edit_area; + QStatusBar *_status_bar; + QLabel *_row_indicator; + QLabel *_col_indicator; + QString _file_name; QString _file_name_short;