File indexing completed on 2025-01-05 03:58:23

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-28-04
0007  * Description : first run assistant dialog
0008  *
0009  * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #include "welcomepage.h"
0016 
0017 // Qt includes
0018 
0019 #include <QLabel>
0020 
0021 // KDE includes
0022 
0023 #include <klocalizedstring.h>
0024 
0025 // Local includes
0026 
0027 #include "dlayoutbox.h"
0028 #include "digikam_version.h"
0029 
0030 namespace Digikam
0031 {
0032 
0033 WelcomePage::WelcomePage(QWizard* const dlg)
0034     : DWizardPage(dlg, i18n("Welcome to digiKam %1",
0035                        QLatin1String(digikam_version_short)))
0036 {
0037     DVBox* const vbox   = new DVBox(this);
0038     QLabel* const title = new QLabel(vbox);
0039     title->setWordWrap(true);
0040     QString text        = i18n("<qt>"
0041                                "<p><h1><b>Welcome to digiKam %1</b></h1></p>"
0042                                "<p>digiKam is an advanced digital photo management "
0043                                "application published as open-source.</p>"
0044                                "<p>This assistant will help you to configure first "
0045                                "run settings to be able to use digiKam quickly.</p>"
0046                                "</qt>",
0047                                QLatin1String(digikam_version_short));
0048 
0049 #if defined Q_OS_WIN || defined Q_OS_MACOS
0050 
0051     // Windows settings place.
0052 
0053     QString newPlace = QLatin1String("~/Local Settings/");
0054     QString oldPlace = QLatin1String("~/AppData/Local/");
0055 
0056 #if defined Q_OS_MACOS
0057 
0058     // MacOS settings place.
0059 
0060     newPlace         = QLatin1String("~/Library/Preferences/");
0061     oldPlace         = QLatin1String("~/Library/Preferences/KDE/share/config/");
0062 
0063 #endif
0064 
0065     text.append(i18n(
0066                      "<qt><br/>"
0067                      "<p>You can ignore the following if you use digiKam "
0068                      "for the first time:</p>"
0069                      "<p><b>Transition from digiKam 4</b></p>"
0070                      "<p>Configuration files from digiKam 4 are not "
0071                      "migrated. The old database can still be used, you "
0072                      "just need to choose the same locations for "
0073                      "collections and database in the following dialogs. "
0074                      "It is recommended to create a backup of your database "
0075                      "before proceeding.</p>"
0076                      "<p>The new location for configuration files is "
0077                      "%1 (old %2). "
0078                      "There are unresolved problems reported when re-using old "
0079                      "configuration files, so it is not recommended to do it "
0080                      "for the moment, and at your own risk.</p>"
0081                      "</qt>",
0082                      newPlace,
0083                      oldPlace));
0084 
0085 #endif
0086 
0087     title->setText(text);
0088     setPageWidget(vbox);
0089 }
0090 
0091 WelcomePage::~WelcomePage()
0092 {
0093 }
0094 
0095 } // namespace Digikam
0096 
0097 #include "moc_welcomepage.cpp"