annotate libgui/src/find-files-dialog.h @ 24011:9107bae20480

style fixes for some GUI source files * color-picker.cc, color-picker.h, documentation-dock-widget.cc, documentation-dock-widget.h, external-editor-interface.cc, external-editor-interface.h, find-files-dialog.cc, find-files-dialog.h, find-files-model.cc, find-files-model.h, history-dock-widget.cc, history-dock-widget.h, settings-dialog.cc, settings-dialog.h, terminal-dock-widget.cc, thread-manager.cc, thread-manager.h: Use m_ prefix for member variables, order functions consistently in header and source files, and follow more Octave coding conventions.
author John W. Eaton <jwe@octave.org>
date Wed, 06 Sep 2017 09:25:46 -0400
parents 21baad6b35c4
children 194eb4bd202b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
23219
3ac9f9ecfae5 maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents: 23083
diff changeset
3 Copyright (C) 2013-2017 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
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
8 under the terms of the GNU General Public License as published by
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
9 the Free Software Foundation; either version 3 of the License, or
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
10 (at your option) any later version.
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
11
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
12 Octave is distributed in the hope that it will be useful, but
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22411
diff changeset
15 GNU General Public License for more details.
16519
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 */
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
22 #if ! defined (octave_find_files_dialog_h)
21203
710e700cdd7f maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents: 20945
diff changeset
23 #define octave_find_files_dialog_h 1
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
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
40
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
41 public:
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
42
23457
21baad6b35c4 maint: Use C++11 nullptr rather than 0 or NULL when possible.
Rik <rik@octave.org>
parents: 23433
diff changeset
43 find_files_dialog (QWidget *parent = nullptr);
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
44
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
45 virtual ~find_files_dialog (void);
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
46
22177
6e9f5408c0db Save settings in Qt convention, delete all children in destructors (bug #45366)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 21203
diff changeset
47 void save_settings (void);
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
48
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
49 signals:
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
50
23433
c9fab0bc983e maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents: 23432
diff changeset
51 void file_selected (const QString& fileName);
c9fab0bc983e maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents: 23432
diff changeset
52 void dir_selected (const QString& fileName);
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
53
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
54 public slots:
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
55
23433
c9fab0bc983e maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents: 23432
diff changeset
56 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
57
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
58 private slots:
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
59
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
60 void start_find (void);
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
61 void stop_find (void);
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
62 void browse_folders (void);
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
63 void look_for_files (void);
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
64 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
65 void handle_done (int);
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
66
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
67 private:
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
68
23433
c9fab0bc983e maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents: 23432
diff changeset
69 bool is_match (const QFileInfo& info);
24011
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
70
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
71 QLineEdit *m_start_dir_edit;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
72 QLineEdit *m_file_name_edit;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
73 QPushButton *m_stop_button;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
74 QPushButton *m_find_button;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
75 QPushButton *m_close_button;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
76 QPushButton *m_browse_button;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
77 QTableView *m_file_list;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
78 QTimer *m_timer;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
79 QCheckBox *m_recurse_dirs_check;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
80 QCheckBox *m_include_dirs_check;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
81 QCheckBox *m_name_case_check;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
82 QCheckBox *m_contains_text_check;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
83 QCheckBox *m_content_case_check;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
84 QLineEdit *m_contains_text_edit;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
85 QDirIterator *m_dir_iterator;
9107bae20480 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
86 QStatusBar *m_status_bar;
16519
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
87 };
3e8fd0c479b4 Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
88
20945
9d9270e2f98f eliminate comments after preprocessor conditionals
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
89 #endif