GNU Octave  4.2.1
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-2017 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 1
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  void save_settings (void);
44 
45 signals:
46  void file_selected (const QString &fileName);
47  void dir_selected (const QString &fileName);
48 
49 public slots:
50  void set_search_dir (const QString &dir);
51 
52 private slots:
53  void start_find ();
54  void stop_find ();
55  void browse_folders ();
56  void look_for_files ();
57  void item_double_clicked (const QModelIndex&);
58  void handle_done (int);
59 private:
60  bool is_match (const QFileInfo &info);
67  QTableView * _file_list;
68  QTimer * _timer;
69  QCheckBox * _recurse_dirs_check;
70  QCheckBox * _include_dirs_check;
71  QCheckBox * _name_case_check;
72  QCheckBox * _contains_text_check;
73  QCheckBox * _content_case_check;
75  QDirIterator * _dir_iterator;
76  QStatusBar * _status_bar;
77 };
78 
79 #endif
QTableView * _file_list
QPushButton * _close_button
QStatusBar * _status_bar
QPushButton * _browse_button
void set_search_dir(const QString &dir)
QPushButton * _find_button
void file_selected(const QString &fileName)
QCheckBox * _contains_text_check
bool is_match(const QFileInfo &info)
QPushButton * _stop_button
QLineEdit * _contains_text_edit
void item_double_clicked(const QModelIndex &)
QDirIterator * _dir_iterator
QCheckBox * _content_case_check
QLineEdit * _start_dir_edit
find_files_dialog(QWidget *parent=0)
QCheckBox * _recurse_dirs_check
QCheckBox * _name_case_check
void dir_selected(const QString &fileName)
QLineEdit * _file_name_edit
QCheckBox * _include_dirs_check