File indexing completed on 2024-04-28 16:26:30
0001 /**************************************************************************************** 0002 begin : Feb 24 2007 0003 copyright : 2007 by Holger Danielsson (holger.danielsson@versanet.de) 0004 2008 - 2009 by Michel Ludwig (michel.ludwig@kdemail.net) 0005 ****************************************************************************************/ 0006 0007 /*************************************************************************** 0008 * * 0009 * This program is free software; you can redistribute it and/or modify * 0010 * it under the terms of the GNU General Public License as published by * 0011 * the Free Software Foundation; either version 2 of the License, or * 0012 * (at your option) any later version. * 0013 * * 0014 ***************************************************************************/ 0015 0016 #ifndef ABBREVIATIONVIEW_H 0017 #define ABBREVIATIONVIEW_H 0018 0019 #include <QLabel> 0020 #include <QString> 0021 #include <QTreeWidget> 0022 0023 //////////////////// KlistView for abbreviations //////////////////// 0024 0025 namespace KileAbbreviation { 0026 class Manager; 0027 } 0028 0029 namespace KileWidget { 0030 0031 class AbbreviationView : public QTreeWidget 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 enum {ALVabbrev = 0, ALVlocal = 1, ALVexpansion = 2}; 0037 enum {ALVnone = 0, ALVadd = 1, ALVedit = 2, ALVdelete = 3}; 0038 0039 explicit AbbreviationView(KileAbbreviation::Manager *manager, QWidget *parent = Q_NULLPTR); 0040 ~AbbreviationView(); 0041 0042 bool findAbbreviation(const QString &abbrev); 0043 0044 Q_SIGNALS: 0045 void sendText(const QString &text); 0046 0047 public Q_SLOTS: 0048 void updateAbbreviations(); 0049 0050 private Q_SLOTS: 0051 void slotItemClicked(QTreeWidgetItem *item, int column); 0052 void slotCustomContextMenuRequested(const QPoint& p); 0053 void slotAddAbbreviation(); 0054 void slotChangeAbbreviation(); 0055 void slotDeleteAbbreviation(); 0056 0057 private: 0058 KileAbbreviation::Manager *m_abbreviationManager; 0059 0060 }; 0061 0062 } 0063 0064 #endif