Mercurial > hg > octave-nkf
annotate gui/src/HistoryDockWidget.h @ 13674:c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Sun, 25 Sep 2011 10:52:42 +0200 |
parents | e440b3f32f02 |
children | f27573828e92 |
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 |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) |
13501 | 3 * |
4 * This program is free software: you can redistribute it and/or modify | |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
5 * it under the terms of the GNU Affero General Public License as |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
6 * published by the Free Software Foundation, either version 3 of the |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
7 * License, or (at your option) any later version. |
13501 | 8 * |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
12 * GNU Affero General Public License for more details. |
13501 | 13 * |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
14 * You should have received a copy of the GNU Affero General Public License |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
13501 | 16 */ |
17 | |
18 #ifndef HISTORYDOCKWIDGET_H | |
19 #define HISTORYDOCKWIDGET_H | |
20 | |
21 #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
|
22 #include <QLineEdit> |
13501 | 23 #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
|
24 #include <QSortFilterProxyModel> |
13518
bace956a3724
Put history model part into OctaveLink.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
25 #include "OctaveLink.h" |
13501 | 26 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
27 class HistoryDockWidget:public QDockWidget |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
28 { |
13517
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
29 Q_OBJECT |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
30 public: |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
31 HistoryDockWidget (QWidget *parent = 0); |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
32 void updateHistory (QStringList history); |
13501 | 33 |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13518
diff
changeset
|
34 public slots: |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13518
diff
changeset
|
35 /** 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
|
36 void noticeSettings (); |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
37 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
|
38 |
13517
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
39 signals: |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
40 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
|
41 void commandDoubleClicked (QString command); |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
42 /** 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
|
43 void activeChanged (bool active); |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
44 protected: |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13547
diff
changeset
|
45 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
|
46 private slots: |
5ef33f99a078
Command get inserted by double clicking in the command history again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13545
diff
changeset
|
47 void handleDoubleClick (QModelIndex modelIndex); |
13501 | 48 |
49 private: | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
50 void construct (); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
51 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
|
52 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
|
53 QSortFilterProxyModel m_sortFilterProxyModel; |
13501 | 54 }; |
55 | |
56 #endif // HISTORYDOCKWIDGET_H |