• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. The KDE Frameworks
  3. KTextEditor
  • KDE Home
  • Contact Us

Quick Links

Skip menu "KTextEditor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules
  • Dependencies
  • Related Pages

Class Picker

About

Advanced embeddable text editor

Maintainer
Christoph Cullmann
Supported platforms
FreeBSD, Linux, MacOSX, Windows
Community
IRC: #kde-devel on Freenode
Mailing list: kde-frameworks-devel
Use with CMake
find_package(KF5TextEditor)
target_link_libraries(yourapp KF5::TextEditor)
Use with QMake
QT += KTextEditor 
Clone
git clone git://anongit.kde.org/ktexteditor.git
Browse source
KTextEditor on cgit.kde.org

KTextEditor

  • frameworks
  • frameworks
  • ktexteditor
  • src
  • utils
katevariableexpansionmanager.h
1 /* SPDX-License-Identifier: LGPL-2.0-or-later
2 
3  Copyright 2019 Dominik Haumann <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KTEXTEDITOR_VARIABLE_MANAGER
22 #define KTEXTEDITOR_VARIABLE_MANAGER
23 
24 #include <QString>
25 #include <QVector>
26 
27 #include "variable.h"
28 
29 namespace KTextEditor
30 {
31 class View;
32 }
33 
37 class KateVariableExpansionManager : public QObject
38 {
39 public:
43  KateVariableExpansionManager(QObject *parent);
44 
48  bool addVariable(const KTextEditor::Variable &variable);
49 
53  bool removeVariable(const QString &name);
54 
58  KTextEditor::Variable variable(const QString &name) const;
59 
63  const QVector<KTextEditor::Variable> &variables() const;
64 
65  bool expandVariable(const QString &variable, KTextEditor::View *view, QString &output) const;
66 
67  QString expandText(const QString &text, KTextEditor::View *view) const;
68 
69  void showDialog(const QVector<QWidget *> &widgets, const QStringList &names) const;
70 
71 private:
72  QVector<KTextEditor::Variable> m_variables;
73 };
74 
75 #endif // KTEXTEDITOR_VARIABLE_MANAGER
76 
77 // kate: space-indent on; indent-width 4; replace-tabs on;
KTextEditor::Variable
Variable for variable expansion.
Definition: variable.h:49
QObject
KateVariableExpansionManager
Manager class for variable expansion.
Definition: katevariableexpansionmanager.h:37
QString
KTextEditor
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition: katecompletiondelegate.h:27
QStringList
QVector< KTextEditor::Variable >
KTextEditor::variable
virtual QString variable(const QString &name) const
Returns the value for the variable name.
KTextEditor::View
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:153
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sun Dec 15 2019 02:39:12 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

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