1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2009-28-04
7 * Description : first run assistant dialog
8 *
9 * Copyright (C) 2009-2021 by Gilles Caulier <caulier dot gilles 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)
15 * any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * ============================================================ */
23
24 #include "welcomepage.h"
25
26 // Qt includes
27
28 #include <QLabel>
29
30 // KDE includes
31
32 #include <klocalizedstring.h>
33
34 // Local includes
35
36 #include "dlayoutbox.h"
37 #include "digikam_version.h"
38
39 namespace Digikam
40 {
41
WelcomePage(QWizard * const dlg)42 WelcomePage::WelcomePage(QWizard* const dlg)
43 : DWizardPage(dlg, i18n("Welcome to digiKam %1",
44 QLatin1String(digikam_version_short)))
45 {
46 DVBox* const vbox = new DVBox(this);
47 QLabel* const title = new QLabel(vbox);
48 title->setWordWrap(true);
49 QString text = i18n("<qt>"
50 "<p><h1><b>Welcome to digiKam %1</b></h1></p>"
51 "<p>digiKam is an advanced digital photo management "
52 "application published as open-source.</p>"
53 "<p>This assistant will help you to configure first "
54 "run settings to be able to use digiKam quickly.</p>"
55 "</qt>",
56 QLatin1String(digikam_version_short));
57
58 #if defined Q_OS_WIN || defined Q_OS_MACOS
59
60 // Windows settings place.
61
62 QString newPlace = QLatin1String("~/Local Settings/");
63 QString oldPlace = QLatin1String("~/AppData/Local/");
64
65 #if defined Q_OS_MACOS
66
67 // MacOS settings place.
68
69 newPlace = QLatin1String("~/Library/Preferences/");
70 oldPlace = QLatin1String("~/Library/Preferences/KDE/share/config/");
71
72 #endif
73
74 text.append(i18n(
75 "<qt><br/>"
76 "<p>You can ignore the following if you use digiKam "
77 "for the first time:</p>"
78 "<p><b>Transition from digiKam 4</b></p>"
79 "<p>Configuration files from digiKam 4 are not "
80 "migrated. The old database can still be used, you "
81 "just need to choose the same locations for "
82 "collections and database in the following dialogs. "
83 "It is recommended to create a backup of your database "
84 "before proceeding.</p>"
85 "<p>The new location for configuration files is "
86 "%1 (old %2). "
87 "There are unresolved problems reported when re-using old "
88 "configuration files, so it is not recommended to do it "
89 "for the moment, and at your own risk.</p>"
90 "</qt>",
91 newPlace,
92 oldPlace));
93
94 #endif
95
96 title->setText(text);
97 setPageWidget(vbox);
98 }
99
~WelcomePage()100 WelcomePage::~WelcomePage()
101 {
102 }
103
104 } // namespace Digikam
105