Commit cde18560 authored by Cyrille Berger's avatar Cyrille Berger

implement deletion of programs

svn path=/trunk/koffice/; revision=939901
parent b2d80c93
......@@ -41,6 +41,7 @@ KisDynamicProgramsEditor::KisDynamicProgramsEditor(QWidget* parent, KisBookmarke
m_frameVBoxLayout->setMargin(0);
connect(m_dynamicProgramsEditor->comboBoxPrograms, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(setCurrentProgram(const QString&)));
connect(m_dynamicProgramsEditor->pushButtonAdd, SIGNAL(pressed()), SLOT(addProgram()));
connect(m_dynamicProgramsEditor->pushButtonDelete, SIGNAL(pressed()), SLOT(deleteProgram()));
m_dynamicProgramsEditor->comboBoxPrograms->setModel(m_bookmarksModel);
m_dynamicProgramsEditor->comboBoxProgramsType->setIDList(m_factoryRegistry->programTypes());
}
......@@ -73,6 +74,11 @@ void KisDynamicProgramsEditor::addProgram()
m_bookmarksModel->saveConfiguration(program->name(), program);
}
void KisDynamicProgramsEditor::deleteProgram()
{
m_bookmarksModel->deleteIndex(m_bookmarksModel->index(m_dynamicProgramsEditor->comboBoxPrograms->currentIndex(),0));
}
void KisDynamicProgramsEditor::saveCurrentProgram()
{
dbgPlugins << "saveCurrentProgram " << m_currentProgram->name();
......
......@@ -36,6 +36,7 @@ public:
public slots:
void setCurrentProgram(const QString& text);
void addProgram();
void deleteProgram();
void saveCurrentProgram();
private:
Ui_DynamicProgramsEditor* m_dynamicProgramsEditor;
......
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