digiKam
scandialog.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 : 2007-09-09
7  * Description : scanner dialog
8  *
9  * Copyright (C) 2007-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) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_SCAN_DIALOG_H
24 #define DIGIKAM_SCAN_DIALOG_H
25 
26 #include <ksane_version.h>
27 
28 // Qt includes
29 
30 #include <QCloseEvent>
31 #include <QWidget>
32 #include <QImage>
33 
34 // Local includes
35 
36 #include "dplugindialog.h"
37 
38 using namespace Digikam;
39 
40 namespace KSaneIface
41 {
42  class KSaneWidget;
43 }
44 
45 using namespace KSaneIface;
46 
48 {
49 
50 class ScanDialog : public DPluginDialog
51 {
52  Q_OBJECT
53 
54 public:
55 
56  explicit ScanDialog(KSaneWidget* const saneWdg,
57  QWidget* const parent = nullptr);
58  ~ScanDialog() override;
59 
60  void setTargetDir(const QString& targetDir);
61 
62 protected:
63 
64  void closeEvent(QCloseEvent*) override;
65 
66 Q_SIGNALS:
67 
68  void signalImportedImage(const QUrl&);
69 
70 private Q_SLOTS:
71 
72 #if KSANE_VERSION < QT_VERSION_CHECK(21,8,0)
73 
74  void slotSaveImage(QByteArray&, int, int, int, int);
75 
76 #else
77 
78  void slotSaveImage(const QImage&);
79 
80 #endif
81 
82  void slotThreadProgress(const QUrl&, int);
83  void slotThreadDone(const QUrl&, bool);
84  void slotDialogFinished();
85 
86 private:
87 
88  class Private;
89  Private* const d;
90 };
91 
92 } // namespace DigikamGenericDScannerPlugin
93 
94 #endif // DIGIKAM_SCAN_DIALOG_H
Definition: scandialog.h:51
Definition: dplugindialog.h:42
Definition: dscannerplugin.cpp:46
Definition: datefolderview.cpp:43