Mercurial > hg > octave-nkf
comparison libgui/src/files-dockwidget.h @ 15196:017f0b2e6933
rename gui directory to libgu
* libgui: Rename from gui.
* .hgsub (libgui/qterminal): Rename from gui/qterminal.
* Makefile.am (GUIDIR): Set to libgui instead of gui if
AMCOND_BUILD_GUI is true.
* configure.ac (AC_CONFIG_FILES): Update list for directory renaming.
* Makefile.am (.NOTPARALLEL): Delete.
List octave.html/index.html as the primary HTML target, not
octave.html.
(octave.html): New target for making the octave.html directory.
(octave.pdf): Depend on octave.dvi.
* images.awk: In generated rules for png files, depend on octave.html,
not octave.html/index.html.
* src/Makefile.am (OCTAVE_GUI_CPPFLAGS, OCTAVE_GUI_LIBS): Update for
directory renaming.
(CLEANFILES): Fix typo.
* fntests.m (src_tree): Use libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 18:10:09 -0400 |
parents | gui/src/files-dockwidget.h@3ff18e21c742 |
children | 359098ad343e |
comparison
equal
deleted
inserted
replaced
15195:2fc554ffbc28 | 15196:017f0b2e6933 |
---|---|
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 /** | |
37 \class files_dock_widget | |
38 \brief Dock widget to display files in the current directory. | |
39 */ | |
40 class files_dock_widget : public QDockWidget | |
41 { | |
42 Q_OBJECT | |
43 public: | |
44 /** Constructs a new files_dock_widget. */ | |
45 files_dock_widget (QWidget *parent = 0); | |
46 | |
47 public slots: | |
48 /** Slot for handling a change in directory via double click. */ | |
49 void item_double_clicked (const QModelIndex & index); | |
50 | |
51 /** Slot for handling the up-directory button in the toolbar. */ | |
52 void do_up_directory (); | |
53 | |
54 /** Sets the current directory being displayed. */ | |
55 void set_current_directory (QString currentDirectory); | |
56 | |
57 /** Accepts user input a the line edit for the current directory. */ | |
58 void handle_directory_entered (); | |
59 | |
60 void display_directory (QString directory); | |
61 | |
62 /** Tells the widget to react on changed settings. */ | |
63 void notice_settings (); | |
64 | |
65 /** Slot to steer changing visibility from outside. */ | |
66 void handle_visibility_changed (bool visible); | |
67 | |
68 signals: | |
69 /** Emitted, whenever the user requested to open a file. */ | |
70 void open_file (QString fileName); | |
71 | |
72 /** Emitted, whenever the currently displayed directory changed. */ | |
73 void displayed_directory_changed (QString directory); | |
74 | |
75 /** Custom signal that tells if a user has clicke away that dock widget. */ | |
76 void active_changed (bool active); | |
77 | |
78 protected: | |
79 void closeEvent (QCloseEvent *event); | |
80 | |
81 private: | |
82 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc | |
83 | |
84 QString _last_current_directory; | |
85 | |
86 /** Toolbar for file and directory manipulation. */ | |
87 QToolBar * _navigation_tool_bar; | |
88 | |
89 /** Variables for the up-directory action. */ | |
90 QIcon _directory_icon; | |
91 QAction * _directory_up_action; | |
92 QToolButton * _up_directory_button; | |
93 | |
94 /** The file system model. */ | |
95 QFileSystemModel *_file_system_model; | |
96 | |
97 /** The file system view. */ | |
98 QTreeView * _file_tree_view; | |
99 QLineEdit * _current_directory; | |
100 }; | |
101 | |
102 #endif // FILESDOCKWIDGET_H |