File indexing completed on 2025-01-05 03:53:47

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-08-11
0007  * Description : Raw import settings box
0008  *
0009  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_RAW_SETTINGS_BOX_H
0016 #define DIGIKAM_RAW_SETTINGS_BOX_H
0017 
0018 // Qt includes
0019 
0020 #include <QUrl>
0021 
0022 // Local includes
0023 
0024 #include "editortoolsettings.h"
0025 #include "dimg.h"
0026 #include "curveswidget.h"
0027 
0028 using namespace Digikam;
0029 
0030 namespace DigikamRawImportNativePlugin
0031 {
0032 
0033 class RawSettingsBox : public EditorToolSettings
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     explicit RawSettingsBox(const QUrl& url, QWidget* const parent);
0040     ~RawSettingsBox()                   override;
0041 
0042     void setBusy(bool b)                override;
0043 
0044     CurvesWidget* curvesWidget() const;
0045     DRawDecoding  settings()     const;
0046 
0047     void writeSettings()                override;
0048     void readSettings()                 override;
0049 
0050     void setDemosaicedImage(DImg& img);
0051     void setPostProcessedImage(const DImg& img);
0052 
0053     void resetSettings()                override;
0054 
0055     void enableUpdateBtn(bool b);
0056     bool updateBtnEnabled() const;
0057 
0058 Q_SIGNALS:
0059 
0060     void signalUpdatePreview();
0061     void signalAbortPreview();
0062     void signalPostProcessingChanged();
0063 
0064 private Q_SLOTS:
0065 
0066     void slotDemosaicingChanged();
0067     void slotResetCurve();
0068     void slotFileDialogAboutToOpen();
0069 
0070 private:
0071 
0072     class Private;
0073     Private* const d;
0074 };
0075 
0076 } // namespace DigikamRawImportNativePlugin
0077 
0078 #endif // DIGIKAM_RAW_SETTINGS_BOX_H