author | cniehaus <cniehaus> | 2002-12-29 14:15:31 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-12-29 14:15:31 (UTC) |
commit | 5a0893171cf82ebad8347ab9dbc1193f9fcabda3 (patch) (unidiff) | |
tree | c310a0a1d23087c3eba6d81eb07edc6437d90110 /noncore/apps/odict/configdlg.cpp | |
parent | da7abab7d817a22b8b6680027b6162d68b28ae98 (diff) | |
download | opie-5a0893171cf82ebad8347ab9dbc1193f9fcabda3.zip opie-5a0893171cf82ebad8347ab9dbc1193f9fcabda3.tar.gz opie-5a0893171cf82ebad8347ab9dbc1193f9fcabda3.tar.bz2 |
just in case my harddisk breaks ;) Still there is no real funktional code,
only GUI-work
Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/configdlg.cpp | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp index 2680d7a..75dc735 100644 --- a/noncore/apps/odict/configdlg.cpp +++ b/noncore/apps/odict/configdlg.cpp | |||
@@ -14,13 +14,79 @@ | |||
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 | 19 | ||
19 | #include <qdialog.h> | 20 | #include <qdialog.h> |
20 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
22 | #include <qlayout.h> | ||
21 | 23 | ||
22 | ConfigDlg::ConfigDlg(QWidget *parent, const char *name) : QDialog(parent, name) | 24 | #include <qhbox.h> |
25 | #include <qvbox.h> | ||
26 | #include <qlabel.h> | ||
27 | #include <qlistview.h> | ||
28 | #include <qpushbutton.h> | ||
29 | |||
30 | #include <opie/otabwidget.h> | ||
31 | |||
32 | ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal) | ||
23 | { | 33 | { |
24 | this->show(); | ||
25 | setCaption( tr( "Options" ) ); | 34 | setCaption( tr( "Options" ) ); |
35 | QVBoxLayout *vbox_layout = new QVBoxLayout( this ); | ||
36 | tab = new OTabWidget( this, "OTabWidget_tab", OTabWidget::Global, OTabWidget::Bottom ); | ||
37 | vbox_layout->addWidget( tab ); | ||
38 | |||
39 | /*general settings*/ | ||
40 | settings_tab = new QWidget( tab , "settings_tab" ); | ||
41 | |||
42 | /*searchmethods*/ | ||
43 | search_tab = new QWidget( tab , "search_tab" ); | ||
44 | QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" ); | ||
45 | |||
46 | QHBox *hbox = new QHBox( search_tab ); | ||
47 | list = new QListView( hbox ); | ||
48 | list->addColumn( tr( "Searchmethod" ) ); | ||
49 | QListViewItem *item = new QListViewItem( list ); | ||
50 | item->setText( 0, "foofooofoofoof" ); | ||
51 | |||
52 | QVBox *vbox = new QVBox( hbox ); | ||
53 | new_button = new QPushButton( "New" , vbox ); | ||
54 | change_button = new QPushButton( "Change" , vbox ); | ||
55 | delete_button = new QPushButton( "Delete" , vbox ); | ||
56 | connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) ); | ||
57 | connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() )); | ||
58 | connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() )); | ||
59 | |||
60 | vbox_layout_searchtab->addWidget( hbox ); | ||
61 | |||
62 | /*add the tabs and maximize*/ | ||
63 | tab->addTab( settings_tab, "pass", tr( "General Settings" ) ); | ||
64 | tab->addTab( search_tab, "zoom", tr( "Searchmethods" ) ); | ||
65 | showMaximized(); | ||
66 | } | ||
67 | |||
68 | void ConfigDlg::writeEntries() | ||
69 | { | ||
70 | qDebug( "richtig beendet" ); | ||
71 | } | ||
72 | |||
73 | void ConfigDlg::slotNewMethod() | ||
74 | { | ||
75 | SearchMethodDlg dlg( this, "SearchMethodDlg", true ); | ||
76 | if ( dlg.exec() == QDialog::Accepted ) | ||
77 | { | ||
78 | //dlg.saveItem(); | ||
79 | QListViewItem *item = new QListViewItem( list ); | ||
80 | item->setText( 0 , dlg.itemName ); | ||
81 | } | ||
82 | else qDebug( "SearchMethodDlg abgebrochen" ); | ||
83 | } | ||
84 | |||
85 | void ConfigDlg::slotChangeMethod(){} | ||
86 | |||
87 | void ConfigDlg::slotDeleteMethod() | ||
88 | { | ||
89 | if ( list->selectedItem() ) | ||
90 | list->takeItem( list->selectedItem() ); | ||
91 | else qDebug("no item selected"); | ||
26 | } | 92 | } |