Commit fe5f3716 authored by Robert Knight's avatar Robert Knight

Update color scheme and key bindings list correctly after creating a new...

Update color scheme and key bindings list correctly after creating a new scheme/list.  Save new schemes / bindings lists under a different name from the one used as a template.  Get/set the description in the key binding editor.

svn path=/branches/work/konsole-split-view/; revision=661569
parent 19a29d18
This diff is collapsed.
......@@ -143,6 +143,9 @@ private:
void setupScrollingPage(const Profile* info);
void setupAdvancedPage(const Profile* info);
void updateColorSchemeList();
void updateKeyBindingsList();
void showColorSchemeEditor(bool newScheme);
void showKeyBindingEditor(bool newTranslator);
......
......@@ -34,6 +34,9 @@ KeyBindingEditor::KeyBindingEditor(QWidget* parent)
_ui = new Ui::KeyBindingEditor();
_ui->setupUi(this);
// description edit
connect( _ui->descriptionEdit , SIGNAL(textChanged(const QString&)) , this , SLOT(setDescription(const QString&)) );
// key bindings table
_ui->keyBindingTable->setColumnCount(2);
......@@ -50,6 +53,21 @@ KeyBindingEditor::~KeyBindingEditor()
delete _ui;
}
void KeyBindingEditor::setDescription(const QString& newDescription)
{
if ( description() != newDescription )
{
_ui->descriptionEdit->setText(newDescription);
if ( _translator )
_translator->setDescription(newDescription);
}
}
QString KeyBindingEditor::description() const
{
return _ui->descriptionEdit->text();
}
void KeyBindingEditor::setup(const KeyboardTranslator* translator)
{
if ( _translator )
......
......@@ -45,6 +45,11 @@ public:
KeyboardTranslator* translator() const;
QString description() const;
public slots:
void setDescription(const QString& description);
private:
void setupKeyBindingTable(const KeyboardTranslator* translator);
......
......@@ -442,6 +442,10 @@ QString KeyboardTranslator::description() const
{
return _description;
}
void KeyboardTranslator::setName(const QString& name)
{
_name = name;
}
QString KeyboardTranslator::name() const
{
return _name;
......
......@@ -171,6 +171,9 @@ public:
/** Returns the name of this keyboard translator */
QString name() const;
/** Sets the name of this keyboard translator */
void setName(const QString& name);
/** Returns the descriptive name of this keyboard translator */
QString description() const;
......@@ -203,7 +206,7 @@ private:
QMultiHash<int,Entry> _entries; // entries in this keyboard translation,
// entries are indexed according to
// their keycode
const QString _name;
QString _name;
QString _description;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment