File indexing completed on 2024-04-14 03:59:45
0001 /*************************************************************************** 0002 * Copyright (C) 2008 by Albert Astals Cid <aacid@kde.org> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 ***************************************************************************/ 0009 #ifndef KIRIKI_ROW_H 0010 #define KIRIKI_ROW_H 0011 #include <QString> 0012 0013 class Row 0014 { 0015 public: 0016 enum Type 0017 { 0018 NamesRow, 0019 EmptyRow, 0020 ScoreRow, 0021 BonusRow, 0022 UpperTotalRow, 0023 LowerTotalRow, 0024 GrandTotalRow 0025 }; 0026 0027 enum Flag 0028 { 0029 NoFlags = 0, 0030 BoldFontFlag = 1, 0031 BiggerFontFlag = 2 0032 }; 0033 Q_DECLARE_FLAGS(Flags, Flag) 0034 0035 explicit Row(Type type, const QString &text = QString(), int scoreRow = -1, Flags flags = NoFlags); 0036 0037 Type type() const; 0038 QString text() const; 0039 int scoreRow() const; 0040 Flags flags() const; 0041 0042 private: 0043 Type m_type; 0044 QString m_text; 0045 int m_scoreRow; 0046 Flags m_flags; 0047 }; 0048 0049 0050 Q_DECLARE_OPERATORS_FOR_FLAGS(Row::Flags) 0051 #endif