GNU Octave  8.1.0
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-2023 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 #if ! defined (octave_find_files_dialog_h)
26 #define octave_find_files_dialog_h 1
27 
28 #include <QDialog>
29 #include <QFileInfo>
30 #include <QModelIndex>
31 
32 class QCheckBox;
33 class QDirIterator;
34 class QLineEdit;
35 class QPushButton;
36 class QStatusBar;
37 class QTableView;
38 class QTimer;
39 
41 
42 class base_qobject;
43 
44 class find_files_dialog : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49 
50  find_files_dialog (QWidget *parent, base_qobject& oct_qobj);
51 
52  virtual ~find_files_dialog (void);
53 
54  void save_settings (void);
55 
56 signals:
57 
58  void file_selected (const QString& fileName);
59  void dir_selected (const QString& fileName);
60 
61 public slots:
62 
63  void set_search_dir (const QString& dir);
64 
65 private slots:
66 
67  void start_find (void);
68  void stop_find (void);
69  void browse_folders (void);
70  void look_for_files (void);
71  void item_double_clicked (const QModelIndex&);
72  void handle_done (int);
73 
74 private:
75 
76  bool is_match (const QFileInfo& info);
77 
79 
87  QTimer *m_timer;
90  QCheckBox *m_name_case_check;
94  QDirIterator *m_dir_iterator;
95  QStatusBar *m_status_bar;
96 };
97 
99 
100 #endif
OCTAVE_END_NAMESPACE(octave)
Base class for Octave interfaces that use Qt.
QPushButton * m_close_button
QCheckBox * m_recurse_dirs_check
QCheckBox * m_include_dirs_check
QPushButton * m_browse_button
virtual ~find_files_dialog(void)
void set_search_dir(const QString &dir)
void item_double_clicked(const QModelIndex &)
bool is_match(const QFileInfo &info)
QCheckBox * m_contains_text_check
QLineEdit * m_contains_text_edit
find_files_dialog(QWidget *parent, base_qobject &oct_qobj)
void file_selected(const QString &fileName)
QCheckBox * m_name_case_check
QLineEdit * m_file_name_edit
void dir_selected(const QString &fileName)
QPushButton * m_find_button
QStatusBar * m_status_bar
QPushButton * m_stop_button
QLineEdit * m_start_dir_edit
QDirIterator * m_dir_iterator
base_qobject & m_octave_qobj
QTableView * m_file_list
QCheckBox * m_content_case_check
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn