digiKam
dbengineconfigloader.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-06-27
7  * Description : Database Engine element configuration loader
8  *
9  * Copyright (C) 2009-2010 by Holger Foerster <hamsi2k at freenet dot de>
10  * Copyright (C) 2010-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_DB_ENGINE_CONFIG_LOADER_H
26 #define DIGIKAM_DB_ENGINE_CONFIG_LOADER_H
27 
28 #include "dbengineconfigsettings.h"
29 
30 // Qt includes
31 
32 #include <QString>
33 #include <QMap>
34 #include <QDomElement>
35 
36 // Local includes
37 
38 #include "digikam_export.h"
39 
40 namespace Digikam
41 {
42 
43 class DIGIKAM_EXPORT DbEngineConfigSettingsLoader
44 {
45 public:
46 
47  explicit DbEngineConfigSettingsLoader(const QString& filepath, int xmlVersion);
48 
49  bool readConfig(const QString& filepath, int xmlVersion);
50  DbEngineConfigSettings readDatabase(QDomElement& databaseElement);
51 
52  void readDBActions(QDomElement& sqlStatementElements, DbEngineConfigSettings& configElement);
53 
54 public:
55 
56  bool isValid;
57  QString errorMessage;
58  QMap<QString, DbEngineConfigSettings> databaseConfigs;
59 };
60 
61 } // namespace Digikam
62 
63 #endif // DIGIKAM_DB_ENGINE_CONFIG_LOADER_H
Definition: dbengineconfigloader.h:44
QMap< QString, DbEngineConfigSettings > databaseConfigs
Definition: dbengineconfigloader.h:58
bool isValid
Definition: dbengineconfigloader.h:56
QString errorMessage
Definition: dbengineconfigloader.h:57
Definition: dbengineconfigsettings.h:40
Definition: datefolderview.cpp:43