diff options
Diffstat (limited to 'kiten')
-rw-r--r-- | kiten/Makefile.am | 6 | ||||
-rw-r--r-- | kiten/asyndeta.cpp | 2 | ||||
-rw-r--r-- | kiten/asyndeta.h | 2 | ||||
-rw-r--r-- | kiten/configdictionaries.cpp | 8 | ||||
-rw-r--r-- | kiten/configdictionaries.h | 2 | ||||
-rw-r--r-- | kiten/deinf.cpp | 2 | ||||
-rw-r--r-- | kiten/deinf.h | 2 | ||||
-rw-r--r-- | kiten/dict.cpp | 4 | ||||
-rw-r--r-- | kiten/dict.h | 25 | ||||
-rw-r--r-- | kiten/edict | 2 | ||||
-rw-r--r-- | kiten/kiten.cpp | 102 | ||||
-rw-r--r-- | kiten/kiten.h | 4 | ||||
-rw-r--r-- | kiten/kromajiedit.cpp | 4 | ||||
-rw-r--r-- | kiten/kromajiedit.h | 2 | ||||
-rw-r--r-- | kiten/learn.cpp | 68 | ||||
-rw-r--r-- | kiten/learn.h | 2 | ||||
-rw-r--r-- | kiten/main.cpp | 2 | ||||
-rw-r--r-- | kiten/optiondialog.cpp | 4 | ||||
-rw-r--r-- | kiten/optiondialog.h | 4 | ||||
-rw-r--r-- | kiten/rad.cpp | 24 | ||||
-rw-r--r-- | kiten/rad.h | 10 | ||||
-rw-r--r-- | kiten/widgets.cpp | 20 | ||||
-rw-r--r-- | kiten/widgets.h | 12 | ||||
-rw-r--r-- | kiten/xjdxgen.c | 38 |
24 files changed, 173 insertions, 178 deletions
diff --git a/kiten/Makefile.am b/kiten/Makefile.am index 944d816e..98ec6868 100644 --- a/kiten/Makefile.am +++ b/kiten/Makefile.am @@ -6,14 +6,14 @@ kiten_SOURCES = main.cpp kiten.cpp learn.cpp kloader.cpp ksaver.cpp \ configsearching.ui configlearn.ui configfont.ui configdictionariesbase.ui \ configdictionaries.cpp optiondialog.cpp kitenconfig.kcfgc -kiten_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kiten_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor kiten_LDADD = libkiten.la $(LIB_TDEIO) bin_PROGRAMS = kiten kitengen lib_LTLIBRARIES = libkiten.la libkiten_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -version-info 1:0:0 -libkiten_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEPRINT) $(LIB_QT) $(LIB_TDECORE) +libkiten_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEPRINT) $(LIB_TQT) $(LIB_TDECORE) libkiten_la_SOURCES = asyndeta.cpp dict.cpp widgets.cpp kromajiedit.cpp rad.cpp \ deinf.cpp kitenconfig.kcfgc @@ -23,7 +23,7 @@ libkiteninclude_HEADERS = \ asyndeta.h dict.h widgets.h kromajiedit.h rad.h deinf.h kitengen_SOURCES = xjdxgen.c -kitengen_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kitengen_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor METASOURCES = AUTO diff --git a/kiten/asyndeta.cpp b/kiten/asyndeta.cpp index e2d8a14a..67ae4633 100644 --- a/kiten/asyndeta.cpp +++ b/kiten/asyndeta.cpp @@ -21,7 +21,7 @@ #include <tdeconfig.h> #include <kdebug.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tqfile.h> diff --git a/kiten/asyndeta.h b/kiten/asyndeta.h index d4946e17..ae35900e 100644 --- a/kiten/asyndeta.h +++ b/kiten/asyndeta.h @@ -28,7 +28,7 @@ namespace Dict class Index; } -class KDE_EXPORT Asyndeta +class TDE_EXPORT Asyndeta { public: // creates index diff --git a/kiten/configdictionaries.cpp b/kiten/configdictionaries.cpp index c7edcc80..b1f7fcce 100644 --- a/kiten/configdictionaries.cpp +++ b/kiten/configdictionaries.cpp @@ -31,10 +31,10 @@ ConfigDictionaries::ConfigDictionaries(TQWidget *parent, const char* name, WFlag { changed = false; config = Config::self(); - connect(delSelEdictButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelSelEdict())); - connect(addEdictButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEdict())); - connect(delSelKanjidicButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelSelKanjidic())); - connect(addKanjidicButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddKanjidic())); + connect(delSelEdictButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotDelSelEdict())); + connect(addEdictButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotAddEdict())); + connect(delSelKanjidicButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotDelSelKanjidic())); + connect(addKanjidicButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotAddKanjidic())); } void ConfigDictionaries::updateWidgets() diff --git a/kiten/configdictionaries.h b/kiten/configdictionaries.h index 7f8e1051..4629ab5d 100644 --- a/kiten/configdictionaries.h +++ b/kiten/configdictionaries.h @@ -26,7 +26,7 @@ class ConfigDictionaries : public ConfigDictionariesBase { - Q_OBJECT + TQ_OBJECT public: ConfigDictionaries(TQWidget *parent = 0, const char* name = 0, WFlags f = 0); diff --git a/kiten/deinf.cpp b/kiten/deinf.cpp index 7831cfc6..78a51e00 100644 --- a/kiten/deinf.cpp +++ b/kiten/deinf.cpp @@ -19,7 +19,7 @@ **/ #include <kdebug.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdemessagebox.h> #include <tdelocale.h> #include <tqfile.h> diff --git a/kiten/deinf.h b/kiten/deinf.h index ca776289..98c7cb8e 100644 --- a/kiten/deinf.h +++ b/kiten/deinf.h @@ -34,7 +34,7 @@ struct Conjugation unsigned int num; }; -class KDE_EXPORT Index +class TDE_EXPORT Index { public: Index(); diff --git a/kiten/dict.cpp b/kiten/dict.cpp index ec8ceb6a..bdb7e0b8 100644 --- a/kiten/dict.cpp +++ b/kiten/dict.cpp @@ -21,8 +21,8 @@ #include <kdebug.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kprocess.h> -#include <kstandarddirs.h> +#include <tdeprocess.h> +#include <tdestandarddirs.h> #include <tqfileinfo.h> #include <tqregexp.h> diff --git a/kiten/dict.h b/kiten/dict.h index ba815f7c..0803d235 100644 --- a/kiten/dict.h +++ b/kiten/dict.h @@ -29,12 +29,7 @@ #include <tqstringlist.h> #include <sys/types.h> -#ifdef __osf__ -typedef unsigned int uint32_t; -typedef int int32_t; -#else #include <inttypes.h> -#endif namespace Dict { @@ -42,7 +37,7 @@ namespace Dict enum TextType { Text_Kanji, Text_Kana, Text_Latin }; // returns the TextType of the first part of the text -KDE_EXPORT TextType textType(const TQString &text); +TDE_EXPORT TextType textType(const TQString &text); // File needs to be able to give out Arrays based on its mmap'd data. // But, we don't want the users of the arrays to have to remember to @@ -106,7 +101,7 @@ private: bool valid; }; -class KDE_EXPORT Entry +class TDE_EXPORT Entry { public: // EDict ctor @@ -161,9 +156,9 @@ struct SearchResult enum SearchType { Search_Beginning, Search_FullWord, Search_Anywhere }; enum DictionaryType { Edict, Kanjidict }; -class KDE_EXPORT Index : public TQObject +class TDE_EXPORT Index : public TQObject { -Q_OBJECT +TQ_OBJECT public: @@ -193,12 +188,12 @@ private: }; // lotsa helper functions -KDE_EXPORT TQString prettyKanjiReading(TQStringList); -KDE_EXPORT TQString prettyMeaning(TQStringList); -KDE_EXPORT Entry parse(const TQString &); -KDE_EXPORT Entry kanjiParse(const TQString &); -KDE_EXPORT Dict::Entry firstEntry(Dict::SearchResult); -KDE_EXPORT TQString firstEntryText(Dict::SearchResult); +TDE_EXPORT TQString prettyKanjiReading(TQStringList); +TDE_EXPORT TQString prettyMeaning(TQStringList); +TDE_EXPORT Entry parse(const TQString &); +TDE_EXPORT Entry kanjiParse(const TQString &); +TDE_EXPORT Dict::Entry firstEntry(Dict::SearchResult); +TDE_EXPORT TQString firstEntryText(Dict::SearchResult); int eucStringCompare(const char *str1, const char *str2); bool isEUC(unsigned char c); diff --git a/kiten/edict b/kiten/edict index 1cc221eb..fd686375 100644 --- a/kiten/edict +++ b/kiten/edict @@ -55062,7 +55062,7 @@ ¼ê¿¦ [¤Æ¤·¤ç¤¯] /(n) handicraft/ ¼ê¿¦ [¤Æ¤¸¤ç¤¯] /(n) handicraft/ ¼ê¿¨¤ê [¤Æ¤¶¤ï¤ê] /(n) feel/touch/ -¼ê¿®¸ì [¤Æ¤·¤ó¤´] /hand Q_SIGNALS/flag Q_SIGNALS/ +¼ê¿®¸ì [¤Æ¤·¤ó¤´] /hand signals/flag signals/ ¼ê¿´ [¤Æ¤´¤³¤í] /(n) discretion/consideration/allowance/ ¼ê¿´¤ò²Ã¤¨¤ë [¤Æ¤´¤³¤í¤ò¤¯¤ï¤¨¤ë] /(exp) to take into consideration/to use one's discretion/ ¼ê¿¶¤ê [¤Æ¤Ö¤ê] /(n) movements or gestures of hands or arms/(P)/ diff --git a/kiten/kiten.cpp b/kiten/kiten.cpp index 3a29f781..8b3371eb 100644 --- a/kiten/kiten.cpp +++ b/kiten/kiten.cpp @@ -26,12 +26,12 @@ #include <kdebug.h> #include <tdeversion.h> #include <kedittoolbar.h> -#include <kglobalaccel.h> +#include <tdeglobalaccel.h> #include <kiconloader.h> #include <kkeydialog.h> #include <tdelocale.h> #include <tdemainwindow.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstatusbar.h> #include <tqclipboard.h> @@ -54,43 +54,43 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) : TDEMainWindow(parent, n config = Config::self(); config->readConfig(); - Accel = new TDEGlobalAccel(TQT_TQOBJECT(this)); - (void) Accel->insert("Lookup Kanji (Kanjidic)", i18n("Lookup Kanji (Kanjidic)"), i18n("Gives detailed information about Kanji currently on clipboard."), CTRL + ALT + Key_K, CTRL + ALT + Key_K, TQT_TQOBJECT(this), TQT_SLOT(kanjiSearchAccel())); - (void) Accel->insert("Lookup English/Japanese word", i18n("Lookup English/Japanese Word"), i18n("Looks up current text on clipboard in the same way as if you used Kiten's regular search."), CTRL + ALT + Key_S, CTRL + ALT + Key_S, TQT_TQOBJECT(this), TQT_SLOT(searchAccel())); + Accel = new TDEGlobalAccel(this); + (void) Accel->insert("Lookup Kanji (Kanjidic)", i18n("Lookup Kanji (Kanjidic)"), i18n("Gives detailed information about Kanji currently on clipboard."), CTRL + ALT + Key_K, CTRL + ALT + Key_K, this, TQ_SLOT(kanjiSearchAccel())); + (void) Accel->insert("Lookup English/Japanese word", i18n("Lookup English/Japanese Word"), i18n("Looks up current text on clipboard in the same way as if you used Kiten's regular search."), CTRL + ALT + Key_S, CTRL + ALT + Key_S, this, TQ_SLOT(searchAccel())); Accel->readSettings(TDEGlobal::config()); Accel->updateConnections(); _ResultView = new ResultView(true, this, "_ResultView"); setCentralWidget(_ResultView); - (void) KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); - (void) KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(print()), actionCollection()); - (void) KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); - KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - (void) new TDEAction(i18n("&Learn"), "pencil", CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT(createLearn()), actionCollection(), "file_learn"); - (void) new TDEAction(i18n("&Dictionary Editor..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(createEEdit()), actionCollection(), "dict_editor"); - (void) new TDEAction(i18n("Ra&dical Search..."), "gear", CTRL+Key_R, TQT_TQOBJECT(this), TQT_SLOT(radicalSearch()), actionCollection(), "search_radical"); - Edit = new EditAction(i18n("Search Edit"), 0, TQT_TQOBJECT(this), TQT_SLOT(search()), actionCollection(), "search_edit"); - (void) new TDEAction(i18n("&Clear Search Bar"), BarIcon("locationbar_erase", 16), CTRL+Key_N, Edit, TQT_SLOT(clear()), actionCollection(), "clear_search"); - (void) new TDEAction(i18n("S&earch"), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(search()), actionCollection(), "search"); - (void) new TDEAction(i18n("Search with &Beginning of Word"), 0, TQT_TQOBJECT(this), TQT_SLOT(searchBeginning()), actionCollection(), "search_beginning"); - (void) new TDEAction(i18n("Search &Anywhere"), 0, TQT_TQOBJECT(this), TQT_SLOT(searchAnywhere()), actionCollection(), "search_anywhere"); - (void) new TDEAction(i18n("Stro&kes"), "paintbrush", CTRL+Key_S, TQT_TQOBJECT(this), TQT_SLOT(strokeSearch()), actionCollection(), "search_stroke"); - (void) new TDEAction(i18n("&Grade"), "format-justify-left", CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT(gradeSearch()), actionCollection(), "search_grade"); - kanjiCB = new TDEToggleAction(i18n("&Kanjidic"), "kanjidic", CTRL+Key_K, TQT_TQOBJECT(this), TQT_SLOT(kanjiDictChange()), actionCollection(), "kanji_toggle"); - deinfCB = new TDEToggleAction(i18n("&Deinflect Verbs in Regular Search"), 0, TQT_TQOBJECT(this), TQT_SLOT(kanjiDictChange()), actionCollection(), "deinf_toggle"); - comCB = new TDEToggleAction(i18n("&Filter Rare"), "filter", CTRL+Key_F, TQT_TQOBJECT(this), TQT_SLOT(toggleCom()), actionCollection(), "common"); - autoSearchToggle = new TDEToggleAction(i18n("&Automatically Search Clipboard Selections"), "edit-find", 0, TQT_TQOBJECT(this), TQT_SLOT(kanjiDictChange()), actionCollection(), "autosearch_toggle"); - irAction = new TDEAction(i18n("Search &in Results"), "edit-find", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(resultSearch()), actionCollection(), "search_in_results"); - (void) KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configureToolBars()), actionCollection()); - addAction = new TDEAction(i18n("Add &Kanji to Learning List"), 0, TQT_TQOBJECT(this), TQT_SLOT(addToList()), actionCollection(), "add"); + (void) KStdAction::quit(this, TQ_SLOT(close()), actionCollection()); + (void) KStdAction::print(this, TQ_SLOT(print()), actionCollection()); + (void) KStdAction::preferences(this, TQ_SLOT(slotConfigure()), actionCollection()); + KStdAction::keyBindings(guiFactory(), TQ_SLOT(configureShortcuts()), actionCollection()); + (void) new TDEAction(i18n("&Learn"), "pencil", CTRL+Key_L, this, TQ_SLOT(createLearn()), actionCollection(), "file_learn"); + (void) new TDEAction(i18n("&Dictionary Editor..."), "edit", 0, this, TQ_SLOT(createEEdit()), actionCollection(), "dict_editor"); + (void) new TDEAction(i18n("Ra&dical Search..."), "gear", CTRL+Key_R, this, TQ_SLOT(radicalSearch()), actionCollection(), "search_radical"); + Edit = new EditAction(i18n("Search Edit"), 0, this, TQ_SLOT(search()), actionCollection(), "search_edit"); + (void) new TDEAction(i18n("&Clear Search Bar"), BarIcon("locationbar_erase", 16), CTRL+Key_N, Edit, TQ_SLOT(clear()), actionCollection(), "clear_search"); + (void) new TDEAction(i18n("S&earch"), "key_enter", 0, this, TQ_SLOT(search()), actionCollection(), "search"); + (void) new TDEAction(i18n("Search with &Beginning of Word"), 0, this, TQ_SLOT(searchBeginning()), actionCollection(), "search_beginning"); + (void) new TDEAction(i18n("Search &Anywhere"), 0, this, TQ_SLOT(searchAnywhere()), actionCollection(), "search_anywhere"); + (void) new TDEAction(i18n("Stro&kes"), "paintbrush", CTRL+Key_S, this, TQ_SLOT(strokeSearch()), actionCollection(), "search_stroke"); + (void) new TDEAction(i18n("&Grade"), "format-justify-left", CTRL+Key_G, this, TQ_SLOT(gradeSearch()), actionCollection(), "search_grade"); + kanjiCB = new TDEToggleAction(i18n("&Kanjidic"), "kanjidic", CTRL+Key_K, this, TQ_SLOT(kanjiDictChange()), actionCollection(), "kanji_toggle"); + deinfCB = new TDEToggleAction(i18n("&Deinflect Verbs in Regular Search"), 0, this, TQ_SLOT(kanjiDictChange()), actionCollection(), "deinf_toggle"); + comCB = new TDEToggleAction(i18n("&Filter Rare"), "filter", CTRL+Key_F, this, TQ_SLOT(toggleCom()), actionCollection(), "common"); + autoSearchToggle = new TDEToggleAction(i18n("&Automatically Search Clipboard Selections"), "edit-find", 0, this, TQ_SLOT(kanjiDictChange()), actionCollection(), "autosearch_toggle"); + irAction = new TDEAction(i18n("Search &in Results"), "edit-find", CTRL+Key_I, this, TQ_SLOT(resultSearch()), actionCollection(), "search_in_results"); + (void) KStdAction::configureToolbars(this, TQ_SLOT(configureToolBars()), actionCollection()); + addAction = new TDEAction(i18n("Add &Kanji to Learning List"), 0, this, TQ_SLOT(addToList()), actionCollection(), "add"); addAction->setEnabled(false); - (void) new TDEAction(i18n("Configure &Global Shortcuts..."), "configure_shortcuts", 0, TQT_TQOBJECT(this), TQT_SLOT(configureGlobalKeys()), actionCollection(), "options_configure_keybinding"); + (void) new TDEAction(i18n("Configure &Global Shortcuts..."), "configure_shortcuts", 0, this, TQ_SLOT(configureGlobalKeys()), actionCollection(), "options_configure_keybinding"); historyAction = new TDEListAction(i18n("&History"), 0, 0, 0, actionCollection(), "history"); - connect(historyAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(goInHistory(int))); - backAction = KStdAction::back(TQT_TQOBJECT(this), TQT_SLOT(back()), actionCollection()); - forwardAction = KStdAction::forward(TQT_TQOBJECT(this), TQT_SLOT(forward()), actionCollection()); + connect(historyAction, TQ_SIGNAL(activated(int)), this, TQ_SLOT(goInHistory(int))); + backAction = KStdAction::back(this, TQ_SLOT(back()), actionCollection()); + forwardAction = KStdAction::forward(this, TQ_SLOT(forward()), actionCollection()); backAction->setEnabled(false); forwardAction->setEnabled(false); currentResult = resultHistory.end(); @@ -114,10 +114,10 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) : TDEMainWindow(parent, n resize(600, 400); applyMainWindowSettings(TDEGlobal::config(), "TopLevelWindow"); - connect(_ResultView, TQT_SIGNAL(linkClicked(const TQString &)), TQT_SLOT(ressearch(const TQString &))); - connect(kapp->clipboard(), TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(autoSearch())); + connect(_ResultView, TQ_SIGNAL(linkClicked(const TQString &)), TQ_SLOT(ressearch(const TQString &))); + connect(tdeApp->clipboard(), TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(autoSearch())); - TQTimer::singleShot(10, TQT_TQOBJECT(this), TQT_SLOT(finishInit())); + TQTimer::singleShot(10, this, TQ_SLOT(finishInit())); } TopLevel::~TopLevel() @@ -130,7 +130,7 @@ void TopLevel::finishInit() { // if it's the application's first time starting, // the app group won't exist and we show demo - if (!kapp->config()->hasGroup("app")) + if (!tdeApp->config()->hasGroup("app")) { if (kanjiCB->isChecked()) Edit->setText(TQString::fromUtf8("辞")); @@ -277,14 +277,14 @@ void TopLevel::handleSearchResult(Dict::SearchResult results) { //kdDebug() << "adding " << (*it).kanji() << endl; _ResultView->addResult(*it, common); - kapp->processEvents(); + tdeApp->processEvents(); } } else { for (TQValueListIterator<Dict::Entry> it = results.list.begin(); it != results.list.end(); ++it) { - kapp->processEvents(); + tdeApp->processEvents(); _ResultView->addKanjiResult(*it, results.common); } } @@ -293,7 +293,7 @@ void TopLevel::handleSearchResult(Dict::SearchResult results) { for (TQValueListIterator<Dict::Entry> it = results.list.begin(); it != results.list.end(); ++it) { - kapp->processEvents(); + tdeApp->processEvents(); _ResultView->addResult(*it, comCB->isChecked()); } } @@ -529,9 +529,9 @@ void TopLevel::gradeSearch() TQString TopLevel::clipBoardText() // gets text from clipboard for globalaccels { - kapp->clipboard()->setSelectionMode(true); - TQString text = kapp->clipboard()->text().stripWhiteSpace(); - kapp->clipboard()->setSelectionMode(false); + tdeApp->clipboard()->setSelectionMode(true); + TQString text = tdeApp->clipboard()->text().stripWhiteSpace(); + tdeApp->clipboard()->setSelectionMode(false); return text; } @@ -609,9 +609,9 @@ void TopLevel::slotConfigure() //ConfigureDialog didn't find an instance of this dialog, so lets create it : optionDialog = new ConfigureDialog(this, "settings"); - connect(optionDialog, TQT_SIGNAL(hidden()),this,TQT_SLOT(slotConfigureHide())); - connect(optionDialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotConfigurationChanged())); - connect(optionDialog, TQT_SIGNAL(valueChanged()), TQT_TQOBJECT(this), TQT_SIGNAL(quizConfChanged())); + connect(optionDialog, TQ_SIGNAL(hidden()),this,TQ_SLOT(slotConfigureHide())); + connect(optionDialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(slotConfigurationChanged())); + connect(optionDialog, TQ_SIGNAL(valueChanged()), this, TQ_SIGNAL(quizConfChanged())); optionDialog->show(); return; @@ -625,7 +625,7 @@ void TopLevel::slotLearnConfigure() void TopLevel::slotConfigureHide() { - TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureDestroy())); + TQTimer::singleShot(0, this, TQ_SLOT(slotConfigureDestroy())); } void TopLevel::slotConfigureDestroy() @@ -641,11 +641,11 @@ void TopLevel::createLearn() { Learn *_Learn = new Learn(_Asyndeta.retrieveIndex(), 0); - connect(_Learn, TQT_SIGNAL(destroyed(Learn *)), TQT_TQOBJECT(this), TQT_SLOT(learnDestroyed(Learn *))); - connect(_Learn, TQT_SIGNAL(linkClicked(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(ressearch(const TQString &))); - connect(_Learn, TQT_SIGNAL(configureLearn()), TQT_TQOBJECT(this), TQT_SLOT(slotLearnConfigure())); - connect(this, TQT_SIGNAL(quizConfChanged()), _Learn, TQT_SLOT(updateQuizConfiguration())); - connect(this, TQT_SIGNAL(add(Dict::Entry)), _Learn, TQT_SLOT(add(Dict::Entry))); + connect(_Learn, TQ_SIGNAL(destroyed(Learn *)), this, TQ_SLOT(learnDestroyed(Learn *))); + connect(_Learn, TQ_SIGNAL(linkClicked(const TQString &)), this, TQ_SLOT(ressearch(const TQString &))); + connect(_Learn, TQ_SIGNAL(configureLearn()), this, TQ_SLOT(slotLearnConfigure())); + connect(this, TQ_SIGNAL(quizConfChanged()), _Learn, TQ_SLOT(updateQuizConfiguration())); + connect(this, TQ_SIGNAL(add(Dict::Entry)), _Learn, TQ_SLOT(add(Dict::Entry))); learnList.append(_Learn); @@ -730,7 +730,7 @@ void TopLevel::configureToolBars() { saveMainWindowSettings(TDEGlobal::config(), "TopLevelWindow"); KEditToolbar dlg(actionCollection(), "kitenui.rc"); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolBarConfig())); + connect(&dlg, TQ_SIGNAL(newToolbarConfig()), TQ_SLOT(newToolBarConfig())); dlg.exec(); } @@ -743,7 +743,7 @@ void TopLevel::newToolBarConfig() RadWidget *TopLevel::radicalSearch() { RadWidget *rw = new RadWidget(&_Rad, 0, "rw"); - connect(rw, TQT_SIGNAL(set(const TQStringList &, unsigned int, unsigned int)), TQT_TQOBJECT(this), TQT_SLOT(radSearch(const TQStringList &, unsigned int, unsigned int))); + connect(rw, TQ_SIGNAL(set(const TQStringList &, unsigned int, unsigned int)), this, TQ_SLOT(radSearch(const TQStringList &, unsigned int, unsigned int))); rw->show(); return rw; } diff --git a/kiten/kiten.h b/kiten/kiten.h index ef5cfda4..728b0fee 100644 --- a/kiten/kiten.h +++ b/kiten/kiten.h @@ -38,9 +38,9 @@ class TDEListAction; class Learn; class ResultView; -class KDE_EXPORT TopLevel : public TDEMainWindow +class TDE_EXPORT TopLevel : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kiten/kromajiedit.cpp b/kiten/kromajiedit.cpp index 6eda1d32..8c219784 100644 --- a/kiten/kromajiedit.cpp +++ b/kiten/kromajiedit.cpp @@ -19,7 +19,7 @@ **/ #include <kdebug.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdemessagebox.h> #include <tdelocale.h> #include <tqfile.h> @@ -265,7 +265,7 @@ TQPopupMenu *KRomajiEdit::createPopupMenu() else if (kana == "hiragana") popup->setItemChecked(1, true); - connect(popup, TQT_SIGNAL(activated(int)), TQT_SLOT(setKana(int))); + connect(popup, TQ_SIGNAL(activated(int)), TQ_SLOT(setKana(int))); emit aboutToShowContextMenu(popup); return popup; diff --git a/kiten/kromajiedit.h b/kiten/kromajiedit.h index 86299511..498e11c5 100644 --- a/kiten/kromajiedit.h +++ b/kiten/kromajiedit.h @@ -32,7 +32,7 @@ class TQPopupMenu; class KRomajiEdit : public KLineEdit { - Q_OBJECT + TQ_OBJECT public: diff --git a/kiten/learn.cpp b/kiten/learn.cpp index a1b685d4..cb647aa1 100644 --- a/kiten/learn.cpp +++ b/kiten/learn.cpp @@ -70,18 +70,18 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name) TQVBoxLayout *veryTop = new TQVBoxLayout(dummy, 0, KDialog::spacingHint()); Tabs = new TQTabWidget(dummy); - connect(Tabs, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SLOT(tabChanged(TQWidget *))); + connect(Tabs, TQ_SIGNAL(currentChanged(TQWidget *)), TQ_SLOT(tabChanged(TQWidget *))); veryTop->addWidget(Tabs); listTop = new TQSplitter(Tabs); - listTop->setOrientation(Qt::Vertical); + listTop->setOrientation(TQt::Vertical); quizTop = new TQWidget(Tabs); Tabs->addTab(listTop, i18n("&List")); Tabs->addTab(quizTop, i18n("&Quiz")); View = new ResultView(true, listTop, "View"); View->setBasicMode(true); - connect(View, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SIGNAL(linkClicked(const TQString &))); + connect(View, TQ_SIGNAL(linkClicked(const TQString &)), this, TQ_SIGNAL(linkClicked(const TQString &))); List = new TDEListView(listTop); @@ -101,8 +101,8 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name) List->setSorting(4); List->setSelectionModeExt(TDEListView::Extended); - connect(List, TQT_SIGNAL(executed(TQListViewItem *)), TQT_SLOT(showKanji(TQListViewItem *))); - connect(List, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(itemSelectionChanged())); + connect(List, TQ_SIGNAL(executed(TQListViewItem *)), TQ_SLOT(showKanji(TQListViewItem *))); + connect(List, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(itemSelectionChanged())); TQStringList grades(i18n("Grade 1")); grades.append(i18n("Grade 2")); @@ -113,25 +113,25 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name) grades.append(i18n("Others in Jouyou")); grades.append(i18n("Jinmeiyou")); - /*TDEAction *closeAction = */(void) KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); - printAct = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(print()), actionCollection()); - forwardAct = KStdAction::forward(TQT_TQOBJECT(this), TQT_SLOT(next()), actionCollection()); + /*TDEAction *closeAction = */(void) KStdAction::close(this, TQ_SLOT(close()), actionCollection()); + printAct = KStdAction::print(this, TQ_SLOT(print()), actionCollection()); + forwardAct = KStdAction::forward(this, TQ_SLOT(next()), actionCollection()); forwardAct->plug(toolBar()); - backAct = KStdAction::back(TQT_TQOBJECT(this), TQT_SLOT(prev()), actionCollection()); + backAct = KStdAction::back(this, TQ_SLOT(prev()), actionCollection()); backAct->plug(toolBar()); - cheatAct = new TDEAction(i18n("&Cheat"), CTRL + Key_C, TQT_TQOBJECT(this), TQT_SLOT(cheat()), actionCollection(), "cheat"); - randomAct = new TDEAction(i18n("&Random"), "goto", CTRL + Key_R, TQT_TQOBJECT(this), TQT_SLOT(random()), actionCollection(), "random"); + cheatAct = new TDEAction(i18n("&Cheat"), CTRL + Key_C, this, TQ_SLOT(cheat()), actionCollection(), "cheat"); + randomAct = new TDEAction(i18n("&Random"), "goto", CTRL + Key_R, this, TQ_SLOT(random()), actionCollection(), "random"); gradeAct = new TDEListAction(i18n("Grade"), 0, 0, 0, actionCollection(), "grade"); gradeAct->setItems(grades); - connect(gradeAct, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(updateGrade())); - removeAct = new TDEAction(i18n("&Delete"), "edit_remove", CTRL + Key_X, TQT_TQOBJECT(this), TQT_SLOT(del()), actionCollection(), "del"); - addAct = new TDEAction(i18n("&Add"), "edit_add", CTRL + Key_A, TQT_TQOBJECT(this), TQT_SLOT(add()), actionCollection(), "add"); - addAllAct = new TDEAction(i18n("Add A&ll"), 0, TQT_TQOBJECT(this), TQT_SLOT(addAll()), actionCollection(), "addall"); - newAct = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(openNew()), actionCollection()); - openAct = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(open()), actionCollection()); - saveAct = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection()); - saveAsAct = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection()); - (void) KStdAction::preferences(TQT_TQOBJECT(this), TQT_SIGNAL(configureLearn()), actionCollection()); + connect(gradeAct, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(updateGrade())); + removeAct = new TDEAction(i18n("&Delete"), "edit_remove", CTRL + Key_X, this, TQ_SLOT(del()), actionCollection(), "del"); + addAct = new TDEAction(i18n("&Add"), "edit_add", CTRL + Key_A, this, TQ_SLOT(add()), actionCollection(), "add"); + addAllAct = new TDEAction(i18n("Add A&ll"), 0, this, TQ_SLOT(addAll()), actionCollection(), "addall"); + newAct = KStdAction::openNew(this, TQ_SLOT(openNew()), actionCollection()); + openAct = KStdAction::open(this, TQ_SLOT(open()), actionCollection()); + saveAct = KStdAction::save(this, TQ_SLOT(save()), actionCollection()); + saveAsAct = KStdAction::saveAs(this, TQ_SLOT(saveAs()), actionCollection()); + (void) KStdAction::preferences(this, TQ_SIGNAL(configureLearn()), actionCollection()); removeAct->setEnabled(false); @@ -140,18 +140,18 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name) quizLayout->addStretch(); TQHBoxLayout *hlayout = new TQHBoxLayout(quizLayout); qKanji = new TQPushButton(quizTop); - connect(qKanji, TQT_SIGNAL(clicked()), this, TQT_SLOT(qKanjiClicked())); + connect(qKanji, TQ_SIGNAL(clicked()), this, TQ_SLOT(qKanjiClicked())); hlayout->addStretch(); hlayout->addWidget(qKanji); hlayout->addStretch(); quizLayout->addStretch(); - answers = new TQButtonGroup(1,Qt::Horizontal, quizTop); + answers = new TQButtonGroup(1,TQt::Horizontal, quizTop); for (int i = 0; i < numberOfAnswers; ++i) answers->insert(new KPushButton(answers), i); quizLayout->addWidget(answers); quizLayout->addStretch(); - connect(answers, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(answerClicked(int))); + connect(answers, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(answerClicked(int))); createGUI("learnui.rc"); //closeAction->plug(toolBar()); @@ -164,7 +164,7 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name) nogood = false; // this is so learn doesn't take so long to show itself - TQTimer::singleShot(200, this, TQT_SLOT(finishCtor())); + TQTimer::singleShot(200, this, TQ_SLOT(finishCtor())); } void Learn::finishCtor() @@ -247,7 +247,7 @@ bool Learn::queryClose() void Learn::random() { - int rand = static_cast<int>(static_cast<float>(list.count()) / (static_cast<float>(RAND_MAX) / kapp->random())); + int rand = static_cast<int>(static_cast<float>(list.count()) / (static_cast<float>(RAND_MAX) / tdeApp->random())); current = list.at(rand - 1); update(); @@ -303,7 +303,7 @@ void Learn::update() for (TQValueListIterator<Dict::Entry> it = compounds.list.begin(); it != compounds.list.end(); ++it) { - kapp->processEvents(); + tdeApp->processEvents(); View->addResult(*it, true); } @@ -683,12 +683,12 @@ TQString Learn::randomMeaning(TQStringList &oldMeanings) do { - float rand = kapp->random(); + float rand = tdeApp->random(); if ((rand > (RAND_MAX / 2)) || (List->childCount() < numberOfAnswers)) { // get a meaning from dict //kdDebug() << "from our dict\n"; - rand = kapp->random(); + rand = tdeApp->random(); float rand2 = RAND_MAX / rand; rand = ((float)list.count() - 1) / rand2; //rand -= 1; @@ -711,7 +711,7 @@ TQString Learn::randomMeaning(TQStringList &oldMeanings) { // get a meaning from our list //kdDebug() << "from our list\n"; - rand = kapp->random(); + rand = tdeApp->random(); float rand2 = RAND_MAX / rand; rand = List->childCount() / rand2; @@ -749,7 +749,7 @@ void Learn::qupdate() newFont.setPixelSize(24); qKanji->setFont(newFont); - float rand = kapp->random(); + float rand = tdeApp->random(); float rand2 = RAND_MAX / rand; seikai = static_cast<int>(numberOfAnswers / rand2); @@ -787,10 +787,10 @@ void Learn::qnew() // new quiz kanji // use f(2) every third time, f(1) otherwise // where f(1) = numberOfItems * rand[0..1] // and f(2) = numberOfItems * rand[0..1] * rand[0..1] - // rand[0..1] = kapp->random() / RAND_MAX - float max = static_cast<float>(count) / (static_cast<float>(RAND_MAX) / kapp->random()); - if (kapp->random() < (static_cast<float>(RAND_MAX) / 3.25)) - max /= (static_cast<float>(RAND_MAX) / (kapp->random() + 1)); + // rand[0..1] = tdeApp->random() / RAND_MAX + float max = static_cast<float>(count) / (static_cast<float>(RAND_MAX) / tdeApp->random()); + if (tdeApp->random() < (static_cast<float>(RAND_MAX) / 3.25)) + max /= (static_cast<float>(RAND_MAX) / (tdeApp->random() + 1)); max = static_cast<int>(max); diff --git a/kiten/learn.h b/kiten/learn.h index 2312cf46..08928a56 100644 --- a/kiten/learn.h +++ b/kiten/learn.h @@ -45,7 +45,7 @@ public: class Learn : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kiten/main.cpp b/kiten/main.cpp index 621fdf03..0fc18b5f 100644 --- a/kiten/main.cpp +++ b/kiten/main.cpp @@ -39,7 +39,7 @@ static TDECmdLineOptions options[] = int main(int argc, char *argv[]) { - tqInstallMsgHandler(noMessageOutput); + qInstallMsgHandler(noMessageOutput); TDEAboutData aboutData( "kiten", I18N_NOOP("Kiten"), "1.2", I18N_NOOP("Japanese Reference Tool"), TDEAboutData::License_GPL, "(c) 2001-2004, Jason Katz-Brown", 0, "http://www.katzbrown.com/kiten"); diff --git a/kiten/optiondialog.cpp b/kiten/optiondialog.cpp index 0a3fba44..0c3b6cd5 100644 --- a/kiten/optiondialog.cpp +++ b/kiten/optiondialog.cpp @@ -27,7 +27,7 @@ #include <tdelocale.h> #include <tqcombobox.h> #include <tdefiledialog.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kurllabel.h> #include <krun.h> @@ -43,7 +43,7 @@ ConfigureDialog::ConfigureDialog(TQWidget *parent, const char *name) : TDEConfigDialog(parent, name, Config::self()) { configDic = new ConfigDictionaries(0, "dictionaries_page"); - connect(configDic, TQT_SIGNAL(widgetChanged()), this, TQT_SLOT(updateButtons())); + connect(configDic, TQ_SIGNAL(widgetChanged()), this, TQ_SLOT(updateButtons())); addPage(configDic, i18n("Dictionaries"), "contents"); addPage(new ConfigSearching(0, "searching_page"), i18n("Searching"), "edit-find"); addPage(new ConfigLearn(0, "learn_page"), i18n("Learn"), "pencil"); diff --git a/kiten/optiondialog.h b/kiten/optiondialog.h index d9319a4d..514c44b3 100644 --- a/kiten/optiondialog.h +++ b/kiten/optiondialog.h @@ -32,7 +32,7 @@ class TQCheckBox; class DictList; #include <tdeconfigdialog.h> -#include <kglobalaccel.h> +#include <tdeglobalaccel.h> #include <kkeydialog.h> #include "kitenconfig.h" @@ -40,7 +40,7 @@ class DictList; class ConfigureDialog : public TDEConfigDialog { - Q_OBJECT + TQ_OBJECT public: ConfigureDialog(TQWidget *parent=0, const char *name=0); diff --git a/kiten/rad.cpp b/kiten/rad.cpp index 44d2908c..b1dc7e11 100644 --- a/kiten/rad.cpp +++ b/kiten/rad.cpp @@ -27,7 +27,7 @@ #include <tdelocale.h> #include <tdemessagebox.h> #include <kpushbutton.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tqbuttongroup.h> #include <tqcheckbox.h> @@ -226,7 +226,7 @@ RadWidget::RadWidget(Rad *_rad, TQWidget *parent, const char *name) : TQWidget(p TQHBoxLayout *hlayout = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint()); - hotlistGroup = new TQButtonGroup(1,Qt::Horizontal, i18n("Hotlist"), this); + hotlistGroup = new TQButtonGroup(1,TQt::Horizontal, i18n("Hotlist"), this); //hotlistGroup->setRadioButtonExclusive(true); vlayout->addWidget(hotlistGroup); @@ -244,12 +244,12 @@ RadWidget::RadWidget(Rad *_rad, TQWidget *parent, const char *name) : TQWidget(p hotlistGroup->insert(new KPushButton(*hotlist.at(i), hotlistGroup), i); } - connect(hotlistGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(hotlistClicked(int))); + connect(hotlistGroup, TQ_SIGNAL(clicked(int)), TQ_SLOT(hotlistClicked(int))); TQVBoxLayout *layout = new TQVBoxLayout(vlayout, KDialog::spacingHint()); totalStrokes = new TQCheckBox(i18n("Search by total strokes"), this); - connect(totalStrokes, TQT_SIGNAL(clicked()), this, TQT_SLOT(totalClicked())); + connect(totalStrokes, TQ_SIGNAL(clicked()), this, TQ_SLOT(totalClicked())); layout->addWidget(totalStrokes); TQHBoxLayout *strokesLayout = new TQHBoxLayout(layout, KDialog::spacingHint()); @@ -263,11 +263,11 @@ RadWidget::RadWidget(Rad *_rad, TQWidget *parent, const char *name) : TQWidget(p ok = new KPushButton(i18n("&Look Up"), this); ok->setEnabled(false); - connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(apply())); + connect(ok, TQ_SIGNAL(clicked()), TQ_SLOT(apply())); layout->addWidget(ok); cancel = new KPushButton( KStdGuiItem::cancel(), this ); - connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(close())); + connect(cancel, TQ_SIGNAL(clicked()), TQ_SLOT(close())); layout->addWidget(cancel); TQVBoxLayout *middlevLayout = new TQVBoxLayout(hlayout, KDialog::spacingHint()); @@ -278,25 +278,25 @@ RadWidget::RadWidget(Rad *_rad, TQWidget *parent, const char *name) : TQWidget(p List = new TDEListBox(this); middlevLayout->addWidget(List); - connect(List, TQT_SIGNAL(executed(TQListBoxItem *)), this, TQT_SLOT(executed(TQListBoxItem *))); - connect(strokesSpin, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateList(int))); + connect(List, TQ_SIGNAL(executed(TQListBoxItem *)), this, TQ_SLOT(executed(TQListBoxItem *))); + connect(strokesSpin, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateList(int))); TQVBoxLayout *rightvlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint()); selectedList = new TDEListBox(this); rightvlayout->addWidget(selectedList); - connect(selectedList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect(selectedList, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(selectionChanged())); remove = new KPushButton(i18n("&Remove"), this); rightvlayout->addWidget(remove); - connect(remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelected())); + connect(remove, TQ_SIGNAL(clicked()), this, TQ_SLOT(removeSelected())); remove->setEnabled(false); clear = new KPushButton(KStdGuiItem::clear(), this); rightvlayout->addWidget(clear); - connect(clear, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearSelected())); + connect(clear, TQ_SIGNAL(clicked()), this, TQ_SLOT(clearSelected())); clear->setEnabled(false); - setCaption(kapp->makeStdCaption(i18n("Radical Selector"))); + setCaption(tdeApp->makeStdCaption(i18n("Radical Selector"))); strokesSpin->setValue(config->strokes()); strokesSpin->setFocus(); diff --git a/kiten/rad.h b/kiten/rad.h index 54c5cc99..1ac7a477 100644 --- a/kiten/rad.h +++ b/kiten/rad.h @@ -33,7 +33,7 @@ class KPushButton; class TDEListBox; class TQButtonGroup; -class KDE_EXPORT Radical +class TDE_EXPORT Radical { public: Radical(TQString = TQString(), unsigned int = 0); @@ -50,9 +50,9 @@ class KDE_EXPORT Radical TQString Kanji; }; -class KDE_EXPORT Rad : public TQObject +class TDE_EXPORT Rad : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -72,9 +72,9 @@ class KDE_EXPORT Rad : public TQObject bool loaded; }; -class KDE_EXPORT RadWidget : public TQWidget +class TDE_EXPORT RadWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kiten/widgets.cpp b/kiten/widgets.cpp index f572a76c..e952fa63 100644 --- a/kiten/widgets.cpp +++ b/kiten/widgets.cpp @@ -26,8 +26,8 @@ #include <tdelocale.h> #include <tdemessagebox.h> #include <kprinter.h> -#include <kprocess.h> -#include <kstandarddirs.h> +#include <tdeprocess.h> +#include <tdestandarddirs.h> #include <kstatusbar.h> #include <tqfileinfo.h> #include <tqpaintdevicemetrics.h> @@ -278,7 +278,7 @@ void ResultView::print(TQString title) printer.newPage(); page++; - kapp->processEvents(); + tdeApp->processEvents(); } while (true); } @@ -317,11 +317,11 @@ eEdit::eEdit(const TQString &_filename, TQWidget *parent, const char *name) List->setMultiSelection(true); List->setDragEnabled(true); - saveAct = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection()); - removeAct = new TDEAction(i18n("&Delete"), "edit_remove", CTRL + Key_X, TQT_TQOBJECT(this), TQT_SLOT(del()), actionCollection(), "del"); - (void) new TDEAction(i18n("&Disable Dictionary"), 0, TQT_TQOBJECT(this), TQT_SLOT(disable()), actionCollection(), "disable"); - addAct = new TDEAction(i18n("&Add"), "edit_add", CTRL + Key_A, TQT_TQOBJECT(this), TQT_SLOT(add()), actionCollection(), "add"); - (void) KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + saveAct = KStdAction::save(this, TQ_SLOT(save()), actionCollection()); + removeAct = new TDEAction(i18n("&Delete"), "edit_remove", CTRL + Key_X, this, TQ_SLOT(del()), actionCollection(), "del"); + (void) new TDEAction(i18n("&Disable Dictionary"), 0, this, TQ_SLOT(disable()), actionCollection(), "disable"); + addAct = new TDEAction(i18n("&Add"), "edit_add", CTRL + Key_A, this, TQ_SLOT(add()), actionCollection(), "add"); + (void) KStdAction::close(this, TQ_SLOT(close()), actionCollection()); createGUI("eeditui.rc"); //closeAction->plug(toolBar()); @@ -458,11 +458,11 @@ int EditAction::plug( TQWidget *w, int index ) KRomajiEdit *comboBox = new KRomajiEdit(toolBar, "search edit"); toolBar->insertWidget( id, 70, comboBox, index ); - connect( comboBox, TQT_SIGNAL( returnPressed()), m_receiver, m_member ); + connect( comboBox, TQ_SIGNAL( returnPressed()), m_receiver, m_member ); addContainer(toolBar, id); - connect( toolBar, TQT_SIGNAL( destroyed() ), TQT_TQOBJECT(this), TQT_SLOT( slotDestroyed() ) ); + connect( toolBar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); toolBar->setItemAutoSized( id, true ); diff --git a/kiten/widgets.h b/kiten/widgets.h index 44ae4447..2319b4d0 100644 --- a/kiten/widgets.h +++ b/kiten/widgets.h @@ -34,9 +34,9 @@ class KStatusBar; #include "dict.h" #include "rad.h" -class KDE_EXPORT ResultView : public KTextBrowser +class TDE_EXPORT ResultView : public KTextBrowser { - Q_OBJECT + TQ_OBJECT public: @@ -64,9 +64,9 @@ class KDE_EXPORT ResultView : public KTextBrowser bool basicMode; }; -class KDE_EXPORT eEdit : public TDEMainWindow +class TDE_EXPORT eEdit : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: @@ -90,9 +90,9 @@ class KDE_EXPORT eEdit : public TDEMainWindow bool isMod; }; -class KDE_EXPORT EditAction : public TDEAction +class TDE_EXPORT EditAction : public TDEAction { - Q_OBJECT + TQ_OBJECT public: EditAction( const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name ); diff --git a/kiten/xjdxgen.c b/kiten/xjdxgen.c index bf4de028..18afa221 100644 --- a/kiten/xjdxgen.c +++ b/kiten/xjdxgen.c @@ -30,6 +30,7 @@ #include <stdlib.h> #include <ctype.h> #include <string.h> +#include <stdbool.h> #ifdef HAVE_STDINT_H #include <stdint.h> @@ -37,8 +38,6 @@ #include "xjdic.h" -#define TRUE 1 -#define FALSE 0 #define SPTAG '@' #define EXLIM 100 #define TOKENLIM 40 @@ -62,7 +61,7 @@ int stringcomp(unsigned char *s1, unsigned char *s2); void jqsort(int32_t i, int32_t j); int Kstrcmp(uint32_t lhs, uint32_t rhs); void xjdicrc(); -int alphaoreuc(unsigned char x); +bool alphaoreuc(unsigned char x); int stringcomp(unsigned char *s1, unsigned char *s2) { @@ -86,9 +85,10 @@ extern char *getenv(const char *name); /*====function to Load Dictionary and load/create index table=======*/ int main(int argc, char *argv[]) { - FILE *fp,*fopen(); + FILE *fp; uint32_t possav,schi,diclen,indlen; - int i,inwd,cstrp,saving,isc,nodread; + int i,cstrp,isc,nodread; + bool inwd, saving; unsigned char c; unsigned char currstr[TOKENLIM]; @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) JDXname = argv[2]; printf("Commandline request to use files %s and %s \n", Dname, JDXname); - inwd = FALSE; + inwd = false; indptr = 1; llone = 1; if(stat(Dname, &buf) != 0) @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) kana/kanji string and every alphabetic string it finds which is >=3 characters and is not on the "exclude" list */ indptr = 1; - saving = FALSE; + saving = false; cstrp = 0; for (schi =0; schi < dbyte; schi++) /* scan whole dictionary */ { @@ -168,9 +168,9 @@ int main(int argc, char *argv[]) else { currstr[cstrp] = '\0'; - inwd = FALSE; - if ((strlen(currstr) <= 2) && (currstr[0] < 127))saving = FALSE; - if ((strlen(currstr) == 2) && (currstr[1] <= '9'))saving = TRUE; + inwd = false; + if ((strlen(currstr) <= 2) && (currstr[0] < 127))saving = false; + if ((strlen(currstr) == 2) && (currstr[1] <= '9'))saving = true; if (saving && (currstr[0] > 127)) { possav = jindex[indptr]; @@ -237,12 +237,12 @@ int main(int argc, char *argv[]) { if (alphaoreuc(c) || c == SPTAG) { - inwd = TRUE; + inwd = true; jindex[indptr] = schi; cstrp = 1; currstr[0] = c; currstr[1] = '\0'; - saving = TRUE; + saving = true; } } } @@ -326,7 +326,7 @@ void xjdicrc() { unsigned char xjdicdir[PATH_MAX],rcstr[80],*rcwd; int iex; - FILE *fm,*fopen(); + FILE *fm; iex = 0; xjdicdir[0] = '\0'; @@ -374,7 +374,7 @@ void xjdicrc() rcwd = (unsigned char *)strtok(rcstr," \t"); if( stringcomp((unsigned char *)"exlist",rcwd) == 0) { - while (TRUE) + while (true) { rcwd = (unsigned char *)strtok(NULL," \t\f\r\n"); if (rcwd == NULL) break; @@ -401,23 +401,23 @@ void xjdicrc() } */ /*=======function to test a character for alpha or kana/kanji====*/ -int alphaoreuc(unsigned char x) +bool alphaoreuc(unsigned char x) { int c; c = x & 0xff; if(((c >= 65) && (c <= 90)) || ((c >= 97) && (c <= 122))) { - return (TRUE); + return true; } if ((c >= '0') && (c <= '9')) { - return(TRUE); + return true; } if ((c & 0x80) > 0) { - return(TRUE); + return true; } - return (FALSE); + return false; } |