Mercurial > octave
diff libgui/src/main-window.h @ 29061:8a425e771aa7
use a led like indicator for the prfiler state
* led-indicator.cc: implememntation od class led_indicator;
(led_indicator): sete size and initial state;
(style_sheet): set the style sheet, where the led is emulated
by a color gradient
* led-indicator.h: class led_indicator derived from QLabel,
enum with possible states, new ctor, new method for generating
the required style sheet
* main-window.cc (main_window): change the status indicaotr fomr QLabel
to the new led_indicator and add it to the status bar
(handle_profiler_status_update): set the led state accordingly
* main-window.h: include led-indicator.h, change profiler indicator
from QLabel to led_indicator
* module.mk: add the files for the new led_indicator
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Fri, 13 Nov 2020 20:50:37 +0100 |
parents | 450920c987b8 |
children | d8089b13d4d7 |
line wrap: on
line diff
--- a/libgui/src/main-window.h Fri Nov 13 08:31:12 2020 +0100 +++ b/libgui/src/main-window.h Fri Nov 13 20:50:37 2020 +0100 @@ -53,6 +53,7 @@ #include "find-files-dialog.h" #include "history-dock-widget.h" #include "interpreter-qobject.h" +#include "led-indicator.h" #include "octave-dock-widget.h" #include "octave-qobject.h" #include "qt-interpreter-events.h" @@ -319,7 +320,7 @@ //! Toolbar. QStatusBar *m_status_bar; - QLabel *m_profiler_status_indicator; + led_indicator *m_profiler_status_indicator; //! Dock widgets. //!@{