GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
find-files-dialog.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2013 John Donoghue
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 #if !defined (octave_find_files_dialog_h)
23 #define octave_find_files_dialog_h
24 
25 #include <QDialog>
26 #include <QModelIndex>
27 #include <QFileInfo>
28 
29 class QLineEdit;
30 class QPushButton;
31 class QTableView;
32 class QTimer;
33 class QDirIterator;
34 class QCheckBox;
35 class QStatusBar;
36 
37 class find_files_dialog : public QDialog
38 {
39  Q_OBJECT
40 public:
41  find_files_dialog (QWidget * parent=0);
42  virtual ~find_files_dialog ();
43 
44 signals:
45  void file_selected (const QString &fileName);
46  void dir_selected (const QString &fileName);
47 
48 public slots:
49  void set_search_dir (const QString &dir);
50 
51 private slots:
52  void start_find ();
53  void stop_find ();
54  void browse_folders ();
55  void look_for_files ();
56  void item_double_clicked (const QModelIndex&);
57  void handle_done (int);
58 private:
59  bool is_match (const QFileInfo &info);
60  QLineEdit * _start_dir_edit;
61  QLineEdit * _file_name_edit;
66  QTableView * _file_list;
67  QTimer * _timer;
68  QCheckBox * _recurse_dirs_check;
69  QCheckBox * _include_dirs_check;
70  QCheckBox * _name_case_check;
71  QCheckBox * _contains_text_check;
72  QCheckBox * _content_case_check;
73  QLineEdit * _contains_text_edit;
74  QDirIterator * _dir_iterator;
75  QStatusBar * _status_bar;
76 };
77 
78 #endif // octave_find_files_dialog_h
79