summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/odict.cpp
Unidiff
Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/odict/odict.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 857daaa..7f369d4 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -37,81 +37,81 @@
37ODict::ODict() : QMainWindow() 37ODict::ODict() : QMainWindow()
38{ 38{
39 setCaption( tr( "OPIE-Dictionary" ) ); 39 setCaption( tr( "OPIE-Dictionary" ) );
40 setupMenus(); 40 setupMenus();
41 41
42 QHBox *hbox = new QHBox( this ); 42 QHBox *hbox = new QHBox( this );
43 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); 43 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show();
44 query_le = new QLineEdit( hbox ); 44 query_le = new QLineEdit( hbox );
45 ok_button = new QPushButton( tr( "&Ok" ), hbox ); 45 ok_button = new QPushButton( tr( "&Ok" ), hbox );
46 connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); 46 connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) );
47 47
48 setCentralWidget( hbox ); 48 setCentralWidget( hbox );
49} 49}
50 50
51void ODict::slotDisplayAbout() 51void ODict::slotDisplayAbout()
52{ 52{
53 QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 0.1" ) ); 53 QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 0.1" ) );
54} 54}
55 55
56void ODict::slotStartQuery() 56void ODict::slotStartQuery()
57{ 57{
58 QString querystring = query_le->text(); 58 QString querystring = query_le->text();
59} 59}
60 60
61
62void ODict::slotSetErrorcount( int count )
63{
64 count = 1;
65}
66
67void ODict::slotSettings()
68{
69 ConfigDlg dlg( this, "Config" , true);
70 if ( dlg.exec() == QDialog::Accepted )
71 dlg.writeEntries();
72 else qDebug( "abgebrochen" );
73}
74
75void ODict::slotSetParameter( int /*count*/ )
76{
77 //X if ( int == 0 )
78 //X if ( int == 1 )
79 //X if ( int == 2 )
80 //X else qWarning( "ERROR" );
81}
82
61void ODict::setupMenus() 83void ODict::setupMenus()
62{ 84{
63 menu = new QMenuBar( this ); 85 menu = new QMenuBar( this );
64 86
65 settings = new QPopupMenu( menu ); 87 settings = new QPopupMenu( menu );
66 setting_a = new QAction(tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 ); 88 setting_a = new QAction(tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 );
67 connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); 89 connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
68 setting_a->addTo( settings ); 90 setting_a->addTo( settings );
69 setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 ); 91 setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 );
70 connect( setting_b, SIGNAL( activated() ), this, SLOT( slotSearchMethods() ) );
71 setting_b->addTo( settings );
72 92
73 parameter = new QPopupMenu( menu ); 93 parameter = new QPopupMenu( menu );
74 connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) ); 94 connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) );
75 parameter->insertItem( tr( "C&ase sensitive" ), 0 ); 95 parameter->insertItem( tr( "C&ase sensitive" ), 0 );
76 parameter->insertItem( tr( "Only &complete Words" ), 1 ) ; 96 parameter->insertItem( tr( "Only &complete Words" ), 1 ) ;
77 parameter->insertItem( tr( "Allow &reg. expressions" ), 2 ); 97 parameter->insertItem( tr( "Allow &reg. expressions" ), 2 );
78 parameter->insertSeparator(); 98 parameter->insertSeparator();
79 error_tol_menu = new QPopupMenu( menu ); 99 error_tol_menu = new QPopupMenu( menu );
80 error_tol_menu->setCheckable( TRUE ); 100 error_tol_menu->setCheckable( TRUE );
81 connect( error_tol_menu, SIGNAL( activated( int ) ), this, SLOT( slotSetErrorcount( int ) ) ); 101 connect( error_tol_menu, SIGNAL( activated( int ) ), this, SLOT( slotSetErrorcount( int ) ) );
82 102
83 error_tol_menu->insertItem( tr( "0 Errors" ), 0 ); 103 error_tol_menu->insertItem( tr( "0 Errors" ), 0 );
84 error_tol_menu->insertItem( tr( "1 Errors" ), 1 ); 104 error_tol_menu->insertItem( tr( "1 Errors" ), 1 );
85 error_tol_menu->insertItem( tr( "2 Errors" ), 2 ); 105 error_tol_menu->insertItem( tr( "2 Errors" ), 2 );
86 error_tol_menu->insertItem( tr( "3 Errors" ), 3 ); 106 error_tol_menu->insertItem( tr( "3 Errors" ), 3 );
87 error_tol_menu->insertItem( tr( "4 Errors" ), 4 ); 107 error_tol_menu->insertItem( tr( "4 Errors" ), 4 );
88 error_tol_menu->insertItem( tr( "Until Hit" ), 5 ); 108 error_tol_menu->insertItem( tr( "Until Hit" ), 5 );
89 parameter->insertItem( tr( "&Error tolerance" ), error_tol_menu ); 109 parameter->insertItem( tr( "&Error tolerance" ), error_tol_menu );
90 110
91 help = new QPopupMenu( menu ); 111 help = new QPopupMenu( menu );
92 help->insertItem("&About",this,SLOT( slotDisplayAbout() )); 112 help->insertItem("&About",this,SLOT( slotDisplayAbout() ));
93 113
94 menu->insertItem( tr( "Settings" ) , settings ); 114 menu->insertItem( tr( "Settings" ) , settings );
95 menu->insertItem( tr( "Parameter" ) , parameter ); 115 menu->insertItem( tr( "Parameter" ) , parameter );
96 menu->insertItem( tr( "Help" ) , help ); 116 menu->insertItem( tr( "Help" ) , help );
97} 117}
98
99void ODict::slotSetErrorcount( int count )
100{
101}
102
103void ODict::slotSettings()
104{
105 ConfigDlg *dlg = new ConfigDlg( this, "Config" );
106}
107
108void ODict::slotSetParameter( int count )
109{
110 //X if ( int == 0 )
111 //X if ( int == 1 )
112 //X if ( int == 2 )
113 //X else qWarning( "ERROR" );
114}
115
116void ODict::slotSearchMethods(){}
117