File indexing completed on 2024-04-14 04:02:22

0001 /*
0002     SPDX-FileCopyrightText: 1997 Mathias Mueller <in5y158@public.uni-hamburg.de>
0003     SPDX-FileCopyrightText: 2006 Mauricio Piacentini <mauricio@tabuleiro.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef KMAHJONGGBACKGROUND_H
0009 #define KMAHJONGGBACKGROUND_H
0010 
0011 // Qt
0012 #include <QtClassHelperMacros> // Q_DECLARE_PRIVATE
0013 #include <QBrush>
0014 // Std
0015 #include <memory>
0016 
0017 // LibKMahjongg
0018 #include "libkmahjongg_export.h"
0019 
0020 class KMahjonggBackgroundPrivate;
0021 
0022 /**
0023  * @class KMahjonggBackground kmahjonggbackground.h <KMahjonggBackground>
0024  *
0025  * A background
0026  */
0027 class LIBKMAHJONGG_EXPORT KMahjonggBackground
0028 {
0029 public:
0030     KMahjonggBackground();
0031     ~KMahjonggBackground();
0032 
0033     bool loadDefault();
0034     bool load(const QString &file, short width, short height);
0035     bool loadGraphics();
0036     void sizeChanged(int newW, int newH);
0037     QBrush &getBackground();
0038     QString path() const;
0039 
0040     QString name() const;
0041     QString description() const;
0042     QString license() const;
0043     QString copyrightText() const;
0044     QString version() const;
0045     QString website() const;
0046     QString bugReportUrl() const;
0047     QString authorName() const;
0048     QString authorEmailAddress() const;
0049     bool isPlain() const;
0050 
0051 private:
0052     std::unique_ptr<KMahjonggBackgroundPrivate> const d_ptr;
0053     Q_DECLARE_PRIVATE(KMahjonggBackground)
0054     Q_DISABLE_COPY(KMahjonggBackground)
0055 };
0056 
0057 #endif // KMAHJONGGBACKGROUND_H