summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/configdlg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index 89bc6f6..eba7dec 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -55,62 +55,64 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa
change_button = new QPushButton( "Change" , vbox );
delete_button = new QPushButton( "Delete" , vbox );
connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) );
connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() ));
connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() ));
vbox_layout_searchtab->addWidget( hbox );
/*add the tabs and maximize*/
tab->addTab( settings_tab, "pass", tr( "General Settings" ) );
tab->addTab( search_tab, "zoom", tr( "Searchmethods" ) );
showMaximized();
}
void ConfigDlg::writeEntries()
{
qDebug( "richtig beendet" );
}
void ConfigDlg::slotNewMethod()
{
SearchMethodDlg dlg( this, "SearchMethodDlg", true );
if ( dlg.exec() == QDialog::Accepted )
{
+ //if ( !dlg.nameLE->text() ) return; //XXX
dlg.saveItem();
QListViewItem *item = new QListViewItem( list );
item->setText( 0 , dlg.nameLE->text() );
}
else qDebug( "SearchMethodDlg abgebrochen" );
}
void ConfigDlg::slotChangeMethod()
{
if ( list->selectedItem() )
{
SearchMethodDlg dlg( this, "SearchMethodDlg", true, list->selectedItem()->text( 0 ) );
if ( dlg.exec() == QDialog::Accepted )
{
+ //if ( !dlg.nameLE->text() ) return; //XXX geht vielleich nicht
dlg.saveItem();
QListViewItem *item = list->selectedItem();
item->setText( 0 , dlg.nameLE->text() );
}
else qDebug( "SearchMethodDlg abgebrochen" );
}
else qDebug( "kein item angewählt" );
}
void ConfigDlg::slotDeleteMethod()
{
if ( list->selectedItem() )
{
Config cfg ( "odict" );
cfg.setGroup( "Method_"+list->selectedItem()->text(0) );
cfg.clearGroup();
//FIXME: this only removes the entries but not the group itself
list->takeItem( list->selectedItem() );
}
else qDebug("no item selected");
}
void ConfigDlg::loadSearchMethodNames()