Mercurial > hg > octave-lyh
annotate gui/src/HistoryDockWidget.h @ 13577:e440b3f32f02
Fixed bug with closing subwindows.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 01 Aug 2011 18:51:36 +0200 |
parents | 7d106550be8f |
children | c0e66d6e3dc8 |
rev | line source |
---|---|
13504
13e3d60aff2d
Replaced Quint with OctaveGUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13501
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
13501 | 2 * Copyright (C) 2011 Jacob Dawid |
3 * jacob.dawid@googlemail.com | |
4 * | |
5 * This program is free software: you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation, either version 3 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 */ | |
18 | |
19 #ifndef HISTORYDOCKWIDGET_H | |
20 #define HISTORYDOCKWIDGET_H | |
21 | |
22 #include <QDockWidget> | |
13545
ffc2e1d1ad5f
History can be filtered with an input search box while typing.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
23 #include <QLineEdit> |
13501 | 24 #include <QListView> |
13545
ffc2e1d1ad5f
History can be filtered with an input search box while typing.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
25 #include <QSortFilterProxyModel> |
13518
bace956a3724
Put history model part into OctaveLink.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
26 #include "OctaveLink.h" |
13501 | 27 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
28 class HistoryDockWidget:public QDockWidget |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
29 { |
13517
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
30 Q_OBJECT |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
31 public: |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
32 HistoryDockWidget (QWidget *parent = 0); |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
33 void updateHistory (QStringList history); |
13501 | 34 |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13518
diff
changeset
|
35 public slots: |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13518
diff
changeset
|
36 /** Tells the widget to notice settings that are probably new. */ |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13518
diff
changeset
|
37 void noticeSettings (); |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
38 void handleVisibilityChanged (bool visible); |
13546
5ef33f99a078
Command get inserted by double clicking in the command history again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13545
diff
changeset
|
39 |
13517
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
40 signals: |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
41 void information (QString message); |
13546
5ef33f99a078
Command get inserted by double clicking in the command history again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13545
diff
changeset
|
42 void commandDoubleClicked (QString command); |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
43 /** Custom signal that tells if a user has clicke away that dock widget. */ |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
44 void activeChanged (bool active); |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
45 protected: |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
46 void closeEvent (QCloseEvent *event); |
13546
5ef33f99a078
Command get inserted by double clicking in the command history again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13545
diff
changeset
|
47 private slots: |
5ef33f99a078
Command get inserted by double clicking in the command history again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13545
diff
changeset
|
48 void handleDoubleClick (QModelIndex modelIndex); |
13501 | 49 |
50 private: | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
51 void construct (); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
52 QListView *m_historyListView; |
13545
ffc2e1d1ad5f
History can be filtered with an input search box while typing.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
53 QLineEdit *m_filterLineEdit; |
ffc2e1d1ad5f
History can be filtered with an input search box while typing.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
54 QSortFilterProxyModel m_sortFilterProxyModel; |
13501 | 55 }; |
56 | |
57 #endif // HISTORYDOCKWIDGET_H |