summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/configdlg.cpp
Unidiff
Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index 2103df9..b12a395 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -8,61 +8,62 @@
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#include "configdlg.h" 17#include "configdlg.h"
18#include "searchmethoddlg.h" 18#include "searchmethoddlg.h"
19 19
20#include <qdialog.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/config.h> 21#include <qpe/config.h>
22#include <qlayout.h>
23 22
23#include <qdialog.h>
24#include <qlayout.h>
24#include <qhbox.h> 25#include <qhbox.h>
25#include <qvbox.h> 26#include <qvbox.h>
26#include <qlabel.h> 27#include <qlabel.h>
27#include <qlistview.h> 28#include <qlistview.h>
28#include <qpushbutton.h> 29#include <qpushbutton.h>
29#include <qlineedit.h> 30#include <qlineedit.h>
30#include <qstringlist.h> 31#include <qstringlist.h>
31 32
32ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal) 33ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal)
33{ 34{
34 setCaption( tr( "Options" ) ); 35 setCaption( tr( "Options" ) );
35 QVBoxLayout *vbox_layout = new QVBoxLayout( this ); 36 QVBoxLayout *vbox_layout = new QVBoxLayout( this );
36 search_tab = new QWidget( this , "search_tab" ); 37 search_tab = new QWidget( this , "search_tab" );
37 QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" ); 38 QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" );
38 39
39 QHBox *hbox = new QHBox( search_tab ); 40 QHBox *hbox = new QHBox( search_tab );
40 list = new QListView( hbox ); 41 list = new QListView( hbox );
41 list->addColumn( tr( "Searchmethod" ) ); 42 list->addColumn( tr( "Searchmethod" ) );
42 loadSearchMethodNames(); 43 loadSearchMethodNames();
43 44
44 QVBox *vbox = new QVBox( hbox ); 45 QVBox *vbox = new QVBox( hbox );
45 new_button = new QPushButton( tr( "New" ) , vbox ); 46 new_button = new QPushButton( tr( "New" ) , vbox );
46 change_button = new QPushButton( tr( "Change" ) , vbox ); 47 change_button = new QPushButton( tr( "Change" ) , vbox );
47 delete_button = new QPushButton( tr( "Delete" ) , vbox ); 48 delete_button = new QPushButton( tr( "Delete" ) , vbox );
48 connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) ); 49 connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) );
49 connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() )); 50 connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() ));
50 connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() )); 51 connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() ));
51 52
52 vbox_layout_searchtab->addWidget( hbox ); 53 vbox_layout_searchtab->addWidget( hbox );
53 54
54 vbox_layout->addWidget( search_tab ); 55 vbox_layout->addWidget( search_tab );
55 56
56 showMaximized(); 57 QPEApplication::execDialog( this );
57} 58}
58 59
59void ConfigDlg::slotNewMethod() 60void ConfigDlg::slotNewMethod()
60{ 61{
61 SearchMethodDlg dlg( this, "SearchMethodDlg", true ); 62 SearchMethodDlg dlg( this, "SearchMethodDlg", true );
62 if ( dlg.exec() == QDialog::Accepted ) 63 if ( dlg.exec() == QDialog::Accepted )
63 { 64 {
64 dlg.saveItem(); 65 dlg.saveItem();
65 QListViewItem *item = new QListViewItem( list ); 66 QListViewItem *item = new QListViewItem( list );
66 item->setText( 0 , dlg.nameLE->text() ); 67 item->setText( 0 , dlg.nameLE->text() );
67 } 68 }
68} 69}