Scribus
Open source desktop publishing at your fingertips
picsearchoptions.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef PICSEARCHOPTIONS_H
8 #define PICSEARCHOPTIONS_H
9 
10 #include "scribusapi.h"
11 #include "ui_picsearchoptions.h"
12 
13 class FileSearch;
14 
15 class SCRIBUS_API PicSearchOptions : public QDialog, Ui::PicSearchOptions
16 {
17  Q_OBJECT
18 
19 public:
20  PicSearchOptions(QWidget* parent, const QString & fileName,const QString & searchBase);
21  ~PicSearchOptions() {};
26  const QString &getLastDirSearched () { return m_strLastDirSearched; }
27 
32  const QString &getFileName () { return m_strFileName; }
33 
38  const QStringList &getMatches () { return m_listMatches; }
39 
44  bool getCancelled () { return m_bCancelled; }
45 
46 private slots:
47  void slotChangeSearchDir();
48  void slotSearchPic();
49  void slotSearchPicAborted(bool userCancelled);
50  void slotSearchPicFinished(const QStringList & matches, const QString & fileName);
51 
52 private:
53  QString m_strFileName;
54  QString m_strLastDirSearched;
55  QStringList m_listMatches;
56  bool m_bCancelled;
57 
58 protected:
65  void setSearchButton(bool toCancel, const FileSearch* searcher);
70  void enableGuiWhileSearching (bool enable);
71 };
72 
73 #endif
A class to do a depth-first search for a file in a directory tree efficiently and safely (I hope)...
Definition: filesearch.h:24
const QStringList & getMatches()
Fetch all found matches.
Definition: picsearchoptions.h:38
const QString & getFileName()
Fetch the filename used for the last search.
Definition: picsearchoptions.h:32
bool getCancelled()
Did the user cancel the search?
Definition: picsearchoptions.h:44
Definition: picsearchoptions.h:15
const QString & getLastDirSearched()
Fetch the last used searchBase.
Definition: picsearchoptions.h:26