digiKam
dngwriter.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 : 2008-09-25
7  * Description : a tool to convert RAW file to DNG
8  *
9  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010 by Jens Mueller <tschenser at gmx dot de>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) 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_DNG_WRITER_H
25 #define DIGIKAM_DNG_WRITER_H
26 
27 // Qt includes
28 
29 #include <QString>
30 
31 // Local includes
32 
33 #include "drawdecoder.h"
34 #include "digikam_export.h"
35 
36 namespace Digikam
37 {
38 
39 class DIGIKAM_EXPORT DNGWriter
40 {
41 
42 public:
43 
45  {
46  NONE = 0,
48  FULL_SIZE
49  };
50 
52  {
53  PROCESS_CONTINUE = 1,
54  PROCESS_COMPLETE = 0,
55  PROCESS_FAILED = -1,
56  PROCESS_CANCELED = -2,
57  FILE_NOT_SUPPORTED = -3,
58  DNG_SDK_INTERNAL_ERROR = -4
59  };
60 
61 public:
62 
63  explicit DNGWriter();
64  ~DNGWriter();
65 
66  void setInputFile(const QString& filePath);
67  void setOutputFile(const QString& filePath);
68 
69  QString inputFile() const;
70  QString outputFile() const;
71 
72  void setCompressLossLess(bool b);
73  bool compressLossLess() const;
74 
75  void setUpdateFileDate(bool b);
76  bool updateFileDate() const;
77 
78  void setBackupOriginalRawFile(bool b);
79  bool backupOriginalRawFile() const;
80 
81  void setPreviewMode(int mode);
82  int previewMode() const;
83 
84  int convert();
85  void cancel();
86  void reset();
87 
88 public:
89 
90  static QString xmpSdkVersion();
91  static QString dngSdkVersion();
92 
93 public:
94 
95  // Declared public for DNGWriterHost class.
96  class Private;
97 
98 private:
99 
100  // Disable
101  DNGWriter(const DNGWriter&) = delete;
102  DNGWriter& operator=(const DNGWriter&) = delete;
103 
104 private:
105 
106  Private* const d;
107 };
108 
109 } // namespace Digikam
110 
111 #endif // DIGIKAM_DNG_WRITER_H
Definition: dngwriter.h:40
ConvertError
Definition: dngwriter.h:52
JPEGPreview
Definition: dngwriter.h:45
@ MEDIUM
A medium size preview will be generated.
Definition: dngwriter.h:47
@ NONE
Definition: dngconverteractions.h:44
Definition: datefolderview.cpp:43