Mercurial > octave
annotate libgui/src/find-files-dialog.h @ 19697:4197fc428c7d
maint: Update copyright notices for 2015.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Feb 2015 14:19:08 -0500 |
parents | ebb3ef964372 |
children | f7084eae3318 |
rev | line source |
---|---|
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
1 /* |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
2 |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17822
diff
changeset
|
3 Copyright (C) 2013-2015 John Donoghue |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
4 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
5 This file is part of Octave. |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
6 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
7 Octave is free software; you can redistribute it and/or modify it |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
8 under the terms of the GNU General Public License as published by the |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
9 Free Software Foundation; either version 3 of the License, or (at your |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
10 option) any later version. |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
11 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
15 for more details. |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
16 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
18 along with Octave; see the file COPYING. If not, see |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
19 <http://www.gnu.org/licenses/>. |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
20 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
21 */ |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17790
diff
changeset
|
22 #if !defined (octave_find_files_dialog_h) |
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17790
diff
changeset
|
23 #define octave_find_files_dialog_h |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
24 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
25 #include <QDialog> |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
26 #include <QModelIndex> |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
27 #include <QFileInfo> |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
28 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
29 class QLineEdit; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
30 class QPushButton; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
31 class QTableView; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
32 class QTimer; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
33 class QDirIterator; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
34 class QCheckBox; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
35 class QStatusBar; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
36 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
37 class find_files_dialog : public QDialog |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
38 { |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
39 Q_OBJECT |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
40 public: |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
41 find_files_dialog (QWidget * parent=0); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
42 virtual ~find_files_dialog (); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
43 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
44 signals: |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
45 void file_selected (const QString &fileName); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
46 void dir_selected (const QString &fileName); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
47 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
48 public slots: |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
16544
diff
changeset
|
49 void set_search_dir (const QString &dir); |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
50 |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
51 private slots: |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
52 void start_find (); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
53 void stop_find (); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
54 void browse_folders (); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
55 void look_for_files (); |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
56 void item_double_clicked (const QModelIndex&); |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
16544
diff
changeset
|
57 void handle_done (int); |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
58 private: |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
16544
diff
changeset
|
59 bool is_match (const QFileInfo &info); |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
60 QLineEdit * _start_dir_edit; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
61 QLineEdit * _file_name_edit; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
62 QPushButton * _stop_button; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
63 QPushButton * _find_button; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
64 QPushButton * _close_button; |
16544
ced9b101723c
Updates to find-file-dialog usage
John Donoghue <john.donoghue@ieee.org>
parents:
16519
diff
changeset
|
65 QPushButton * _browse_button; |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
66 QTableView * _file_list; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
67 QTimer * _timer; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
68 QCheckBox * _recurse_dirs_check; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
69 QCheckBox * _include_dirs_check; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
70 QCheckBox * _name_case_check; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
71 QCheckBox * _contains_text_check; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
72 QCheckBox * _content_case_check; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
73 QLineEdit * _contains_text_edit; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
74 QDirIterator * _dir_iterator; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
75 QStatusBar * _status_bar; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
76 }; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
77 |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17790
diff
changeset
|
78 #endif // octave_find_files_dialog_h |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
79 |