summaryrefslogtreecommitdiff
path: root/noncore/apps/odict
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp22
-rw-r--r--noncore/apps/odict/configdlg.h2
-rw-r--r--noncore/apps/odict/odict.cpp12
-rw-r--r--noncore/apps/odict/odict.h2
-rw-r--r--noncore/apps/odict/odict.pro2
-rw-r--r--noncore/apps/odict/opie-odict.control2
6 files changed, 10 insertions, 32 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index 400298d..2103df9 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -26,46 +26,36 @@
#include <qlabel.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qstringlist.h>
-#include <opie/otabwidget.h>
-
ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal)
{
setCaption( tr( "Options" ) );
QVBoxLayout *vbox_layout = new QVBoxLayout( this );
- tab = new OTabWidget( this, "OTabWidget_tab", OTabWidget::Global, OTabWidget::Bottom );
- vbox_layout->addWidget( tab );
-
- /*general settings*/
- settings_tab = new QWidget( tab , "settings_tab" );
-
- /*searchmethods*/
- search_tab = new QWidget( tab , "search_tab" );
+ search_tab = new QWidget( this , "search_tab" );
QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" );
QHBox *hbox = new QHBox( search_tab );
list = new QListView( hbox );
list->addColumn( tr( "Searchmethod" ) );
loadSearchMethodNames();
QVBox *vbox = new QVBox( hbox );
- new_button = new QPushButton( "New" , vbox );
- change_button = new QPushButton( "Change" , vbox );
- delete_button = new QPushButton( "Delete" , vbox );
+ new_button = new QPushButton( tr( "New" ) , vbox );
+ change_button = new QPushButton( tr( "Change" ) , vbox );
+ delete_button = new QPushButton( tr( "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" ) );
+ vbox_layout->addWidget( search_tab );
+
showMaximized();
}
void ConfigDlg::slotNewMethod()
{
SearchMethodDlg dlg( this, "SearchMethodDlg", true );
diff --git a/noncore/apps/odict/configdlg.h b/noncore/apps/odict/configdlg.h
index e3ef3ce..6c85989 100644
--- a/noncore/apps/odict/configdlg.h
+++ b/noncore/apps/odict/configdlg.h
@@ -5,13 +5,12 @@
* the Free Software Foundation; either version 2 of the License, or *
* ( at your option ) any later version. *
* *
**************************************************************************/
class QWidget;
-class OTabWidget;
class QListView;
class QPushButton;
#include <qdialog.h>
class ConfigDlg : public QDialog
@@ -19,13 +18,12 @@ class ConfigDlg : public QDialog
Q_OBJECT
public:
ConfigDlg(QWidget *parent, const char *name, bool modal=FALSE );
private:
- OTabWidget *tab;
QWidget *settings_tab, *search_tab;
QListView *list;
QPushButton *new_button, *change_button, *delete_button;
void loadSearchMethodNames();
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 2028701..010545e 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -38,13 +38,13 @@
ODict::ODict() : QMainWindow()
{
activated_name = QString::null;
vbox = new QVBox( this );
- setCaption( tr( "OPIE-Dictionary" ) );
+ setCaption( tr( "Opie-Dictionary" ) );
setupMenus();
QHBox *hbox = new QHBox( vbox );
QLabel* query_label = new QLabel( tr( "Query:" ) , hbox );
query_label->show();
query_le = new QLineEdit( hbox );
@@ -73,13 +73,12 @@ void ODict::loadConfig()
*/
QString lastname;
Config cfg ( "odict" );
cfg.setGroup( "generalsettings" );
casesens = cfg.readEntry( "casesens" ).toInt();
- regexp = cfg.readEntry( "regexp" ).toInt();
QString lastDict = cfg.readEntry( "lastdict" );
int i = 0, e = 0;
QStringList groupListCfg = cfg.groupList().grep( "Method_" );
query_co->clear();
@@ -124,13 +123,12 @@ void ODict::lookupLanguageNames( QString dictname )
void ODict::saveConfig()
{
Config cfg ( "odict" );
cfg.setGroup( "generalsettings" );
cfg.writeEntry( "casesens" , casesens );
- cfg.writeEntry( "regexp" , regexp );
cfg.writeEntry( "lastdict" , query_co->currentText() );
}
void ODict::slotStartQuery()
{
QString querystring = query_le->text();
@@ -182,19 +180,12 @@ void ODict::slotSetParameter( int count )
if ( casesens )
casesens = false;
else
casesens = true;
}
- if ( count == 1 )
- {
- if ( regexp )
- regexp = false;
- else
- regexp = true;
- }
saveConfig();
}
void ODict::slotMethodChanged( const QString& methodnumber )
{
activated_name = methodnumber;
@@ -219,12 +210,11 @@ void ODict::setupMenus()
setting_a->addTo( settings );
setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 );
parameter = new QPopupMenu( menu );
connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) );
parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 );
- parameter->insertItem( tr( "Allow &reg. expressions" ), 2 );
parameter->insertSeparator();
menu->insertItem( tr( "Settings" ) , settings );
menu->insertItem( tr( "Parameter" ) , parameter );
}
diff --git a/noncore/apps/odict/odict.h b/noncore/apps/odict/odict.h
index 9c037ea..be2a532 100644
--- a/noncore/apps/odict/odict.h
+++ b/noncore/apps/odict/odict.h
@@ -46,13 +46,13 @@ class ODict : public QMainWindow
QVBoxLayout *vbox_layout;
QAction *setting_a, *setting_b;
void setupMenus();
- bool casesens, completewords, regexp;
+ bool casesens, completewords;
void loadConfig();
void saveConfig();
QString activated_name;
QLabel *bottom_name,
diff --git a/noncore/apps/odict/odict.pro b/noncore/apps/odict/odict.pro
index 427a5c6..82f6a41 100644
--- a/noncore/apps/odict/odict.pro
+++ b/noncore/apps/odict/odict.pro
@@ -1,13 +1,13 @@
TEMPLATE = app
CONFIG = qt warn_on debug
#CONFIG = qt warn_on release
HEADERS = odict.h \
searchmethoddlg.h \
configdlg.h \
- dingwidget.h \
+ dingwidget.h
SOURCES = main.cpp \
odict.cpp \
searchmethoddlg.cpp \
configdlg.cpp \
dingwidget.cpp
diff --git a/noncore/apps/odict/opie-odict.control b/noncore/apps/odict/opie-odict.control
index 2fa731f..f684716 100644
--- a/noncore/apps/odict/opie-odict.control
+++ b/noncore/apps/odict/opie-odict.control
@@ -1,10 +1,10 @@
Package: opie-odict
Files: bin/odict apps/Applications/odict.desktop pics/odict/odict.png
Priority: optional
Section: applications
Maintainer: Carsten Niehaus <cniehaus@handhelds.org>
Architecture: arm
-Version: $QPE_VERSION-$SUB_VERSION
Depends: task-opie-minimal
Description: Dictionarylookupprogram
Look up words :)
+Version: $QPE_VERSION$EXTRAVERSION