digiKam
cpfindbinary.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 : 2011-05-23
7  * Description : Autodetects cpfind binary program and version
8  *
9  * Copyright (C) 2011-2016 by Benjamin Girault <benjamin dot girault at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_CPFIND_BINARY_H
24 #define DIGIKAM_CPFIND_BINARY_H
25 
26 // Qt includes
27 
28 #include <QRegularExpression>
29 
30 // Local includes
31 
32 #include "dbinaryiface.h"
33 
34 using namespace Digikam;
35 
37 {
38 
39 class CPFindBinary : public DBinaryIface
40 {
41  Q_OBJECT
42 
43 public:
44 
45  explicit CPFindBinary(QObject* const parent = nullptr)
46  : DBinaryIface(QLatin1String("cpfind"),
47  QLatin1String("2010.4"),
48  QString(),
49  0,
50  QLatin1String("Hugin"),
51  QLatin1String("http://hugin.sourceforge.net/download/"), // krazy:exclude=insecurenet
52  QLatin1String("Panorama"),
53  QStringList(QLatin1String("--version"))
54  ),
55  headerRegExp(QLatin1String("^Hugin'?s cpfind( Pre-Release)? (\\d+\\.\\d+(\\.\\d+)?)(\\D.*)?$"))
56  {
57  Q_UNUSED(parent);
58  setup();
59  }
60 
61  ~CPFindBinary() override
62  {
63  }
64 
65 protected:
66 
67  bool parseHeader(const QString& output) override;
68 
69 private:
70 
71  QRegularExpression headerRegExp;
72 };
73 
74 } // namespace DigikamGenericPanoramaPlugin
75 
76 #endif // DIGIKAM_CPFIND_BINARY_H
Definition: cpfindbinary.h:40
~CPFindBinary() override
Definition: cpfindbinary.h:61
CPFindBinary(QObject *const parent=nullptr)
Definition: cpfindbinary.h:45
Definition: dbinaryiface.h:46
Definition: panoactions.h:36
Definition: datefolderview.cpp:43