Files
konsole/src/KeyBindingEditor.ui
Ahmad Samir 581df2a23a Improve the Keyboard tab and the KeyBindings editor
Summary:
- Change updateKeyBindingsList() to select the last edited keybindings
  scheme after closing the editor dialog
- Add a tooltip showing the path of each keybinding scheme, this should
  lessen the confusion when the scheme description and the file name of
  the .keytab file are different
- Add a button to the Keyboard tab to reset a scheme to its default
  values, this is only applicable for schemes that exist in both
  system-wide and user specific locations
- Move a lot of the construction of the keybinding editor widgets from
  EditProfileDialog to  KeyBindingEditor
- Change the wording from "key bindings list" to "key bindings scheme"
  to differentiate between a keyboard translator "scheme" and the key
  bindings "list" on the Keyboard tab

KeyBindingEditor:
- Make the KeyBindingEditor a QDialog and set Qt::WA_DeleteOnClose
- Disallow saving a scheme with an empty description
- Add a QLineEdit to show only the rows that have strings matching the
  text entered in the line edit box
- Reimplement sizeHint() to make the dialog slightly smaller than the
  Edit Profile dialog, for better visibility of the entries

KeyboardTranslatorManager:
- Make findTranslatorPath() const and public
- Make allTranslators() return type const

Test Plan:
- Editing a key bindings scheme works and closing the dialog selects the edited scheme
- Creating a new scheme works as before
- "Defaults" button works for system-wide schemes if they were previously edited and saved under the user's home dir
- Remove button is only enabled for schemes saved in a dir writable for the user

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: konsole-devel, #konsole

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D12981
2018-05-22 19:11:15 -04:00

150 lines
3.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KeyBindingEditor</class>
<widget class="QWidget" name="KeyBindingEditor">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>374</width>
<height>530</height>
</rect>
</property>
<layout class="QVBoxLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="descriptionLabel">
<property name="text">
<string>Description:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="descriptionEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="filterLabel">
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="filterEdit"/>
</item>
</layout>
</item>
<item>
<widget class="QTableWidget" name="keyBindingTable">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QPushButton" name="addEntryButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="removeEntryButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string comment="Title of the area where you test your keys are properly configured">Test Area</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Input:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="testAreaInputEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Output:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="testAreaOutputEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>