File indexing completed on 2024-12-15 04:01:21

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include <QDir>
0010 #include <QString>
0011 #include <QList>
0012 #include <QUrl>
0013 
0014 namespace glaxnimate {
0015 
0016 class AppInfo
0017 {
0018 public:
0019     static AppInfo& instance()
0020     {
0021         static AppInfo singleton;
0022         return singleton;
0023     }
0024 
0025     /**
0026      * \brief Project machine-readable name
0027      */
0028     QString slug() const;
0029 
0030     /**
0031      * \brief Project machine-readable org name
0032      */
0033     QString organization() const;
0034 
0035     /**
0036      * \brief Project version
0037      */
0038     QString version() const;
0039 
0040     /**
0041      * \brief Project human-readable name
0042      */
0043     QString name() const;
0044 
0045     /**
0046      * \brief Documentation URL
0047      */
0048     QUrl url_docs() const;
0049 
0050     /**
0051      * \brief Bug reporting URL
0052      */
0053     QUrl url_issues() const;
0054 
0055     /**
0056      * \brief Donation URL
0057      */
0058     QUrl url_donate() const;
0059 
0060     /**
0061      * \brief Application description
0062      */
0063     QString description() const;
0064 
0065     void init_qapplication() const;
0066 
0067 private:
0068     AppInfo() = default;
0069     ~AppInfo() = default;
0070 
0071 };
0072 
0073 } // namespace glaxnimate