digiKam
Loading...
Searching...
No Matches
cameranamehelper.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 : 2009-08-01
7 * Description : camera name helper class
8 *
9 * SPDX-FileCopyrightText: 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QString>
20
21// Local includes
22
23#include "digikam_export.h"
24
25namespace Digikam
26{
27
28class DIGIKAM_GUI_EXPORT CameraNameHelper
29{
30
31public:
32
33 static QString cameraName(const QString& name);
34
35 static QString cameraNameAutoDetected(const QString& name);
36
37 static QString createCameraName(const QString& vendor,
38 const QString& product = QString(),
39 const QString& mode = QString(),
40 bool autoDetected = false);
41
42 static bool sameDevices(const QString& deviceA, const QString& deviceB);
43
44private:
45
46 enum Token
47 {
48 VendorAndProduct = 1,
49 Mode
50 };
51
52private:
53
54 static QString extractCameraNameToken(const QString& cameraName, Token tokenID);
55 static QString parseAndFormatCameraName(const QString& cameraName, bool parseMode, bool autoDetected);
56};
57
58} // namespace Digikam
Definition cameranamehelper.h:29
Definition datefolderview.cpp:34