Warning, file /office/kile/src/usermenu/usermenudata.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*********************************************************************************** 0002 Copyright (C) 2011-2012 by Holger Danielsson (holger.danielsson@versanet.de) 0003 (C) 2018 by Michel Ludwig (michel.ludwig@gmail.com) 0004 ***********************************************************************************/ 0005 0006 /*************************************************************************** 0007 * * 0008 * This program is free software; you can redistribute it and/or modify * 0009 * it under the terms of the GNU General Public License as published by * 0010 * the Free Software Foundation; either version 2 of the License, or * 0011 * (at your option) any later version. * 0012 * * 0013 ***************************************************************************/ 0014 0015 #ifndef USERMENUDATA_H 0016 #define USERMENUDATA_H 0017 0018 #include <QStringList> 0019 0020 namespace KileMenu { 0021 0022 class UserMenuData { 0023 0024 public: 0025 0026 enum MenuType { Text=0x00, FileContent=0x01, Program=0x02, Separator=0x03, Submenu=0x04 }; 0027 0028 enum XmlMenuTag { XML_PLAINTEXT = 0x00, 0029 XML_FILENAME = 0x01, 0030 XML_PARAMETER = 0x02, 0031 XML_ICON = 0x03, 0032 XML_SHORTCUT = 0x04, 0033 XML_NEEDSSELECTION = 0x05, 0034 XML_USECONTEXTMENU = 0x06, 0035 XML_REPLACESELECTION = 0x07, 0036 XML_SELECTINSERTION = 0x08, 0037 XML_INSERTOUTPUT = 0x09, 0038 XML_TITLE = 0x0a 0039 }; 0040 0041 UserMenuData(); 0042 virtual ~UserMenuData() {} 0043 0044 void clear(); 0045 0046 MenuType menutype; 0047 QString menutitle; 0048 QString filename; 0049 QString parameter; 0050 QString text; 0051 QString icon; 0052 QString shortcut; 0053 0054 bool needsSelection; 0055 bool useContextMenu; 0056 bool replaceSelection; 0057 bool selectInsertion; 0058 bool insertOutput; 0059 0060 // static lists for xml menu attributes/tags 0061 static QStringList xmlMenuAttrList; 0062 static QStringList xmlMenuTagList; 0063 0064 static UserMenuData::MenuType xmlMenuType(const QString &name); 0065 static QString xmlMenuTypeName(int index); 0066 0067 static int xmlMenuTag(const QString &tag); 0068 static QString xmlMenuTagName(int index); 0069 0070 static QString encodeLineFeed(const QString& string); 0071 static QString decodeLineFeed(const QString& string); 0072 }; 0073 0074 0075 } 0076 0077 #endif