• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • snippet
snippetview.h
Go to the documentation of this file.
1 /* This file is part of the Kate project.
2  * Based on the snippet plugin from KDevelop 4.
3  *
4  * Copyright (C) 2007 Robert Gruber <rgruber@users.sourceforge.net>
5  * Copyright (C) 2010 Milian Wolff <mail@milianw.de>
6  * Copyright (C) 2012 Christoph Cullmann <cullmann@kde.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public License
19  * along with this library; see the file COPYING.LIB. If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef SNIPPETVIEW_H
25 #define SNIPPETVIEW_H
26 
27 #include "ui_snippetview.h"
28 
29 class SnippetFilterProxyModel;
30 class QStandardItem;
31 class KateSnippetGlobal;
32 class KAction;
33 
39 class SnippetView : public QWidget, public Ui::SnippetViewBase
40 {
41  Q_OBJECT
42 
43 public:
44  explicit SnippetView(KateSnippetGlobal* plugin, QWidget* parent = 0);
45  virtual ~SnippetView();
46 
47 private slots:
51  void slotAddRepo();
52 
56  void slotEditRepo();
57 
61  void slotRemoveRepo();
62 
66  void slotSnippetClicked(const QModelIndex & index);
67 
71  void slotEditSnippet();
72 
76  void slotRemoveSnippet();
77 
81  void slotAddSnippet();
82 
86  void slotGHNS();
87 
91  void slotSnippetToGHNS();
92 
96  void slotFilterChanged();
97 
98  void contextMenu (const QPoint & pos);
100  void validateActions();
101 
103  virtual bool eventFilter(QObject* , QEvent* );
104 private:
105  QStandardItem* currentItem();
106 
107  KateSnippetGlobal* m_plugin;
108  SnippetFilterProxyModel* m_proxy;
109 
110  KAction* m_addRepoAction;
111  KAction* m_removeRepoAction;
112  KAction* m_editRepoAction;
113  KAction* m_addSnippetAction;
114  KAction* m_removeSnippetAction;
115  KAction* m_editSnippetAction;
116  KAction* m_getNewStuffAction;
117  KAction* m_putNewStuffAction;
118 };
119 
120 #endif
121 
QModelIndex
QEvent
QWidget
SnippetView
This class gets embedded into the right tool view by the KateSnippetGlobal.
Definition: snippetview.h:39
QPoint
SnippetFilterProxyModel
Definition: snippetfilterproxymodel.h:30
QObject
QWidget::pos
QPoint pos() const
KateSnippetGlobal
This is the main class of KDevelop's snippet plugin.
Definition: katesnippetglobal.h:39
KAction
SnippetView::SnippetView
SnippetView(KateSnippetGlobal *plugin, QWidget *parent=0)
Definition: snippetview.cpp:45
QStandardItem
QObject::parent
QObject * parent() const
SnippetView::~SnippetView
virtual ~SnippetView()
Definition: snippetview.cpp:110
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal