File indexing completed on 2024-04-28 16:26:36
0001 /*************************************************************************************** 0002 begin : Fri Aug 1 2003 0003 copyright : (C) 2002 - 2003 by Pascal Brachet 0004 2003 Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net) 0005 2006 - 2009 Thomas Braun 0006 ***************************************************************************************/ 0007 0008 /*************************************************************************** 0009 * * 0010 * This program is free software; you can redistribute it and/or modify * 0011 * it under the terms of the GNU General Public License as published by * 0012 * the Free Software Foundation; either version 2 of the License, or * 0013 * (at your option) any later version. * 0014 * * 0015 ***************************************************************************/ 0016 0017 #ifndef SYMBOLVIEW_H 0018 #define SYMBOLVIEW_H 0019 0020 #include <QListWidget> 0021 0022 #include <KColorScheme> 0023 0024 #include "../symbolviewclasses.h" 0025 0026 class QMouseEvent; 0027 0028 class KileInfo; 0029 0030 namespace KileWidget { 0031 0032 class SymbolView : public QListWidget 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 explicit SymbolView(KileInfo *kileInfo, QWidget *parent = 0, int type = -1, const char *name = Q_NULLPTR); 0038 ~SymbolView(); 0039 enum { MFUS = 0, Relation, Operator, Arrow, MiscMath, MiscText, Delimiters, Greek, Special, Cyrillic, User }; 0040 void writeConfig(); 0041 0042 private: 0043 void fillWidget(const QString &prefix); 0044 void extractPackageString(const QString &string, QList<Package> &pkgs); 0045 void extract(const QString& key, Command &cmd); 0046 void extract(const QString& key, int& refCnt); 0047 void initPage(int page); 0048 QString getToolTip(const QString &key); 0049 0050 protected: 0051 KileInfo *m_ki; 0052 KStatefulBrush m_brush; 0053 0054 0055 virtual void mousePressEvent(QMouseEvent *event) override; 0056 0057 Q_SIGNALS: 0058 void insertText(const QString& text, const QList<Package> &pkgs); 0059 void addToList(const QListWidgetItem *item); 0060 0061 public Q_SLOTS: 0062 void slotAddToList(const QListWidgetItem *item); 0063 }; 0064 0065 } 0066 0067 #endif