Mercurial > octave-nkf
comparison libgui/src/qtinfo/webinfo.h @ 16529:faccc20d5f39
allow doc browser tabs to be moved and individually closed
* webinfo.h, webinfo.cc (webinfo::_close_tab_button): Delete member
variable and all uses.
(webinfo::webinfo): Set tab bar properties to allow moving and
deleting individual tabs. Connect _close_tab_button::clicked to
webinfo::close_tab.
(webinfo::close_tab): Replace with closeTab function. Allow "Top" tab
to be close, but require that at least one tab is open.
(webinfo::closeTab): Delete.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Apr 2013 00:57:07 -0400 |
parents | fd27e10b9b05 |
children | e2de3c8882be |
comparison
equal
deleted
inserted
replaced
16528:9bc1f8278966 | 16529:faccc20d5f39 |
---|---|
35 void load_node (const QString& node_name); | 35 void load_node (const QString& node_name); |
36 | 36 |
37 public slots: | 37 public slots: |
38 void link_clicked (const QUrl& link); | 38 void link_clicked (const QUrl& link); |
39 void current_tab_changed (int index); | 39 void current_tab_changed (int index); |
40 void close_tab (); | 40 void close_tab (int index); |
41 void search (); | 41 void search (); |
42 void zoom_in (); | 42 void zoom_in (); |
43 void zoom_out (); | 43 void zoom_out (); |
44 | 44 |
45 private: | 45 private: |
46 QTextBrowser *_text_browser; | 46 QTextBrowser *_text_browser; |
47 QTabBar *_tab_bar; | 47 QTabBar *_tab_bar; |
48 QStackedWidget *_stacked_widget; | 48 QStackedWidget *_stacked_widget; |
49 QPushButton *_close_tab_button; | |
50 QLineEdit *_search_line_edit; | 49 QLineEdit *_search_line_edit; |
51 QCheckBox *_search_check_box; | 50 QCheckBox *_search_check_box; |
52 QToolButton *_zoom_in_button; | 51 QToolButton *_zoom_in_button; |
53 QToolButton *_zoom_out_button; | 52 QToolButton *_zoom_out_button; |
54 | 53 |
55 parser _parser; | 54 parser _parser; |
56 QFont _font_web; | 55 QFont _font_web; |
57 | 56 |
58 QTextBrowser *addNewTab (const QString& name); | 57 QTextBrowser *addNewTab (const QString& name); |
59 void closeTab(int index); | |
60 }; | 58 }; |