File indexing completed on 2024-04-21 04:34:25
0001 /* 0002 Copyright (C) 2009 Niko Sams <niko.sams@gmail.com> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License version 2 as published by the Free Software Foundation. 0007 0008 This library is distributed in the hope that it will be useful, 0009 but WITHOUT ANY WARRANTY; without even the implied warranty of 0010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0011 Library General Public License for more details. 0012 0013 You should have received a copy of the GNU Library General Public License 0014 along with this library; see the file COPYING.LIB. If not, write to 0015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0016 Boston, MA 02110-1301, USA. 0017 */ 0018 0019 #ifndef CSS_CONTENTASSISTDATA_H 0020 #define CSS_CONTENTASSISTDATA_H 0021 0022 #include <QString> 0023 #include <QHash> 0024 #include <QMap> 0025 0026 class QXmlStreamReader; 0027 namespace Css { 0028 0029 class ContentAssistData 0030 { 0031 public: 0032 struct Browser { 0033 QString platform; 0034 QString version; 0035 QString os; 0036 QString description; 0037 }; 0038 struct Element { 0039 QString name; 0040 QString fullName; 0041 QString description; 0042 QList<Browser> browsers; 0043 QString example; 0044 QString remarks; 0045 QList<QString> fields; 0046 }; 0047 struct Value { 0048 QString name; 0049 QString description; 0050 }; 0051 struct Field { 0052 QString name; 0053 QString type; 0054 QString hint; 0055 QString description; 0056 QMap<QString, Value> values; 0057 QList<Browser> browsers; 0058 QString example; 0059 QString remarks; 0060 }; 0061 0062 static ContentAssistData *self(); 0063 0064 Element element(const QString &name); 0065 Field field(const QString &name); 0066 QStringList elements(); 0067 private: 0068 ContentAssistData(); 0069 QList<Browser> readBrowsers(QXmlStreamReader &xml); 0070 QHash<QString, Element> m_elements; 0071 QHash<QString, Field> m_fields; 0072 }; 0073 0074 } 0075 0076 #endif // CSS_CONTENTASSISTDATA_H