digiKam
setupcamera.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 : 2003-02-10
7  * Description : camera setup tab.
8  *
9  * Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2003-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
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)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_SETUP_CAMERA_H
26 #define DIGIKAM_SETUP_CAMERA_H
27 
28 // Qt includes
29 
30 #include <QScrollArea>
31 #include <QString>
32 
33 // Local includes
34 
35 #include "dbusydlg.h"
36 
37 namespace Digikam
38 {
39 
40 class SetupCamera : public QScrollArea
41 {
42  Q_OBJECT
43 
44 public:
45 
47  {
48  OVERWRITE = 0,
50  SKIPFILE
51  };
52 
53 public:
54 
55  explicit SetupCamera(QWidget* const parent = nullptr);
56  ~SetupCamera() override;
57 
58  void applySettings();
59  bool checkSettings();
60 
61  bool useFileMetadata();
62 
63 Q_SIGNALS:
64 
66 
67 private Q_SLOTS:
68 
69  void slotSelectionChanged();
70 
71  void slotAddCamera();
72  void slotRemoveCamera();
73  void slotEditCamera();
74  void slotAutoDetectCamera();
75 
76  void slotAddedCamera(const QString& title, const QString& model,
77  const QString& port, const QString& path);
78  void slotEditedCamera(const QString& title, const QString& model,
79  const QString& port, const QString& path);
80 
81  void slotImportSelectionChanged();
82  void slotAddFilter();
83  void slotRemoveFilter();
84  void slotEditFilter();
85  void slotPreviewItemsClicked();
86  void slotPreviewFullImageSizeClicked();
87 
88 private:
89 
90  void readSettings();
91 
92 private:
93 
94  class Private;
95  Private* const d;
96 };
97 
98 // -------------------------------------------------------------------------
99 
101 {
102  Q_OBJECT
103 
104 public:
105 
106  explicit CameraAutoDetectThread(QObject* const parent);
107  ~CameraAutoDetectThread() override;
108 
109  int result() const;
110  QString model() const;
111  QString port() const;
112 
113 private:
114 
115  void run() override;
116 
117 private:
118 
119  class Private;
120  Private* const d;
121 };
122 
123 } // namespace Digikam
124 
125 #endif // DIGIKAM_SETUP_CAMERA_H
Definition: setupcamera.h:101
int result() const
Definition: setupcamera.cpp:157
QString model() const
Definition: setupcamera.cpp:162
~CameraAutoDetectThread() override
Definition: setupcamera.cpp:145
QString port() const
Definition: setupcamera.cpp:167
CameraAutoDetectThread(QObject *const parent)
Definition: setupcamera.cpp:138
Definition: dbusydlg.h:41
Definition: setupcamera.h:41
~SetupCamera() override
Definition: setupcamera.cpp:628
void signalUseFileMetadataChanged(bool)
void applySettings()
Definition: setupcamera.cpp:730
bool useFileMetadata()
Definition: setupcamera.cpp:633
bool checkSettings()
Definition: setupcamera.cpp:821
SetupCamera(QWidget *const parent=nullptr)
Definition: setupcamera.cpp:284
ConflictRule
Definition: setupcamera.h:47
@ DIFFNAME
Definition: setupcamera.h:49
@ SKIPFILE
Definition: setupcamera.h:50
@ OVERWRITE
Definition: setupcamera.h:48
Definition: datefolderview.cpp:43