digiKam
dfileselector.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * date : 2014-09-12
7  * Description : a file or folder selector widget
8  *
9  * Copyright (C) 2014-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_DFILE_SELECTOR_H
25 #define DIGIKAM_DFILE_SELECTOR_H
26 
27 // Qt includes
28 
29 #include <QUrl>
30 #include <QString>
31 #include <QLineEdit>
32 #include <QPushButton>
33 
34 // Local includes
35 
36 #include "dlayoutbox.h"
37 #include "dfiledialog.h"
38 #include "digikam_export.h"
39 
40 namespace Digikam
41 {
42 
47 class DIGIKAM_EXPORT DFileSelector : public DHBox
48 {
49  Q_OBJECT
50 
51 public:
52 
53  explicit DFileSelector(QWidget* const parent = nullptr);
54  ~DFileSelector() override;
55 
56  QLineEdit* lineEdit() const;
57 
58  void setFileDlgPath(const QString& path);
59  QString fileDlgPath() const;
60 
61  void setFileDlgMode(QFileDialog::FileMode mode);
62  void setFileDlgFilter(const QString& filter);
63  void setFileDlgTitle(const QString& title);
64  void setFileDlgOptions(QFileDialog::Options opts);
65 
66 Q_SIGNALS:
67 
69  void signalUrlSelected(const QUrl&);
70 
71 private Q_SLOTS:
72 
73  void slotBtnClicked();
74 
75 private:
76 
77  class Private;
78  Private* const d;
79 };
80 
81 } // namespace Digikam
82 
83 #endif // DIGIKAM_DFILE_SELECTOR_H
Definition: dfileselector.h:48
void signalUrlSelected(const QUrl &)
Definition: dlayoutbox.h:45
Definition: datefolderview.cpp:43