Mercurial > octave
diff libgui/src/history-dock-widget.h @ 19563:a402493c0605 gui-release
provide the same filter for history view as for workspace view
* history_dock_widget.cc (constructor): combo-box for filter instead of line
edit, new check box for enable/disable filter, connect related signals,
get last state of filter and check box from settings file;
(destructor): new, write state of filter and check box into settings file;
(filter_activate): new slot enabling or disabling the filter;
(update_filter_history): new slot for saving the filter expression when its
edtitign has finished or when it was chosen from the combo box selection list
(copyClipboard, pasteClipboard, selectAll): line edit is replaced by a
combo box with a line edit
* history_dock_widget.h: new destructor, slots filter_activate and
update_filter_history, new class variables for check box, filter combo box
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 11 Jan 2015 15:47:37 +0100 |
parents | 2d5d0d86432e |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/libgui/src/history-dock-widget.h Sat Jan 10 13:31:24 2015 +0100 +++ b/libgui/src/history-dock-widget.h Sun Jan 11 15:47:37 2015 +0100 @@ -27,6 +27,9 @@ #include <QListView> #include <QSortFilterProxyModel> #include <QStringListModel> +#include <QComboBox> +#include <QCheckBox> + #include "octave-dock-widget.h" class history_dock_widget : public octave_dock_widget @@ -36,6 +39,7 @@ public: history_dock_widget (QWidget *parent = 0); + ~history_dock_widget (); public slots: @@ -56,6 +60,9 @@ private slots: + void update_filter_history (); + void filter_activate (bool enable); + void handle_double_click (QModelIndex modelIndex); void handle_contextmenu_copy (bool flag); void handle_contextmenu_evaluate (bool flag); @@ -70,11 +77,14 @@ void construct (); QListView *_history_list_view; - QLineEdit *_filter_line_edit; QSortFilterProxyModel _sort_filter_proxy_model; /** Stores the current history_model. */ QStringListModel *_history_model; + + QCheckBox *_filter_checkbox; + QComboBox *_filter; + enum { MaxFilterHistory = 10 }; }; #endif // HISTORYDOCKWIDGET_H