From 15318cad33835e4e2dc620d033e43cd930676cdd Mon Sep 17 00:00:00 2001 From: kergoth Date: Fri, 25 Jan 2002 22:14:26 +0000 Subject: Initial revision --- (limited to 'noncore/apps/dictionary') diff --git a/noncore/apps/dictionary/dictionary.pro b/noncore/apps/dictionary/dictionary.pro new file mode 100644 index 0000000..e829e68 --- a/dev/null +++ b/noncore/apps/dictionary/dictionary.pro @@ -0,0 +1,14 @@ +TEMPLATE = app +CONFIG += qt warn_on release +DESTDIR = ../bin + +HEADERS = dicttool.h +SOURCES = dicttool.cpp main.cpp + +INTERFACES = dicttoolbase.ui + +INCLUDEPATH += $(QPEDIR)/include +DEPENDPATH += $(QPEDIR)/include +LIBS += -lqpe + +TARGET = dictionary diff --git a/noncore/apps/dictionary/dicttool.cpp b/noncore/apps/dictionary/dicttool.cpp new file mode 100644 index 0000000..a0f2f9d --- a/dev/null +++ b/noncore/apps/dictionary/dicttool.cpp @@ -0,0 +1,59 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#include "dicttool.h" +#include "global.h" +#include +#include + +DictTool::DictTool( QWidget* parent, const char* name, bool modal, WFlags fl ) + : DictToolBase( parent, name, modal, fl ) +{ +} + +DictTool::~DictTool() +{ +} + +void DictTool::setDictionary(int d) +{ + dict = (DictType)d; +} + +void DictTool::setPattern(const QString& s) +{ + qWarning( "DictTool::setPattern(const QString&) not yet implemented!" ); +} + +void DictTool::setPickboardSet(const QString& s) +{ + QStringList sets = QStringList::split(" ",s); + qWarning( "DictTool::setPickboardSet(const QString&) not yet implemented!" ); +} + +void DictTool::addWord() +{ + Global::addWords(word->text()); +} + +void DictTool::removeWord() +{ + qWarning( "DictTool::removeWord() not yet implemented!" ); +} + diff --git a/noncore/apps/dictionary/dicttool.h b/noncore/apps/dictionary/dicttool.h new file mode 100644 index 0000000..702b772 --- a/dev/null +++ b/noncore/apps/dictionary/dicttool.h @@ -0,0 +1,46 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#ifndef DICTTOOL_H +#define DICTTOOL_H +#include "dicttoolbase.h" + +class DictTool : public DictToolBase +{ + Q_OBJECT + +public: + DictTool( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~DictTool(); + +public slots: + void setDictionary(int); + void setPattern(const QString&); + void setPickboardSet(const QString&); + +private slots: + void addWord(); + void removeWord(); + +private: + enum DictType { All, Local, System }; + DictType dict; +}; + +#endif // DICTTOOL_H diff --git a/noncore/apps/dictionary/dicttoolbase.ui b/noncore/apps/dictionary/dicttoolbase.ui new file mode 100644 index 0000000..25ef00e --- a/dev/null +++ b/noncore/apps/dictionary/dicttoolbase.ui @@ -0,0 +1,412 @@ + +DictToolBase********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + QDialog + + name + dicttoolbase + + + geometry + + 0 + 0 + 258 + 375 + + + + caption + MyDialog1 + + + sizeGripEnabled + true + + + layoutMargin + + + layoutSpacing + + + + margin + 5 + + + spacing + 2 + + + QComboBox + + + text + All dictionaries + + + + + text + Personal dictionary + + + + + text + System dictionary (English) + + + + name + dictionary_choice + + + whatsThis + Selects the dictionary to manipulate. + + + + QTabWidget + + name + tabWidget + + + layoutMargin + + + QWidget + + name + Widget4 + + + title + Search + + + + margin + 5 + + + spacing + 6 + + + QGroupBox + + name + GroupBox3 + + + title + Pattern + + + + margin + 11 + + + spacing + 6 + + + QLineEdit + + name + pattern + + + whatsThis + Enter your search pattern here. You may use <big><tt>?</tt></big> to represent any one letter, <big><tt>*</tt></big> to represent zero or more arbitrary letters, or <big><tt>[<i>abc</i>]</tt></big> to represent any one of the letters <big><tt><i>abc</i></tt></big>. + + + + + + QGroupBox + + name + GroupBox4 + + + title + Matches + + + + margin + 11 + + + spacing + 6 + + + QListBox + + name + output + + + + + + + + QWidget + + name + Widget5 + + + title + Pickboard + + + + margin + 5 + + + spacing + 6 + + + QGroupBox + + name + GroupBox1 + + + title + Letter sets + + + + margin + 11 + + + spacing + 6 + + + QLineEdit + + name + sets + + + whatsThis + Enter sets of letters here, seperated by spaces in the same way as the sets of letters appear at the bottom of the Pickboard. The list below will show the largest sets of words that could be typed ambiguously. This information helps you tune the letter sets for your dictionary. + + + + + + QGroupBox + + name + GroupBox2 + + + title + Longest ambiguities + + + + margin + 11 + + + spacing + 6 + + + QListBox + + name + ambiguities + + + + + + + + QWidget + + name + tab + + + title + Edit words + + + + margin + 11 + + + spacing + 6 + + + QLineEdit + + name + word + + + + QLayoutWidget + + name + Layout3 + + + + margin + 0 + + + spacing + 6 + + + QPushButton + + name + add + + + text + Add + + + + QPushButton + + name + remove + + + text + Remove + + + + + + QLabel + + name + readonly_message + + + text + This dictionary is read-only. + + + alignment + AlignCenter + + + hAlign + + + + + name + Spacer1 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + sizeHint + + 20 + 20 + + + + + + + + + + + pattern + textChanged(const QString&) + dicttoolbase + setPattern(const QString&) + + + dictionary_choice + activated(int) + dicttoolbase + setDictionary(int) + + + sets + textChanged(const QString&) + dicttoolbase + setPickboardSet(const QString&) + + + add + clicked() + dicttoolbase + addWord() + + + remove + clicked() + dicttoolbase + removeWord() + + addWord() + removeWord() + setDictionary(int) + setPattern(const QString&) + setPickboardSet(const QString&) + + diff --git a/noncore/apps/dictionary/main.cpp b/noncore/apps/dictionary/main.cpp new file mode 100644 index 0000000..7e9d8c1 --- a/dev/null +++ b/noncore/apps/dictionary/main.cpp @@ -0,0 +1,31 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#include +#include "dicttool.h" + +main(int argc, char** argv) +{ + QPEApplication a(argc,argv); + + DictTool m; + a.showMainWidget(&m); + + return a.exec(); +} -- cgit v0.9.0.2