digiKam
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  * Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2006-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_CAMERA_LIST_H
26 #define DIGIKAM_CAMERA_LIST_H
27 
28 // Qt includes
29 
30 #include <QList>
31 #include <QObject>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 class QString;
38 class QDateTime;
39 class QAction;
40 
41 namespace Digikam
42 {
43 
44 class CameraType;
45 
46 class DIGIKAM_GUI_EXPORT CameraList : public QObject
47 {
48  Q_OBJECT
49 
50 public:
51 
52  CameraList(QObject* const parent, const QString& file);
53  ~CameraList() override;
54 
55  bool load();
56  bool save();
57  void clear();
58 
59  void insert(CameraType* const ctype);
60  void remove(CameraType* const ctype);
61 
62  CameraType* autoDetect(bool& retry);
63  CameraType* find(const QString& title) const;
64  QList<CameraType*>* cameraList() const;
65 
66  bool changeCameraStartIndex(const QString& cameraTitle, int startIndex);
67 
68  static bool findConnectedCamera(int vendorId, int productId, QString& model, QString& port);
69 
70  static CameraList* defaultList();
71 
72 Q_SIGNALS:
73 
75  void signalCameraRemoved(QAction*);
76 
77 private:
78 
79  void insertPrivate(CameraType* const ctype);
80  void removePrivate(CameraType* const ctype);
81 
82 private:
83 
84  static CameraList* m_defaultList;
85 
86  class Private;
87  Private* const d;
88 };
89 
90 } // namespace Digikam
91 
92 #endif // DIGIKAM_CAMERA_LIST_H
Definition: cameralist.h:47
void signalCameraRemoved(QAction *)
void signalCameraAdded(CameraType *)
Definition: cameratype.h:41
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43