GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
find-files-dialog.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2013-2018 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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://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 namespace octave
38 {
39  class find_files_dialog : public QDialog
40  {
41  Q_OBJECT
42 
43  public:
44 
45  find_files_dialog (QWidget *parent = nullptr);
46 
47  virtual ~find_files_dialog (void);
48 
49  void save_settings (void);
50 
51  signals:
52 
53  void file_selected (const QString& fileName);
54  void dir_selected (const QString& fileName);
55 
56  public slots:
57 
58  void set_search_dir (const QString& dir);
59 
60  private slots:
61 
62  void start_find (void);
63  void stop_find (void);
64  void browse_folders (void);
65  void look_for_files (void);
66  void item_double_clicked (const QModelIndex&);
67  void handle_done (int);
68 
69  private:
70 
71  bool is_match (const QFileInfo& info);
72 
80  QTimer *m_timer;
83  QCheckBox *m_name_case_check;
87  QDirIterator *m_dir_iterator;
88  QStatusBar *m_status_bar;
89  };
90 }
91 
92 #endif
void set_search_dir(const QString &dir)
bool is_match(const QFileInfo &info)
void file_selected(const QString &fileName)
find_files_dialog(QWidget *parent=nullptr)
void dir_selected(const QString &fileName)
void item_double_clicked(const QModelIndex &)