File indexing completed on 2023-10-03 03:30:44
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 <QBrush> 0013 // Std 0014 #include <memory> 0015 0016 // LibKMahjongg 0017 #include "libkmahjongg_export.h" 0018 0019 class KMahjonggBackgroundPrivate; 0020 0021 /** 0022 * @class KMahjonggBackground kmahjonggbackground.h <KMahjonggBackground> 0023 * 0024 * A background 0025 */ 0026 class LIBKMAHJONGG_EXPORT KMahjonggBackground 0027 { 0028 public: 0029 KMahjonggBackground(); 0030 ~KMahjonggBackground(); 0031 0032 bool loadDefault(); 0033 bool load(const QString &file, short width, short height); 0034 bool loadGraphics(); 0035 void sizeChanged(int newW, int newH); 0036 QBrush & getBackground(); 0037 QString path() const; 0038 QString authorProperty(const QString &key) const; 0039 0040 private: 0041 std::unique_ptr<KMahjonggBackgroundPrivate> const d; 0042 0043 Q_DISABLE_COPY(KMahjonggBackground) 0044 }; 0045 0046 #endif // KMAHJONGGBACKGROUND_H