File indexing completed on 2022-09-27 12:25:41

0001 /*
0002     SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KLTHEME_H
0008 #define KLTHEME_H
0009 #include <QSize>
0010 #include <QColor>
0011 #include <QRect>
0012 
0013 class KLTheme
0014 {
0015 public:
0016     KLTheme();
0017     virtual ~KLTheme();
0018 
0019 
0020     virtual QString name() const = 0;
0021     virtual QString uiName() const = 0;
0022     virtual QString svgFileName() const = 0;
0023     ///returns the color for displaying the letter/syllable
0024     virtual QColor letterColor() const = 0;
0025     ///returns the color for the background of the LineEdit box
0026     virtual QColor backgroundInputColor() const = 0;
0027     ///returns the color for the letter in the LineEdit box
0028     virtual QColor letterInputColor() const = 0;
0029     virtual QRect wordRect(const QSize& windowsize) const = 0;
0030     virtual QRect inputRect(const QSize& windowsize) const = 0;
0031 };
0032 
0033 class KLThemeFactory
0034 {
0035 public:
0036     static KLThemeFactory* instance();
0037     ~KLThemeFactory();
0038 
0039     KLTheme* buildTheme(int id) const;
0040     QStringList themeList() const;
0041 
0042 private:
0043     KLThemeFactory();
0044 };
0045 
0046 #endif