File indexing completed on 2024-04-21 03:41:51
0001 /*************************************************************************** 0002 * Copyright (C) 2004-2007 by Albert Astals Cid * 0003 * aacid@kde.org * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 ***************************************************************************/ 0010 0011 #ifndef DIVISION_H 0012 #define DIVISION_H 0013 0014 #include <QColor> 0015 #include <QString> 0016 0017 class division 0018 { 0019 public: 0020 division(); 0021 0022 enum askMode { eNone = 0, 0023 eClick = 1, 0024 eCapital = 2, 0025 eFlag = 4}; 0026 0027 bool canAsk(askMode am) const; 0028 QString getUntranslatedName() const; 0029 QString getName() const; 0030 QRgb getRGB() const; 0031 QString getFlagFile() const; 0032 QString getBlurredFlagFile() const; 0033 QString getCapital() const; 0034 QStringList getFalseCapitals() const; 0035 QString getFlagForQuestion() const; 0036 0037 void setCapital(const QString &name); 0038 void setFalseCapitals(const QStringList &falseCapitals); 0039 void setCanAsk(int askMode); 0040 void setUntranslatedName(const QString &name); 0041 void setName(const QString &name); 0042 void setRGB(int r, int g, int b); 0043 bool setFlagFile(const QString &path); 0044 bool setBlurredFlagFile(const QString &path); 0045 0046 private: 0047 QString p_untranslatedName, p_name, p_flagFile, p_blurredFlagFile, p_capital; 0048 QStringList p_falseCapitals; 0049 QRgb p_color; 0050 int p_askMode; 0051 }; 0052 0053 #endif