• 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
editsnippet.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 EDITSNIPPET_H
25 #define EDITSNIPPET_H
26 
27 #include <KDialog>
28 
29 namespace KTextEditor
30 {
31 class Document;
32 class View;
33 }
34 
35 class SnippetRepository;
36 class Snippet;
37 
38 class QStandardItemModel;
39 
40 namespace Ui {
41 class EditSnippetBase;
42 }
43 
49 class EditSnippet : public KDialog
50 {
51  Q_OBJECT
52 
53 public:
55  explicit EditSnippet(SnippetRepository* repo, Snippet* snippet, QWidget* parent = 0);
56  virtual ~EditSnippet();
57 
58  void setSnippetText(const QString& text);
59 
60  virtual void reject();
61 
62 private:
63  Ui::EditSnippetBase* m_ui;
64  SnippetRepository* m_repo;
65  Snippet* m_snippet;
66  KTextEditor::View* m_snippetView;
67  KTextEditor::View* m_scriptsView;
68  bool m_topBoxModified;
69 
70 private slots:
71  void save();
72  void validate();
73  void topBoxModified();
74 
75  void slotSnippetDocumentation();
76  void slotScriptDocumentation();
77 };
78 
79 #endif
80 
EditSnippet::~EditSnippet
virtual ~EditSnippet()
Definition: editsnippet.cpp:141
QStandardItemModel
QWidget
KDialog
EditSnippet::reject
virtual void reject()
Definition: editsnippet.cpp:209
EditSnippet::EditSnippet
EditSnippet(SnippetRepository *repo, Snippet *snippet, QWidget *parent=0)
snippet set to 0 when you want to create a new snippet.
Definition: editsnippet.cpp:72
EditSnippet::setSnippetText
void setSnippetText(const QString &text)
Definition: editsnippet.cpp:146
QString
SnippetRepository
Each object of this type represents a repository of snippets.
Definition: snippetrepository.h:52
Snippet
One object of this class represents a single snippet.
Definition: snippet.h:42
EditSnippet
This dialog is used to create/edit snippets in a given repository.
Definition: editsnippet.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:57 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