digiKam
Loading...
Searching...
No Matches
cameralist.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-03
7 * Description : Cameras list container
8 *
9 * SPDX-FileCopyrightText: 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QList>
21#include <QObject>
22
23// Local includes
24
25#include "digikam_export.h"
26
27class QString;
28class QDateTime;
29class QAction;
30
31namespace Digikam
32{
33
34class CameraType;
35
36class DIGIKAM_GUI_EXPORT CameraList : public QObject
37{
38 Q_OBJECT
39
40public:
41
42 CameraList(QObject* const parent, const QString& file);
43 ~CameraList() override;
44
45 bool load();
46 bool save();
47 void clear();
48
49 void insert(CameraType* const ctype);
50 void remove(CameraType* const ctype);
51
52 CameraType* autoDetect(bool& retry);
53 CameraType* find(const QString& title) const;
54 QList<CameraType*>* cameraList() const;
55
56 bool changeCameraStartIndex(const QString& cameraTitle, int startIndex);
57
58 static bool findConnectedCamera(int vendorId, int productId, QString& model, QString& port);
59
60 static CameraList* defaultList();
61
62Q_SIGNALS:
63
65 void signalCameraRemoved(QAction*);
66
67private:
68
69 void insertPrivate(CameraType* const ctype);
70 void removePrivate(CameraType* const ctype);
71
72private:
73
74 static CameraList* m_defaultList;
75
76 class Private;
77 Private* const d = nullptr;
78};
79
80} // namespace Digikam
Definition cameralist.h:37
void signalCameraRemoved(QAction *)
void signalCameraAdded(CameraType *)
Definition cameratype.h:31
Definition datefolderview.cpp:34