Mercurial > hg > octave-lyh
annotate gui/src/FilesDockWidget.h @ 13506:c70511cf64ee
Reformatted to GNU Style.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Sun, 17 Jul 2011 22:59:28 +0200 |
parents | 13e3d60aff2d |
children | 869c62c15e95 |
rev | line source |
---|---|
13504
13e3d60aff2d
Replaced Quint with OctaveGUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13495
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
13495 | 2 * Copyright (C) 2011 John P. Swensen, 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 FILESDOCKWIDGET_H | |
20 #define FILESDOCKWIDGET_H | |
21 | |
22 #include <QListView> | |
23 #include <QDate> | |
24 #include <QObject> | |
25 #include <QWidget> | |
26 #include <QListWidget> | |
27 #include <QFileSystemModel> | |
28 #include <QToolBar> | |
29 #include <QToolButton> | |
30 #include <QVBoxLayout> | |
31 #include <QAction> | |
32 #include <QTreeView> | |
33 | |
34 #include <vector> | |
35 #include <string> | |
36 | |
37 #undef PACKAGE_BUGREPORT | |
38 #undef PACKAGE_NAME | |
39 #undef PACKAGE_STRING | |
40 #undef PACKAGE_TARNAME | |
41 #undef PACKAGE_VERSION | |
42 #include "octave/config.h" | |
43 #include "octave/octave.h" | |
44 #include "octave/str-vec.h" | |
45 #include "octave/cmd-hist.h" | |
46 #include <QDockWidget> | |
47 #include <QLineEdit> | |
48 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
49 class FilesDockWidget:public QDockWidget |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
50 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
51 Q_OBJECT public:FilesDockWidget (QWidget * parent = 0); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
52 public slots: |
13495 | 53 /** Slot for handling a change in directory via double click. */ |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
54 void itemDoubleClicked (const QModelIndex & index); |
13495 | 55 |
56 /** Slot for handling the up-directory button in the toolbar. */ | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
57 void onUpDirectory (); |
13495 | 58 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
59 void setCurrentDirectory (QString currentDirectory); |
13495 | 60 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
61 void currentDirectoryEntered (); |
13495 | 62 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
63 signals:void openFile (QString fileName); |
13495 | 64 |
65 private: | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
66 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc |
13495 | 67 |
68 /** Toolbar for file and directory manipulation. */ | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
69 QToolBar * m_navigationToolBar; |
13495 | 70 |
71 /** Variables for the up-directory action. */ | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
72 QIcon m_directoryIcon; |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
73 QAction *m_directoryUpAction; |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
74 QToolButton *upDirectoryButton; |
13495 | 75 |
76 /** The file system model. */ | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
77 QFileSystemModel *m_fileSystemModel; |
13495 | 78 |
79 /** The file system view. */ | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
80 QTreeView *m_fileTreeView; |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
81 QLineEdit *m_currentDirectory; |
13495 | 82 }; |
83 | |
84 #endif // FILESDOCKWIDGET_H |