Mercurial > hg > octave-nkf
comparison gui/src/files-dockwidget.h @ 14707:674740c44c09 gui
Changed various files to matche file naming conventions.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Thu, 31 May 2012 22:19:53 +0200 |
parents | gui/src/filesdockwidget.h@f86884be20fc |
children | f50591409306 |
comparison
equal
deleted
inserted
replaced
14703:f86884be20fc | 14707:674740c44c09 |
---|---|
1 /* OctaveGUI - A graphical user interface for Octave | |
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) | |
3 * | |
4 * This program is free software: you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as | |
6 * published by the Free Software Foundation, either version 3 of the | |
7 * License, or (at your option) any later version. | |
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 | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 */ | |
17 | |
18 #ifndef FILESDOCKWIDGET_H | |
19 #define FILESDOCKWIDGET_H | |
20 | |
21 #include <QListView> | |
22 #include <QDate> | |
23 #include <QObject> | |
24 #include <QWidget> | |
25 #include <QListWidget> | |
26 #include <QFileSystemModel> | |
27 #include <QToolBar> | |
28 #include <QToolButton> | |
29 #include <QVBoxLayout> | |
30 #include <QAction> | |
31 #include <QTreeView> | |
32 | |
33 #include <QDockWidget> | |
34 #include <QLineEdit> | |
35 | |
36 class FilesDockWidget : public QDockWidget | |
37 { | |
38 Q_OBJECT | |
39 public: | |
40 FilesDockWidget (QWidget *parent = 0); | |
41 | |
42 public slots: | |
43 /** Slot for handling a change in directory via double click. */ | |
44 void itemDoubleClicked (const QModelIndex & index); | |
45 | |
46 /** Slot for handling the up-directory button in the toolbar. */ | |
47 void onUpDirectory (); | |
48 | |
49 void setCurrentDirectory (QString currentDirectory); | |
50 | |
51 void currentDirectoryEntered (); | |
52 | |
53 /** Tells the widget to notice settings that are probably new. */ | |
54 void noticeSettings (); | |
55 void handleVisibilityChanged (bool visible); | |
56 | |
57 signals: | |
58 void openFile (QString fileName); | |
59 | |
60 /** Custom signal that tells if a user has clicke away that dock widget. */ | |
61 void activeChanged (bool active); | |
62 | |
63 protected: | |
64 void closeEvent (QCloseEvent *event); | |
65 | |
66 private: | |
67 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc | |
68 | |
69 /** Toolbar for file and directory manipulation. */ | |
70 QToolBar * m_navigationToolBar; | |
71 | |
72 /** Variables for the up-directory action. */ | |
73 QIcon m_directoryIcon; | |
74 QAction *m_directoryUpAction; | |
75 QToolButton *upDirectoryButton; | |
76 | |
77 /** The file system model. */ | |
78 QFileSystemModel *m_fileSystemModel; | |
79 | |
80 /** The file system view. */ | |
81 QTreeView *m_fileTreeView; | |
82 QLineEdit *m_currentDirectory; | |
83 }; | |
84 | |
85 #endif // FILESDOCKWIDGET_H |