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

Konsole

  • kde-4.14
  • applications
  • konsole
  • src
KeyBindingEditor.h
Go to the documentation of this file.
1 /*
2  Copyright 2007-2008 by Robert Knight <robertknight@gmail.com>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301 USA.
18 */
19 
20 #ifndef KEYBINDINGEDITOR_H
21 #define KEYBINDINGEDITOR_H
22 
23 // Qt
24 #include <QWidget>
25 
26 class QTableWidgetItem;
27 
28 namespace Ui
29 {
30 class KeyBindingEditor;
31 }
32 
33 namespace Konsole
34 {
35 class KeyboardTranslator;
36 
50 class KeyBindingEditor : public QWidget
51 {
52  Q_OBJECT
53 
54 public:
56  explicit KeyBindingEditor(QWidget* parent = 0);
57  virtual ~KeyBindingEditor();
58 
63  void setup(const KeyboardTranslator* translator);
64 
69  KeyboardTranslator* translator() const;
70 
74  void setDescription(const QString& description);
75 
79  QString description() const;
80 
81  // reimplemented to handle test area input
82  virtual bool eventFilter(QObject* watched , QEvent* event);
83 
84 private slots:
85  void setTranslatorDescription(const QString& description);
86  void bindingTableItemChanged(QTableWidgetItem* item);
87  void removeSelectedEntry();
88  void addNewEntry();
89 
90 private:
91  void setupKeyBindingTable(const KeyboardTranslator* translator);
92 
93  Ui::KeyBindingEditor* _ui;
94 
95  // translator to which modifications are made as the user makes
96  // changes in the UI.
97  // this is initialized as a copy of the translator specified
98  // when setup() is called
99  KeyboardTranslator* _translator;
100 };
101 }
102 
103 #endif //KEYBINDINGEDITOR_H
Konsole::KeyboardTranslator
A converter which maps between key sequences pressed by the user and the character strings which shou...
Definition: KeyboardTranslator.h:52
QEvent
QWidget
Konsole::KeyBindingEditor::eventFilter
virtual bool eventFilter(QObject *watched, QEvent *event)
Definition: KeyBindingEditor.cpp:113
QTableWidgetItem
Konsole::KeyBindingEditor::translator
KeyboardTranslator * translator() const
Returns the modified translator describing the changes to the bindings and other settings which the u...
Definition: KeyBindingEditor.cpp:181
Konsole::KeyBindingEditor::~KeyBindingEditor
virtual ~KeyBindingEditor()
Definition: KeyBindingEditor.cpp:65
Konsole::KeyBindingEditor::setDescription
void setDescription(const QString &description)
Sets the text of the editor's description field.
Definition: KeyBindingEditor.cpp:149
QObject
Konsole::KeyBindingEditor::setup
void setup(const KeyboardTranslator *translator)
Initializes the dialog with the bindings and other settings from the specified translator.
Definition: KeyBindingEditor.cpp:167
QString
Konsole::KeyBindingEditor::description
QString description() const
Returns the text of the editor's description field.
Definition: KeyBindingEditor.cpp:162
Konsole::KeyBindingEditor::KeyBindingEditor
KeyBindingEditor(QWidget *parent=0)
Constructs a new key bindings editor with the specified parent.
Definition: KeyBindingEditor.cpp:32
QObject::parent
QObject * parent() const
QWidget::event
virtual bool event(QEvent *event)
Konsole::KeyBindingEditor
A dialog which allows the user to edit a key bindings list which maps between key combinations input ...
Definition: KeyBindingEditor.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

Skip menu "Konsole"
  • 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