From 5159cd2beb2e87806a5b54e9991b7895285c9d3e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 01:04:16 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- tdeprint/management/kxmlcommandselector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tdeprint/management/kxmlcommandselector.cpp') diff --git a/tdeprint/management/kxmlcommandselector.cpp b/tdeprint/management/kxmlcommandselector.cpp index 6f2b4485e..093d2a909 100644 --- a/tdeprint/management/kxmlcommandselector.cpp +++ b/tdeprint/management/kxmlcommandselector.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3 From deac2ca49faed824fe83066080714eb6d653615b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:13:01 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- KDE2PORTING.html | 50 +- KDE3PORTING.html | 54 +- TODO | 14 +- arts/kde/kvideowidget.cpp | 44 +- dcop/HOWTO | 6 +- dcop/Mainpage.dox | 6 +- interfaces/tdemediaplayer/player.h | 2 +- interfaces/tdescript/scriptloader.cpp | 6 +- interfaces/tdescript/scriptloader.h | 12 +- interfaces/terminal/test/main.h | 2 +- kab/kabapi.cc | 2 +- kab/kabapi.h | 4 +- kabc/addresseedialog.cpp | 4 +- kabc/addresseedialog.h | 4 +- kabc/addresslineedit.cpp | 4 +- kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp | 2 +- kabc/resourceselectdialog.cpp | 2 +- kabc/resourceselectdialog.h | 4 +- kate/interfaces/document.h | 4 +- kate/part/kateautoindent.cpp | 2 +- kate/part/kateautoindent.h | 4 +- kate/part/katebookmarks.cpp | 12 +- kate/part/katebookmarks.h | 16 +- kate/part/katedialogs.cpp | 2 +- kate/part/katedialogs.h | 8 +- kate/part/kateprinter.cpp | 2 +- kate/part/kateschema.cpp | 6 +- kate/part/kateschema.h | 6 +- kate/part/katesearch.cpp | 2 +- kate/part/katesearch.h | 4 +- kate/part/katespell.cpp | 6 +- kate/part/katespell.h | 6 +- kate/part/kateview.cpp | 174 ++-- kate/part/kateview.h | 60 +- kate/part/kateviewhelpers.cpp | 2 +- kate/part/kateviewhelpers.h | 2 +- kate/part/test_regression.cpp | 2 +- kate/plugins/autobookmarker/autobookmarker.cpp | 4 +- kate/plugins/autobookmarker/autobookmarker.h | 2 +- kate/plugins/insertfile/insertfileplugin.cpp | 2 +- kate/plugins/isearch/ISearchPlugin.cpp | 24 +- kate/plugins/isearch/ISearchPlugin.h | 4 +- kate/plugins/kdatatool/kate_kdatatool.cpp | 8 +- kate/plugins/kdatatool/kate_kdatatool.h | 8 +- kate/plugins/wordcompletion/docwordcompletion.cpp | 12 +- kded/kded.cpp | 2 +- kdewidgets/kde.widgets | 16 +- kdewidgets/tests/test.widgets | 12 +- kinit/README.DCOP | 2 +- kinit/kinit.cpp | 8 +- kinit/tdelauncher.cpp | 146 +-- kinit/tdelauncher.h | 26 +- kinit/tdelauncher_main.cpp | 8 +- knewstuff/downloaddialog.cpp | 36 +- knewstuff/downloaddialog.h | 6 +- knewstuff/knewstuff.cpp | 6 +- knewstuff/knewstuff.h | 8 +- knewstuff/providerdialog.cpp | 8 +- knewstuff/providerdialog.h | 4 +- kstyles/klegacy/klegacystyle.cpp | 2 +- kstyles/klegacy/klegacystyle.h | 2 +- kstyles/kthemestyle/kthemestyle.cpp | 4 +- kstyles/web/webstyle.cpp | 10 +- kstyles/web/webstyle.h | 10 +- tdecert/tdecertpart.cc | 18 +- tdecert/tdecertpart.h | 14 +- tdecore/AUTHORS | 6 +- tdecore/DESIGN.iconloading | 2 +- tdecore/README.kiosk | 4 +- tdecore/kaccel.cpp | 246 ++--- tdecore/kaccel.h | 78 +- tdecore/kaccelaction.cpp | 226 ++--- tdecore/kaccelaction.h | 144 +-- tdecore/kaccelbase.cpp | 140 +-- tdecore/kaccelbase.h | 70 +- tdecore/kaccelmanager.cpp | 166 ++-- tdecore/kaccelmanager.h | 4 +- tdecore/kaccelmanager_private.h | 26 +- tdecore/kaccelprivate.h | 20 +- tdecore/kapplication.cpp | 24 +- tdecore/kapplication.h | 48 +- tdecore/kcheckaccelerators.cpp | 6 +- tdecore/kcompletion.h | 8 +- tdecore/kcompletionbase.cpp | 2 +- tdecore/kdebug.areas | 14 +- tdecore/kdebugrc | 6 +- tdecore/kglobalaccel.cpp | 28 +- tdecore/kglobalaccel.h | 30 +- tdecore/kglobalaccel_emb.h | 4 +- tdecore/kglobalaccel_mac.h | 8 +- tdecore/kglobalaccel_win.cpp | 18 +- tdecore/kglobalaccel_win.h | 10 +- tdecore/kglobalaccel_x11.cpp | 22 +- tdecore/kglobalaccel_x11.h | 12 +- tdecore/kglobalsettings.cpp | 2 +- tdecore/kglobalsettings.h | 12 +- tdecore/kmanagerselection.cpp | 84 +- tdecore/kmanagerselection.h | 24 +- tdecore/kshortcut.cpp | 74 +- tdecore/kshortcut.h | 60 +- tdecore/kshortcutlist.cpp | 84 +- tdecore/kshortcutlist.h | 76 +- tdecore/kshortcutmenu.cpp | 16 +- tdecore/kshortcutmenu.h | 8 +- tdecore/kstdaccel.cpp | 270 +++--- tdecore/kstdaccel.h | 116 +-- tdecore/tdeconfigdialogmanager.cpp | 8 +- tdecore/tests/kstdacceltest.cpp | 12 +- tdehtml/ChangeLog | 2 +- tdehtml/domtreeview.cpp | 2 +- tdehtml/domtreeview.h | 2 +- tdehtml/ecma/kjs_debugwin.cpp | 20 +- tdehtml/ecma/kjs_debugwin.h | 18 +- tdehtml/misc/knsplugininstaller.cpp | 2 +- tdehtml/misc/knsplugininstaller.h | 2 +- tdehtml/rendering/render_form.cpp | 24 +- tdehtml/rendering/render_form.h | 12 +- tdehtml/tdehtml_ext.cpp | 64 +- tdehtml/tdehtml_ext.h | 6 +- tdehtml/tdehtml_part.cpp | 68 +- tdehtml/tdehtmlimage.cpp | 6 +- tdehtml/tdehtmlpart_p.h | 52 +- tdehtml/test_regression.cpp | 2 +- tdehtml/testtdehtml.cpp | 12 +- tdeio/Mainpage.dox | 6 +- tdeio/bookmarks/kbookmarkbar.cc | 56 +- tdeio/bookmarks/kbookmarkbar.h | 18 +- tdeio/bookmarks/kbookmarkimporter.h | 2 +- tdeio/bookmarks/kbookmarkmenu.cc | 72 +- tdeio/bookmarks/kbookmarkmenu.h | 36 +- tdeio/bookmarks/kbookmarkmenu_p.h | 34 +- tdeio/misc/tdewalletd/tdewalletd.desktop | 4 +- tdeio/misc/uiserver.cpp | 20 +- tdeio/misc/uiserver.h | 8 +- tdeio/tdefile/ChangeLog | 4 +- tdeio/tdefile/NOTES | 2 +- tdeio/tdefile/kacleditwidget.cpp | 10 +- tdeio/tdefile/kacleditwidget_p.h | 4 +- tdeio/tdefile/kcombiview.cpp | 2 +- tdeio/tdefile/kcombiview.h | 2 +- tdeio/tdefile/kcustommenueditor.cpp | 2 +- tdeio/tdefile/kcustommenueditor.h | 4 +- tdeio/tdefile/kdiroperator.cpp | 94 +- tdeio/tdefile/kdiroperator.h | 70 +- tdeio/tdefile/kdirselectdialog.cpp | 12 +- tdeio/tdefile/kdirselectdialog.h | 6 +- tdeio/tdefile/kencodingfiledialog.cpp | 6 +- tdeio/tdefile/knotifydialog.h | 2 +- tdeio/tdefile/knotifywidgetbase.ui | 2 +- tdeio/tdefile/kopenwith.cpp | 6 +- tdeio/tdefile/kopenwith_p.h | 4 +- tdeio/tdefile/kpropertiesdesktopbase.ui | 2 +- tdeio/tdefile/kpropertiesdialog.cpp | 4 +- tdeio/tdefile/kpropertiesmimetypebase.ui | 2 +- tdeio/tdefile/krecentdirs.cpp | 6 +- tdeio/tdefile/krecentdirs.h | 2 +- tdeio/tdefile/krecentdocument.cpp | 18 +- tdeio/tdefile/krecentdocument.h | 2 +- tdeio/tdefile/kurlbar.cpp | 6 +- tdeio/tdefile/kurlbar.h | 4 +- tdeio/tdefile/kurlrequester.cpp | 4 +- tdeio/tdefile/kurlrequester.h | 2 +- tdeio/tdefile/kurlrequesterdlg.cpp | 2 +- tdeio/tdefile/tdefilebookmarkhandler.cpp | 2 +- tdeio/tdefile/tdefilebookmarkhandler.h | 6 +- tdeio/tdefile/tdefiledetailview.cpp | 24 +- tdeio/tdefile/tdefiledetailview.h | 16 +- tdeio/tdefile/tdefiledialog.cpp | 42 +- tdeio/tdefile/tdefiledialog.h | 16 +- tdeio/tdefile/tdefileiconview.cpp | 12 +- tdeio/tdefile/tdefilepreview.cpp | 2 +- tdeio/tdefile/tdefilepreview.h | 4 +- tdeio/tdefile/tdefiletreeview.cpp | 10 +- tdeio/tdefile/tdefiletreeview.h | 2 +- tdeio/tdefile/tdefiletreeviewitem.cpp | 4 +- tdeio/tdefile/tdefiletreeviewitem.h | 2 +- tdeio/tdefile/tdefileview.cpp | 6 +- tdeio/tdefile/tdefileview.h | 4 +- tdeio/tdefile/tests/tdefiletreeviewtest.cpp | 2 +- tdeio/tdefile/tests/tdefiletreeviewtest.h | 2 +- tdeio/tdeio/kdatatool.cpp | 10 +- tdeio/tdeio/kdatatool.h | 6 +- tdeio/tdeio/kmimetypechooser.cpp | 4 +- tdeio/tdeio/krun.cpp | 6 +- tdeio/tdeio/paste.h | 2 +- tdeio/tdeio/scheduler.cpp | 2 +- tdeio/tdeio/scheduler.h | 8 +- tdeio/tdeio/slave.cpp | 2 +- tdeio/tests/tdeioslavetest.cpp | 2 +- tdeio/tests/tdeioslavetest.h | 2 +- tdemdi/tdemdi/guiclient.cpp | 32 +- tdemdi/tdemdi/guiclient.h | 18 +- tdemdi/tdemdi/toolviewaccessor_p.h | 2 +- tdemdi/tdemdidocumentviewtabwidget.h | 2 +- tdemdi/tdemdiguiclient.cpp | 38 +- tdemdi/tdemdiguiclient.h | 22 +- tdemdi/tdemdimainfrm.cpp | 10 +- tdemdi/tdemditaskbar.cpp | 4 +- tdemdi/tdemditaskbar.h | 2 +- tdemdi/tdemditoolviewaccessor_p.h | 2 +- tdemdi/test/mainwidget.cpp | 2 +- tdemdi/test/mainwidget.h | 2 +- tdeparts/mainwindow.cpp | 6 +- tdeparts/mainwindow.h | 8 +- tdeparts/part.cpp | 2 +- tdeparts/part.h | 10 +- tdeparts/statusbarextension.cpp | 2 +- tdeparts/statusbarextension.h | 6 +- tdeparts/tests/example.cpp | 16 +- tdeparts/tests/example.h | 6 +- tdeparts/tests/ghostview.cpp | 4 +- tdeparts/tests/normalktm.cpp | 10 +- tdeparts/tests/normalktm.h | 8 +- tdeparts/tests/notepad.cpp | 2 +- tdeparts/tests/parts.cpp | 2 +- tdeparts/tests/plugin_spellcheck.cpp | 2 +- tdeprint/cups/cupsdconf2/editlist.cpp | 2 +- tdeprint/cups/cupsdconf2/editlist.h | 4 +- tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp | 2 +- tdeprint/cups/cupsdconf2/qdirmultilineedit.h | 4 +- tdeprint/cups/kmcupsjobmanager.cpp | 10 +- tdeprint/cups/kmcupsjobmanager.h | 4 +- tdeprint/cups/kmcupsmanager.cpp | 8 +- tdeprint/cups/kmcupsmanager.h | 4 +- tdeprint/cups/kmwfax.cpp | 2 +- tdeprint/cups/kmwfax.h | 4 +- tdeprint/cups/kmwippprinter.cpp | 2 +- tdeprint/cups/kmwippprinter.h | 4 +- tdeprint/cups/kmwippselect.cpp | 2 +- tdeprint/cups/kmwippselect.h | 4 +- tdeprint/cups/kmwother.cpp | 2 +- tdeprint/cups/kmwother.h | 4 +- tdeprint/driverview.cpp | 2 +- tdeprint/driverview.h | 2 +- tdeprint/droptionview.cpp | 2 +- tdeprint/droptionview.h | 4 +- tdeprint/kmjobmanager.cpp | 6 +- tdeprint/kmjobmanager.h | 8 +- tdeprint/kmmanager.cpp | 4 +- tdeprint/kmmanager.h | 6 +- tdeprint/kpfilterpage.cpp | 2 +- tdeprint/kpfilterpage.h | 4 +- tdeprint/kprintaction.cpp | 6 +- tdeprint/kprintaction.h | 2 +- tdeprint/kprintpreview.cpp | 26 +- tdeprint/lpr/editentrydialog.cpp | 2 +- tdeprint/lpr/kmlprmanager.cpp | 6 +- tdeprint/lpr/kmlprmanager.h | 4 +- tdeprint/management/cjanuswidget.cpp | 6 +- tdeprint/management/kiconselectaction.cpp | 20 +- tdeprint/management/kiconselectaction.h | 2 +- tdeprint/management/kmconfigfilter.cpp | 14 +- tdeprint/management/kmconfigfilter.h | 6 +- tdeprint/management/kmconfigfonts.cpp | 2 +- tdeprint/management/kmconfigfonts.h | 4 +- tdeprint/management/kmdriverdbwidget.cpp | 4 +- tdeprint/management/kminstancepage.cpp | 2 +- tdeprint/management/kminstancepage.h | 4 +- tdeprint/management/kmjobviewer.cpp | 44 +- tdeprint/management/kmjobviewer.h | 6 +- tdeprint/management/kmmainview.cpp | 98 +- tdeprint/management/kmmainview.h | 20 +- tdeprint/management/kmwbackend.cpp | 8 +- tdeprint/management/kmwclass.cpp | 4 +- tdeprint/management/kmwclass.h | 4 +- tdeprint/management/kmwdriverselect.cpp | 2 +- tdeprint/management/kmwdriverselect.h | 4 +- tdeprint/management/kmwlocal.cpp | 2 +- tdeprint/management/kmwlocal.h | 4 +- tdeprint/management/kmwsocket.cpp | 2 +- tdeprint/management/kmwsocket.h | 4 +- tdeprint/management/kxmlcommanddlg.cpp | 10 +- tdeprint/management/kxmlcommanddlg.h | 12 +- tdeprint/management/kxmlcommandselector.cpp | 2 +- tdeprint/management/pluginaction.cpp | 2 +- tdeprint/management/pluginaction.h | 2 +- tdeprint/management/smbview.cpp | 2 +- tdeprint/management/smbview.h | 2 +- tdeprint/rlpr/kmwrlpr.cpp | 2 +- tdeprint/rlpr/kmwrlpr.h | 4 +- tdeprint/tdefilelist.cpp | 2 +- tdeprint/tdefilelist.h | 4 +- tdeprint/tests/helpwindow.cpp | 2 +- tdeprint/tests/helpwindow.h | 2 +- tderesources/configpage.cpp | 2 +- tderesources/configpage.h | 4 +- tderesources/selectdialog.cpp | 2 +- tderesources/selectdialog.h | 4 +- tdersync/tdersync.h | 2 +- tdeui/AUTHORS | 12 +- tdeui/Mainpage.dox | 2 +- tdeui/TODO.xmlgui | 8 +- tdeui/kaboutapplication.h | 4 +- tdeui/kaboutkde.h | 4 +- tdeui/kaccelgen.h | 4 +- tdeui/kaction.cpp | 492 +++++----- tdeui/kaction.h | 134 +-- tdeui/kactionclasses.cpp | 998 ++++++++++----------- tdeui/kactionclasses.h | 316 +++---- tdeui/kactioncollection.cpp | 360 ++++---- tdeui/kactioncollection.h | 152 ++-- tdeui/kactionselector.cpp | 88 +- tdeui/kactionselector.h | 10 +- tdeui/kactionshortcutlist.h | 42 +- tdeui/kanimwidget.cpp | 6 +- tdeui/kanimwidget.h | 2 +- tdeui/kcmenumngr.cpp | 2 +- tdeui/kcolorbutton.cpp | 4 +- tdeui/kcolordialog.cpp | 8 +- tdeui/kcolordialog.h | 8 +- tdeui/kcombobox.cpp | 8 +- tdeui/kcombobox.h | 4 +- tdeui/kcommand.cpp | 10 +- tdeui/kcommand.h | 12 +- tdeui/kcompletionbox.cpp | 14 +- tdeui/kcompletionbox.h | 4 +- tdeui/kdatepicker.cpp | 2 +- tdeui/kdatetbl.cpp | 44 +- tdeui/kdatetbl.h | 14 +- tdeui/kdcopactionproxy.cpp | 22 +- tdeui/kdcopactionproxy.h | 26 +- tdeui/kdetrayproxy/kdetrayproxy.h | 2 +- tdeui/kdockwidget.cpp | 12 +- tdeui/kdockwidget.h | 8 +- tdeui/keditcl1.cpp | 32 +- tdeui/kedittoolbar.cpp | 46 +- tdeui/kedittoolbar.h | 28 +- tdeui/kfontcombo.cpp | 80 +- tdeui/kfontcombo.h | 12 +- tdeui/kfontdialog.cpp | 80 +- tdeui/kfontdialog.h | 56 +- tdeui/kfontrequester.cpp | 16 +- tdeui/kfontrequester.h | 10 +- tdeui/khelpmenu.cpp | 20 +- tdeui/khelpmenu.h | 20 +- tdeui/kinputdialog.cpp | 8 +- tdeui/kinputdialog.h | 2 +- tdeui/kjanuswidget.cpp | 8 +- tdeui/kjanuswidget.h | 6 +- tdeui/kkeybutton.cpp | 10 +- tdeui/kkeybutton.h | 10 +- tdeui/kkeydialog.cpp | 164 ++-- tdeui/kkeydialog.h | 84 +- tdeui/klineedit.cpp | 70 +- tdeui/klineedit.h | 2 +- tdeui/klistbox.cpp | 26 +- tdeui/klistbox.h | 8 +- tdeui/klistview.cpp | 334 +++---- tdeui/klistview.h | 56 +- tdeui/klistviewlineedit.h | 10 +- tdeui/klistviewsearchline.cpp | 86 +- tdeui/klistviewsearchline.h | 56 +- tdeui/kmainwindow.cpp | 236 ++--- tdeui/kmainwindow.h | 126 +-- tdeui/kmainwindowiface.cpp | 66 +- tdeui/kmainwindowiface.h | 20 +- tdeui/kmenubar.cpp | 4 +- tdeui/kmessagebox.cpp | 4 +- tdeui/kpanelmenu.cpp | 8 +- tdeui/kpanelmenu.h | 2 +- tdeui/kpartgui.dtd | 6 +- tdeui/kpixmapregionselectorwidget.cpp | 10 +- tdeui/kpixmapregionselectorwidget.h | 6 +- tdeui/kpopupmenu.cpp | 174 ++-- tdeui/kpopupmenu.h | 40 +- tdeui/kselect.cpp | 34 +- tdeui/kselect.h | 16 +- tdeui/kshortcutdialog.cpp | 42 +- tdeui/kshortcutdialog.h | 24 +- tdeui/kshortcutdialog_advanced.ui | 6 +- tdeui/kshortcutdialog_simple.ui | 6 +- tdeui/kstatusbar.h | 8 +- tdeui/kstdaction.cpp | 174 ++-- tdeui/kstdaction.h | 292 +++--- tdeui/kstdaction_p.h | 144 +-- tdeui/ksystemtray.cpp | 18 +- tdeui/ksystemtray.h | 12 +- tdeui/ktextedit.cpp | 32 +- tdeui/ktimezonewidget.cpp | 4 +- tdeui/ktimezonewidget.h | 4 +- tdeui/ktoolbar.cpp | 430 ++++----- tdeui/ktoolbar.h | 74 +- tdeui/ktoolbarbutton.cpp | 138 +-- tdeui/ktoolbarbutton.h | 28 +- tdeui/ktoolbarhandler.cpp | 50 +- tdeui/ktoolbarhandler.h | 20 +- tdeui/ktoolbarlabelaction.cpp | 42 +- tdeui/ktoolbarlabelaction.h | 28 +- tdeui/ktoolbarradiogroup.cpp | 18 +- tdeui/ktoolbarradiogroup.h | 26 +- tdeui/kwhatsthismanager_p.h | 2 +- tdeui/kxmlgui.xsd | 4 +- tdeui/kxmlguibuilder.cpp | 56 +- tdeui/kxmlguibuilder.h | 4 +- tdeui/kxmlguiclient.cpp | 24 +- tdeui/kxmlguiclient.h | 24 +- tdeui/kxmlguifactory.cpp | 10 +- tdeui/kxmlguifactory.h | 10 +- tdeui/kxmlguifactory_p.cpp | 4 +- tdeui/kxmlguifactory_p.h | 12 +- tdeui/tdespelldlg.h | 4 +- tdeui/tests/itemcontainertest.cpp | 24 +- tdeui/tests/itemcontainertest.h | 8 +- tdeui/tests/kaccelgentest.cpp | 8 +- tdeui/tests/kactiontest.cpp | 18 +- tdeui/tests/kdockwidgettest.cpp | 2 +- tdeui/tests/kfontdialogtest.cpp | 8 +- tdeui/tests/klistviewtest.cpp | 26 +- tdeui/tests/kmainwindowrestoretest.h | 24 +- tdeui/tests/kmainwindowtest.h | 2 +- tdeui/tests/kpopuptest.cpp | 4 +- tdeui/tests/krulertest.cpp | 2 +- tdeui/tests/krulertest.h | 2 +- tdeui/tests/kstatusbartest.cpp | 2 +- tdeui/tests/kstatusbartest.h | 2 +- tdeui/tests/ktoolbarlabelactiontest.cpp | 10 +- tdeui/tests/kxmlguitest.cpp | 8 +- tdeui/tests/twindowtest.cpp | 14 +- tdeui/tests/twindowtest.h | 10 +- tdeui/twindowlistmenu.cpp | 4 +- tdeui/twindowlistmenu.h | 2 +- tdeutils/kpluginselector.cpp | 12 +- tdeutils/ksettings/componentsdialog.cpp | 6 +- tdeutils/tdemultitabbar.cpp | 2 +- 424 files changed, 5904 insertions(+), 5904 deletions(-) (limited to 'tdeprint/management/kxmlcommandselector.cpp') diff --git a/KDE2PORTING.html b/KDE2PORTING.html index e77898f37..63692b613 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -26,7 +26,7 @@ or this page online.

  • KIconLoader
  • KTMainWindow
  • KHelpMenu
  • -
  • KToolBar
  • +
  • TDEToolBar
  • Starting other programs
  • tdehtmlw
  • KIntegerLine, KIntLineEdit
  • @@ -45,8 +45,8 @@ or this page online.

  • KQuickHelp
  • KPixmap::gradientFill
  • KTabListBox
  • -
  • KToolBarButton & KRadioGroup
  • -
  • KAccel
  • +
  • TDEToolBarButton & TDERadioGroup
  • +
  • TDEAccel
  • kstring.h / KString
  • ktopwidget.h / KTopWidget
  • kbutton.h / KButton
  • @@ -142,8 +142,8 @@ or this page online.

    The methods tempSaveName() and checkRecoverFile() return QString now. The returned values must _not_ be free()d.

    - helpMenu() has been moved to KMainWindow. aboutKDE(), aboutApp() and - appHelpActivated() have all been removed See section for KMainWindow + helpMenu() has been moved to TDEMainWindow. aboutKDE(), aboutApp() and + appHelpActivated() have all been removed See section for TDEMainWindow for more info.

    The TDEApplication constructor has changed. Command line arguments and @@ -248,9 +248,9 @@ in stripping off the .xpm part

    KTMainWindow

    -KTMainWindow has been replaced with KMainWindow.

    +KTMainWindow has been replaced with TDEMainWindow.

    -The KMainWindow constructor needs a parent widget as first argument. +The TDEMainWindow constructor needs a parent widget as first argument. You can use 0 for this.

    setView() has been replaced with setCentralWidget().

    view() has been replaced with centralWidget().

    @@ -271,12 +271,12 @@ mainViewGeometry() instead.

    KHelpMenu

    -helpMenu() has been moved to KMainWindow from TDEApplication (kapp).

    +helpMenu() has been moved to TDEMainWindow from TDEApplication (kapp).

    Both the "About KDE" and the "About <Application>" dialog boxes are now modeless. "About KDE" is a completely new widget.

    -If you used in the toplevel window (that is derived from KMainWindow) +If you used in the toplevel window (that is derived from TDEMainWindow) "kapp->helpMenu( bool, TQString )" to get the help menu you must now change this to "helpMenu( TQString )". The TQString defaults to TQString::null so it is sufficient to write helpMenu().

    @@ -284,13 +284,13 @@ to TQString::null so it is sufficient to write helpMenu().

    The old aboutKDE(), aboutApp() and appHelpActivated() of TDEApplication have all been removed. If you need direct access to these or need access to a help menu in a class that is not derived from -KMainWindow then allocate an instance of the new class KHelpMenu. +TDEMainWindow then allocate an instance of the new class KHelpMenu. See KDE 2.0 API reference or khelpmenu.h (tdeui) for additional info.

    Espen Sand <espen@kde.org>

    Return to the Table of Contents

    -

    KToolBar

    +

    TDEToolBar

    enable(...) is depreciated, use show()/hide() instead.

    enableFloating(...) has been removed, use enableMoving() instead.

    @@ -588,7 +588,7 @@ this:

    TQSplitter *split = new TQSplitter( parent );
    TQListBox *lb = new TQListBox( split );
    - KListView *lv = new KListView( split );
    + TDEListView *lv = new TDEListView( split );
    TQMultiLineEdit *ed = new TQMultiLineEdit( split );
    @@ -600,17 +600,17 @@ possible if you call setOpaqueResize(true).

    KTreeList, KTreeListItem

    -Use KListView, TQListViewItem instead. API is almost the same, you only -need to add a Column (KListView::addColum) before KListView is useable.

    +Use TDEListView, TQListViewItem instead. API is almost the same, you only +need to add a Column (TDEListView::addColum) before TDEListView is useable.

    -KListView has no addChild(), insertItem() and removeItem() calls. Inserting -a root item is done by constructing a TQListViewItem with the KListView +TDEListView has no addChild(), insertItem() and removeItem() calls. Inserting +a root item is done by constructing a TQListViewItem with the TDEListView passed as the parent widget. adding a child item is done by constructing a TQListViewItem with the parent item as parameter. removeItem() should be replaced by delete <pointer to item>.

    The root items are not shown in a tree fashion by default. to get this, -use KListView::setDecorativeRoot(true).

    +use TDEListView::setDecorativeRoot(true).

    Expanding and collapsing can by done by using TQListViewItem::setOpen(bool).

    @@ -685,24 +685,24 @@ unbalancedGradient(), hash(), desaturate(), pattern(), fade(), blend() etc.

    KTabListBox

    -This widget has been replaced by the almighty KListView. Everything said +This widget has been replaced by the almighty TDEListView. Everything said about KTreeList could be repeated here. The good thing is, that you now can combine TreeView's and normal Tablists without problems.

    Return to the Table of Contents

    -

    KToolBarButton & KRadioGroup

    +

    TDEToolBarButton & TDERadioGroup

    -If you need to do anything with KToolBarButton you now need to include -<ktoolbarbutton.h> KRadioGroup has been renamed to KToolBarRadioGroup and +If you need to do anything with TDEToolBarButton you now need to include +<ktoolbarbutton.h> TDERadioGroup has been renamed to TDEToolBarRadioGroup and requires you to include <ktoolbarradiogroup.h>

    Return to the Table of Contents

    -

    KAccel

    +

    TDEAccel

    The functions keyToString() and stringToKey() which were previously -declared globally in kaccel.h are now static methods in KAccel.

    +declared globally in kaccel.h are now static methods in TDEAccel.

    Return to the Table of Contents

    @@ -716,7 +716,7 @@ The file has been removed completely, use TQString instead. (ktopwidget.h / KTopWidget -KMainWindow replaces this class completely. ktopwidget.h does not +TDEMainWindow replaces this class completely. ktopwidget.h does not exist in KDE 2. (mirko@kde.org)

    Return to the Table of Contents

    @@ -754,7 +754,7 @@ Please adjust your code accordingly.

    KDockWidget

    -KDockWidget inherits form KMainWindow instead of KTMainWindow now. +KDockWidget inherits form TDEMainWindow instead of KTMainWindow now. See KTMainWindow for more details.

    Return to the Table of Contents

    diff --git a/KDE3PORTING.html b/KDE3PORTING.html index b3fdff0d0..407d5c5ad 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -148,11 +148,11 @@ should be replaced with methods from TDELocale::calendar(). cases be replaced by methods in TDELocale::calendar().

    Accelerators Keys

    -
    KAccel
    +
    TDEAccel
    The following methods of been deprecated, and if KDE_NO_COMPAT is defined they will not be available.
      -
    • KAccel::insertItem() and KAccel::connectItem(). +
    • TDEAccel::insertItem() and TDEAccel::connectItem().
       	- kaccel->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
       	- kaccel->connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) );
      @@ -163,19 +163,19 @@ not be available.
       	You might replace the TQString::null parameter with
       	
       i18n("Scroll the current document's contents up by one line.") 
      for example.
    • -
    • KAccel::changeMenuAccel() has been deprecated because it was +
    • TDEAccel::changeMenuAccel() has been deprecated because it was never used in cvs. If you've used it in your application, the following can replace it. Note, however, that this would be handled automatically - by using KAction instead. + by using TDEAction instead.
       	- kaccel->changeMenuAccel( menu, id, "file_open" );
       	+ menu->setAccel( kaccel->shortcut( "file_open" ).keyCodeQt(), id );
       
    -The preferred means of defining a shortcut, however, is to use KAction. +The preferred means of defining a shortcut, however, is to use TDEAction.
    -	new KAction( i18n("Scroll Up"), Key_Up,
    +	new TDEAction( i18n("Scroll Up"), Key_Up,
     		this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" );
     
    @@ -189,25 +189,25 @@ The preferred means of defining a shortcut, however, is to use KAction. shortcut reassignments, which in turn used to make an expensive ungrab of the old key and second grab of the new key necessary. -
    KStdAccel
    +
    TDEStdAccel
    • StdAccel::WhatThis has been renamed to StdAccel::WhatsThis.
    • StdAccel::Insert and the corresponding insert() have been removed. (Nobody on the list knew what its function was supposed to be.) Calls to insert() and the equivalent - key(KStdAccel::Insert) can be replaced with the former default + key(TDEStdAccel::Insert) can be replaced with the former default of Qt::CTRL+Qt::Key_Insert.
    • The following functions have been deprecated and will need to be changed if KDE_NO_COMPAT is defined: - + - + TDEShortcut::contains( const KKey&/KKeySequence& ). +
      OldNew
      TQString action(StdAccel id)TQString name(StdAccel id)
      int defaultKey(StdAccel accel)KShortcut shortcutDefault(StdAccel id)
      int defaultKey(StdAccel accel)TDEShortcut shortcutDefault(StdAccel id)
      TQString description(StdAccel id)TQString label(StdAccel id)
      bool isEqual(const TQKeyEvent* pEvent, int keyQt) The best method for replacing this varies. One possibility is to use KKey(const TQKeyEvent*) == KKey(int). Another is to use - KShortcut::contains( const KKey&/KKeySequence& ).
      int key(StdAccel)const KShortcut& shortcut(StdAccel)
      int key(StdAccel)const TDEShortcut& shortcut(StdAccel)
    @@ -221,27 +221,27 @@ KURLBar and KURLBarItem.

    Changes in tdeui

    -

    KAccelMenu

    +

    TDEAccelMenu

    This class has been removed, Qt offers the same functionality. -Use QPopupMenu/KPopupMenu or the XML-UI method for building menus. +Use QPopupMenu/TDEPopupMenu or the XML-UI method for building menus. -

    KAction

    +

    TDEAction

    • The following methods have been deprecated and will need to be replaced if KDE_NO_COMPAT is defined. - + - +
      OldNew
      int accel()const KShortcut& shortcut()
      int accel()const TDEShortcut& shortcut()
      int menuId()int itemId()
      void setAccel(int)void setShortcut(const KShortcut&)
      void setAccel(int)void setShortcut(const TDEShortcut&)
    -

    KActionCollection

    +

    TDEActionCollection

      -
    • When constructing a KActionCollection object, a pointer to the focus widget should be passed.
    • +
    • When constructing a TDEActionCollection object, a pointer to the focus widget should be passed.
    • The insert(), remove(), and take() methods have been deprecated. - If you wish to keep a list of actions, use the KActionPtrList container instead. + If you wish to keep a list of actions, use the TDEActionPtrList container instead. If you want to configure the shortcuts from multiple actions collections, pass each collection to KKeyChooser or KKeyDialog via their insert() methods.
    @@ -322,24 +322,24 @@ KThemeBase and KThemeStyle have been ported over to the new QStyle/KStyle API present in Qt3/KDE3. KThemeBase is no longer in tdeui, but in kstyles/kthemestyle as its use is basically limited to KThemeStyle. -

    KAction, KToolBar, KToolBarButton and icons

    +

    TDEAction, TDEToolBar, TDEToolBarButton and icons

    The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader), instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed on-demand icon loading.

    -Method KAction::hasIconSet() has been renamed to KAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. -KAction::iconSet() now has an argument specifying icon group, the old KAction::iconSet() is still available unless KDE_NO_COMPAT +Method TDEAction::hasIconSet() has been renamed to TDEAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. +TDEAction::iconSet() now has an argument specifying icon group, the old TDEAction::iconSet() is still available unless KDE_NO_COMPAT is defined and returns KIcon::Small iconset, just like in KDE2.

    -KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. -Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead. +TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. +Use TDEToolBarButton::setIcon() (preferred) or TDEToolBarButton::setIconSet() instead. -

    KAction and derived classes

    +

    TDEAction and derived classes

    The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const TQString&) is now updateText(int) ). Because the former second argument was always the value of the a corresponding data member, you can simply call the accessor method (i.e. in updateText() call text() to get the text). -

    KToggleAction

    +

    TDEToggleAction

    exclusiveGroup() is no more virtual. setExclusiveGroup(const TQString&) is not a slot anymore. @@ -563,7 +563,7 @@ flexibility and efficiency.

    Sorting has changed radically. Previously, KFileView had protected methods QuickSort, compareItems() and mergeLists() to sort directory entries for displaying in the views. Now, -KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, KListView) +KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, TDEListView) sorting is utilized by letting its view-items provide a TQString key() method. Therefore, KFileView offers the two methods
      diff --git a/TODO b/TODO index c4772bbf4..fe2c608a0 100644 --- a/TODO +++ b/TODO @@ -33,7 +33,7 @@ that we would like to make for the next binary incompatible release. - Clean up the uses of virtual_hook, use normal virtuals instead (e.g. KZip/KArchive) -- Make it possible to create a KSystemTray without a KMainWindow and instead lazily +- Make it possible to create a KSystemTray without a TDEMainWindow and instead lazily create the main window on demand. - Make KSystemTray's Quit option in the context menu call kapp->quit() instead of @@ -94,12 +94,12 @@ that we would like to make for the next binary incompatible release. QFont/QPoint/QSize is cheap enough to justify a consistent and usable API (IMHO) . Keep source compatibility. -- Sort out reference counting of applications and KMainWindows: Add a setRefCountEnabled() +- Sort out reference counting of applications and TDEMainWindows: Add a setRefCountEnabled() function to TDEApplication; deref()ing the last reference should only quit the application if reference counts are enabled, and the reference count should be disabled by default - so apps that don't use a KMainWindow mostly continue to work. Make the KMainWindow - constructor call setRefCountEnabled(true), and make each KMainWindow hold its own - reference to the application. The KMainWindow should drop its app reference on hide, and + so apps that don't use a TDEMainWindow mostly continue to work. Make the TDEMainWindow + constructor call setRefCountEnabled(true), and make each TDEMainWindow hold its own + reference to the application. The TDEMainWindow should drop its app reference on hide, and regain it on show. Make KSysTray also hold a reference to the app. Then apps that use more than one main @@ -159,7 +159,7 @@ that we would like to make for the next binary incompatible release. - Make API use US English, (eg. KCatalogue -> KCatalog) -- It would be nice if some insan^H^H^H brave soul had a look at the KAccel/KShortcut/KKeyWhatever +- It would be nice if some insan^H^H^H brave soul had a look at the TDEAccel/TDEShortcut/KKeyWhatever classes and cleaned it up. - KKeyDialog needs to be improved. It should simplify using KKeyChooser by not having to instantiate @@ -209,7 +209,7 @@ an alternative help->contents action) - Dump KPixmapIO class. QPixmap with qt-copy patches #0005 and #0007 can perform just as well, KPixmapIO can't dither, and it generally doesn't make much sense to have this class. -- KListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between +- TDEListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between "dnd to move items" (e.g. keditbookmarks) and "dnd onto items" (e.g. kmail). Unless Qt4 does it all :) - Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint, diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index bc17f32d8..a4307dbbf 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -101,22 +101,22 @@ void KVideoWidget::init(void) videoHeight = 0; // Setup actions - new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen", + new TDEToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen", CTRL+SHIFT+Key_F, TQT_TQOBJECT(this), TQT_SLOT(fullscreenActivated()), actionCollection(), "fullscreen_mode" ); - new KRadioAction( i18n("&Half Size"), ALT+Key_0, + new TDERadioAction( i18n("&Half Size"), ALT+Key_0, TQT_TQOBJECT(this), TQT_SLOT(halfSizeActivated()), actionCollection(), "half_size" ); - new KRadioAction( i18n("&Normal Size"), ALT+Key_1, + new TDERadioAction( i18n("&Normal Size"), ALT+Key_1, TQT_TQOBJECT(this), TQT_SLOT(normalSizeActivated()), actionCollection(), "normal_size" ); - new KRadioAction( i18n("&Double Size"), ALT+Key_2, + new TDERadioAction( i18n("&Double Size"), ALT+Key_2, TQT_TQOBJECT(this), TQT_SLOT(doubleSizeActivated()), actionCollection(), "double_size" ); - ((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); - ((KToggleAction *)action( "normal_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); - ((KToggleAction *)action( "double_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); + ((TDEToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); + ((TDEToggleAction *)action( "normal_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); + ((TDEToggleAction *)action( "double_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); action("double_size")->setEnabled(false); action("half_size")->setEnabled(false); @@ -232,29 +232,29 @@ bool KVideoWidget::isEmbedded() bool KVideoWidget::isFullscreen() { - return ((KToggleAction *)action( "fullscreen_mode" ))->isChecked(); + return ((TDEToggleAction *)action( "fullscreen_mode" ))->isChecked(); } bool KVideoWidget::isHalfSize() { - return ((KToggleAction *)action( "half_size" ))->isChecked(); + return ((TDEToggleAction *)action( "half_size" ))->isChecked(); } bool KVideoWidget::isNormalSize() { - return ((KToggleAction *)action( "normal_size" ))->isChecked(); + return ((TDEToggleAction *)action( "normal_size" ))->isChecked(); } bool KVideoWidget::isDoubleSize() { - return ((KToggleAction *)action( "double_size" ))->isChecked(); + return ((TDEToggleAction *)action( "double_size" ))->isChecked(); } void KVideoWidget::setFullscreen() { if (!isFullscreen()) { - ((KToggleAction *)action( "fullscreen_mode" ))->setChecked( true ); + ((TDEToggleAction *)action( "fullscreen_mode" ))->setChecked( true ); fullscreenActivated(); } } @@ -263,26 +263,26 @@ void KVideoWidget::setWindowed() { if (isFullscreen()) { - ((KToggleAction *)action( "fullscreen_mode" ))->setChecked( false ); + ((TDEToggleAction *)action( "fullscreen_mode" ))->setChecked( false ); fullscreenActivated(); } } void KVideoWidget::setHalfSize() { - ((KToggleAction *)action( "half_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "half_size" ))->setChecked( true ); halfSizeActivated(); } void KVideoWidget::setNormalSize() { - ((KToggleAction *)action( "normal_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "normal_size" ))->setChecked( true ); normalSizeActivated(); } void KVideoWidget::setDoubleSize() { - ((KToggleAction *)action( "double_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "double_size" ))->setChecked( true ); doubleSizeActivated(); } @@ -323,18 +323,18 @@ void KVideoWidget::resizeEvent( TQResizeEvent *event ) { if (width() == QMAX( (videoWidth / 2), minimumWidth() ) && height() == QMAX( (videoHeight / 2), minimumHeight() )) - ((KToggleAction *)action( "half_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "half_size" ))->setChecked( true ); else if (width() == QMAX( videoWidth, minimumWidth() ) && height() == QMAX( videoHeight, minimumHeight() )) - ((KToggleAction *)action( "normal_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "normal_size" ))->setChecked( true ); else if (width() == QMAX( (2 * videoWidth), minimumWidth() ) && height() == QMAX( (2 * videoHeight), minimumHeight() )) - ((KToggleAction *)action( "double_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "double_size" ))->setChecked( true ); else { - ((KToggleAction *)action( "half_size" ))->setChecked( false ); - ((KToggleAction *)action( "normal_size" ))->setChecked( false ); - ((KToggleAction *)action( "double_size" ))->setChecked( false ); + ((TDEToggleAction *)action( "half_size" ))->setChecked( false ); + ((TDEToggleAction *)action( "normal_size" ))->setChecked( false ); + ((TDEToggleAction *)action( "double_size" ))->setChecked( false ); } } } diff --git a/dcop/HOWTO b/dcop/HOWTO index 5927f3716..7126d3c1d 100644 --- a/dcop/HOWTO +++ b/dcop/HOWTO @@ -309,8 +309,8 @@ in that case the signal connection will always be deleted. A receiver can create a non-volatile connection while the sender doesn't (yet) exist. An anonymous DCOP connection should always be non-volatile. -The following example shows how KLauncher emits a signal whenever it notices -that an application that was started via KLauncher terminates. +The following example shows how TDELauncher emits a signal whenever it notices +that an application that was started via TDELauncher terminates. QByteArray params; QDataStream stream(params, IO_WriteOnly); @@ -319,7 +319,7 @@ that an application that was started via KLauncher terminates. The task manager of the TDE panel connects to this signal. It uses an anonymous connection (it doesn't require that the signal is being emitted -by KLauncher) that is non-volatile: +by TDELauncher) that is non-volatile: connectDCOPSignal(0, 0, "clientDied(pid_t)", "clientDied(pid_t)", false); diff --git a/dcop/Mainpage.dox b/dcop/Mainpage.dox index 423571280..62fd3cf44 100644 --- a/dcop/Mainpage.dox +++ b/dcop/Mainpage.dox @@ -541,8 +541,8 @@ in that case the signal connection will always be deleted. A receiver can create a non-volatile connection while the sender doesn't (yet) exist. An anonymous DCOP connection should always be non-volatile. -The following example shows how KLauncher emits a signal whenever it notices -that an application that was started via KLauncher terminates: +The following example shows how TDELauncher emits a signal whenever it notices +that an application that was started via TDELauncher terminates: \code QByteArray params; @@ -553,7 +553,7 @@ kapp->dcopClient()->emitDCOPSignal("clientDied(pid_t)", params); The task manager of the Trinity panel connects to this signal. It uses an anonymous connection (it doesn't require that the signal is being emitted -by KLauncher) that is non-volatile: +by TDELauncher) that is non-volatile: \code connectDCOPSignal(0, 0, "clientDied(pid_t)", "clientDied(pid_t)", false); diff --git a/interfaces/tdemediaplayer/player.h b/interfaces/tdemediaplayer/player.h index 493a921e3..05582ca07 100644 --- a/interfaces/tdemediaplayer/player.h +++ b/interfaces/tdemediaplayer/player.h @@ -39,7 +39,7 @@ namespace KMediaPlayer * * There are two servicetypes for Player: KMediaPlayer/Player and * KMediaPlayer/Engine. KMediaPlayer/Player provides a widget (accessable - * through view as well as XML GUI KActions. KMediaPlayer/Engine omits + * through view as well as XML GUI TDEActions. KMediaPlayer/Engine omits * the user interface facets, for those who wish to provide their own * interface. */ diff --git a/interfaces/tdescript/scriptloader.cpp b/interfaces/tdescript/scriptloader.cpp index 1ff34f98a..a11032ada 100644 --- a/interfaces/tdescript/scriptloader.cpp +++ b/interfaces/tdescript/scriptloader.cpp @@ -33,11 +33,11 @@ #include -ScriptLoader::ScriptLoader(KMainWindow *parent) : TQObject (parent) +ScriptLoader::ScriptLoader(TDEMainWindow *parent) : TQObject (parent) { m_parent = parent; m_scripts.clear(); - m_theAction = new KSelectAction ( i18n("KDE Scripts"), + m_theAction = new TDESelectAction ( i18n("KDE Scripts"), 0, this, TQT_SLOT(runAction()), @@ -51,7 +51,7 @@ ScriptLoader::~ScriptLoader() m_scripts.clear(); } -KSelectAction * ScriptLoader::getScripts() +TDESelectAction * ScriptLoader::getScripts() { // Get the available scripts for this application. TQStringList pluginList = ""; diff --git a/interfaces/tdescript/scriptloader.h b/interfaces/tdescript/scriptloader.h index a249283d6..d0b338822 100644 --- a/interfaces/tdescript/scriptloader.h +++ b/interfaces/tdescript/scriptloader.h @@ -33,12 +33,12 @@ class ScriptLoader : virtual public QObject /** * Default Constructor */ - ScriptLoader(KMainWindow *parent=0); + ScriptLoader(TDEMainWindow *parent=0); ~ScriptLoader(); - /** Return the a KSelectAction with all of the scripts - * @returns KSelectAction containing access to all of the scripts + /** Return the a TDESelectAction with all of the scripts + * @returns TDESelectAction containing access to all of the scripts */ - KSelectAction *getScripts(); + TDESelectAction *getScripts(); public slots: /** Run the current action. */ @@ -52,8 +52,8 @@ class ScriptLoader : virtual public QObject virtual void done(int errorCode); private: TQPtrList m_scripts; - KSelectAction *m_theAction; + TDESelectAction *m_theAction; int m_currentSelection; - KMainWindow *m_parent; + TDEMainWindow *m_parent; }; #endif diff --git a/interfaces/terminal/test/main.h b/interfaces/terminal/test/main.h index 098c10d54..256b0840a 100644 --- a/interfaces/terminal/test/main.h +++ b/interfaces/terminal/test/main.h @@ -3,7 +3,7 @@ class Win - : public KMainWindow + : public TDEMainWindow { Q_OBJECT KParts::Part* p; diff --git a/kab/kabapi.cc b/kab/kabapi.cc index 622fc708d..245f07c5d 100644 --- a/kab/kabapi.cc +++ b/kab/kabapi.cc @@ -36,7 +36,7 @@ using namespace std; KabAPI::KabAPI(TQWidget* parent, const char* name) : KDialogBase(parent, name), book(0), - listbox(new KListBox(this)), + listbox(new TDEListBox(this)), selection(-1) { TQ_CHECK_PTR(listbox); diff --git a/kab/kabapi.h b/kab/kabapi.h index 6cf46c37e..6204efc39 100644 --- a/kab/kabapi.h +++ b/kab/kabapi.h @@ -22,7 +22,7 @@ class TQPushButton; class TQFrame; -class KListBox; +class TDEListBox; /** * The class KabAPI provides a public interface to access the @@ -189,7 +189,7 @@ protected: /** * This displays the overview over the addresses in the dialog. */ - KListBox* listbox; + TDEListBox* listbox; /** * The index of the selected entry. This value is only valid after the * KabAPI dialog has been executed and accepted by the user. diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index 623d26cf3..c8a1bf51e 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -66,7 +66,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : TQBoxLayout *listLayout = new TQVBoxLayout; topLayout->addLayout( listLayout ); - mAddresseeList = new KListView( topWidget ); + mAddresseeList = new TDEListView( topWidget ); mAddresseeList->addColumn( i18n("Name") ); mAddresseeList->addColumn( i18n("Email") ); mAddresseeList->setAllColumnsShowFocus( true ); @@ -96,7 +96,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : topWidget ); selectedLayout->addWidget( selectedGroup ); - mSelectedList = new KListView( selectedGroup ); + mSelectedList = new TDEListView( selectedGroup ); mSelectedList->addColumn( i18n("Name") ); mSelectedList->addColumn( i18n("Email") ); mSelectedList->setAllColumnsShowFocus( true ); diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h index ebb4bbfcd..83166b50b 100644 --- a/kabc/addresseedialog.h +++ b/kabc/addresseedialog.h @@ -143,10 +143,10 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase bool mMultiple; - KListView *mAddresseeList; + TDEListView *mAddresseeList; KLineEdit *mAddresseeEdit; - KListView *mSelectedList; + TDEListView *mSelectedList; AddressBook *mAddressBook; diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index efb0738aa..1affd0997 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -156,12 +156,12 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e) { bool accept = false; - if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).contains(KKey(e))) + if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e))) { doCompletion(true); accept = true; } - else if (KStdAccel::shortcut(KStdAccel::TextCompletion).contains(KKey(e))) + else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e))) { int len = text().length(); diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp index a8060c17a..15efa5ba6 100644 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp +++ b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp @@ -293,7 +293,7 @@ AttributesDialog::AttributesDialog( const TQMap &attributes, } } - KAcceleratorManager::manage( this ); + TDEAcceleratorManager::manage( this ); } AttributesDialog::~AttributesDialog() diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp index 256125cd2..e840e027e 100644 --- a/kabc/resourceselectdialog.cpp +++ b/kabc/resourceselectdialog.cpp @@ -45,7 +45,7 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); groupBox->setTitle( i18n( "Resources" ) ); - mResourceId = new KListBox( groupBox ); + mResourceId = new TDEListBox( groupBox ); mainLayout->addWidget( groupBox ); diff --git a/kabc/resourceselectdialog.h b/kabc/resourceselectdialog.h index 6441dc247..f5f2d6984 100644 --- a/kabc/resourceselectdialog.h +++ b/kabc/resourceselectdialog.h @@ -26,7 +26,7 @@ #include #include -class KListBox; +class TDEListBox; namespace KABC { @@ -48,7 +48,7 @@ class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 ); private: - KListBox *mResourceId; + TDEListBox *mResourceId; TQMap mResourceMap; }; diff --git a/kate/interfaces/document.h b/kate/interfaces/document.h index c56600357..4d596fb01 100644 --- a/kate/interfaces/document.h +++ b/kate/interfaces/document.h @@ -77,13 +77,13 @@ class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage void slotChanged(); }; -class KATEPARTINTERFACES_EXPORT ActionMenu : public KActionMenu +class KATEPARTINTERFACES_EXPORT ActionMenu : public TDEActionMenu { Q_OBJECT public: ActionMenu ( const TQString& text, TQObject* parent = 0, const char* name = 0 ) - : KActionMenu(text, parent, name) { ; }; + : TDEActionMenu(text, parent, name) { ; }; virtual ~ActionMenu () { ; }; public: diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index ed9a6169b..792c53385 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -159,7 +159,7 @@ KateAutoIndent::~KateAutoIndent () //BEGIN KateViewIndentAction KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent, const char* name) - : KActionMenu (text, parent, name), doc(_doc) + : TDEActionMenu (text, parent, name), doc(_doc) { connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow())); } diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h index 6c0d15d45..abdab7777 100644 --- a/kate/part/kateautoindent.h +++ b/kate/part/kateautoindent.h @@ -190,9 +190,9 @@ class KateAutoIndent : public TQObject /** * This action provides a list of available indenters and gets plugged - * into the KateView's KActionCollection. + * into the KateView's TDEActionCollection. */ -class KateViewIndentationAction : public KActionMenu +class KateViewIndentationAction : public TDEActionMenu { Q_OBJECT diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index ac1ee73d9..d3fb52a72 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -71,34 +71,34 @@ KateBookmarks::~KateBookmarks() { } -void KateBookmarks::createActions( KActionCollection* ac ) +void KateBookmarks::createActions( TDEActionCollection* ac ) { - m_bookmarkToggle = new KToggleAction( + m_bookmarkToggle = new TDEToggleAction( i18n("Set &Bookmark"), "bookmark", CTRL+Key_B, this, TQT_SLOT(toggleBookmark()), ac, "bookmarks_toggle" ); m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it.")); m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") ); - m_bookmarkClear = new KAction( + m_bookmarkClear = new TDEAction( i18n("Clear &All Bookmarks"), 0, this, TQT_SLOT(clearBookmarks()), ac, "bookmarks_clear"); m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document.")); - m_goNext = new KAction( + m_goNext = new TDEAction( i18n("Next Bookmark"), "next", ALT + Key_PageDown, this, TQT_SLOT(goNext()), ac, "bookmarks_next"); m_goNext->setWhatsThis(i18n("Go to the next bookmark.")); - m_goPrevious = new KAction( + m_goPrevious = new TDEAction( i18n("Previous Bookmark"), "previous", ALT + Key_PageUp, this, TQT_SLOT(goPrevious()), ac, "bookmarks_previous"); m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark.")); - m_bookmarksMenu = (new KActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu(); + m_bookmarksMenu = (new TDEActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu(); //connect the aboutToShow() and aboutToHide() signals with //the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots diff --git a/kate/part/katebookmarks.h b/kate/part/katebookmarks.h index 63928800e..ae4151812 100644 --- a/kate/part/katebookmarks.h +++ b/kate/part/katebookmarks.h @@ -29,9 +29,9 @@ namespace KTextEditor { class Mark; } namespace Kate { class View; } -class KAction; -class KToggleAction; -class KActionCollection; +class TDEAction; +class TDEToggleAction; +class TDEActionCollection; class TQPopupMenu; class TQMenuData; @@ -44,7 +44,7 @@ class KateBookmarks : public TQObject KateBookmarks( KateView* parent, Sorting sort=Position ); virtual ~KateBookmarks(); - void createActions( KActionCollection* ); + void createActions( TDEActionCollection* ); KateBookmarks::Sorting sorting() { return m_sorting; }; void setSorting( Sorting s ) { m_sorting = s; }; @@ -69,10 +69,10 @@ class KateBookmarks : public TQObject private: KateView* m_view; - KToggleAction* m_bookmarkToggle; - KAction* m_bookmarkClear; - KAction* m_goNext; - KAction* m_goPrevious; + TDEToggleAction* m_bookmarkToggle; + TDEAction* m_bookmarkClear; + TDEAction* m_goNext; + TDEAction* m_goPrevious; Sorting m_sorting; TQPopupMenu* m_bookmarksMenu; diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 5006ddd6c..099dad99d 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -1095,7 +1095,7 @@ void KatePartPluginListItem::stateChange(bool b) //BEGIN PluginListView KatePartPluginListView::KatePartPluginListView(TQWidget *parent, const char *name) - : KListView(parent, name) + : TDEListView(parent, name) { } diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h index fc9fa0a1a..c97f45d9a 100644 --- a/kate/part/katedialogs.h +++ b/kate/part/katedialogs.h @@ -52,13 +52,13 @@ namespace TDEIO class TransferJob; } -class KAccel; +class TDEAccel; class KColorButton; class KComboBox; class KIntNumInput; class KKeyButton; class KKeyChooser; -class KMainWindow; +class TDEMainWindow; class KPushButton; class KRegExpDialog; class KIntNumInput; @@ -235,7 +235,7 @@ class KateEditKeyConfiguration: public KateConfigPage bool m_ready; class KateDocument *m_doc; KKeyChooser* m_keyChooser; - class KActionCollection *m_ac; + class TDEActionCollection *m_ac; }; class KateSaveConfigTab : public KateConfigPage @@ -263,7 +263,7 @@ class KateSaveConfigTab : public KateConfigPage class KatePartPluginListItem; -class KatePartPluginListView : public KListView +class KatePartPluginListView : public TDEListView { Q_OBJECT diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 7f4481722..1b264a602 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -888,7 +888,7 @@ void KatePrintHeaderFooter::setHFFont() { TQFont fnt( lFontPreview->font() ); // display a font dialog - if ( KFontDialog::getFont( fnt, false, this ) == KFontDialog::Accepted ) + if ( TDEFontDialog::getFont( fnt, false, this ) == TDEFontDialog::Accepted ) { // change strFont strFont = fnt.toString(); diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 0cb802e97..9a7e4e1ab 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -541,8 +541,8 @@ KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char * // sizemanagment TQGridLayout *grid = new TQGridLayout( this, 1, 1 ); - m_fontchooser = new KFontChooser ( this, 0L, false, TQStringList(), false ); - m_fontchooser->enableColumn(KFontChooser::StyleList, false); + m_fontchooser = new TDEFontChooser ( this, 0L, false, TQStringList(), false ); + m_fontchooser->enableColumn(TDEFontChooser::StyleList, false); grid->addWidget( m_fontchooser, 0, 0); connect (this, TQT_SIGNAL( changed()), parent->parentWidget(), TQT_SLOT (slotChanged())); @@ -1078,7 +1078,7 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &glob { if ( !dynamic_cast(i) ) return; - KPopupMenu m( this ); + TDEPopupMenu m( this ); KateAttribute *is = i->style(); int id; // the title is used, because the menu obscures the context name when diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h index 2e92812de..6675a6bc8 100644 --- a/kate/part/kateschema.h +++ b/kate/part/kateschema.h @@ -90,13 +90,13 @@ class KateSchemaManager }; -class KateViewSchemaAction : public KActionMenu +class KateViewSchemaAction : public TDEActionMenu { Q_OBJECT public: KateViewSchemaAction(const TQString& text, TQObject* parent = 0, const char* name = 0) - : KActionMenu(text, parent, name) { init(); }; + : TDEActionMenu(text, parent, name) { init(); }; ~KateViewSchemaAction(){;}; @@ -226,7 +226,7 @@ class KateSchemaConfigFontTab : public TQWidget void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged) private: - class KFontChooser *m_fontchooser; + class TDEFontChooser *m_fontchooser; FontMap m_fonts; int m_schema; diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index a7d37ead5..9d0dc896b 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -66,7 +66,7 @@ KateSearch::~KateSearch() delete m_arbitraryHLList; } -void KateSearch::createActions( KActionCollection* ac ) +void KateSearch::createActions( TDEActionCollection* ac ) { KStdAction::find( this, TQT_SLOT(find()), ac )->setWhatsThis( i18n("Look up the first occurrence of a piece of text or regular expression.")); diff --git a/kate/part/katesearch.h b/kate/part/katesearch.h index bec9eb51a..5ae92f568 100644 --- a/kate/part/katesearch.h +++ b/kate/part/katesearch.h @@ -37,7 +37,7 @@ class KateView; class KateDocument; class KateSuperRangeList; -class KActionCollection; +class TDEActionCollection; class KateSearch : public TQObject { @@ -87,7 +87,7 @@ class KateSearch : public TQObject KateSearch( KateView* ); ~KateSearch(); - void createActions( KActionCollection* ); + void createActions( TDEActionCollection* ); public slots: void find(); diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index 77e693fa6..53767d672 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -51,13 +51,13 @@ KateSpell::~KateSpell() } } -void KateSpell::createActions( KActionCollection* ac ) +void KateSpell::createActions( TDEActionCollection* ac ) { KStdAction::spelling( this, TQT_SLOT(spellcheck()), ac ); - KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" ); + TDEAction *a = new TDEAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" ); a->setWhatsThis(i18n("Check the document's spelling from the cursor and forward")); - m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" ); + m_spellcheckSelection = new TDEAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" ); m_spellcheckSelection->setWhatsThis(i18n("Check spelling of the selected text")); } diff --git a/kate/part/katespell.h b/kate/part/katespell.h index f5a776c8d..9ce41666c 100644 --- a/kate/part/katespell.h +++ b/kate/part/katespell.h @@ -27,7 +27,7 @@ class KateView; -class KAction; +class TDEAction; class KSpell; class KateSpell : public TQObject @@ -38,7 +38,7 @@ class KateSpell : public TQObject KateSpell( KateView* ); ~KateSpell(); - void createActions( KActionCollection* ); + void createActions( TDEActionCollection* ); void updateActions (); @@ -69,7 +69,7 @@ class KateSpell : public TQObject private: KateView *m_view; - KAction *m_spellcheckSelection; + TDEAction *m_spellcheckSelection; KSpell *m_tdespell; diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index 22a4799d6..03b1fa5d3 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -207,8 +207,8 @@ void KateView::setupConnections() void KateView::setupActions() { - KActionCollection *ac = this->actionCollection (); - KAction *a; + TDEActionCollection *ac = this->actionCollection (); + TDEAction *a; m_toggleWriteLock = 0; @@ -221,7 +221,7 @@ void KateView::setupActions() m_copy = a=KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), ac); a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard.")); - m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html"); + m_copyHTML = a = new TDEAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html"); a->setWhatsThis(i18n( "Use this command to copy the currently selected text as HTML to the system clipboard.")); if (!m_doc->readOnly()) @@ -235,56 +235,56 @@ void KateView::setupActions() a=m_editRedo = KStdAction::redo(m_doc, TQT_SLOT(redo()), ac); a->setWhatsThis(i18n("Revert the most recent undo operation")); - (new KAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis( + (new TDEAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis( i18n("Use this command to wrap all lines of the current document which are longer than the width of the" " current view, to fit into this view.

      This is a static word wrap, meaning it is not updated" " when the view is resized.")); // setup Tools menu - a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent"); + a=new TDEAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent"); a->setWhatsThis(i18n("Use this to indent a selected block of text.

      " "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog.")); - a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent"); + a=new TDEAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent"); a->setWhatsThis(i18n("Use this to unindent a selected block of text.")); - a=new KAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent"); + a=new TDEAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent"); a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)

      " "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog.")); - a=new KAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align"); + a=new TDEAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align"); a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level.")); - a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()), + a=new TDEAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()), ac, "tools_comment"); a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.

      " "The characters for single/multiple line comments are defined within the language's highlighting.")); - a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()), + a=new TDEAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()), ac, "tools_uncomment"); a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.

      " "The characters for single/multiple line comments are defined within the language's highlighting.")); - a = m_toggleWriteLock = new KToggleAction( + a = m_toggleWriteLock = new TDEToggleAction( i18n("&Read Only Mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( toggleWriteLock() ), ac, "tools_toggle_write_lock" ); a->setWhatsThis( i18n("Lock/unlock the document for writing") ); - a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(uppercase()), ac, "tools_uppercase" ); a->setWhatsThis( i18n("Convert the selection to uppercase, or the character to the " "right of the cursor if no text is selected.") ); - a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(lowercase()), ac, "tools_lowercase" ); a->setWhatsThis( i18n("Convert the selection to lowercase, or the character to the " "right of the cursor if no text is selected.") ); - a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(capitalize()), ac, "tools_capitalize" ); a->setWhatsThis( i18n("Capitalize the selection, or the word under the " "cursor if no text is selected.") ); - a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this), TQT_SLOT( joinLines() ), ac, "tools_join_lines" ); } else @@ -298,7 +298,7 @@ void KateView::setupActions() a=KStdAction::print( m_doc, TQT_SLOT(print()), ac ); a->setWhatsThis(i18n("Print the current document.")); - a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload"); + a=new TDEAction(i18n("Reloa&d"), "reload", TDEStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload"); a->setWhatsThis(i18n("Reload the current document from disk.")); a=KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), ac); @@ -307,7 +307,7 @@ void KateView::setupActions() a=KStdAction::gotoLine(TQT_TQOBJECT(this), TQT_SLOT(gotoLine()), ac); a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to.")); - a=new KAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg"); + a=new TDEAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg"); a->setWhatsThis(i18n("Configure various aspects of this editor.")); KateViewHighlightAction *menu = new KateViewHighlightAction (i18n("&Highlighting"), ac, "set_highlight"); @@ -324,7 +324,7 @@ void KateView::setupActions() new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation"); // html export - a = new KAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html"); + a = new TDEAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html"); a->setWhatsThis(i18n("This command allows you to export the current document" " with all highlighting information into a HTML document.")); @@ -334,32 +334,32 @@ void KateView::setupActions() m_deSelect = a=KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(clearSelection()), ac); a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected.")); - a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes"); + a=new TDEAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes"); a->setWhatsThis(i18n("This increases the display font size.")); - a=new KAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes"); + a=new TDEAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes"); a->setWhatsThis(i18n("This decreases the display font size.")); - a= m_toggleBlockSelection = new KToggleAction( + a= m_toggleBlockSelection = new TDEToggleAction( i18n("Bl&ock Selection Mode"), CTRL + SHIFT + Key_B, TQT_TQOBJECT(this), TQT_SLOT(toggleBlockSelectionMode()), ac, "set_verticalSelect"); a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode.")); - a= m_toggleInsert = new KToggleAction( + a= m_toggleInsert = new TDEToggleAction( i18n("Overwr&ite Mode"), Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(toggleInsert()), ac, "set_insert" ); a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text.")); - KToggleAction *toggleAction; - a= m_toggleDynWrap = toggleAction = new KToggleAction( + TDEToggleAction *toggleAction; + a= m_toggleDynWrap = toggleAction = new TDEToggleAction( i18n("&Dynamic Word Wrap"), Key_F10, TQT_TQOBJECT(this), TQT_SLOT(toggleDynWordWrap()), ac, "view_dynamic_word_wrap" ); a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen.")); - a= m_setDynWrapIndicators = new KSelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators"); + a= m_setDynWrapIndicators = new TDESelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators"); a->setWhatsThis(i18n("Choose when the Dynamic Word Wrap Indicators should be displayed")); connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setDynWrapIndicators(int))); @@ -369,14 +369,14 @@ void KateView::setupActions() list2.append(i18n("&Always On")); m_setDynWrapIndicators->setItems(list2); - a= toggleAction=m_toggleFoldingMarkers = new KToggleAction( + a= toggleAction=m_toggleFoldingMarkers = new TDEToggleAction( i18n("Show Folding &Markers"), Key_F9, TQT_TQOBJECT(this), TQT_SLOT(toggleFoldingMarkers()), ac, "view_folding_markers" ); a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible.")); toggleAction->setCheckedState(i18n("Hide Folding &Markers")); - a= m_toggleIconBar = toggleAction = new KToggleAction( + a= m_toggleIconBar = toggleAction = new TDEToggleAction( i18n("Show &Icon Border"), Key_F6, TQT_TQOBJECT(this), TQT_SLOT(toggleIconBorder()), ac, "view_border"); @@ -384,21 +384,21 @@ void KateView::setupActions() a->setWhatsThis(i18n("Show/hide the icon border.

      The icon border shows bookmark symbols, for instance.")); toggleAction->setCheckedState(i18n("Hide &Icon Border")); - a= toggleAction=m_toggleLineNumbers = new KToggleAction( + a= toggleAction=m_toggleLineNumbers = new TDEToggleAction( i18n("Show &Line Numbers"), Key_F11, TQT_TQOBJECT(this), TQT_SLOT(toggleLineNumbersOn()), ac, "view_line_numbers" ); a->setWhatsThis(i18n("Show/hide the line numbers on the left hand side of the view.")); toggleAction->setCheckedState(i18n("Hide &Line Numbers")); - a= m_toggleScrollBarMarks = toggleAction = new KToggleAction( + a= m_toggleScrollBarMarks = toggleAction = new TDEToggleAction( i18n("Show Scroll&bar Marks"), 0, TQT_TQOBJECT(this), TQT_SLOT(toggleScrollBarMarks()), ac, "view_scrollbar_marks"); a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.

      The marks, for instance, show bookmarks.")); toggleAction->setCheckedState(i18n("Hide Scroll&bar Marks")); - a = toggleAction = m_toggleWWMarker = new KToggleAction( + a = toggleAction = m_toggleWWMarker = new TDEToggleAction( i18n("Show Static &Word Wrap Marker"), 0, TQT_TQOBJECT(this), TQT_SLOT( toggleWWMarker() ), ac, "view_word_wrap_marker" ); @@ -407,13 +407,13 @@ void KateView::setupActions() "wrap column as defined in the editing properties" )); toggleAction->setCheckedState(i18n("Hide Static &Word Wrap Marker")); - a= m_switchCmdLine = new KAction( + a= m_switchCmdLine = new TDEAction( i18n("Switch to Command Line"), Key_F7, TQT_TQOBJECT(this), TQT_SLOT(switchToCmdLine()), ac, "switch_to_cmd_line" ); a->setWhatsThis(i18n("Show/hide the command line on the bottom of the view.")); - a=m_setEndOfLine = new KSelectAction(i18n("&End of Line"), 0, ac, "set_eol"); + a=m_setEndOfLine = new TDESelectAction(i18n("&End of Line"), 0, ac, "set_eol"); a->setWhatsThis(i18n("Choose which line endings should be used, when you save the document")); TQStringList list; list.append("&UNIX"); @@ -437,137 +437,137 @@ void KateView::setupActions() void KateView::setupEditActions() { - m_editActions = new KActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" ); - KActionCollection* ac = m_editActions; + m_editActions = new TDEActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" ); + TDEActionCollection* ac = m_editActions; - new KAction( + new TDEAction( i18n("Move Word Left"), CTRL + Key_Left, TQT_TQOBJECT(this),TQT_SLOT(wordLeft()), ac, "word_left" ); - new KAction( + new TDEAction( i18n("Select Character Left"), SHIFT + Key_Left, TQT_TQOBJECT(this),TQT_SLOT(shiftCursorLeft()), ac, "select_char_left" ); - new KAction( + new TDEAction( i18n("Select Word Left"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(shiftWordLeft()), ac, "select_word_left" ); - new KAction( + new TDEAction( i18n("Move Word Right"), CTRL + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(wordRight()), ac, "word_right" ); - new KAction( + new TDEAction( i18n("Select Character Right"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(shiftCursorRight()), ac, "select_char_right" ); - new KAction( + new TDEAction( i18n("Select Word Right"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this),TQT_SLOT(shiftWordRight()), ac, "select_word_right" ); - new KAction( + new TDEAction( i18n("Move to Beginning of Line"), Key_Home, TQT_TQOBJECT(this), TQT_SLOT(home()), ac, "beginning_of_line" ); - new KAction( - i18n("Move to Beginning of Document"), KStdAccel::home(), + new TDEAction( + i18n("Move to Beginning of Document"), TDEStdAccel::home(), TQT_TQOBJECT(this), TQT_SLOT(top()), ac, "beginning_of_document" ); - new KAction( + new TDEAction( i18n("Select to Beginning of Line"), SHIFT + Key_Home, TQT_TQOBJECT(this), TQT_SLOT(shiftHome()), ac, "select_beginning_of_line" ); - new KAction( + new TDEAction( i18n("Select to Beginning of Document"), SHIFT + CTRL + Key_Home, TQT_TQOBJECT(this), TQT_SLOT(shiftTop()), ac, "select_beginning_of_document" ); - new KAction( + new TDEAction( i18n("Move to End of Line"), Key_End, TQT_TQOBJECT(this), TQT_SLOT(end()), ac, "end_of_line" ); - new KAction( - i18n("Move to End of Document"), KStdAccel::end(), + new TDEAction( + i18n("Move to End of Document"), TDEStdAccel::end(), TQT_TQOBJECT(this), TQT_SLOT(bottom()), ac, "end_of_document" ); - new KAction( + new TDEAction( i18n("Select to End of Line"), SHIFT + Key_End, TQT_TQOBJECT(this), TQT_SLOT(shiftEnd()), ac, "select_end_of_line" ); - new KAction( + new TDEAction( i18n("Select to End of Document"), SHIFT + CTRL + Key_End, TQT_TQOBJECT(this), TQT_SLOT(shiftBottom()), ac, "select_end_of_document" ); - new KAction( + new TDEAction( i18n("Select to Previous Line"), SHIFT + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(shiftUp()), ac, "select_line_up" ); - new KAction( + new TDEAction( i18n("Scroll Line Up"),"", CTRL + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(scrollUp()), ac, "scroll_line_up" ); - new KAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()), + new TDEAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()), ac, "move_line_down"); - new KAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()), + new TDEAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()), ac, "move_line_up"); - new KAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this), + new TDEAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this), TQT_SLOT(cursorRight()), ac, "move_cursor_right"); - new KAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()), + new TDEAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()), ac, "move_cusor_left"); - new KAction( + new TDEAction( i18n("Select to Next Line"), SHIFT + Key_Down, TQT_TQOBJECT(this), TQT_SLOT(shiftDown()), ac, "select_line_down" ); - new KAction( + new TDEAction( i18n("Scroll Line Down"), CTRL + Key_Down, TQT_TQOBJECT(this), TQT_SLOT(scrollDown()), ac, "scroll_line_down" ); - new KAction( - i18n("Scroll Page Up"), KStdAccel::prior(), + new TDEAction( + i18n("Scroll Page Up"), TDEStdAccel::prior(), TQT_TQOBJECT(this), TQT_SLOT(pageUp()), ac, "scroll_page_up" ); - new KAction( + new TDEAction( i18n("Select Page Up"), SHIFT + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(shiftPageUp()), ac, "select_page_up" ); - new KAction( + new TDEAction( i18n("Move to Top of View"), CTRL + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(topOfView()), ac, "move_top_of_view" ); - new KAction( + new TDEAction( i18n("Select to Top of View"), CTRL + SHIFT + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(shiftTopOfView()), ac, "select_top_of_view" ); - new KAction( - i18n("Scroll Page Down"), KStdAccel::next(), + new TDEAction( + i18n("Scroll Page Down"), TDEStdAccel::next(), TQT_TQOBJECT(this), TQT_SLOT(pageDown()), ac, "scroll_page_down" ); - new KAction( + new TDEAction( i18n("Select Page Down"), SHIFT + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(shiftPageDown()), ac, "select_page_down" ); - new KAction( + new TDEAction( i18n("Move to Bottom of View"), CTRL + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(bottomOfView()), ac, "move_bottom_of_view" ); - new KAction( + new TDEAction( i18n("Select to Bottom of View"), CTRL + SHIFT + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(shiftBottomOfView()), ac, "select_bottom_of_view" ); - new KAction( + new TDEAction( i18n("Move to Matching Bracket"), CTRL + Key_6, TQT_TQOBJECT(this), TQT_SLOT(toMatchingBracket()), ac, "to_matching_bracket" ); - new KAction( + new TDEAction( i18n("Select to Matching Bracket"), SHIFT + CTRL + Key_6, TQT_TQOBJECT(this), TQT_SLOT(shiftToMatchingBracket()), ac, "select_matching_bracket" ); @@ -575,34 +575,34 @@ void KateView::setupEditActions() // anders: shortcuts doing any changes should not be created in browserextension if ( !m_doc->readOnly() ) { - new KAction( + new TDEAction( i18n("Transpose Characters"), CTRL + Key_T, TQT_TQOBJECT(this), TQT_SLOT(transpose()), ac, "transpose_char" ); - new KAction( + new TDEAction( i18n("Delete Line"), CTRL + Key_K, TQT_TQOBJECT(this), TQT_SLOT(killLine()), ac, "delete_line" ); - new KAction( - i18n("Delete Word Left"), KStdAccel::deleteWordBack(), + new TDEAction( + i18n("Delete Word Left"), TDEStdAccel::deleteWordBack(), TQT_TQOBJECT(this), TQT_SLOT(deleteWordLeft()), ac, "delete_word_left" ); - new KAction( - i18n("Delete Word Right"), KStdAccel::deleteWordForward(), + new TDEAction( + i18n("Delete Word Right"), TDEStdAccel::deleteWordForward(), TQT_TQOBJECT(this), TQT_SLOT(deleteWordRight()), ac, "delete_word_right" ); - new KAction(i18n("Delete Next Character"), Key_Delete, + new TDEAction(i18n("Delete Next Character"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(keyDelete()), ac, "delete_next_character"); - KAction *a = new KAction(i18n("Backspace"), Key_Backspace, + TDEAction *a = new TDEAction(i18n("Backspace"), Key_Backspace, TQT_TQOBJECT(this), TQT_SLOT(backspace()), ac, "backspace"); - KShortcut cut = a->shortcut(); + TDEShortcut cut = a->shortcut(); cut.append( KKey( SHIFT + Key_Backspace ) ); a->setShortcut( cut ); } @@ -624,18 +624,18 @@ void KateView::setupEditActions() void KateView::setupCodeFolding() { - KActionCollection *ac=this->actionCollection(); - new KAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus, + TDEActionCollection *ac=this->actionCollection(); + new TDEAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus, m_doc->foldingTree(),TQT_SLOT(collapseToplevelNodes()),ac,"folding_toplevel"); - new KAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus, + new TDEAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus, TQT_TQOBJECT(this),TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel"); - new KAction( i18n("Collapse One Local Level"), CTRL+Key_Minus, + new TDEAction( i18n("Collapse One Local Level"), CTRL+Key_Minus, TQT_TQOBJECT(this),TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal"); - new KAction( i18n("Expand One Local Level"), CTRL+Key_Plus, + new TDEAction( i18n("Expand One Local Level"), CTRL+Key_Plus, TQT_TQOBJECT(this),TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal"); #ifdef DEBUGACCELS - KAccel* debugAccels = new KAccel(this,TQT_TQOBJECT(this)); + TDEAccel* debugAccels = new TDEAccel(this,TQT_TQOBJECT(this)); debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,TQT_SLOT(dumpRegionTree())); debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,TQT_SLOT(testTemplateCode())); debugAccels->setEnabled(true); @@ -760,7 +760,7 @@ void KateView::slotReadWriteChanged () << "edit_undo" << "edit_redo" << "tools_spelling_from_cursor" << "tools_spelling_selection"; - KAction *a = 0; + TDEAction *a = 0; for (uint z = 0; z < l.size(); z++) if ((a = actionCollection()->action( l[z].ascii() ))) a->setEnabled (m_doc->isReadWrite()); @@ -1256,7 +1256,7 @@ void KateView::updateFoldingConfig () l << "folding_toplevel" << "folding_expandtoplevel" << "folding_collapselocal" << "folding_expandlocal"; - KAction *a = 0; + TDEAction *a = 0; for (uint z = 0; z < l.size(); z++) if ((a = actionCollection()->action( l[z].ascii() ))) a->setEnabled (m_doc->highlight() && m_doc->highlight()->allowsFolding()); diff --git a/kate/part/kateview.h b/kate/part/kateview.h index 1d6a1016f..0a00ab1fc 100644 --- a/kate/part/kateview.h +++ b/kate/part/kateview.h @@ -44,10 +44,10 @@ class KateViewSchemaAction; class KateRenderer; class KateSpell; -class KToggleAction; -class KAction; -class KRecentFilesAction; -class KSelectAction; +class TDEToggleAction; +class TDEAction; +class TDERecentFilesAction; +class TDESelectAction; class TQGridLayout; @@ -429,7 +429,7 @@ class KateView : public Kate::View, // Is it really necessary to have 3 methods for this?! :) KateDocument* doc() const { return m_doc; } - KActionCollection* editActionCollection() const { return m_editActions; } + TDEActionCollection* editActionCollection() const { return m_editActions; } public slots: void slotNewUndo(); @@ -472,31 +472,31 @@ class KateView : public Kate::View, void setupCodeFolding(); void setupCodeCompletion(); - KActionCollection* m_editActions; - KAction* m_editUndo; - KAction* m_editRedo; - KRecentFilesAction* m_fileRecent; - KToggleAction* m_toggleFoldingMarkers; - KToggleAction* m_toggleIconBar; - KToggleAction* m_toggleLineNumbers; - KToggleAction* m_toggleScrollBarMarks; - KToggleAction* m_toggleDynWrap; - KSelectAction* m_setDynWrapIndicators; - KToggleAction* m_toggleWWMarker; - KAction* m_switchCmdLine; - - KSelectAction* m_setEndOfLine; - - KAction *m_cut; - KAction *m_copy; - KAction *m_copyHTML; - KAction *m_paste; - KAction *m_selectAll; - KAction *m_deSelect; - - KToggleAction *m_toggleBlockSelection; - KToggleAction *m_toggleInsert; - KToggleAction *m_toggleWriteLock; + TDEActionCollection* m_editActions; + TDEAction* m_editUndo; + TDEAction* m_editRedo; + TDERecentFilesAction* m_fileRecent; + TDEToggleAction* m_toggleFoldingMarkers; + TDEToggleAction* m_toggleIconBar; + TDEToggleAction* m_toggleLineNumbers; + TDEToggleAction* m_toggleScrollBarMarks; + TDEToggleAction* m_toggleDynWrap; + TDESelectAction* m_setDynWrapIndicators; + TDEToggleAction* m_toggleWWMarker; + TDEAction* m_switchCmdLine; + + TDESelectAction* m_setEndOfLine; + + TDEAction *m_cut; + TDEAction *m_copy; + TDEAction *m_copyHTML; + TDEAction *m_paste; + TDEAction *m_selectAll; + TDEAction *m_deSelect; + + TDEToggleAction *m_toggleBlockSelection; + TDEToggleAction *m_toggleInsert; + TDEToggleAction *m_toggleWriteLock; KateDocument* m_doc; KateViewInternal* m_viewInternal; diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index eca6716c4..fc0072982 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -1168,7 +1168,7 @@ void KateIconBorder::showMarkMenu( uint line, const TQPoint& pos ) //END KateIconBorder KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent, const char* name) - : KActionMenu (text, parent, name), doc(_doc), view (_view) + : TDEActionMenu (text, parent, name), doc(_doc), view (_view) { connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow())); } diff --git a/kate/part/kateviewhelpers.h b/kate/part/kateviewhelpers.h index 1205ea99a..0faa90309 100644 --- a/kate/part/kateviewhelpers.h +++ b/kate/part/kateviewhelpers.h @@ -182,7 +182,7 @@ class KateIconBorder : public TQWidget mutable TQColor m_oldBackgroundColor; }; -class KateViewEncodingAction : public KActionMenu +class KateViewEncodingAction : public TDEActionMenu { Q_OBJECT diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index 1463c8bcd..1a7b73bf3 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -511,7 +511,7 @@ int main(int argc, char *argv[]) // create widgets KateFactory *fac = KateFactory::self(); - KMainWindow *toplevel = new KMainWindow(); + TDEMainWindow *toplevel = new TDEMainWindow(); KateDocument *part = new KateDocument(/*bSingleViewMode*/true, /*bBrowserView*/false, /*bReadOnly*/false, diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index cf3190c4e..449675f6c 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -253,7 +253,7 @@ void ABGlobal::writeConfig() class AutoBookmarkEntItem : public QListViewItem { public: - AutoBookmarkEntItem( KListView *lv, AutoBookmarkEnt *e ) + AutoBookmarkEntItem( TDEListView *lv, AutoBookmarkEnt *e ) : TQListViewItem( lv ), ent( e ) { @@ -383,7 +383,7 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( TQWidget *parent, const char TQLabel *l = new TQLabel( i18n("&Patterns"), this ); lo->addWidget( l ); - lvPatterns = new KListView( this ); + lvPatterns = new TDEListView( this ); lvPatterns->addColumn( i18n("Pattern") ); lvPatterns->addColumn( i18n("Mime Types") ); lvPatterns->addColumn( i18n("File Masks") ); diff --git a/kate/plugins/autobookmarker/autobookmarker.h b/kate/plugins/autobookmarker/autobookmarker.h index 4a7b998de..9687d8ceb 100644 --- a/kate/plugins/autobookmarker/autobookmarker.h +++ b/kate/plugins/autobookmarker/autobookmarker.h @@ -111,7 +111,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage void slotEdit(); private: - class KListView *lvPatterns; + class TDEListView *lvPatterns; class TQPushButton *btnNew, *btnDel, *btnEdit; ABEntityList *m_ents; }; diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index aa9f998b6..2f0d01ed4 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -76,7 +76,7 @@ InsertFilePluginView::InsertFilePluginView( KTextEditor::View *view, const char view->insertChildClient( this ); setInstance( KGenericFactory::instance() ); _job = 0; - (void) new KAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" ); + (void) new TDEAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" ); setXMLFile( "tdetexteditor_insertfileui.rc" ); } diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index de1c1c376..758449fbe 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -64,11 +64,11 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) setInstance( KGenericFactory::instance() ); - m_searchForwardAction = new KAction( + m_searchForwardAction = new TDEAction( i18n("Search Incrementally"), CTRL+ALT+Key_F, this, TQT_SLOT(slotSearchForwardAction()), actionCollection(), "edit_isearch" ); - m_searchBackwardAction = new KAction( + m_searchBackwardAction = new TDEAction( i18n("Search Incrementally Backwards"), CTRL+ALT+SHIFT+Key_F, this, TQT_SLOT(slotSearchBackwardAction()), actionCollection(), "edit_isearch_reverse" ); @@ -97,13 +97,13 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) m_comboAction->setAutoSized( true ); m_comboAction->setShortcutConfigurable( false ); - KActionMenu* optionMenu = new KActionMenu( + TDEActionMenu* optionMenu = new TDEActionMenu( i18n("Search Options"), "configure", actionCollection(), "isearch_options" ); optionMenu->setDelayed( false ); - KToggleAction* action = new KToggleAction( - i18n("Case Sensitive"), KShortcut(), + TDEToggleAction* action = new TDEToggleAction( + i18n("Case Sensitive"), TDEShortcut(), actionCollection(), "isearch_case_sensitive" ); action->setShortcutConfigurable( false ); connect( action, TQT_SIGNAL(toggled(bool)), @@ -111,8 +111,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) action->setChecked( m_caseSensitive ); optionMenu->insert( action ); - action = new KToggleAction( - i18n("From Beginning"), KShortcut(), + action = new TDEToggleAction( + i18n("From Beginning"), TDEShortcut(), actionCollection(), "isearch_from_beginning" ); action->setShortcutConfigurable( false ); connect( action, TQT_SIGNAL(toggled(bool)), @@ -120,8 +120,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) action->setChecked( m_fromBeginning ); optionMenu->insert( action ); - action = new KToggleAction( - i18n("Regular Expression"), KShortcut(), + action = new TDEToggleAction( + i18n("Regular Expression"), TDEShortcut(), actionCollection(), "isearch_reg_exp" ); action->setShortcutConfigurable( false ); connect( action, TQT_SIGNAL(toggled(bool)), @@ -129,10 +129,10 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) action->setChecked( m_regExp ); optionMenu->insert( action ); -// optionMenu->insert( new KActionSeparator() ); +// optionMenu->insert( new TDEActionSeparator() ); // -// action = new KToggleAction( -// i18n("Auto-Wrap Search"), KShortcut(), +// action = new TDEToggleAction( +// i18n("Auto-Wrap Search"), TDEShortcut(), // actionCollection(), "isearch_auto_wrap" ); // connect( action, TQT_SIGNAL(toggled(bool)), // this, TQT_SLOT(setAutoWrap(bool)) ); diff --git a/kate/plugins/isearch/ISearchPlugin.h b/kate/plugins/isearch/ISearchPlugin.h index 980630795..b11b2a8b6 100644 --- a/kate/plugins/isearch/ISearchPlugin.h +++ b/kate/plugins/isearch/ISearchPlugin.h @@ -92,8 +92,8 @@ private: KTextEditor::SearchInterface* m_searchIF; KTextEditor::ViewCursorInterface* m_cursorIF; KTextEditor::SelectionInterface* m_selectIF; - KAction* m_searchForwardAction; - KAction* m_searchBackwardAction; + TDEAction* m_searchForwardAction; + TDEAction* m_searchBackwardAction; KWidgetAction* m_comboAction; TQGuardedPtr m_label; TQGuardedPtr m_combo; diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index 832ff5eb7..829a0f31f 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -75,7 +75,7 @@ KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view ) view->insertChildClient (this); setInstance( KGenericFactory::instance() ); - m_menu = new KActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool"); + m_menu = new TDEActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool"); connect(m_menu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShow())); setXMLFile("tdetexteditor_kdatatoolui.rc"); @@ -96,7 +96,7 @@ void KDataToolPluginView::aboutToShow() m_wordUnderCursor = TQString::null; // unplug old actions, if any: - KAction *ac; + TDEAction *ac; for ( ac = m_actionList.first(); ac; ac = m_actionList.next() ) { m_menu->remove(ac); } @@ -150,7 +150,7 @@ void KDataToolPluginView::aboutToShow() m_singleWord = true; m_singleWord_line = line; } else { - m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this, + m_notAvailable = new TDEAction(i18n("(not available)"), TQString::null, 0, this, TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); m_menu->insert(m_notAvailable); return; @@ -172,7 +172,7 @@ void KDataToolPluginView::aboutToShow() } if( m_actionList.isEmpty() ) { - m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this, + m_notAvailable = new TDEAction(i18n("(not available)"), TQString::null, 0, this, TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); m_menu->insert(m_notAvailable); } diff --git a/kate/plugins/kdatatool/kate_kdatatool.h b/kate/plugins/kdatatool/kate_kdatatool.h index ac437dd16..a217c6f27 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.h +++ b/kate/plugins/kdatatool/kate_kdatatool.h @@ -26,7 +26,7 @@ #include #include -class KActionMenu; +class TDEActionMenu; class KDataToolInfo; namespace KTextEditor @@ -62,9 +62,9 @@ private: bool m_singleWord; int m_singleWord_line, m_singleWord_start, m_singleWord_end; TQString m_wordUnderCursor; - TQPtrList m_actionList; - TQGuardedPtr m_menu; - KAction *m_notAvailable; + TQPtrList m_actionList; + TQGuardedPtr m_menu; + TDEAction *m_notAvailable; protected slots: void aboutToShow(); void slotToolActivated( const KDataToolInfo &datatoolinfo, const TQString &string ); diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index fbd5a4db7..4c38b1287 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -130,7 +130,7 @@ struct DocWordCompletionPluginViewPrivate TQString last; // last word we were trying to match TQString lastIns; // latest applied completion TQRegExp re; // hrm - KToggleAction *autopopup; // for accessing state + TDEToggleAction *autopopup; // for accessing state uint treshold; // the required length of a word before popping up the completion list automatically int directionalPos; // be able to insert "" at the correct time }; @@ -145,15 +145,15 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au view->insertChildClient( this ); setInstance( KGenericFactory::instance() ); - (void) new KAction( i18n("Reuse Word Above"), CTRL+Key_8, this, + (void) new TDEAction( i18n("Reuse Word Above"), CTRL+Key_8, this, TQT_SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" ); - (void) new KAction( i18n("Reuse Word Below"), CTRL+Key_9, this, + (void) new TDEAction( i18n("Reuse Word Below"), CTRL+Key_9, this, TQT_SLOT(completeForwards()), actionCollection(), "doccomplete_fw" ); - (void) new KAction( i18n("Pop Up Completion List"), 0, this, + (void) new TDEAction( i18n("Pop Up Completion List"), 0, this, TQT_SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" ); - (void) new KAction( i18n("Shell Completion"), 0, this, + (void) new TDEAction( i18n("Shell Completion"), 0, this, TQT_SLOT(shellComplete()), actionCollection(), "doccomplete_sh" ); - d->autopopup = new KToggleAction( i18n("Automatic Completion Popup"), 0, this, + d->autopopup = new TDEToggleAction( i18n("Automatic Completion Popup"), 0, this, TQT_SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" ); d->autopopup->setChecked( autopopup ); diff --git a/kded/kded.cpp b/kded/kded.cpp index 704dd9fbf..ed002b530 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -468,7 +468,7 @@ void Kded::runDelayedCheck() void Kded::recreate(bool initial) { m_recreateBusy = true; - // Using KLauncher here is difficult since we might not have a + // Using TDELauncher here is difficult since we might not have a // database if (!initial) diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets index 0a4bf6229..6de9e90dc 100644 --- a/kdewidgets/kde.widgets +++ b/kdewidgets/kde.widgets @@ -55,19 +55,19 @@ Group=Graphics (KDE) ToolTip=Fullfeatured edit box with buttons (KDE) Group=Views (KDE) -[KFontCombo] +[TDEFontCombo] ToolTip=Font Combo Box (KDE) WhatsThis=A TQCombo Box showing the installed system fonts (with preview) Group=Input (KDE) -[KFontChooser] +[TDEFontChooser] IncludeFile=kfontdialog.h IconSet=kfontcombo.png ToolTip=Font Chooser (KDE) WhatsThis=A font type, size and style selection widget complete with preview Group=Input (KDE) -[KFontRequester] +[TDEFontRequester] IncludeFile=kfontrequester.h ToolTip=Font Requester (KDE) WhatsThis=A compact font selection and preview widget @@ -94,12 +94,12 @@ ToolTip=LED Widget (KDE) WhatsThis=A widget showing a light emitter diode Group=Display (KDE) -[KListBox] +[TDEListBox] ToolTip=Extended List Box (KDE) WhatsThis=An improved version of the TQListBox that follows KDE settings Group=Views (KDE) -[KListView] +[TDEListView] ToolTip=Extended List View (KDE) WhatsThis=An improved version of the TQListView that allows certain KDE extensions Group=Views (KDE) @@ -108,12 +108,12 @@ Group=Views (KDE) ToolTip=Line Edit (KDE) Group=Input (KDE) -[KListViewSearchLine] +[TDEListViewSearchLine] ToolTip=ListView Search Line (KDE) Group=Input (KDE) ConstructorArgs=(parent, 0, name) -[KListViewSearchLineWidget] +[TDEListViewSearchLineWidget] ToolTip=ListView Search Line Widget (KDE) IncludeFile=klistviewsearchline.h Group=Input (KDE) @@ -243,7 +243,7 @@ ToolTip=A widget that provides a image preview of a URL Group=Display (KDE) ConstructorArgs=(parent) -[KActionSelector] +[TDEActionSelector] IncludeFile=kactionselector.h ToolTip=A widget for selecting and arranging actions/objects Group=Views (KDE) diff --git a/kdewidgets/tests/test.widgets b/kdewidgets/tests/test.widgets index ed320bc64..92874ec30 100644 --- a/kdewidgets/tests/test.widgets +++ b/kdewidgets/tests/test.widgets @@ -55,19 +55,19 @@ Group=Graphics (KDE) ToolTip=Fullfeatured edit box with buttons (KDE) Group=Views (KDE) -[KFontCombo] +[TDEFontCombo] ToolTip=Font Combo Box (KDE) WhatsThis=A QCombo Box showing the installed system fonts (with preview) Group=Input (KDE) -[KFontChooser] +[TDEFontChooser] IncludeFile=kfontdialog.h IconSet=kfontcombo.png ToolTip=Font Chooser (KDE) WhatsThis=A font type, size and style selection widget complete with preview Group=Input (KDE) -[KFontRequester] +[TDEFontRequester] IncludeFile=kfontrequester.h ToolTip=Font Requester (KDE) WhatsThis=A compact font selection and preview widget @@ -94,12 +94,12 @@ ToolTip=LED Widget (KDE) WhatsThis=A widget showing a light emitter diode Group=Display (KDE) -[KListBox] +[TDEListBox] ToolTip=Extended List Box (KDE) WhatsThis=An improved version of the QListBox that follows KDE settings Group=Views (KDE) -[KListView] +[TDEListView] ToolTip=Extended List View (KDE) WhatsThis=An improved version of the QListView that allows certain KDE extensions Group=Views (KDE) @@ -232,7 +232,7 @@ ToolTip=A widget that provides a image preview of a URL Group=Display (KDE) ConstructorArgs=(parent) -[KActionSelector] +[TDEActionSelector] IncludeFile=kactionselector.h ToolTip=A widget for selecting and arranging actions/objects Group=Views (KDE) diff --git a/kinit/README.DCOP b/kinit/README.DCOP index af5aff809..cd5ba983e 100644 --- a/kinit/README.DCOP +++ b/kinit/README.DCOP @@ -1,4 +1,4 @@ -"KLauncher" supports the following DCOP functions: +"TDELauncher" supports the following DCOP functions: /** * Starts a program. diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index 16946fb2d..c1ba0920d 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -1074,9 +1074,9 @@ static void launcher_died() return; } - // KLauncher died... restart + // TDELauncher died... restart #ifndef NDEBUG - fprintf(stderr, "[tdeinit] KLauncher died unexpectedly.\n"); + fprintf(stderr, "[tdeinit] TDELauncher died unexpectedly.\n"); #endif // Make sure it's really dead. if (d.launcher_pid) @@ -1092,7 +1092,7 @@ static void launcher_died() pid_t pid = launch( 1, "tdelauncher", 0 ); #ifndef NDEBUG - fprintf(stderr, "[tdeinit] Relaunching KLauncher, pid = %ld result = %d\n", (long) pid, d.result); + fprintf(stderr, "[tdeinit] Relaunching TDELauncher, pid = %ld result = %d\n", (long) pid, d.result); #endif } @@ -1819,7 +1819,7 @@ int main(int argc, char **argv, char **envp) else pid = launch( 1, "tdelauncher", 0 ); #ifndef NDEBUG - fprintf(stderr, "[tdeinit] Launched KLauncher, pid = %ld result = %d\n", (long) pid, d.result); + fprintf(stderr, "[tdeinit] Launched TDELauncher, pid = %ld result = %d\n", (long) pid, d.result); #endif handle_requests(pid); // Wait for tdelauncher to be ready } diff --git a/kinit/tdelauncher.cpp b/kinit/tdelauncher.cpp index 45dbd863b..7b75bfaf5 100644 --- a/kinit/tdelauncher.cpp +++ b/kinit/tdelauncher.cpp @@ -63,7 +63,7 @@ using namespace TDEIO; -template class TQPtrList; +template class TQPtrList; template class TQPtrList; IdleSlave::IdleSlave(TDESocket *socket) @@ -162,7 +162,7 @@ IdleSlave::age(time_t now) return (int) difftime(now, mBirthDate); } -KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) +TDELauncher::TDELauncher(int _tdeinitSocket, bool new_startup) // : TDEApplication( false, false ), // No Styles, No GUI : TDEApplication( false, true ), // TQClipboard tries to construct a QWidget so a GUI is technically needed, even though it is not used DCOPObject("tdelauncher"), @@ -186,7 +186,7 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) if (domainname.status() != 0) { // Sever error! - tqDebug("KLauncher: Fatal error, can't create tempfile!"); + tqDebug("TDELauncher: Fatal error, can't create tempfile!"); ::exit(1); } mPoolSocketName = domainname.name(); @@ -224,12 +224,12 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) write(tdeinitSocket, &request_header, sizeof(request_header)); } -KLauncher::~KLauncher() +TDELauncher::~TDELauncher() { close(); } -void KLauncher::close() +void TDELauncher::close() { if (!mPoolSocketName.isEmpty()) { @@ -244,15 +244,15 @@ void KLauncher::close() } void -KLauncher::destruct(int exit_code) +TDELauncher::destruct(int exit_code) { - if (kapp) ((KLauncher*)kapp)->close(); + if (kapp) ((TDELauncher*)kapp)->close(); // We don't delete kapp here, that's intentional. ::exit(exit_code); } bool -KLauncher::process(const TQCString &fun, const TQByteArray &data, +TDELauncher::process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData) { if ((fun == "exec_blind(TQCString,TQValueList)") @@ -267,7 +267,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, stream >> name >> arg_list; if( fun == "exec_blind(TQCString,TQValueList,TQValueList,TQCString)" ) stream >> envs >> startup_id; - kdDebug(7016) << "KLauncher: Got exec_blind('" << name << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got exec_blind('" << name << "', ...)" << endl; exec_blind( name, arg_list, envs, startup_id); return true; } @@ -315,29 +315,29 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, bool finished; if (strncmp(fun, "start_service_by_name(", 22) == 0) { - kdDebug(7016) << "KLauncher: Got start_service_by_name('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got start_service_by_name('" << serviceName << "', ...)" << endl; finished = start_service_by_name(serviceName, urls, envs, startup_id, bNoWait); } else if (strncmp(fun, "start_service_by_desktop_path(", 30) == 0) { - kdDebug(7016) << "KLauncher: Got start_service_by_desktop_path('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got start_service_by_desktop_path('" << serviceName << "', ...)" << endl; finished = start_service_by_desktop_path(serviceName, urls, envs, startup_id, bNoWait); } else if (strncmp(fun, "start_service_by_desktop_name(", 30) == 0) { - kdDebug(7016) << "KLauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl; finished = start_service_by_desktop_name(serviceName, urls, envs, startup_id, bNoWait ); } else if ((fun == "tdeinit_exec(TQString,TQStringList)") || (fun == "tdeinit_exec(TQString,TQStringList,TQValueList)") || (fun == "tdeinit_exec(TQString,TQStringList,TQValueList,TQCString)")) { - kdDebug(7016) << "KLauncher: Got tdeinit_exec('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got tdeinit_exec('" << serviceName << "', ...)" << endl; finished = tdeinit_exec(serviceName, urls, envs, startup_id, false); } else { - kdDebug(7016) << "KLauncher: Got tdeinit_exec_wait('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got tdeinit_exec_wait('" << serviceName << "', ...)" << endl; finished = tdeinit_exec(serviceName, urls, envs, startup_id, true); } if (!finished) @@ -397,7 +397,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, else if (fun == "reparseConfiguration()") { TDEGlobal::config()->reparseConfiguration(); - kdDebug(7016) << "KLauncher::process : reparseConfiguration" << endl; + kdDebug(7016) << "TDELauncher::process : reparseConfiguration" << endl; KProtocolManager::reparseConfiguration(); IdleSlave *slave; for(slave = mSlaveList.first(); slave; slave = mSlaveList.next()) @@ -409,7 +409,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, { ::signal( SIGHUP, SIG_IGN); ::signal( SIGTERM, SIG_IGN); - kdDebug() << "KLauncher::process ---> terminateKDE" << endl; + kdDebug() << "TDELauncher::process ---> terminateKDE" << endl; tdelauncher_header request_header; request_header.cmd = LAUNCHER_TERMINATE_KDE; request_header.arg_length = 0; @@ -418,14 +418,14 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, } else if (fun == "autoStart()") { - kdDebug() << "KLauncher::process ---> autoStart" << endl; + kdDebug() << "TDELauncher::process ---> autoStart" << endl; autoStart(1); replyType = "void"; return true; } else if (fun == "autoStart(int)") { - kdDebug() << "KLauncher::process ---> autoStart(int)" << endl; + kdDebug() << "TDELauncher::process ---> autoStart(int)" << endl; TQDataStream stream(data, IO_ReadOnly); int phase; stream >> phase; @@ -443,15 +443,15 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, } QCStringList -KLauncher::interfaces() +TDELauncher::interfaces() { QCStringList ifaces = DCOPObject::interfaces(); - ifaces += "KLauncher"; + ifaces += "TDELauncher"; return ifaces; } QCStringList -KLauncher::functions() +TDELauncher::functions() { QCStringList funcs = DCOPObject::functions(); funcs << "void exec_blind(TQCString,TQValueList)"; @@ -480,7 +480,7 @@ KLauncher::functions() return funcs; } -void KLauncher::setLaunchEnv(const TQCString &name, const TQCString &_value) +void TDELauncher::setLaunchEnv(const TQCString &name, const TQCString &_value) { TQCString value(_value); if (value.isNull()) @@ -522,7 +522,7 @@ read_socket(int sock, char *buffer, int len) void -KLauncher::slotKDEInitData(int) +TDELauncher::slotKDEInitData(int) { tdelauncher_header request_header; TQByteArray requestData; @@ -572,25 +572,25 @@ KLauncher::slotKDEInitData(int) { case KService::DCOP_None: { - lastRequest->status = KLaunchRequest::Running; + lastRequest->status = TDELaunchRequest::Running; break; } case KService::DCOP_Unique: { - lastRequest->status = KLaunchRequest::Launching; + lastRequest->status = TDELaunchRequest::Launching; break; } case KService::DCOP_Wait: { - lastRequest->status = KLaunchRequest::Launching; + lastRequest->status = TDELaunchRequest::Launching; break; } case KService::DCOP_Multi: { - lastRequest->status = KLaunchRequest::Launching; + lastRequest->status = TDELaunchRequest::Launching; break; } } @@ -599,7 +599,7 @@ KLauncher::slotKDEInitData(int) } if (lastRequest && (request_header.cmd == LAUNCHER_ERROR)) { - lastRequest->status = KLaunchRequest::Error; + lastRequest->status = TDELaunchRequest::Error; if (!requestData.isEmpty()) lastRequest->errorMsg = TQString::fromUtf8((char *) requestData.data()); lastRequest = 0; @@ -611,20 +611,20 @@ KLauncher::slotKDEInitData(int) } void -KLauncher::processDied(pid_t pid, long /* exitStatus */) +TDELauncher::processDied(pid_t pid, long /* exitStatus */) { - KLaunchRequest *request = requestList.first(); + TDELaunchRequest *request = requestList.first(); for(; request; request = requestList.next()) { if (request->pid == pid) { if (request->dcop_service_type == KService::DCOP_Wait) - request->status = KLaunchRequest::Done; + request->status = TDELaunchRequest::Done; else if ((request->dcop_service_type == KService::DCOP_Unique) && (dcopClient()->isApplicationRegistered(request->dcop_name))) - request->status = KLaunchRequest::Running; + request->status = TDELaunchRequest::Running; else - request->status = KLaunchRequest::Error; + request->status = TDELaunchRequest::Error; requestDone(request); return; } @@ -632,17 +632,17 @@ KLauncher::processDied(pid_t pid, long /* exitStatus */) } void -KLauncher::slotAppRegistered(const TQCString &appId) +TDELauncher::slotAppRegistered(const TQCString &appId) { const char *cAppId = appId.data(); if (!cAppId) return; - KLaunchRequest *request = requestList.first(); - KLaunchRequest *nextRequest; + TDELaunchRequest *request = requestList.first(); + TDELaunchRequest *nextRequest; for(; request; request = nextRequest) { nextRequest = requestList.next(); - if (request->status != KLaunchRequest::Launching) + if (request->status != TDELaunchRequest::Launching) continue; // For unique services check the requested service name first @@ -650,7 +650,7 @@ KLauncher::slotAppRegistered(const TQCString &appId) ((appId == request->dcop_name) || dcopClient()->isApplicationRegistered(request->dcop_name))) { - request->status = KLaunchRequest::Running; + request->status = TDELaunchRequest::Running; requestDone(request); continue; } @@ -663,7 +663,7 @@ KLauncher::slotAppRegistered(const TQCString &appId) ((cAppId[l] == '\0') || (cAppId[l] == '-'))) { request->dcop_name = appId; - request->status = KLaunchRequest::Running; + request->status = TDELaunchRequest::Running; requestDone(request); continue; } @@ -671,7 +671,7 @@ KLauncher::slotAppRegistered(const TQCString &appId) } void -KLauncher::autoStart(int phase) +TDELauncher::autoStart(int phase) { if( mAutoStart.phase() >= phase ) return; @@ -690,7 +690,7 @@ KLauncher::autoStart(int phase) } void -KLauncher::slotAutoStart() +TDELauncher::slotAutoStart() { KService::Ptr s; do @@ -727,10 +727,10 @@ KLauncher::slotAutoStart() } void -KLauncher::requestDone(KLaunchRequest *request) +TDELauncher::requestDone(TDELaunchRequest *request) { - if ((request->status == KLaunchRequest::Running) || - (request->status == KLaunchRequest::Done)) + if ((request->status == TDELaunchRequest::Running) || + (request->status == TDELaunchRequest::Done)) { DCOPresult.result = 0; DCOPresult.dcopName = request->dcop_name; @@ -788,7 +788,7 @@ KLauncher::requestDone(KLaunchRequest *request) } void -KLauncher::requestStart(KLaunchRequest *request) +TDELauncher::requestStart(TDELaunchRequest *request) { requestList.append( request ); // Send request to tdeinit. @@ -879,17 +879,17 @@ KLauncher::requestStart(KLaunchRequest *request) } void -KLauncher::exec_blind( const TQCString &name, const TQValueList &arg_list, +TDELauncher::exec_blind( const TQCString &name, const TQValueList &arg_list, const TQValueList &envs, const TQCString& startup_id ) { - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = false; request->name = name; request->arg_list = arg_list; request->dcop_name = 0; request->dcop_service_type = KService::DCOP_None; request->pid = 0; - request->status = KLaunchRequest::Launching; + request->status = TDELaunchRequest::Launching; request->transaction = 0; // No confirmation is send request->envs = envs; // Find service, if any - strip path if needed @@ -907,7 +907,7 @@ KLauncher::exec_blind( const TQCString &name, const TQValueList &arg_ bool -KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls, +TDELauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls, const TQValueList &envs, const TQCString& startup_id, bool blind) { KService::Ptr service = 0; @@ -924,7 +924,7 @@ KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList } bool -KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls, +TDELauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls, const TQValueList &envs, const TQCString& startup_id, bool blind) { KService::Ptr service = 0; @@ -949,7 +949,7 @@ KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQSt } bool -KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls, +TDELauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls, const TQValueList &envs, const TQCString& startup_id, bool blind) { KService::Ptr service = 0; @@ -966,7 +966,7 @@ KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQSt } bool -KLauncher::start_service(KService::Ptr service, const TQStringList &_urls, +TDELauncher::start_service(KService::Ptr service, const TQStringList &_urls, const TQValueList &envs, const TQCString& startup_id, bool blind, bool autoStart) { TQStringList urls = _urls; @@ -977,7 +977,7 @@ KLauncher::start_service(KService::Ptr service, const TQStringList &_urls, cancel_service_startup_info( NULL, startup_id, envs ); // cancel it if any return false; } - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = autoStart; if ((urls.count() > 1) && !service->allowMultipleFiles()) @@ -1047,7 +1047,7 @@ KLauncher::start_service(KService::Ptr service, const TQStringList &_urls, } void -KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id, +TDELauncher::send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id, const TQValueList &envs ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY @@ -1102,7 +1102,7 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser } void -KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString& startup_id, +TDELauncher::cancel_service_startup_info( TDELaunchRequest* request, const TQCString& startup_id, const TQValueList &envs ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY @@ -1136,10 +1136,10 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString } bool -KLauncher::tdeinit_exec(const TQString &app, const TQStringList &args, +TDELauncher::tdeinit_exec(const TQString &app, const TQStringList &args, const TQValueList &envs, TQCString startup_id, bool wait) { - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = false; for(TQStringList::ConstIterator it = args.begin(); @@ -1178,7 +1178,7 @@ KLauncher::tdeinit_exec(const TQString &app, const TQStringList &args, } void -KLauncher::queueRequest(KLaunchRequest *request) +TDELauncher::queueRequest(TDELaunchRequest *request) { requestQueue.append( request ); if (!bProcessingQueue) @@ -1189,14 +1189,14 @@ KLauncher::queueRequest(KLaunchRequest *request) } void -KLauncher::slotDequeue() +TDELauncher::slotDequeue() { do { - KLaunchRequest *request = requestQueue.take(0); + TDELaunchRequest *request = requestQueue.take(0); // process request - request->status = KLaunchRequest::Launching; + request->status = TDELaunchRequest::Launching; requestStart(request); - if (request->status != KLaunchRequest::Launching) + if (request->status != TDELaunchRequest::Launching) { // Request handled. requestDone( request ); @@ -1207,7 +1207,7 @@ KLauncher::slotDequeue() } void -KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service , +TDELauncher::createArgs( TDELaunchRequest *request, const KService::Ptr service , const TQStringList &urls) { TQStringList params = KRun::processDesktopExec(*service, urls, false); @@ -1223,7 +1223,7 @@ KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service , ///// IO-Slave functions pid_t -KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket) +TDELauncher::requestHoldSlave(const KURL &url, const TQString &app_socket) { IdleSlave *slave; for(slave = mSlaveList.first(); slave; slave = mSlaveList.next()) @@ -1242,7 +1242,7 @@ KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket) pid_t -KLauncher::requestSlave(const TQString &protocol, +TDELauncher::requestSlave(const TQString &protocol, const TQString &host, const TQString &app_socket, TQString &error) @@ -1292,7 +1292,7 @@ KLauncher::requestSlave(const TQString &protocol, arg_list.append(arg2); arg_list.append(arg3); -// kdDebug(7016) << "KLauncher: launching new slave " << _name << " with protocol=" << protocol << endl; +// kdDebug(7016) << "TDELauncher: launching new slave " << _name << " with protocol=" << protocol << endl; if (mSlaveDebug == arg1) { tdelauncher_header request_header; @@ -1311,7 +1311,7 @@ KLauncher::requestSlave(const TQString &protocol, arg_list.prepend("--tool=memcheck"); } - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = false; request->name = name; request->arg_list = arg_list; @@ -1321,7 +1321,7 @@ KLauncher::requestSlave(const TQString &protocol, #ifdef Q_WS_X11 request->startup_id = "0"; #endif - request->status = KLaunchRequest::Launching; + request->status = TDELaunchRequest::Launching; request->transaction = 0; // No confirmation is send requestStart(request); pid_t pid = request->pid; @@ -1338,7 +1338,7 @@ KLauncher::requestSlave(const TQString &protocol, } void -KLauncher::waitForSlave(pid_t pid) +TDELauncher::waitForSlave(pid_t pid) { IdleSlave *slave; for(slave = mSlaveList.first(); slave; slave = mSlaveList.next()) @@ -1353,7 +1353,7 @@ KLauncher::waitForSlave(pid_t pid) } void -KLauncher::acceptSlave(TDESocket *slaveSocket) +TDELauncher::acceptSlave(TDESocket *slaveSocket) { IdleSlave *slave = new IdleSlave(slaveSocket); // Send it a SLAVE_STATUS command. @@ -1368,7 +1368,7 @@ KLauncher::acceptSlave(TDESocket *slaveSocket) } void -KLauncher::slotSlaveStatus(IdleSlave *slave) +TDELauncher::slotSlaveStatus(IdleSlave *slave) { SlaveWaitRequest *waitRequest = mSlaveWaitRequest.first(); while(waitRequest) @@ -1390,7 +1390,7 @@ KLauncher::slotSlaveStatus(IdleSlave *slave) } void -KLauncher::slotSlaveGone() +TDELauncher::slotSlaveGone() { IdleSlave *slave = (IdleSlave *) sender(); mSlaveList.removeRef(slave); @@ -1401,7 +1401,7 @@ KLauncher::slotSlaveGone() } void -KLauncher::idleTimeout() +TDELauncher::idleTimeout() { bool keepOneFileSlave=true; time_t now = time(0); diff --git a/kinit/tdelauncher.h b/kinit/tdelauncher.h index 27c49ef7f..791958980 100644 --- a/kinit/tdelauncher.h +++ b/kinit/tdelauncher.h @@ -76,7 +76,7 @@ public: DCOPClientTransaction *transaction; }; -class KLaunchRequest +class TDELaunchRequest { public: TQCString name; @@ -105,14 +105,14 @@ struct serviceResult pid_t pid; }; -class KLauncher : public TDEApplication, public DCOPObject +class TDELauncher : public TDEApplication, public DCOPObject { Q_OBJECT public: - KLauncher(int _tdeinitSocket, bool new_startup); + TDELauncher(int _tdeinitSocket, bool new_startup); - ~KLauncher(); + ~TDELauncher(); void close(); static void destruct(int exit_code); // exit! @@ -126,8 +126,8 @@ public: protected: void processDied(pid_t pid, long exitStatus); - void requestStart(KLaunchRequest *request); - void requestDone(KLaunchRequest *request); + void requestStart(TDELaunchRequest *request); + void requestDone(TDELaunchRequest *request); void setLaunchEnv(const TQCString &name, const TQCString &value); void exec_blind(const TQCString &name, const TQValueList &arg_list, @@ -148,7 +148,7 @@ protected: void autoStart(int phase); - void createArgs( KLaunchRequest *request, const KService::Ptr service, + void createArgs( TDELaunchRequest *request, const KService::Ptr service, const TQStringList &url); pid_t requestHoldSlave(const KURL &url, const TQString &app_socket); @@ -156,11 +156,11 @@ protected: const TQString &app_socket, TQString &error); - void queueRequest(KLaunchRequest *); + void queueRequest(TDELaunchRequest *); - void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id, + void send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id, const TQValueList &envs ); - void cancel_service_startup_info( KLaunchRequest *request, const TQCString& startup_id, + void cancel_service_startup_info( TDELaunchRequest *request, const TQCString& startup_id, const TQValueList &envs ); public slots: @@ -174,12 +174,12 @@ public slots: void idleTimeout(); protected: - TQPtrList requestList; // Requests being handled - TQPtrList requestQueue; // Requests waiting to being handled + TQPtrList requestList; // Requests being handled + TQPtrList requestQueue; // Requests waiting to being handled int tdeinitSocket; TQSocketNotifier *tdeinitNotifier; serviceResult DCOPresult; - KLaunchRequest *lastRequest; + TDELaunchRequest *lastRequest; TQPtrList mSlaveWaitRequest; TQString mPoolSocketName; TDEServerSocket *mPoolSocket; diff --git a/kinit/tdelauncher_main.cpp b/kinit/tdelauncher_main.cpp index 059496c0c..dc0c02dd7 100644 --- a/kinit/tdelauncher_main.cpp +++ b/kinit/tdelauncher_main.cpp @@ -41,7 +41,7 @@ static void sig_handler(int sig_num) signal( SIGHUP, SIG_IGN); signal( SIGTERM, SIG_IGN); fprintf(stderr, "[tdelauncher] Exiting on signal %d\n", sig_num); - KLauncher::destruct(255); + TDELauncher::destruct(255); } static KCmdLineOptions options[] = @@ -62,10 +62,10 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv ) TQCString cname = TDEApplication::launcher(); char *name = cname.data(); - TDECmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.", + TDECmdLineArgs::init(argc, argv, name, "TDELauncher", "A service launcher.", "v1.0"); - KLauncher::addCmdLineOptions(); + TDELauncher::addCmdLineOptions(); TDECmdLineArgs::addCmdLineOptions( options ); // WABA: Make sure not to enable session management. @@ -101,7 +101,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv ) // Try again... } - KLauncher *launcher = new KLauncher(LAUNCHER_FD, args->isSet("new-startup")); + TDELauncher *launcher = new TDELauncher(LAUNCHER_FD, args->isSet("new-startup")); launcher->dcopClient()->setDefaultObject( name ); launcher->dcopClient()->setDaemonMode( true ); diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index 3cc476254..4bfe13f30 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -50,18 +50,18 @@ struct DownloadDialog::Private { TQString m_providerlist; TQWidget *m_page; - KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l; + TDEListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l; TQPtrList m_installlist; TQMap m_variantjobs; TQMap m_variants; TQMap m_newproviders; }; -class NumSortListViewItem : public KListViewItem +class NumSortListViewItem : public TDEListViewItem { public: NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) : - KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) + TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) { } @@ -72,15 +72,15 @@ class NumSortListViewItem : public KListViewItem s.sprintf("%08d", text(col).toInt()); return s; } - return KListViewItem::key( col, asc ); + return TDEListViewItem::key( col, asc ); } }; -class DateSortListViewItem : public KListViewItem +class DateSortListViewItem : public TDEListViewItem { public: DateSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) : - KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) + TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) { } @@ -92,7 +92,7 @@ class DateSortListViewItem : public KListViewItem s.sprintf("%08d", date.year() * 366 + date.dayOfYear()); return s; } - return KListViewItem::key( col, asc ); + return TDEListViewItem::key( col, asc ); } }; @@ -157,7 +157,7 @@ DownloadDialog::~DownloadDialog() { for (TQMap* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) delete it.data(); - for (TQMap* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it) + for (TQMap* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it) delete it.data(); delete d; } @@ -174,11 +174,11 @@ void DownloadDialog::load(TQString providerList) void DownloadDialog::clear() { - TQMap* >::Iterator it; - TQMap* >::Iterator end(m_map.end()); + TQMap* >::Iterator it; + TQMap* >::Iterator end(m_map.end()); for(it = m_map.begin(); it != end; ++it) { - TQValueList *v = it.data(); + TQValueList *v = it.data(); kdDebug() << "clear listviews in " << v << endl; if(v) { @@ -266,19 +266,19 @@ void DownloadDialog::addProvider(Provider *p) TQHBoxLayout *box = new TQHBoxLayout(frame); box->add(ctl); - d->m_lvtmp_r = new KListView(w_r); + d->m_lvtmp_r = new TDEListView(w_r); d->m_lvtmp_r->addColumn(i18n("Name")); d->m_lvtmp_r->addColumn(i18n("Version")); d->m_lvtmp_r->addColumn(i18n("Rating")); d->m_lvtmp_r->setSorting(2, false); - d->m_lvtmp_d = new KListView(w_d); + d->m_lvtmp_d = new TDEListView(w_d); d->m_lvtmp_d->addColumn(i18n("Name")); d->m_lvtmp_d->addColumn(i18n("Version")); d->m_lvtmp_d->addColumn(i18n("Downloads")); d->m_lvtmp_d->setSorting(2, false); - d->m_lvtmp_l = new KListView(w_l); + d->m_lvtmp_l = new TDEListView(w_l); d->m_lvtmp_l->addColumn(i18n("Name")); d->m_lvtmp_l->addColumn(i18n("Version")); d->m_lvtmp_l->addColumn(i18n("Release Date")); @@ -315,7 +315,7 @@ void DownloadDialog::addProvider(Provider *p) TQVBoxLayout *box4 = new TQVBoxLayout(w_l); box4->add(d->m_lvtmp_l); - TQValueList *v = new TQValueList; + TQValueList *v = new TQValueList; *v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l; m_map[frame] = v; m_rts[frame] = rt; @@ -423,19 +423,19 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants) if(variants.contains("score")) { - KListViewItem *tmp_r = new NumSortListViewItem(lv_r, + TDEListViewItem *tmp_r = new NumSortListViewItem(lv_r, entry->name(lang), entry->version(), TQString("%1").arg(entry->rating())); tmp_r->setPixmap(0, pix); } if(variants.contains("downloads")) { - KListViewItem *tmp_d = new NumSortListViewItem(lv_d, + TDEListViewItem *tmp_d = new NumSortListViewItem(lv_d, entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads())); tmp_d->setPixmap(0, pix); } if(variants.contains("latest")) { - KListViewItem *tmp_l = new DateSortListViewItem(lv_l, + TDEListViewItem *tmp_l = new DateSortListViewItem(lv_l, entry->name(lang), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate())); tmp_l->setPixmap(0, pix); } diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h index cfcd4858f..1d61d259d 100644 --- a/knewstuff/downloaddialog.h +++ b/knewstuff/downloaddialog.h @@ -28,7 +28,7 @@ namespace TDEIO class Job; } -class KListView; +class TDEListView; class TQTextBrowser; class TQFrame; class KNewStuffGeneric; @@ -232,7 +232,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase ProviderLoader *m_loader; TQString m_entryname; - KListView *lv_r, *lv_d, *lv_l; + TDEListView *lv_r, *lv_d, *lv_l; TQTextBrowser *m_rt; TQFrame *m_frame; TQListViewItem *m_entryitem; @@ -240,7 +240,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase Entry *m_entry; KNewStuffGeneric *m_s; int m_curtab; - TQMap* > m_map; + TQMap* > m_map; TQMap m_providers; TQMap m_rts; TQMap* > m_buttons; diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp index 6bfbb3333..d36a1ef19 100644 --- a/knewstuff/knewstuff.cpp +++ b/knewstuff/knewstuff.cpp @@ -30,12 +30,12 @@ using namespace KNS; -KAction* KNS::standardAction(const TQString& what, +TDEAction* KNS::standardAction(const TQString& what, const TQObject *recvr, - const char *slot, KActionCollection* parent, + const char *slot, TDEActionCollection* parent, const char *name) { - return new KAction(i18n("Download New %1").arg(what), "knewstuff", + return new TDEAction(i18n("Download New %1").arg(what), "knewstuff", 0, recvr, slot, parent, name); } diff --git a/knewstuff/knewstuff.h b/knewstuff/knewstuff.h index 5d2319aec..ca07c7f0d 100644 --- a/knewstuff/knewstuff.h +++ b/knewstuff/knewstuff.h @@ -26,17 +26,17 @@ class TQObject; class TQWidget; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; namespace KNS { class Engine; class Entry; -KDE_EXPORT KAction* standardAction(const TQString& what, +KDE_EXPORT TDEAction* standardAction(const TQString& what, const TQObject *recvr, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name = 0); } diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp index a66258701..23aa94388 100644 --- a/knewstuff/providerdialog.cpp +++ b/knewstuff/providerdialog.cpp @@ -34,11 +34,11 @@ using namespace KNS; -class ProviderItem : public KListViewItem +class ProviderItem : public TDEListViewItem { public: - ProviderItem( KListView *parent, Provider *provider ) : - KListViewItem( parent ), mProvider( provider ) + ProviderItem( TDEListView *parent, Provider *provider ) : + TDEListViewItem( parent ), mProvider( provider ) { setText( 0, provider->name() ); } @@ -61,7 +61,7 @@ ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) : TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage ); topLayout->addWidget( description ); - mListView = new KListView( topPage ); + mListView = new TDEListView( topPage ); mListView->addColumn( i18n("Name") ); topLayout->addWidget( mListView ); } diff --git a/knewstuff/providerdialog.h b/knewstuff/providerdialog.h index 3e02e30aa..549a65416 100644 --- a/knewstuff/providerdialog.h +++ b/knewstuff/providerdialog.h @@ -22,7 +22,7 @@ #include -class KListView; +class TDEListView; namespace KNS { @@ -68,7 +68,7 @@ class ProviderDialog : public KDialogBase private: Engine *mEngine; - KListView *mListView; + TDEListView *mListView; }; } diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index bd1deffb8..d19dcec0a 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -2979,7 +2979,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h, - const TQColorGroup &g, KToolBarPos type, TQBrush *fill) + const TQColorGroup &g, TDEToolBarPos type, TQBrush *fill) { GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject()); diff --git a/kstyles/klegacy/klegacystyle.h b/kstyles/klegacy/klegacystyle.h index 18c073f9a..5288fd4f8 100644 --- a/kstyles/klegacy/klegacystyle.h +++ b/kstyles/klegacy/klegacystyle.h @@ -60,7 +60,7 @@ public: // toolbar stuffs virtual void drawKBarHandle(TQPainter *p, int x, int y, int w, int h, - const TQColorGroup &g, KToolBarPos type, TQBrush *fill = 0); + const TQColorGroup &g, TDEToolBarPos type, TQBrush *fill = 0); virtual void drawKickerHandle(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, TQBrush *fill = 0); virtual void drawKickerAppletHandle(TQPainter *p, int x, int y, int w, int h, diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index ff7199939..7d2c72c2a 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -569,7 +569,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen { w->setBackgroundMode( TQWidget::NoBackground ); } - else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) + else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) { w->setBackgroundMode( TQWidget::PaletteBackground ); } @@ -652,7 +652,7 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem w->setBackgroundMode( TQWidget::PaletteButton ); //For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class) - else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) + else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) w->setBackgroundMode( TQWidget::PaletteButton ); //For scrollbars, we don't do much, since the widget queries the style on the switch diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index ab5282e06..3e850394f 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -965,7 +965,7 @@ WebStyle::drawSlider } void -WebStyle::drawKToolBar +WebStyle::drawTDEToolBar ( TQPainter * p, int x, @@ -973,7 +973,7 @@ WebStyle::drawKToolBar int w, int h, const TQColorGroup & g, - KToolBarPos /* pos */, + TDEToolBarPos /* pos */, TQBrush * /* fill */ ) { @@ -993,7 +993,7 @@ WebStyle::drawKBarHandle int w, int h, const TQColorGroup & g, - KToolBarPos /* pos */, + TDEToolBarPos /* pos */, TQBrush * /* fill */ ) { @@ -1025,7 +1025,7 @@ WebStyle::drawKMenuBar } void -WebStyle::drawKToolBarButton +WebStyle::drawTDEToolBarButton ( TQPainter * p, int x, @@ -1037,7 +1037,7 @@ WebStyle::drawKToolBarButton bool raised, bool enabled, bool popup, - KToolButtonType type, + TDEToolButtonType type, const TQString & btext, const TQPixmap * pixmap, TQFont * font, diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h index 5cd930c73..611cf8485 100644 --- a/kstyles/web/webstyle.h +++ b/kstyles/web/webstyle.h @@ -210,7 +210,7 @@ class WebStyle : public KStyle bool tickBelow ); - void drawKToolBar + void drawTDEToolBar ( TQPainter *, int x, @@ -218,7 +218,7 @@ class WebStyle : public KStyle int w, int h, const TQColorGroup &, - KToolBarPos, + TDEToolBarPos, TQBrush * fill = 0 ); @@ -230,7 +230,7 @@ class WebStyle : public KStyle int w, int h, const TQColorGroup &, - KToolBarPos, + TDEToolBarPos, TQBrush * fill = 0 ); @@ -246,7 +246,7 @@ class WebStyle : public KStyle TQBrush * fill = 0 ); - void drawKToolBarButton + void drawTDEToolBarButton ( TQPainter * p, int x, @@ -258,7 +258,7 @@ class WebStyle : public KStyle bool raised = true, bool enabled = true, bool popup = false, - KToolButtonType = Icon, + TDEToolButtonType = Icon, const TQString & btext = TQString::null, const TQPixmap * = 0, TQFont * = 0, diff --git a/tdecert/tdecertpart.cc b/tdecert/tdecertpart.cc index 08e3ec5e0..f91c545d2 100644 --- a/tdecert/tdecertpart.cc +++ b/tdecert/tdecertpart.cc @@ -52,14 +52,14 @@ K_EXPORT_COMPONENT_FACTORY( libtdecertpart, KParts::GenericFactory ) -KX509Item::KX509Item(KListViewItem *parent, KSSLCertificate *x) : - KListViewItem(parent, 0L) +KX509Item::KX509Item(TDEListViewItem *parent, KSSLCertificate *x) : + TDEListViewItem(parent, 0L) { setup(x); } -KX509Item::KX509Item(KListView *parent, KSSLCertificate *x) : - KListViewItem(parent) +KX509Item::KX509Item(TDEListView *parent, KSSLCertificate *x) : + TDEListViewItem(parent) { setup(x); } @@ -98,8 +98,8 @@ KX509Item::~KX509Item() } -KPKCS12Item::KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x) : - KListViewItem(parent, 0L) +KPKCS12Item::KPKCS12Item(TDEListViewItem *parent, KSSLPKCS12 *x) : + TDEListViewItem(parent, 0L) { cert = x; if (x) { @@ -155,13 +155,13 @@ setWidget(_frame); _baseGrid = new TQGridLayout(_frame, 15, 9, KDialog::marginHint(), KDialog::spacingHint()); -_sideList = new KListView(_frame); +_sideList = new TDEListView(_frame); _sideList->setRootIsDecorated(true); _sideList->addColumn(i18n("Certificates")); -_parentCA = new KListViewItem(_sideList, i18n("Signers")); +_parentCA = new TDEListViewItem(_sideList, i18n("Signers")); _parentCA->setExpandable(true); _sideList->setOpen(_parentCA, true); -_parentP12 = new KListViewItem(_sideList, i18n("Client")); +_parentP12 = new TDEListViewItem(_sideList, i18n("Client")); _parentP12->setExpandable(true); _sideList->setOpen(_parentP12, true); diff --git a/tdecert/tdecertpart.h b/tdecert/tdecertpart.h index 040b0ad94..bb4ca958e 100644 --- a/tdecert/tdecertpart.h +++ b/tdecert/tdecertpart.h @@ -44,10 +44,10 @@ class TDEAboutData; class TQGridLayout; -class KX509Item : public KListViewItem { +class KX509Item : public TDEListViewItem { public: - KX509Item(KListViewItem *parent, KSSLCertificate *x); - KX509Item(KListView *parent, KSSLCertificate *x); + KX509Item(TDEListViewItem *parent, KSSLCertificate *x); + KX509Item(TDEListView *parent, KSSLCertificate *x); void setup(KSSLCertificate *x); ~KX509Item(); virtual int rtti() const { return 1; } @@ -56,9 +56,9 @@ class KX509Item : public KListViewItem { }; -class KPKCS12Item : public KListViewItem { +class KPKCS12Item : public TDEListViewItem { public: - KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x); + KPKCS12Item(TDEListViewItem *parent, KSSLPKCS12 *x); ~KPKCS12Item(); KSSLPKCS12 *cert; TQString _prettyName; @@ -94,8 +94,8 @@ protected: void displayPKCS12Cert(KSSLCertificate *c); void displayCACert(KSSLCertificate *c); - KListView *_sideList; - KListViewItem *_parentCA, *_parentP12; + TDEListView *_sideList; + TDEListViewItem *_parentCA, *_parentP12; TQFrame *_pkcsFrame, *_blankFrame, *_x509Frame, *_frame; // for the PKCS12 widget diff --git a/tdecore/AUTHORS b/tdecore/AUTHORS index 03def3f46..ce19e095b 100644 --- a/tdecore/AUTHORS +++ b/tdecore/AUTHORS @@ -16,16 +16,16 @@ DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda Read and write numerical config entries, KPanner, KTabControl, -KPopupMenu, KMessageBox, KEdit widgets. +TDEPopupMenu, KMessageBox, KEdit widgets. Martin Jones -Bugfixes in KPixmap and KURL, KColorDialog, KSelector +Bugfixes in KPixmap and KURL, KColorDialog, TDESelector Keith Brown KTreeList class Bernd Johannes Wuebben -KFontDialog classes +TDEFontDialog classes Tim D. Gilman KDatePicker, KDateTable class diff --git a/tdecore/DESIGN.iconloading b/tdecore/DESIGN.iconloading index a9e57afbd..a675a8922 100644 --- a/tdecore/DESIGN.iconloading +++ b/tdecore/DESIGN.iconloading @@ -72,7 +72,7 @@ information and then waiting for a sufficient long period, e.. 5 minutes, before actually removing the image data. I can also imagine a scenario where the index information is only used very -temporarily, e.g. during the creation of a KMainWindow (mmap the file in the +temporarily, e.g. during the creation of a TDEMainWindow (mmap the file in the constructor, unmap it from the next event loop) that way icons can be removed from the index and after e.g. a timeout of 5 minutes one can be relatively sure that the index will no longer be used. diff --git a/tdecore/README.kiosk b/tdecore/README.kiosk index e12e29d27..54ab60d2d 100644 --- a/tdecore/README.kiosk +++ b/tdecore/README.kiosk @@ -331,7 +331,7 @@ Applications may use additional actions that they defined themselves. You can get a list of the actions used by a certain applications by using the following dcop command: -dcop qt objects | grep KActionCollection/ | cut -d '/' -f 3 +dcop qt objects | grep TDEActionCollection/ | cut -d '/' -f 3 or with @@ -660,7 +660,7 @@ KDE3 Kiosk Application API Three new methods have been added to TDEApplication: - bool authorize(QString action); // Generic actions -- bool authorizeKAction(QString action); // For KActions exclusively +- bool authorizeTDEAction(QString action); // For TDEActions exclusively - bool authorizeURLAction(QString, referringURL, destinationURL) // URL Handling Automatic Logout diff --git a/tdecore/kaccel.cpp b/tdecore/kaccel.cpp index 7291f3f56..9dde93e7a 100644 --- a/tdecore/kaccel.cpp +++ b/tdecore/kaccel.cpp @@ -45,15 +45,15 @@ // TODO: Put in kaccelbase.cpp //--------------------------------------------------------------------- -// KAccelEventHandler +// TDEAccelEventHandler //--------------------------------------------------------------------- // -// In KAccelEventHandler::x11Event we do our own X11 keyboard event handling +// In TDEAccelEventHandler::x11Event we do our own X11 keyboard event handling // This allows us to map the Win key to Qt::MetaButton, Qt does not know about // the Win key. // -// KAccelEventHandler::x11Event will generate an AccelOverride event. The -// AccelOverride event is abused a bit to ensure that KAccelPrivate::eventFilter +// TDEAccelEventHandler::x11Event will generate an AccelOverride event. The +// AccelOverride event is abused a bit to ensure that TDEAccelPrivate::eventFilter // (as an event filter on the toplevel widget) will get the key event first // (in the form of AccelOverride) before any of the intermediate widgets are // able to process it. @@ -63,10 +63,10 @@ // skipped and the KeyPress is followed immediately. // If the Accel event is accepted, no KeyPress event will follow. // -// KAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride +// TDEAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride // event, there are now two possibilities: // -// 1) If KAccel intercepts the AccelOverride we are done and can consider the X11 +// 1) If TDEAccel intercepts the AccelOverride we are done and can consider the X11 // keyboard event as handled. // 2) If another widget accepts the AccelOverride, it will expect to get a normal // Qt generated KeyPress event afterwards. So we let Qt handle the X11 keyboard event @@ -80,34 +80,34 @@ bool kde_g_bKillAccelOverride = false; -class KAccelEventHandler : public TQWidget +class TDEAccelEventHandler : public TQWidget { public: - static KAccelEventHandler* self() + static TDEAccelEventHandler* self() { if( !g_pSelf ) - g_pSelf = new KAccelEventHandler; + g_pSelf = new TDEAccelEventHandler; return g_pSelf; } static void accelActivated( bool b ) { g_bAccelActivated = b; } private: - KAccelEventHandler(); + TDEAccelEventHandler(); # ifdef Q_WS_X11 bool x11Event( XEvent* pEvent ); # endif - static KAccelEventHandler* g_pSelf; + static TDEAccelEventHandler* g_pSelf; static bool g_bAccelActivated; }; -KAccelEventHandler* KAccelEventHandler::g_pSelf = 0; -bool KAccelEventHandler::g_bAccelActivated = false; +TDEAccelEventHandler* TDEAccelEventHandler::g_pSelf = 0; +bool TDEAccelEventHandler::g_bAccelActivated = false; -KAccelEventHandler::KAccelEventHandler() - : TQWidget( 0, "KAccelEventHandler" ) +TDEAccelEventHandler::TDEAccelEventHandler() + : TQWidget( 0, "TDEAccelEventHandler" ) { # ifdef Q_WS_X11 if ( kapp ) @@ -118,7 +118,7 @@ KAccelEventHandler::KAccelEventHandler() #ifdef Q_WS_X11 bool tqt_try_modal( TQWidget *, XEvent * ); -bool KAccelEventHandler::x11Event( XEvent* pEvent ) +bool TDEAccelEventHandler::x11Event( XEvent* pEvent ) { if( TQWidget::keyboardGrabber() || !kapp->focusWidget() ) return false; @@ -146,7 +146,7 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent ) g_bAccelActivated = false; kapp->sendEvent( kapp->focusWidget(), &ke ); - // If the Override event was accepted from a non-KAccel widget, + // If the Override event was accepted from a non-TDEAccel widget, // then kill the next AccelOverride in TDEApplication::notify. if( ke.isAccepted() && !g_bAccelActivated ) kde_g_bKillAccelOverride = true; @@ -160,35 +160,35 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent ) #endif // Q_WS_X11 //--------------------------------------------------------------------- -// KAccelPrivate +// TDEAccelPrivate //--------------------------------------------------------------------- -KAccelPrivate::KAccelPrivate( KAccel* pParent, TQWidget* pWatch ) -: KAccelBase( KAccelBase::QT_KEYS ) +TDEAccelPrivate::TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch ) +: TDEAccelBase( TDEAccelBase::QT_KEYS ) { - //kdDebug(125) << "KAccelPrivate::KAccelPrivate( pParent = " << pParent << " ): this = " << this << endl; + //kdDebug(125) << "TDEAccelPrivate::TDEAccelPrivate( pParent = " << pParent << " ): this = " << this << endl; m_pAccel = pParent; m_pWatch = pWatch; m_bAutoUpdate = true; connect( (TQAccel*)m_pAccel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotKeyPressed(int)) ); -#ifdef Q_WS_X11 //only makes sense if KAccelEventHandler is working +#ifdef Q_WS_X11 //only makes sense if TDEAccelEventHandler is working if( m_pWatch ) m_pWatch->installEventFilter( this ); #endif - KAccelEventHandler::self(); + TDEAccelEventHandler::self(); } -void KAccelPrivate::setEnabled( bool bEnabled ) +void TDEAccelPrivate::setEnabled( bool bEnabled ) { m_bEnabled = bEnabled; ((TQAccel*)m_pAccel)->setEnabled( bEnabled ); } -bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) { - kdDebug(125) << "KAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl; - KAccelAction* pAction = actionPtr( sAction ); + kdDebug(125) << "TDEAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl; + TDEAccelAction* pAction = actionPtr( sAction ); if( !pAction ) return false; if( pAction->isEnabled() == bEnable ) @@ -196,7 +196,7 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) pAction->setEnabled( bEnable ); - TQMap::const_iterator it = m_mapIDToAction.begin(); + TQMap::const_iterator it = m_mapIDToAction.begin(); for( ; it != m_mapIDToAction.end(); ++it ) { if( *it == pAction ) ((TQAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable ); @@ -204,32 +204,32 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) return true; } -bool KAccelPrivate::removeAction( const TQString& sAction ) +bool TDEAccelPrivate::removeAction( const TQString& sAction ) { // FIXME: getID() doesn't contains any useful // information! Use mapIDToAction. --ellis, 2/May/2002 - // Or maybe KAccelBase::remove() takes care of TQAccel indirectly... - KAccelAction* pAction = actions().actionPtr( sAction ); + // Or maybe TDEAccelBase::remove() takes care of TQAccel indirectly... + TDEAccelAction* pAction = actions().actionPtr( sAction ); if( pAction ) { int nID = pAction->getID(); //bool b = actions().removeAction( sAction ); - bool b = KAccelBase::remove( sAction ); + bool b = TDEAccelBase::remove( sAction ); ((TQAccel*)m_pAccel)->removeItem( nID ); return b; } else return false; } -bool KAccelPrivate::emitSignal( KAccelBase::Signal signal ) +bool TDEAccelPrivate::emitSignal( TDEAccelBase::Signal signal ) { - if( signal == KAccelBase::KEYCODE_CHANGED ) { + if( signal == TDEAccelBase::KEYCODE_CHANGED ) { m_pAccel->emitKeycodeChanged(); return true; } return false; } -bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { uint keyQt = key.keyCodeQt(); int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt ); @@ -246,23 +246,23 @@ bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ((TQAccel*)m_pAccel)->setItemEnabled( nID, false ); } - kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; + kdDebug(125) << "TDEAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; //kdDebug(125) << "m_pAccel = " << m_pAccel << endl; return nID != 0; } -bool KAccelPrivate::connectKey( const KKeyServer::Key& key ) +bool TDEAccelPrivate::connectKey( const KKeyServer::Key& key ) { uint keyQt = key.keyCodeQt(); int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt ); m_mapIDToKey[nID] = keyQt; - kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl; + kdDebug(125) << "TDEAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl; return nID != 0; } -bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { int keyQt = key.keyCodeQt(); TQMap::iterator it = m_mapIDToKey.begin(); @@ -270,7 +270,7 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& //kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << TQString::number(*it,16) << " == " << TQString::number(keyQt,16) << endl; if( *it == keyQt ) { int nID = it.key(); - kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; + kdDebug(125) << "TDEAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; ((TQAccel*)m_pAccel)->removeItem( nID ); m_mapIDToAction.remove( nID ); m_mapIDToKey.remove( it ); @@ -282,10 +282,10 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& return false; } -bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key ) +bool TDEAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { int keyQt = key.keyCodeQt(); - kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl; + kdDebug(125) << "TDEAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl; TQMap::iterator it = m_mapIDToKey.begin(); for( ; it != m_mapIDToKey.end(); ++it ) { if( *it == keyQt ) { @@ -299,9 +299,9 @@ bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key ) return false; } -void KAccelPrivate::slotKeyPressed( int id ) +void TDEAccelPrivate::slotKeyPressed( int id ) { - kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl; + kdDebug(125) << "TDEAccelPrivate::slotKeyPressed( " << id << " )" << endl; if( m_mapIDToKey.contains( id ) ) { KKey key = m_mapIDToKey[id]; @@ -326,14 +326,14 @@ void KAccelPrivate::slotKeyPressed( int id ) } } -void KAccelPrivate::slotShowMenu() +void TDEAccelPrivate::slotShowMenu() { } -void KAccelPrivate::slotMenuActivated( int iAction ) +void TDEAccelPrivate::slotMenuActivated( int iAction ) { - kdDebug(125) << "KAccelPrivate::slotMenuActivated( " << iAction << " )" << endl; - KAccelAction* pAction = actions().actionPtr( iAction ); + kdDebug(125) << "TDEAccelPrivate::slotMenuActivated( " << iAction << " )" << endl; + TDEAccelAction* pAction = actions().actionPtr( iAction ); #ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ if( pAction ) { connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() ); @@ -345,12 +345,12 @@ void KAccelPrivate::slotMenuActivated( int iAction ) #endif } -bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) +bool TDEAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) { if( pEvent->type() == TQEvent::AccelOverride && m_bEnabled ) { TQKeyEvent* pKeyEvent = (TQKeyEvent*) pEvent; KKey key( pKeyEvent ); - kdDebug(125) << "KAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl; + kdDebug(125) << "TDEAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl; int keyCodeQt = key.keyCodeQt(); TQMap::iterator it = m_mapIDToKey.begin(); for( ; it != m_mapIDToKey.end(); ++it ) { @@ -359,11 +359,11 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) kdDebug(125) << "shortcut found!" << endl; if( m_mapIDToAction.contains( nID ) ) { // TODO: reduce duplication between here and slotMenuActivated - KAccelAction* pAction = m_mapIDToAction[nID]; + TDEAccelAction* pAction = m_mapIDToAction[nID]; if( !pAction->isEnabled() ) continue; #ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ - TQGuardedPtr me = this; + TQGuardedPtr me = this; connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() ); emit menuItemActivated(); if (me) { @@ -376,7 +376,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) slotKeyPressed( nID ); pKeyEvent->accept(); - KAccelEventHandler::accelActivated( true ); + TDEAccelEventHandler::accelActivated( true ); return true; } } @@ -385,17 +385,17 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) } #ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ -void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction ) +void TDEAccelPrivate::emitActivatedSignal( TDEAccelAction* pAction ) { if( pAction ) { - TQGuardedPtr me = this; - TQRegExp reg( "([ ]*KAccelAction.*)" ); + TQGuardedPtr me = this; + TQRegExp reg( "([ ]*TDEAccelAction.*)" ); if( reg.search( pAction->methodSlotPtr()) >= 0 ) { - connect( this, TQT_SIGNAL(menuItemActivated(KAccelAction*)), + connect( this, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)), pAction->objSlotPtr(), pAction->methodSlotPtr() ); emit menuItemActivated( pAction ); if (me) - disconnect( me, TQT_SIGNAL(menuItemActivated(KAccelAction*)), + disconnect( me, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)), pAction->objSlotPtr(), pAction->methodSlotPtr() ); } else { connect( this, TQT_SIGNAL(menuItemActivated()), @@ -411,39 +411,39 @@ void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction ) #endif //--------------------------------------------------------------------- -// KAccel +// TDEAccel //--------------------------------------------------------------------- -KAccel::KAccel( TQWidget* pParent, const char* psName ) -: TQAccel( pParent, (psName) ? psName : "KAccel-TQAccel" ) +TDEAccel::TDEAccel( TQWidget* pParent, const char* psName ) +: TQAccel( pParent, (psName) ? psName : "TDEAccel-TQAccel" ) { - kdDebug(125) << "KAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; - d = new KAccelPrivate( this, pParent ); + kdDebug(125) << "TDEAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; + d = new TDEAccelPrivate( this, pParent ); } -KAccel::KAccel( TQWidget* watch, TQObject* pParent, const char* psName ) -: TQAccel( watch, pParent, (psName) ? psName : "KAccel-TQAccel" ) +TDEAccel::TDEAccel( TQWidget* watch, TQObject* pParent, const char* psName ) +: TQAccel( watch, pParent, (psName) ? psName : "TDEAccel-TQAccel" ) { - kdDebug(125) << "KAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; + kdDebug(125) << "TDEAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; if( !watch ) kdDebug(125) << kdBacktrace() << endl; - d = new KAccelPrivate( this, watch ); + d = new TDEAccelPrivate( this, watch ); } -KAccel::~KAccel() +TDEAccel::~TDEAccel() { - kdDebug(125) << "~KAccel(): this = " << this << endl; + kdDebug(125) << "~TDEAccel(): this = " << this << endl; delete d; } -KAccelActions& KAccel::actions() { return d->actions(); } -const KAccelActions& KAccel::actions() const { return d->actions(); } -bool KAccel::isEnabled() { return d->isEnabled(); } -void KAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } -bool KAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); } +TDEAccelActions& TDEAccel::actions() { return d->actions(); } +const TDEAccelActions& TDEAccel::actions() const { return d->actions(); } +bool TDEAccel::isEnabled() { return d->isEnabled(); } +void TDEAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } +bool TDEAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); } -KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef, +TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -453,8 +453,8 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c bConfigurable, bEnabled ); } -KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, +TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -464,7 +464,7 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c bConfigurable, bEnabled ); } -KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef, +TDEAccelAction* TDEAccel::insert( const char* psAction, const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -474,45 +474,45 @@ KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef, bConfigurable, bEnabled ); } -KAccelAction* KAccel::insert( KStdAccel::StdAccel id, +TDEAccelAction* TDEAccel::insert( TDEStdAccel::StdAccel id, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - TQString sAction = KStdAccel::name( id ); + TQString sAction = TDEStdAccel::name( id ); if( sAction.isEmpty() ) return 0; - KAccelAction* pAction = d->insert( sAction, KStdAccel::label( id ), KStdAccel::whatsThis( id ), - KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ), + TDEAccelAction* pAction = d->insert( sAction, TDEStdAccel::label( id ), TDEStdAccel::whatsThis( id ), + TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ), pObjSlot, psMethodSlot, bConfigurable, bEnabled ); if( pAction ) - pAction->setShortcut( KStdAccel::shortcut( id ) ); + pAction->setShortcut( TDEStdAccel::shortcut( id ) ); return pAction; } -bool KAccel::remove( const TQString& sAction ) +bool TDEAccel::remove( const TQString& sAction ) { return d->removeAction( sAction ); } -bool KAccel::updateConnections() +bool TDEAccel::updateConnections() { return d->updateConnections(); } -const KShortcut& KAccel::shortcut( const TQString& sAction ) const +const TDEShortcut& TDEAccel::shortcut( const TQString& sAction ) const { - const KAccelAction* pAction = actions().actionPtr( sAction ); - return (pAction) ? pAction->shortcut() : KShortcut::null(); + const TDEAccelAction* pAction = actions().actionPtr( sAction ); + return (pAction) ? pAction->shortcut() : TDEShortcut::null(); } -bool KAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) +bool TDEAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); } -bool KAccel::setEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccel::setEnabled( const TQString& sAction, bool bEnable ) { return d->setEnabled( sAction, bEnable ); } -bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut ) { - kdDebug(125) << "KAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl; - KAccelAction* pAction = actions().actionPtr( sAction ); + kdDebug(125) << "TDEAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl; + TDEAccelAction* pAction = actions().actionPtr( sAction ); if( pAction ) { if( pAction->shortcut() != cut ) return d->setShortcut( sAction, cut ); @@ -521,24 +521,24 @@ bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) return false; } -const TQString& KAccel::configGroup() const +const TQString& TDEAccel::configGroup() const { return d->configGroup(); } // for tdegames/ksirtet -void KAccel::setConfigGroup( const TQString& s ) +void TDEAccel::setConfigGroup( const TQString& s ) { d->setConfigGroup( s ); } -bool KAccel::readSettings( TDEConfigBase* pConfig ) +bool TDEAccel::readSettings( TDEConfigBase* pConfig ) { d->readSettings( pConfig ); return true; } -bool KAccel::writeSettings( TDEConfigBase* pConfig ) const +bool TDEAccel::writeSettings( TDEConfigBase* pConfig ) const { d->writeSettings( pConfig ); return true; } -void KAccel::emitKeycodeChanged() +void TDEAccel::emitKeycodeChanged() { - kdDebug(125) << "KAccel::emitKeycodeChanged()" << endl; + kdDebug(125) << "TDEAccel::emitKeycodeChanged()" << endl; emit keycodeChanged(); } @@ -547,11 +547,11 @@ void KAccel::emitKeycodeChanged() // Obsolete methods -- for backward compatibility //------------------------------------------------------------ -bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, +bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction, const char* cutsDef, int /*nIDMenu*/, TQPopupMenu *, bool bConfigurable ) { - KShortcut cut( cutsDef ); + TDEShortcut cut( cutsDef ); bool b = d->insert( sAction, sLabel, TQString::null, cut, cut, 0, 0, @@ -559,13 +559,13 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, return b; } -bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, +bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction, int key, int /*nIDMenu*/, TQPopupMenu*, bool bConfigurable ) { - KShortcut cut; + TDEShortcut cut; cut.init( TQKeySequence(key) ); - KAccelAction* pAction = d->insert( sAction, sLabel, TQString::null, + TDEAccelAction* pAction = d->insert( sAction, sLabel, TQString::null, cut, cut, 0, 0, bConfigurable ); @@ -573,20 +573,20 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, } // Used in tdeutils/kjots -bool KAccel::insertStdItem( KStdAccel::StdAccel id, const TQString& sLabel ) +bool TDEAccel::insertStdItem( TDEStdAccel::StdAccel id, const TQString& sLabel ) { - KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, TQString::null, - KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ), + TDEAccelAction* pAction = d->insert( TDEStdAccel::name( id ), sLabel, TQString::null, + TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ), 0, 0 ); if( pAction ) - pAction->setShortcut( KStdAccel::shortcut( id ) ); + pAction->setShortcut( TDEStdAccel::shortcut( id ) ); return true; } -bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate ) +bool TDEAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate ) { - kdDebug(125) << "KAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl; + kdDebug(125) << "TDEAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl; if( bActivate == false ) d->setActionEnabled( sAction, false ); bool b = setSlot( sAction, pObjSlot, psMethodSlot ); @@ -595,15 +595,15 @@ bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, con return b; } -bool KAccel::removeItem( const TQString& sAction ) +bool TDEAccel::removeItem( const TQString& sAction ) { return d->removeAction( sAction ); } -bool KAccel::setItemEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccel::setItemEnabled( const TQString& sAction, bool bEnable ) { return setEnabled( sAction, bEnable ); } -void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) +void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) { - KAccelAction* pAction = actions().actionPtr( action ); + TDEAccelAction* pAction = actions().actionPtr( action ); TQString s = menu->text( id ); if( !pAction || s.isEmpty() ) return; @@ -628,27 +628,27 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action menu->changeItem( s, id ); } -void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) +void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) { - changeMenuAccel( menu, id, KStdAccel::name( accel ) ); + changeMenuAccel( menu, id, TDEStdAccel::name( accel ) ); } -int KAccel::stringToKey( const TQString& sKey ) +int TDEAccel::stringToKey( const TQString& sKey ) { return KKey( sKey ).keyCodeQt(); } -int KAccel::currentKey( const TQString& sAction ) const +int TDEAccel::currentKey( const TQString& sAction ) const { - KAccelAction* pAction = d->actionPtr( sAction ); + TDEAccelAction* pAction = d->actionPtr( sAction ); if( pAction ) return pAction->shortcut().keyCodeQt(); return 0; } -TQString KAccel::findKey( int key ) const +TQString TDEAccel::findKey( int key ) const { - KAccelAction* pAction = d->actionPtr( KKey(key) ); + TDEAccelAction* pAction = d->actionPtr( KKey(key) ); if( pAction ) return pAction->name(); else @@ -656,7 +656,7 @@ TQString KAccel::findKey( int key ) const } #endif // !KDE_NO_COMPAT -void KAccel::virtual_hook( int, void* ) +void TDEAccel::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kaccel.moc" diff --git a/tdecore/kaccel.h b/tdecore/kaccel.h index 491fa39ce..8a3f2d499 100644 --- a/tdecore/kaccel.h +++ b/tdecore/kaccel.h @@ -27,11 +27,11 @@ class TQPopupMenu; // for obsolete insertItem() methods below class TQWidget; -class KAccelAction; -class KAccelActions; +class TDEAccelAction; +class TDEAccelActions; class TDEConfigBase; -class KAccelPrivate; +class TDEAccelPrivate; /** * Handle shortcuts. * @@ -39,17 +39,17 @@ class KAccelPrivate; * through application configuration files or through the * KKeyChooser GUI. * - * A KAccel contains a list of accelerator actions. + * A TDEAccel contains a list of accelerator actions. * * For example, CTRL+Key_P could be a shortcut for printing a document. The key * codes are listed in tqnamespace.h. "Print" could be the action name for printing. * The action name identifies the shortcut in configuration files and the * KKeyChooser GUI. * - * A KAccel object handles key events sent to its parent widget and to all - * children of this parent widget. The most recently created KAccel object - * has precedence over any KAccel objects created before it. - * When a shortcut pressed, KAccel calls the slot to which it has been + * A TDEAccel object handles key events sent to its parent widget and to all + * children of this parent widget. The most recently created TDEAccel object + * has precedence over any TDEAccel objects created before it. + * When a shortcut pressed, TDEAccel calls the slot to which it has been * connected. If you want to set global accelerators, independent of the window * which has the focus, use TDEGlobalAccel. * @@ -69,14 +69,14 @@ class KAccelPrivate; * The translated first argument for insertItem() is used only * in the configuration dialog. *\code - * KAccel* pAccel = new KAccel( this ); + * TDEAccel* pAccel = new TDEAccel( this ); * * // Insert an action "Scroll Up" which is associated with the "Up" key: * pAccel->insert( "Scroll Up", i18n("Scroll up"), * i18n("Scroll up the current document by one line."), * Qt::Key_Up, this, TQT_SLOT(slotScrollUp()) ); * // Insert an standard acclerator action. - * pAccel->insert( KStdAccel::Print, this, TQT_SLOT(slotPrint()) ); + * pAccel->insert( TDEStdAccel::Print, this, TQT_SLOT(slotPrint()) ); * * // Update the shortcuts by read any user-defined settings from the * // application's config file. @@ -85,56 +85,56 @@ class KAccelPrivate; * * @short Configurable shortcut support for widgets. * @see TDEGlobalAccel - * @see KAccelShortcutList + * @see TDEAccelShortcutList * @see KKeyChooser * @see KKeyDialog */ -class TDECORE_EXPORT KAccel : public TQAccel +class TDECORE_EXPORT TDEAccel : public TQAccel { Q_OBJECT public: /** - * Creates a new KAccel that watches @p pParent, which is also + * Creates a new TDEAccel that watches @p pParent, which is also * the QObject's parent. * * @param pParent the parent and widget to watch for key strokes * @param psName the name of the QObject */ - KAccel( TQWidget* pParent, const char* psName = 0 ); + TDEAccel( TQWidget* pParent, const char* psName = 0 ); /** - * Creates a new KAccel that watches @p watch. + * Creates a new TDEAccel that watches @p watch. * * @param watch the widget to watch for key strokes * @param parent the parent of the QObject * @param psName the name of the QObject */ - KAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 ); - virtual ~KAccel(); + TDEAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 ); + virtual ~TDEAccel(); /** * @internal - * Returns the KAccel's @p KAccelActions, a list of @p KAccelAction. - * @return the KAccelActions of the KAccel + * Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction. + * @return the TDEAccelActions of the TDEAccel */ - KAccelActions& actions(); + TDEAccelActions& actions(); /** * @internal - * Returns the KAccel's @p KAccelActions, a list of @p KAccelAction. - * @return the KAccelActions of the KAccel + * Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction. + * @return the TDEAccelActions of the TDEAccel */ - const KAccelActions& actions() const; + const TDEAccelActions& actions() const; /** - * Checks whether the KAccel is active. + * Checks whether the TDEAccel is active. * @return true if the TQAccel is enabled */ bool isEnabled(); /** - * Enables or disables the KAccel. + * Enables or disables the TDEAccel. * @param bEnabled true to enable, false to disable */ void setEnabled( bool bEnabled ); @@ -172,16 +172,16 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param bConfigurable Allow the user to change this shortcut if set to 'true'. * @param bEnabled The action will be activated by the shortcut if set to 'true'. */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); /** * Same as first insert(), but with separate shortcuts defined for * 3- and 4- modifier defaults. */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); /** @@ -201,16 +201,16 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param bConfigurable Allow the user to change this shortcut if set to 'true'. * @param bEnabled The action will be activated by the shortcut if set to 'true'. */ - KAccelAction* insert( const char* psAction, const KShortcut& cutDef, + TDEAccelAction* insert( const char* psAction, const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); /** * Similar to the first insert() method, but with the action * name, short description, help text, and default shortcuts all * set according to one of the standard accelerators. - * @see KStdAccel. + * @see TDEStdAccel. */ - KAccelAction* insert( KStdAccel::StdAccel id, + TDEAccelAction* insert( TDEStdAccel::StdAccel id, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); @@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param sAction the name of the action * @return the action's shortcut, or a null shortcut if not found */ - const KShortcut& shortcut( const TQString& sAction ) const; + const TDEShortcut& shortcut( const TQString& sAction ) const; /** * Set the shortcut to be associated with the action named by @p sAction. @@ -245,7 +245,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param shortcut the shortcut to set * @return true if successful, false otherwise */ - bool setShortcut( const TQString& sAction, const KShortcut &shortcut ); + bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut ); /** * Set the slot to be called when the shortcut of the action named @@ -329,7 +329,7 @@ class TDECORE_EXPORT KAccel : public TQAccel /** * @deprecated use insert */ - bool insertStdItem( KStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED; + bool insertStdItem( TDEStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED; /** * @deprecated use insert */ @@ -338,7 +338,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * @deprecated use insert( accel, pObjSlot, psMethodSlot ); * */ - KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot ) + KDE_DEPRECATED bool connectItem( TDEStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot ) { return insert( accel, pObjSlot, psMethodSlot ); } /** * @deprecated use remove @@ -355,7 +355,7 @@ class TDECORE_EXPORT KAccel : public TQAccel /** * @deprecated see KDE3PORTING.html */ - void changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED; + void changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) KDE_DEPRECATED; /** * @deprecated */ @@ -383,8 +383,8 @@ class TDECORE_EXPORT KAccel : public TQAccel /** \internal */ virtual void virtual_hook( int id, void* data ); private: - class KAccelPrivate* d; - friend class KAccelPrivate; + class TDEAccelPrivate* d; + friend class TDEAccelPrivate; }; #endif // _KACCEL_H diff --git a/tdecore/kaccelaction.cpp b/tdecore/kaccelaction.cpp index 34448fe90..d3ec59be3 100644 --- a/tdecore/kaccelaction.cpp +++ b/tdecore/kaccelaction.cpp @@ -21,7 +21,7 @@ */ #include "kaccelaction.h" -#include "kaccelbase.h" // for KAccelBase::slotRemoveAction() & emitSignal() +#include "kaccelbase.h" // for TDEAccelBase::slotRemoveAction() & emitSignal() #include @@ -34,19 +34,19 @@ #include //--------------------------------------------------------------------- -// KAccelAction +// TDEAccelAction //--------------------------------------------------------------------- -class KAccelActionPrivate +class TDEAccelActionPrivate { public: uint m_nConnections; }; -KAccelAction::KAccelAction() +TDEAccelAction::TDEAccelAction() { - //kdDebug(125) << "KAccelAction(): this = " << this << endl; - d = new KAccelActionPrivate; + //kdDebug(125) << "TDEAccelAction(): this = " << this << endl; + d = new TDEAccelActionPrivate; m_pObjSlot = 0; m_psMethodSlot = 0; m_bConfigurable = true; @@ -55,33 +55,33 @@ KAccelAction::KAccelAction() d->m_nConnections = 0; } -KAccelAction::KAccelAction( const KAccelAction& action ) +TDEAccelAction::TDEAccelAction( const TDEAccelAction& action ) { - //kdDebug(125) << "KAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl; - d = new KAccelActionPrivate; + //kdDebug(125) << "TDEAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl; + d = new TDEAccelActionPrivate; *this = action; } -KAccelAction::KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, +TDEAccelAction::TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - //kdDebug(125) << "KAccelAction( \"" << sName << "\" ): this = " << this << endl; - d = new KAccelActionPrivate; + //kdDebug(125) << "TDEAccelAction( \"" << sName << "\" ): this = " << this << endl; + d = new TDEAccelActionPrivate; init( sName, sLabel, sWhatsThis, cutDef3, cutDef4, pObjSlot, psMethodSlot, bConfigurable, bEnabled ); } -KAccelAction::~KAccelAction() +TDEAccelAction::~TDEAccelAction() { - //kdDebug(125) << "\t\t\tKAccelAction::~KAccelAction( \"" << m_sName << "\" ): this = " << this << endl; + //kdDebug(125) << "\t\t\tTDEAccelAction::~TDEAccelAction( \"" << m_sName << "\" ): this = " << this << endl; delete d; } -void KAccelAction::clear() +void TDEAccelAction::clear() { m_cut.clear(); m_pObjSlot = 0; @@ -92,8 +92,8 @@ void KAccelAction::clear() d->m_nConnections = 0; } -bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, +bool TDEAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -110,11 +110,11 @@ bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQ m_cut = shortcutDefault(); d->m_nConnections = 0; if( !m_bEnabled ) - kdDebug(125) << "KAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl; + kdDebug(125) << "TDEAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl; return true; } -KAccelAction& KAccelAction::operator =( const KAccelAction& action ) +TDEAccelAction& TDEAccelAction::operator =( const TDEAccelAction& action ) { m_sName = action.m_sName; m_sLabel = action.m_sLabel; @@ -132,37 +132,37 @@ KAccelAction& KAccelAction::operator =( const KAccelAction& action ) return *this; } -void KAccelAction::setName( const TQString& s ) +void TDEAccelAction::setName( const TQString& s ) { m_sName = s; } -void KAccelAction::setLabel( const TQString& s ) +void TDEAccelAction::setLabel( const TQString& s ) { m_sLabel = s; } -void KAccelAction::setWhatsThis( const TQString& s ) +void TDEAccelAction::setWhatsThis( const TQString& s ) { m_sWhatsThis = s; } -bool KAccelAction::setShortcut( const KShortcut& cut ) +bool TDEAccelAction::setShortcut( const TDEShortcut& cut ) { m_cut = cut; return true; } -void KAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot ) +void TDEAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot ) { m_pObjSlot = pObjSlot; m_psMethodSlot = psMethodSlot; } -void KAccelAction::setConfigurable( bool b ) +void TDEAccelAction::setConfigurable( bool b ) { m_bConfigurable = b; } -void KAccelAction::setEnabled( bool b ) +void TDEAccelAction::setEnabled( bool b ) { m_bEnabled = b; } -TQString KAccelAction::toString() const +TQString TDEAccelAction::toString() const { return m_cut.toString(); } -TQString KAccelAction::toStringInternal() const +TQString TDEAccelAction::toStringInternal() const { return m_cut.toStringInternal( &shortcutDefault() ); } -bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq ) +bool TDEAccelAction::setKeySequence( uint i, const KKeySequence& seq ) { if( i < m_cut.count() ) { m_cut.setSeq( i, seq ); @@ -172,12 +172,12 @@ bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq ) return false; } -void KAccelAction::clearShortcut() +void TDEAccelAction::clearShortcut() { m_cut.clear(); } -bool KAccelAction::contains( const KKeySequence& seq ) +bool TDEAccelAction::contains( const KKeySequence& seq ) { return m_cut.contains( seq ); for( uint i = 0; i < m_cut.count(); i++ ) { @@ -187,90 +187,90 @@ bool KAccelAction::contains( const KKeySequence& seq ) return false; } -const KShortcut& KAccelAction::shortcutDefault() const +const TDEShortcut& TDEAccelAction::shortcutDefault() const { return (useFourModifierKeys()) ? m_cutDefault4 : m_cutDefault3; } -bool KAccelAction::isConnected() const +bool TDEAccelAction::isConnected() const { return d->m_nConnections; } -void KAccelAction::incConnections() +void TDEAccelAction::incConnections() { d->m_nConnections++; } -void KAccelAction::decConnections() +void TDEAccelAction::decConnections() { if( d->m_nConnections > 0 ) d->m_nConnections--; } // Indicate whether to default to the 3- or 4- modifier keyboard schemes -int KAccelAction::g_bUseFourModifierKeys = -1; +int TDEAccelAction::g_bUseFourModifierKeys = -1; -bool KAccelAction::useFourModifierKeys() +bool TDEAccelAction::useFourModifierKeys() { - if( KAccelAction::g_bUseFourModifierKeys == -1 ) { + if( TDEAccelAction::g_bUseFourModifierKeys == -1 ) { // Read in whether to use 4 modifier keys TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); bool b = TDEGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false ); - KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); + TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); } - return KAccelAction::g_bUseFourModifierKeys == 1; + return TDEAccelAction::g_bUseFourModifierKeys == 1; } -void KAccelAction::useFourModifierKeys( bool b ) +void TDEAccelAction::useFourModifierKeys( bool b ) { - if( KAccelAction::g_bUseFourModifierKeys != (int)b ) { - KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); + if( TDEAccelAction::g_bUseFourModifierKeys != (int)b ) { + TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); // If we're 'turning off' the meta key or, if we're turning it on, // the keyboard must actually have a meta key. if( b && !KKeyNative::keyboardHasWinKey() ) kdDebug(125) << "Tried to use four modifier keys on a keyboard layout without a Meta key.\n"; } TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); - TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true); + TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", TDEAccelAction::g_bUseFourModifierKeys, true, true); - kdDebug(125) << "bUseFourModifierKeys = " << KAccelAction::g_bUseFourModifierKeys << endl; + kdDebug(125) << "bUseFourModifierKeys = " << TDEAccelAction::g_bUseFourModifierKeys << endl; } //--------------------------------------------------------------------- -// KAccelActions +// TDEAccelActions //--------------------------------------------------------------------- -class KAccelActionsPrivate +class TDEAccelActionsPrivate { public: }; -KAccelActions::KAccelActions() +TDEAccelActions::TDEAccelActions() { - kdDebug(125) << "KAccelActions(): this = " << this << endl; + kdDebug(125) << "TDEAccelActions(): this = " << this << endl; initPrivate( 0 ); } -KAccelActions::KAccelActions( const KAccelActions& actions ) +TDEAccelActions::TDEAccelActions( const TDEAccelActions& actions ) { - kdDebug(125) << "KAccelActions( actions = " << &actions << " ): this = " << this << endl; + kdDebug(125) << "TDEAccelActions( actions = " << &actions << " ): this = " << this << endl; initPrivate( 0 ); init( actions ); } -KAccelActions::KAccelActions( KAccelBase* pKAccelBase ) +TDEAccelActions::TDEAccelActions( TDEAccelBase* pTDEAccelBase ) { - kdDebug(125) << "KAccelActions( KAccelBase = " << pKAccelBase << " ): this = " << this << endl; - initPrivate( pKAccelBase ); + kdDebug(125) << "TDEAccelActions( TDEAccelBase = " << pTDEAccelBase << " ): this = " << this << endl; + initPrivate( pTDEAccelBase ); } -KAccelActions::~KAccelActions() +TDEAccelActions::~TDEAccelActions() { - //kdDebug(125) << "KAccelActions::~KAccelActions(): this = " << this << endl; + //kdDebug(125) << "TDEAccelActions::~TDEAccelActions(): this = " << this << endl; clear(); //delete d; } -void KAccelActions::initPrivate( KAccelBase* pKAccelBase ) +void TDEAccelActions::initPrivate( TDEAccelBase* pTDEAccelBase ) { - m_pKAccelBase = pKAccelBase; + m_pTDEAccelBase = pTDEAccelBase; m_nSizeAllocated = m_nSize = 0; m_prgActions = 0; - //d = new KAccelActionsPrivate; + //d = new TDEAccelActionsPrivate; } -void KAccelActions::clear() +void TDEAccelActions::clear() { - kdDebug(125) << "\tKAccelActions::clear()" << endl; + kdDebug(125) << "\tTDEAccelActions::clear()" << endl; for( uint i = 0; i < m_nSize; i++ ) delete m_prgActions[i]; delete[] m_prgActions; @@ -279,14 +279,14 @@ void KAccelActions::clear() m_prgActions = 0; } -bool KAccelActions::init( const KAccelActions& actions ) +bool TDEAccelActions::init( const TDEAccelActions& actions ) { clear(); resize( actions.count() ); for( uint i = 0; i < m_nSize; i++ ) { - KAccelAction* pAction = actions.m_prgActions[i]; + TDEAccelAction* pAction = actions.m_prgActions[i]; if( pAction ) - m_prgActions[i] = new KAccelAction( *pAction ); + m_prgActions[i] = new TDEAccelAction( *pAction ); else m_prgActions[i] = 0; } @@ -294,22 +294,22 @@ bool KAccelActions::init( const KAccelActions& actions ) return true; } -bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) +bool TDEAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) { - kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl; + kdDebug(125) << "TDEAccelActions::init( " << sGroup << " )" << endl; TQMap mapEntry = config.entryMap( sGroup ); resize( mapEntry.count() ); TQMap::Iterator it( mapEntry.begin() ); for( uint i = 0; it != mapEntry.end(); ++it, i++ ) { TQString sShortcuts = *it; - KShortcut cuts; + TDEShortcut cuts; kdDebug(125) << it.key() << " = " << sShortcuts << endl; if( !sShortcuts.isEmpty() && sShortcuts != "none" ) cuts.init( sShortcuts ); - m_prgActions[i] = new KAccelAction( it.key(), it.key(), it.key(), + m_prgActions[i] = new TDEAccelAction( it.key(), it.key(), it.key(), cuts, cuts, 0, 0, // pObjSlot, psMethodSlot, true, false ); // bConfigurable, bEnabled @@ -318,11 +318,11 @@ bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) return true; } -void KAccelActions::resize( uint nSize ) +void TDEAccelActions::resize( uint nSize ) { if( nSize > m_nSizeAllocated ) { uint nSizeAllocated = ((nSize/10) + 1) * 10; - KAccelAction** prgActions = new KAccelAction* [nSizeAllocated]; + TDEAccelAction** prgActions = new TDEAccelAction* [nSizeAllocated]; // Copy pointers over to new array for( uint i = 0; i < m_nSizeAllocated; i++ ) @@ -340,21 +340,21 @@ void KAccelActions::resize( uint nSize ) m_nSize = nSize; } -void KAccelActions::insertPtr( KAccelAction* pAction ) +void TDEAccelActions::insertPtr( TDEAccelAction* pAction ) { resize( m_nSize + 1 ); m_prgActions[m_nSize-1] = pAction; } -void KAccelActions::updateShortcuts( KAccelActions& actions2 ) +void TDEAccelActions::updateShortcuts( TDEAccelActions& actions2 ) { - kdDebug(125) << "KAccelActions::updateShortcuts()" << endl; + kdDebug(125) << "TDEAccelActions::updateShortcuts()" << endl; bool bChanged = false; for( uint i = 0; i < m_nSize; i++ ) { - KAccelAction* pAction = m_prgActions[i]; + TDEAccelAction* pAction = m_prgActions[i]; if( pAction && pAction->m_bConfigurable ) { - KAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName ); + TDEAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName ); if( pAction2 ) { TQString sOld = pAction->m_cut.toStringInternal(); pAction->m_cut = pAction2->m_cut; @@ -371,68 +371,68 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 ) emitKeycodeChanged(); } -int KAccelActions::actionIndex( const TQString& sAction ) const +int TDEAccelActions::actionIndex( const TQString& sAction ) const { for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) - kdWarning(125) << "KAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; + kdWarning(125) << "TDEAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; else if( m_prgActions[i]->m_sName == sAction ) return (int) i; } return -1; } -KAccelAction* KAccelActions::actionPtr( uint i ) +TDEAccelAction* TDEAccelActions::actionPtr( uint i ) { return m_prgActions[i]; } -const KAccelAction* KAccelActions::actionPtr( uint i ) const +const TDEAccelAction* TDEAccelActions::actionPtr( uint i ) const { return m_prgActions[i]; } -KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) +TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction ) { int i = actionIndex( sAction ); return (i >= 0) ? m_prgActions[i] : 0; } -const KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) const +const TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction ) const { int i = actionIndex( sAction ); return (i >= 0) ? m_prgActions[i] : 0; } -KAccelAction* KAccelActions::actionPtr( KKeySequence cut ) +TDEAccelAction* TDEAccelActions::actionPtr( KKeySequence cut ) { for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) - kdWarning(125) << "KAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; + kdWarning(125) << "TDEAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; else if( m_prgActions[i]->contains( cut ) ) return m_prgActions[i]; } return 0; } -KAccelAction& KAccelActions::operator []( uint i ) +TDEAccelAction& TDEAccelActions::operator []( uint i ) { return *actionPtr( i ); } -const KAccelAction& KAccelActions::operator []( uint i ) const +const TDEAccelAction& TDEAccelActions::operator []( uint i ) const { return *actionPtr( i ); } -KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLabel ) +TDEAccelAction* TDEAccelActions::insert( const TQString& sName, const TQString& sLabel ) { if( actionPtr( sName ) ) { - kdWarning(125) << "KAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl; + kdWarning(125) << "TDEAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl; return 0; } - KAccelAction* pAction = new KAccelAction; + TDEAccelAction* pAction = new TDEAccelAction; pAction->m_sName = sName; pAction->m_sLabel = sLabel; pAction->m_bConfigurable = false; @@ -442,38 +442,38 @@ KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLab return pAction; } -KAccelAction* KAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, +TDEAccelAction* TDEAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - //kdDebug(125) << "KAccelActions::insert()2 begin" << endl; + //kdDebug(125) << "TDEAccelActions::insert()2 begin" << endl; if( actionPtr( sAction ) ) { - kdWarning(125) << "KAccelActions::insert( " << sAction << " ): action with same name already present." << endl; + kdWarning(125) << "TDEAccelActions::insert( " << sAction << " ): action with same name already present." << endl; return 0; } - KAccelAction* pAction = new KAccelAction( + TDEAccelAction* pAction = new TDEAccelAction( sAction, sLabel, sWhatsThis, rgCutDefaults3, rgCutDefaults4, pObjSlot, psMethodSlot, bConfigurable, bEnabled ); insertPtr( pAction ); - //kdDebug(125) << "KAccelActions::insert()2 end" << endl; + //kdDebug(125) << "TDEAccelActions::insert()2 end" << endl; return pAction; } -bool KAccelActions::remove( const TQString& sAction ) +bool TDEAccelActions::remove( const TQString& sAction ) { - kdDebug(125) << "KAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pKAccelBase = " << m_pKAccelBase << endl; + kdDebug(125) << "TDEAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pTDEAccelBase = " << m_pTDEAccelBase << endl; int iAction = actionIndex( sAction ); if( iAction < 0 ) return false; - if( m_pKAccelBase ) - m_pKAccelBase->slotRemoveAction( m_prgActions[iAction] ); + if( m_pTDEAccelBase ) + m_pTDEAccelBase->slotRemoveAction( m_prgActions[iAction] ); delete m_prgActions[iAction]; for( uint i = iAction; i < m_nSize - 1; i++ ) @@ -483,39 +483,39 @@ bool KAccelActions::remove( const TQString& sAction ) return true; } -bool KAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - KAccelShortcutList accelList(*this, false); + TDEAccelShortcutList accelList(*this, false); return accelList.readSettings( sConfigGroup, pConfig ); } /* - 1) KAccelAction = "Something" + 1) TDEAccelAction = "Something" 1) KKeySequence = "Meta+X,Asterisk" - 1) KAccelSequence = "Meta+X" + 1) TDEAccelSequence = "Meta+X" 1) KKeySequence = Meta+X - 2) KAccelSequence = "Asterisk" + 2) TDEAccelSequence = "Asterisk" 1) KKeySequence = Shift+8 (English layout) 2) KKeySequence = Keypad_Asterisk 2) KKeySequence = "Alt+F2" - 1) KAccelSequence = "Alt+F2" + 1) TDEAccelSequence = "Alt+F2" 1) KKeySequence = Alt+F2 -> "Something=Meta+X,Asterisk;Alt+F2" */ -bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig, +bool TDEAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const { - kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; + kdDebug(125) << "TDEAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); TDEConfigGroupSaver cs( pConfig, sGroup ); for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) { - kdWarning(125) << "KAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl; + kdWarning(125) << "TDEAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl; continue; } - const KAccelAction& action = *m_prgActions[i]; + const TDEAccelAction& action = *m_prgActions[i]; TQString s; bool bConfigHasAction = !pConfig->readEntry( action.m_sName ).isEmpty(); @@ -555,11 +555,11 @@ bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig return true; } -void KAccelActions::emitKeycodeChanged() +void TDEAccelActions::emitKeycodeChanged() { - if( m_pKAccelBase ) - m_pKAccelBase->emitSignal( KAccelBase::KEYCODE_CHANGED ); + if( m_pTDEAccelBase ) + m_pTDEAccelBase->emitSignal( TDEAccelBase::KEYCODE_CHANGED ); } -uint KAccelActions::count() const +uint TDEAccelActions::count() const { return m_nSize; } diff --git a/tdecore/kaccelaction.h b/tdecore/kaccelaction.h index 9cca25d4a..809533ff8 100644 --- a/tdecore/kaccelaction.h +++ b/tdecore/kaccelaction.h @@ -27,7 +27,7 @@ #include -class KAccelBase; +class TDEAccelBase; class TQObject; class TDEConfig; @@ -35,27 +35,27 @@ class TDEConfigBase; /** * @internal - * A KAccelAction prepresents an action that can be executed using - * an accelerator key. Each KAccelAction has a name, a label, a - * "What's this" string and a KShortcut. The user can configure and + * A TDEAccelAction prepresents an action that can be executed using + * an accelerator key. Each TDEAccelAction has a name, a label, a + * "What's this" string and a TDEShortcut. The user can configure and * enable/disable them using KKeyDialog. * * \code - * 1) KAccelAction = "Run Command" + * 1) TDEAccelAction = "Run Command" * Default3 = "Alt+F2" * Default4 = "Meta+Enter;Alt+F2" - * 1) KShortcut = "Meta+Enter" + * 1) TDEShortcut = "Meta+Enter" * 1) KKeySequence = "Meta+Enter" * 1) KKey = "Meta+Enter" * 1) Meta+Enter * 2) Meta+Keypad_Enter - * 2) KShortcut = "Alt+F2" + * 2) TDEShortcut = "Alt+F2" * 1) KKeySequence = "Alt+F2" * 1) Alt+F2 - * 2) KAccelAction = "Something" + * 2) TDEAccelAction = "Something" * Default3 = "" * Default4 = "" - * 1) KShortcut = "Meta+X,Asterisk" + * 1) TDEShortcut = "Meta+X,Asterisk" * 1) KKeySequence = "Meta+X,Asterisk" * 1) KKey = "Meta+X" * 1) Meta+X @@ -64,27 +64,27 @@ class TDEConfigBase; * 2) Keypad_Asterisk * \endcode * @short An accelerator action - * @see KAccel + * @see TDEAccel * @see TDEGlobalAccel * @see KKeyChooser * @see KKeyDialog */ -class TDECORE_EXPORT KAccelAction +class TDECORE_EXPORT TDEAccelAction { public: /** - * Creates an empty KAccelAction. + * Creates an empty TDEAccelAction. * @see clear() */ - KAccelAction(); + TDEAccelAction(); /** * Copy constructor. */ - KAccelAction( const KAccelAction& ); + TDEAccelAction( const TDEAccelAction& ); /** - * Creates a new KAccelAction. + * Creates a new TDEAccelAction. * @param sName the name of the accelerator * @param sLabel the label of the accelerator (i18n!) * @param sWhatsThis the What's This text (18n!) @@ -97,11 +97,11 @@ class TDECORE_EXPORT KAccelAction * @param bConfigurable if true the user can configure the shortcut * @param bEnabled true if the accelerator should be enabled */ - KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ); - ~KAccelAction(); + ~TDEAccelAction(); /** * Clears the accelerator. @@ -109,7 +109,7 @@ class TDECORE_EXPORT KAccelAction void clear(); /** - * Re-initialized the KAccelAction. + * Re-initialized the TDEAccelAction. * @param sName the name of the accelerator * @param sLabel the label of the accelerator (i18n!) * @param sWhatsThis the What's This text (18n!) @@ -124,14 +124,14 @@ class TDECORE_EXPORT KAccelAction * @return true if successful, false otherwise */ bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ); /** - * Copies this KAccelAction. + * Copies this TDEAccelAction. */ - KAccelAction& operator=( const KAccelAction& ); + TDEAccelAction& operator=( const TDEAccelAction& ); /** * Returns the name of the accelerator action. @@ -156,10 +156,10 @@ class TDECORE_EXPORT KAccelAction /** * The shortcut that is actually used (may be used configured). - * @return the shortcut of the KAccelAction, can be null if not set + * @return the shortcut of the TDEAccelAction, can be null if not set * @see shortcutDefault() */ - const KShortcut& shortcut() const { return m_cut; } + const TDEShortcut& shortcut() const { return m_cut; } /** * The default shortcut for this system. @@ -168,7 +168,7 @@ class TDECORE_EXPORT KAccelAction * @see shortcutDefault3() * @see shortcutDefault4() */ - const KShortcut& shortcutDefault() const; + const TDEShortcut& shortcutDefault() const; /** * The default shortcut for 3 modifier systems. @@ -178,7 +178,7 @@ class TDECORE_EXPORT KAccelAction * @see shortcutDefault4() * @see useFourModifierKeys() */ - const KShortcut& shortcutDefault3() const { return m_cutDefault3; } + const TDEShortcut& shortcutDefault3() const { return m_cutDefault3; } /** * The default shortcut for 4 modifier systems. @@ -188,7 +188,7 @@ class TDECORE_EXPORT KAccelAction * @see shortcutDefault3() * @see useFourModifierKeys() */ - const KShortcut& shortcutDefault4() const { return m_cutDefault4; } + const TDEShortcut& shortcutDefault4() const { return m_cutDefault4; } /** * Returns the receiver of signals. @@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccelAction * @param rgCuts the shortcut to set * @return true if successful, false otherwise */ - bool setShortcut( const KShortcut& rgCuts ); + bool setShortcut( const TDEShortcut& rgCuts ); /** * Sets the slot of the accelerator action. @@ -284,14 +284,14 @@ class TDECORE_EXPORT KAccelAction * @param i the position of the sequence * @param keySeq the new new sequence * @return true if successful, false otherwise - * @see KShortcut::setSeq() + * @see TDEShortcut::setSeq() */ bool setKeySequence( uint i, const KKeySequence &keySeq ); /** * Clears the action's shortcut. It will not contain any sequences after * calling this method. - * @see KShortcut::clear() + * @see TDEShortcut::clear() */ void clearShortcut(); @@ -299,14 +299,14 @@ class TDECORE_EXPORT KAccelAction * Checks whether the action's shortcut contains the given key sequence. * @param keySeq the key sequence to check * @return true if the shortcut contains the given sequence - * @see KShortcut::contains() + * @see TDEShortcut::contains() */ bool contains( const KKeySequence &keySeq ); /** * Returns the string representation of the action's shortcut. * @return the string representation of the action's shortcut. - * @see KShortcut::toString() + * @see TDEShortcut::toString() */ TQString toString() const; @@ -332,8 +332,8 @@ class TDECORE_EXPORT KAccelAction TQString m_sName /**< Name of accel. @sa setName() */, m_sLabel /**< Label of accel. User-visible. */, m_sWhatsThis /**< WhatsThis help for accel. User-visible. */; - KShortcut m_cut /**< Shortcut actually assigned. */; - KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */, + TDEShortcut m_cut /**< Shortcut actually assigned. */; + TDEShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */, m_cutDefault4 /**< Default shortcur in 4-modifier layout */; const TQObject* m_pObjSlot /**< Object we will send signals to. */; const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */; @@ -349,36 +349,36 @@ class TDECORE_EXPORT KAccelAction private: static int g_bUseFourModifierKeys; - class KAccelActionPrivate* d; + class TDEAccelActionPrivate* d; - friend class KAccelActions; - friend class KAccelBase; + friend class TDEAccelActions; + friend class TDEAccelBase; }; //--------------------------------------------------------------------- -// KAccelActions +// TDEAccelActions //--------------------------------------------------------------------- /** * @internal - * This class represents a collection of KAccelAction objects. + * This class represents a collection of TDEAccelAction objects. * * @short A collection of accelerator actions - * @see KAccelAction + * @see TDEAccelAction */ -class TDECORE_EXPORT KAccelActions +class TDECORE_EXPORT TDEAccelActions { public: /** - * Creates a new, empty KAccelActions object. + * Creates a new, empty TDEAccelActions object. */ - KAccelActions(); + TDEAccelActions(); /** * Copy constructor (deep copy). */ - KAccelActions( const KAccelActions& ); - virtual ~KAccelActions(); + TDEAccelActions( const TDEAccelActions& ); + virtual ~TDEAccelActions(); /** * Removes all items from this collection. @@ -391,7 +391,7 @@ class TDECORE_EXPORT KAccelActions * @param actions the actions to copy * @return true if successful, false otherwise */ - bool init( const KAccelActions &actions ); + bool init( const TDEAccelActions &actions ); /** * Loads the actions from the given configuration file. @@ -408,7 +408,7 @@ class TDECORE_EXPORT KAccelActions * @param shortcuts the collection that contains the new * shortcuts */ - void updateShortcuts( KAccelActions &shortcuts ); + void updateShortcuts( TDEAccelActions &shortcuts ); /** * Retrieves the index of the action with the given name. @@ -421,63 +421,63 @@ class TDECORE_EXPORT KAccelActions * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see count() */ - KAccelAction* actionPtr( uint index ); + TDEAccelAction* actionPtr( uint index ); /** * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see count() */ - const KAccelAction* actionPtr( uint index ) const; + const TDEAccelAction* actionPtr( uint index ) const; /** * Returns the action with the given name. * @param sAction the name of the action to search - * @return the KAccelAction with the given name, or 0 + * @return the TDEAccelAction with the given name, or 0 * if not found */ - KAccelAction* actionPtr( const TQString& sAction ); + TDEAccelAction* actionPtr( const TQString& sAction ); /** * Returns the action with the given name. * @param sAction the name of the action to search - * @return the KAccelAction with the given name, or 0 + * @return the TDEAccelAction with the given name, or 0 * if not found */ - const KAccelAction* actionPtr( const TQString& sAction ) const; + const TDEAccelAction* actionPtr( const TQString& sAction ) const; /** * Returns the action with the given key sequence. * @param cut the sequence to search for - * @return the KAccelAction with the given sequence, or 0 + * @return the TDEAccelAction with the given sequence, or 0 * if not found */ - KAccelAction* actionPtr( KKeySequence cut ); + TDEAccelAction* actionPtr( KKeySequence cut ); /** * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see actionPtr() * @see count() */ - KAccelAction& operator []( uint index ); + TDEAccelAction& operator []( uint index ); /** * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see actionPtr() * @see count() */ - const KAccelAction& operator []( uint index ) const; + const TDEAccelAction& operator []( uint index ) const; /** * Inserts an action into the collection. @@ -494,8 +494,8 @@ class TDECORE_EXPORT KAccelActions * @param bEnabled if true the accelerator should be enabled * @return the new action */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot = 0, const char* psMethodSlot = 0, bool bConfigurable = true, bool bEnabled = true ); @@ -505,7 +505,7 @@ class TDECORE_EXPORT KAccelActions * @param sLabel the label of the accelerator (i18n!) * @return the new action */ - KAccelAction* insert( const TQString& sName, const TQString& sLabel ); + TDEAccelAction* insert( const TQString& sName, const TQString& sLabel ); /** * Removes the given action. @@ -548,9 +548,9 @@ class TDECORE_EXPORT KAccelActions protected: /** Base object that proxies signals from us. */ - KAccelBase* m_pKAccelBase; + TDEAccelBase* m_pTDEAccelBase; /** Array of actions we're hanging on to. */ - KAccelAction** m_prgActions; + TDEAccelAction** m_prgActions; uint m_nSizeAllocated /**< Allocated size of the array. */, m_nSize /**< Amount in use. */ ; @@ -561,16 +561,16 @@ class TDECORE_EXPORT KAccelActions */ void resize( uint new_size ); /** Add a action to this collection. @todo Document ownership. */ - void insertPtr( KAccelAction* ); + void insertPtr( TDEAccelAction* ); private: - class KAccelActionsPrivate* d; + class TDEAccelActionsPrivate* d; - KAccelActions( KAccelBase* ); - void initPrivate( KAccelBase* ); - KAccelActions& operator =( KAccelActions& ); + TDEAccelActions( TDEAccelBase* ); + void initPrivate( TDEAccelBase* ); + TDEAccelActions& operator =( TDEAccelActions& ); - friend class KAccelBase; + friend class TDEAccelBase; }; #endif // _KACCELACTION_H diff --git a/tdecore/kaccelbase.cpp b/tdecore/kaccelbase.cpp index 75810b2e3..235803134 100644 --- a/tdecore/kaccelbase.cpp +++ b/tdecore/kaccelbase.cpp @@ -36,17 +36,17 @@ #include "kshortcutmenu.h" //--------------------------------------------------------------------- -// class KAccelBase::ActionInfo +// class TDEAccelBase::ActionInfo //--------------------------------------------------------------------- //--------------------------------------------------------------------- -// class KAccelBase +// class TDEAccelBase //--------------------------------------------------------------------- -KAccelBase::KAccelBase( int fInitCode ) +TDEAccelBase::TDEAccelBase( int fInitCode ) : m_rgActions( this ) { - kdDebug(125) << "KAccelBase(): this = " << this << endl; + kdDebug(125) << "TDEAccelBase(): this = " << this << endl; m_bNativeKeys = fInitCode & NATIVE_KEYS; m_bEnabled = true; m_sConfigGroup = "Shortcuts"; @@ -55,27 +55,27 @@ KAccelBase::KAccelBase( int fInitCode ) mtemp_pActionRemoving = 0; } -KAccelBase::~KAccelBase() +TDEAccelBase::~TDEAccelBase() { - kdDebug(125) << "~KAccelBase(): this = " << this << endl; + kdDebug(125) << "~TDEAccelBase(): this = " << this << endl; } -uint KAccelBase::actionCount() const { return m_rgActions.count(); } -KAccelActions& KAccelBase::actions() { return m_rgActions; } -bool KAccelBase::isEnabled() const { return m_bEnabled; } +uint TDEAccelBase::actionCount() const { return m_rgActions.count(); } +TDEAccelActions& TDEAccelBase::actions() { return m_rgActions; } +bool TDEAccelBase::isEnabled() const { return m_bEnabled; } // see TDEGlobalAccel::blockShortcuts() stuff - it's to temporarily block // all global shortcuts, so that the key grabs are released, but from the app's // point of view the TDEGlobalAccel is still enabled, so TDEGlobalAccel needs // to disable key grabbing even if enabled -bool KAccelBase::isEnabledInternal() const { return isEnabled(); } +bool TDEAccelBase::isEnabledInternal() const { return isEnabled(); } -KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) +TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction ) { return m_rgActions.actionPtr( sAction ); } -const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const +const TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction ) const { return m_rgActions.actionPtr( sAction ); } -KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key ) +TDEAccelAction* TDEAccelBase::actionPtr( const KKeyServer::Key& key ) { if( !m_mapKeyToAction.contains( key ) ) return 0; @@ -83,25 +83,25 @@ KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key ) return m_mapKeyToAction[key].pAction; } -KAccelAction* KAccelBase::actionPtr( const KKey& key ) +TDEAccelAction* TDEAccelBase::actionPtr( const KKey& key ) { KKeyServer::Key k2; k2.init( key, !m_bNativeKeys ); return actionPtr( k2 ); } -void KAccelBase::setConfigGroup( const TQString& sConfigGroup ) +void TDEAccelBase::setConfigGroup( const TQString& sConfigGroup ) { m_sConfigGroup = sConfigGroup; } -void KAccelBase::setConfigGlobal( bool global ) +void TDEAccelBase::setConfigGlobal( bool global ) { m_bConfigIsGlobal = global; } -bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccelBase::setActionEnabled( const TQString& sAction, bool bEnable ) { - KAccelAction* pAction = actionPtr( sAction ); + TDEAccelAction* pAction = actionPtr( sAction ); if( pAction ) { if( pAction->m_bEnabled != bEnable ) { - kdDebug(125) << "KAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl; + kdDebug(125) << "TDEAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl; pAction->m_bEnabled = bEnable; if( m_bAutoUpdate ) { // FIXME: the action may already have it's connections inserted! @@ -116,9 +116,9 @@ bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable ) return false; } -bool KAccelBase::setAutoUpdate( bool bAuto ) +bool TDEAccelBase::setAutoUpdate( bool bAuto ) { - kdDebug(125) << "KAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl; + kdDebug(125) << "TDEAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl; bool b = m_bAutoUpdate; if( !m_bAutoUpdate && bAuto ) updateConnections(); @@ -126,13 +126,13 @@ bool KAccelBase::setAutoUpdate( bool bAuto ) return b; } -KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, +TDEAccelAction* TDEAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - //kdDebug(125) << "KAccelBase::insert() begin" << endl; - KAccelAction* pAction = m_rgActions.insert( + //kdDebug(125) << "TDEAccelBase::insert() begin" << endl; + TDEAccelAction* pAction = m_rgActions.insert( sAction, sDesc, sHelp, rgCutDefaults3, rgCutDefaults4, pObjSlot, psMethodSlot, @@ -141,27 +141,27 @@ KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc if( pAction && m_bAutoUpdate ) insertConnection( pAction ); - //kdDebug(125) << "KAccelBase::insert() end" << endl; + //kdDebug(125) << "TDEAccelBase::insert() end" << endl; return pAction; } -KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc ) +TDEAccelAction* TDEAccelBase::insert( const TQString& sName, const TQString& sDesc ) { return m_rgActions.insert( sName, sDesc ); } -bool KAccelBase::remove( const TQString& sAction ) +bool TDEAccelBase::remove( const TQString& sAction ) { return m_rgActions.remove( sAction ); } -void KAccelBase::slotRemoveAction( KAccelAction* pAction ) +void TDEAccelBase::slotRemoveAction( TDEAccelAction* pAction ) { removeConnection( pAction ); } -bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) +bool TDEAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { - kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n"; - KAccelAction* pAction = m_rgActions.actionPtr( sAction ); + kdDebug(125) << "TDEAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n"; + TDEAccelAction* pAction = m_rgActions.actionPtr( sAction ); if( pAction ) { // If there was a previous connection, remove it. if( m_bAutoUpdate && pAction->isConnected() ) { @@ -182,24 +182,24 @@ bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlo } /* -KAccelBase +TDEAccelBase Run Command=Meta+Enter;Alt+F2 - KAccelAction = "Run Command" - 1) KAccelKeySeries = "Meta+Enter" + TDEAccelAction = "Run Command" + 1) TDEAccelKeySeries = "Meta+Enter" 1a) Meta+Enter 1b) Meta+Keypad_Enter - 2) KAccelKeySeries = "Alt+F2" + 2) TDEAccelKeySeries = "Alt+F2" 1a) Alt+F2 Konqueror=Meta+I,I - KAccelAction = "Konqueror" - 1) KAccelKeySeries = "Meta+I,I" + TDEAccelAction = "Konqueror" + 1) TDEAccelKeySeries = "Meta+I,I" 1a) Meta+I 2a) I Something=Meta+Asterisk,X - KAccelAction = "Something" - 1) KAccelKeySeries = "Meta+Asterisk,X" + TDEAccelAction = "Something" + 1) TDEAccelKeySeries = "Meta+Asterisk,X" 1a) Meta+Shift+8 1b) Meta+Keypad_8 2a) X @@ -215,25 +215,25 @@ connect new key sequences /* { For { - for( KAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) { - KAccelAction& action = *itAction; - for( KAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) { - KAccelSeries& series = *itSeries; + for( TDEAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) { + TDEAccelAction& action = *itAction; + for( TDEAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) { + TDEAccelSeries& series = *itSeries; if( } } } Sort by: iVariation, iSequence, iSeries, iAction - 1) KAccelAction = "Run Command" - 1) KAccelKeySeries = "Meta+Enter" + 1) TDEAccelAction = "Run Command" + 1) TDEAccelKeySeries = "Meta+Enter" 1a) Meta+Enter 1b) Meta+Keypad_Enter - 2) KAccelKeySeries = "Alt+F2" + 2) TDEAccelKeySeries = "Alt+F2" 1a) Alt+F2 - 2) KAccelAction = "Enter Calculation" - 1) KAccelKeySeries = "Meta+Keypad_Enter" + 2) TDEAccelAction = "Enter Calculation" + 1) TDEAccelKeySeries = "Meta+Keypad_Enter" 1a) Meta+Keypad_Enter List = @@ -246,7 +246,7 @@ connect new key sequences */ #ifdef Q_WS_X11 -struct KAccelBase::X +struct TDEAccelBase::X { uint iAction, iSeq, iVari; KKeyServer::Key key; @@ -312,10 +312,10 @@ struct KAccelBase::X Ctrl+KP_Add => #2 */ -bool KAccelBase::updateConnections() +bool TDEAccelBase::updateConnections() { #ifdef Q_WS_X11 - kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl; + kdDebug(125) << "TDEAccelBase::updateConnections() this = " << this << endl; // Retrieve the list of keys to be connected, sorted by priority. // (key, variation, seq) TQValueVector rgKeys; @@ -356,7 +356,7 @@ bool KAccelBase::updateConnections() if( bNonUnique ) { // Remove connection to single action if there is one if( m_mapKeyToAction.contains( key ) ) { - KAccelAction* pAction = m_mapKeyToAction[key].pAction; + TDEAccelAction* pAction = m_mapKeyToAction[key].pAction; if( pAction ) { m_mapKeyToAction.remove( key ); disconnectKey( *pAction, key ); @@ -376,7 +376,7 @@ bool KAccelBase::updateConnections() // Disconnect keys which no longer have bindings: for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) { const KKeyServer::Key& key = it.key(); - KAccelAction* pAction = (*it).pAction; + TDEAccelAction* pAction = (*it).pAction; // If this key is longer used or it points to a different action now, if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) { if( pAction ) { @@ -392,7 +392,7 @@ bool KAccelBase::updateConnections() // new action map, but which are _not_ present in the old one. for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) { const KKeyServer::Key& key = it.key(); - KAccelAction* pAction = (*it).pAction; + TDEAccelAction* pAction = (*it).pAction; if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) { // TODO: Decide what to do if connect fails. // Probably should remove this item from map. @@ -419,16 +419,16 @@ bool KAccelBase::updateConnections() #ifdef Q_WS_X11 // Construct a list of keys to be connected, sorted highest priority first. -void KAccelBase::createKeyList( TQValueVector& rgKeys ) +void TDEAccelBase::createKeyList( TQValueVector& rgKeys ) { - //kdDebug(125) << "KAccelBase::createKeyList()" << endl; + //kdDebug(125) << "TDEAccelBase::createKeyList()" << endl; if( !isEnabledInternal()) return; // create the list // For each action for( uint iAction = 0; iAction < m_rgActions.count(); iAction++ ) { - KAccelAction* pAction = m_rgActions.actionPtr( iAction ); + TDEAccelAction* pAction = m_rgActions.actionPtr( iAction ); if( pAction && pAction->m_pObjSlot && pAction->m_psMethodSlot && pAction != mtemp_pActionRemoving ) { // For each key sequence associated with action for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) { @@ -453,12 +453,12 @@ void KAccelBase::createKeyList( TQValueVector& rgKeys ) } #endif //Q_WS_X11 -bool KAccelBase::insertConnection( KAccelAction* pAction ) +bool TDEAccelBase::insertConnection( TDEAccelAction* pAction ) { if( !pAction->m_pObjSlot || !pAction->m_psMethodSlot ) return true; - kdDebug(125) << "KAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl; + kdDebug(125) << "TDEAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl; // For each sequence associated with the given action: for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) { @@ -502,7 +502,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) } //kdDebug(125) << "\tActions = " << m_rgActions.size() << endl; - //for( KAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) { + //for( TDEAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) { // kdDebug(125) << "\t" << &(*it) << " '" << (*it).m_sName << "'" << endl; //} @@ -516,9 +516,9 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) return true; } -bool KAccelBase::removeConnection( KAccelAction* pAction ) +bool TDEAccelBase::removeConnection( TDEAccelAction* pAction ) { - kdDebug(125) << "KAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl; + kdDebug(125) << "TDEAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl; //for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) // kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl; @@ -548,9 +548,9 @@ bool KAccelBase::removeConnection( KAccelAction* pAction ) return true; } -bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEAccelBase::setShortcut( const TQString& sAction, const TDEShortcut& cut ) { - KAccelAction* pAction = actionPtr( sAction ); + TDEAccelAction* pAction = actionPtr( sAction ); if( pAction ) { if( m_bAutoUpdate ) removeConnection( pAction ); @@ -564,26 +564,26 @@ bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut ) return false; } -void KAccelBase::readSettings( TDEConfigBase* pConfig ) +void TDEAccelBase::readSettings( TDEConfigBase* pConfig ) { m_rgActions.readActions( m_sConfigGroup, pConfig ); if( m_bAutoUpdate ) updateConnections(); } -void KAccelBase::writeSettings( TDEConfigBase* pConfig ) const +void TDEAccelBase::writeSettings( TDEConfigBase* pConfig ) const { m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal ); } -TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq ) +TQPopupMenu* TDEAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq ) { - KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq ); + TDEShortcutMenu* pMenu = new TDEShortcutMenu( pParent, &actions(), seq ); bool bActionInserted = false; bool bInsertSeparator = false; for( uint i = 0; i < actionCount(); i++ ) { - const KAccelAction* pAction = actions().actionPtr( i ); + const TDEAccelAction* pAction = actions().actionPtr( i ); if( !pAction->isEnabled() ) continue; diff --git a/tdecore/kaccelbase.h b/tdecore/kaccelbase.h index 132a6aa5c..3d7180c4f 100644 --- a/tdecore/kaccelbase.h +++ b/tdecore/kaccelbase.h @@ -42,7 +42,7 @@ class TQWidget; * key bindings through application configuration files or through the * KKeyChooser GUI. * - * A KAccel contains a list of accelerator items. Each accelerator item + * A TDEAccel contains a list of accelerator items. Each accelerator item * consists of an action name and a keyboard code combined with modifiers * (Shift, Ctrl and Alt.) * @@ -55,7 +55,7 @@ class TQWidget; * connected. Accelerator items can be connected so that a key will activate * two different slots. * - * A KAccel object handles key events sent to its parent widget and to all + * A TDEAccel object handles key events sent to its parent widget and to all * children of this parent widget. * * Key binding reconfiguration during run time can be prevented by specifying @@ -74,33 +74,33 @@ class TQWidget; * The translated first argument for insertItem() is used only * in the configuration dialog. *\code - * KAccel *a = new KAccel( myWindow ); + * TDEAccel *a = new TDEAccel( myWindow ); * // Insert an action "Scroll Up" which is associated with the "Up" key: * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" ); * // Insert an action "Scroll Down" which is not associated with any key: * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0); * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) ); - * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it + * // a->insertStdItem( TDEStdAccel::Print ); //not necessary, since it * // is done automatially with the * // connect below! - * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) ); + * a->connectItem(TDEStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) ); * * a->readSettings(); *\endcode * * If a shortcut has a menu entry as well, you could insert them like - * this. The example is again the KStdAccel::Print from above. + * this. The example is again the TDEStdAccel::Print from above. * * \code * int id; * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc())); - * a->changeMenuAccel(popup, id, KStdAccel::Print ); + * a->changeMenuAccel(popup, id, TDEStdAccel::Print ); * \endcode * * If you want a somewhat "exotic" name for your standard print action, like * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc())); * it might be a good idea to insert the standard action before as - * a->insertStdItem( KStdAccel::Print, i18n("Print Document") ) + * a->insertStdItem( TDEStdAccel::Print, i18n("Print Document") ) * as well, so that the user can easily find the corresponding function. * * This technique works for other actions as well. Your "scroll up" function @@ -118,10 +118,10 @@ class TQWidget; * @short Configurable key binding support. */ -class TDECORE_EXPORT KAccelBase +class TDECORE_EXPORT TDEAccelBase { public: - /** Initialization mode of the KAccelBase, used in constructor. */ + /** Initialization mode of the TDEAccelBase, used in constructor. */ enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 }; /** Enum for kinds of signals which may be emitted. */ @@ -130,32 +130,32 @@ class TDECORE_EXPORT KAccelBase /** Constructor. @p fInitCode should be a bitwise OR of * values from the Init enum. */ - KAccelBase( int fInitCode ); - virtual ~KAccelBase(); + TDEAccelBase( int fInitCode ); + virtual ~TDEAccelBase(); /** Returns number of actions in this handler. */ uint actionCount() const; /** Returns a list of all the actions in this handler. */ - KAccelActions& actions(); + TDEAccelActions& actions(); /** Returns whether this accelerator handler is enabled or not. */ bool isEnabled() const; - /** Returns a pointer to the KAccelAction named @p sAction. */ - KAccelAction* actionPtr( const TQString& sAction ); + /** Returns a pointer to the TDEAccelAction named @p sAction. */ + TDEAccelAction* actionPtr( const TQString& sAction ); /** Const version of the above. */ - const KAccelAction* actionPtr( const TQString& sAction ) const; - /** Returns a pointer to the KAccelAction associated with + const TDEAccelAction* actionPtr( const TQString& sAction ) const; + /** Returns a pointer to the TDEAccelAction associated with * the key @p key. This function takes into account the * key mapping defined in the constructor. * * May return 0 if no (or more than one) * action is associated with the key. */ - KAccelAction* actionPtr( const KKey& key ); + TDEAccelAction* actionPtr( const KKey& key ); /** Basically the same as above, except a KKeyServer::Key * already has a key mapping defined (either NATIVE_KEYS or not). */ - KAccelAction* actionPtr( const KKeyServer::Key& key ); + TDEAccelAction* actionPtr( const KKeyServer::Key& key ); /** Returns the name of the configuration group these * accelerators are stored in. The default is "Shortcuts". @@ -181,10 +181,10 @@ class TDECORE_EXPORT KAccelBase // Procedures for manipulating Actions. //void clearActions(); - KAccelAction* insert( const TQString& sName, const TQString& sDesc ); - KAccelAction* insert( + TDEAccelAction* insert( const TQString& sName, const TQString& sDesc ); + TDEAccelAction* insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); bool remove( const TQString& sAction ); @@ -192,7 +192,7 @@ class TDECORE_EXPORT KAccelBase bool updateConnections(); - bool setShortcut( const TQString& sAction, const KShortcut& cut ); + bool setShortcut( const TQString& sAction, const TDEShortcut& cut ); // Modify individual Action sub-items bool setActionEnabled( const TQString& sAction, bool bEnable ); @@ -218,7 +218,7 @@ class TDECORE_EXPORT KAccelBase // Protected methods protected: - void slotRemoveAction( KAccelAction* ); + void slotRemoveAction( TDEAccelAction* ); struct X; @@ -226,8 +226,8 @@ class TDECORE_EXPORT KAccelBase * @param rgKeys constructed list of keys */ void createKeyList( TQValueVector& rgKeys ); - bool insertConnection( KAccelAction* ); - bool removeConnection( KAccelAction* ); + bool insertConnection( TDEAccelAction* ); + bool removeConnection( TDEAccelAction* ); /** Emits a signal. * @param signal signal to be emitted @@ -237,14 +237,14 @@ class TDECORE_EXPORT KAccelBase * @param action action to be executed when key is pressed * @param key key which causes the action to be executed */ - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ) = 0; + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) = 0; /** Defines a key which activates the accelerator * @param key key which causes the action to be executed */ virtual bool connectKey( const KKeyServer::Key& key) = 0; /** Removes the key from accelerator so it no longer executes the action */ - virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0; + virtual bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& ) = 0; /** Removes the key from accelerator */ virtual bool disconnectKey( const KKeyServer::Key& ) = 0; @@ -253,30 +253,30 @@ class TDECORE_EXPORT KAccelBase virtual bool isEnabledInternal() const; struct ActionInfo { - KAccelAction* pAction; + TDEAccelAction* pAction; uint iSeq, iVariation; //ActionInfo* pInfoNext; // nil if only one action uses this key. ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; } - ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation ) + ActionInfo( TDEAccelAction* _pAction, uint _iSeq, uint _iVariation ) { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; } }; typedef TQMap KKeyToActionMap; - KAccelActions m_rgActions; + TDEAccelActions m_rgActions; KKeyToActionMap m_mapKeyToAction; - TQValueList m_rgActionsNonUnique; + TQValueList m_rgActionsNonUnique; bool m_bNativeKeys; // Use native key codes instead of Qt codes bool m_bEnabled; bool m_bConfigIsGlobal; TQString m_sConfigGroup; bool m_bAutoUpdate; - KAccelAction* mtemp_pActionRemoving; + TDEAccelAction* mtemp_pActionRemoving; private: - KAccelBase& operator =( const KAccelBase& ); + TDEAccelBase& operator =( const TDEAccelBase& ); - friend class KAccelActions; + friend class TDEAccelActions; }; #endif // _KACCELBASE_H diff --git a/tdecore/kaccelmanager.cpp b/tdecore/kaccelmanager.cpp index 6c2233c81..9ac4dbdae 100644 --- a/tdecore/kaccelmanager.cpp +++ b/tdecore/kaccelmanager.cpp @@ -63,7 +63,7 @@ /********************************************************************* - class KAcceleratorManagerPrivate - internal helper class + class TDEAcceleratorManagerPrivate - internal helper class This class does all the work to find accelerators for a hierarchy of widgets. @@ -71,7 +71,7 @@ *********************************************************************/ -class KAcceleratorManagerPrivate +class TDEAcceleratorManagerPrivate { public: @@ -79,7 +79,7 @@ public: static bool programmers_mode; static bool standardName(const TQString &str); - static bool checkChange(const KAccelString &as) { + static bool checkChange(const TDEAccelString &as) { TQString t2 = as.accelerated(); TQString t1 = as.originalText(); if (t1 != t2) @@ -125,7 +125,7 @@ private: void addChild(Item *item); TQWidget *m_widget; - KAccelString m_content; + TDEAccelString m_content; ItemList *m_children; int m_index; @@ -133,28 +133,28 @@ private: }; -bool KAcceleratorManagerPrivate::programmers_mode = false; -TQString KAcceleratorManagerPrivate::changed_string; -TQString KAcceleratorManagerPrivate::added_string; -TQString KAcceleratorManagerPrivate::removed_string; +bool TDEAcceleratorManagerPrivate::programmers_mode = false; +TQString TDEAcceleratorManagerPrivate::changed_string; +TQString TDEAcceleratorManagerPrivate::added_string; +TQString TDEAcceleratorManagerPrivate::removed_string; static TQStringList *kaccmp_sns = 0; static KStaticDeleter kaccmp_sns_d; -TQMap KAcceleratorManagerPrivate::ignored_widgets; +TQMap TDEAcceleratorManagerPrivate::ignored_widgets; -bool KAcceleratorManagerPrivate::standardName(const TQString &str) +bool TDEAcceleratorManagerPrivate::standardName(const TQString &str) { if (!kaccmp_sns) kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames())); return kaccmp_sns->contains(str); } -KAcceleratorManagerPrivate::Item::~Item() +TDEAcceleratorManagerPrivate::Item::~Item() { delete m_children; } -void KAcceleratorManagerPrivate::Item::addChild(Item *item) +void TDEAcceleratorManagerPrivate::Item::addChild(Item *item) { if (!m_children) { m_children = new ItemList; @@ -164,7 +164,7 @@ void KAcceleratorManagerPrivate::Item::addChild(Item *item) m_children->append(item); } -void KAcceleratorManagerPrivate::manage(TQWidget *widget) +void TDEAcceleratorManagerPrivate::manage(TQWidget *widget) { if (!widget) { @@ -175,7 +175,7 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget) if (dynamic_cast(widget)) { // create a popup accel manager that can deal with dynamic menus - KPopupAccelManager::manage(static_cast(widget)); + TDEPopupAccelManager::manage(static_cast(widget)); return; } @@ -189,13 +189,13 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget) } -void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used) +void TDEAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used) { if (!item->m_children) return; // collect the contents - KAccelStringList contents; + TDEAccelStringList contents; for (Item *it = item->m_children->first(); it != 0; it = item->m_children->next()) { @@ -203,7 +203,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use } // find the right accelerators - KAccelManagerAlgorithm::findAccelerators(contents, used); + TDEAccelManagerAlgorithm::findAccelerators(contents, used); // write them back into the widgets int cnt = -1; @@ -261,7 +261,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use } -void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) +void TDEAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) { TQObjectList *childList = widget->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false); for ( TQObject *it = childList->first(); it; it = childList->next() ) @@ -271,7 +271,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast(w) == NULL ) ) continue; - if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() ) + if ( TDEAcceleratorManagerPrivate::ignored_widgets.find( w ) != TDEAcceleratorManagerPrivate::ignored_widgets.end() ) continue; manageWidget(w, item); @@ -279,7 +279,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) delete childList; } -void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) +void TDEAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) { // first treat the special cases @@ -301,7 +301,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) if (popupMenu) { // create a popup accel manager that can deal with dynamic menus - KPopupAccelManager::manage(popupMenu); + TDEPopupAccelManager::manage(popupMenu); return; } @@ -368,26 +368,26 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) i->m_widget = w; // put some more weight on the usual action elements - int weight = KAccelManagerAlgorithm::DEFAULT_WEIGHT; + int weight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT; if (dynamic_cast(w) || dynamic_cast(w) || dynamic_cast(w) || dynamic_cast(w)) - weight = KAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT; + weight = TDEAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT; // don't put weight on group boxes, as usually the contents are more important if (dynamic_cast(w)) - weight = KAccelManagerAlgorithm::GROUP_BOX_WEIGHT; + weight = TDEAccelManagerAlgorithm::GROUP_BOX_WEIGHT; // put a lot of extra weight on the KDialogBaseButton's if (w->inherits("KDialogBaseButton")) - weight += KAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT; + weight += TDEAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT; - i->m_content = KAccelString(content, weight); + i->m_content = TDEAccelString(content, weight); item->addChild(i); } } traverseChildren(w, item); } -void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item) +void TDEAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item) { for (int i=0; icount(); i++) { @@ -399,11 +399,11 @@ void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item) item->addChild(it); it->m_widget = bar; it->m_index = i; - it->m_content = KAccelString(content); + it->m_content = TDEAccelString(content); } } -void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) +void TDEAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) { TQMenuItem *mitem; TQString s; @@ -424,9 +424,9 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) Item *it = new Item; item->addChild(it); it->m_content = - KAccelString(s, + TDEAccelString(s, // menu titles are important, so raise the weight - KAccelManagerAlgorithm::MENU_TITLE_WEIGHT); + TDEAccelManagerAlgorithm::MENU_TITLE_WEIGHT); it->m_widget = mbar; it->m_index = i; @@ -434,49 +434,49 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) // have a look at the popup as well, if present if (mitem->popup()) - KPopupAccelManager::manage(mitem->popup()); + TDEPopupAccelManager::manage(mitem->popup()); } } /********************************************************************* - class KAcceleratorManager - main entry point + class TDEAcceleratorManager - main entry point This class is just here to provide a clean public API... *********************************************************************/ -void KAcceleratorManager::manage(TQWidget *widget) +void TDEAcceleratorManager::manage(TQWidget *widget) { - KAcceleratorManager::manage(widget, false); + TDEAcceleratorManager::manage(widget, false); } -void KAcceleratorManager::manage(TQWidget *widget, bool programmers_mode) +void TDEAcceleratorManager::manage(TQWidget *widget, bool programmers_mode) { - kdDebug(131) << "KAcceleratorManager::manage\n"; - KAcceleratorManagerPrivate::changed_string = TQString::null; - KAcceleratorManagerPrivate::added_string = TQString::null; - KAcceleratorManagerPrivate::removed_string = TQString::null; - KAcceleratorManagerPrivate::programmers_mode = programmers_mode; - KAcceleratorManagerPrivate::manage(widget); + kdDebug(131) << "TDEAcceleratorManager::manage\n"; + TDEAcceleratorManagerPrivate::changed_string = TQString::null; + TDEAcceleratorManagerPrivate::added_string = TQString::null; + TDEAcceleratorManagerPrivate::removed_string = TQString::null; + TDEAcceleratorManagerPrivate::programmers_mode = programmers_mode; + TDEAcceleratorManagerPrivate::manage(widget); } -void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed) +void TDEAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed) { - added = KAcceleratorManagerPrivate::added_string; - changed = KAcceleratorManagerPrivate::changed_string; - removed = KAcceleratorManagerPrivate::removed_string; + added = TDEAcceleratorManagerPrivate::added_string; + changed = TDEAcceleratorManagerPrivate::changed_string; + removed = TDEAcceleratorManagerPrivate::removed_string; } /********************************************************************* - class KAccelString - a string with weighted characters + class TDEAccelString - a string with weighted characters *********************************************************************/ -KAccelString::KAccelString(const TQString &input, int initialWeight) +TDEAccelString::TDEAccelString(const TQString &input, int initialWeight) : m_pureText(input), m_weight() { m_orig_accel = m_pureText.find("(!)&"); @@ -495,7 +495,7 @@ KAccelString::KAccelString(const TQString &input, int initialWeight) m_orig_accel = m_accel = stripAccelerator(m_pureText); if (initialWeight == -1) - initialWeight = KAccelManagerAlgorithm::DEFAULT_WEIGHT; + initialWeight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT; calculateWeights(initialWeight); @@ -503,13 +503,13 @@ KAccelString::KAccelString(const TQString &input, int initialWeight) } -TQString KAccelString::accelerated() const +TQString TDEAccelString::accelerated() const { TQString result = m_origText; if (result.isEmpty()) return result; - if (KAcceleratorManagerPrivate::programmers_mode) + if (TDEAcceleratorManagerPrivate::programmers_mode) { if (m_accel != m_orig_accel) { int oa = m_orig_accel; @@ -532,7 +532,7 @@ TQString KAccelString::accelerated() const } -TQChar KAccelString::accelerator() const +TQChar TDEAccelString::accelerator() const { if ((m_accel < 0) || (m_accel > (int)m_pureText.length())) return TQChar(); @@ -541,7 +541,7 @@ TQChar KAccelString::accelerator() const } -void KAccelString::calculateWeights(int initialWeight) +void TDEAccelString::calculateWeights(int initialWeight) { m_weight.resize(m_pureText.length()); @@ -556,12 +556,12 @@ void KAccelString::calculateWeights(int initialWeight) // add special weight to first character if (pos == 0) - weight += KAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT; + weight += TDEAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT; // add weight to word beginnings if (start_character) { - weight += KAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT; + weight += TDEAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT; start_character = false; } @@ -571,10 +571,10 @@ void KAccelString::calculateWeights(int initialWeight) // try to preserve the wanted accelarators if ((int)pos == accel()) { - weight += KAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT; - // kdDebug(131) << "wanted " << m_pureText << " " << KAcceleratorManagerPrivate::standardName(m_origText) << endl; - if (KAcceleratorManagerPrivate::standardName(m_origText)) { - weight += KAccelManagerAlgorithm::STANDARD_ACCEL; + weight += TDEAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT; + // kdDebug(131) << "wanted " << m_pureText << " " << TDEAcceleratorManagerPrivate::standardName(m_origText) << endl; + if (TDEAcceleratorManagerPrivate::standardName(m_origText)) { + weight += TDEAccelManagerAlgorithm::STANDARD_ACCEL; } } @@ -592,7 +592,7 @@ void KAccelString::calculateWeights(int initialWeight) } -int KAccelString::stripAccelerator(TQString &text) +int TDEAccelString::stripAccelerator(TQString &text) { // Note: this code is derived from TQAccel::shortcutKey int p = 0; @@ -621,7 +621,7 @@ int KAccelString::stripAccelerator(TQString &text) } -int KAccelString::maxWeight(int &index, const TQString &used) +int TDEAccelString::maxWeight(int &index, const TQString &used) { int max = 0; index = -1; @@ -638,7 +638,7 @@ int KAccelString::maxWeight(int &index, const TQString &used) } -void KAccelString::dump() +void TDEAccelString::dump() { TQString s; for (uint i=0; ipopup()) - KPopupAccelManager::manage(mitem->popup()); + TDEPopupAccelManager::manage(mitem->popup()); } } -void KPopupAccelManager::setMenuEntries(const KAccelStringList &list) +void TDEPopupAccelManager::setMenuEntries(const TDEAccelStringList &list) { TQMenuItem *mitem; @@ -817,18 +817,18 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list) if (mitem->isSeparator()) continue; - if (KAcceleratorManagerPrivate::checkChange(list[cnt])) + if (TDEAcceleratorManagerPrivate::checkChange(list[cnt])) mitem->setText(list[cnt].accelerated()); cnt++; } } -void KPopupAccelManager::manage(TQPopupMenu *popup) +void TDEPopupAccelManager::manage(TQPopupMenu *popup) { // don't add more than one manager to a popup - if (popup->child(0, "KPopupAccelManager", false) == 0 ) - new KPopupAccelManager(popup); + if (popup->child(0, "TDEPopupAccelManager", false) == 0 ) + new TDEPopupAccelManager(popup); } void QWidgetStackAccelManager::manage( TQWidgetStack *stack ) @@ -847,7 +847,7 @@ QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack) bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e ) { if ( e->type() == TQEvent::Show && tqApp->activeWindow() ) { - KAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) ); + TDEAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) ); watched->removeEventFilter( this ); } return false; @@ -864,9 +864,9 @@ void QWidgetStackAccelManager::aboutToShow(TQWidget *child) child->installEventFilter( this ); } -void KAcceleratorManager::setNoAccel( TQWidget *widget ) +void TDEAcceleratorManager::setNoAccel( TQWidget *widget ) { - KAcceleratorManagerPrivate::ignored_widgets[widget] = 1; + TDEAcceleratorManagerPrivate::ignored_widgets[widget] = 1; } #include "kaccelmanager_private.moc" diff --git a/tdecore/kaccelmanager.h b/tdecore/kaccelmanager.h index 29304803b..03ee627b3 100644 --- a/tdecore/kaccelmanager.h +++ b/tdecore/kaccelmanager.h @@ -37,7 +37,7 @@ class TQString; * @since 3.1 */ -class TDECORE_EXPORT KAcceleratorManager +class TDECORE_EXPORT TDEAcceleratorManager { public: @@ -69,7 +69,7 @@ public: * * TODO KDE4: merge with the above * @param widget The toplevel widget you want to manage. - * @param programmers_mode if true, KAcceleratorManager adds (&) for removed + * @param programmers_mode if true, TDEAcceleratorManager adds (&) for removed * accels and & before added accels */ static void manage(TQWidget *widget, bool programmers_mode); diff --git a/tdecore/kaccelmanager_private.h b/tdecore/kaccelmanager_private.h index e931b7e3e..ed401801e 100644 --- a/tdecore/kaccelmanager_private.h +++ b/tdecore/kaccelmanager_private.h @@ -39,12 +39,12 @@ class TQWidgetStack; * @author Matthias Hoelzer-Kluepfel */ -class KAccelString +class TDEAccelString { public: - KAccelString() : m_pureText(), m_accel(-1) {} - KAccelString(const TQString &input, int initalWeight=-1); + TDEAccelString() : m_pureText(), m_accel(-1) {} + TDEAccelString(const TQString &input, int initalWeight=-1); void calculateWeights(int initialWeight); @@ -61,7 +61,7 @@ public: int maxWeight(int &index, const TQString &used); - bool operator == (const KAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; } + bool operator == (const TDEAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; } private: @@ -77,7 +77,7 @@ private: }; -typedef TQValueList KAccelStringList; +typedef TQValueList TDEAccelStringList; /** @@ -87,7 +87,7 @@ typedef TQValueList KAccelStringList; * @author Matthias Hoelzer-Kluepfel */ -class KAccelManagerAlgorithm +class TDEAccelManagerAlgorithm { public: @@ -114,7 +114,7 @@ public: }; /// Method to call to find the best distribution of accelerators. - static void findAccelerators(KAccelStringList &result, TQString &used); + static void findAccelerators(TDEAccelStringList &result, TQString &used); }; @@ -131,7 +131,7 @@ class TQPopupMenu; * @author Matthias Hoelzer-Kluepfel */ -class KPopupAccelManager : public TQObject +class TDEPopupAccelManager : public TQObject { Q_OBJECT @@ -142,7 +142,7 @@ public: protected: - KPopupAccelManager(TQPopupMenu *popup); + TDEPopupAccelManager(TQPopupMenu *popup); private slots: @@ -154,11 +154,11 @@ private: void calculateAccelerators(); - void findMenuEntries(KAccelStringList &list); - void setMenuEntries(const KAccelStringList &list); + void findMenuEntries(TDEAccelStringList &list); + void setMenuEntries(const TDEAccelStringList &list); TQPopupMenu *m_popup; - KAccelStringList m_entries; + TDEAccelStringList m_entries; int m_count; }; @@ -188,7 +188,7 @@ private: void calculateAccelerators(); TQWidgetStack *m_stack; - KAccelStringList m_entries; + TDEAccelStringList m_entries; }; diff --git a/tdecore/kaccelprivate.h b/tdecore/kaccelprivate.h index 8d009b950..0d967998d 100644 --- a/tdecore/kaccelprivate.h +++ b/tdecore/kaccelprivate.h @@ -4,22 +4,22 @@ #include "kkeyserver_x11.h" #include -class KAccelAction; +class TDEAccelAction; /** * @internal */ -class TDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase +class TDECORE_EXPORT TDEAccelPrivate : public TQObject, public TDEAccelBase { Q_OBJECT public: - KAccel* m_pAccel; + TDEAccel* m_pAccel; TQWidget* m_pWatch; TQMap m_mapIDToKey; - TQMap m_mapIDToAction; + TQMap m_mapIDToAction; TQTimer m_timerShowMenu; - KAccelPrivate( KAccel* pParent, TQWidget* pWatch ); + TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch ); virtual void setEnabled( bool bEnabled ); @@ -27,19 +27,19 @@ class TDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase virtual bool removeAction( const TQString& sAction ); - virtual bool emitSignal( KAccelBase::Signal signal ); - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool emitSignal( TDEAccelBase::Signal signal ); + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool connectKey( const KKeyServer::Key& key ); - virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool disconnectKey( const KKeyServer::Key& key ); signals: void menuItemActivated(); - void menuItemActivated(KAccelAction*); + void menuItemActivated(TDEAccelAction*); private: #ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ - void emitActivatedSignal(KAccelAction*); + void emitActivatedSignal(TDEAccelAction*); #endif private slots: diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index b55f0743b..705713a7e 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -272,7 +272,7 @@ public: bool guiEnabled : 1; /** * This counter indicates when to exit the application. - * It starts at 1, is decremented in KMainWindow when the last window is closed, but + * It starts at 1, is decremented in TDEMainWindow when the last window is closed, but * is incremented by operations that should outlive the last window closed * (e.g. a file copy for a file manager, or 'compacting folders on exit' for a mail client). */ @@ -468,7 +468,7 @@ void TDEApplication::removeX11EventFilter( const TQWidget* filter ) // FIXME: remove this when we've get a better method of // customizing accelerator handling -- hopefully in Qt. // For now, this is set whenever an accelerator is overridden -// in KAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02 +// in TDEAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02 extern bool kde_g_bKillAccelOverride; bool TDEApplication::notify(TQObject *receiver, TQEvent *event) @@ -489,7 +489,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event) if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress)) { - static const KShortcut& _selectAll = KStdAccel::selectAll(); + static const TDEShortcut& _selectAll = TDEStdAccel::selectAll(); TQLineEdit *edit = ::tqqt_cast(receiver); if (edit) { @@ -1297,7 +1297,7 @@ void TDEApplication::commitData( TQSessionManager& sm ) bool canceled = false; TQWidget* w = list->first(); while ( !canceled && w ) { - if ( !w->testWState( WState_ForceHide ) && !w->inherits("KMainWindow") ) { + if ( !w->testWState( WState_ForceHide ) && !w->inherits("TDEMainWindow") ) { TQCloseEvent e; sendEvent( w, &e ); canceled = !e.isAccepted(); @@ -2458,7 +2458,7 @@ void TDEApplication::kdisplaySetFont() TQApplication::setFont(TDEGlobalSettings::generalFont(), true); TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING); TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING); - TQApplication::setFont(TDEGlobalSettings::menuFont(), true, "KPopupTitle"); + TQApplication::setFont(TDEGlobalSettings::menuFont(), true, "TDEPopupTitle"); // "patch" standard TQStyleSheet to follow our fonts TQStyleSheet* sheet = TQStyleSheet::defaultSheet(); @@ -2544,11 +2544,11 @@ void TDEApplication::installKDEPropertyMap() kdeMap->insert( "KDateWidget", "date" ); kdeMap->insert( "KDateTimeWidget", "dateTime" ); kdeMap->insert( "KEditListBox", "items" ); - kdeMap->insert( "KFontCombo", "family" ); - kdeMap->insert( "KFontRequester", "font" ); - kdeMap->insert( "KFontChooser", "font" ); + kdeMap->insert( "TDEFontCombo", "family" ); + kdeMap->insert( "TDEFontRequester", "font" ); + kdeMap->insert( "TDEFontChooser", "font" ); kdeMap->insert( "KHistoryCombo", "currentItem" ); - kdeMap->insert( "KListBox", "currentItem" ); + kdeMap->insert( "TDEListBox", "currentItem" ); kdeMap->insert( "KLineEdit", "text" ); kdeMap->insert( "KRestrictedLine", "text" ); kdeMap->insert( "KSqueezedTextLabel", "text" ); @@ -3033,7 +3033,7 @@ startServiceInternal( const TQCString &function, function, params, replyType, replyData)) { if (error) - *error = i18n("KLauncher could not be reached via DCOP.\n"); + *error = i18n("TDELauncher could not be reached via DCOP.\n"); if (!kapp) delete dcopClient; return -1; @@ -3255,7 +3255,7 @@ void TDEApplication::setTopWidget( TQWidget *topWidget ) return; // set the specified caption - if ( !topWidget->inherits("KMainWindow") ) { // KMainWindow does this already for us + if ( !topWidget->inherits("TDEMainWindow") ) { // TDEMainWindow does this already for us topWidget->setCaption( caption() ); } @@ -3356,7 +3356,7 @@ bool TDEApplication::authorize(const TQString &genericAction) return config->readBoolEntry(genericAction, true); } -bool TDEApplication::authorizeKAction(const char *action) +bool TDEApplication::authorizeTDEAction(const char *action) { if (!d->actionRestrictions || !action) return true; diff --git a/tdecore/kapplication.h b/tdecore/kapplication.h index eae310c4e..f59c307eb 100644 --- a/tdecore/kapplication.h +++ b/tdecore/kapplication.h @@ -432,10 +432,10 @@ public: /** * Returns true if the application is currently saving its session * data (most probably before KDE logout). This is intended for use - * mainly in KMainWindow::queryClose() and KMainWindow::queryExit(). + * mainly in TDEMainWindow::queryClose() and TDEMainWindow::queryExit(). * - * @see KMainWindow::queryClose - * @see KMainWindow::queryExit + * @see TDEMainWindow::queryClose + * @see TDEMainWindow::queryExit * @since 3.1.1 */ bool sessionSaving() const; @@ -482,7 +482,7 @@ public: * Sets the top widget of the application. * This means basically applying the right window caption and * icon. An application may have several top widgets. You don't - * need to call this function manually when using KMainWindow. + * need to call this function manually when using TDEMainWindow. * * @param topWidget A top widget of the application. * @@ -627,21 +627,21 @@ public slots: * If the widget with focus provides a clear() slot, call that slot. Thus for a * simple application clear() can be implemented as: * \code - * new KAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" ); + * new TDEAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" ); * \endcode * * Note that for some widgets, this may not provide the intended bahavior. For - * example if you make use of the code above and a KListView has the focus, clear() + * example if you make use of the code above and a TDEListView has the focus, clear() * will clear all of the items in the list. If this is not the intened behavior - * and you want to make use of this slot, you can subclass KListView and reimplement - * this slot. For example the following code would implement a KListView without this + * and you want to make use of this slot, you can subclass TDEListView and reimplement + * this slot. For example the following code would implement a TDEListView without this * behavior: * * \code - * class MyListView : public KListView { + * class MyListView : public TDEListView { * Q_OBJECT * public: - * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {} + * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : TDEListView( parent, name, f ) {} * virtual ~MyListView() {} * public slots: * virtual void clear() {} @@ -1121,13 +1121,13 @@ public: bool authorize(const TQString &genericAction); /** - * Returns whether a certain KAction is authorized. + * Returns whether a certain TDEAction is authorized. * - * @param action The name of a KAction action. The name is prepended + * @param action The name of a TDEAction action. The name is prepended * with "action/" before being passed to authorize() - * @return true if the KAction is authorized + * @return true if the TDEAction is authorized */ - bool authorizeKAction(const char *action); + bool authorizeTDEAction(const char *action); /** * Returns whether a certain URL related action is authorized. @@ -1272,7 +1272,7 @@ protected: * \endcode * * Now in your application calls to MyApplication::deselect() will call this slot on the - * focused widget if it provides this slot. You can combine this with KAction with: + * focused widget if it provides this slot. You can combine this with TDEAction with: * * \code * KStdAction::deselect( static_cast( kapp ), TQT_SLOT( cut() ), actionCollection() ); @@ -1438,7 +1438,7 @@ signals: void appearanceChanged(); /** - * Emitted when the settings for toolbars have been changed. KToolBar will know what to do. + * Emitted when the settings for toolbars have been changed. TDEToolBar will know what to do. */ void toolbarAppearanceChanged(int); @@ -1478,12 +1478,12 @@ signals: Session management asks you to save the state of your application. This signal is provided for compatibility only. For new - applications, simply use KMainWindow. By reimplementing - KMainWindow::queryClose(), KMainWindow::saveProperties() and - KMainWindow::readProperties() you can simply handle session + applications, simply use TDEMainWindow. By reimplementing + TDEMainWindow::queryClose(), TDEMainWindow::saveProperties() and + TDEMainWindow::readProperties() you can simply handle session management for applications with multiple toplevel windows. - For purposes without KMainWindow, create an instance of + For purposes without TDEMainWindow, create an instance of KSessionManaged and reimplement the functions KSessionManaged::commitData() and/or KSessionManaged::saveState() @@ -1572,12 +1572,12 @@ class KSessionManagedPrivate; KSessionManaged makes it possible to provide implementations for TQApplication::commitData() and TQApplication::saveState(), without - subclassing TDEApplication. KMainWindow internally makes use of this. + subclassing TDEApplication. TDEMainWindow internally makes use of this. You don't need to do anything with this class when using - KMainWindow. Instead, use KMainWindow::saveProperties(), - KMainWindow::readProperties(), KMainWindow::queryClose(), - KMainWindow::queryExit() and friends. + TDEMainWindow. Instead, use TDEMainWindow::saveProperties(), + TDEMainWindow::readProperties(), TDEMainWindow::queryClose(), + TDEMainWindow::queryExit() and friends. @short Highlevel access to session management. @author Matthias Ettrich diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index 1051cd362..ec11f50a8 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -83,7 +83,7 @@ KCheckAccelerators::KCheckAccelerators( TQObject* parent ) TDEConfigGroupSaver saver( TDEGlobal::config(), "Development" ); TQString sKey = TDEGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace(); if( !sKey.isEmpty() ) { - KShortcut cuts( sKey ); + TDEShortcut cuts( sKey ); if( cuts.count() > 0 ) key = int(cuts.seq(0).qt()); } @@ -177,9 +177,9 @@ void KCheckAccelerators::checkAccelerators( bool automatic ) if ( !actWin ) return; - KAcceleratorManager::manage(actWin); + TDEAcceleratorManager::manage(actWin); TQString a, c, r; - KAcceleratorManager::last_manage(a, c, r); + TDEAcceleratorManager::last_manage(a, c, r); if (automatic) // for now we only show dialogs on F12 checks return; diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index 45182bd9d..020512b43 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -666,7 +666,7 @@ public: /** * Constants that represent the items whose short-cut * key-binding is programmable. The default key-bindings - * for these items are defined in KStdAccel. + * for these items are defined in TDEStdAccel. */ enum KeyBindingType { /** @@ -689,7 +689,7 @@ public: // Map for the key binding types mentioned above. - typedef TQMap KeyBindingMap; + typedef TQMap KeyBindingMap; /** * Default constructor. @@ -885,7 +885,7 @@ public: * @return true if key-binding can successfully be set. * @see getKeyBinding */ - bool setKeyBinding( KeyBindingType item , const KShortcut& key ); + bool setKeyBinding( KeyBindingType item , const TDEShortcut& key ); /** * Returns the key-binding used for the specified item. @@ -899,7 +899,7 @@ public: * @return the key-binding used for the feature given by @p item. * @see setKeyBinding */ - const KShortcut& getKeyBinding( KeyBindingType item ) const { + const TDEShortcut& getKeyBinding( KeyBindingType item ) const { return m_delegate ? m_delegate->getKeyBinding( item ) : m_keyMap[ item ]; } diff --git a/tdecore/kcompletionbase.cpp b/tdecore/kcompletionbase.cpp index 7589d842c..676448428 100644 --- a/tdecore/kcompletionbase.cpp +++ b/tdecore/kcompletionbase.cpp @@ -112,7 +112,7 @@ void KCompletionBase::setCompletionMode( TDEGlobalSettings::Completion mode ) m_pCompObj->setCompletionMode( m_iCompletionMode ); } -bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut ) +bool KCompletionBase::setKeyBinding( KeyBindingType item, const TDEShortcut& cut ) { if ( m_delegate ) return m_delegate->setKeyBinding( item, cut ); diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index 9998163e2..831b06fdf 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -5,13 +5,13 @@ # #Format : numberdescription -125 tdecore (KAccel) +125 tdecore (TDEAccel) 126 tdecore (KURL) 127 kio (KProtocolInfo) 128 tdecore (KRegExp) -129 tdecore (KAction) +129 tdecore (TDEAction) 130 kio (KPasswdServer) -131 tdecore (KAcceleratorManager) +131 tdecore (TDEAcceleratorManager) 150 tdecore (KLibLoader) 160 tdecore (KNotifyClient) 170 tdecore (KNetwork socket) @@ -25,8 +25,8 @@ 178 tdecore (TDEConfigDialogManager) 179 tdecore (KNetwork resolver) 180 tdecore (tdelibs) -200 tdeui (KMainWindow) -220 tdeui (KToolBar) +200 tdeui (TDEMainWindow) +220 tdeui (TDEToolBar) 230 tdeui (KCommand) 240 tdeui (tdelibs) 250 tdefile (tdelibs) @@ -42,7 +42,7 @@ 293 tdeui (KLineEdit) 294 tdeui (KEdit) 295 tdeui (KMenuBar) -296 tdeui (KPopupMenu) +296 tdeui (TDEPopupMenu) 298 tdeui (KDatePicker) 399 kimgio 400 artskde @@ -236,7 +236,7 @@ 7013 kio (KPing) 7014 kio (TDETrader) 7015 kio (KAutoMount) -7016 kio (KLauncher) +7016 kio (TDELauncher) 7017 kio (KIOConnection) 7018 kio (KMimeMagic) 7019 kio (tdeioslave) diff --git a/tdecore/kdebugrc b/tdecore/kdebugrc index c697da031..0335f4e5b 100644 --- a/tdecore/kdebugrc +++ b/tdecore/kdebugrc @@ -32,7 +32,7 @@ # AbortFatal=1 # -# KAccel debug info off +# TDEAccel debug info off [125] InfoOutput=4 @@ -40,7 +40,7 @@ InfoOutput=4 [131] InfoOutput=4 -# KAction debug info off +# TDEAction debug info off [129] InfoOutput=4 @@ -52,7 +52,7 @@ InfoOutput=4 [173] InfoOutput=4 -# KMainWindow debug info off +# TDEMainWindow debug info off [200] InfoOutput=4 diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp index 3d759466f..eb1b56323 100644 --- a/tdecore/kglobalaccel.cpp +++ b/tdecore/kglobalaccel.cpp @@ -53,14 +53,14 @@ TDEGlobalAccel::~TDEGlobalAccel() void TDEGlobalAccel::clear() { d->clearActions(); } */ -KAccelActions& TDEGlobalAccel::actions() - { return d->KAccelBase::actions(); } +TDEAccelActions& TDEGlobalAccel::actions() + { return d->TDEAccelBase::actions(); } -const KAccelActions& TDEGlobalAccel::actions() const - { return d->KAccelBase::actions(); } +const TDEAccelActions& TDEGlobalAccel::actions() const + { return d->TDEAccelBase::actions(); } bool TDEGlobalAccel::isEnabled() - { return ((KAccelBase*)d)->isEnabled(); } + { return ((TDEAccelBase*)d)->isEnabled(); } void TDEGlobalAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } @@ -74,8 +74,8 @@ void TDEGlobalAccel::blockShortcuts( bool block ) void TDEGlobalAccel::disableBlocking( bool disable ) { d->disableBlocking( disable ); } -KAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& cutDef3, const KShortcut& cutDef4, +TDEAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -85,7 +85,7 @@ KAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& s bConfigurable, bEnabled ); } -KAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc ) +TDEAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc ) { return d->insert( sName, sDesc ); } bool TDEGlobalAccel::updateConnections() { return d->updateConnections(); } @@ -93,19 +93,19 @@ bool TDEGlobalAccel::updateConnections() bool TDEGlobalAccel::remove( const TQString& sAction ) { return d->remove( sAction ); } -const KShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const +const TDEShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const { - const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction ); - return (pAction) ? pAction->shortcut() : KShortcut::null(); + const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction ); + return (pAction) ? pAction->shortcut() : TDEShortcut::null(); } -bool TDEGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEGlobalAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut ) { return d->setShortcut( sAction, cut ); } bool TDEGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); } TQString TDEGlobalAccel::label( const TQString& sAction ) const { - const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction ); + const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction ); return (pAction) ? pAction->label() : TQString(); } bool TDEGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable ) @@ -131,7 +131,7 @@ bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const } bool TDEGlobalAccel::useFourModifierKeys() - { return KAccelAction::useFourModifierKeys(); } + { return TDEAccelAction::useFourModifierKeys(); } void TDEGlobalAccel::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdecore/kglobalaccel.h b/tdecore/kglobalaccel.h index fdda08f5a..9606b8af1 100644 --- a/tdecore/kglobalaccel.h +++ b/tdecore/kglobalaccel.h @@ -25,19 +25,19 @@ class TQPopupMenu; class TQWidget; -class KAccelAction; -class KAccelActions; +class TDEAccelAction; +class TDEAccelActions; class TDEConfigBase; class TDEGlobalAccelPrivate; /** * TDEGlobalAccel allows you to have global accelerators that are independent of -* the focused window. Unlike KAccel it does not matter which window is +* the focused window. Unlike TDEAccel it does not matter which window is * currently active. * -* @see KAccel -* @see KAccelShortcutList +* @see TDEAccel +* @see TDEAccelShortcutList * @see KKeyChooser * @see KKeyDialog * @short Configurable global shortcut support @@ -90,8 +90,8 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * @param bConfigurable Allow the user to change this shortcut if set to 'true'. * @param bEnabled The action will be activated by the shortcut if set to 'true'. */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); @@ -108,9 +108,9 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * displayed when the user configures shortcuts. * @param sName of the of the action to insert * @param sLabel a user-readable (i18n!) name for the action - * @return the KAccelAction of the action + * @return the TDEAccelAction of the action */ - KAccelAction* insert( const TQString& sName, const TQString& sLabel ); + TDEAccelAction* insert( const TQString& sName, const TQString& sLabel ); /** * Updates the connections of the accelerations after changing them. @@ -123,14 +123,14 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * @param sAction the name of the action * @return the shortcut. If the action does not exist a null shortcut will be returned. */ - const KShortcut& shortcut( const TQString& sAction ) const; + const TDEShortcut& shortcut( const TQString& sAction ) const; /** * Set the shortcut to be associated with the action named by @p sAction. * @param sAction the name of the action * @param shortcut the shortcut for the action * @return true if successful, false otherwise */ - bool setShortcut( const TQString& sAction, const KShortcut &shortcut ); + bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut ); /** * Set the slot to be called when the shortcut of the action named * by @p sAction is pressed. @@ -203,7 +203,7 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject /** * @internal -- this a wrapper function to - * KAccelActions::useFourModifierKeys(). + * TDEAccelActions::useFourModifierKeys(). */ static bool useFourModifierKeys(); @@ -224,11 +224,11 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject private: - KAccelActions& actions(); - const KAccelActions& actions() const; + TDEAccelActions& actions(); + const TDEAccelActions& actions() const; friend class TDEGlobalAccelPrivate; - friend class KAccelShortcutList; + friend class TDEAccelShortcutList; protected: /** \internal */ virtual void virtual_hook( int id, void* data ); diff --git a/tdecore/kglobalaccel_emb.h b/tdecore/kglobalaccel_emb.h index 8a5352817..e4feb601e 100644 --- a/tdecore/kglobalaccel_emb.h +++ b/tdecore/kglobalaccel_emb.h @@ -11,8 +11,8 @@ public: virtual void setEnabled( bool bEnabled ); - virtual bool connectKey( KAccelAction&, KKeySequence ); - virtual bool disconnectKey( KAccelAction&, KKeySequence ); + virtual bool connectKey( TDEAccelAction&, KKeySequence ); + virtual bool disconnectKey( TDEAccelAction&, KKeySequence ); }; #endif // _KGLOBALACCEL_EMB_H diff --git a/tdecore/kglobalaccel_mac.h b/tdecore/kglobalaccel_mac.h index c82bdc17a..82fe332b4 100644 --- a/tdecore/kglobalaccel_mac.h +++ b/tdecore/kglobalaccel_mac.h @@ -6,11 +6,11 @@ #include "kshortcut.h" #include "kaccelbase.h" -class TDEGlobalAccelPrivate: public KAccelBase +class TDEGlobalAccelPrivate: public TDEAccelBase { public: TDEGlobalAccelPrivate() - : KAccelBase(KAccelBase::NATIVE_KEYS) + : TDEAccelBase(TDEAccelBase::NATIVE_KEYS) {} // reimplemented pure virtuals @@ -18,11 +18,11 @@ public: { Q_UNUSED(bEnabled); } bool emitSignal( Signal signal ) { Q_UNUSED(signal); return false; } - bool connectKey( KAccelAction& action, const KKeyServer::Key& key) + bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key) { Q_UNUSED(action); Q_UNUSED(key); return false; } bool connectKey( const KKeyServer::Key& key) { Q_UNUSED(key); return false; } - bool disconnectKey( KAccelAction&, const KKeyServer::Key& key) + bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& key) { Q_UNUSED(key); return false; } bool disconnectKey( const KKeyServer::Key& ) { return false; } diff --git a/tdecore/kglobalaccel_win.cpp b/tdecore/kglobalaccel_win.cpp index 1ea3f0250..0393bdd8d 100644 --- a/tdecore/kglobalaccel_win.cpp +++ b/tdecore/kglobalaccel_win.cpp @@ -40,7 +40,7 @@ static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0; TDEGlobalAccelPrivate::TDEGlobalAccelPrivate() -: KAccelBase( KAccelBase::NATIVE_KEYS ) +: TDEAccelBase( TDEAccelBase::NATIVE_KEYS ) , m_blocked( false ) , m_blockingDisabled( false ) { @@ -91,7 +91,7 @@ void TDEGlobalAccelPrivate::disableBlocking( bool block ) bool TDEGlobalAccelPrivate::isEnabledInternal() const { - return KAccelBase::isEnabled() && !m_blocked; + return TDEAccelBase::isEnabled() && !m_blocked; } bool TDEGlobalAccelPrivate::emitSignal( Signal ) @@ -99,16 +99,16 @@ bool TDEGlobalAccelPrivate::emitSignal( Signal ) return false; } -bool TDEGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, true, &action ); } bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) { return grabKey( key, true, 0 ); } -bool TDEGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, false, &action ); } bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { return grabKey( key, false, 0 ); } -bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) +bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDEAccelAction* pAction ) { /* if( !key.code() ) { @@ -268,7 +268,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { - KAccelAction* pAction = *it; + TDEAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null) << endl; @@ -276,7 +276,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) #endif return false; } - KAccelAction* pAction = m_rgCodeModToAction[codemod]; + TDEAccelAction* pAction = m_rgCodeModToAction[codemod]; if( !pAction ) { static bool recursion_block = false; @@ -297,7 +297,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return true; }*/ -void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) +void TDEGlobalAccelPrivate::activate( TDEAccelAction* pAction, const KKeySequence& seq ) { kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; @@ -335,7 +335,7 @@ void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& void TDEGlobalAccelPrivate::slotActivated( int iAction ) { - KAccelAction* pAction = actions().actionPtr( iAction ); + TDEAccelAction* pAction = actions().actionPtr( iAction ); if( pAction ) activate( pAction, KKeySequence() ); } diff --git a/tdecore/kglobalaccel_win.h b/tdecore/kglobalaccel_win.h index cde46c472..0a938cbfc 100644 --- a/tdecore/kglobalaccel_win.h +++ b/tdecore/kglobalaccel_win.h @@ -30,7 +30,7 @@ /** * @internal */ -class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase +class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase { friend class TDEGlobalAccel; Q_OBJECT @@ -41,9 +41,9 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase virtual void setEnabled( bool bEnabled ); virtual bool emitSignal( Signal signal ); - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool connectKey( const KKeyServer::Key& key ); - virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool disconnectKey( const KKeyServer::Key& key ); protected: @@ -51,7 +51,7 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase /** * @param bGrab Set to true to grab key, false to ungrab key. */ - bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* ); + bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* ); /** * Filters X11 events ev for key bindings in the accelerator dictionary. @@ -63,7 +63,7 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase // virtual bool x11Event( XEvent* ); // void x11MappingNotify(); // bool x11KeyPress( const XEvent *pEvent ); - void activate( KAccelAction* pAction, const KKeySequence& seq ); + void activate( TDEAccelAction* pAction, const KKeySequence& seq ); virtual bool isEnabledInternal() const; static void blockShortcuts( bool block ); void disableBlocking( bool disable ); diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp index 701c954f3..64af90572 100644 --- a/tdecore/kglobalaccel_x11.cpp +++ b/tdecore/kglobalaccel_x11.cpp @@ -80,7 +80,7 @@ static void calculateGrabMasks() static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0; TDEGlobalAccelPrivate::TDEGlobalAccelPrivate() -: KAccelBase( KAccelBase::NATIVE_KEYS ) +: TDEAccelBase( TDEAccelBase::NATIVE_KEYS ) , m_blocked( false ) , m_blockingDisabled( false ) , m_suspended( false ) @@ -133,7 +133,7 @@ void TDEGlobalAccelPrivate::disableBlocking( bool block ) bool TDEGlobalAccelPrivate::isEnabledInternal() const { - return KAccelBase::isEnabled() && !m_blocked; + return TDEAccelBase::isEnabled() && !m_blocked; } // see #117169 - the bug is hard to reproduce, probably somewhere in X, testcase would be probably @@ -148,16 +148,16 @@ bool TDEGlobalAccelPrivate::emitSignal( Signal ) return false; } -bool TDEGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, true, &action ); } bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) { return grabKey( key, true, 0 ); } -bool TDEGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, false, &action ); } bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { return grabKey( key, false, 0 ); } -bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) +bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDEAccelAction* pAction ) { if( !key.code() ) { kdWarning(125) << "TDEGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl; @@ -286,7 +286,7 @@ void TDEGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { - KAccelAction* pAction = *it; + TDEAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; @@ -295,7 +295,7 @@ void TDEGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { return; } - KAccelAction* pAction = m_rgCodeModToAction[codemod]; + TDEAccelAction* pAction = m_rgCodeModToAction[codemod]; if( !pAction ) { static bool recursion_block = false; @@ -364,7 +364,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { - KAccelAction* pAction = *it; + TDEAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; @@ -373,7 +373,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return false; } - KAccelAction* pAction = m_rgCodeModToAction[codemod]; + TDEAccelAction* pAction = m_rgCodeModToAction[codemod]; if( !pAction ) { static bool recursion_block = false; @@ -394,7 +394,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return true; } -void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) +void TDEGlobalAccelPrivate::activate( TDEAccelAction* pAction, const KKeySequence& seq ) { kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; @@ -432,7 +432,7 @@ void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& void TDEGlobalAccelPrivate::slotActivated( int iAction ) { - KAccelAction* pAction = KAccelBase::actions().actionPtr( iAction ); + TDEAccelAction* pAction = TDEAccelBase::actions().actionPtr( iAction ); if( pAction ) activate( pAction, KKeySequence() ); } diff --git a/tdecore/kglobalaccel_x11.h b/tdecore/kglobalaccel_x11.h index e28df060d..df1f54425 100644 --- a/tdecore/kglobalaccel_x11.h +++ b/tdecore/kglobalaccel_x11.h @@ -30,7 +30,7 @@ /** * @internal */ -class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase +class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase { friend class TDEGlobalAccel; Q_OBJECT @@ -41,9 +41,9 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase virtual void setEnabled( bool bEnabled ); virtual bool emitSignal( Signal signal ); - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool connectKey( const KKeyServer::Key& key ); - virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool disconnectKey( const KKeyServer::Key& key ); protected: @@ -73,14 +73,14 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase return false; } }; - typedef TQMap CodeModMap; + typedef TQMap CodeModMap; CodeModMap m_rgCodeModToAction; /** * @param bGrab Set to true to grab key, false to ungrab key. */ - bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* ); + bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* ); /** * Filters X11 events ev for key bindings in the accelerator dictionary. @@ -92,7 +92,7 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase virtual bool x11Event( XEvent* ); void x11MappingNotify(); bool x11KeyPress( const XEvent *pEvent ); - void activate( KAccelAction* pAction, const KKeySequence& seq ); + void activate( TDEAccelAction* pAction, const KKeySequence& seq ); virtual bool isEnabledInternal() const; static void blockShortcuts( bool block ); void disableBlocking( bool disable ); diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index 58eeff416..f9774a886 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -186,7 +186,7 @@ bool TDEGlobalSettings::showContextMenusOnPress () int TDEGlobalSettings::contextMenuKey () { TDEConfigGroup g(TDEGlobal::config(), "Shortcuts"); - KShortcut cut (g.readEntry ("PopupMenuContext", "Menu")); + TDEShortcut cut (g.readEntry ("PopupMenuContext", "Menu")); return cut.keyCodeQt(); } diff --git a/tdecore/kglobalsettings.h b/tdecore/kglobalsettings.h index 7a9c42900..ee893f97e 100644 --- a/tdecore/kglobalsettings.h +++ b/tdecore/kglobalsettings.h @@ -111,7 +111,7 @@ class TDECORE_EXPORT TDEGlobalSettings /** * This enum describes the return type for insertTearOffHandle() whether to insert * a handle or not. Applications who independently want to use handles in their popup menus - * should test for Application level before calling the appropriate function in KPopupMenu. + * should test for Application level before calling the appropriate function in TDEPopupMenu. * @since 3.1 **/ enum TearOffHandle { @@ -121,8 +121,8 @@ class TDECORE_EXPORT TDEGlobalSettings }; /** - * Returns whether tear-off handles are inserted in KPopupMenus. - * @return whether tear-off handles are inserted in KPopupMenus. + * Returns whether tear-off handles are inserted in TDEPopupMenus. + * @return whether tear-off handles are inserted in TDEPopupMenus. * @since 3.1 **/ static TearOffHandle insertTearOffHandle(); @@ -346,8 +346,8 @@ class TDECORE_EXPORT TDEGlobalSettings static TQColor highlightColor(); /** - * Returns the alternate background color used by KListView with - * KListViewItem. Any other list that uses alternating background + * Returns the alternate background color used by TDEListView with + * TDEListViewItem. Any other list that uses alternating background * colors should use this too, to obey to the user's preferences. Returns * an invalid color if the user doesn't want alternating backgrounds. * @return the alternate background color @@ -365,7 +365,7 @@ class TDECORE_EXPORT TDEGlobalSettings static TQColor calculateAlternateBackgroundColor(const TQColor& base); /** - * Returns if the sorted column in a KListView shall be drawn with a + * Returns if the sorted column in a TDEListView shall be drawn with a * shaded background color. * @return true if the sorted column shall be shaded * @since 3.4 diff --git a/tdecore/kmanagerselection.cpp b/tdecore/kmanagerselection.cpp index 75dde5c9c..15e273d6d 100644 --- a/tdecore/kmanagerselection.cpp +++ b/tdecore/kmanagerselection.cpp @@ -51,57 +51,57 @@ DEALINGS IN THE SOFTWARE. #include #include -class KSelectionOwnerPrivate +class TDESelectionOwnerPrivate : public QWidget { public: - KSelectionOwnerPrivate( KSelectionOwner* owner ); + TDESelectionOwnerPrivate( TDESelectionOwner* owner ); protected: virtual bool x11Event( XEvent* ev ); private: - KSelectionOwner* owner; + TDESelectionOwner* owner; }; -KSelectionOwnerPrivate::KSelectionOwnerPrivate( KSelectionOwner* owner_P ) +TDESelectionOwnerPrivate::TDESelectionOwnerPrivate( TDESelectionOwner* owner_P ) : owner( owner_P ) { kapp->installX11EventFilter( TQT_TQWIDGET(this) ); } -bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P ) +bool TDESelectionOwnerPrivate::x11Event( XEvent* ev_P ) { return owner->filterEvent( ev_P ); } -KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P ) +TDESelectionOwner::TDESelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( selection_P ), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), window( None ), timestamp( CurrentTime ), extra1( 0 ), extra2( 0 ), - d( new KSelectionOwnerPrivate( this )) + d( new TDESelectionOwnerPrivate( this )) { } -KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P ) +TDESelectionOwner::TDESelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( XInternAtom( tqt_xdisplay(), selection_P, False )), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), window( None ), timestamp( CurrentTime ), extra1( 0 ), extra2( 0 ), - d( new KSelectionOwnerPrivate( this )) + d( new TDESelectionOwnerPrivate( this )) { } -KSelectionOwner::~KSelectionOwner() +TDESelectionOwner::~TDESelectionOwner() { release(); delete d; } -bool KSelectionOwner::claim( bool force_P, bool force_kill_P ) +bool TDESelectionOwner::claim( bool force_P, bool force_kill_P ) { if( manager_atom == None ) getAtoms(); @@ -179,7 +179,7 @@ bool KSelectionOwner::claim( bool force_P, bool force_kill_P ) } // destroy resource first -void KSelectionOwner::release() +void TDESelectionOwner::release() { if( timestamp == CurrentTime ) return; @@ -188,20 +188,20 @@ void KSelectionOwner::release() timestamp = CurrentTime; } -Window KSelectionOwner::ownerWindow() const +Window TDESelectionOwner::ownerWindow() const { if( timestamp == CurrentTime ) return None; return window; } -void KSelectionOwner::setData( long extra1_P, long extra2_P ) +void TDESelectionOwner::setData( long extra1_P, long extra2_P ) { extra1 = extra1_P; extra2 = extra2_P; } -bool KSelectionOwner::filterEvent( XEvent* ev_P ) +bool TDESelectionOwner::filterEvent( XEvent* ev_P ) { if( timestamp != CurrentTime && ev_P->xany.window == window ) { @@ -244,12 +244,12 @@ bool KSelectionOwner::filterEvent( XEvent* ev_P ) return false; } -bool KSelectionOwner::handleMessage( XEvent* ) +bool TDESelectionOwner::handleMessage( XEvent* ) { return false; } -void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P ) +void TDESelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P ) { if( timestamp == CurrentTime || ev_P.selection != selection ) return; @@ -311,7 +311,7 @@ void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P ) XSendEvent( tqt_xdisplay(), ev_P.requestor, False, 0, &ev ); } -bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P ) +bool TDESelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P ) { if( target_P == xa_timestamp ) { @@ -328,7 +328,7 @@ bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window r return true; } -void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P ) +void TDESelectionOwner::replyTargets( Atom property_P, Window requestor_P ) { Atom atoms[ 3 ] = { xa_multiple, xa_timestamp, xa_targets }; // kdDebug() << "Handling targets request" << endl; @@ -336,12 +336,12 @@ void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P ) reinterpret_cast< unsigned char* >( atoms ), 3 ); } -bool KSelectionOwner::genericReply( Atom, Atom, Window ) +bool TDESelectionOwner::genericReply( Atom, Atom, Window ) { return false; } -void KSelectionOwner::getAtoms() +void TDESelectionOwner::getAtoms() { if( manager_atom == None ) { @@ -356,66 +356,66 @@ void KSelectionOwner::getAtoms() } } -Atom KSelectionOwner::manager_atom = None; -Atom KSelectionOwner::xa_multiple = None; -Atom KSelectionOwner::xa_targets = None; -Atom KSelectionOwner::xa_timestamp = None; +Atom TDESelectionOwner::manager_atom = None; +Atom TDESelectionOwner::xa_multiple = None; +Atom TDESelectionOwner::xa_targets = None; +Atom TDESelectionOwner::xa_timestamp = None; //******************************************* -// KSelectionWatcher +// TDESelectionWatcher //******************************************* -class KSelectionWatcherPrivate +class TDESelectionWatcherPrivate : public QWidget { public: - KSelectionWatcherPrivate( KSelectionWatcher* watcher ); + TDESelectionWatcherPrivate( TDESelectionWatcher* watcher ); protected: virtual bool x11Event( XEvent* ev ); private: - KSelectionWatcher* watcher; + TDESelectionWatcher* watcher; }; -KSelectionWatcherPrivate::KSelectionWatcherPrivate( KSelectionWatcher* watcher_P ) +TDESelectionWatcherPrivate::TDESelectionWatcherPrivate( TDESelectionWatcher* watcher_P ) : watcher( watcher_P ) { kapp->installX11EventFilter( TQT_TQWIDGET(this) ); } -bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P ) +bool TDESelectionWatcherPrivate::x11Event( XEvent* ev_P ) { watcher->filterEvent( ev_P ); return false; } -KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P ) +TDESelectionWatcher::TDESelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( selection_P ), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), selection_owner( None ), - d( new KSelectionWatcherPrivate( this )) + d( new TDESelectionWatcherPrivate( this )) { init(); } -KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P ) +TDESelectionWatcher::TDESelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( XInternAtom( tqt_xdisplay(), selection_P, False )), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), selection_owner( None ), - d( new KSelectionWatcherPrivate( this )) + d( new TDESelectionWatcherPrivate( this )) { init(); } -KSelectionWatcher::~KSelectionWatcher() +TDESelectionWatcher::~TDESelectionWatcher() { delete d; } -void KSelectionWatcher::init() +void TDESelectionWatcher::init() { if( manager_atom == None ) { @@ -429,7 +429,7 @@ void KSelectionWatcher::init() } } -Window KSelectionWatcher::owner() +Window TDESelectionWatcher::owner() { Display* const dpy = tqt_xdisplay(); KXErrorHandler handler; @@ -451,7 +451,7 @@ Window KSelectionWatcher::owner() } // void return value in order to allow more watchers in one process -void KSelectionWatcher::filterEvent( XEvent* ev_P ) +void TDESelectionWatcher::filterEvent( XEvent* ev_P ) { if( ev_P->type == ClientMessage ) { @@ -478,12 +478,12 @@ void KSelectionWatcher::filterEvent( XEvent* ev_P ) return; } -Atom KSelectionWatcher::manager_atom = None; +Atom TDESelectionWatcher::manager_atom = None; -void KSelectionOwner::virtual_hook( int, void* ) +void TDESelectionOwner::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KSelectionWatcher::virtual_hook( int, void* ) +void TDESelectionWatcher::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kmanagerselection.moc" diff --git a/tdecore/kmanagerselection.h b/tdecore/kmanagerselection.h index 5b46488ab..de294187d 100644 --- a/tdecore/kmanagerselection.h +++ b/tdecore/kmanagerselection.h @@ -36,7 +36,7 @@ DEALINGS IN THE SOFTWARE. #include -class KSelectionOwnerPrivate; +class TDESelectionOwnerPrivate; /** This class implements claiming and owning manager selections, as described @@ -47,7 +47,7 @@ class KSelectionOwnerPrivate; @since 3.2 @short ICCCM manager selection owner */ -class TDECORE_EXPORT KSelectionOwner +class TDECORE_EXPORT TDESelectionOwner : public TQObject { Q_OBJECT @@ -60,7 +60,7 @@ class TDECORE_EXPORT KSelectionOwner * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL ); + TDESelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL ); /** * @overload * This constructor accepts the selection name and creates the appropriate atom @@ -70,11 +70,11 @@ class TDECORE_EXPORT KSelectionOwner * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL ); + TDESelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL ); /** * Destructor. Calls release(). */ - virtual ~KSelectionOwner(); + virtual ~TDESelectionOwner(); /** * This function attemps to claim ownership of the manager selection, using * the current X timestamp. If @p force is false, and the selection is already @@ -157,10 +157,10 @@ class TDECORE_EXPORT KSelectionOwner protected: virtual void virtual_hook( int id, void* data ); private: - KSelectionOwnerPrivate* d; + TDESelectionOwnerPrivate* d; }; -class KSelectionWatcherPrivate; +class TDESelectionWatcherPrivate; /** This class implements watching manager selections, as described in the ICCCM @@ -170,7 +170,7 @@ class KSelectionWatcherPrivate; @since 3.2 @short ICCCM manager selection watching */ -class TDECORE_EXPORT KSelectionWatcher +class TDECORE_EXPORT TDESelectionWatcher : public TQObject { Q_OBJECT @@ -183,7 +183,7 @@ class TDECORE_EXPORT KSelectionWatcher * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL ); + TDESelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL ); /** * @overload * This constructor accepts the selection name and creates the appropriate atom @@ -193,8 +193,8 @@ class TDECORE_EXPORT KSelectionWatcher * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL ); - virtual ~KSelectionWatcher(); + TDESelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL ); + virtual ~TDESelectionWatcher(); /** * Return the current owner of the manager selection, if any. */ @@ -226,7 +226,7 @@ class TDECORE_EXPORT KSelectionWatcher protected: virtual void virtual_hook( int id, void* data ); private: - KSelectionWatcherPrivate* d; + TDESelectionWatcherPrivate* d; }; #endif diff --git a/tdecore/kshortcut.cpp b/tdecore/kshortcut.cpp index 10c6c31fa..ae568d5b7 100644 --- a/tdecore/kshortcut.cpp +++ b/tdecore/kshortcut.cpp @@ -33,7 +33,7 @@ static KKey* g_pspec = 0; static KKeySequence* g_pseq = 0; -static KShortcut* g_pcut = 0; +static TDEShortcut* g_pcut = 0; //---------------------------------------------------- // KKey @@ -396,28 +396,28 @@ KKeySequence& KKeySequence::null() } //--------------------------------------------------------------------- -// KShortcut +// TDEShortcut //--------------------------------------------------------------------- -KShortcut::KShortcut() { clear(); } -KShortcut::KShortcut( int keyQt ) { init( keyQt ); } -KShortcut::KShortcut( const TQKeySequence& key ) { init( key ); } -KShortcut::KShortcut( const KKey& key ) { init( key ); } -KShortcut::KShortcut( const KKeySequence& seq ) { init( seq ); } -KShortcut::KShortcut( const KShortcut& cut ) { init( cut ); } -KShortcut::KShortcut( const char* ps ) { init( TQString(ps) ); } -KShortcut::KShortcut( const TQString& s ) { init( s ); } +TDEShortcut::TDEShortcut() { clear(); } +TDEShortcut::TDEShortcut( int keyQt ) { init( keyQt ); } +TDEShortcut::TDEShortcut( const TQKeySequence& key ) { init( key ); } +TDEShortcut::TDEShortcut( const KKey& key ) { init( key ); } +TDEShortcut::TDEShortcut( const KKeySequence& seq ) { init( seq ); } +TDEShortcut::TDEShortcut( const TDEShortcut& cut ) { init( cut ); } +TDEShortcut::TDEShortcut( const char* ps ) { init( TQString(ps) ); } +TDEShortcut::TDEShortcut( const TQString& s ) { init( s ); } -KShortcut::~KShortcut() +TDEShortcut::~TDEShortcut() { } -void KShortcut::clear() +void TDEShortcut::clear() { m_nSeqs = 0; } -bool KShortcut::init( int keyQt ) +bool TDEShortcut::init( int keyQt ) { if( keyQt ) { m_nSeqs = 1; @@ -427,28 +427,28 @@ bool KShortcut::init( int keyQt ) return true; } -bool KShortcut::init( const TQKeySequence& key ) +bool TDEShortcut::init( const TQKeySequence& key ) { m_nSeqs = 1; m_rgseq[0].init( key ); return true; } -bool KShortcut::init( const KKey& spec ) +bool TDEShortcut::init( const KKey& spec ) { m_nSeqs = 1; m_rgseq[0].init( spec ); return true; } -bool KShortcut::init( const KKeySequence& seq ) +bool TDEShortcut::init( const KKeySequence& seq ) { m_nSeqs = 1; m_rgseq[0] = seq; return true; } -bool KShortcut::init( const KShortcut& cut ) +bool TDEShortcut::init( const TDEShortcut& cut ) { m_nSeqs = cut.m_nSeqs; for( uint i = 0; i < m_nSeqs; i++ ) @@ -456,7 +456,7 @@ bool KShortcut::init( const KShortcut& cut ) return true; } -bool KShortcut::init( const TQString& s ) +bool TDEShortcut::init( const TQString& s ) { bool bRet = true; TQStringList rgs = TQStringList::split( ';', s ); @@ -480,7 +480,7 @@ bool KShortcut::init( const TQString& s ) if( !s.isEmpty() ) { TQString sDebug; TQTextStream os( &sDebug, IO_WriteOnly ); - os << "KShortcut::init( \"" << s << "\" ): "; + os << "TDEShortcut::init( \"" << s << "\" ): "; for( uint i = 0; i < m_nSeqs; i++ ) { os << " m_rgseq[" << i << "]: "; KKeyServer::Variations vars; @@ -494,29 +494,29 @@ bool KShortcut::init( const TQString& s ) return bRet; } -uint KShortcut::count() const +uint TDEShortcut::count() const { return m_nSeqs; } -const KKeySequence& KShortcut::seq( uint i ) const +const KKeySequence& TDEShortcut::seq( uint i ) const { return (i < m_nSeqs) ? m_rgseq[i] : KKeySequence::null(); } -int KShortcut::keyCodeQt() const +int TDEShortcut::keyCodeQt() const { if( m_nSeqs >= 1 ) return m_rgseq[0].keyCodeQt(); return TQKeySequence(); } -bool KShortcut::isNull() const +bool TDEShortcut::isNull() const { return m_nSeqs == 0; } -int KShortcut::compare( const KShortcut& cut ) const +int TDEShortcut::compare( const TDEShortcut& cut ) const { for( uint i = 0; i < m_nSeqs && i < cut.m_nSeqs; i++ ) { int ret = m_rgseq[i].compare( cut.m_rgseq[i] ); @@ -526,12 +526,12 @@ int KShortcut::compare( const KShortcut& cut ) const return m_nSeqs - cut.m_nSeqs; } -bool KShortcut::contains( const KKey& key ) const +bool TDEShortcut::contains( const KKey& key ) const { return contains( KKeySequence(key) ); } -bool KShortcut::contains( const KKeyNative& keyNative ) const +bool TDEShortcut::contains( const KKeyNative& keyNative ) const { KKey key = keyNative.key(); key.simplify(); @@ -545,7 +545,7 @@ bool KShortcut::contains( const KKeyNative& keyNative ) const return false; } -bool KShortcut::contains( const KKeySequence& seq ) const +bool TDEShortcut::contains( const KKeySequence& seq ) const { for( uint i = 0; i < count(); i++ ) { if( !m_rgseq[i].isNull() && m_rgseq[i] == seq ) @@ -554,7 +554,7 @@ bool KShortcut::contains( const KKeySequence& seq ) const return false; } -bool KShortcut::setSeq( uint iSeq, const KKeySequence& seq ) +bool TDEShortcut::setSeq( uint iSeq, const KKeySequence& seq ) { // TODO: check if seq is null, and act accordingly. if( iSeq <= m_nSeqs && iSeq < MAX_SEQUENCES ) { @@ -566,7 +566,7 @@ bool KShortcut::setSeq( uint iSeq, const KKeySequence& seq ) return false; } -void KShortcut::remove( const KKeySequence& seq ) +void TDEShortcut::remove( const KKeySequence& seq ) { if (seq.isNull()) return; @@ -581,7 +581,7 @@ void KShortcut::remove( const KKeySequence& seq ) } } -bool KShortcut::append( const KKeySequence& seq ) +bool TDEShortcut::append( const KKeySequence& seq ) { if( m_nSeqs < MAX_SEQUENCES ) { if( !seq.isNull() ) { @@ -593,7 +593,7 @@ bool KShortcut::append( const KKeySequence& seq ) return false; } -bool KShortcut::append( const KKey& spec ) +bool TDEShortcut::append( const KKey& spec ) { if( m_nSeqs < MAX_SEQUENCES ) { m_rgseq[m_nSeqs].init( spec ); @@ -603,7 +603,7 @@ bool KShortcut::append( const KKey& spec ) return false; } -bool KShortcut::append( const KShortcut& cut ) +bool TDEShortcut::append( const TDEShortcut& cut ) { uint seqs = m_nSeqs, co = cut.count(); for( uint i=0; i= 1 ) return m_rgseq[0].qt(); @@ -629,7 +629,7 @@ KShortcut::operator TQKeySequence () const return TQKeySequence(); } -TQString KShortcut::toString() const +TQString TDEShortcut::toString() const { TQString s; @@ -642,7 +642,7 @@ TQString KShortcut::toString() const return s; } -TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const +TQString TDEShortcut::toStringInternal( const TDEShortcut* pcutDefault ) const { TQString s; @@ -661,10 +661,10 @@ TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const return s; } -KShortcut& KShortcut::null() +TDEShortcut& TDEShortcut::null() { if( !g_pcut ) - g_pcut = new KShortcut; + g_pcut = new TDEShortcut; if( !g_pcut->isNull() ) g_pcut->clear(); return *g_pcut; diff --git a/tdecore/kshortcut.h b/tdecore/kshortcut.h index 9baf31b0d..e98a007b5 100644 --- a/tdecore/kshortcut.h +++ b/tdecore/kshortcut.h @@ -34,7 +34,7 @@ class KKeyNative; * by the underlying system (e.g. X11). * @see KKeyNative * @see KKeySequence -* @see KShortcut +* @see TDEShortcut */ class TDECORE_EXPORT KKey @@ -282,7 +282,7 @@ class TDECORE_EXPORT KKey * A KKeySequence object holds a sequence of up to 4 keys. * Ex: Ctrl+X,I * @see KKey -* @see KShortcut +* @see TDEShortcut */ class TDECORE_EXPORT KKeySequence @@ -518,18 +518,18 @@ class TDECORE_EXPORT KKeySequence }; /** -* The KShortcut class is used to represent a keyboard shortcut to an action. +* The TDEShortcut class is used to represent a keyboard shortcut to an action. * A shortcut is normally a single key with modifiers, such as Ctrl+V. -* A KShortcut object may also contain an alternate key which will also +* A TDEShortcut object may also contain an alternate key which will also * activate the action it's associated to, as long as no other actions have * defined that key as their primary key. Ex: Ctrl+V;Shift+Insert. * -* This can be used to add additional accelerators to a KAction. For example, +* This can be used to add additional accelerators to a TDEAction. For example, * the below code binds the escape key to the close action. * * \code -* KAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() ); -* KShortcut closeShortcut = closeAction->shortcut(); +* TDEAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() ); +* TDEShortcut closeShortcut = closeAction->shortcut(); * closeShortcut.append( KKey(Key_Escape)); * closeAction->setShortcut(closeShortcut); * \endcode @@ -540,12 +540,12 @@ class TDECORE_EXPORT KKeySequence * */ -class TDECORE_EXPORT KShortcut +class TDECORE_EXPORT TDEShortcut { public: /** * The maximum number of key sequences that can be contained in - * a KShortcut. + * a TDEShortcut. */ enum { MAX_SEQUENCES = 2 }; @@ -555,7 +555,7 @@ class TDECORE_EXPORT KShortcut * @see isNull() * @see clear() */ - KShortcut(); + TDEShortcut(); /** * Creates a new shortcut with the given Qt key code @@ -563,34 +563,34 @@ class TDECORE_EXPORT KShortcut * @param keyQt the qt keycode * @see Qt::Key */ - KShortcut( int keyQt ); + TDEShortcut( int keyQt ); /** * Creates a new shortcut that contains only the given qt key * sequence. * @param keySeq the qt key sequence to add */ - KShortcut( const TQKeySequence& keySeq ); + TDEShortcut( const TQKeySequence& keySeq ); /** * Creates a new shortcut that contains only the given key * in its only sequence. * @param key the key to add */ - KShortcut( const KKey& key ); + TDEShortcut( const KKey& key ); /** * Creates a new shortcut that contains only the given key * sequence. * @param keySeq the key sequence to add */ - KShortcut( const KKeySequence& keySeq ); + TDEShortcut( const KKeySequence& keySeq ); /** * Copies the given shortcut. * @param shortcut the shortcut to add */ - KShortcut( const KShortcut& shortcut ); + TDEShortcut( const TDEShortcut& shortcut ); /** * Creates a new key sequence that contains the given key sequence. @@ -599,7 +599,7 @@ class TDECORE_EXPORT KShortcut * @param shortcut the description of the key * @see KKeySequence::KKeySequence(const TQString&) */ - KShortcut( const char* shortcut ); + TDEShortcut( const char* shortcut ); /** * Creates a new key sequence that contains the given key sequence. @@ -608,8 +608,8 @@ class TDECORE_EXPORT KShortcut * @param shortcut the description of the key * @see KKeySequence::KKeySequence(const TQString&) */ - KShortcut( const TQString& shortcut ); - ~KShortcut(); + TDEShortcut( const TQString& shortcut ); + ~TDEShortcut(); /** * Clears the shortcut. The shortcut is null after calling this @@ -648,7 +648,7 @@ class TDECORE_EXPORT KShortcut * Copies the given shortcut. * @param shortcut the shortcut to add */ - bool init( const KShortcut& shortcut ); + bool init( const TDEShortcut& shortcut ); /** * Initializes the key sequence with the given key sequence. @@ -662,7 +662,7 @@ class TDECORE_EXPORT KShortcut /** * Copies the given shortcut over this shortcut. */ - KShortcut& operator =( const KShortcut& cut ) + TDEShortcut& operator =( const TDEShortcut& cut ) { init( cut ); return *this; } /** @@ -708,32 +708,32 @@ class TDECORE_EXPORT KShortcut * beginning until an unequal key sequences has been found. If a shortcut * contains more key sequences, it is considered larger. * @param shortcut the shortcut to compare to - * @return a negative number if the given KShortcut is larger, 0 if - * they are equal and a positive number this KShortcut is larger + * @return a negative number if the given TDEShortcut is larger, 0 if + * they are equal and a positive number this TDEShortcut is larger * @see KKey::compare() * @see KKeyShortcut::compare() */ - int compare( const KShortcut& shortcut ) const; + int compare( const TDEShortcut& shortcut ) const; /** * Compares the sequences of both shortcuts. * @see compare() */ - bool operator == ( const KShortcut& cut ) const + bool operator == ( const TDEShortcut& cut ) const { return compare( cut ) == 0; } /** * Compares the sequences of both shortcuts. * @see compare() */ - bool operator != ( const KShortcut& cut ) const + bool operator != ( const TDEShortcut& cut ) const { return compare( cut ) != 0; } /** * Compares the sequences of both shortcuts. * @see compare() */ - bool operator < ( const KShortcut& cut ) const + bool operator < ( const TDEShortcut& cut ) const { return compare( cut ) < 0; } /** @@ -804,7 +804,7 @@ class TDECORE_EXPORT KShortcut * @see MAX_SEQUENCES * @since 3.2 */ - bool append( const KShortcut& cut ); + bool append( const TDEShortcut& cut ); /** * Converts this shortcut to a key sequence. The first key sequence @@ -824,7 +824,7 @@ class TDECORE_EXPORT KShortcut /** * @internal */ - TQString toStringInternal( const KShortcut* pcutDefault = 0 ) const; + TQString toStringInternal( const TDEShortcut* pcutDefault = 0 ) const; /** * Returns a null shortcut. @@ -832,14 +832,14 @@ class TDECORE_EXPORT KShortcut * @see isNull() * @see clear() */ - static KShortcut& null(); + static TDEShortcut& null(); protected: uint m_nSeqs; KKeySequence m_rgseq[MAX_SEQUENCES]; private: - class KShortcutPrivate* d; + class TDEShortcutPrivate* d; friend class KKeyNative; #ifndef KDE_NO_COMPAT diff --git a/tdecore/kshortcutlist.cpp b/tdecore/kshortcutlist.cpp index dd171062e..d32df889d 100644 --- a/tdecore/kshortcutlist.cpp +++ b/tdecore/kshortcutlist.cpp @@ -12,23 +12,23 @@ #include "kshortcutlist.h" //--------------------------------------------------------------------- -// KShortcutList +// TDEShortcutList //--------------------------------------------------------------------- -KShortcutList::KShortcutList() +TDEShortcutList::TDEShortcutList() { } -KShortcutList::~KShortcutList() +TDEShortcutList::~TDEShortcutList() { } -bool KShortcutList::isGlobal( uint ) const +bool TDEShortcutList::isGlobal( uint ) const { return false; } -int KShortcutList::index( const TQString& sName ) const +int TDEShortcutList::index( const TQString& sName ) const { uint nSize = count(); for( uint i = 0; @@ -39,7 +39,7 @@ int KShortcutList::index( const TQString& sName ) const return -1; } -int KShortcutList::index( const KKeySequence& seq ) const +int TDEShortcutList::index( const KKeySequence& seq ) const { if( seq.isNull() ) return -1; @@ -53,24 +53,24 @@ int KShortcutList::index( const KKeySequence& seq ) const return -1; } -const TDEInstance* KShortcutList::instance() const +const TDEInstance* TDEShortcutList::instance() const { return 0; } -TQVariant KShortcutList::getOther( Other, uint ) const +TQVariant TDEShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KShortcutList::setOther( Other, uint, TQVariant ) +bool TDEShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; + kdDebug(125) << "TDEShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts"); @@ -92,9 +92,9 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* p TQString sEntry = pConfig->readEntry( name(i) ); if( !sEntry.isEmpty() ) { if( sEntry == "none" ) - setShortcut( i, KShortcut() ); + setShortcut( i, TDEShortcut() ); else - setShortcut( i, KShortcut(sEntry) ); + setShortcut( i, TDEShortcut(sEntry) ); } else // default shortcut setShortcut( i, shortcutDefault(i) ); @@ -102,13 +102,13 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* p } } - kdDebug(125) << "KShortcutList::readSettings done" << endl; + kdDebug(125) << "TDEShortcutList::readSettings done" << endl; return true; } -bool KShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const +bool TDEShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const { - kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; + kdDebug(125) << "TDEShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); @@ -149,72 +149,72 @@ bool KShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* } //--------------------------------------------------------------------- -// KAccelShortcutList +// TDEAccelShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate +class TDEAccelShortcutListPrivate { public: TQString m_configGroup; }; -KAccelShortcutList::KAccelShortcutList( KAccel* pAccel ) +TDEAccelShortcutList::TDEAccelShortcutList( TDEAccel* pAccel ) : m_actions( pAccel->actions() ) { - d=new KAccelShortcutListPrivate; + d=new TDEAccelShortcutListPrivate; m_bGlobal = false; d->m_configGroup=pAccel->configGroup(); } -KAccelShortcutList::KAccelShortcutList( TDEGlobalAccel* pAccel ) +TDEAccelShortcutList::TDEAccelShortcutList( TDEGlobalAccel* pAccel ) : m_actions( pAccel->actions() ) { - d=new KAccelShortcutListPrivate; + d=new TDEAccelShortcutListPrivate; m_bGlobal = true; d->m_configGroup=pAccel->configGroup(); } -KAccelShortcutList::KAccelShortcutList( KAccelActions& actions, bool bGlobal ) +TDEAccelShortcutList::TDEAccelShortcutList( TDEAccelActions& actions, bool bGlobal ) : m_actions( actions ) { - d=new KAccelShortcutListPrivate; + d=new TDEAccelShortcutListPrivate; m_bGlobal = bGlobal; } -KAccelShortcutList::~KAccelShortcutList() +TDEAccelShortcutList::~TDEAccelShortcutList() { delete d;} -uint KAccelShortcutList::count() const +uint TDEAccelShortcutList::count() const { return m_actions.count(); } -TQString KAccelShortcutList::name( uint i ) const +TQString TDEAccelShortcutList::name( uint i ) const { return m_actions.actionPtr(i)->name(); } -TQString KAccelShortcutList::label( uint i ) const +TQString TDEAccelShortcutList::label( uint i ) const { return m_actions.actionPtr(i)->label(); } -TQString KAccelShortcutList::whatsThis( uint i ) const +TQString TDEAccelShortcutList::whatsThis( uint i ) const { return m_actions.actionPtr(i)->whatsThis(); } -const KShortcut& KAccelShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEAccelShortcutList::shortcut( uint i ) const { return m_actions.actionPtr(i)->shortcut(); } -const KShortcut& KAccelShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEAccelShortcutList::shortcutDefault( uint i ) const { return m_actions.actionPtr(i)->shortcutDefault(); } -bool KAccelShortcutList::isConfigurable( uint i ) const +bool TDEAccelShortcutList::isConfigurable( uint i ) const { return m_actions.actionPtr(i)->isConfigurable(); } -bool KAccelShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEAccelShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions.actionPtr(i)->setShortcut( cut ); } -TQVariant KAccelShortcutList::getOther( Other, uint ) const +TQVariant TDEAccelShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KAccelShortcutList::isGlobal( uint ) const +bool TDEAccelShortcutList::isGlobal( uint ) const { return m_bGlobal; } -bool KAccelShortcutList::setOther( Other, uint, TQVariant ) +bool TDEAccelShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KAccelShortcutList::save() const +bool TDEAccelShortcutList::save() const { return writeSettings( d->m_configGroup ); } -void KShortcutList::virtual_hook( int, void* ) +void TDEShortcutList::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KAccelShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEAccelShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KStdAccel::ShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEStdAccel::ShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } diff --git a/tdecore/kshortcutlist.h b/tdecore/kshortcutlist.h index 7f4caa079..99e83766b 100644 --- a/tdecore/kshortcutlist.h +++ b/tdecore/kshortcutlist.h @@ -28,31 +28,31 @@ class TQVariant; class TDEConfigBase; class TDEInstance; class KKeySequence; -class KShortcut; +class TDEShortcut; /********************************************************************** * This is a wrapper class which allows a function to use one interface -* to KActionCollection, KAccelActions, and KActionPtrList. +* to TDEActionCollection, TDEAccelActions, and TDEActionPtrList. **********************************************************************/ /** - * KShortcutList is an abstract base class for - * KAccelShortcutList and KStdAccel::ShortcutList. It gives + * TDEShortcutList is an abstract base class for + * TDEAccelShortcutList and TDEStdAccel::ShortcutList. It gives * you an unified interface for accessing the accelerator lists - * of KAccel (using KAccelShortcutList), - * TDEGlobalAccel (using KAccelShortcutList), and - * KStdAccel (using KStdAccel::ShortcutList). + * of TDEAccel (using TDEAccelShortcutList), + * TDEGlobalAccel (using TDEAccelShortcutList), and + * TDEStdAccel (using TDEStdAccel::ShortcutList). * * @short Base class for accessing accelerator lists */ -class TDECORE_EXPORT KShortcutList +class TDECORE_EXPORT TDEShortcutList { public: /** * Default constructor. */ - KShortcutList(); - virtual ~KShortcutList(); + TDEShortcutList(); + virtual ~TDEShortcutList(); /** * Returns the number of entries. @@ -90,7 +90,7 @@ class TDECORE_EXPORT KShortcutList * @return the shortcut * @see shortcutDefault() */ - virtual const KShortcut& shortcut( uint index ) const = 0; + virtual const TDEShortcut& shortcut( uint index ) const = 0; /** * Returns default shortcut with the given @p index. @@ -98,7 +98,7 @@ class TDECORE_EXPORT KShortcutList * @return the default shortcut * @see shortcut() */ - virtual const KShortcut& shortcutDefault( uint index ) const = 0; + virtual const TDEShortcut& shortcutDefault( uint index ) const = 0; /** * Checks whether the shortcut with the given @p index is configurable. @@ -112,7 +112,7 @@ class TDECORE_EXPORT KShortcutList * @param index the index of the shortcut (must be < count()) * @param shortcut the shortcut */ - virtual bool setShortcut( uint index, const KShortcut &shortcut ) = 0; + virtual bool setShortcut( uint index, const TDEShortcut &shortcut ) = 0; /** * Checks whether the shortcut with the given @p index is saved in the @@ -180,56 +180,56 @@ class TDECORE_EXPORT KShortcutList /// used to extend the interface with virtuals without breaking binary compatibility virtual void virtual_hook( int id, void* data ); private: - class KShortcutListPrivate* d; + class TDEShortcutListPrivate* d; }; //--------------------------------------------------------------------- -// KAccelShortcutList +// TDEAccelShortcutList //--------------------------------------------------------------------- -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEGlobalAccel; /** - * KShortcutList implementation to access KAccel and + * TDEShortcutList implementation to access TDEAccel and * TDEGlobalAccel lists. */ -class TDECORE_EXPORT KAccelShortcutList : public KShortcutList +class TDECORE_EXPORT TDEAccelShortcutList : public TDEShortcutList { public: /** - * Creates a new KShortcutList that accesses the given KAccel. + * Creates a new TDEShortcutList that accesses the given TDEAccel. * @param accel the accelerators to access */ - KAccelShortcutList( KAccel* accel ); + TDEAccelShortcutList( TDEAccel* accel ); /** - * Creates a new KShortcutList that accesses the given + * Creates a new TDEShortcutList that accesses the given * TDEGlobalAccel. * @param accel the accelerators to access */ - KAccelShortcutList( TDEGlobalAccel* accel ); + TDEAccelShortcutList( TDEGlobalAccel* accel ); /** * @internal - * Creates a new KShortcutList that accesses the given - * KAccelActions collection. + * Creates a new TDEShortcutList that accesses the given + * TDEAccelActions collection. * @param actions the actions to access * @param bGlobal true to save the actions in the global * configuration file */ - KAccelShortcutList( KAccelActions &actions, bool bGlobal ); - virtual ~KAccelShortcutList(); + TDEAccelShortcutList( TDEAccelActions &actions, bool bGlobal ); + virtual ~TDEAccelShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index , const KShortcut& shortcut ); + virtual bool setShortcut( uint index , const TDEShortcut& shortcut ); virtual bool isGlobal( uint index ) const; /** \internal */ @@ -241,26 +241,26 @@ class TDECORE_EXPORT KAccelShortcutList : public KShortcutList protected: /** Actions (collection) for this shortcut list. Set by constructor. */ - KAccelActions& m_actions; + TDEAccelActions& m_actions; /** Is this shortcut list global? Access through isGlobal() */ bool m_bGlobal; protected: virtual void virtual_hook( int id, void* data ); private: - class KAccelShortcutListPrivate* d; + class TDEAccelShortcutListPrivate* d; }; -namespace KStdAccel { +namespace TDEStdAccel { //--------------------------------------------------------------------- // ShortcutList //--------------------------------------------------------------------- /** - * KShortcutList implementation that accesses KStdAccel + * TDEShortcutList implementation that accesses TDEStdAccel * actions. */ -class TDECORE_EXPORT ShortcutList : public KShortcutList +class TDECORE_EXPORT ShortcutList : public TDEShortcutList { public: /** @@ -273,10 +273,10 @@ class TDECORE_EXPORT ShortcutList : public KShortcutList virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index , const KShortcut& shortcut ); + virtual bool setShortcut( uint index , const TDEShortcut& shortcut ); /** \internal */ virtual TQVariant getOther( Other, uint index ) const; diff --git a/tdecore/kshortcutmenu.cpp b/tdecore/kshortcutmenu.cpp index 4bf18d965..be485fb7e 100644 --- a/tdecore/kshortcutmenu.cpp +++ b/tdecore/kshortcutmenu.cpp @@ -27,7 +27,7 @@ #include "kshortcutmenu.h" //#include -KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq ) +TDEShortcutMenu::TDEShortcutMenu( TQWidget* pParent, TDEAccelActions* pActions, KKeySequence seq ) : TQPopupMenu( pParent ), m_pActions( pActions ), m_seq( seq ) @@ -44,9 +44,9 @@ KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySe insertItem( pTitle ); } -bool KShortcutMenu::insertAction( uint iAction, KKeySequence seq ) +bool TDEShortcutMenu::insertAction( uint iAction, KKeySequence seq ) { - KAccelAction* pAction = m_pActions->actionPtr( iAction ); + TDEAccelAction* pAction = m_pActions->actionPtr( iAction ); if( pAction ) { insertItem( "", iAction ); @@ -57,14 +57,14 @@ bool KShortcutMenu::insertAction( uint iAction, KKeySequence seq ) } -void KShortcutMenu::updateShortcuts() +void TDEShortcutMenu::updateShortcuts() { pTitle->setText( m_seq.toString() + ",..." ); for( uint iItem = 1; iItem < count(); iItem++ ) { int iAction = idAt( iItem ); if( iAction >= 0 ) { - KAccelAction* pAction = m_pActions->actionPtr( iAction ); + TDEAccelAction* pAction = m_pActions->actionPtr( iAction ); if( pAction ) { KKeySequence seq = m_seqs[iItem]; TQString sSeq = seq.key(m_seq.count()).toString(); @@ -78,7 +78,7 @@ void KShortcutMenu::updateShortcuts() } } -void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent ) +void TDEShortcutMenu::keyPressEvent( TQKeyEvent* pEvent ) { kdDebug() << "keypress; " << pEvent->key() << endl; KKey key( pEvent ); @@ -117,7 +117,7 @@ void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent ) } } -int KShortcutMenu::searchForKey( KKey key ) +int TDEShortcutMenu::searchForKey( KKey key ) { int iItemFound = -1; // -1 indicates no match uint iKey = m_seq.count(); @@ -138,7 +138,7 @@ int KShortcutMenu::searchForKey( KKey key ) return iItemFound; } -void KShortcutMenu::keepItemsMatching( KKey key ) +void TDEShortcutMenu::keepItemsMatching( KKey key ) { kdDebug(125) << "MyAccel::keepItemsMatching( " << key.toStringInternal() << " )" << endl; diff --git a/tdecore/kshortcutmenu.h b/tdecore/kshortcutmenu.h index 2c682342d..6e01cdd95 100644 --- a/tdecore/kshortcutmenu.h +++ b/tdecore/kshortcutmenu.h @@ -27,16 +27,16 @@ class TQLabel; -class KAccelActions; +class TDEAccelActions; /** * @internal */ -class TDECORE_EXPORT KShortcutMenu : public TQPopupMenu +class TDECORE_EXPORT TDEShortcutMenu : public TQPopupMenu { Q_OBJECT public: - KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq ); + TDEShortcutMenu( TQWidget* pParent, TDEAccelActions* pActions, KKeySequence seq ); bool insertAction( uint iAction, KKeySequence seq ); @@ -52,7 +52,7 @@ class TDECORE_EXPORT KShortcutMenu : public TQPopupMenu private: typedef TQMap IndexToKKeySequence; - KAccelActions* m_pActions; + TDEAccelActions* m_pActions; KKeySequence m_seq; TQLabel* pTitle; IndexToKKeySequence m_seqs; diff --git a/tdecore/kstdaccel.cpp b/tdecore/kstdaccel.cpp index afc49aac4..ac1381c88 100644 --- a/tdecore/kstdaccel.cpp +++ b/tdecore/kstdaccel.cpp @@ -30,84 +30,84 @@ #include #include -namespace KStdAccel +namespace TDEStdAccel { -struct KStdAccelInfo +struct TDEStdAccelInfo { StdAccel id; const char* psName; const char* psDesc; int cutDefault, cutDefault4, cutDefault3B, cutDefault4B; - KShortcut cut; + TDEShortcut cut; bool bInitialized; }; -/** Array of predefined KStdAccelInfo objects, which cover all +/** Array of predefined TDEStdAccelInfo objects, which cover all the "standard" accelerators. Each enum value from StdAccel should appear in this table. */ -static KStdAccelInfo g_infoStdAccel[] = +static TDEStdAccelInfo g_infoStdAccel[] = { - {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, KShortcut(), false }, - { Open, I18N_NOOP("Open"), 0, Qt::CTRL+Qt::Key_O, 0, 0, 0, KShortcut(), false }, - { New, I18N_NOOP("New"), 0, Qt::CTRL+Qt::Key_N, 0, 0, 0, KShortcut(), false }, - { Close, I18N_NOOP("Close"), 0, Qt::CTRL+Qt::Key_W, Qt::CTRL+Qt::Key_Escape, 0, Qt::CTRL+Qt::Key_W, KShortcut(), false }, - { Save, I18N_NOOP("Save"), 0, Qt::CTRL+Qt::Key_S, 0, 0, 0, KShortcut(), false }, - { Print, I18N_NOOP("Print"), 0, Qt::CTRL+Qt::Key_P, 0, 0, 0, KShortcut(), false }, - { Quit, I18N_NOOP("Quit"), 0, Qt::CTRL+Qt::Key_Q, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, KShortcut(), false }, - { Undo, I18N_NOOP("Undo"), 0, Qt::CTRL+Qt::Key_Z, 0, 0, 0, KShortcut(), false }, - { Redo, I18N_NOOP("Redo"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Z, 0, 0, 0, KShortcut(), false }, - { Cut, I18N_NOOP("Cut"), 0, Qt::CTRL+Qt::Key_X, 0, Qt::SHIFT+Qt::Key_Delete, 0, KShortcut(), false }, - { Copy, I18N_NOOP("Copy"), 0, Qt::CTRL+Qt::Key_C, 0, Qt::CTRL+Qt::Key_Insert, 0, KShortcut(), false }, - { Paste, I18N_NOOP("Paste"), 0, Qt::CTRL+Qt::Key_V, 0, Qt::SHIFT+Qt::Key_Insert, 0, KShortcut(), false }, - { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, 0, KShortcut(), false }, - { SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL+Qt::Key_A, 0, 0, 0, KShortcut(), false }, - { Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_A, 0, 0, 0, KShortcut(), false }, - { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL+Qt::Key_Backspace, 0, 0, 0, KShortcut(), false }, - { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL+Qt::Key_Delete, 0, 0, 0, KShortcut(), false }, - { Find, I18N_NOOP("Find"), 0, Qt::CTRL+Qt::Key_F, 0, 0, 0, KShortcut(), false }, - { FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, KShortcut(), false }, - { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT+Qt::Key_F3, 0, 0, 0, KShortcut(), false }, - { Replace, I18N_NOOP("Replace"), 0, Qt::CTRL+Qt::Key_R, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, KShortcut(), false }, - { Home, I18N_NOOP2("Opposite to End","Home"), 0, Qt::CTRL+Qt::Key_Home, 0, Qt::Key_HomePage, 0, KShortcut(), false }, - { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, KShortcut(), false }, - { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, KShortcut(), false}, - { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, KShortcut(), false}, - { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, KShortcut(), false }, - { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, KShortcut(), false }, - { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, KShortcut(), false }, - { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, KShortcut(), false }, - { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, KShortcut(), false }, - { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL+Qt::Key_Minus, 0, 0, 0, KShortcut(), false }, - { Up, I18N_NOOP("Up"), 0, Qt::ALT+Qt::Key_Up, 0, 0, 0, KShortcut(), false }, - { Back, I18N_NOOP("Back"), 0, Qt::ALT+Qt::Key_Left, 0, Qt::Key_Back, 0, KShortcut(), false }, - { Forward, I18N_NOOP("Forward"), 0, Qt::ALT+Qt::Key_Right, 0, Qt::Key_Forward, 0, KShortcut(), false }, - { Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, KShortcut(), false }, - { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, KShortcut(), false }, - { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL+Qt::Key_M, 0, 0, 0, KShortcut(), false }, - { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL+Qt::Key_Left, 0, 0, 0, KShortcut(), false }, - { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL+Qt::Key_Right, 0, 0, 0, KShortcut(), false }, - { TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL+Qt::Key_Period, 0, Qt::CTRL+Qt::Key_BracketRight, 0, KShortcut(), false }, - { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL+Qt::Key_Comma, 0, Qt::CTRL+Qt::Key_BracketLeft, 0, KShortcut(), false }, - { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL+Qt::SHIFT+Qt::Key_F, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, KShortcut(), false }, - { Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, KShortcut(), false }, - { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT+Qt::Key_F1, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, KShortcut(), false }, - { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL+Qt::Key_E, 0, 0, 0, KShortcut(), false }, - { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL+Qt::Key_Up, 0, 0, 0, KShortcut(), false }, - { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL+Qt::Key_Down, 0, 0, 0, KShortcut(), false }, - { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL+Qt::Key_T, 0, 0, 0, KShortcut(), false }, - { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, KShortcut(), false }, - { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, KShortcut(), false }, - { AccelNone, 0, 0, 0, 0, 0, 0, KShortcut(), false } + {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, TDEShortcut(), false }, + { Open, I18N_NOOP("Open"), 0, Qt::CTRL+Qt::Key_O, 0, 0, 0, TDEShortcut(), false }, + { New, I18N_NOOP("New"), 0, Qt::CTRL+Qt::Key_N, 0, 0, 0, TDEShortcut(), false }, + { Close, I18N_NOOP("Close"), 0, Qt::CTRL+Qt::Key_W, Qt::CTRL+Qt::Key_Escape, 0, Qt::CTRL+Qt::Key_W, TDEShortcut(), false }, + { Save, I18N_NOOP("Save"), 0, Qt::CTRL+Qt::Key_S, 0, 0, 0, TDEShortcut(), false }, + { Print, I18N_NOOP("Print"), 0, Qt::CTRL+Qt::Key_P, 0, 0, 0, TDEShortcut(), false }, + { Quit, I18N_NOOP("Quit"), 0, Qt::CTRL+Qt::Key_Q, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, TDEShortcut(), false }, + { Undo, I18N_NOOP("Undo"), 0, Qt::CTRL+Qt::Key_Z, 0, 0, 0, TDEShortcut(), false }, + { Redo, I18N_NOOP("Redo"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Z, 0, 0, 0, TDEShortcut(), false }, + { Cut, I18N_NOOP("Cut"), 0, Qt::CTRL+Qt::Key_X, 0, Qt::SHIFT+Qt::Key_Delete, 0, TDEShortcut(), false }, + { Copy, I18N_NOOP("Copy"), 0, Qt::CTRL+Qt::Key_C, 0, Qt::CTRL+Qt::Key_Insert, 0, TDEShortcut(), false }, + { Paste, I18N_NOOP("Paste"), 0, Qt::CTRL+Qt::Key_V, 0, Qt::SHIFT+Qt::Key_Insert, 0, TDEShortcut(), false }, + { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, 0, TDEShortcut(), false }, + { SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL+Qt::Key_A, 0, 0, 0, TDEShortcut(), false }, + { Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_A, 0, 0, 0, TDEShortcut(), false }, + { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL+Qt::Key_Backspace, 0, 0, 0, TDEShortcut(), false }, + { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL+Qt::Key_Delete, 0, 0, 0, TDEShortcut(), false }, + { Find, I18N_NOOP("Find"), 0, Qt::CTRL+Qt::Key_F, 0, 0, 0, TDEShortcut(), false }, + { FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, TDEShortcut(), false }, + { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT+Qt::Key_F3, 0, 0, 0, TDEShortcut(), false }, + { Replace, I18N_NOOP("Replace"), 0, Qt::CTRL+Qt::Key_R, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, TDEShortcut(), false }, + { Home, I18N_NOOP2("Opposite to End","Home"), 0, Qt::CTRL+Qt::Key_Home, 0, Qt::Key_HomePage, 0, TDEShortcut(), false }, + { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, TDEShortcut(), false }, + { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, TDEShortcut(), false}, + { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, TDEShortcut(), false}, + { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, TDEShortcut(), false }, + { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, TDEShortcut(), false }, + { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, TDEShortcut(), false }, + { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, TDEShortcut(), false }, + { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, TDEShortcut(), false }, + { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL+Qt::Key_Minus, 0, 0, 0, TDEShortcut(), false }, + { Up, I18N_NOOP("Up"), 0, Qt::ALT+Qt::Key_Up, 0, 0, 0, TDEShortcut(), false }, + { Back, I18N_NOOP("Back"), 0, Qt::ALT+Qt::Key_Left, 0, Qt::Key_Back, 0, TDEShortcut(), false }, + { Forward, I18N_NOOP("Forward"), 0, Qt::ALT+Qt::Key_Right, 0, Qt::Key_Forward, 0, TDEShortcut(), false }, + { Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, TDEShortcut(), false }, + { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, TDEShortcut(), false }, + { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL+Qt::Key_M, 0, 0, 0, TDEShortcut(), false }, + { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL+Qt::Key_Left, 0, 0, 0, TDEShortcut(), false }, + { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL+Qt::Key_Right, 0, 0, 0, TDEShortcut(), false }, + { TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL+Qt::Key_Period, 0, Qt::CTRL+Qt::Key_BracketRight, 0, TDEShortcut(), false }, + { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL+Qt::Key_Comma, 0, Qt::CTRL+Qt::Key_BracketLeft, 0, TDEShortcut(), false }, + { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL+Qt::SHIFT+Qt::Key_F, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, TDEShortcut(), false }, + { Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, TDEShortcut(), false }, + { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT+Qt::Key_F1, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, TDEShortcut(), false }, + { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL+Qt::Key_E, 0, 0, 0, TDEShortcut(), false }, + { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL+Qt::Key_Up, 0, 0, 0, TDEShortcut(), false }, + { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL+Qt::Key_Down, 0, 0, 0, TDEShortcut(), false }, + { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL+Qt::Key_T, 0, 0, 0, TDEShortcut(), false }, + { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, TDEShortcut(), false }, + { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, TDEShortcut(), false }, + { AccelNone, 0, 0, 0, 0, 0, 0, TDEShortcut(), false } }; -/** Search for the KStdAccelInfo object associated with the given @p id. */ -static KStdAccelInfo* infoPtr( StdAccel id ) +/** Search for the TDEStdAccelInfo object associated with the given @p id. */ +static TDEStdAccelInfo* infoPtr( StdAccel id ) { if( id != AccelNone ) { // Linear search. Changing the data structure doesn't seem possible @@ -127,10 +127,10 @@ static KStdAccelInfo* infoPtr( StdAccel id ) static void initialize( StdAccel id ) { TDEConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" ); - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) { - kdWarning(125) << "KStdAccel: id not found!" << endl; // -- ellis + kdWarning(125) << "TDEStdAccel: id not found!" << endl; // -- ellis return; } @@ -147,7 +147,7 @@ static void initialize( StdAccel id ) TQString name( StdAccel id ) { - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) return TQString::null; return pInfo->psName; @@ -155,27 +155,27 @@ TQString name( StdAccel id ) TQString label( StdAccel id ) { - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) return TQString::null; return i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName); } -// TODO: Add psWhatsThis entry to KStdAccelInfo +// TODO: Add psWhatsThis entry to TDEStdAccelInfo TQString whatsThis( StdAccel /*id*/ ) { -// KStdAccelInfo* pInfo = infoPtr( id ); +// TDEStdAccelInfo* pInfo = infoPtr( id ); // if( pInfo && pInfo->psWhatsThis ) // return i18n(pInfo->psWhatsThis); // else return TQString::null; } -const KShortcut& shortcut( StdAccel id ) +const TDEShortcut& shortcut( StdAccel id ) { - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) - return KShortcut::null(); + return TDEShortcut::null(); if( !pInfo->bInitialized ) initialize( id ); @@ -199,17 +199,17 @@ StdAccel findStdAccel( const KKeySequence& seq ) return AccelNone; } -KShortcut shortcutDefault( StdAccel id ) +TDEShortcut shortcutDefault( StdAccel id ) { - return (KAccelAction::useFourModifierKeys()) + return (TDEAccelAction::useFourModifierKeys()) ? shortcutDefault4(id) : shortcutDefault3(id); } -KShortcut shortcutDefault3( StdAccel id ) +TDEShortcut shortcutDefault3( StdAccel id ) { - KShortcut cut; + TDEShortcut cut; - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( pInfo ) { if( pInfo->cutDefault ) cut.init( pInfo->cutDefault ); @@ -222,13 +222,13 @@ KShortcut shortcutDefault3( StdAccel id ) return cut; } -KShortcut shortcutDefault4( StdAccel id ) +TDEShortcut shortcutDefault4( StdAccel id ) { - KShortcut cut; + TDEShortcut cut; - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( pInfo ) { - KStdAccelInfo& info = *pInfo; + TDEStdAccelInfo& info = *pInfo; KKeySequence key2; cut.init( (info.cutDefault4) ? @@ -247,13 +247,13 @@ KShortcut shortcutDefault4( StdAccel id ) } #if 0 // unused -void createAccelActions( KAccelActions& actions ) +void createAccelActions( TDEAccelActions& actions ) { actions.clear(); for( uint i = 0; g_infoStdAccel[i].psName != 0; i++ ) { StdAccel id = g_infoStdAccel[i].id; - KStdAccelInfo* pInfo = &g_infoStdAccel[i]; + TDEStdAccelInfo* pInfo = &g_infoStdAccel[i]; if( id != AccelNone ) { actions.insert( pInfo->psName, @@ -267,54 +267,54 @@ void createAccelActions( KAccelActions& actions ) } #endif -const KShortcut& open() { return shortcut( Open ); } -const KShortcut& openNew() { return shortcut( New ); } -const KShortcut& close() { return shortcut( Close ); } -const KShortcut& save() { return shortcut( Save ); } -const KShortcut& print() { return shortcut( Print ); } -const KShortcut& quit() { return shortcut( Quit ); } -const KShortcut& cut() { return shortcut( Cut ); } -const KShortcut& copy() { return shortcut( Copy ); } -const KShortcut& paste() { return shortcut( Paste ); } -const KShortcut& pasteSelection() { return shortcut( PasteSelection ); } -const KShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); } -const KShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); } -const KShortcut& undo() { return shortcut( Undo ); } -const KShortcut& redo() { return shortcut( Redo ); } -const KShortcut& find() { return shortcut( Find ); } -const KShortcut& findNext() { return shortcut( FindNext ); } -const KShortcut& findPrev() { return shortcut( FindPrev ); } -const KShortcut& replace() { return shortcut( Replace ); } -const KShortcut& home() { return shortcut( Home ); } -const KShortcut& end() { return shortcut( End ); } -const KShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); } -const KShortcut& endOfLine() { return shortcut( EndOfLine ); } -const KShortcut& prior() { return shortcut( Prior ); } -const KShortcut& next() { return shortcut( Next ); } -const KShortcut& backwardWord() { return shortcut( BackwardWord ); } -const KShortcut& forwardWord() { return shortcut( ForwardWord ); } -const KShortcut& gotoLine() { return shortcut( GotoLine ); } -const KShortcut& addBookmark() { return shortcut( AddBookmark ); } -const KShortcut& tabNext() { return shortcut( TabNext ); } -const KShortcut& tabPrev() { return shortcut( TabPrev ); } -const KShortcut& fullScreen() { return shortcut( FullScreen ); } -const KShortcut& zoomIn() { return shortcut( ZoomIn ); } -const KShortcut& zoomOut() { return shortcut( ZoomOut ); } -const KShortcut& help() { return shortcut( Help ); } -const KShortcut& completion() { return shortcut( TextCompletion ); } -const KShortcut& prevCompletion() { return shortcut( PrevCompletion ); } -const KShortcut& nextCompletion() { return shortcut( NextCompletion ); } -const KShortcut& rotateUp() { return shortcut( RotateUp ); } -const KShortcut& rotateDown() { return shortcut( RotateDown ); } -const KShortcut& substringCompletion() { return shortcut( SubstringCompletion ); } -const KShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); } -const KShortcut& whatsThis() { return shortcut( WhatsThis ); } -const KShortcut& reload() { return shortcut( Reload ); } -const KShortcut& selectAll() { return shortcut( SelectAll ); } -const KShortcut& up() { return shortcut( Up ); } -const KShortcut& back() { return shortcut( Back ); } -const KShortcut& forward() { return shortcut( Forward ); } -const KShortcut& showMenubar() { return shortcut( ShowMenubar ); } +const TDEShortcut& open() { return shortcut( Open ); } +const TDEShortcut& openNew() { return shortcut( New ); } +const TDEShortcut& close() { return shortcut( Close ); } +const TDEShortcut& save() { return shortcut( Save ); } +const TDEShortcut& print() { return shortcut( Print ); } +const TDEShortcut& quit() { return shortcut( Quit ); } +const TDEShortcut& cut() { return shortcut( Cut ); } +const TDEShortcut& copy() { return shortcut( Copy ); } +const TDEShortcut& paste() { return shortcut( Paste ); } +const TDEShortcut& pasteSelection() { return shortcut( PasteSelection ); } +const TDEShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); } +const TDEShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); } +const TDEShortcut& undo() { return shortcut( Undo ); } +const TDEShortcut& redo() { return shortcut( Redo ); } +const TDEShortcut& find() { return shortcut( Find ); } +const TDEShortcut& findNext() { return shortcut( FindNext ); } +const TDEShortcut& findPrev() { return shortcut( FindPrev ); } +const TDEShortcut& replace() { return shortcut( Replace ); } +const TDEShortcut& home() { return shortcut( Home ); } +const TDEShortcut& end() { return shortcut( End ); } +const TDEShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); } +const TDEShortcut& endOfLine() { return shortcut( EndOfLine ); } +const TDEShortcut& prior() { return shortcut( Prior ); } +const TDEShortcut& next() { return shortcut( Next ); } +const TDEShortcut& backwardWord() { return shortcut( BackwardWord ); } +const TDEShortcut& forwardWord() { return shortcut( ForwardWord ); } +const TDEShortcut& gotoLine() { return shortcut( GotoLine ); } +const TDEShortcut& addBookmark() { return shortcut( AddBookmark ); } +const TDEShortcut& tabNext() { return shortcut( TabNext ); } +const TDEShortcut& tabPrev() { return shortcut( TabPrev ); } +const TDEShortcut& fullScreen() { return shortcut( FullScreen ); } +const TDEShortcut& zoomIn() { return shortcut( ZoomIn ); } +const TDEShortcut& zoomOut() { return shortcut( ZoomOut ); } +const TDEShortcut& help() { return shortcut( Help ); } +const TDEShortcut& completion() { return shortcut( TextCompletion ); } +const TDEShortcut& prevCompletion() { return shortcut( PrevCompletion ); } +const TDEShortcut& nextCompletion() { return shortcut( NextCompletion ); } +const TDEShortcut& rotateUp() { return shortcut( RotateUp ); } +const TDEShortcut& rotateDown() { return shortcut( RotateDown ); } +const TDEShortcut& substringCompletion() { return shortcut( SubstringCompletion ); } +const TDEShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); } +const TDEShortcut& whatsThis() { return shortcut( WhatsThis ); } +const TDEShortcut& reload() { return shortcut( Reload ); } +const TDEShortcut& selectAll() { return shortcut( SelectAll ); } +const TDEShortcut& up() { return shortcut( Up ); } +const TDEShortcut& back() { return shortcut( Back ); } +const TDEShortcut& forward() { return shortcut( Forward ); } +const TDEShortcut& showMenubar() { return shortcut( ShowMenubar ); } //--------------------------------------------------------------------- // ShortcutList @@ -345,24 +345,24 @@ TQString ShortcutList::label( uint i ) const TQString ShortcutList::whatsThis( uint ) const { return TQString::null; } -const KShortcut& ShortcutList::shortcut( uint i ) const +const TDEShortcut& ShortcutList::shortcut( uint i ) const { if( !g_infoStdAccel[i].bInitialized ) initialize( g_infoStdAccel[i].id ); return g_infoStdAccel[i].cut; } -const KShortcut& ShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& ShortcutList::shortcutDefault( uint i ) const { - static KShortcut cut; - cut = KStdAccel::shortcutDefault( g_infoStdAccel[i].id ); + static TDEShortcut cut; + cut = TDEStdAccel::shortcutDefault( g_infoStdAccel[i].id ); return cut; } bool ShortcutList::isConfigurable( uint i ) const { return (g_infoStdAccel[i].id != AccelNone); } -bool ShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool ShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { g_infoStdAccel[i].cut = cut; return true; } TQVariant ShortcutList::getOther( Other, uint ) const diff --git a/tdecore/kstdaccel.h b/tdecore/kstdaccel.h index 813255cc3..580204673 100644 --- a/tdecore/kstdaccel.h +++ b/tdecore/kstdaccel.h @@ -25,20 +25,20 @@ #include "tdelibs_export.h" class TQKeyEvent; -class KAccelActions; +class TDEAccelActions; /** - * \namespace KStdAccel + * \namespace TDEStdAccel * Convenient methods for access to the common accelerator keys in * the key configuration. These are the standard keybindings that should * be used in all KDE applications. They will be configurable, * so do not hardcode the default behavior. * * If you want real configurable keybindings in your applications, - * please checkout the class KAccel in kaccel.h - * @see KAccelShortcutList + * please checkout the class TDEAccel in kaccel.h + * @see TDEAccelShortcutList */ -namespace KStdAccel +namespace TDEStdAccel { // Always add new std-accels to the end of this enum, never in the middle! /** @@ -87,7 +87,7 @@ namespace KStdAccel * Returns the keybinding for @p accel. * @param id the id of the accelerator */ - TDECORE_EXPORT const KShortcut& shortcut(StdAccel id); + TDECORE_EXPORT const TDEShortcut& shortcut(StdAccel id); /** * Returns a unique name for the given accel. @@ -126,326 +126,326 @@ namespace KStdAccel * @param id the id of the accelerator * @return the default shortcut of the accelerator */ - TDECORE_EXPORT KShortcut shortcutDefault(StdAccel id); + TDECORE_EXPORT TDEShortcut shortcutDefault(StdAccel id); /** * Returns the hardcoded default 3 modifier shortcut for @p id. * This does not take into account the user's configuration. * @param id the id of the accelerator * @return the default 3 modifier shortcut */ - TDECORE_EXPORT KShortcut shortcutDefault3(StdAccel id); + TDECORE_EXPORT TDEShortcut shortcutDefault3(StdAccel id); /** * Returns the hardcoded default 4 modifier shortcut for @p id. * This does not take into account the user's configuration. * @param id the id of the accelerator * @return the default 4 modifier shortcut */ - TDECORE_EXPORT KShortcut shortcutDefault4(StdAccel id); + TDECORE_EXPORT TDEShortcut shortcutDefault4(StdAccel id); /** * Open file. Default: Ctrl-o * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& open(); + TDECORE_EXPORT const TDEShortcut& open(); /** * Create a new document (or whatever). Default: Ctrl-n * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& openNew(); + TDECORE_EXPORT const TDEShortcut& openNew(); /** * Close current document. Default: Ctrl-w * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& close(); + TDECORE_EXPORT const TDEShortcut& close(); /** * Save current document. Default: Ctrl-s * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& save(); + TDECORE_EXPORT const TDEShortcut& save(); /** * Print current document. Default: Ctrl-p * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& print(); + TDECORE_EXPORT const TDEShortcut& print(); /** * Quit the program. Default: Ctrl-q * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& quit(); + TDECORE_EXPORT const TDEShortcut& quit(); /** * Undo last operation. Default: Ctrl-z * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& undo(); + TDECORE_EXPORT const TDEShortcut& undo(); /** * Redo. Default: Shift-Ctrl-z * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& redo(); + TDECORE_EXPORT const TDEShortcut& redo(); /** * Cut selected area and store it in the clipboard. Default: Ctrl-x * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& cut(); + TDECORE_EXPORT const TDEShortcut& cut(); /** * Copy selected area into the clipboard. Default: Ctrl-c * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& copy(); + TDECORE_EXPORT const TDEShortcut& copy(); /** * Paste contents of clipboard at mouse/cursor position. Default: Ctrl-v * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& paste(); + TDECORE_EXPORT const TDEShortcut& paste(); /** * Paste the selection at mouse/cursor position. Default: Ctrl-Shift-Insert * @return the shortcut of the standard accelerator * @since 3.4 */ - TDECORE_EXPORT const KShortcut& pasteSelection(); + TDECORE_EXPORT const TDEShortcut& pasteSelection(); /** * Reload. Default: Ctrl-A * @return the shortcut of the standard accelerator **/ - TDECORE_EXPORT const KShortcut& selectAll(); + TDECORE_EXPORT const TDEShortcut& selectAll(); /** * Delete a word back from mouse/cursor position. Default: Ctrl-Backspace * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& deleteWordBack(); + TDECORE_EXPORT const TDEShortcut& deleteWordBack(); /** * Delete a word forward from mouse/cursor position. Default: Ctrl-Delete * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& deleteWordForward(); + TDECORE_EXPORT const TDEShortcut& deleteWordForward(); /** * Find, search. Default: Ctrl-f * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& find(); + TDECORE_EXPORT const TDEShortcut& find(); /** * Find/search next. Default: F3 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& findNext(); + TDECORE_EXPORT const TDEShortcut& findNext(); /** * Find/search previous. Default: Shift-F3 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& findPrev(); + TDECORE_EXPORT const TDEShortcut& findPrev(); /** * Find and replace matches. Default: Ctrl-r * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& replace(); + TDECORE_EXPORT const TDEShortcut& replace(); /** * Zoom in. Default: Ctrl-Plus * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& zoomIn(); + TDECORE_EXPORT const TDEShortcut& zoomIn(); /** * Zoom out. Default: Ctrl-Minus * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& zoomOut(); + TDECORE_EXPORT const TDEShortcut& zoomOut(); /** * Toggle insert/overwrite (with visual feedback, e.g. in the statusbar). Default: Insert * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& insert(); + TDECORE_EXPORT const TDEShortcut& insert(); /** * Goto beginning of the document. Default: Ctrl-Home * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& home(); + TDECORE_EXPORT const TDEShortcut& home(); /** * Goto end of the document. Default: Ctrl-End * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& end(); + TDECORE_EXPORT const TDEShortcut& end(); /** * Goto beginning of current line. Default: Home * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& beginningOfLine(); + TDECORE_EXPORT const TDEShortcut& beginningOfLine(); /** * Goto end of current line. Default: End * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& endOfLine(); + TDECORE_EXPORT const TDEShortcut& endOfLine(); /** * Scroll up one page. Default: Prior * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& prior(); + TDECORE_EXPORT const TDEShortcut& prior(); /** * Scroll down one page. Default: Next * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& next(); + TDECORE_EXPORT const TDEShortcut& next(); /** * Go to line. Default: Ctrl+G * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& gotoLine(); + TDECORE_EXPORT const TDEShortcut& gotoLine(); /** * Add current page to bookmarks. Default: Ctrl+B * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& addBookmark(); + TDECORE_EXPORT const TDEShortcut& addBookmark(); /** * Next Tab. Default: Ctrl-< * @return the shortcut of the standard accelerator * @since 3.2 */ - TDECORE_EXPORT const KShortcut& tabNext(); + TDECORE_EXPORT const TDEShortcut& tabNext(); /** * Previous Tab. Default: Ctrl-> * @return the shortcut of the standard accelerator * @since 3.2 */ - TDECORE_EXPORT const KShortcut& tabPrev(); + TDECORE_EXPORT const TDEShortcut& tabPrev(); /** * Full Screen Mode. Default: Ctrl+Shift+F * @return the shortcut of the standard accelerator * @since 3.2 */ - TDECORE_EXPORT const KShortcut& fullScreen(); + TDECORE_EXPORT const TDEShortcut& fullScreen(); /** * Help the user in the current situation. Default: F1 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& help(); + TDECORE_EXPORT const TDEShortcut& help(); /** * Complete text in input widgets. Default Ctrl+E * @return the shortcut of the standard accelerator **/ - TDECORE_EXPORT const KShortcut& completion(); + TDECORE_EXPORT const TDEShortcut& completion(); /** * Iterate through a list when completion returns * multiple items. Default: Ctrl+Up * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& prevCompletion(); + TDECORE_EXPORT const TDEShortcut& prevCompletion(); /** * Iterate through a list when completion returns * multiple items. Default: Ctrl+Down * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& nextCompletion(); + TDECORE_EXPORT const TDEShortcut& nextCompletion(); /** * Find a string within another string or list of strings. * Default: Ctrl-T * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& substringCompletion(); + TDECORE_EXPORT const TDEShortcut& substringCompletion(); /** * Help users iterate through a list of entries. Default: Up * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& rotateUp(); + TDECORE_EXPORT const TDEShortcut& rotateUp(); /** * Help users iterate through a list of entries. Default: Down * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& rotateDown(); + TDECORE_EXPORT const TDEShortcut& rotateDown(); /** * popup a context menu. Default: Menu * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& popupMenuContext(); + TDECORE_EXPORT const TDEShortcut& popupMenuContext(); /** * What's This button. Default: Shift+F1 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& whatsThis(); + TDECORE_EXPORT const TDEShortcut& whatsThis(); /** * Reload. Default: F5 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& reload(); + TDECORE_EXPORT const TDEShortcut& reload(); /** * Up. Default: Alt+Up * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& up(); + TDECORE_EXPORT const TDEShortcut& up(); /** * Back. Default: Alt+Left * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& back(); + TDECORE_EXPORT const TDEShortcut& back(); /** * Forward. Default: ALT+Right * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& forward(); + TDECORE_EXPORT const TDEShortcut& forward(); /** * BackwardWord. Default: Ctrl+Left * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& backwardWord(); + TDECORE_EXPORT const TDEShortcut& backwardWord(); /** * ForwardWord. Default: Ctrl+Right * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& forwardWord(); + TDECORE_EXPORT const TDEShortcut& forwardWord(); /** * Show Menu Bar. Default: Ctrl-M * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& showMenubar(); + TDECORE_EXPORT const TDEShortcut& showMenubar(); #if !defined(KDE_NO_COMPAT) && !defined(__KSTDACCEL_CPP_) /** diff --git a/tdecore/tdeconfigdialogmanager.cpp b/tdecore/tdeconfigdialogmanager.cpp index c488e43cb..ab5218687 100644 --- a/tdecore/tdeconfigdialogmanager.cpp +++ b/tdecore/tdeconfigdialogmanager.cpp @@ -95,9 +95,9 @@ void TDEConfigDialogManager::init(bool trackChanges) // KDE changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int))); - changedMap.insert( "KFontCombo", TQT_SIGNAL(activated (int))); - changedMap.insert( "KFontRequester", TQT_SIGNAL(fontSelected(const TQFont &))); - changedMap.insert( "KFontChooser", TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( "TDEFontCombo", TQT_SIGNAL(activated (int))); + changedMap.insert( "TDEFontRequester", TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( "TDEFontChooser", TQT_SIGNAL(fontSelected(const TQFont &))); changedMap.insert( "KHistoryCombo", TQT_SIGNAL(activated (int))); changedMap.insert( "KColorButton", TQT_SIGNAL(changed(const TQColor &))); @@ -105,7 +105,7 @@ void TDEConfigDialogManager::init(bool trackChanges) changedMap.insert( "KDateWidget", TQT_SIGNAL(changed (TQDate))); changedMap.insert( "KDateTimeWidget", TQT_SIGNAL(valueChanged (const TQDateTime &))); changedMap.insert( "KEditListBox", TQT_SIGNAL(changed())); - changedMap.insert( "KListBox", TQT_SIGNAL(selectionChanged())); + changedMap.insert( "TDEListBox", TQT_SIGNAL(selectionChanged())); changedMap.insert( "KLineEdit", TQT_SIGNAL(textChanged(const TQString &))); changedMap.insert( "KPasswordEdit", TQT_SIGNAL(textChanged(const TQString &))); changedMap.insert( "KRestrictedLine", TQT_SIGNAL(textChanged(const TQString &))); diff --git a/tdecore/tests/kstdacceltest.cpp b/tdecore/tests/kstdacceltest.cpp index 4540e89d7..a3e2d2473 100644 --- a/tdecore/tests/kstdacceltest.cpp +++ b/tdecore/tests/kstdacceltest.cpp @@ -26,14 +26,14 @@ int main(int argc, char *argv[]) TDEApplication::disableAutoDcopRegistration(); TDEApplication app(argc,argv,"kstdacceltest",false,false); - check( "shortcutDefault FullScreen", KStdAccel::shortcutDefault( KStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" ); - check( "shortcutDefault BeginningOfLine", KStdAccel::shortcutDefault( KStdAccel::BeginningOfLine ).toString(), "Home" ); - check( "shortcutDefault EndOfLine", KStdAccel::shortcutDefault( KStdAccel::EndOfLine ).toString(), "End" ); + check( "shortcutDefault FullScreen", TDEStdAccel::shortcutDefault( TDEStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" ); + check( "shortcutDefault BeginningOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::BeginningOfLine ).toString(), "Home" ); + check( "shortcutDefault EndOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::EndOfLine ).toString(), "End" ); - check( "name BeginningOfLine", KStdAccel::name( KStdAccel::BeginningOfLine ), "BeginningOfLine" ); - check( "name EndOfLine", KStdAccel::name( KStdAccel::EndOfLine ), "EndOfLine" ); + check( "name BeginningOfLine", TDEStdAccel::name( TDEStdAccel::BeginningOfLine ), "BeginningOfLine" ); + check( "name EndOfLine", TDEStdAccel::name( TDEStdAccel::EndOfLine ), "EndOfLine" ); - check( "shortcut method", KStdAccel::shortcut( KStdAccel::ZoomIn ).toString(), KStdAccel::zoomIn().toString() ); + check( "shortcut method", TDEStdAccel::shortcut( TDEStdAccel::ZoomIn ).toString(), TDEStdAccel::zoomIn().toString() ); return 0; } diff --git a/tdehtml/ChangeLog b/tdehtml/ChangeLog index cf19f1b06..302c414de 100644 --- a/tdehtml/ChangeLog +++ b/tdehtml/ChangeLog @@ -810,7 +810,7 @@ 2005-04-06 Lubos Lunak - * tdehtmlview.{h,cpp}: Use KActions for type ahead find. + * tdehtmlview.{h,cpp}: Use TDEActions for type ahead find. * tdehtml_part.{h,cpp}: ditto. * tdehtml_part.{h,cpp}: Add Find Previous action. * tdehtml_part.cpp (findTextNext): Fix changing direction while searching text. diff --git a/tdehtml/domtreeview.cpp b/tdehtml/domtreeview.cpp index 5bff83e72..c68eb2007 100644 --- a/tdehtml/domtreeview.cpp +++ b/tdehtml/domtreeview.cpp @@ -19,7 +19,7 @@ #include "domtreeview.moc" #include "xml/dom_nodeimpl.h" -DOMTreeView::DOMTreeView(TQWidget *parent, TDEHTMLPart *currentpart, const char * name) : KListView(parent, name) +DOMTreeView::DOMTreeView(TQWidget *parent, TDEHTMLPart *currentpart, const char * name) : TDEListView(parent, name) { setCaption(name); setRootIsDecorated(true); diff --git a/tdehtml/domtreeview.h b/tdehtml/domtreeview.h index 93baa8f61..a0f5d942a 100644 --- a/tdehtml/domtreeview.h +++ b/tdehtml/domtreeview.h @@ -24,7 +24,7 @@ #include #include "dom/dom_core.h" -class DOMTreeView : public KListView +class DOMTreeView : public TDEListView { Q_OBJECT public: diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp index ec794b8d2..ac78526ae 100644 --- a/tdehtml/ecma/kjs_debugwin.cpp +++ b/tdehtml/ecma/kjs_debugwin.cpp @@ -347,7 +347,7 @@ void EvalMultiLineEdit::keyPressEvent(TQKeyEvent * e) } //------------------------------------------------------------------------- KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name) - : KMainWindow(parent, name, (WFlags)WType_TopLevel), TDEInstance("kjs_debugger") + : TDEMainWindow(parent, name, (WFlags)WType_TopLevel), TDEInstance("kjs_debugger") { m_breakpoints = 0; m_breakpointCount = 0; @@ -436,27 +436,27 @@ KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name) vl->addWidget(hsplitter); // actions - KPopupMenu *debugMenu = new KPopupMenu(this); + TDEPopupMenu *debugMenu = new TDEPopupMenu(this); menuBar()->insertItem("&Debug",debugMenu); - m_actionCollection = new KActionCollection(this); + m_actionCollection = new TDEActionCollection(this); m_actionCollection->setInstance(this); // Venkman use F12, KDevelop F10 - KShortcut scNext = KShortcut(KKeySequence(KKey(Qt::Key_F12))); + TDEShortcut scNext = TDEShortcut(KKeySequence(KKey(Qt::Key_F12))); scNext.append(KKeySequence(KKey(Qt::Key_F10))); - m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,TQT_TQOBJECT(this),TQT_SLOT(slotNext()), + m_nextAction = new TDEAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,TQT_TQOBJECT(this),TQT_SLOT(slotNext()), m_actionCollection,"next"); - m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),TQT_TQOBJECT(this),TQT_SLOT(slotStep()), + m_stepAction = new TDEAction(i18n("&Step"),"dbgstep",TDEShortcut(Qt::Key_F11),TQT_TQOBJECT(this),TQT_SLOT(slotStep()), m_actionCollection,"step"); // Venkman use F5, Kdevelop F9 - KShortcut scCont = KShortcut(KKeySequence(KKey(Qt::Key_F5))); + TDEShortcut scCont = TDEShortcut(KKeySequence(KKey(Qt::Key_F5))); scCont.append(KKeySequence(KKey(Qt::Key_F9))); - m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,TQT_TQOBJECT(this),TQT_SLOT(slotContinue()), + m_continueAction = new TDEAction(i18n("&Continue"),"dbgrun",scCont,TQT_TQOBJECT(this),TQT_SLOT(slotContinue()), m_actionCollection,"cont"); - m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),TQT_TQOBJECT(this),TQT_SLOT(slotStop()), + m_stopAction = new TDEAction(i18n("St&op"),"stop",TDEShortcut(Qt::Key_F4),TQT_TQOBJECT(this),TQT_SLOT(slotStop()), m_actionCollection,"stop"); - m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),TQT_TQOBJECT(this),TQT_SLOT(slotBreakNext()), + m_breakAction = new TDEAction(i18n("&Break at Next Statement"),"dbgrunto",TDEShortcut(Qt::Key_F8),TQT_TQOBJECT(this),TQT_SLOT(slotBreakNext()), m_actionCollection,"breaknext"); diff --git a/tdehtml/ecma/kjs_debugwin.h b/tdehtml/ecma/kjs_debugwin.h index dc2368ac2..af205d654 100644 --- a/tdehtml/ecma/kjs_debugwin.h +++ b/tdehtml/ecma/kjs_debugwin.h @@ -43,8 +43,8 @@ class TQListBox; class TQComboBox; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; namespace KJS { class FunctionImp; @@ -157,7 +157,7 @@ namespace KJS { * * There is only one debug window per program. This can be obtained by calling #instance */ - class KJSDebugWin : public KMainWindow, public Debugger, public TDEInstance + class KJSDebugWin : public TDEMainWindow, public Debugger, public TDEInstance { Q_OBJECT friend class SourceDisplay; @@ -259,17 +259,17 @@ namespace KJS { TQMap m_sourceFragments; /* maps SourceId->SourceFragment */ TQPtrList m_sourceSelFiles; /* maps combobox index->SourceFile */ - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; TQPixmap m_stopIcon; TQPixmap m_emptyIcon; SourceDisplay *m_sourceDisplay; TQListBox *m_contextList; - KAction *m_stepAction; - KAction *m_nextAction; - KAction *m_continueAction; - KAction *m_stopAction; - KAction *m_breakAction; + TDEAction *m_stepAction; + TDEAction *m_nextAction; + TDEAction *m_continueAction; + TDEAction *m_stopAction; + TDEAction *m_breakAction; TQComboBox *m_sourceSel; EvalMultiLineEdit *m_evalEdit; diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp index b953f34fb..3a0146547 100644 --- a/tdehtml/misc/knsplugininstaller.cpp +++ b/tdehtml/misc/knsplugininstaller.cpp @@ -376,7 +376,7 @@ void KNSPluginWizard::initConfirmationPage() m_confirmationVBox = new TQVBox(this); new TQLabel(i18n("The following plugins are available."), m_confirmationVBox); - m_pluginListView = new KListView(m_confirmationVBox); + m_pluginListView = new TDEListView(m_confirmationVBox); m_pluginListView->addColumn(i18n("Name")); m_pluginListView->setSelectionMode(TQListView::Single); new TQLabel(i18n("Click on next to install the selected plugin."), m_confirmationVBox); diff --git a/tdehtml/misc/knsplugininstaller.h b/tdehtml/misc/knsplugininstaller.h index 240202468..f8caedf92 100644 --- a/tdehtml/misc/knsplugininstaller.h +++ b/tdehtml/misc/knsplugininstaller.h @@ -222,7 +222,7 @@ private: TQWidget *m_finishWidget; // plugin list - KListView *m_pluginListView; + TDEListView *m_pluginListView; // licence stuff TQLabel *m_licencePageLabel; diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 5c8249b6b..ce6debcbc 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -311,7 +311,7 @@ LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* vi : KLineEdit(parent, "__tdehtml"), m_input(input), m_view(view), m_spell(0) { setMouseTracking(true); - KActionCollection *ac = new KActionCollection(this); + TDEActionCollection *ac = new TDEActionCollection(this); m_spellAction = KStdAction::spelling( TQT_TQOBJECT(this), TQT_SLOT( slotCheckSpelling() ), ac ); } @@ -971,7 +971,7 @@ void RenderSelect::updateFromElement() } if (m_useListBox && oldMultiple != m_multiple) { - static_cast(m_widget)->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); + static_cast(m_widget)->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); } m_selectionChanged = true; m_optionsChanged = true; @@ -985,7 +985,7 @@ void RenderSelect::updateFromElement() int listIndex; if(m_useListBox) { - static_cast(m_widget)->clear(); + static_cast(m_widget)->clear(); } else @@ -999,7 +999,7 @@ void RenderSelect::updateFromElement() if(m_useListBox) { TQListBoxText *item = new TQListBoxText(TQString(text.implementation()->s, text.implementation()->l)); - static_cast(m_widget) + static_cast(m_widget) ->insertItem(item, listIndex); item->setSelectable(false); } @@ -1022,7 +1022,7 @@ void RenderSelect::updateFromElement() } if(m_useListBox) { - KListBox *l = static_cast(m_widget); + TDEListBox *l = static_cast(m_widget); l->insertItem(text, listIndex); DOMString disabled = optElem->getAttribute(ATTR_DISABLED); if (!disabled.isNull() && l->item( listIndex )) { @@ -1083,7 +1083,7 @@ void RenderSelect::layout( ) // calculate size if(m_useListBox) { - KListBox* w = static_cast(m_widget); + TDEListBox* w = static_cast(m_widget); TQListBoxItem* p = w->firstItem(); int width = 0; @@ -1105,7 +1105,7 @@ void RenderSelect::layout( ) // the average of that is IMHO kMin(number of elements, 10) // so I did that ;-) if(size < 1) - size = kMin(static_cast(m_widget)->count(), 10u); + size = kMin(static_cast(m_widget)->count(), 10u); width += 2*w->frameWidth() + w->verticalScrollBar()->sizeHint().width(); height = size*height + 2*w->frameWidth(); @@ -1208,7 +1208,7 @@ void RenderSelect::slotSelectionChanged() // emitted by the listbox only // again with updateSelection. if ( listItems[i]->id() == ID_OPTION ) static_cast( listItems[i] ) - ->m_selected = static_cast( m_widget )->isSelected( i ); + ->m_selected = static_cast( m_widget )->isSelected( i ); ref(); element()->onChange(); @@ -1220,9 +1220,9 @@ void RenderSelect::setOptionsChanged(bool _optionsChanged) m_optionsChanged = _optionsChanged; } -KListBox* RenderSelect::createListBox() +TDEListBox* RenderSelect::createListBox() { - KListBox *lb = new KListBox(view()->viewport(), "__tdehtml"); + TDEListBox *lb = new TDEListBox(view()->viewport(), "__tdehtml"); lb->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); // ### looks broken //lb->setAutoMask(true); @@ -1247,7 +1247,7 @@ void RenderSelect::updateSelection() int i; if (m_useListBox) { // if multi-select, we select only the new selected index - KListBox *listBox = static_cast(m_widget); + TDEListBox *listBox = static_cast(m_widget); for (i = 0; i < int(listItems.size()); i++) listBox->setSelected(i,listItems[i]->id() == ID_OPTION && static_cast(listItems[i])->selected()); @@ -1294,7 +1294,7 @@ TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent) setAutoMask(true); setMouseTracking(true); - KActionCollection *ac = new KActionCollection(this); + TDEActionCollection *ac = new TDEActionCollection(this); m_findAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( slotFind() ), ac ); m_findNextAction = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( slotFindNext() ), ac ); m_replaceAction = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( slotReplace() ), ac ); diff --git a/tdehtml/rendering/render_form.h b/tdehtml/rendering/render_form.h index d4508e6bc..7543b9e90 100644 --- a/tdehtml/rendering/render_form.h +++ b/tdehtml/rendering/render_form.h @@ -51,7 +51,7 @@ class KFindDialog; class KReplaceDialog; class KFind; class KReplace; -class KAction; +class TDEAction; class KURLRequester; namespace DOM { @@ -282,7 +282,7 @@ private: DOM::HTMLInputElementImpl* m_input; TDEHTMLView* m_view; KSpell *m_spell; - KAction *m_spellAction; + TDEAction *m_spellAction; }; // ------------------------------------------------------------------------- @@ -399,7 +399,7 @@ public: { return static_cast(RenderObject::element()); } protected: - KListBox *createListBox(); + TDEListBox *createListBox(); ComboBoxWidget *createComboBox(); unsigned m_size; @@ -440,9 +440,9 @@ private: KFind *m_find; KReplaceDialog *m_repDlg; KReplace *m_replace; - KAction *m_findAction; - KAction *m_findNextAction; - KAction *m_replaceAction; + TDEAction *m_findAction; + TDEAction *m_findNextAction; + TDEAction *m_replaceAction; int m_findIndex, m_findPara; int m_repIndex, m_repPara; }; diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp index 62c93079e..72576e91e 100644 --- a/tdehtml/tdehtml_ext.cpp +++ b/tdehtml/tdehtml_ext.cpp @@ -430,7 +430,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri if (hasSelection) { - KAction* copyAction = KStdAction::copy( d->m_tdehtml->browserExtension(), TQT_SLOT( copy() ), actionCollection(), "copy" ); + TDEAction* copyAction = KStdAction::copy( d->m_tdehtml->browserExtension(), TQT_SLOT( copy() ), actionCollection(), "copy" ); copyAction->setText(i18n("&Copy Text")); copyAction->setEnabled(d->m_tdehtml->browserExtension()->isActionEnabled( "copy" )); actionCollection()->insert( tdehtml->actionCollection()->action( "selectAll" ) ); @@ -477,7 +477,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri } // using .arg(foo, bar) instead of .arg(foo).arg(bar), as foo can contain %x - new KAction( i18n( "Search for '%1' with %2" ).arg( selectedText, name ), icon, 0, d->m_tdehtml->browserExtension(), + new TDEAction( i18n( "Search for '%1' with %2" ).arg( selectedText, name ), icon, 0, d->m_tdehtml->browserExtension(), TQT_SLOT( searchProvider() ), actionCollection(), "searchProvider" ); // favorite search providers @@ -486,7 +486,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri favoriteEngines = config.readListEntry("FavoriteSearchEngines", favoriteEngines); if ( !favoriteEngines.isEmpty()) { - KActionMenu* providerList = new KActionMenu( i18n( "Search for '%1' with" ).arg( selectedText ), actionCollection(), "searchProviderList" ); + TDEActionMenu* providerList = new TDEActionMenu( i18n( "Search for '%1' with" ).arg( selectedText ), actionCollection(), "searchProviderList" ); TQStringList::ConstIterator it = favoriteEngines.begin(); for ( ; it != favoriteEngines.end(); ++it ) { @@ -507,7 +507,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri icon = TQPixmap( iconPath ); name = service->name(); - providerList->insert( new KAction( name, icon, 0, d->m_tdehtml->browserExtension(), + providerList->insert( new TDEAction( name, icon, 0, d->m_tdehtml->browserExtension(), TQT_SLOT( searchProvider() ), actionCollection(), TQString( "searchProvider" + searchProviderPrefix ).latin1() ) ); } } @@ -515,14 +515,14 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri if ( selectedText.contains("://") && KURL(selectedText).isValid() ) - new KAction( i18n( "Open '%1'" ).arg( selectedText ), "window_new", 0, + new TDEAction( i18n( "Open '%1'" ).arg( selectedText ), "window_new", 0, d->m_tdehtml->browserExtension(), TQT_SLOT( openSelection() ), actionCollection(), "openSelection" ); } else if ( url.isEmpty() && !isImage ) { actionCollection()->insert( tdehtml->actionCollection()->action( "security" ) ); actionCollection()->insert( tdehtml->actionCollection()->action( "setEncoding" ) ); - new KAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), + new TDEAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopanimations" ); } @@ -530,14 +530,14 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri { if (url.protocol() == "mailto") { - new KAction( i18n( "Copy Email Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), + new TDEAction( i18n( "Copy Email Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), actionCollection(), "copylinklocation" ); } else { - new KAction( i18n( "&Save Link As..." ), 0, this, TQT_SLOT( slotSaveLinkAs() ), + new TDEAction( i18n( "&Save Link As..." ), 0, this, TQT_SLOT( slotSaveLinkAs() ), actionCollection(), "savelinkas" ); - new KAction( i18n( "Copy &Link Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), + new TDEAction( i18n( "Copy &Link Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), actionCollection(), "copylinklocation" ); } } @@ -547,28 +547,28 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri { if ( tdehtml->parentPart() ) { - new KAction( i18n( "Open in New &Window" ), "window_new", 0, this, TQT_SLOT( slotFrameInWindow() ), + new TDEAction( i18n( "Open in New &Window" ), "window_new", 0, this, TQT_SLOT( slotFrameInWindow() ), actionCollection(), "frameinwindow" ); - new KAction( i18n( "Open in &This Window" ), 0, this, TQT_SLOT( slotFrameInTop() ), + new TDEAction( i18n( "Open in &This Window" ), 0, this, TQT_SLOT( slotFrameInTop() ), actionCollection(), "frameintop" ); - new KAction( i18n( "Open in &New Tab" ), "tab_new", 0, this, TQT_SLOT( slotFrameInTab() ), + new TDEAction( i18n( "Open in &New Tab" ), "tab_new", 0, this, TQT_SLOT( slotFrameInTab() ), actionCollection(), "frameintab" ); - new KAction( i18n( "Reload Frame" ), 0, this, TQT_SLOT( slotReloadFrame() ), + new TDEAction( i18n( "Reload Frame" ), 0, this, TQT_SLOT( slotReloadFrame() ), actionCollection(), "reloadframe" ); if ( TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() ) { if ( tdehtml->d->m_frame->m_type == tdehtml::ChildFrame::IFrame ) - new KAction( i18n( "Block IFrame..." ), 0, this, TQT_SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" ); + new TDEAction( i18n( "Block IFrame..." ), 0, this, TQT_SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" ); } - new KAction( i18n( "View Frame Source" ), 0, d->m_tdehtml, TQT_SLOT( slotViewDocumentSource() ), + new TDEAction( i18n( "View Frame Source" ), 0, d->m_tdehtml, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewFrameSource" ); - new KAction( i18n( "View Frame Information" ), 0, d->m_tdehtml, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewFrameInfo" ); + new TDEAction( i18n( "View Frame Information" ), 0, d->m_tdehtml, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewFrameInfo" ); // This one isn't in tdehtml_popupmenu.rc anymore, because Print isn't either, // and because print frame is already in the toolbar and the menu. // But leave this here, so that it's easy to read it. - new KAction( i18n( "Print Frame..." ), "frameprint", 0, d->m_tdehtml->browserExtension(), TQT_SLOT( print() ), actionCollection(), "printFrame" ); - new KAction( i18n( "Save &Frame As..." ), 0, d->m_tdehtml, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); + new TDEAction( i18n( "Print Frame..." ), "frameprint", 0, d->m_tdehtml->browserExtension(), TQT_SLOT( print() ), actionCollection(), "printFrame" ); + new TDEAction( i18n( "Save &Frame As..." ), 0, d->m_tdehtml, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); actionCollection()->insert( tdehtml->parentPart()->actionCollection()->action( "viewDocumentSource" ) ); actionCollection()->insert( tdehtml->parentPart()->actionCollection()->action( "viewPageInfo" ) ); @@ -579,7 +579,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri } else if (isImage || !url.isEmpty()) { actionCollection()->insert( tdehtml->actionCollection()->action( "viewDocumentSource" ) ); actionCollection()->insert( tdehtml->actionCollection()->action( "viewPageInfo" ) ); - new KAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), + new TDEAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopanimations" ); } @@ -598,35 +598,35 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri } else d->m_imageURL = KURL( static_cast( e ).src().string() ); - new KAction( i18n( "Save Image As..." ), 0, this, TQT_SLOT( slotSaveImageAs() ), + new TDEAction( i18n( "Save Image As..." ), 0, this, TQT_SLOT( slotSaveImageAs() ), actionCollection(), "saveimageas" ); - new KAction( i18n( "Send Image..." ), 0, this, TQT_SLOT( slotSendImage() ), + new TDEAction( i18n( "Send Image..." ), 0, this, TQT_SLOT( slotSendImage() ), actionCollection(), "sendimage" ); #ifndef QT_NO_MIMECLIPBOARD - (new KAction( i18n( "Copy Image" ), 0, this, TQT_SLOT( slotCopyImage() ), + (new TDEAction( i18n( "Copy Image" ), 0, this, TQT_SLOT( slotCopyImage() ), actionCollection(), "copyimage" ))->setEnabled(!d->m_pixmap.isNull()); #endif if(d->m_pixmap.isNull()) { //fallback to image location if still loading the image. this will always be true if ifdef QT_NO_MIMECLIPBOARD - new KAction( i18n( "Copy Image Location" ), 0, this, TQT_SLOT( slotCopyImageLocation() ), + new TDEAction( i18n( "Copy Image Location" ), 0, this, TQT_SLOT( slotCopyImageLocation() ), actionCollection(), "copyimagelocation" ); } TQString name = KStringHandler::csqueeze(d->m_imageURL.fileName()+d->m_imageURL.query(), 25); - new KAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, TQT_SLOT( slotViewImage() ), + new TDEAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, TQT_SLOT( slotViewImage() ), actionCollection(), "viewimage" ); if (TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()) { - new KAction( i18n( "Block Image..." ), 0, this, TQT_SLOT( slotBlockImage() ), + new TDEAction( i18n( "Block Image..." ), 0, this, TQT_SLOT( slotBlockImage() ), actionCollection(), "blockimage" ); if (!d->m_imageURL.host().isEmpty() && !d->m_imageURL.protocol().isEmpty()) { - new KAction( i18n( "Block Images From %1" ).arg(d->m_imageURL.host()), 0, this, TQT_SLOT( slotBlockHost() ), + new TDEAction( i18n( "Block Images From %1" ).arg(d->m_imageURL.host()), 0, this, TQT_SLOT( slotBlockHost() ), actionCollection(), "blockhost" ); } } @@ -962,13 +962,13 @@ extern const int KDE_NO_EXPORT fastZoomSizeCount; // BCI: remove in KDE 4 TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) - : KAction( text, icon, 0, receiver, slot, parent, name ) + : TDEAction( text, icon, 0, receiver, slot, parent, name ) { init(part, direction); } -TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) - : KAction( text, icon, cut, receiver, slot, parent, name ) +TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { init(part, direction); } @@ -1006,11 +1006,11 @@ TDEHTMLZoomFactorAction::~TDEHTMLZoomFactorAction() int TDEHTMLZoomFactorAction::plug( TQWidget *w, int index ) { - int containerId = KAction::plug( w, index ); - if ( containerId == -1 || !w->inherits( "KToolBar" ) ) + int containerId = TDEAction::plug( w, index ); + if ( containerId == -1 || !w->inherits( "TDEToolBar" ) ) return containerId; - KToolBarButton *button = static_cast( w )->getButton( itemId( containerId ) ); + TDEToolBarButton *button = static_cast( w )->getButton( itemId( containerId ) ); if ( !button ) return containerId; diff --git a/tdehtml/tdehtml_ext.h b/tdehtml/tdehtml_ext.h index c6db763b9..165cedb0e 100644 --- a/tdehtml/tdehtml_ext.h +++ b/tdehtml/tdehtml_ext.h @@ -149,14 +149,14 @@ private: TDEHTMLPopupGUIClientPrivate *d; }; -class TDEHTMLZoomFactorAction : public KAction +class TDEHTMLZoomFactorAction : public TDEAction { Q_OBJECT public: //BCI: remove in KDE 4 TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, - const TQString &icon, const KShortcut& cut, const TQObject *receiver, + const TQString &icon, const TDEShortcut& cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); virtual ~TDEHTMLZoomFactorAction(); @@ -165,7 +165,7 @@ public: private slots: void slotActivated( int ); protected slots: - void slotActivated() { KAction::slotActivated(); } + void slotActivated() { TDEAction::slotActivated(); } private: void init(TDEHTMLPart *part, bool direction); private: diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index 059763c6a..caa55ae61 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -252,29 +252,29 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) d->m_bMousePressed = false; d->m_bRightMousePressed = false; d->m_bCleared = false; - d->m_paViewDocument = new KAction( i18n( "View Do&cument Source" ), CTRL + Key_U, this, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" ); - d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, TQT_SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" ); - d->m_paViewInfo = new KAction( i18n( "View Document Information" ), CTRL+Key_I, this, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewPageInfo" ); - d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, TQT_SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" ); + d->m_paViewDocument = new TDEAction( i18n( "View Do&cument Source" ), CTRL + Key_U, this, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" ); + d->m_paViewFrame = new TDEAction( i18n( "View Frame Source" ), 0, this, TQT_SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" ); + d->m_paViewInfo = new TDEAction( i18n( "View Document Information" ), CTRL+Key_I, this, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewPageInfo" ); + d->m_paSaveBackground = new TDEAction( i18n( "Save &Background Image As..." ), 0, this, TQT_SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" ); d->m_paSaveDocument = KStdAction::saveAs( this, TQT_SLOT( slotSaveDocument() ), actionCollection(), "saveDocument" ); if ( parentPart() ) - d->m_paSaveDocument->setShortcut( KShortcut() ); // avoid clashes - d->m_paSaveFrame = new KAction( i18n( "Save &Frame As..." ), 0, this, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); - d->m_paSecurity = new KAction( i18n( "Security..." ), "decrypted", 0, this, TQT_SLOT( slotSecurity() ), actionCollection(), "security" ); + d->m_paSaveDocument->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paSaveFrame = new TDEAction( i18n( "Save &Frame As..." ), 0, this, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); + d->m_paSecurity = new TDEAction( i18n( "Security..." ), "decrypted", 0, this, TQT_SLOT( slotSecurity() ), actionCollection(), "security" ); d->m_paSecurity->setWhatsThis( i18n( "Security Settings

      " "Shows the certificate of the displayed page. Only " "pages that have been transmitted using a secure, encrypted connection have a " "certificate.

      " "Hint: If the image shows a closed lock, the page has been transmitted over a " "secure connection.") ); - d->m_paDebugRenderTree = new KAction( i18n( "Print Rendering Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_A, this, TQT_SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" ); - d->m_paDebugDOMTree = new KAction( i18n( "Print DOM Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_D, this, TQT_SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" ); - d->m_paStopAnimations = new KAction( i18n( "Stop Animated Images" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" ); + d->m_paDebugRenderTree = new TDEAction( i18n( "Print Rendering Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_A, this, TQT_SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" ); + d->m_paDebugDOMTree = new TDEAction( i18n( "Print DOM Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_D, this, TQT_SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" ); + d->m_paStopAnimations = new TDEAction( i18n( "Stop Animated Images" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" ); - d->m_paSetEncoding = new KActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" ); + d->m_paSetEncoding = new TDEActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" ); d->m_paSetEncoding->setDelayed( false ); - d->m_automaticDetection = new KPopupMenu( 0L ); + d->m_automaticDetection = new TDEPopupMenu( 0L ); d->m_automaticDetection->insertItem( i18n( "Semi-Automatic" ), 0 ); d->m_automaticDetection->insertItem( i18n( "Arabic" ), 1 ); @@ -296,10 +296,10 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) d->m_paSetEncoding->popupMenu()->insertItem( i18n( "Automatic Detection" ), d->m_automaticDetection, 0 ); - d->m_paSetEncoding->insert( new KActionSeparator( actionCollection() ) ); + d->m_paSetEncoding->insert( new TDEActionSeparator( actionCollection() ) ); - d->m_manualDetection = new KSelectAction( i18n( "short for Manual Detection", "Manual" ), 0, this, TQT_SLOT( slotSetEncoding() ), actionCollection(), "manualDetection" ); + d->m_manualDetection = new TDESelectAction( i18n( "short for Manual Detection", "Manual" ), 0, this, TQT_SLOT( slotSetEncoding() ), actionCollection(), "manualDetection" ); TQStringList encodings = TDEGlobal::charsets()->descriptiveEncodingNames(); d->m_manualDetection->setItems( encodings ); d->m_manualDetection->setCurrentItem( -1 ); @@ -354,7 +354,7 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) } - d->m_paUseStylesheet = new KSelectAction( i18n( "Use S&tylesheet"), 0, this, TQT_SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" ); + d->m_paUseStylesheet = new TDESelectAction( i18n( "Use S&tylesheet"), 0, this, TQT_SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" ); if ( prof == BrowserViewGUI ) { d->m_paIncZoomFactor = new TDEHTMLZoomFactorAction( this, true, i18n( @@ -385,37 +385,37 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) "Find the previous occurrence of the text that you " "have found using the Find Text function" ) ); - d->m_paFindAheadText = new KAction( i18n("Find Text as You Type"), KShortcut( '/' ), this, TQT_SLOT( slotFindAheadText()), + d->m_paFindAheadText = new TDEAction( i18n("Find Text as You Type"), TDEShortcut( '/' ), this, TQT_SLOT( slotFindAheadText()), actionCollection(), "findAheadText"); - d->m_paFindAheadLinks = new KAction( i18n("Find Links as You Type"), KShortcut( '\'' ), this, TQT_SLOT( slotFindAheadLink()), + d->m_paFindAheadLinks = new TDEAction( i18n("Find Links as You Type"), TDEShortcut( '\'' ), this, TQT_SLOT( slotFindAheadLink()), actionCollection(), "findAheadLink"); d->m_paFindAheadText->setEnabled( false ); d->m_paFindAheadLinks->setEnabled( false ); if ( parentPart() ) { - d->m_paFind->setShortcut( KShortcut() ); // avoid clashes - d->m_paFindNext->setShortcut( KShortcut() ); // avoid clashes - d->m_paFindPrev->setShortcut( KShortcut() ); // avoid clashes - d->m_paFindAheadText->setShortcut( KShortcut()); - d->m_paFindAheadLinks->setShortcut( KShortcut()); + d->m_paFind->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paFindNext->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paFindPrev->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paFindAheadText->setShortcut( TDEShortcut()); + d->m_paFindAheadLinks->setShortcut( TDEShortcut()); } - d->m_paPrintFrame = new KAction( i18n( "Print Frame..." ), "frameprint", 0, this, TQT_SLOT( slotPrintFrame() ), actionCollection(), "printFrame" ); + d->m_paPrintFrame = new TDEAction( i18n( "Print Frame..." ), "frameprint", 0, this, TQT_SLOT( slotPrintFrame() ), actionCollection(), "printFrame" ); d->m_paPrintFrame->setWhatsThis( i18n( "Print Frame

      " "Some pages have several frames. To print only a single frame, click " "on it and then use this function." ) ); d->m_paSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ), actionCollection(), "selectAll" ); if ( parentPart() ) - d->m_paSelectAll->setShortcut( KShortcut() ); // avoid clashes + d->m_paSelectAll->setShortcut( TDEShortcut() ); // avoid clashes - d->m_paToggleCaretMode = new KToggleAction(i18n("Toggle Caret Mode"), + d->m_paToggleCaretMode = new TDEToggleAction(i18n("Toggle Caret Mode"), Key_F7, this, TQT_SLOT(slotToggleCaretMode()), actionCollection(), "caretMode"); d->m_paToggleCaretMode->setChecked(isCaretMode()); if (parentPart()) - d->m_paToggleCaretMode->setShortcut(KShortcut()); // avoid clashes + d->m_paToggleCaretMode->setShortcut(TDEShortcut()); // avoid clashes // set the default java(script) flags according to the current host. d->m_bOpenMiddleClick = d->m_settings->isOpenMiddleClickEnabled(); @@ -1119,7 +1119,7 @@ void TDEHTMLPart::disableJSErrorExtension() { } void TDEHTMLPart::jsErrorDialogContextMenu() { - KPopupMenu *m = new KPopupMenu(0L); + TDEPopupMenu *m = new TDEPopupMenu(0L); m->insertItem(i18n("&Hide Errors"), this, TQT_SLOT(removeJSErrorExtension())); m->insertItem(i18n("&Disable Error Reporting"), this, TQT_SLOT(disableJSErrorExtension())); m->popup(TQCursor::pos()); @@ -1348,10 +1348,10 @@ void TDEHTMLPart::setAutoloadImages( bool enable ) d->m_paLoadImages = 0; } else if ( !d->m_paLoadImages ) - d->m_paLoadImages = new KAction( i18n( "Display Images on Page" ), "images_display", 0, this, TQT_SLOT( slotLoadImages() ), actionCollection(), "loadImages" ); + d->m_paLoadImages = new TDEAction( i18n( "Display Images on Page" ), "images_display", 0, this, TQT_SLOT( slotLoadImages() ), actionCollection(), "loadImages" ); if ( d->m_paLoadImages ) { - TQPtrList lst; + TQPtrList lst; lst.append( d->m_paLoadImages ); plugActionList( "loadImages", lst ); } @@ -6637,7 +6637,7 @@ void TDEHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event ) if ( !d->m_settings->autoLoadImages() && d->m_paLoadImages ) { - TQPtrList lst; + TQPtrList lst; lst.append( d->m_paLoadImages ); plugActionList( "loadImages", lst ); } @@ -7311,7 +7311,7 @@ void TDEHTMLPart::launchWalletManager() void TDEHTMLPart::walletMenu() { #ifndef TDEHTML_NO_WALLET - KPopupMenu *m = new KPopupMenu(0L); + TDEPopupMenu *m = new TDEPopupMenu(0L); m->insertItem(i18n("&Close Wallet"), this, TQT_SLOT(slotWalletClosed())); m->popup(TQCursor::pos()); #endif // TDEHTML_NO_WALLET @@ -7355,10 +7355,10 @@ void TDEHTMLPart::setDebugScript( bool enable ) unplugActionList( "debugScriptList" ); if ( enable ) { if (!d->m_paDebugScript) { - d->m_paDebugScript = new KAction( i18n( "JavaScript &Debugger" ), 0, this, TQT_SLOT( slotDebugScript() ), actionCollection(), "debugScript" ); + d->m_paDebugScript = new TDEAction( i18n( "JavaScript &Debugger" ), 0, this, TQT_SLOT( slotDebugScript() ), actionCollection(), "debugScript" ); } d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : 0L ); - TQPtrList lst; + TQPtrList lst; lst.append( d->m_paDebugScript ); plugActionList( "debugScriptList", lst ); } @@ -7407,7 +7407,7 @@ void TDEHTMLPart::setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originP } void TDEHTMLPart::suppressedPopupMenu() { - KPopupMenu *m = new KPopupMenu(0L); + TDEPopupMenu *m = new TDEPopupMenu(0L); m->setCheckable(true); if ( d->m_openableSuppressedPopups ) m->insertItem(i18n("&Show Blocked Popup Window","Show %n Blocked Popup Windows", d->m_openableSuppressedPopups), this, TQT_SLOT(showSuppressedPopups())); diff --git a/tdehtml/tdehtmlimage.cpp b/tdehtml/tdehtmlimage.cpp index 021f95149..bf05d8495 100644 --- a/tdehtml/tdehtmlimage.cpp +++ b/tdehtml/tdehtmlimage.cpp @@ -80,20 +80,20 @@ TDEHTMLImage::TDEHTMLImage( TQWidget *parentWidget, const char *widgetName, m_ext = new TDEHTMLImageBrowserExtension( this, "be" ); // Remove unnecessary actions. - KAction *encodingAction = actionCollection()->action( "setEncoding" ); + TDEAction *encodingAction = actionCollection()->action( "setEncoding" ); if ( encodingAction ) { encodingAction->unplugAll(); delete encodingAction; } - KAction *viewSourceAction= actionCollection()->action( "viewDocumentSource" ); + TDEAction *viewSourceAction= actionCollection()->action( "viewDocumentSource" ); if ( viewSourceAction ) { viewSourceAction->unplugAll(); delete viewSourceAction; } - KAction *selectAllAction= actionCollection()->action( "selectAll" ); + TDEAction *selectAllAction= actionCollection()->action( "selectAll" ); if ( selectAllAction ) { selectAllAction->unplugAll(); diff --git a/tdehtml/tdehtmlpart_p.h b/tdehtml/tdehtmlpart_p.h index c1e641cb9..149483493 100644 --- a/tdehtml/tdehtmlpart_p.h +++ b/tdehtml/tdehtmlpart_p.h @@ -54,8 +54,8 @@ class KFind; class KFindDialog; -class KPopupMenu; -class KSelectAction; +class TDEPopupMenu; +class TDESelectAction; class KURLLabel; class KJavaAppletContext; class KJSErrorDlg; @@ -393,30 +393,30 @@ public: int m_delayRedirect; TQString m_redirectURL; - KAction *m_paViewDocument; - KAction *m_paViewFrame; - KAction *m_paViewInfo; - KAction *m_paSaveBackground; - KAction *m_paSaveDocument; - KAction *m_paSaveFrame; - KAction *m_paSecurity; - KActionMenu *m_paSetEncoding; - KSelectAction *m_paUseStylesheet; + TDEAction *m_paViewDocument; + TDEAction *m_paViewFrame; + TDEAction *m_paViewInfo; + TDEAction *m_paSaveBackground; + TDEAction *m_paSaveDocument; + TDEAction *m_paSaveFrame; + TDEAction *m_paSecurity; + TDEActionMenu *m_paSetEncoding; + TDESelectAction *m_paUseStylesheet; TDEHTMLZoomFactorAction *m_paIncZoomFactor; TDEHTMLZoomFactorAction *m_paDecZoomFactor; - KAction *m_paLoadImages; - KAction *m_paFind; - KAction *m_paFindNext; - KAction *m_paFindPrev; - KAction *m_paFindAheadText; - KAction *m_paFindAheadLinks; - KAction *m_paPrintFrame; - KAction *m_paSelectAll; - KAction *m_paDebugScript; - KAction *m_paDebugDOMTree; - KAction *m_paDebugRenderTree; - KAction *m_paStopAnimations; - KToggleAction *m_paToggleCaretMode; + TDEAction *m_paLoadImages; + TDEAction *m_paFind; + TDEAction *m_paFindNext; + TDEAction *m_paFindPrev; + TDEAction *m_paFindAheadText; + TDEAction *m_paFindAheadLinks; + TDEAction *m_paPrintFrame; + TDEAction *m_paSelectAll; + TDEAction *m_paDebugScript; + TDEAction *m_paDebugDOMTree; + TDEAction *m_paDebugRenderTree; + TDEAction *m_paStopAnimations; + TDEToggleAction *m_paToggleCaretMode; KParts::PartManager *m_manager; @@ -548,8 +548,8 @@ public: bool m_newJSInterpreterExists; // set to 1 by setOpenedByJS, for window.open tdehtml::Decoder::AutoDetectLanguage m_autoDetectLanguage; - KPopupMenu *m_automaticDetection; - KSelectAction *m_manualDetection; + TDEPopupMenu *m_automaticDetection; + TDESelectAction *m_manualDetection; void setFlagRecursively(bool TDEHTMLPartPrivate::*flag, bool value); /** returns the caret node */ diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp index d05591f48..88a662eb6 100644 --- a/tdehtml/test_regression.cpp +++ b/tdehtml/test_regression.cpp @@ -558,7 +558,7 @@ int main(int argc, char *argv[]) // create widgets TDEHTMLFactory *fac = new TDEHTMLFactory(); - KMainWindow *toplevel = new KMainWindow(); + TDEMainWindow *toplevel = new TDEMainWindow(); TDEHTMLPart *part = new TDEHTMLPart( toplevel, 0, toplevel, 0, TDEHTMLPart::BrowserViewGUI ); toplevel->setCentralWidget( part->widget() ); diff --git a/tdehtml/testtdehtml.cpp b/tdehtml/testtdehtml.cpp index 001780dc2..e9d1cd4e1 100644 --- a/tdehtml/testtdehtml.cpp +++ b/tdehtml/testtdehtml.cpp @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) TDEHTMLFactory *fac = new TDEHTMLFactory(true); #endif - KMainWindow *toplevel = new KMainWindow(); + TDEMainWindow *toplevel = new TDEMainWindow(); TDEHTMLPart *doc = new TDEHTMLPart( toplevel, 0, toplevel, 0, TDEHTMLPart::BrowserViewGUI ); Dummy *dummy = new Dummy( doc ); @@ -105,14 +105,14 @@ int main(int argc, char *argv[]) e.setAttribute( "name", "print" ); toolBar.insertBefore( e, toolBar.firstChild() ); - (void)new KAction( "Reload", "reload", Qt::Key_F5, dummy, TQT_SLOT( reload() ), doc->actionCollection(), "reload" ); - (void)new KAction( "Benchmark...", 0, 0, dummy, TQT_SLOT( doBenchmark() ), doc->actionCollection(), "debugDoBenchmark" ); - KAction* kprint = new KAction( "Print", "print", 0, doc->browserExtension(), TQT_SLOT( print() ), doc->actionCollection(), "print" ); + (void)new TDEAction( "Reload", "reload", Qt::Key_F5, dummy, TQT_SLOT( reload() ), doc->actionCollection(), "reload" ); + (void)new TDEAction( "Benchmark...", 0, 0, dummy, TQT_SLOT( doBenchmark() ), doc->actionCollection(), "debugDoBenchmark" ); + TDEAction* kprint = new TDEAction( "Print", "print", 0, doc->browserExtension(), TQT_SLOT( print() ), doc->actionCollection(), "print" ); kprint->setEnabled(true); - KToggleAction *ta = new KToggleAction( "Navigable", "editclear", 0, doc->actionCollection(), "navigable" ); + TDEToggleAction *ta = new TDEToggleAction( "Navigable", "editclear", 0, doc->actionCollection(), "navigable" ); ta->setChecked(doc->isCaretMode()); TQWidget::connect(ta, TQT_SIGNAL(toggled(bool)), dummy, TQT_SLOT( toggleNavigable(bool) )); - ta = new KToggleAction( "Editable", "edit", 0, doc->actionCollection(), "editable" ); + ta = new TDEToggleAction( "Editable", "edit", 0, doc->actionCollection(), "editable" ); ta->setChecked(doc->isEditable()); TQWidget::connect(ta, TQT_SIGNAL(toggled(bool)), dummy, TQT_SLOT( toggleEditable(bool) )); toplevel->guiFactory()->addClient( doc ); diff --git a/tdeio/Mainpage.dox b/tdeio/Mainpage.dox index 2de4b3157..464faf7a6 100644 --- a/tdeio/Mainpage.dox +++ b/tdeio/Mainpage.dox @@ -39,7 +39,7 @@ * its building blocks and some other widgets, making use of the file dialog. * * The file dialog provides different views; there is a vertically scrolling - * view based on KListView, showing things like filename, file size, + * view based on TDEListView, showing things like filename, file size, * permissions etc. in separate columns. And there is a horizontally scrolling * view based on KIconView. Additionally, there are some compound views, * like a view using the icon-view for files on the right side and another @@ -55,7 +55,7 @@ * to them is KDirOperator. It allows the user to switch between different * views. * - * KFileTreeView is a KListView based widget that displays files and/or + * KFileTreeView is a TDEListView based widget that displays files and/or * directories as a tree. It does not implement the KFileView interface, * however, so it can't be used with KDirOperator. * @@ -100,7 +100,7 @@ * The KFileView based on KIconView. * * KFileDetailView: - * The KFileView based on KListView. + * The KFileView based on TDEListView. * * KFilePreview: * The KFileView, combining a widget showing preview for a selected file diff --git a/tdeio/bookmarks/kbookmarkbar.cc b/tdeio/bookmarks/kbookmarkbar.cc index e73801808..b1ebb94fa 100644 --- a/tdeio/bookmarks/kbookmarkbar.cc +++ b/tdeio/bookmarks/kbookmarkbar.cc @@ -45,10 +45,10 @@ class KBookmarkBarPrivate : public dPtrTemplate { public: - TQPtrList m_actions; + TQPtrList m_actions; bool m_readOnly; KBookmarkManager* m_filteredMgr; - KToolBar* m_sepToolBar; + TDEToolBar* m_sepToolBar; int m_sepIndex; bool m_atFirst; TQString m_dropAddress; @@ -85,8 +85,8 @@ private: }; KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr, - KBookmarkOwner *_owner, KToolBar *_toolBar, - KActionCollection *coll, + KBookmarkOwner *_owner, TDEToolBar *_toolBar, + TDEActionCollection *coll, TQObject *parent, const char *name ) : TQObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar), m_actionCollection( coll ), m_pManager(mgr) @@ -150,7 +150,7 @@ KBookmarkBar::~KBookmarkBar() void KBookmarkBar::clear() { - TQPtrListIterator it( dptr()->m_actions ); + TQPtrListIterator it( dptr()->m_actions ); m_toolBar->clear(); for (; it.current(); ++it ) { (*it)->unplugAll(); @@ -199,9 +199,9 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) m_toolBar->insertLineSeparator(); else { - KAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + this, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", bm.url().url() ); action->setProperty( "address", bm.address() ); @@ -215,7 +215,7 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) } else { - KActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), + TDEActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), m_actionCollection, "bookmarkbar-actionmenu"); action->setProperty( "address", bm.address() ); @@ -252,11 +252,11 @@ bool KBookmarkBar::isReadOnly() const return dptr()->m_readOnly; } -void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) +void KBookmarkBar::slotBookmarkSelected( TDEAction::ActivationReason /*reason*/, TQt::ButtonState state ) { if (!m_pOwner) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast(sender()); + const TDEAction* action = dynamic_cast(sender()); if(action) { const TQString & url = sender()->property("url").toString(); @@ -267,7 +267,7 @@ void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, T void KBookmarkBar::slotBookmarkSelected() { - slotBookmarkSelected(KAction::ToolBarActivation, Qt::NoButton); + slotBookmarkSelected(TDEAction::ToolBarActivation, Qt::NoButton); } static const int const_sepId = -9999; // FIXME this is ugly, @@ -282,9 +282,9 @@ static void removeTempSep(KBookmarkBarPrivate* p) } } -static KAction* findPluggedAction(TQPtrList actions, KToolBar *tb, int id) +static TDEAction* findPluggedAction(TQPtrList actions, TDEToolBar *tb, int id) { - TQPtrListIterator it( actions ); + TQPtrListIterator it( actions ); for (; (*it); ++it ) if ((*it)->isPlugged(tb, id)) return (*it); @@ -302,19 +302,19 @@ static KAction* findPluggedAction(TQPtrList actions, KToolBar *tb, int * returned action was dropped on */ static TQString handleToolbarDragMoveEvent( - KBookmarkBarPrivate *p, KToolBar *tb, TQPoint pos, TQPtrList actions, + KBookmarkBarPrivate *p, TDEToolBar *tb, TQPoint pos, TQPtrList actions, bool &atFirst, KBookmarkManager *mgr ) { Q_UNUSED( mgr ); - Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast(actions.first()->container(0))) ); + Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast(actions.first()->container(0))) ); p->m_sepToolBar = tb; p->m_sepToolBar->removeItemDelayed(const_sepId); int index = 0; - KToolBarButton* b; + TDEToolBarButton* b; - b = dynamic_cast(tb->childAt(pos)); - KAction *a = 0; + b = dynamic_cast(tb->childAt(pos)); + TDEAction *a = 0; TQString address; atFirst = false; @@ -382,23 +382,23 @@ skipact: } // TODO - document!!!! -static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList actions, +static TDEAction* handleToolbarMouseButton(TQPoint pos, TQPtrList actions, KBookmarkManager * /*mgr*/, TQPoint & pt) { - KAction *act = actions.first(); + TDEAction *act = actions.first(); if (!act) { return 0; } - KToolBar *tb = dynamic_cast(act->container(0)); + TDEToolBar *tb = dynamic_cast(act->container(0)); Q_ASSERT(tb); - KToolBarButton *b; - b = dynamic_cast(tb->childAt(pos)); + TDEToolBarButton *b; + b = dynamic_cast(tb->childAt(pos)); if (!b) return 0; - KAction *a = 0; + TDEAction *a = 0; a = findPluggedAction(actions, tb, b->id()); Q_ASSERT(a); pt = tb->mapToGlobal(pos); @@ -454,7 +454,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *mev = (TQMouseEvent*)e; TQPoint pt; - KAction *_a; + TDEAction *_a; // FIXME, see how this holds up on an empty toolbar _a = handleToolbarMouseButton( mev->pos(), dptr()->m_actions, m_pManager, pt ); @@ -463,7 +463,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) dptr()->m_highlightedAddress = _a->property("address").toString(); KBookmark bookmark = m_pManager->findByAddress( dptr()->m_highlightedAddress ); RMB::begin_rmb_action(this); - KPopupMenu *pm = new KPopupMenu; + TDEPopupMenu *pm = new TDEPopupMenu; rmbSelf(this)->fillContextMenu( pm, dptr()->m_highlightedAddress, 0 ); emit aboutToShowContextMenu( rmbSelf(this)->atAddress( dptr()->m_highlightedAddress ), pm ); rmbSelf(this)->fillContextMenu2( pm, dptr()->m_highlightedAddress, 0 ); @@ -510,7 +510,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) return false; bool _atFirst; TQString dropAddress; - KToolBar *tb = (KToolBar*)o; + TDEToolBar *tb = (TDEToolBar*)o; dropAddress = handleToolbarDragMoveEvent(dptr(), tb, dme->pos(), dptr()->m_actions, _atFirst, m_pManager); if (!dropAddress.isNull()) { diff --git a/tdeio/bookmarks/kbookmarkbar.h b/tdeio/bookmarks/kbookmarkbar.h index 1f100d183..2f5495cda 100644 --- a/tdeio/bookmarks/kbookmarkbar.h +++ b/tdeio/bookmarks/kbookmarkbar.h @@ -27,11 +27,11 @@ #include #include -class KToolBar; +class TDEToolBar; class KBookmarkMenu; class KBookmarkOwner; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; class TQPopupMenu; /** @@ -52,14 +52,14 @@ public: * @param owner implementation of the KBookmarkOwner interface (callbacks) * @param toolBar toolbar to fill * - * The KActionCollection pointer argument is now obsolete. + * The TDEActionCollection pointer argument is now obsolete. * * @param parent the parent widget for the bookmark toolbar * @param name the internal name for the bookmark toolbar */ KBookmarkBar( KBookmarkManager* manager, - KBookmarkOwner *owner, KToolBar *toolBar, - KActionCollection *, + KBookmarkOwner *owner, TDEToolBar *toolBar, + TDEActionCollection *, TQObject *parent = 0L, const char *name = 0L); virtual ~KBookmarkBar(); @@ -98,7 +98,7 @@ public slots: /** * @since 3.4 */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); + void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state ); /// @since 3.2 void slotRMBActionRemove( int ); @@ -119,8 +119,8 @@ private: KBookmarkGroup getToolbar(); KBookmarkOwner *m_pOwner; - TQGuardedPtr m_toolBar; - KActionCollection *m_actionCollection; + TQGuardedPtr m_toolBar; + TDEActionCollection *m_actionCollection; KBookmarkManager *m_pManager; TQPtrList m_lstSubMenus; diff --git a/tdeio/bookmarks/kbookmarkimporter.h b/tdeio/bookmarks/kbookmarkimporter.h index cc87b2004..6a038e03b 100644 --- a/tdeio/bookmarks/kbookmarkimporter.h +++ b/tdeio/bookmarks/kbookmarkimporter.h @@ -31,7 +31,7 @@ /** * A class for importing NS bookmarks * KEditBookmarks uses it to insert bookmarks into its DOM tree, - * and KActionMenu uses it to create actions directly. + * and TDEActionMenu uses it to create actions directly. * @since 3.2 */ class TDEIO_EXPORT KBookmarkImporterBase : public TQObject diff --git a/tdeio/bookmarks/kbookmarkmenu.cc b/tdeio/bookmarks/kbookmarkmenu.cc index a4d88ae57..ff9f8d4ec 100644 --- a/tdeio/bookmarks/kbookmarkmenu.cc +++ b/tdeio/bookmarks/kbookmarkmenu.cc @@ -77,8 +77,8 @@ static TQString makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const /********************************************************************/ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * _owner, KPopupMenu * _parentMenu, - KActionCollection *collec, bool _isRoot, bool _add, + KBookmarkOwner * _owner, TDEPopupMenu * _parentMenu, + TDEActionCollection *collec, bool _isRoot, bool _add, const TQString & parentAddress ) : TQObject(), m_bIsRoot(_isRoot), m_bAddBookmark(_add), @@ -96,9 +96,9 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, if (m_actionCollection) { m_actionCollection->setHighlightingEnabled(true); - disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), 0, 0 ); - connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), - this, TQT_SLOT( slotActionHighlighted( KAction * ) ) ); + disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( TDEAction * ) ), 0, 0 ); + connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( TDEAction * ) ), + this, TQT_SLOT( slotActionHighlighted( TDEAction * ) ) ); } m_bNSBookmark = m_parentAddress.isNull(); @@ -112,8 +112,8 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, if ( KBookmarkSettings::self()->m_contextmenu ) { (void) _parentMenu->contextMenu(); - connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ), - this, TQT_SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) )); + connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(TDEPopupMenu*, int, TQPopupMenu*) ), + this, TQT_SLOT( slotAboutToShowContextMenu(TDEPopupMenu*, int, TQPopupMenu*) )); } if ( m_bIsRoot ) @@ -142,7 +142,7 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, KBookmarkMenu::~KBookmarkMenu() { //kdDebug(7043) << "KBookmarkMenu::~KBookmarkMenu() " << this << endl; - TQPtrListIterator it( m_actions ); + TQPtrListIterator it( m_actions ); for (; it.current(); ++it ) it.current()->unplugAll(); @@ -169,7 +169,7 @@ TQString KBookmarkMenu::s_highlightedAddress; TQString KBookmarkMenu::s_highlightedImportType; TQString KBookmarkMenu::s_highlightedImportLocation; -void KBookmarkMenu::slotActionHighlighted( KAction* action ) +void KBookmarkMenu::slotActionHighlighted( TDEAction* action ) { if (action->isA("KBookmarkActionMenu") || action->isA("KBookmarkAction")) { @@ -231,12 +231,12 @@ KBookmark RMB::atAddress(const TQString & address) return bookmark; } -void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, TQPopupMenu* contextMenu ) +void KBookmarkMenu::slotAboutToShowContextMenu( TDEPopupMenu*, int, TQPopupMenu* contextMenu ) { //kdDebug(7043) << "KBookmarkMenu::slotAboutToShowContextMenu" << s_highlightedAddress << endl; if (s_highlightedAddress.isNull()) { - KPopupMenu::contextMenuFocus()->hideContextMenu(); + TDEPopupMenu::contextMenuFocus()->hideContextMenu(); return; } contextMenu->clear(); @@ -411,7 +411,7 @@ void RMB::slotRMBActionCopyLocation( int val ) } void RMB::hidePopup() { - KPopupMenu::contextMenuFocus()->hideContextMenu(); + TDEPopupMenu::contextMenuFocus()->hideContextMenu(); } /********************************************************************/ @@ -467,7 +467,7 @@ void KBookmarkMenu::refill() //kdDebug(7043) << "KBookmarkMenu::refill()" << endl; m_lstSubMenus.clear(); - TQPtrListIterator it( m_actions ); + TQPtrListIterator it( m_actions ); for (; it.current(); ++it ) it.current()->unplug( m_parentMenu ); @@ -480,12 +480,12 @@ void KBookmarkMenu::refill() void KBookmarkMenu::addAddBookmarksList() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "Bookmark Tabs as Folder..." ); - KAction * paAddBookmarksList = new KAction( title, + TDEAction * paAddBookmarksList = new TDEAction( title, "bookmarks_list_add", 0, this, @@ -500,14 +500,14 @@ void KBookmarkMenu::addAddBookmarksList() void KBookmarkMenu::addAddBookmark() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "Add Bookmark" ); - KAction * paAddBookmarks = new KAction( title, + TDEAction * paAddBookmarks = new TDEAction( title, "bookmark_add", - m_bIsRoot && m_bAddShortcuts ? KStdAccel::addBookmark() : KShortcut(), + m_bIsRoot && m_bAddShortcuts ? TDEStdAccel::addBookmark() : TDEShortcut(), this, TQT_SLOT( slotAddBookmark() ), m_actionCollection, m_bIsRoot ? "add_bookmark" : 0 ); @@ -520,10 +520,10 @@ void KBookmarkMenu::addAddBookmark() void KBookmarkMenu::addEditBookmarks() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; - KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), + TDEAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), m_actionCollection, "edit_bookmarks" ); m_paEditBookmarks->plug( m_parentMenu ); m_paEditBookmarks->setToolTip( i18n( "Edit your bookmark collection in a separate window" ) ); @@ -532,7 +532,7 @@ void KBookmarkMenu::addEditBookmarks() void KBookmarkMenu::addNewFolder() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "&New Bookmark Folder..." ); @@ -540,7 +540,7 @@ void KBookmarkMenu::addNewFolder() while ( ( p = title.find( '&' ) ) >= 0 ) title.remove( p, 1 ); - KAction * paNewFolder = new KAction( title, + TDEAction * paNewFolder = new TDEAction( title, "folder_new", //"folder", 0, this, @@ -555,7 +555,7 @@ void KBookmarkMenu::addNewFolder() void KBookmarkMenu::fillBookmarkMenu() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; if ( m_bIsRoot ) @@ -594,7 +594,7 @@ void KBookmarkMenu::fillBookmarkMenu() haveSep = true; } - KActionMenu * actionMenu; + TDEActionMenu * actionMenu; actionMenu = new KImportedBookmarksActionMenu( info.name, info.type, m_actionCollection, "kbookmarkmenu" ); @@ -638,9 +638,9 @@ void KBookmarkMenu::fillBookmarkMenu() else { //kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl; - KAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + this, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", bm.url().url() ); action->setProperty( "address", bm.address() ); @@ -654,7 +654,7 @@ void KBookmarkMenu::fillBookmarkMenu() else { //kdDebug(7043) << "Creating bookmark submenu named " << bm.text() << endl; - KActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), + TDEActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), m_actionCollection, "kbookmarkmenu" ); actionMenu->setProperty( "address", bm.address() ); @@ -681,7 +681,7 @@ void KBookmarkMenu::fillBookmarkMenu() if ( KBookmarkSettings::self()->m_quickactions ) { - KActionMenu * actionMenu = new KActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); + TDEActionMenu * actionMenu = new TDEActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); fillContextMenu( actionMenu->popupMenu(), m_parentAddress, 1 ); actionMenu->plug( m_parentMenu ); m_actions.append( actionMenu ); @@ -743,11 +743,11 @@ void KBookmarkMenu::slotNewFolder() } } -void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) +void KBookmarkMenu::slotBookmarkSelected( TDEAction::ActivationReason /*reason*/, TQt::ButtonState state ) { kdDebug(7043) << "KBookmarkMenu::slotBookmarkSelected()" << endl; if ( !m_pOwner ) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast(sender()); + const TDEAction* action = dynamic_cast(sender()); if(action) { const TQString& url = sender()->property("url").toString(); @@ -758,7 +758,7 @@ void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, void KBookmarkMenu::slotBookmarkSelected() { - slotBookmarkSelected(KAction::PopupMenuActivation, Qt::NoButton); + slotBookmarkSelected(TDEAction::PopupMenuActivation, Qt::NoButton); } KExtendedBookmarkOwner* KBookmarkMenu::extOwner() @@ -1057,9 +1057,9 @@ void KBookmarkMenuNSImporter::newBookmark( const TQString & text, const TQCStrin { TQString _text = KStringHandler::csqueeze(text); _text.replace( '&', "&&" ); - KAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - m_menu, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + m_menu, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", url ); action->setToolTip( url ); action->plug( mstack.top()->m_parentMenu ); @@ -1070,7 +1070,7 @@ void KBookmarkMenuNSImporter::newFolder( const TQString & text, bool, const TQSt { TQString _text = KStringHandler::csqueeze(text); _text.replace( '&', "&&" ); - KActionMenu * actionMenu = new KActionMenu( _text, "folder", m_actionCollection, 0L ); + TDEActionMenu * actionMenu = new TDEActionMenu( _text, "folder", m_actionCollection, 0L ); actionMenu->plug( mstack.top()->m_parentMenu ); mstack.top()->m_actions.append( actionMenu ); KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_menu->m_pOwner, actionMenu->popupMenu(), diff --git a/tdeio/bookmarks/kbookmarkmenu.h b/tdeio/bookmarks/kbookmarkmenu.h index 35e6191e3..003077202 100644 --- a/tdeio/bookmarks/kbookmarkmenu.h +++ b/tdeio/bookmarks/kbookmarkmenu.h @@ -43,18 +43,18 @@ class TQListView; class KLineEdit; class KBookmark; class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; +class TDEAction; +class TDEActionMenu; +class TDEActionCollection; class KBookmarkOwner; class KBookmarkMenu; -class KPopupMenu; +class TDEPopupMenu; namespace TDEIO { class Job; } /** * This class provides a bookmark menu. It is typically used in - * cooperation with KActionMenu but doesn't have to be. + * cooperation with TDEActionMenu but doesn't have to be. * * If you use this class by itself, then it will use KDE defaults for * everything -- the bookmark path, bookmark editor, bookmark launcher.. @@ -66,7 +66,7 @@ namespace TDEIO { class Job; } * * Using this class is very simple: * - * 1) Create a popup menu (either KActionMenu or KPopupMenu will do) + * 1) Create a popup menu (either TDEActionMenu or TDEPopupMenu will do) * 2) Instantiate a new KBookmarkMenu object using the above popup * menu as a parameter * 3) Insert your (now full) popup menu wherever you wish @@ -90,7 +90,7 @@ public: * @param mgr The bookmark manager to use (i.e. for reading and writing) * @param owner implementation of the KBookmarkOwner callback interface. * @param parentMenu menu to be filled - * @param collec parent collection for the KActions. + * @param collec parent collection for the TDEActions. * Only used for other menus than the toplevel one. * @param root true for the toplevel menu * @param add true to show the "Add Bookmark" and "New Folder" entries @@ -102,8 +102,8 @@ public: * An _empty_ parentAddress denotes the toplevel bookmark menu */ KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * owner, KPopupMenu * parentMenu, - KActionCollection * collec, bool root, bool add = true, + KBookmarkOwner * owner, TDEPopupMenu * parentMenu, + TDEActionCollection * collec, bool root, bool add = true, const TQString & parentAddress = "" ); ~KBookmarkMenu(); @@ -169,8 +169,8 @@ public slots: // public for bookmark bar protected slots: void slotAboutToShow(); - void slotAboutToShowContextMenu( KPopupMenu *, int, TQPopupMenu * ); - void slotActionHighlighted( KAction * ); + void slotAboutToShowContextMenu( TDEPopupMenu *, int, TQPopupMenu * ); + void slotActionHighlighted( TDEAction * ); void slotRMBActionRemove( int ); void slotRMBActionInsert( int ); @@ -182,7 +182,7 @@ protected slots: /** * @ since 3.4 */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); + void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state ); void slotAddBookmarksList(); void slotAddBookmark(); void slotNewFolder(); @@ -214,16 +214,16 @@ protected: * The menu in which we plug our actions. * Supplied in the constructor. */ - KPopupMenu * m_parentMenu; + TDEPopupMenu * m_parentMenu; /** * List of our sub menus */ TQPtrList m_lstSubMenus; - KActionCollection * m_actionCollection; + TDEActionCollection * m_actionCollection; /** * List of our actions. */ - TQPtrList m_actions; + TQPtrList m_actions; /** * Parent bookmark for this menu. */ @@ -236,13 +236,13 @@ protected: }; /** - * A class connected to KNSBookmarkImporter, to fill KActionMenus. + * A class connected to KNSBookmarkImporter, to fill TDEActionMenus. */ class TDEIO_EXPORT KBookmarkMenuNSImporter : public TQObject { Q_OBJECT public: - KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, KActionCollection * act ) : + KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, TDEActionCollection * act ) : m_menu(menu), m_actionCollection(act), m_pManager(mgr) {} void openNSBookmarks(); @@ -258,7 +258,7 @@ protected slots: protected: TQPtrStack mstack; KBookmarkMenu * m_menu; - KActionCollection * m_actionCollection; + TDEActionCollection * m_actionCollection; KBookmarkManager* m_pManager; }; diff --git a/tdeio/bookmarks/kbookmarkmenu_p.h b/tdeio/bookmarks/kbookmarkmenu_p.h index cb88607fe..dff3e6f30 100644 --- a/tdeio/bookmarks/kbookmarkmenu_p.h +++ b/tdeio/bookmarks/kbookmarkmenu_p.h @@ -44,15 +44,15 @@ class TQListView; class KLineEdit; class KBookmark; class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; +class TDEAction; +class TDEActionMenu; +class TDEActionCollection; class KBookmarkOwner; class KBookmarkMenu; class KBookmarkBar; -class KPopupMenu; +class TDEPopupMenu; -class KImportedBookmarksActionMenu : public KActionMenu { +class KImportedBookmarksActionMenu : public TDEActionMenu { Q_OBJECT TQ_PROPERTY( TQString type READ type WRITE setType ) TQ_PROPERTY( TQString location READ location WRITE setLocation ) @@ -67,13 +67,13 @@ private: public: KImportedBookmarksActionMenu( const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEActionMenu(text, sIconName, parent, name) { ; } }; -class KBookmarkActionMenu : public KActionMenu { +class KBookmarkActionMenu : public TDEActionMenu { Q_OBJECT TQ_PROPERTY( TQString url READ url WRITE setUrl ) TQ_PROPERTY( TQString address READ address WRITE setAddress ) @@ -92,13 +92,13 @@ private: public: KBookmarkActionMenu( const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEActionMenu(text, sIconName, parent, name) { ; } }; -class KBookmarkAction : public KAction { +class KBookmarkAction : public TDEAction { Q_OBJECT TQ_PROPERTY( TQString url READ url WRITE setUrl ) TQ_PROPERTY( TQString address READ address WRITE setAddress ) @@ -113,15 +113,15 @@ private: public: // KDE4: remove KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, + const TQString& text, const TQString& sIconName, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, receiver, slot, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEAction(text, sIconName, cut, receiver, slot, parent, name) { } KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, parent, name) { + const TQString& text, const TQString& sIconName, const TDEShortcut& cut, + TDEActionCollection* parent, const char* name) + : TDEAction(text, sIconName, cut, parent, name) { } }; diff --git a/tdeio/misc/tdewalletd/tdewalletd.desktop b/tdeio/misc/tdewalletd/tdewalletd.desktop index 1e65fe0df..1f92976e7 100644 --- a/tdeio/misc/tdewalletd/tdewalletd.desktop +++ b/tdeio/misc/tdewalletd/tdewalletd.desktop @@ -61,7 +61,7 @@ Name[ru]=Служба бумажника Name[rw]=Igice Dayimoni KUruhago Name[se]=KWallet-bálvámoduvla Name[sk]=Modul démona KWallet -Name[sl]=Modul demona KListnica +Name[sl]=Modul demona TDEListnica Name[sq]=Demoni për Modulin KWallet Name[sr]=KWallet демон модул Name[sr@Latn]=KWallet demon modul @@ -132,7 +132,7 @@ Comment[ru]=Управление бумажником TDE Comment[rw]=Igice cya dayimoni KUruhago cya KDED Comment[se]=KDED:a KWallet-bálvámoduvla Comment[sk]=Modul démona KWallet pre KDED -Comment[sl]=Modul demona KListnica za KDED +Comment[sl]=Modul demona TDEListnica za KDED Comment[sr]=KWallet демон модул за KDED Comment[sr@Latn]=KWallet demon modul za KDED Comment[sv]=Kwallet-demonmodul för KDED diff --git a/tdeio/misc/uiserver.cpp b/tdeio/misc/uiserver.cpp index 8a9c7f21e..4f4b720f5 100644 --- a/tdeio/misc/uiserver.cpp +++ b/tdeio/misc/uiserver.cpp @@ -94,7 +94,7 @@ class UIServerSystemTray:public KSystemTray UIServerSystemTray(UIServer* uis) :KSystemTray(uis) { - KPopupMenu* pop= contextMenu(); + TDEPopupMenu* pop= contextMenu(); pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure())); pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon())); setPixmap(loadIcon("filesave")); @@ -118,7 +118,7 @@ class ProgressConfigDialog:public KDialogBase TQCheckBox *m_statusBarCb; TQCheckBox *m_headerCb; TQCheckBox *m_fixedWidthCb; - KListView *m_columns; + TDEListView *m_columns; TQCheckListItem *(m_items[ListProgress::TB_MAX]); }; @@ -134,7 +134,7 @@ ProgressConfigDialog::ProgressConfigDialog(TQWidget *parent) m_statusBarCb=new TQCheckBox(i18n("Show statusbar"), plainPage()); m_fixedWidthCb=new TQCheckBox(i18n("Column widths are user adjustable"), plainPage()); TQLabel *label=new TQLabel(i18n("Show information:"), plainPage()); - m_columns=new KListView(plainPage()); + m_columns=new TDEListView(plainPage()); m_columns->addColumn("info"); m_columns->setSorting(-1); @@ -455,7 +455,7 @@ void ProgressItem::updateVisibility() //----------------------------------------------------------------------------- ListProgress::ListProgress (TQWidget *parent, const char *name) -: KListView (parent, name) +: TDEListView (parent, name) { // enable selection of more than one item @@ -584,7 +584,7 @@ void ListProgress::writeSettings() { UIServer::UIServer() -:KMainWindow(0, "") +:TDEMainWindow(0, "") ,DCOPObject("UIServer") ,m_shuttingDown(false) ,m_configDialog(0) @@ -602,7 +602,7 @@ UIServer::UIServer() TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), true, i18n("Settings...")); - toolBar()->setBarPos( KToolBar::Left ); + toolBar()->setBarPos( TDEToolBar::Left ); // setup statusbar statusBar()->insertItem( i18n(" Files: %1 ").arg( 0 ), ID_TOTAL_FILES); @@ -619,8 +619,8 @@ UIServer::UIServer() TQT_SLOT( slotSelection() ) ); connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ), TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) ); - connect( listProgress, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &)), - TQT_SLOT(slotShowContextMenu(KListView*, TQListViewItem *, const TQPoint&))); + connect( listProgress, TQT_SIGNAL( contextMenu( TDEListView*, TQListViewItem *, const TQPoint &)), + TQT_SLOT(slotShowContextMenu(TDEListView*, TQListViewItem *, const TQPoint&))); // setup animation timer @@ -671,7 +671,7 @@ void UIServer::applySettings() toolBar()->show(); } -void UIServer::slotShowContextMenu(KListView*, TQListViewItem* item, const TQPoint& pos) +void UIServer::slotShowContextMenu(TDEListView*, TQListViewItem* item, const TQPoint& pos) { if (m_contextMenu==0) { @@ -1355,7 +1355,7 @@ void UIServer::slotCancelCurrent() { void UIServer::resizeEvent(TQResizeEvent* e) { - KMainWindow::resizeEvent(e); + TDEMainWindow::resizeEvent(e); writeSettings(); } diff --git a/tdeio/misc/uiserver.h b/tdeio/misc/uiserver.h index baf495dfe..c86886bac 100644 --- a/tdeio/misc/uiserver.h +++ b/tdeio/misc/uiserver.h @@ -55,7 +55,7 @@ struct ListProgressColumnConfig * List view in the UIServer. * @internal */ -class TDEIO_EXPORT ListProgress : public KListView { +class TDEIO_EXPORT ListProgress : public TDEListView { Q_OBJECT @@ -214,7 +214,7 @@ class UIServerSystemTray; * * @internal */ -class TDEIO_EXPORT UIServer : public KMainWindow, public DCOPObject { +class TDEIO_EXPORT UIServer : public TDEMainWindow, public DCOPObject { K_DCOP Q_OBJECT @@ -382,7 +382,7 @@ protected slots: void slotJobCanceled( ProgressItem * ); void slotApplyConfig(); - void slotShowContextMenu(KListView*, TQListViewItem *item, const TQPoint& pos); + void slotShowContextMenu(TDEListView*, TQListViewItem *item, const TQPoint& pos); protected: @@ -396,7 +396,7 @@ protected: TQTimer* updateTimer; ListProgress* listProgress; - KToolBar::BarPosition toolbarPos; + TDEToolBar::BarPosition toolbarPos; TQString properties; void applySettings(); diff --git a/tdeio/tdefile/ChangeLog b/tdeio/tdefile/ChangeLog index 79ac59808..ccfb45ab5 100644 --- a/tdeio/tdefile/ChangeLog +++ b/tdeio/tdefile/ChangeLog @@ -62,7 +62,7 @@ Tue Feb 15 14:21:41 2000 Carsten Pfeiffer * kdiroperator.cpp (setSorting): added setSorting() and sorting() to keep sorting when switching views - a few cosmetic and KAction changes + a few cosmetic and TDEAction changes Sun Feb 13 00:45:12 2000 Carsten Pfeiffer @@ -87,7 +87,7 @@ Fri Feb 11 12:17:59 2000 Carsten Pfeiffer Thu Feb 10 17:06:36 2000 Carsten Pfeiffer * kdiroperator.cpp (connectView): - - Now that KToggleAction is fixed, I can commit the new stuff: + - Now that TDEToggleAction is fixed, I can commit the new stuff: Offer Actions for all the common functionality, i.e. sorting, setting the view, home(), cdUp(), back, forward, etc. All actions are exposed through a QActionCollection diff --git a/tdeio/tdefile/NOTES b/tdeio/tdefile/NOTES index ad99065be..e2037e382 100644 --- a/tdeio/tdefile/NOTES +++ b/tdeio/tdefile/NOTES @@ -82,7 +82,7 @@ konqueror versions of the views. This class inherits KParts::ReadOnlyPart, and provides a BrowserExtension. It integrates KonqFileManagerWidget as its KParts widget, and provides -KActions for it. +TDEActions for it. Important : diff --git a/tdeio/tdefile/kacleditwidget.cpp b/tdeio/tdefile/kacleditwidget.cpp index 94ee0d4c4..01eb8bcb8 100644 --- a/tdeio/tdefile/kacleditwidget.cpp +++ b/tdeio/tdefile/kacleditwidget.cpp @@ -143,7 +143,7 @@ KACLListViewItem::KACLListViewItem( TQListView* parent, KACLListView::EntryType _type, unsigned short _value, bool defaults, const TQString& _qualifier ) - : KListViewItem( parent, parent->lastItem() ), // we want to append + : TDEListViewItem( parent, parent->lastItem() ), // we want to append type( _type ), value( _value ), isDefault( defaults ), qualifier( _qualifier ), isPartial( false ) { @@ -204,7 +204,7 @@ void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) ); p->setFont( font ); } - KListViewItem::paintCell( p, mycg, column, width, alignment ); + TDEListViewItem::paintCell( p, mycg, column, width, alignment ); KACLListViewItem *below =0; if ( itemBelow() ) @@ -556,7 +556,7 @@ void EditACLEntryDialog::slotSelectionChanged( int id ) KACLListView::KACLListView( TQWidget* parent, const char* name ) - : KListView( parent, name ), + : TDEListView( parent, name ), m_hasMask( false ), m_allowDefaults( false ) { // Add the columns @@ -753,7 +753,7 @@ void KACLListView::contentsMousePressEvent( TQMouseEvent * e ) if ( !clickedItem ) return; // if the click is on an as yet unselected item, select it first if ( !clickedItem->isSelected() ) - KListView::contentsMousePressEvent( e ); + TDEListView::contentsMousePressEvent( e ); if ( !currentItem() ) return; int column = header()->sectionAt( e->x() ); @@ -770,7 +770,7 @@ void KACLListView::contentsMousePressEvent( TQMouseEvent * e ) perm = ACL_EXECUTE; break; default: - return KListView::contentsMousePressEvent( e ); + return TDEListView::contentsMousePressEvent( e ); } KACLListViewItem* referenceItem = static_cast( clickedItem ); unsigned short referenceHadItSet = referenceItem->value & perm; diff --git a/tdeio/tdefile/kacleditwidget_p.h b/tdeio/tdefile/kacleditwidget_p.h index dc7e4c811..9ea5e3203 100644 --- a/tdeio/tdefile/kacleditwidget_p.h +++ b/tdeio/tdefile/kacleditwidget_p.h @@ -47,7 +47,7 @@ class TQCheckBox; /** @author Sean Harmer */ -class KACLListView : public KListView +class KACLListView : public TDEListView { Q_OBJECT @@ -168,7 +168,7 @@ private: }; -class KACLListViewItem : public KListViewItem +class KACLListViewItem : public TDEListViewItem { public: KACLListViewItem( TQListView* parent, KACLListView::EntryType type, diff --git a/tdeio/tdefile/kcombiview.cpp b/tdeio/tdefile/kcombiview.cpp index bc3d43384..ae408c8e2 100644 --- a/tdeio/tdefile/kcombiview.cpp +++ b/tdeio/tdefile/kcombiview.cpp @@ -319,7 +319,7 @@ void KCombiView::writeConfig( TDEConfig *config, const TQString& group ) right->writeConfig( config, group ); } -KActionCollection * KCombiView::actionCollection() const +TDEActionCollection * KCombiView::actionCollection() const { return focusView( right )->actionCollection(); } diff --git a/tdeio/tdefile/kcombiview.h b/tdeio/tdefile/kcombiview.h index 8da3da3fb..995b80ffc 100644 --- a/tdeio/tdefile/kcombiview.h +++ b/tdeio/tdefile/kcombiview.h @@ -98,7 +98,7 @@ public: void ensureItemVisible( const KFileItem * ); - virtual KActionCollection * actionCollection() const; + virtual TDEActionCollection * actionCollection() const; virtual void setAcceptDrops(bool b); diff --git a/tdeio/tdefile/kcustommenueditor.cpp b/tdeio/tdefile/kcustommenueditor.cpp index 48c911e30..244e22e84 100644 --- a/tdeio/tdefile/kcustommenueditor.cpp +++ b/tdeio/tdefile/kcustommenueditor.cpp @@ -90,7 +90,7 @@ KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent) { d = new KCustomMenuEditorPrivate; TQHBox *page = makeHBoxMainWidget(); - m_listView = new KListView(page); + m_listView = new TDEListView(page); m_listView->addColumn(i18n("Menu")); m_listView->setFullWidth(true); m_listView->setSorting(-1); diff --git a/tdeio/tdefile/kcustommenueditor.h b/tdeio/tdefile/kcustommenueditor.h index 108e9c477..cb43c606f 100644 --- a/tdeio/tdefile/kcustommenueditor.h +++ b/tdeio/tdefile/kcustommenueditor.h @@ -21,7 +21,7 @@ #include -class KListView; +class TDEListView; class TDEConfigBase; /* @@ -58,7 +58,7 @@ public slots: protected: class Item; - KListView *m_listView; + TDEListView *m_listView; class KCustomMenuEditorPrivate; KCustomMenuEditorPrivate *d; diff --git a/tdeio/tdefile/kdiroperator.cpp b/tdeio/tdefile/kdiroperator.cpp index ea3183f78..dcb457662 100644 --- a/tdeio/tdefile/kdiroperator.cpp +++ b/tdeio/tdefile/kdiroperator.cpp @@ -87,7 +87,7 @@ public: TQString lastURL; // used for highlighting a directory on cdUp bool onlyDoubleClickSelectsFiles; TQTimer *progressDelayTimer; - KActionSeparator *viewActionSeparator; + TDEActionSeparator *viewActionSeparator; int dropOptions; TDEConfig *config; @@ -192,10 +192,10 @@ void KDirOperator::insertViewDependentActions() { if (viewActionCollection) { - disconnect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )), - this, TQT_SLOT( slotViewActionAdded( KAction * ))); - disconnect( viewActionCollection, TQT_SIGNAL( removed( KAction * )), - this, TQT_SLOT( slotViewActionRemoved( KAction * ))); + disconnect( viewActionCollection, TQT_SIGNAL( inserted( TDEAction * )), + this, TQT_SLOT( slotViewActionAdded( TDEAction * ))); + disconnect( viewActionCollection, TQT_SIGNAL( removed( TDEAction * )), + this, TQT_SLOT( slotViewActionRemoved( TDEAction * ))); } viewActionMenu->popupMenu()->clear(); @@ -223,24 +223,24 @@ void KDirOperator::insertViewDependentActions() TQStringList groups = viewActionCollection->groups(); groups.prepend( TQString::null ); // actions without group TQStringList::ConstIterator git = groups.begin(); - KActionPtrList list; - KAction *sep = actionCollection()->action("separator"); + TDEActionPtrList list; + TDEAction *sep = actionCollection()->action("separator"); for ( ; git != groups.end(); ++git ) { if ( git != groups.begin() ) viewActionMenu->insert( sep ); list = viewActionCollection->actions( *git ); - KActionPtrList::ConstIterator it = list.begin(); + TDEActionPtrList::ConstIterator it = list.begin(); for ( ; it != list.end(); ++it ) viewActionMenu->insert( *it ); } } - connect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )), - TQT_SLOT( slotViewActionAdded( KAction * ))); - connect( viewActionCollection, TQT_SIGNAL( removed( KAction * )), - TQT_SLOT( slotViewActionRemoved( KAction * ))); + connect( viewActionCollection, TQT_SIGNAL( inserted( TDEAction * )), + TQT_SLOT( slotViewActionAdded( TDEAction * ))); + connect( viewActionCollection, TQT_SIGNAL( removed( TDEAction * )), + TQT_SLOT( slotViewActionRemoved( TDEAction * ))); } } @@ -271,7 +271,7 @@ void KDirOperator::setPreviewWidget(const TQWidget *w) delete myPreview; myPreview = w; - KToggleAction *preview = static_cast(myActionCollection->action("preview")); + TDEToggleAction *preview = static_cast(myActionCollection->action("preview")); preview->setEnabled( w != 0L ); preview->setChecked( w != 0L ); setView( static_cast(m_viewKind) ); @@ -326,7 +326,7 @@ void KDirOperator::slotDefaultPreview() m_viewKind = m_viewKind | KFile::PreviewContents; if ( !myPreview ) { myPreview = new KFileMetaPreview( this ); - (static_cast( myActionCollection->action("preview") ))->setChecked(true); + (static_cast( myActionCollection->action("preview") ))->setChecked(true); } setView( static_cast(m_viewKind) ); @@ -555,12 +555,12 @@ TDEIO::CopyJob * KDirOperator::trash( const KFileItemList& items, return 0L; } -void KDirOperator::trashSelected(KAction::ActivationReason reason, TQt::ButtonState state) +void KDirOperator::trashSelected(TDEAction::ActivationReason reason, TQt::ButtonState state) { if ( !m_fileView ) return; - if ( reason == KAction::PopupMenuActivation && ( state & ShiftButton ) ) { + if ( reason == TDEAction::PopupMenuActivation && ( state & ShiftButton ) ) { deleteSelected(); return; } @@ -809,7 +809,7 @@ void KDirOperator::setMimeFilter( const TQStringList& mimetypes ) bool KDirOperator::checkPreviewSupport() { - KToggleAction *previewAction = static_cast( myActionCollection->action( "preview" )); + TDEToggleAction *previewAction = static_cast( myActionCollection->action( "preview" )); bool hasPreviewSupport = false; TDEConfig *kc = TDEGlobal::config(); @@ -1253,9 +1253,9 @@ void KDirOperator::slotCompletionMatch(const TQString& match) void KDirOperator::setupActions() { - myActionCollection = new KActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); + myActionCollection = new TDEActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); - actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); + actionMenu = new TDEActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" ); upAction->setText( i18n("Parent Folder") ); backAction = KStdAction::back( TQT_TQOBJECT(this), TQT_SLOT( back() ), myActionCollection, "back" ); @@ -1263,33 +1263,33 @@ void KDirOperator::setupActions() homeAction = KStdAction::home( TQT_TQOBJECT(this), TQT_SLOT( home() ), myActionCollection, "home" ); homeAction->setText(i18n("Home Folder")); reloadAction = KStdAction::redisplay( TQT_TQOBJECT(this), TQT_SLOT(rereadDir()), myActionCollection, "reload" ); - actionSeparator = new KActionSeparator( myActionCollection, "separator" ); - d->viewActionSeparator = new KActionSeparator( myActionCollection, + actionSeparator = new TDEActionSeparator( myActionCollection, "separator" ); + d->viewActionSeparator = new TDEActionSeparator( myActionCollection, "viewActionSeparator" ); - mkdirAction = new KAction( i18n("New Folder..."), 0, + mkdirAction = new TDEAction( i18n("New Folder..."), 0, TQT_TQOBJECT(this), TQT_SLOT( mkdir() ), myActionCollection, "mkdir" ); - KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" ); - connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, TQt::ButtonState ) ), - this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) ); - new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), + TDEAction* trash = new TDEAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" ); + connect( trash, TQT_SIGNAL( activated( TDEAction::ActivationReason, TQt::ButtonState ) ), + this, TQT_SLOT( trashSelected( TDEAction::ActivationReason, TQt::ButtonState ) ) ); + new TDEAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); mkdirAction->setIcon( TQString::fromLatin1("folder_new") ); reloadAction->setText( i18n("Reload") ); - reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload )); + reloadAction->setShortcut( TDEStdAccel::shortcut( TDEStdAccel::Reload )); // the sort menu actions - sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu"); - byNameAction = new KRadioAction( i18n("By Name"), 0, + sortActionMenu = new TDEActionMenu( i18n("Sorting"), myActionCollection, "sorting menu"); + byNameAction = new TDERadioAction( i18n("By Name"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortByName() ), myActionCollection, "by name" ); - byDateAction = new KRadioAction( i18n("By Date"), 0, + byDateAction = new TDERadioAction( i18n("By Date"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortByDate() ), myActionCollection, "by date" ); - bySizeAction = new KRadioAction( i18n("By Size"), 0, + bySizeAction = new TDERadioAction( i18n("By Size"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortBySize() ), myActionCollection, "by size" ); - reverseAction = new KToggleAction( i18n("Reverse"), 0, + reverseAction = new TDEToggleAction( i18n("Reverse"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ), myActionCollection, "reversed" ); @@ -1299,9 +1299,9 @@ void KDirOperator::setupActions() bySizeAction->setExclusiveGroup( sortGroup ); - dirsFirstAction = new KToggleAction( i18n("Folders First"), 0, + dirsFirstAction = new TDEToggleAction( i18n("Folders First"), 0, myActionCollection, "dirs first"); - caseInsensitiveAction = new KToggleAction(i18n("Case Insensitive"), 0, + caseInsensitiveAction = new TDEToggleAction(i18n("Case Insensitive"), 0, myActionCollection, "case insensitive" ); connect( dirsFirstAction, TQT_SIGNAL( toggled( bool ) ), @@ -1312,24 +1312,24 @@ void KDirOperator::setupActions() // the view menu actions - viewActionMenu = new KActionMenu( i18n("&View"), myActionCollection, "view menu" ); + viewActionMenu = new TDEActionMenu( i18n("&View"), myActionCollection, "view menu" ); connect( viewActionMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( insertViewDependentActions() )); - shortAction = new KRadioAction( i18n("Short View"), "view_multicolumn", - KShortcut(), myActionCollection, "short view" ); - detailedAction = new KRadioAction( i18n("Detailed View"), "view_detailed", - KShortcut(), myActionCollection, "detailed view" ); + shortAction = new TDERadioAction( i18n("Short View"), "view_multicolumn", + TDEShortcut(), myActionCollection, "short view" ); + detailedAction = new TDERadioAction( i18n("Detailed View"), "view_detailed", + TDEShortcut(), myActionCollection, "detailed view" ); - showHiddenAction = new KToggleAction( i18n("Show Hidden Files"), KShortcut(), + showHiddenAction = new TDEToggleAction( i18n("Show Hidden Files"), TDEShortcut(), myActionCollection, "show hidden" ); // showHiddenAction->setCheckedState( i18n("Hide Hidden Files") ); - separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(), + separateDirsAction = new TDEToggleAction( i18n("Separate Folders"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotSeparateDirs()), myActionCollection, "separate dirs" ); - KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"), - "thumbnail", KShortcut(), + TDEToggleAction *previewAction = new TDEToggleAction(i18n("Show Preview"), + "thumbnail", TDEShortcut(), myActionCollection, "preview" ); previewAction->setCheckedState(i18n("Hide Preview")); @@ -1348,7 +1348,7 @@ void KDirOperator::setupActions() connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleHidden( bool ) )); - new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), TQT_TQOBJECT(this), + new TDEAction( i18n("Properties"), TDEShortcut(ALT+Key_Return), TQT_TQOBJECT(this), TQT_SLOT(slotProperties()), myActionCollection, "properties" ); } @@ -1533,7 +1533,7 @@ void KDirOperator::writeConfig( TDEConfig *kc, const TQString& group ) kc->writeEntry( TQString::fromLatin1("Separate Directories"), separateDirsAction->isChecked() ); - KToggleAction *previewAction = static_cast(myActionCollection->action("preview")); + TDEToggleAction *previewAction = static_cast(myActionCollection->action("preview")); if ( previewAction->isEnabled() ) { bool hasPreview = previewAction->isChecked(); kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview ); @@ -1633,7 +1633,7 @@ void KDirOperator::clearHistory() forwardAction->setEnabled( false ); } -void KDirOperator::slotViewActionAdded( KAction *action ) +void KDirOperator::slotViewActionAdded( TDEAction *action ) { if ( viewActionMenu->popupMenu()->count() == 5 ) // need to add a separator viewActionMenu->insert( d->viewActionSeparator ); @@ -1641,7 +1641,7 @@ void KDirOperator::slotViewActionAdded( KAction *action ) viewActionMenu->insert( action ); } -void KDirOperator::slotViewActionRemoved( KAction *action ) +void KDirOperator::slotViewActionRemoved( TDEAction *action ) { viewActionMenu->remove( action ); diff --git a/tdeio/tdefile/kdiroperator.h b/tdeio/tdefile/kdiroperator.h index 418bb20c8..5d806eee2 100644 --- a/tdeio/tdefile/kdiroperator.h +++ b/tdeio/tdefile/kdiroperator.h @@ -34,11 +34,11 @@ class TQPopupMenu; class TQTimer; -class KAction; +class TDEAction; class KDirLister; -class KToggleAction; -class KActionSeparator; -class KActionMenu; +class TDEToggleAction; +class TDEActionSeparator; +class TDEActionMenu; class TQWidgetStack; class KProgress; namespace TDEIO { @@ -345,7 +345,7 @@ class TDEIO_EXPORT KDirOperator : public TQWidget /** * an accessor to a collection of all available Actions. The actions * are static, they will be there all the time (no need to connect to - * the signals KActionCollection::inserted() or removed(). + * the signals TDEActionCollection::inserted() or removed(). * * There are the following actions: * @@ -387,7 +387,7 @@ class TDEIO_EXPORT KDirOperator : public TQWidget * * @returns all available Actions */ - KActionCollection * actionCollection() const { return myActionCollection; } + TDEActionCollection * actionCollection() const { return myActionCollection; } /** * Sets the config object and the to be used group in KDirOperator. This @@ -710,7 +710,7 @@ public slots: * @since 3.4 */ // ### KDE4: make virtual - void trashSelected(KAction::ActivationReason, TQt::ButtonState); + void trashSelected(TDEAction::ActivationReason, TQt::ButtonState); protected slots: /** @@ -873,32 +873,32 @@ private: // actions for the popupmenus // ### clean up all those -- we have them all in the actionMenu! - KActionMenu *actionMenu; - - KAction *backAction; - KAction *forwardAction; - KAction *homeAction; - KAction *upAction; - KAction *reloadAction; - KActionSeparator *actionSeparator; - KAction *mkdirAction; - - KActionMenu *sortActionMenu; - KRadioAction *byNameAction; - KRadioAction *byDateAction; - KRadioAction *bySizeAction; - KToggleAction *reverseAction; - KToggleAction *dirsFirstAction; - KToggleAction *caseInsensitiveAction; - - KActionMenu *viewActionMenu; - KRadioAction *shortAction; - KRadioAction *detailedAction; - KToggleAction *showHiddenAction; - KToggleAction *separateDirsAction; - - KActionCollection *myActionCollection; - KActionCollection *viewActionCollection; + TDEActionMenu *actionMenu; + + TDEAction *backAction; + TDEAction *forwardAction; + TDEAction *homeAction; + TDEAction *upAction; + TDEAction *reloadAction; + TDEActionSeparator *actionSeparator; + TDEAction *mkdirAction; + + TDEActionMenu *sortActionMenu; + TDERadioAction *byNameAction; + TDERadioAction *byDateAction; + TDERadioAction *bySizeAction; + TDEToggleAction *reverseAction; + TDEToggleAction *dirsFirstAction; + TDEToggleAction *caseInsensitiveAction; + + TDEActionMenu *viewActionMenu; + TDERadioAction *shortAction; + TDERadioAction *detailedAction; + TDEToggleAction *showHiddenAction; + TDEToggleAction *separateDirsAction; + + TDEActionCollection *myActionCollection; + TDEActionCollection *viewActionCollection; private slots: /** @@ -926,8 +926,8 @@ private slots: void slotCanceled(); void slotRedirected( const KURL& ); - void slotViewActionAdded( KAction * ); - void slotViewActionRemoved( KAction * ); + void slotViewActionAdded( TDEAction * ); + void slotViewActionRemoved( TDEAction * ); void slotViewSortingChanged( TQDir::SortSpec ); void slotClearView(); diff --git a/tdeio/tdefile/kdirselectdialog.cpp b/tdeio/tdefile/kdirselectdialog.cpp index 6a13920fd..a540c57ef 100644 --- a/tdeio/tdefile/kdirselectdialog.cpp +++ b/tdeio/tdefile/kdirselectdialog.cpp @@ -122,10 +122,10 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, TQT_SLOT( slotComboTextChanged( const TQString& ) )); m_contextMenu = new TQPopupMenu( this ); - KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotMkdir() ), TQT_TQOBJECT(this)); + TDEAction* newFolder = new TDEAction( i18n("New Folder..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotMkdir() ), TQT_TQOBJECT(this)); newFolder->plug(m_contextMenu); m_contextMenu->insertSeparator(); - m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, TQT_TQOBJECT(this), + m_showHiddenFolders = new TDEToggleAction ( i18n( "Show Hidden Folders" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotShowHiddenFoldersToggled() ), TQT_TQOBJECT(this)); m_showHiddenFolders->plug(m_contextMenu); @@ -153,8 +153,8 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, connect( m_treeView, TQT_SIGNAL( currentChanged( TQListViewItem * )), TQT_SLOT( slotCurrentChanged() )); - connect( m_treeView, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & )), - TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ))); + connect( m_treeView, TQT_SIGNAL( contextMenu( TDEListView *, TQListViewItem *, const TQPoint & )), + TQT_SLOT( slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ))); connect( d->urlCombo, TQT_SIGNAL( activated( const TQString& )), TQT_SLOT( slotURLActivated( const TQString& ))); @@ -307,7 +307,7 @@ void KDirSelectDialog::accept() if ( !item->isDir() ) dir = dir.upURL(); - KRecentDirs::add(d->recentDirClass, dir.url()); + TDERecentDirs::add(d->recentDirClass, dir.url()); } d->urlCombo->addToHistory( item->url().prettyURL() ); @@ -395,7 +395,7 @@ void KDirSelectDialog::slotComboTextChanged( const TQString& text ) } } -void KDirSelectDialog::slotContextMenu( KListView *, TQListViewItem *, const TQPoint& pos ) +void KDirSelectDialog::slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint& pos ) { m_contextMenu->popup( pos ); } diff --git a/tdeio/tdefile/kdirselectdialog.h b/tdeio/tdefile/kdirselectdialog.h index 746064c68..400bd3232 100644 --- a/tdeio/tdefile/kdirselectdialog.h +++ b/tdeio/tdefile/kdirselectdialog.h @@ -29,7 +29,7 @@ class TDEConfig; class KFileTreeBranch; class KFileTreeView; class KFileTreeViewItem; -class KToggleAction; +class TDEToggleAction; /** * A pretty dialog for a KDirSelect control for selecting directories. @@ -106,7 +106,7 @@ private slots: void slotURLActivated( const TQString& ); void slotNextDirToList( KFileTreeViewItem *dirItem ); void slotComboTextChanged( const TQString& text ); - void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ); + void slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ); void slotShowHiddenFoldersToggled(); void slotMkdir(); @@ -118,7 +118,7 @@ private: KFileTreeView *m_treeView; TQPopupMenu *m_contextMenu; - KToggleAction *m_showHiddenFolders; + TDEToggleAction *m_showHiddenFolders; bool m_localOnly; protected: diff --git a/tdeio/tdefile/kencodingfiledialog.cpp b/tdeio/tdefile/kencodingfiledialog.cpp index b8c90f6ff..569217bee 100644 --- a/tdeio/tdefile/kencodingfiledialog.cpp +++ b/tdeio/tdefile/kencodingfiledialog.cpp @@ -44,7 +44,7 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin setOperationMode( type ); - KToolBar *tb = toolBar(); + TDEToolBar *tb = toolBar(); tb->insertSeparator(); int index = tb->insertCombo(TQStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ ); d->encoding = tb->getCombo( tb->idAt( index ) ); @@ -180,7 +180,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons TQString filename = dlg.selectedFile(); if (!filename.isEmpty()) - KRecentDocument::add(filename); + TDERecentDocument::add(filename); Result res; res.fileNames< 0 - + diff --git a/tdeio/tdefile/kopenwith.cpp b/tdeio/tdefile/kopenwith.cpp index 691487730..8582e31f0 100644 --- a/tdeio/tdefile/kopenwith.cpp +++ b/tdeio/tdefile/kopenwith.cpp @@ -69,7 +69,7 @@ // ---------------------------------------------------------------------- -KAppTreeListItem::KAppTreeListItem( KListView* parent, const TQString & name, +KAppTreeListItem::KAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ) : TQListViewItem( parent, name ) { @@ -145,7 +145,7 @@ bool KAppTreeListItem::isDirectory() // ---------------------------------------------------------------------- TDEApplicationTree::TDEApplicationTree( TQWidget *parent ) - : KListView( parent ), currentitem(0) + : TDEListView( parent ), currentitem(0) { addColumn( i18n("Known Applications") ); setRootIsDecorated( true ); @@ -281,7 +281,7 @@ void TDEApplicationTree::resizeEvent( TQResizeEvent * e) { setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent) -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth)); - KListView::resizeEvent(e); + TDEListView::resizeEvent(e); } // Prune empty directories from the tree diff --git a/tdeio/tdefile/kopenwith_p.h b/tdeio/tdefile/kopenwith_p.h index 8231da27d..ca9317fb6 100644 --- a/tdeio/tdefile/kopenwith_p.h +++ b/tdeio/tdefile/kopenwith_p.h @@ -51,7 +51,7 @@ protected: void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec); public: - KAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap, + KAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ); KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ); @@ -69,7 +69,7 @@ protected: /** * @internal */ -class TDEApplicationTree : public KListView +class TDEApplicationTree : public TDEListView { Q_OBJECT public: diff --git a/tdeio/tdefile/kpropertiesdesktopbase.ui b/tdeio/tdefile/kpropertiesdesktopbase.ui index a0894dc70..9c08eef93 100644 --- a/tdeio/tdefile/kpropertiesdesktopbase.ui +++ b/tdeio/tdefile/kpropertiesdesktopbase.ui @@ -52,7 +52,7 @@ <p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt> - + Mimetype diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index 0e9f125a6..fdbef4fea 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -498,7 +498,7 @@ void KPropertiesDialog::insertPages() insertPlugin (p); } - if ( kapp->authorizeKAction("sharefile") && + if ( kapp->authorizeTDEAction("sharefile") && KFileSharePropsPlugin::supports( m_items ) ) { KPropsDlgPlugin *p = new KFileSharePropsPlugin( this ); @@ -953,7 +953,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFileType() )); - if (!kapp->authorizeKAction("editfiletype")) + if (!kapp->authorizeTDEAction("editfiletype")) button->hide(); #endif diff --git a/tdeio/tdefile/kpropertiesmimetypebase.ui b/tdeio/tdefile/kpropertiesmimetypebase.ui index df7c796da..257eaa57c 100644 --- a/tdeio/tdefile/kpropertiesmimetypebase.ui +++ b/tdeio/tdefile/kpropertiesmimetypebase.ui @@ -30,7 +30,7 @@ listView - + Mimetype diff --git a/tdeio/tdefile/krecentdirs.cpp b/tdeio/tdefile/krecentdirs.cpp index 6f4a01f3b..0d8d008bd 100644 --- a/tdeio/tdefile/krecentdirs.cpp +++ b/tdeio/tdefile/krecentdirs.cpp @@ -69,7 +69,7 @@ static TDEConfig *recentdirs_readList(TQString &key, TQStringList &result, bool return config; } -TQStringList KRecentDirs::list(const TQString &fileClass) +TQStringList TDERecentDirs::list(const TQString &fileClass) { TQString key = fileClass; TQStringList result; @@ -77,13 +77,13 @@ TQStringList KRecentDirs::list(const TQString &fileClass) return result; } -TQString KRecentDirs::dir(const TQString &fileClass) +TQString TDERecentDirs::dir(const TQString &fileClass) { TQStringList result = list(fileClass); return result[0]; } -void KRecentDirs::add(const TQString &fileClass, const TQString &directory) +void TDERecentDirs::add(const TQString &fileClass, const TQString &directory) { TQString key = fileClass; TQStringList result; diff --git a/tdeio/tdefile/krecentdirs.h b/tdeio/tdefile/krecentdirs.h index 774655e51..cc9be16b4 100644 --- a/tdeio/tdefile/krecentdirs.h +++ b/tdeio/tdefile/krecentdirs.h @@ -47,7 +47,7 @@ * a single ':' the file-class is specific to the current application. * If the file-class starts with '::' it is global to all applications. */ -class TDEIO_EXPORT KRecentDirs +class TDEIO_EXPORT TDERecentDirs { public: /** diff --git a/tdeio/tdefile/krecentdocument.cpp b/tdeio/tdefile/krecentdocument.cpp index 1ec4a98c8..85af01c46 100644 --- a/tdeio/tdefile/krecentdocument.cpp +++ b/tdeio/tdefile/krecentdocument.cpp @@ -42,13 +42,13 @@ #include #include -TQString KRecentDocument::recentDocumentDirectory() +TQString TDERecentDocument::recentDocumentDirectory() { // need to change this path, not sure where return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); } -TQStringList KRecentDocument::recentDocuments() +TQStringList TDERecentDocument::recentDocuments() { TQDir d(recentDocumentDirectory(), "*.desktop", TQDir::Time, TQDir::Files | TQDir::Readable | TQDir::Hidden); @@ -72,12 +72,12 @@ TQStringList KRecentDocument::recentDocuments() return fullList; } -void KRecentDocument::add(const KURL& url) +void TDERecentDocument::add(const KURL& url) { - KRecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! + TDERecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! } -void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) +void TDERecentDocument::add(const KURL& url, const TQString& desktopEntryName) { if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; @@ -85,7 +85,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQString openStr = url.url(); openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded - kdDebug(250) << "KRecentDocument::add for " << openStr << endl; + kdDebug(250) << "TDERecentDocument::add for " << openStr << endl; TDEConfig *config = TDEGlobal::config(); TQString oldGrp = config->group(); config->setGroup(TQString::fromLatin1("RecentDocuments")); @@ -148,7 +148,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); } -void KRecentDocument::add(const TQString &openStr, bool isUrl) +void TDERecentDocument::add(const TQString &openStr, bool isUrl) { if( isUrl ) { add( KURL( openStr ) ); @@ -159,7 +159,7 @@ void KRecentDocument::add(const TQString &openStr, bool isUrl) } } -void KRecentDocument::clear() +void TDERecentDocument::clear() { TQStringList list = recentDocuments(); TQDir dir; @@ -167,7 +167,7 @@ void KRecentDocument::clear() dir.remove(*it); } -int KRecentDocument::maximumItems() +int TDERecentDocument::maximumItems() { TDEConfig *config = TDEGlobal::config(); TDEConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); diff --git a/tdeio/tdefile/krecentdocument.h b/tdeio/tdefile/krecentdocument.h index 968559968..b788c0dc2 100644 --- a/tdeio/tdefile/krecentdocument.h +++ b/tdeio/tdefile/krecentdocument.h @@ -47,7 +47,7 @@ * * @author Daniel M. Duley */ -class TDEIO_EXPORT KRecentDocument +class TDEIO_EXPORT TDERecentDocument { public: diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp index e142845e1..2642926a1 100644 --- a/tdeio/tdefile/kurlbar.cpp +++ b/tdeio/tdefile/kurlbar.cpp @@ -406,7 +406,7 @@ void KURLBar::setListBox( KURLBarListBox *view ) m_listBox->resize( width(), height() ); } - m_listBox->setSelectionMode( KListBox::Single ); + m_listBox->setSelectionMode( TDEListBox::Single ); paletteChange( palette() ); m_listBox->setFocusPolicy( TQ_TabFocus ); @@ -829,7 +829,7 @@ bool KURLBar::editItem( KURLBarItem *item ) KURLBarListBox::KURLBarListBox( TQWidget *parent, const char *name ) - : KListBox( parent, name ) + : TDEListBox( parent, name ) { m_toolTip = new KURLBarToolTip( this ); setAcceptDrops( true ); @@ -1043,7 +1043,7 @@ void KURLBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KURLBarListBox::virtual_hook( int id, void* data ) -{ KListBox::virtual_hook( id, data ); } +{ TDEListBox::virtual_hook( id, data ); } #include "kurlbar.moc" diff --git a/tdeio/tdefile/kurlbar.h b/tdeio/tdefile/kurlbar.h index 32c05ec58..7470ec82a 100644 --- a/tdeio/tdefile/kurlbar.h +++ b/tdeio/tdefile/kurlbar.h @@ -483,14 +483,14 @@ class TQDragObject; class KURLBarToolTip; /** - * This is the listbox used in KURLBar. It is a subclass of KListBox to support + * This is the listbox used in KURLBar. It is a subclass of TDEListBox to support * drag & drop and to set up the row / column mode. * * The widget has just one row or one column, depending on orientation(). * * @author Carsten Pfeiffer */ -class TDEIO_EXPORT KURLBarListBox : public KListBox +class TDEIO_EXPORT KURLBarListBox : public TDEListBox { Q_OBJECT diff --git a/tdeio/tdefile/kurlrequester.cpp b/tdeio/tdefile/kurlrequester.cpp index cca8c0529..88b34ea6b 100644 --- a/tdeio/tdefile/kurlrequester.cpp +++ b/tdeio/tdefile/kurlrequester.cpp @@ -226,8 +226,8 @@ void KURLRequester::init() myCompletion = new KURLCompletion(); d->setCompletionObject( myCompletion ); - KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, TQT_TQOBJECT(this), TQT_SLOT( slotOpenDialog() )); + TDEAccel *accel = new TDEAccel( this ); + accel->insert( TDEStdAccel::Open, TQT_TQOBJECT(this), TQT_SLOT( slotOpenDialog() )); accel->readSettings(); } diff --git a/tdeio/tdefile/kurlrequester.h b/tdeio/tdefile/kurlrequester.h index 55bc0fd83..5655efa5b 100644 --- a/tdeio/tdefile/kurlrequester.h +++ b/tdeio/tdefile/kurlrequester.h @@ -269,7 +269,7 @@ private: protected slots: /** * Called when the button is pressed to open the filedialog. - * Also called when KStdAccel::Open (default is Ctrl-O) is pressed. + * Also called when TDEStdAccel::Open (default is Ctrl-O) is pressed. */ void slotOpenDialog(); diff --git a/tdeio/tdefile/kurlrequesterdlg.cpp b/tdeio/tdefile/kurlrequesterdlg.cpp index 7524ea149..2459f984f 100644 --- a/tdeio/tdefile/kurlrequesterdlg.cpp +++ b/tdeio/tdefile/kurlrequesterdlg.cpp @@ -115,7 +115,7 @@ KURL KURLRequesterDlg::getURL(const TQString& dir, TQWidget *parent, const KURL& url = dlg.selectedURL(); if (url.isValid()) - KRecentDocument::add(url); + TDERecentDocument::add(url); return url; } diff --git a/tdeio/tdefile/tdefilebookmarkhandler.cpp b/tdeio/tdefile/tdefilebookmarkhandler.cpp index ea97b8661..ef1f2a37b 100644 --- a/tdeio/tdefile/tdefilebookmarkhandler.cpp +++ b/tdeio/tdefile/tdefilebookmarkhandler.cpp @@ -32,7 +32,7 @@ KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog ) KBookmarkOwner(), m_dialog( dialog ) { - m_menu = new KPopupMenu( dialog, "bookmark menu" ); + m_menu = new TDEPopupMenu( dialog, "bookmark menu" ); TQString file = locate( "data", "tdefile/bookmarks.xml" ); if ( file.isEmpty() ) diff --git a/tdeio/tdefile/tdefilebookmarkhandler.h b/tdeio/tdefile/tdefilebookmarkhandler.h index 6535bf961..e13e0673b 100644 --- a/tdeio/tdefile/tdefilebookmarkhandler.h +++ b/tdeio/tdefile/tdefilebookmarkhandler.h @@ -23,7 +23,7 @@ #include class TQTextStream; -class KPopupMenu; +class TDEPopupMenu; class TDEIO_EXPORT KFileBookmarkHandler : public TQObject, public KBookmarkOwner @@ -40,7 +40,7 @@ public: virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); } virtual TQString currentURL() const; - KPopupMenu *menu() const { return m_menu; } + TDEPopupMenu *menu() const { return m_menu; } signals: void openURL( const TQString& url ); @@ -49,7 +49,7 @@ private: void importOldBookmarks( const TQString& path, KBookmarkManager *manager ); KFileDialog *m_dialog; - KPopupMenu *m_menu; + TDEPopupMenu *m_menu; KBookmarkMenu *m_bookmarkMenu; protected: diff --git a/tdeio/tdefile/tdefiledetailview.cpp b/tdeio/tdefile/tdefiledetailview.cpp index b989104e8..68691bf6b 100644 --- a/tdeio/tdefile/tdefiledetailview.cpp +++ b/tdeio/tdefile/tdefiledetailview.cpp @@ -56,7 +56,7 @@ public: }; KFileDetailView::KFileDetailView(TQWidget *parent, const char *name) - : KListView(parent, name), KFileView(), d(new KFileDetailViewPrivate()) + : TDEListView(parent, name), KFileView(), d(new KFileDetailViewPrivate()) { // this is always the static section, not the index depending on column order m_sortingCol = COL_NAME; @@ -149,7 +149,7 @@ void KFileDetailView::setSelected( const KFileItem *info, bool enable ) KFileListViewItem *item = (KFileListViewItem*)info->extraData( this ); if ( item ) - KListView::setSelected( item, enable ); + TDEListView::setSelected( item, enable ); } void KFileDetailView::setCurrentItem( const KFileItem *item ) @@ -158,7 +158,7 @@ void KFileDetailView::setCurrentItem( const KFileItem *item ) return; KFileListViewItem *it = (KFileListViewItem*) item->extraData( this ); if ( it ) - KListView::setCurrentItem( it ); + TDEListView::setCurrentItem( it ); } KFileItem * KFileDetailView::currentFileItem() const @@ -172,7 +172,7 @@ KFileItem * KFileDetailView::currentFileItem() const void KFileDetailView::clearSelection() { - KListView::clearSelection(); + TDEListView::clearSelection(); } void KFileDetailView::selectAll() @@ -181,12 +181,12 @@ void KFileDetailView::selectAll() KFileView::selectionMode() == KFile::Single) return; - KListView::selectAll( true ); + TDEListView::selectAll( true ); } void KFileDetailView::invertSelection() { - KListView::invertSelection(); + TDEListView::invertSelection(); } void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos ) @@ -202,7 +202,7 @@ void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos void KFileDetailView::clearView() { m_resolver->m_lstPendingMimeIconItems.clear(); - KListView::clear(); + TDEListView::clear(); } void KFileDetailView::insertItem( KFileItem *i ) @@ -415,8 +415,8 @@ void KFileDetailView::slotSortingChanged( int col ) } } - KListView::setSorting( m_sortingCol, !reversed ); - KListView::sort(); + TDEListView::setSorting( m_sortingCol, !reversed ); + TDEListView::sort(); if ( !m_blockSortingSignal ) sig->changeSorting( static_cast( sortSpec ) ); @@ -459,7 +459,7 @@ void KFileDetailView::ensureItemVisible( const KFileItem *i ) KFileListViewItem *item = (KFileListViewItem*) i->extraData( this ); if ( item ) - KListView::ensureItemVisible( item ); + TDEListView::ensureItemVisible( item ); } // we're in multiselection mode @@ -504,7 +504,7 @@ KFileItem * KFileDetailView::prevItem( const KFileItem *fileItem ) const void KFileDetailView::keyPressEvent( TQKeyEvent *e ) { - KListView::keyPressEvent( e ); + TDEListView::keyPressEvent( e ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { if ( e->state() & ControlButton ) @@ -680,7 +680,7 @@ void KFileListViewItem::init() void KFileDetailView::virtual_hook( int id, void* data ) -{ KListView::virtual_hook( id, data ); +{ TDEListView::virtual_hook( id, data ); KFileView::virtual_hook( id, data ); } #include "tdefiledetailview.moc" diff --git a/tdeio/tdefile/tdefiledetailview.h b/tdeio/tdefile/tdefiledetailview.h index 0f17b3ca9..1e2d19a6b 100644 --- a/tdeio/tdefile/tdefiledetailview.h +++ b/tdeio/tdefile/tdefiledetailview.h @@ -34,12 +34,12 @@ class TQKeyEvent; * An item for the listiew, that has a reference to its corresponding * KFileItem. */ -class TDEIO_EXPORT KFileListViewItem : public KListViewItem +class TDEIO_EXPORT KFileListViewItem : public TDEListViewItem { public: KFileListViewItem( TQListView *parent, const TQString &text, const TQPixmap &icon, KFileItem *fi ) - : KListViewItem( parent, text ), inf( fi ) { + : TDEListViewItem( parent, text ), inf( fi ) { setPixmap( 0, icon ); setText( 0, text ); } @@ -48,14 +48,14 @@ public: * @since 3.1 */ KFileListViewItem( TQListView *parent, KFileItem *fi ) - : KListViewItem( parent ), inf( fi ) { + : TDEListViewItem( parent ), inf( fi ) { init(); } KFileListViewItem( TQListView *parent, const TQString &text, const TQPixmap &icon, KFileItem *fi, TQListViewItem *after) - : KListViewItem( parent, after ), inf( fi ) { + : TDEListViewItem( parent, after ), inf( fi ) { setPixmap( 0, icon ); setText( 0, text ); } @@ -106,7 +106,7 @@ private: * @see KCombiView * @see KFileIconView */ -class TDEIO_EXPORT KFileDetailView : public KListView, public KFileView +class TDEIO_EXPORT KFileDetailView : public TDEListView, public KFileView { Q_OBJECT @@ -193,9 +193,9 @@ private slots: void slotAutoOpen(); private: - virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); } - virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); } - virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); } + virtual void insertItem(TQListViewItem *i) { TDEListView::insertItem(i); } + virtual void setSorting(int i, bool b) { TDEListView::setSorting(i, b); } + virtual void setSelected(TQListViewItem *i, bool b) { TDEListView::setSelected(i, b); } inline KFileListViewItem * viewItem( const KFileItem *item ) const { if ( item ) diff --git a/tdeio/tdefile/tdefiledialog.cpp b/tdeio/tdefile/tdefiledialog.cpp index 4fb399716..f60692c88 100644 --- a/tdeio/tdefile/tdefiledialog.cpp +++ b/tdeio/tdefile/tdefiledialog.cpp @@ -153,7 +153,7 @@ struct KFileDialogPrivate bool hasDefaultFilter :1; // necessary for the operationMode KFileDialog::OperationMode operationMode; - // The file class used for KRecentDirs + // The file class used for TDERecentDirs TQString fileClass; KFileBookmarkHandler *bookmarkHandler; @@ -648,7 +648,7 @@ void KFileDialog::accept() *lastDirectory = ops->url(); if (!d->fileClass.isEmpty()) - KRecentDirs::add(d->fileClass, ops->url().url()); + TDERecentDirs::add(d->fileClass, ops->url().url()); // clear the topmost item, we insert it as full path later on as item 1 locationEdit->changeItem( TQString::null, 0 ); @@ -832,7 +832,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge d->urlBar = 0; // delayed loading TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceQToolBar ); - toolbar = new KToolBar( d->mainWidget, "KFileDialog::toolbar", true); + toolbar = new TDEToolBar( d->mainWidget, "KFileDialog::toolbar", true); toolbar->setFlat(true); tqInstallMsgHandler( oldHandler ); @@ -905,7 +905,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge ops->setupMenu(KDirOperator::SortActions | KDirOperator::FileActions | KDirOperator::ViewActions); - KActionCollection *coll = ops->actionCollection(); + TDEActionCollection *coll = ops->actionCollection(); // plug nav items into the toolbar coll->action( "up" )->plug( toolbar ); @@ -922,19 +922,19 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge coll->action( "mkdir" )->plug( toolbar ); coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new folder.")); - KToggleAction *showSidebarAction = - new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar"); + TDEToggleAction *showSidebarAction = + new TDEToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar"); showSidebarAction->setCheckedState(i18n("Hide Quick Access Navigation Panel")); connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleSpeedbar( bool )) ); - KToggleAction *showBookmarksAction = - new KToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks"); + TDEToggleAction *showBookmarksAction = + new TDEToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks"); showBookmarksAction->setCheckedState(i18n("Hide Bookmarks")); connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleBookmarks( bool )) ); - KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", TQT_TQOBJECT(this), "extra menu" ); + TDEActionMenu *menu = new TDEActionMenu( i18n("Configure"), "configure", TQT_TQOBJECT(this), "extra menu" ); menu->setWhatsThis(i18n("This is the configuration menu for the file dialog. " "Various options can be accessed from this menu including:

        " "
      • how files are sorted in the list
      • " @@ -965,15 +965,15 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge menu->plug( toolbar ); //Insert a separator. - KToolBarSeparator* spacerWidget = new KToolBarSeparator(Qt::Horizontal, false /*no line*/, + TDEToolBarSeparator* spacerWidget = new TDEToolBarSeparator(Qt::Horizontal, false /*no line*/, toolbar); d->m_pathComboIndex = toolbar->insertWidget(-1, -1, spacerWidget); toolbar->insertWidget(PATH_COMBO, 0, d->pathCombo); toolbar->setItemAutoSized (PATH_COMBO); - toolbar->setIconText(KToolBar::IconOnly); - toolbar->setBarPos(KToolBar::Top); + toolbar->setIconText(TDEToolBar::IconOnly); + toolbar->setBarPos(TDEToolBar::Top); toolbar->setMovingEnabled(false); toolbar->adjustSize(); @@ -1609,7 +1609,7 @@ TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filte TQString filename = dlg.selectedFile(); if (!filename.isEmpty()) - KRecentDocument::add(filename); + TDERecentDocument::add(filename); return filename; } @@ -1638,7 +1638,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi TQString filename = dlg.selectedFile(); if (!filename.isEmpty()) - KRecentDocument::add(filename); + TDERecentDocument::add(filename); return filename; } @@ -1658,7 +1658,7 @@ KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter, KURL url = dlg.selectedURL(); if (url.isValid()) - KRecentDocument::add( url ); + TDERecentDocument::add( url ); return url; } @@ -2189,7 +2189,7 @@ void KFileDialog::addToRecentDocuments() TQStringList files = selectedFiles(); TQStringList::ConstIterator it = files.begin(); for ( ; it != files.end(); ++it ) - KRecentDocument::add( *it ); + TDERecentDocument::add( *it ); } else { // urls @@ -2197,12 +2197,12 @@ void KFileDialog::addToRecentDocuments() KURL::List::ConstIterator it = urls.begin(); for ( ; it != urls.end(); ++it ) { if ( (*it).isValid() ) - KRecentDocument::add( *it ); + TDERecentDocument::add( *it ); } } } -KActionCollection * KFileDialog::actionCollection() const +TDEActionCollection * KFileDialog::actionCollection() const { return ops->actionCollection(); } @@ -2251,7 +2251,7 @@ void KFileDialog::toggleSpeedbar( bool show ) ops->actionCollection()->action( "home" )->plug( toolbar, 3 ); } - static_cast(actionCollection()->action("toggleSpeedbar"))->setChecked( show ); + static_cast(actionCollection()->action("toggleSpeedbar"))->setChecked( show ); } void KFileDialog::toggleBookmarks(bool show) @@ -2286,7 +2286,7 @@ void KFileDialog::toggleBookmarks(bool show) toolbar->removeItem(HOTLIST_BUTTON); } - static_cast(actionCollection()->action("toggleBookmarks"))->setChecked( show ); + static_cast(actionCollection()->action("toggleBookmarks"))->setChecked( show ); } int KFileDialog::pathComboIndex() @@ -2318,7 +2318,7 @@ KURL KFileDialog::getStartURL( const TQString& startDir, if (startDir[0] == ':') { recentDirClass = startDir; - ret = KURL::fromPathOrURL( KRecentDirs::dir(recentDirClass) ); + ret = KURL::fromPathOrURL( TDERecentDirs::dir(recentDirClass) ); } else { diff --git a/tdeio/tdefile/tdefiledialog.h b/tdeio/tdefile/tdefiledialog.h index ae591b21a..b7310b599 100644 --- a/tdeio/tdefile/tdefiledialog.h +++ b/tdeio/tdefile/tdefiledialog.h @@ -40,7 +40,7 @@ class TQLabel; class TQPopupMenu; class TQVBoxLayout; -class KActionCollection; +class TDEActionCollection; class KDirOperator; class KURLBar; class KURLComboBox; @@ -48,7 +48,7 @@ class KFileFilterCombo; class KFileView; class KFileItem; class KPushButton; -class KToolBar; +class TDEToolBar; class KPreviewWidgetBase; struct KFileDialogPrivate; @@ -713,13 +713,13 @@ public: * You can use this to insert custom * items into it, e.g.: * \code - * yourAction = new KAction( i18n("Your Action"), 0, + * yourAction = new TDEAction( i18n("Your Action"), 0, * this, TQT_SLOT( yourSlot() ), * this, "action name" ); * yourAction->plug( tdefileDialog->toolBar() ); * \endcode */ - KToolBar *toolBar() const { return toolbar; } + TDEToolBar *toolBar() const { return toolbar; } /** * @returns a pointer to the OK-Button in the filedialog. You may use it @@ -752,9 +752,9 @@ public: /** * @returns a pointer to the action collection, holding all the used - * KActions. + * TDEActions. */ - KActionCollection *actionCollection() const; + TDEActionCollection *actionCollection() const; /** * @returns the index of the path combobox so when inserting widgets into @@ -769,7 +769,7 @@ public: * @param startDir A url/directory, to be used. May use the ':' and '::' syntax * as documented in the KFileDialog() constructor. * @param recentDirClass If the ':' or '::' syntax is used, recentDirClass - * will contain the string to be used later for KRecentDir::dir() + * will contain the string to be used later for TDERecentDir::dir() * @return The URL that should be listed by default (e.g. by KFileDialog or * KDirSelectDialog). * @since 3.1 @@ -820,7 +820,7 @@ signals: void filterChanged( const TQString& filter ); protected: - KToolBar *toolbar; + TDEToolBar *toolbar; static KURL *lastDirectory; diff --git a/tdeio/tdefile/tdefileiconview.cpp b/tdeio/tdefile/tdefileiconview.cpp index 474364042..d42373893 100644 --- a/tdeio/tdefile/tdefileiconview.cpp +++ b/tdeio/tdefile/tdefileiconview.cpp @@ -60,12 +60,12 @@ public: noArrangement = false; ignoreMaximumSize = false; - smallColumns = new KRadioAction( i18n("Small Icons"), 0, TQT_TQOBJECT(parent), + smallColumns = new TDERadioAction( i18n("Small Icons"), 0, TQT_TQOBJECT(parent), TQT_SLOT( slotSmallColumns() ), parent->actionCollection(), "small columns" ); - largeRows = new KRadioAction( i18n("Large Icons"), 0, TQT_TQOBJECT(parent), + largeRows = new TDERadioAction( i18n("Large Icons"), 0, TQT_TQOBJECT(parent), TQT_SLOT( slotLargeRows() ), parent->actionCollection(), "large rows" ); @@ -73,7 +73,7 @@ public: smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode")); largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode")); - previews = new KToggleAction( i18n("Thumbnail Previews"), 0, + previews = new TDEToggleAction( i18n("Thumbnail Previews"), 0, parent->actionCollection(), "show previews" ); zoomIn = KStdAction::zoomIn( TQT_TQOBJECT(parent), TQT_SLOT( zoomIn() ), @@ -99,9 +99,9 @@ public: job->kill(); } - KRadioAction *smallColumns, *largeRows; - KAction *zoomIn, *zoomOut; - KToggleAction *previews; + TDERadioAction *smallColumns, *largeRows; + TDEAction *zoomIn, *zoomOut; + TDEToggleAction *previews; TDEIO::PreviewJob *job; KFileIconViewItem *dropItem; TQTimer previewTimer; diff --git a/tdeio/tdefile/tdefilepreview.cpp b/tdeio/tdefile/tdefilepreview.cpp index 4e9365361..4b336afee 100644 --- a/tdeio/tdefile/tdefilepreview.cpp +++ b/tdeio/tdefile/tdefilepreview.cpp @@ -254,7 +254,7 @@ KFileItem * KFilePreview::prevItem( const KFileItem *item ) const return left->prevItem( item ); } -KActionCollection * KFilePreview::actionCollection() const +TDEActionCollection * KFilePreview::actionCollection() const { if ( left ) return left->actionCollection(); diff --git a/tdeio/tdefile/tdefilepreview.h b/tdeio/tdefile/tdefilepreview.h index 5bc59dba5..16cfa281b 100644 --- a/tdeio/tdefile/tdefilepreview.h +++ b/tdeio/tdefile/tdefilepreview.h @@ -89,10 +89,10 @@ public: /** * This overrides KFileView::actionCollection() by returning * the actionCollection() of the KFileView (member left) it contains. - * This means that KFilePreview will never create a KActionCollection + * This means that KFilePreview will never create a TDEActionCollection * object of its own. */ - virtual KActionCollection * actionCollection() const; + virtual TDEActionCollection * actionCollection() const; void ensureItemVisible(const KFileItem *); diff --git a/tdeio/tdefile/tdefiletreeview.cpp b/tdeio/tdefile/tdefiletreeview.cpp index 480c58ec3..fd7d630e1 100644 --- a/tdeio/tdefile/tdefiletreeview.cpp +++ b/tdeio/tdefile/tdefiletreeview.cpp @@ -40,12 +40,12 @@ #include "tdefiletreeviewitem.h" KFileTreeView::KFileTreeView( TQWidget *parent, const char *name ) - : KListView( parent, name ), + : TDEListView( parent, name ), m_wantOpenFolderPixmaps( true ), m_toolTip( this ) { setDragEnabled(true); - setSelectionModeExt( KListView::Single ); + setSelectionModeExt( TDEListView::Single ); m_animationTimer = new TQTimer( this ); connect( m_animationTimer, TQT_SIGNAL( timeout() ), @@ -235,8 +235,8 @@ bool KFileTreeView::acceptDrag(TQDropEvent* e ) const // kdDebug(250) << "canDecode: " << KURLDrag::canDecode(e) << endl; // kdDebug(250) << "action: " << e->action() << endl; - /* KListView::acceptDrag(e); */ - /* this is what KListView does: + /* TDEListView::acceptDrag(e); */ + /* this is what TDEListView does: * acceptDrops() && itemsMovable() && (e->source()==viewport()); * ask acceptDrops and itemsMovable, but not the third */ @@ -672,6 +672,6 @@ void KFileTreeViewToolTip::maybeTip( const TQPoint & ) } void KFileTreeView::virtual_hook( int id, void* data ) -{ KListView::virtual_hook( id, data ); } +{ TDEListView::virtual_hook( id, data ); } #include "tdefiletreeview.moc" diff --git a/tdeio/tdefile/tdefiletreeview.h b/tdeio/tdefile/tdefiletreeview.h index 11d695288..3d6e039f5 100644 --- a/tdeio/tdefile/tdefiletreeview.h +++ b/tdeio/tdefile/tdefiletreeview.h @@ -63,7 +63,7 @@ private: * 3. retrieve the root item with KFileTreeBranch::root() and set it open * if desired. That starts the listing. */ -class TDEIO_EXPORT KFileTreeView : public KListView +class TDEIO_EXPORT KFileTreeView : public TDEListView { Q_OBJECT public: diff --git a/tdeio/tdefile/tdefiletreeviewitem.cpp b/tdeio/tdefile/tdefiletreeviewitem.cpp index 4df2daaa1..3f7e5a485 100644 --- a/tdeio/tdefile/tdefiletreeviewitem.cpp +++ b/tdeio/tdefile/tdefiletreeviewitem.cpp @@ -29,7 +29,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ) - : KListViewItem( parent ), + : TDEListViewItem( parent ), m_tdefileitem( item ), m_branch( brnch ), m_wasListed(false) @@ -42,7 +42,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent, KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent, KFileItem* item, KFileTreeBranch *brnch ) - :KListViewItem( (TQListView*)parent ), + :TDEListViewItem( (TQListView*)parent ), m_tdefileitem(item ), m_branch( brnch ), m_wasListed(false) diff --git a/tdeio/tdefile/tdefiletreeviewitem.h b/tdeio/tdefile/tdefiletreeviewitem.h index 8fdb2789c..4455bff78 100644 --- a/tdeio/tdefile/tdefiletreeviewitem.h +++ b/tdeio/tdefile/tdefiletreeviewitem.h @@ -37,7 +37,7 @@ class KFileTreeItem; /** * An item for a KFileTreeView that knows about its own KFileItem. */ -class TDEIO_EXPORT KFileTreeViewItem : public KListViewItem +class TDEIO_EXPORT KFileTreeViewItem : public TDEListViewItem { public: KFileTreeViewItem( KFileTreeViewItem*, KFileItem*, KFileTreeBranch * ); diff --git a/tdeio/tdefile/tdefileview.cpp b/tdeio/tdefile/tdefileview.cpp index 558053cc8..01bc5e6b0 100644 --- a/tdeio/tdefile/tdefileview.cpp +++ b/tdeio/tdefile/tdefileview.cpp @@ -55,7 +55,7 @@ public: } } - TQGuardedPtr actions; + TQGuardedPtr actions; int dropOptions; }; @@ -362,10 +362,10 @@ void KFileView::listingCompleted() // empty default impl. } -KActionCollection * KFileView::actionCollection() const +TDEActionCollection * KFileView::actionCollection() const { if ( !d->actions ) - d->actions = new KActionCollection( widget(), "KFileView::d->actions" ); + d->actions = new TDEActionCollection( widget(), "KFileView::d->actions" ); return d->actions; } diff --git a/tdeio/tdefile/tdefileview.h b/tdeio/tdefile/tdefileview.h index 79aa1b478..b80c16f0f 100644 --- a/tdeio/tdefile/tdefileview.h +++ b/tdeio/tdefile/tdefileview.h @@ -23,7 +23,7 @@ #define TDEFILEVIEW_H class TQPoint; -class KActionCollection; +class TDEActionCollection; #include @@ -342,7 +342,7 @@ public: * add its actions here (if it has any) to make them available to * e.g. the KDirOperator's popup-menu. */ - virtual KActionCollection * actionCollection() const; + virtual TDEActionCollection * actionCollection() const; KFileViewSignaler * signaler() const { return sig; } diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp index b74468fda..008edb827 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp @@ -33,7 +33,7 @@ #include "tdefiletreeviewtest.moc" -testFrame::testFrame():KMainWindow(0,"Test FileTreeView"), +testFrame::testFrame():TDEMainWindow(0,"Test FileTreeView"), dirOnlyMode(false) { diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.h b/tdeio/tdefile/tests/tdefiletreeviewtest.h index 05f41fcfb..0375f8d11 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.h +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.h @@ -20,7 +20,7 @@ #ifndef TDEFILETREEVIEWTEST #define TDEFILETREEVIEWTEST -class testFrame: public KMainWindow +class testFrame: public TDEMainWindow { Q_OBJECT public: diff --git a/tdeio/tdeio/kdatatool.cpp b/tdeio/tdeio/kdatatool.cpp index 3f4f0a865..5ec790aa7 100644 --- a/tdeio/tdeio/kdatatool.cpp +++ b/tdeio/tdeio/kdatatool.cpp @@ -217,7 +217,7 @@ bool KDataToolInfo::isValid() const *************************************************/ KDataToolAction::KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command, TQObject * parent, const char * name ) - : KAction( text, info.iconName(), 0, parent, name ), + : TDEAction( text, info.iconName(), 0, parent, name ), m_command( command ), m_info( info ) { @@ -228,13 +228,13 @@ void KDataToolAction::slotActivated() emit toolActivated( m_info, m_command ); } -TQPtrList KDataToolAction::dataToolActionList( const TQValueList & tools, const TQObject *receiver, const char* slot ) +TQPtrList KDataToolAction::dataToolActionList( const TQValueList & tools, const TQObject *receiver, const char* slot ) { - TQPtrList actionList; + TQPtrList actionList; if ( tools.isEmpty() ) return actionList; - actionList.append( new KActionSeparator() ); + actionList.append( new TDEActionSeparator() ); TQValueList::ConstIterator entry = tools.begin(); for( ; entry != tools.end(); ++entry ) { @@ -277,7 +277,7 @@ TDEInstance* KDataTool::instance() const } void KDataToolAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +{ TDEAction::virtual_hook( id, data ); } void KDataTool::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdeio/tdeio/kdatatool.h b/tdeio/tdeio/kdatatool.h index 6cb9353a8..bd787dcd5 100644 --- a/tdeio/tdeio/kdatatool.h +++ b/tdeio/tdeio/kdatatool.h @@ -191,7 +191,7 @@ private: * The slot defined for step 2 is called when the action is activated, and * that's where the tool should be created and run. */ -class TDEIO_EXPORT KDataToolAction : public KAction +class TDEIO_EXPORT KDataToolAction : public TDEAction { Q_OBJECT @@ -215,9 +215,9 @@ public: * @param tools the list of data tool descriptions * @param receiver the receiver for toolActivated() signals * @param slot the slot that will receive the toolActivated() signals - * @return the KActions + * @return the TDEActions */ - static TQPtrList dataToolActionList( const TQValueList & tools, const TQObject *receiver, const char* slot ); + static TQPtrList dataToolActionList( const TQValueList & tools, const TQObject *receiver, const char* slot ); signals: /** diff --git a/tdeio/tdeio/kmimetypechooser.cpp b/tdeio/tdeio/kmimetypechooser.cpp index 51db75fe1..7c74a9a41 100644 --- a/tdeio/tdeio/kmimetypechooser.cpp +++ b/tdeio/tdeio/kmimetypechooser.cpp @@ -37,7 +37,7 @@ class KMimeTypeChooserPrivate { public: - KListView *lvMimeTypes; + TDEListView *lvMimeTypes; TQPushButton *btnEditMimeType; TQString defaultgroup; @@ -70,7 +70,7 @@ KMimeTypeChooser::KMimeTypeChooser( const TQString &text, new TQLabel( text, this ); } - d->lvMimeTypes = new KListView( this ); + d->lvMimeTypes = new TDEListView( this ); d->lvMimeTypes->addColumn( i18n("Mime Type") ); // d->lvMimeTypes->setColumnWidthMode( 0, TQListView::Manual ); diff --git a/tdeio/tdeio/krun.cpp b/tdeio/tdeio/krun.cpp index b243671b4..dd6de164c 100644 --- a/tdeio/tdeio/krun.cpp +++ b/tdeio/tdeio/krun.cpp @@ -211,7 +211,7 @@ bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles ) bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const TQString& suggestedFileName ) { - if (kapp && !kapp->authorizeKAction("openwith")) + if (kapp && !kapp->authorizeTDEAction("openwith")) { // TODO: Better message, i18n freeze :-( KMessageBox::sorry(0L, i18n("You are not authorized to open this file.")); @@ -780,8 +780,8 @@ pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* wi // Remember we opened those urls, for the "recent documents" menu in kicker KURL::List::ConstIterator it = _urls.begin(); for(; it != _urls.end(); ++it) { - //kdDebug(7010) << "KRecentDocument::adding " << (*it).url() << endl; - KRecentDocument::add( *it, _service.desktopEntryName() ); + //kdDebug(7010) << "TDERecentDocument::adding " << (*it).url() << endl; + TDERecentDocument::add( *it, _service.desktopEntryName() ); } } diff --git a/tdeio/tdeio/paste.h b/tdeio/tdeio/paste.h index 6fdf1b2a4..aff67934c 100644 --- a/tdeio/tdeio/paste.h +++ b/tdeio/tdeio/paste.h @@ -114,7 +114,7 @@ namespace TDEIO { /** * Returns the text to use for the Paste action, when the application supports * pasting files, urls, and clipboard data, using pasteClipboard(). - * @return a string suitable for KAction::setText, or an empty string if pasting + * @return a string suitable for TDEAction::setText, or an empty string if pasting * isn't possible right now. * * @since 3.5 diff --git a/tdeio/tdeio/scheduler.cpp b/tdeio/tdeio/scheduler.cpp index c0aad7d38..01bcde298 100644 --- a/tdeio/tdeio/scheduler.cpp +++ b/tdeio/tdeio/scheduler.cpp @@ -130,7 +130,7 @@ Scheduler::Scheduler() coSlaveTimer(0, "Scheduler::coSlaveTimer"), cleanupTimer(0, "Scheduler::cleanupTimer") { - checkOnHold = true; // !! Always check with KLauncher for the first request. + checkOnHold = true; // !! Always check with TDELauncher for the first request. slaveOnHold = 0; protInfoDict = new ProtocolInfoDict; slaveList = new SlaveList; diff --git a/tdeio/tdeio/scheduler.h b/tdeio/tdeio/scheduler.h index 08efafc32..3b9b23d92 100644 --- a/tdeio/tdeio/scheduler.h +++ b/tdeio/tdeio/scheduler.h @@ -175,7 +175,7 @@ namespace TDEIO { { self()->_removeSlaveOnHold(); } /** - * Send the slave that was put on hold back to KLauncher. This + * Send the slave that was put on hold back to TDELauncher. This * allows another process to take over the slave and resume the job * that was started. */ @@ -231,7 +231,7 @@ namespace TDEIO { { return self()->_disconnectSlave(slave); } /** - * Send the slave that was put on hold back to KLauncher. This + * Send the slave that was put on hold back to TDELauncher. This * allows another process to take over the slave and resume the job * the that was started. * Register the mainwindow @p wid with the KIO subsystem @@ -273,9 +273,9 @@ namespace TDEIO { { return TQObject::connect(sender, signal, member); } /** - * When true, the next job will check whether KLauncher has a slave + * When true, the next job will check whether TDELauncher has a slave * on hold that is suitable for the job. - * @param b true when KLauncher has a job on hold + * @param b true when TDELauncher has a job on hold */ static void checkSlaveOnHold(bool b) { self()->_checkSlaveOnHold(b); } diff --git a/tdeio/tdeio/slave.cpp b/tdeio/tdeio/slave.cpp index dfd6d6bb3..380be2058 100644 --- a/tdeio/tdeio/slave.cpp +++ b/tdeio/tdeio/slave.cpp @@ -233,7 +233,7 @@ void Slave::hold(const KURL &url) emit slaveDied(this); } deref(); - // Call KLauncher::waitForSlave(pid); + // Call TDELauncher::waitForSlave(pid); { DCOPClient *client = kapp->dcopClient(); if (!client->isAttached()) diff --git a/tdeio/tests/tdeioslavetest.cpp b/tdeio/tests/tdeioslavetest.cpp index 5fa19073c..26534b840 100644 --- a/tdeio/tests/tdeioslavetest.cpp +++ b/tdeio/tests/tdeioslavetest.cpp @@ -29,7 +29,7 @@ using namespace TDEIO; KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) - : KMainWindow(0, "") + : TDEMainWindow(0, "") { job = 0L; diff --git a/tdeio/tests/tdeioslavetest.h b/tdeio/tests/tdeioslavetest.h index f2cb32af1..667cb2856 100644 --- a/tdeio/tests/tdeioslavetest.h +++ b/tdeio/tests/tdeioslavetest.h @@ -26,7 +26,7 @@ #include "tdeio/statusbarprogress.h" #include "tdeio/slave.h" -class KioslaveTest : public KMainWindow { +class KioslaveTest : public TDEMainWindow { Q_OBJECT public: diff --git a/tdemdi/tdemdi/guiclient.cpp b/tdemdi/tdemdi/guiclient.cpp index 2d1e6a68a..536508992 100644 --- a/tdemdi/tdemdi/guiclient.cpp +++ b/tdemdi/tdemdi/guiclient.cpp @@ -76,21 +76,21 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name) if (actionCollection()->kaccel()==0) actionCollection()->setWidget(mdiMainFrm); - m_toolMenu=new KActionMenu(i18n("Tool &Views"),actionCollection(),"tdemdi_toolview_menu"); + m_toolMenu=new TDEActionMenu(i18n("Tool &Views"),actionCollection(),"tdemdi_toolview_menu"); - m_gotoToolDockMenu=new KActionMenu(i18n("Tool &Docks"),actionCollection(),"tdemdi_tooldock_menu"); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,TQT_SIGNAL(toggleTop()), + m_gotoToolDockMenu=new TDEActionMenu(i18n("Tool &Docks"),actionCollection(),"tdemdi_tooldock_menu"); + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,TQT_SIGNAL(toggleTop()), actionCollection(),"tdemdi_activate_top")); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,TQT_SIGNAL(toggleLeft()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,TQT_SIGNAL(toggleLeft()), actionCollection(),"tdemdi_activate_left")); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,TQT_SIGNAL(toggleRight()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,TQT_SIGNAL(toggleRight()), actionCollection(),"tdemdi_activate_right")); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,TQT_SIGNAL(toggleBottom()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,TQT_SIGNAL(toggleBottom()), actionCollection(),"tdemdi_activate_bottom")); - m_gotoToolDockMenu->insert(new KActionSeparator(actionCollection(),"tdemdi_goto_menu_separator")); - m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(prevToolViewInDock()), + m_gotoToolDockMenu->insert(new TDEActionSeparator(actionCollection(),"tdemdi_goto_menu_separator")); + m_gotoToolDockMenu->insert(new TDEAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(prevToolViewInDock()), actionCollection(),"tdemdi_prev_toolview")); - m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(nextToolViewInDock()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(nextToolViewInDock()), actionCollection(),"tdemdi_next_toolview")); actionCollection()->readShortcutSettings( "Shortcuts", kapp->config() ); @@ -115,7 +115,7 @@ void GUIClient::setupActions() unplugActionList( actionListName ); - TQPtrList addList; + TQPtrList addList; if (m_toolViewActions.count()<3) { for (uint i=0;iwrappedWidget()->name(); // try to read the action shortcut - KShortcut sc; + TDEShortcut sc; TDEConfig *cfg = kapp->config(); TQString _grp = cfg->group(); cfg->setGroup("Shortcuts"); - sc = KShortcut( cfg->readEntry( aname, "" ) ); + sc = TDEShortcut( cfg->readEntry( aname, "" ) ); cfg->setGroup( _grp ); - KAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()), + TDEAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()), /*TQString::null*/sc,tqt_dynamic_cast(mtva->wrapperWidget()), m_mdiMainFrm,actionCollection(), aname.latin1() ); @@ -162,7 +162,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva) void GUIClient::actionDeleted(TQObject* a) { - m_toolViewActions.remove(static_cast(a)); + m_toolViewActions.remove(static_cast(a)); setupActions(); } @@ -173,9 +173,9 @@ void GUIClient::clientAdded( KXMLGUIClient *client ) setupActions(); } -ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const KShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm, +ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const TDEShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm, TQObject* parent, const char* name ) - : KToggleAction(text,cut,parent,name) + : TDEToggleAction(text,cut,parent,name) , m_dw(dw) , m_mdiMainFrm(mdiMainFrm) { diff --git a/tdemdi/tdemdi/guiclient.h b/tdemdi/tdemdi/guiclient.h index 4d1609ce6..5c8822a0a 100644 --- a/tdemdi/tdemdi/guiclient.h +++ b/tdemdi/tdemdi/guiclient.h @@ -28,8 +28,8 @@ #include -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; namespace KMDI { class MainWindow; @@ -67,21 +67,21 @@ class GUIClient : public TQObject, public KXMLGUIClient GUIClientPrivate *d; TQGuardedPtr m_mdiMainFrm; - TQPtrList m_toolViewActions; - TQPtrList m_documentViewActions; + TQPtrList m_toolViewActions; + TQPtrList m_documentViewActions; - KActionMenu *m_docMenu; - KActionMenu *m_toolMenu; + TDEActionMenu *m_docMenu; + TDEActionMenu *m_toolMenu; - KActionMenu *m_gotoToolDockMenu; + TDEActionMenu *m_gotoToolDockMenu; }; -class ToggleToolViewAction:public KToggleAction +class ToggleToolViewAction:public TDEToggleAction { Q_OBJECT public: - ToggleToolViewAction ( const TQString& text, const KShortcut& cut = KShortcut(), + ToggleToolViewAction ( const TQString& text, const TDEShortcut& cut = TDEShortcut(), KDockWidget *dw=0,KMDI::MainWindow *mdiMainFrm=0, TQObject* parent = 0, const char* name = 0 ); virtual ~ToggleToolViewAction(); diff --git a/tdemdi/tdemdi/toolviewaccessor_p.h b/tdemdi/tdemdi/toolviewaccessor_p.h index 71ffb286a..db2eb9dc8 100644 --- a/tdemdi/tdemdi/toolviewaccessor_p.h +++ b/tdemdi/tdemdi/toolviewaccessor_p.h @@ -48,7 +48,7 @@ class ToolViewAccessorPrivate TQGuardedPtr widgetContainer; TQWidget *widget; - TQGuardedPtr action; + TQGuardedPtr action; }; } diff --git a/tdemdi/tdemdidocumentviewtabwidget.h b/tdemdi/tdemdidocumentviewtabwidget.h index 668ef5b87..8b8025cbf 100644 --- a/tdemdi/tdemdidocumentviewtabwidget.h +++ b/tdemdi/tdemdidocumentviewtabwidget.h @@ -13,7 +13,7 @@ #include #include -class KPopupMenu; +class TDEPopupMenu; //KDE4: Add a d pointer /** diff --git a/tdemdi/tdemdiguiclient.cpp b/tdemdi/tdemdiguiclient.cpp index 51c693f6e..449157b7a 100644 --- a/tdemdi/tdemdiguiclient.cpp +++ b/tdemdi/tdemdiguiclient.cpp @@ -57,9 +57,9 @@ using namespace KMDIPrivate; -ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm, +ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const TDEShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm, TQObject* parent, const char* name ) - : KToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm ) + : TDEToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm ) { if ( m_dw ) { @@ -136,10 +136,10 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c if ( actionCollection() ->kaccel() == 0 ) actionCollection() ->setWidget( mdiMainFrm ); - m_toolMenu = new KActionMenu( i18n( "Tool &Views" ), actionCollection(), "tdemdi_toolview_menu" ); + m_toolMenu = new TDEActionMenu( i18n( "Tool &Views" ), actionCollection(), "tdemdi_toolview_menu" ); if ( showMDIModeAction ) { - m_mdiModeAction = new KSelectAction( i18n( "MDI Mode" ), 0, actionCollection() ); + m_mdiModeAction = new TDESelectAction( i18n( "MDI Mode" ), 0, actionCollection() ); TQStringList modes; modes << i18n( "&Toplevel Mode" ) << i18n( "C&hildframe Mode" ) << i18n( "Ta&b Page Mode" ) << i18n( "I&DEAl Mode" ); m_mdiModeAction->setItems( modes ); @@ -151,19 +151,19 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c connect( m_mdiMainFrm, TQT_SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ), this, TQT_SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) ); - m_gotoToolDockMenu = new KActionMenu( i18n( "Tool &Docks" ), actionCollection(), "tdemdi_tooldock_menu" ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ), + m_gotoToolDockMenu = new TDEActionMenu( i18n( "Tool &Docks" ), actionCollection(), "tdemdi_tooldock_menu" ); + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ), actionCollection(), "tdemdi_activate_top" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ), actionCollection(), "tdemdi_activate_left" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ), actionCollection(), "tdemdi_activate_right" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_SIGNAL( toggleBottom() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_SIGNAL( toggleBottom() ), actionCollection(), "tdemdi_activate_bottom" ) ); - m_gotoToolDockMenu->insert( new KActionSeparator( actionCollection(), "tdemdi_goto_menu_separator" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( prevToolViewInDock() ), + m_gotoToolDockMenu->insert( new TDEActionSeparator( actionCollection(), "tdemdi_goto_menu_separator" ) ); + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( prevToolViewInDock() ), actionCollection(), "tdemdi_prev_toolview" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( nextToolViewInDock() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( nextToolViewInDock() ), actionCollection(), "tdemdi_next_toolview" ) ); actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() ); @@ -224,10 +224,10 @@ void KMDIGUIClient::setupActions() // m_toolBars = builder.toolBars(); - // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", TQString::null, 0, + // m_toolViewActions.append(new TDEAction( "TESTKMDIGUICLIENT", TQString::null, 0, // this, TQT_SLOT(blah()),actionCollection(),"nothing")); - TQPtrList addList; + TQPtrList addList; if ( m_toolViewActions.count() < 3 ) for ( uint i = 0;i < m_toolViewActions.count();i++ ) addList.append( m_toolViewActions.at( i ) ); @@ -250,14 +250,14 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) TQString aname = TQString( "tdemdi_toolview_" ) + mtva->wrappedWidget() ->name(); // try to read the action shortcut - KShortcut sc; + TDEShortcut sc; TDEConfig *cfg = kapp->config(); TQString _grp = cfg->group(); cfg->setGroup( "Shortcuts" ); // if ( cfg->hasKey( aname ) ) - sc = KShortcut( cfg->readEntry( aname, "" ) ); + sc = TDEShortcut( cfg->readEntry( aname, "" ) ); cfg->setGroup( _grp ); - KAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ), + TDEAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ), /*TQString::null*/sc, tqt_dynamic_cast( mtva->wrapperWidget() ), m_mdiMainFrm, actionCollection(), aname.latin1() ); #if KDE_IS_VERSION(3,2,90) @@ -275,8 +275,8 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) void KMDIGUIClient::actionDeleted( TQObject* a ) { - m_toolViewActions.remove( static_cast( a ) ); - /* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast(a));*/ + m_toolViewActions.remove( static_cast( a ) ); + /* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast(a));*/ setupActions(); } diff --git a/tdemdi/tdemdiguiclient.h b/tdemdi/tdemdiguiclient.h index ba899a2a0..22f9e51f0 100644 --- a/tdemdi/tdemdiguiclient.h +++ b/tdemdi/tdemdiguiclient.h @@ -25,8 +25,8 @@ #include #include "tdemdidefines.h" -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; class KMdiToolViewAccessor; class KMdiMainFrm; class KDockWidget; @@ -104,26 +104,26 @@ private: KMdi::MdiMode m_mdiMode; TQGuardedPtr m_mdiMainFrm; - TQPtrList m_toolViewActions; - TQPtrList m_documentViewActions; + TQPtrList m_toolViewActions; + TQPtrList m_documentViewActions; - KActionMenu *m_docMenu; - KActionMenu *m_toolMenu; - KSelectAction *m_mdiModeAction; + TDEActionMenu *m_docMenu; + TDEActionMenu *m_toolMenu; + TDESelectAction *m_mdiModeAction; - KActionMenu *m_gotoToolDockMenu; + TDEActionMenu *m_gotoToolDockMenu; }; /** - * A KToggleAction specifically for toggling the showing + * A TDEToggleAction specifically for toggling the showing * or the hiding of a KMDI tool view */ -class KMDI_EXPORT ToggleToolViewAction: public KToggleAction +class KMDI_EXPORT ToggleToolViewAction: public TDEToggleAction { Q_OBJECT public: - ToggleToolViewAction( const TQString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0, + ToggleToolViewAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0, TQObject* parent = 0, const char* name = 0 ); virtual ~ToggleToolViewAction(); diff --git a/tdemdi/tdemdimainfrm.cpp b/tdemdi/tdemdimainfrm.cpp index 05bb7a4ca..6f14c09bd 100644 --- a/tdemdi/tdemdimainfrm.cpp +++ b/tdemdi/tdemdimainfrm.cpp @@ -132,7 +132,7 @@ public: KMdiFocusList *focusList; int m_styleIDEAlMode; int m_toolviewStyle; - KAction *closeWindowAction; + TDEAction *closeWindowAction; }; //============ constructor ============// @@ -217,7 +217,7 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMod m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" ); - d->closeWindowAction = new KAction(i18n("&Close"), KStdAccel::close(), + d->closeWindowAction = new TDEAction(i18n("&Close"), TDEStdAccel::close(), TQT_TQOBJECT(this), TQT_SLOT(closeActiveView()), actionCollection(), "window_close"); // the MDI view taskbar @@ -1196,10 +1196,10 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e ) { if ( switching() ) { - KAction * a = actionCollection() ->action( "view_last_window" ) ; + TDEAction * a = actionCollection() ->action( "view_last_window" ) ; if ( a ) { - const KShortcut cut( a->shortcut() ); + const TDEShortcut cut( a->shortcut() ); const KKeySequence& seq = cut.seq( 0 ); const KKey& key = seq.key( 0 ); int modFlags = key.modFlags(); @@ -1222,7 +1222,7 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e ) } else { - kdDebug(760) << "KAction( \"view_last_window\") not found." << endl; + kdDebug(760) << "TDEAction( \"view_last_window\") not found." << endl; } } } diff --git a/tdemdi/tdemditaskbar.cpp b/tdemdi/tdemditaskbar.cpp index 98e479f1e..3dcb901ab 100644 --- a/tdemdi/tdemditaskbar.cpp +++ b/tdemdi/tdemditaskbar.cpp @@ -145,7 +145,7 @@ TQString KMdiTaskBarButton::actualText() const //#################################################################### KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock ) - : KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) + : TDEToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) , m_pCurrentFocusedWindow( 0 ) , m_pStretchSpace( 0 ) , m_layoutIsPending( false ) @@ -388,7 +388,7 @@ void KMdiTaskBar::resizeEvent( TQResizeEvent* rse ) layoutTaskBar( rse->size().width() ); } } - KToolBar::resizeEvent( rse ); + TDEToolBar::resizeEvent( rse ); } // kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/tdemdi/tdemditaskbar.h b/tdemdi/tdemditaskbar.h index ec968a75d..9c853e7cf 100644 --- a/tdemdi/tdemditaskbar.h +++ b/tdemdi/tdemditaskbar.h @@ -126,7 +126,7 @@ class KMdiTaskBarPrivate; * KMdiTaskBarButtons can be added or removed dynamically.
        * The button sizes are adjusted dynamically, as well. */ -class KMDI_EXPORT KMdiTaskBar : public KToolBar +class KMDI_EXPORT KMdiTaskBar : public TDEToolBar { Q_OBJECT public: diff --git a/tdemdi/tdemditoolviewaccessor_p.h b/tdemdi/tdemditoolviewaccessor_p.h index 81e770e85..c3812792f 100644 --- a/tdemdi/tdemditoolviewaccessor_p.h +++ b/tdemdi/tdemditoolviewaccessor_p.h @@ -42,7 +42,7 @@ public: } TQGuardedPtr widgetContainer; TQWidget* widget; - TQGuardedPtr action; + TQGuardedPtr action; }; diff --git a/tdemdi/test/mainwidget.cpp b/tdemdi/test/mainwidget.cpp index fd166ee95..a95af3d2f 100644 --- a/tdemdi/test/mainwidget.cpp +++ b/tdemdi/test/mainwidget.cpp @@ -107,7 +107,7 @@ void MainWidget::resizeEvent( TQResizeEvent *pRSE) setSysButtonsAtMenuPosition(); } -RestartWidget::RestartWidget():KMainWindow() +RestartWidget::RestartWidget():TDEMainWindow() { mdimode=KMdi::ChildframeMode; TQVBoxLayout* bl = new TQVBoxLayout(this); diff --git a/tdemdi/test/mainwidget.h b/tdemdi/test/mainwidget.h index 74ec7a654..7de1f9570 100644 --- a/tdemdi/test/mainwidget.h +++ b/tdemdi/test/mainwidget.h @@ -48,7 +48,7 @@ private: * This allows me to test KMdiMainFrm::read/writeDockConfig by * closing and restarting the MainWidget via checkbox click. */ -class RestartWidget : public KMainWindow +class RestartWidget : public TDEMainWindow { Q_OBJECT // methods diff --git a/tdeparts/mainwindow.cpp b/tdeparts/mainwindow.cpp index 37fc97acd..5f0a31a91 100644 --- a/tdeparts/mainwindow.cpp +++ b/tdeparts/mainwindow.cpp @@ -58,21 +58,21 @@ public: } MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f ) - : KMainWindow( parent, name, f ) + : TDEMainWindow( parent, name, f ) { d = new MainWindowPrivate(); PartBase::setPartObject( TQT_TQOBJECT(this) ); } MainWindow::MainWindow( const char *name, WFlags f ) - : KMainWindow( 0L, name, f ) + : TDEMainWindow( 0L, name, f ) { d = new MainWindowPrivate(); PartBase::setPartObject( TQT_TQOBJECT(this) ); } MainWindow::MainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) - : KMainWindow( cflags, parent, name, f ) + : TDEMainWindow( cflags, parent, name, f ) { d = new MainWindowPrivate(); PartBase::setPartObject( TQT_TQOBJECT(this) ); diff --git a/tdeparts/mainwindow.h b/tdeparts/mainwindow.h index b99527c00..4619a72cc 100644 --- a/tdeparts/mainwindow.h +++ b/tdeparts/mainwindow.h @@ -41,15 +41,15 @@ class MainWindowPrivate; * and don't forget to call setXMLFile() in the inherited constructor. * * It implements all internal interfaces in the case of a - * KMainWindow as host: the builder and servant interface (for menu + * TDEMainWindow as host: the builder and servant interface (for menu * merging). */ -class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase +class KPARTS_EXPORT MainWindow : public TDEMainWindow, virtual public PartBase { Q_OBJECT public: /** - * Constructor, same signature as KMainWindow. + * Constructor, same signature as TDEMainWindow. */ #ifdef qdoc MainWindow( TQWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); @@ -65,7 +65,7 @@ class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase MainWindow( const char *name = 0L, WFlags f = (WFlags)WDestructiveClose ); #endif /** - * Constructor with creation flags, see KMainWindow. + * Constructor with creation flags, see TDEMainWindow. * @since 3.2 */ #ifdef qdoc diff --git a/tdeparts/part.cpp b/tdeparts/part.cpp index 034dc00b4..9372adc08 100644 --- a/tdeparts/part.cpp +++ b/tdeparts/part.cpp @@ -204,7 +204,7 @@ void Part::setWidget( TQWidget *widget ) // Since KParts objects are XML-based, shortcuts should // be connected to the widget when the XML settings - // are processed, rather than on KAction construction. + // are processed, rather than on TDEAction construction. actionCollection()->setAutoConnectShortcuts( false ); } diff --git a/tdeparts/part.h b/tdeparts/part.h index 530da61c3..7550bce38 100644 --- a/tdeparts/part.h +++ b/tdeparts/part.h @@ -29,8 +29,8 @@ class TDEInstance; class TQWidget; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TQEvent; struct QUnknownInterface; @@ -554,7 +554,7 @@ public: * Destructor. * Applications using a ReadWritePart should make sure, before * destroying it, to call closeURL(). - * In KMainWindow::queryClose(), for instance, they should allow + * In TDEMainWindow::queryClose(), for instance, they should allow * closing only if the return value of closeURL() was true. * This allows to cancel. */ @@ -578,7 +578,7 @@ public: /** * If the document has been modified, ask the user to save changes. - * This method is meant to be called from KMainWindow::queryClose(). + * This method is meant to be called from TDEMainWindow::queryClose(). * It will also be called from closeURL(). * * @return true if closeURL() can be called without the user losing @@ -605,7 +605,7 @@ public: /** * Call this method instead of the above if you need control if * the save prompt is shown. For example, if you call queryClose() - * from KMainWindow::queryClose(), you would not want to prompt + * from TDEMainWindow::queryClose(), you would not want to prompt * again when closing the url. * * Equivalent to promptToSave ? closeURL() : ReadOnlyPart::closeURL() diff --git a/tdeparts/statusbarextension.cpp b/tdeparts/statusbarextension.cpp index 02dd79acb..f0c7204ae 100644 --- a/tdeparts/statusbarextension.cpp +++ b/tdeparts/statusbarextension.cpp @@ -135,7 +135,7 @@ KStatusBar * StatusBarExtension::statusBar() const { if ( !m_statusBar ) { TQWidget* w = static_cast(parent())->widget(); - KMainWindow* mw = tqt_dynamic_cast( w->topLevelWidget() ); + TDEMainWindow* mw = tqt_dynamic_cast( w->topLevelWidget() ); if ( mw ) m_statusBar = mw->statusBar(); } diff --git a/tdeparts/statusbarextension.h b/tdeparts/statusbarextension.h index fa635a12b..8e6ea062d 100644 --- a/tdeparts/statusbarextension.h +++ b/tdeparts/statusbarextension.h @@ -27,7 +27,7 @@ #include class KStatusBar; -class KMainWindow; +class TDEMainWindow; class TQEvent; namespace KParts @@ -87,7 +87,7 @@ namespace KParts void removeStatusBarItem( TQWidget * widget ); /** - * @return the statusbar of the KMainWindow in which this part is currently embedded. + * @return the statusbar of the TDEMainWindow in which this part is currently embedded. * WARNING: this could return 0L */ KStatusBar* statusBar() const; @@ -95,7 +95,7 @@ namespace KParts /** * This allows the hosting application to set a particular KStatusBar * for this part. If it doesn't do this, the statusbar used will be - * the one of the KMainWindow in which the part is embedded. + * the one of the TDEMainWindow in which the part is embedded. * Konqueror uses this to assign a view-statusbar to the part. * The part should never call this method! */ diff --git a/tdeparts/tests/example.cpp b/tdeparts/tests/example.cpp index e8495ffe9..34a96a334 100644 --- a/tdeparts/tests/example.cpp +++ b/tdeparts/tests/example.cpp @@ -32,19 +32,19 @@ Shell::Shell() m_part1 = new Part1(this, m_splitter); m_part2 = new Part2(this, m_splitter); - KActionCollection *coll = actionCollection(); + TDEActionCollection *coll = actionCollection(); - (void)new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); - (void)new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); + (void)new TDEAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); + (void)new TDEAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); - m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); - m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); + m_paEditFile = new TDEAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); + m_paCloseEditor = new TDEAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); m_paCloseEditor->setEnabled(false); - KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); + TDEAction * paQuit = new TDEAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); paQuit->setIconSet(TQIconSet(BarIcon("exit"))); - (void)new KAction( "Yet another menu item", 0, coll, "shell_yami" ); - (void)new KAction( "Yet another submenu item", 0, coll, "shell_yasmi" ); + (void)new TDEAction( "Yet another menu item", 0, coll, "shell_yami" ); + (void)new TDEAction( "Yet another submenu item", 0, coll, "shell_yasmi" ); setCentralWidget( m_splitter ); m_splitter->setMinimumSize( 400, 300 ); diff --git a/tdeparts/tests/example.h b/tdeparts/tests/example.h index b4bdead61..76541437d 100644 --- a/tdeparts/tests/example.h +++ b/tdeparts/tests/example.h @@ -5,7 +5,7 @@ #include #include -class KAction; +class TDEAction; class TQWidget; class Shell : public KParts::MainWindow @@ -26,8 +26,8 @@ protected: private: - KAction * m_paEditFile; - KAction * m_paCloseEditor; + TDEAction * m_paEditFile; + TDEAction * m_paCloseEditor; KParts::ReadOnlyPart *m_part1; KParts::Part *m_part2; diff --git a/tdeparts/tests/ghostview.cpp b/tdeparts/tests/ghostview.cpp index c94823aaf..c365bcfcb 100644 --- a/tdeparts/tests/ghostview.cpp +++ b/tdeparts/tests/ghostview.cpp @@ -20,10 +20,10 @@ Shell::Shell() { setXMLFile( "ghostviewtest_shell.rc" ); - KAction * paOpen = new KAction( "&Open file" , "fileopen", 0, this, + TDEAction * paOpen = new TDEAction( "&Open file" , "fileopen", 0, this, TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" ); - KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" ); + TDEAction * paQuit = new TDEAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" ); // Try to find a postscript component first TDETrader::OfferList offers = TDETrader::self()->query("application/postscript", "('KParts/ReadOnlyPart' in ServiceTypes) or ('Browser/View' in ServiceTypes)"); diff --git a/tdeparts/tests/normalktm.cpp b/tdeparts/tests/normalktm.cpp index 277f3ccde..b3907402e 100644 --- a/tdeparts/tests/normalktm.cpp +++ b/tdeparts/tests/normalktm.cpp @@ -29,21 +29,21 @@ Shell::Shell() TQPopupMenu * pFile = new TQPopupMenu( this ); menuBar()->insertItem( "File", pFile ); TQObject * coll = this; - KAction * paLocal = new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); + TDEAction * paLocal = new TDEAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); // No XML : we need to plug our actions ourselves paLocal->plug( pFile ); - KAction * paRemote = new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); + TDEAction * paRemote = new TDEAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); paRemote->plug( pFile ); - m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); + m_paEditFile = new TDEAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); m_paEditFile->plug( pFile ); - m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); + m_paCloseEditor = new TDEAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); m_paCloseEditor->setEnabled(false); m_paCloseEditor->plug( pFile ); - KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); + TDEAction * paQuit = new TDEAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); paQuit->setIconSet(TQIconSet(BarIcon("exit"))); paQuit->plug( pFile ); diff --git a/tdeparts/tests/normalktm.h b/tdeparts/tests/normalktm.h index 26a93a52a..7183690f0 100644 --- a/tdeparts/tests/normalktm.h +++ b/tdeparts/tests/normalktm.h @@ -5,10 +5,10 @@ #include #include -class KAction; +class TDEAction; class TQWidget; -class Shell : public KMainWindow +class Shell : public TDEMainWindow { Q_OBJECT public: @@ -26,8 +26,8 @@ protected: private: - KAction * m_paEditFile; - KAction * m_paCloseEditor; + TDEAction * m_paEditFile; + TDEAction * m_paCloseEditor; KParts::ReadOnlyPart *m_part1; KParts::Part *m_part2; diff --git a/tdeparts/tests/notepad.cpp b/tdeparts/tests/notepad.cpp index 6494288cd..f2b43ccda 100644 --- a/tdeparts/tests/notepad.cpp +++ b/tdeparts/tests/notepad.cpp @@ -26,7 +26,7 @@ NotepadPart::NotepadPart( TQWidget* parentWidget, const char*, m_edit = new TQMultiLineEdit( parentWidget, "NotepadPart's multiline edit" ); setWidget( m_edit ); - (void)new KAction( "Search and replace", 0, this, TQT_SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" ); + (void)new TDEAction( "Search and replace", 0, this, TQT_SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" ); setXMLFile( "notepadpart.rc" ); setReadWrite( true ); } diff --git a/tdeparts/tests/parts.cpp b/tdeparts/tests/parts.cpp index 2fc63c225..f41063ef9 100644 --- a/tdeparts/tests/parts.cpp +++ b/tdeparts/tests/parts.cpp @@ -27,7 +27,7 @@ Part1::Part1( TQObject *parent, TQWidget * parentWidget ) setWidget( m_edit ); setXMLFile( "tdepartstest_part1.rc" ); - /*KAction * paBlah = */ new KAction( "Blah", "filemail", 0, actionCollection(), "p1_blah" ); + /*TDEAction * paBlah = */ new TDEAction( "Blah", "filemail", 0, actionCollection(), "p1_blah" ); } Part1::~Part1() diff --git a/tdeparts/tests/plugin_spellcheck.cpp b/tdeparts/tests/plugin_spellcheck.cpp index 5521bf22f..dcdf33312 100644 --- a/tdeparts/tests/plugin_spellcheck.cpp +++ b/tdeparts/tests/plugin_spellcheck.cpp @@ -11,7 +11,7 @@ PluginSpellCheck::PluginSpellCheck( TQObject* parent, const char* name, const TQStringList& ) : Plugin( parent, name ) { - (void) new KAction( "&Select current line (plugin)", 0, this, TQT_SLOT(slotSpellCheck()), + (void) new TDEAction( "&Select current line (plugin)", 0, this, TQT_SLOT(slotSpellCheck()), actionCollection(), "spellcheck" ); } diff --git a/tdeprint/cups/cupsdconf2/editlist.cpp b/tdeprint/cups/cupsdconf2/editlist.cpp index 754c9659e..fbdafbdb9 100644 --- a/tdeprint/cups/cupsdconf2/editlist.cpp +++ b/tdeprint/cups/cupsdconf2/editlist.cpp @@ -29,7 +29,7 @@ EditList::EditList(TQWidget *parent, const char *name) : TQWidget(parent, name) { - list_ = new KListBox(this); + list_ = new TDEListBox(this); addbtn_ = new KPushButton(KGuiItem(i18n("Add..."), "filenew"), this); editbtn_ = new KPushButton(KGuiItem(i18n("Edit..."), "edit"), this); delbtn_ = new KPushButton(KGuiItem(i18n("Delete"), "editdelete"), this); diff --git a/tdeprint/cups/cupsdconf2/editlist.h b/tdeprint/cups/cupsdconf2/editlist.h index a0fc7ee0a..19a2da8c8 100644 --- a/tdeprint/cups/cupsdconf2/editlist.h +++ b/tdeprint/cups/cupsdconf2/editlist.h @@ -23,7 +23,7 @@ #include #include -class KListBox; +class TDEListBox; class TQPushButton; class EditList : public TQWidget @@ -53,7 +53,7 @@ protected slots: void slotSelected(int); private: - KListBox *list_; + TDEListBox *list_; TQPushButton *addbtn_, *editbtn_, *delbtn_, *defbtn_; }; diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index c2fcaab7b..cec6f383b 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -30,7 +30,7 @@ QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name) : TQWidget(parent, name) { - m_view = new KListView(this); + m_view = new TDEListView(this); m_view->header()->hide(); m_view->addColumn(""); m_view->setFullWidth(true); diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.h b/tdeprint/cups/cupsdconf2/qdirmultilineedit.h index c3765362e..a55f3355e 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.h +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.h @@ -22,7 +22,7 @@ #include -class KListView; +class TDEListView; class TQListViewItem; class TQPushButton; @@ -46,7 +46,7 @@ private slots: void slotSelected(TQListViewItem*); private: - KListView *m_view; + TDEListView *m_view; TQPushButton *m_add, *m_remove; }; diff --git a/tdeprint/cups/kmcupsjobmanager.cpp b/tdeprint/cups/kmcupsjobmanager.cpp index 0b31489cc..b7284d1ad 100644 --- a/tdeprint/cups/kmcupsjobmanager.cpp +++ b/tdeprint/cups/kmcupsjobmanager.cpp @@ -352,10 +352,10 @@ bool KMCupsJobManager::jobIppReport(KMJob *j) return result; } -TQValueList KMCupsJobManager::createPluginActions(KActionCollection *coll) +TQValueList KMCupsJobManager::createPluginActions(TDEActionCollection *coll) { - TQValueList list; - KAction *act(0); + TQValueList list; + TDEAction *act(0); list << (act = new PluginAction(0, i18n("&Job IPP Report"), "tdeprint_report", 0, coll, "plugin_ipp")); act->setGroup("plugin"); @@ -369,7 +369,7 @@ TQValueList KMCupsJobManager::createPluginActions(KActionCollection *c return list; } -void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const TQPtrList& joblist) +void KMCupsJobManager::validatePluginActions(TDEActionCollection *coll, const TQPtrList& joblist) { TQPtrListIterator it(joblist); bool flag(true); @@ -380,7 +380,7 @@ void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const TQPt /*&& !it.current()->isRemote()*/); } flag = (flag && joblist.count() > 0); - KAction *a; + TDEAction *a; if ( ( a = coll->action( "plugin_ipp" ) ) ) a->setEnabled( joblist.count() == 1 ); if ( ( a = coll->action( "plugin_prioup" ) ) ) diff --git a/tdeprint/cups/kmcupsjobmanager.h b/tdeprint/cups/kmcupsjobmanager.h index 7e8a75a53..0635dd8ea 100644 --- a/tdeprint/cups/kmcupsjobmanager.h +++ b/tdeprint/cups/kmcupsjobmanager.h @@ -35,8 +35,8 @@ public: virtual ~KMCupsJobManager(); int actions(); - TQValueList createPluginActions(KActionCollection*); - void validatePluginActions(KActionCollection*, const TQPtrList&); + TQValueList createPluginActions(TDEActionCollection*); + void validatePluginActions(TDEActionCollection*, const TQPtrList&); bool doPluginAction(int, const TQPtrList&); protected: diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index 5b99c88d9..fecac0169 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -915,15 +915,15 @@ TQStringList KMCupsManager::detectLocalPrinters() return list; } -void KMCupsManager::createPluginActions(KActionCollection *coll) +void KMCupsManager::createPluginActions(TDEActionCollection *coll) { - KAction *act = new KAction(i18n("&Export Driver..."), "tdeprint_uploadsmb", 0, this, TQT_SLOT(exportDriver()), coll, "plugin_export_driver"); + TDEAction *act = new TDEAction(i18n("&Export Driver..."), "tdeprint_uploadsmb", 0, this, TQT_SLOT(exportDriver()), coll, "plugin_export_driver"); act->setGroup("plugin"); - act = new KAction(i18n("&Printer IPP Report"), "tdeprint_report", 0, this, TQT_SLOT(printerIppReport()), coll, "plugin_printer_ipp_report"); + act = new TDEAction(i18n("&Printer IPP Report"), "tdeprint_report", 0, this, TQT_SLOT(printerIppReport()), coll, "plugin_printer_ipp_report"); act->setGroup("plugin"); } -void KMCupsManager::validatePluginActions(KActionCollection *coll, KMPrinter *pr) +void KMCupsManager::validatePluginActions(TDEActionCollection *coll, KMPrinter *pr) { // save selected printer for future use in slots m_currentprinter = pr; diff --git a/tdeprint/cups/kmcupsmanager.h b/tdeprint/cups/kmcupsmanager.h index d574bb686..1e7c21b19 100644 --- a/tdeprint/cups/kmcupsmanager.h +++ b/tdeprint/cups/kmcupsmanager.h @@ -63,8 +63,8 @@ public: bool configureServer(TQWidget *parent = 0); TQStringList detectLocalPrinters(); - void createPluginActions(KActionCollection*); - void validatePluginActions(KActionCollection*, KMPrinter*); + void createPluginActions(TDEActionCollection*); + void validatePluginActions(TDEActionCollection*, KMPrinter*); TQString stateInformation(); public slots: diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp index 51ecbab73..610217da1 100644 --- a/tdeprint/cups/kmwfax.cpp +++ b/tdeprint/cups/kmwfax.cpp @@ -41,7 +41,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) TQLabel *lab = new TQLabel(this); lab->setText(i18n("

        Select the device which your serial Fax/Modem is connected to.

        ")); - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQVBoxLayout *l1 = new TQVBoxLayout(this,0,10); l1->addWidget(lab,0); diff --git a/tdeprint/cups/kmwfax.h b/tdeprint/cups/kmwfax.h index 1a822165e..50b2aec0c 100644 --- a/tdeprint/cups/kmwfax.h +++ b/tdeprint/cups/kmwfax.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListBox; +class TDEListBox; class KMWFax : public KMWizardPage { @@ -33,7 +33,7 @@ public: void updatePrinter(KMPrinter*); private: - KListBox *m_list; + TDEListBox *m_list; }; #endif diff --git a/tdeprint/cups/kmwippprinter.cpp b/tdeprint/cups/kmwippprinter.cpp index 044f9cb6d..1a4cf4d94 100644 --- a/tdeprint/cups/kmwippprinter.cpp +++ b/tdeprint/cups/kmwippprinter.cpp @@ -46,7 +46,7 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) m_ID = KMWizard::Custom+1; m_nextpage = KMWizard::Driver; - m_list = new KListView(this); + m_list = new TDEListView(this); m_list->addColumn(""); m_list->header()->hide(); m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); diff --git a/tdeprint/cups/kmwippprinter.h b/tdeprint/cups/kmwippprinter.h index 5d9d33f7a..f578afba9 100644 --- a/tdeprint/cups/kmwippprinter.h +++ b/tdeprint/cups/kmwippprinter.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListView; +class TDEListView; class TQListViewItem; class TQLineEdit; class TQTextView; @@ -46,7 +46,7 @@ protected slots: void slotIppReport(); private: - KListView *m_list; + TDEListView *m_list; NetworkScanner *m_scanner; TQLineEdit *m_uri; TQTextView *m_info; diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp index a10a14ba5..c889edbf9 100644 --- a/tdeprint/cups/kmwippselect.cpp +++ b/tdeprint/cups/kmwippselect.cpp @@ -38,7 +38,7 @@ KMWIppSelect::KMWIppSelect(TQWidget *parent, const char *name) m_title = i18n("Remote IPP Printer Selection"); m_nextpage = KMWizard::Driver; - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQVBoxLayout *lay = new TQVBoxLayout(this, 0, 0); lay->addWidget(m_list); diff --git a/tdeprint/cups/kmwippselect.h b/tdeprint/cups/kmwippselect.h index 8d1711e8c..6b8d788e6 100644 --- a/tdeprint/cups/kmwippselect.h +++ b/tdeprint/cups/kmwippselect.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListBox; +class TDEListBox; class KMWIppSelect : public KMWizardPage { @@ -34,7 +34,7 @@ public: void updatePrinter(KMPrinter*); private: - KListBox *m_list; + TDEListBox *m_list; }; #endif diff --git a/tdeprint/cups/kmwother.cpp b/tdeprint/cups/kmwother.cpp index 596f61990..7e86cbfb6 100644 --- a/tdeprint/cups/kmwother.cpp +++ b/tdeprint/cups/kmwother.cpp @@ -49,7 +49,7 @@ KMWOther::KMWOther(TQWidget *parent, const char *name) "
      • lpd://server/queue
      • " "
      • parallel:/dev/lp0
      ")); TQLabel *l2 = new TQLabel(i18n("URI:"), this); - m_uriview = new KListView( this ); + m_uriview = new TDEListView( this ); m_uriview->addColumn( "" ); m_uriview->header()->hide(); m_uriview->setSorting( -1 ); diff --git a/tdeprint/cups/kmwother.h b/tdeprint/cups/kmwother.h index eba5ac2b1..a650482f4 100644 --- a/tdeprint/cups/kmwother.h +++ b/tdeprint/cups/kmwother.h @@ -23,7 +23,7 @@ #include "kmwizardpage.h" class TQLineEdit; -class KListView; +class TDEListView; class TQListViewItem; class KMWOther : public KMWizardPage @@ -40,7 +40,7 @@ protected slots: private: TQLineEdit *m_uri; - KListView *m_uriview; + TDEListView *m_uriview; }; #endif diff --git a/tdeprint/driverview.cpp b/tdeprint/driverview.cpp index 68e705a7d..02c7be610 100644 --- a/tdeprint/driverview.cpp +++ b/tdeprint/driverview.cpp @@ -30,7 +30,7 @@ #include DrListView::DrListView(TQWidget *parent, const char *name) -: KListView(parent,name) +: TDEListView(parent,name) { addColumn(""); header()->hide(); diff --git a/tdeprint/driverview.h b/tdeprint/driverview.h index a975fd26e..96c225ee4 100644 --- a/tdeprint/driverview.h +++ b/tdeprint/driverview.h @@ -30,7 +30,7 @@ class DrOptionView; class DrMain; -class TDEPRINT_EXPORT DrListView : public KListView +class TDEPRINT_EXPORT DrListView : public TDEListView { public: DrListView(TQWidget *parent = 0, const char *name = 0); diff --git a/tdeprint/droptionview.cpp b/tdeprint/droptionview.cpp index 2ba4d1799..a11ec7ee0 100644 --- a/tdeprint/droptionview.cpp +++ b/tdeprint/droptionview.cpp @@ -191,7 +191,7 @@ void OptionStringView::setValue(const TQString& val) OptionListView::OptionListView(TQWidget *parent, const char *name) : OptionBaseView(parent,name) { - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); main_->addWidget(m_list); diff --git a/tdeprint/droptionview.h b/tdeprint/droptionview.h index 70f60a814..6114efcbd 100644 --- a/tdeprint/droptionview.h +++ b/tdeprint/droptionview.h @@ -27,7 +27,7 @@ class TQLineEdit; class TQSlider; class TQLabel; -class KListBox; +class TDEListBox; class TQListBoxItem; class TQVButtonGroup; class TQWidgetStack; @@ -92,7 +92,7 @@ protected slots: void slotSelectionChanged(); private: - KListBox *m_list; + TDEListBox *m_list; TQStringList m_choices; }; diff --git a/tdeprint/kmjobmanager.cpp b/tdeprint/kmjobmanager.cpp index 2a0e2ae50..db1b7c9b0 100644 --- a/tdeprint/kmjobmanager.cpp +++ b/tdeprint/kmjobmanager.cpp @@ -203,12 +203,12 @@ int KMJobManager::actions() return 0; } -TQValueList KMJobManager::createPluginActions(KActionCollection*) +TQValueList KMJobManager::createPluginActions(TDEActionCollection*) { - return TQValueList(); + return TQValueList(); } -void KMJobManager::validatePluginActions(KActionCollection*, const TQPtrList&) +void KMJobManager::validatePluginActions(TDEActionCollection*, const TQPtrList&) { } diff --git a/tdeprint/kmjobmanager.h b/tdeprint/kmjobmanager.h index b1cdac627..fce6e61d2 100644 --- a/tdeprint/kmjobmanager.h +++ b/tdeprint/kmjobmanager.h @@ -33,8 +33,8 @@ class KMJob; class KMThreadJob; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; /** * @internal @@ -78,8 +78,8 @@ public: KMThreadJob* threadJob(); virtual int actions(); - virtual TQValueList createPluginActions(KActionCollection*); - virtual void validatePluginActions(KActionCollection*, const TQPtrList&); + virtual TQValueList createPluginActions(TDEActionCollection*); + virtual void validatePluginActions(TDEActionCollection*, const TQPtrList&); virtual bool doPluginAction(int, const TQPtrList&); protected: diff --git a/tdeprint/kmmanager.cpp b/tdeprint/kmmanager.cpp index a597b94b6..1c772ec3c 100644 --- a/tdeprint/kmmanager.cpp +++ b/tdeprint/kmmanager.cpp @@ -511,11 +511,11 @@ bool KMManager::invokeOptionsDialog(TQWidget *parent) return false; } -void KMManager::createPluginActions(KActionCollection*) +void KMManager::createPluginActions(TDEActionCollection*) { } -void KMManager::validatePluginActions(KActionCollection*, KMPrinter*) +void KMManager::validatePluginActions(TDEActionCollection*, KMPrinter*) { } diff --git a/tdeprint/kmmanager.h b/tdeprint/kmmanager.h index be69c73e6..9c5820f3a 100644 --- a/tdeprint/kmmanager.h +++ b/tdeprint/kmmanager.h @@ -35,7 +35,7 @@ class KMDBEntry; class KMVirtualManager; class KMSpecialManager; class TQWidget; -class KActionCollection; +class TDEActionCollection; class PrinterFilter; /** @@ -135,8 +135,8 @@ public: virtual TQStringList detectLocalPrinters(); // additional actions (for print manager) - virtual void createPluginActions(KActionCollection*); - virtual void validatePluginActions(KActionCollection*, KMPrinter*); + virtual void createPluginActions(TDEActionCollection*); + virtual void validatePluginActions(TDEActionCollection*, KMPrinter*); // utility function void checkUpdatePossible(); diff --git a/tdeprint/kpfilterpage.cpp b/tdeprint/kpfilterpage.cpp index 66eda203d..9fabfc6d4 100644 --- a/tdeprint/kpfilterpage.cpp +++ b/tdeprint/kpfilterpage.cpp @@ -126,7 +126,7 @@ KPFilterPage::KPFilterPage(TQWidget *parent, const char *name) m_activefilters.setAutoDelete(true); m_valid = true; - m_view = new KListView(this); + m_view = new TDEListView(this); TQWhatsThis::add(m_view, whatsThisFilterchainListView); m_view->addColumn(""); m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); diff --git a/tdeprint/kpfilterpage.h b/tdeprint/kpfilterpage.h index 72065b3f1..a5bc7f757 100644 --- a/tdeprint/kpfilterpage.h +++ b/tdeprint/kpfilterpage.h @@ -25,7 +25,7 @@ #include #include -class KListView; +class TDEListView; class KXmlCommand; class TQListViewItem; class TQToolButton; @@ -57,7 +57,7 @@ protected: TQStringList activeList(); void updateButton(); private: - KListView *m_view; + TDEListView *m_view; TQStringList m_filters; // pairs TQDict m_activefilters; TQToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure; diff --git a/tdeprint/kprintaction.cpp b/tdeprint/kprintaction.cpp index a9e1b2bb8..6ce7f3f79 100644 --- a/tdeprint/kprintaction.cpp +++ b/tdeprint/kprintaction.cpp @@ -40,21 +40,21 @@ public: }; KPrintAction::KPrintAction(const TQString& text, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) -: KActionMenu(text, parent, name) +: TDEActionMenu(text, parent, name) { d = new KPrintActionPrivate(); initialize(type, parentWidget); } KPrintAction::KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) -: KActionMenu(text, icon, parent, name) +: TDEActionMenu(text, icon, parent, name) { d = new KPrintActionPrivate(); initialize(type, parentWidget); } KPrintAction::KPrintAction(const TQString& text, const TQString& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) -: KActionMenu(text, icon, parent, name) +: TDEActionMenu(text, icon, parent, name) { d = new KPrintActionPrivate(); initialize(type, parentWidget); diff --git a/tdeprint/kprintaction.h b/tdeprint/kprintaction.h index 5c8688e8f..9916629ba 100644 --- a/tdeprint/kprintaction.h +++ b/tdeprint/kprintaction.h @@ -24,7 +24,7 @@ class KPrinter; -class TDEPRINT_EXPORT KPrintAction : public KActionMenu +class TDEPRINT_EXPORT KPrintAction : public TDEActionMenu { Q_OBJECT public: diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index fe105379c..6f763fe75 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -81,26 +81,26 @@ public: KPrintPreviewPrivate(KPrintPreview *dlg) : gvpart_(0) { mainwidget_ = new TQWidget(dlg, "MainWidget"); - toolbar_ = new KToolBar(mainwidget_, "PreviewToolBar", true); - actions_ = new KActionCollection(dlg); - accel_ = new KAccel(dlg); + toolbar_ = new TDEToolBar(mainwidget_, "PreviewToolBar", true); + actions_ = new TDEActionCollection(dlg); + accel_ = new TDEAccel(dlg); previewonly_ = false; } ~KPrintPreviewPrivate() { if (gvpart_) delete gvpart_; } - void plugAction(KAction *act) + void plugAction(TDEAction *act) { act->plug(toolbar_); act->plugAccel(accel_); } KParts::ReadOnlyPart *gvpart_; - KToolBar *toolbar_; - KActionCollection *actions_; + TDEToolBar *toolbar_; + TDEActionCollection *actions_; TQWidget *mainwidget_; - KAccel *accel_; + TDEAccel *accel_; bool previewonly_; }; @@ -157,8 +157,8 @@ KPrintPreview::KPrintPreview(TQWidget *parent, bool previewOnly) KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "close_print"); else { - new KAction(i18n("Print"), "fileprint", Qt::Key_Return, TQT_TQOBJECT(this), TQT_SLOT(accept()), d->actions_, "continue_print"); - new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "stop_print"); + new TDEAction(i18n("Print"), "fileprint", Qt::Key_Return, TQT_TQOBJECT(this), TQT_SLOT(accept()), d->actions_, "continue_print"); + new TDEAction(i18n("Cancel"), "stop", Qt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "stop_print"); } } @@ -193,13 +193,13 @@ void KPrintPreview::initView(KLibFactory *factory) TQDomElement a = acts.item( i ).toElement(); if ( a.attribute( "name" ) == "goToPage" ) continue; - KAction *act = d->gvpart_->action( a ); + TDEAction *act = d->gvpart_->action( a ); if ( act != 0 ) d->plugAction( act ); } } /* - KAction *act; + TDEAction *act; d->toolbar_->insertLineSeparator(); if ((act = d->gvpart_->action("zoomIn")) != 0) d->plugAction(act); @@ -212,8 +212,8 @@ void KPrintPreview::initView(KLibFactory *factory) d->plugAction(act); */ } - d->toolbar_->setIconText(KToolBar::IconTextRight); - d->toolbar_->setBarPos(KToolBar::Top); + d->toolbar_->setIconText(TDEToolBar::IconTextRight); + d->toolbar_->setBarPos(TDEToolBar::Top); d->toolbar_->setMovingEnabled(false); //d->adjustSize(); diff --git a/tdeprint/lpr/editentrydialog.cpp b/tdeprint/lpr/editentrydialog.cpp index 6c4ecc30c..5d9f52bea 100644 --- a/tdeprint/lpr/editentrydialog.cpp +++ b/tdeprint/lpr/editentrydialog.cpp @@ -39,7 +39,7 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const c TQLabel *lab0 = new TQLabel(i18n("Aliases:"), w); m_aliases = new TQLineEdit(w); - m_view = new KListView(w); + m_view = new TDEListView(w); m_view->addColumn(""); m_view->header()->hide(); m_type = new TQComboBox(w); diff --git a/tdeprint/lpr/kmlprmanager.cpp b/tdeprint/lpr/kmlprmanager.cpp index 5d73d4d54..a81a24a72 100644 --- a/tdeprint/lpr/kmlprmanager.cpp +++ b/tdeprint/lpr/kmlprmanager.cpp @@ -453,13 +453,13 @@ TQString KMLprManager::printOptions(KPrinter *prt) return TQString::null; } -void KMLprManager::createPluginActions(KActionCollection *coll) +void KMLprManager::createPluginActions(TDEActionCollection *coll) { - KAction *act = new KAction(i18n("&Edit printcap Entry..."), "tdeprint_report", 0, this, TQT_SLOT(slotEditPrintcap()), coll, "plugin_editprintcap"); + TDEAction *act = new TDEAction(i18n("&Edit printcap Entry..."), "tdeprint_report", 0, this, TQT_SLOT(slotEditPrintcap()), coll, "plugin_editprintcap"); act->setGroup("plugin"); } -void KMLprManager::validatePluginActions(KActionCollection *coll, KMPrinter *prt) +void KMLprManager::validatePluginActions(TDEActionCollection *coll, KMPrinter *prt) { m_currentprinter = prt; // FIXME: disabled until completion diff --git a/tdeprint/lpr/kmlprmanager.h b/tdeprint/lpr/kmlprmanager.h index 34d38340f..d26af4d77 100644 --- a/tdeprint/lpr/kmlprmanager.h +++ b/tdeprint/lpr/kmlprmanager.h @@ -54,8 +54,8 @@ public: LpcHelper* lpcHelper() { return m_lpchelper; } TQString printOptions(KPrinter*); - void createPluginActions(KActionCollection*); - void validatePluginActions(KActionCollection*, KMPrinter*); + void createPluginActions(TDEActionCollection*); + void validatePluginActions(TDEActionCollection*, KMPrinter*); TQString stateInformation(); protected slots: diff --git a/tdeprint/management/cjanuswidget.cpp b/tdeprint/management/cjanuswidget.cpp index 92ea782e5..1642fb5c6 100644 --- a/tdeprint/management/cjanuswidget.cpp +++ b/tdeprint/management/cjanuswidget.cpp @@ -79,7 +79,7 @@ void CJanusWidget::CListBoxItem::paint(TQPainter *p) //*********************************************************************************** -class CJanusWidget::CListBox : public KListBox +class CJanusWidget::CListBox : public TDEListBox { public: CListBox(TQWidget *parent = 0, const char *name = 0); @@ -92,7 +92,7 @@ protected: }; CJanusWidget::CListBox::CListBox(TQWidget *parent, const char *name) -: KListBox(parent,name) +: TDEListBox(parent,name) { verticalScrollBar()->installEventFilter(this); } @@ -105,7 +105,7 @@ bool CJanusWidget::CListBox::eventFilter(TQObject *o, TQEvent *e) { if (e->type() == TQEvent::Show || e->type() == TQEvent::Hide) computeWidth(); - return KListBox::eventFilter(o,e); + return TDEListBox::eventFilter(o,e); } void CJanusWidget::CListBox::computeWidth() diff --git a/tdeprint/management/kiconselectaction.cpp b/tdeprint/management/kiconselectaction.cpp index 8bf4d5a10..f5df42299 100644 --- a/tdeprint/management/kiconselectaction.cpp +++ b/tdeprint/management/kiconselectaction.cpp @@ -37,7 +37,7 @@ public: }; KIconSelectAction::KIconSelectAction(const TQString& text, int accel, TQObject* parent, const char* name) -: KSelectAction(text, accel, parent, name) +: TDESelectAction(text, accel, parent, name) { d = new KIconSelectActionPrivate; } @@ -68,7 +68,7 @@ void KIconSelectAction::createPopupMenu() void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& iconlst) { - KSelectAction::setItems(lst); + TDESelectAction::setItems(lst); d->m_iconlst = iconlst; updateIcons(); } @@ -79,12 +79,12 @@ int KIconSelectAction::plug(TQWidget* widget, int index) if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { createPopupMenu(); - value = KSelectAction::plug(widget, index); + value = TDESelectAction::plug(widget, index); } - else if (widget->inherits("KToolBar")) + else if (widget->inherits("TDEToolBar")) { - KToolBar* bar = static_cast(widget); - int id = KAction::getToolButtonID(); + TDEToolBar* bar = static_cast(widget); + int id = TDEAction::getToolButtonID(); // To have a correct layout in the toolbar, a non // empty icon has to be used. Use "unknown" by default. TQString iconName = (currentItem() != -1 ? d->m_iconlst[currentItem()] : "unknown"); @@ -104,15 +104,15 @@ int KIconSelectAction::plug(TQWidget* widget, int index) void KIconSelectAction::updateCurrentItem(int id) { TQWidget* w = container(id); - if (w->inherits("KToolBar")) - static_cast(w)->getButton(itemId(id))->setIcon(d->m_iconlst[currentItem()]); + if (w->inherits("TDEToolBar")) + static_cast(w)->getButton(itemId(id))->setIcon(d->m_iconlst[currentItem()]); else - KSelectAction::updateCurrentItem(id); + TDESelectAction::updateCurrentItem(id); } void KIconSelectAction::setCurrentItem(int index) { - KSelectAction::setCurrentItem(index); + TDESelectAction::setCurrentItem(index); } #include "kiconselectaction.moc" diff --git a/tdeprint/management/kiconselectaction.h b/tdeprint/management/kiconselectaction.h index 84bef60d2..917dc742b 100644 --- a/tdeprint/management/kiconselectaction.h +++ b/tdeprint/management/kiconselectaction.h @@ -24,7 +24,7 @@ class KIconSelectActionPrivate; -class KIconSelectAction : public KSelectAction +class KIconSelectAction : public TDESelectAction { Q_OBJECT public: diff --git a/tdeprint/management/kmconfigfilter.cpp b/tdeprint/management/kmconfigfilter.cpp index bcbe1b0f7..637f06ecc 100644 --- a/tdeprint/management/kmconfigfilter.cpp +++ b/tdeprint/management/kmconfigfilter.cpp @@ -43,10 +43,10 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this); - m_list1 = new KListBox(box); - m_list1->setSelectionMode(KListBox::Extended); - m_list2 = new KListBox(box); - m_list2->setSelectionMode(KListBox::Extended); + m_list1 = new TDEListBox(box); + m_list1->setSelectionMode(TDEListBox::Extended); + m_list2 = new TDEListBox(box); + m_list2->setSelectionMode(TDEListBox::Extended); m_add = new TQToolButton( box ); m_add->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" )); m_remove = new TQToolButton( box ); @@ -97,7 +97,7 @@ void KMConfigFilter::loadConfig(TDEConfig *conf) { if (!it.current()->isSpecial() && !it.current()->isVirtual()) { - KListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); + TDEListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); lb->insertItem(SmallIcon(it.current()->pixmap()), it.current()->printerName()); } } @@ -116,7 +116,7 @@ void KMConfigFilter::saveConfig(TDEConfig *conf) conf->writeEntry("LocationRe", m_locationre->text()); } -void KMConfigFilter::transfer(KListBox *from, KListBox *to) +void KMConfigFilter::transfer(TDEListBox *from, TDEListBox *to) { for (uint i=0; icount();) { @@ -143,7 +143,7 @@ void KMConfigFilter::slotRemoveClicked() void KMConfigFilter::slotSelectionChanged() { - const KListBox *lb = static_cast(sender()); + const TDEListBox *lb = static_cast(sender()); if (!lb) return; TQToolButton *pb = (lb == m_list1 ? m_add : m_remove); diff --git a/tdeprint/management/kmconfigfilter.h b/tdeprint/management/kmconfigfilter.h index 298c83de2..8338ebd6f 100644 --- a/tdeprint/management/kmconfigfilter.h +++ b/tdeprint/management/kmconfigfilter.h @@ -22,7 +22,7 @@ #include "kmconfigpage.h" -class KListBox; +class TDEListBox; class TQToolButton; class TQLineEdit; @@ -41,10 +41,10 @@ protected slots: void slotRemoveClicked(); protected: - void transfer(KListBox *from, KListBox *to); + void transfer(TDEListBox *from, TDEListBox *to); private: - KListBox *m_list1, *m_list2; + TDEListBox *m_list1, *m_list2; TQToolButton *m_add, *m_remove; TQLineEdit *m_locationre; }; diff --git a/tdeprint/management/kmconfigfonts.cpp b/tdeprint/management/kmconfigfonts.cpp index 91861f5ca..cd681db3d 100644 --- a/tdeprint/management/kmconfigfonts.cpp +++ b/tdeprint/management/kmconfigfonts.cpp @@ -47,7 +47,7 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) TQGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this); m_embedfonts = new TQCheckBox(i18n("&Embed fonts in PostScript data when printing"), box); - m_fontpath = new KListView(box2); + m_fontpath = new TDEListView(box2); m_fontpath->addColumn(""); m_fontpath->header()->setStretchEnabled(true, 0); m_fontpath->header()->hide(); diff --git a/tdeprint/management/kmconfigfonts.h b/tdeprint/management/kmconfigfonts.h index dd65d3901..8bd285f38 100644 --- a/tdeprint/management/kmconfigfonts.h +++ b/tdeprint/management/kmconfigfonts.h @@ -22,7 +22,7 @@ #include "kmconfigpage.h" -class KListView; +class TDEListView; class KURLRequester; class TQPushButton; class TQCheckBox; @@ -46,7 +46,7 @@ protected slots: private: TQCheckBox *m_embedfonts; - KListView *m_fontpath; + TDEListView *m_fontpath; KURLRequester *m_addpath; TQPushButton *m_up, *m_down, *m_add, *m_remove; }; diff --git a/tdeprint/management/kmdriverdbwidget.cpp b/tdeprint/management/kmdriverdbwidget.cpp index 1b05f8e9c..ee442113a 100644 --- a/tdeprint/management/kmdriverdbwidget.cpp +++ b/tdeprint/management/kmdriverdbwidget.cpp @@ -46,8 +46,8 @@ KMDriverDbWidget::KMDriverDbWidget(TQWidget *parent, const char *name) m_valid = false; // build widget - m_manu = new KListBox(this); - m_model = new KListBox(this); + m_manu = new TDEListBox(this); + m_model = new TDEListBox(this); m_postscript = new TQCheckBox(i18n("&PostScript printer"),this); m_raw = new TQCheckBox(i18n("&Raw printer (no driver needed)"),this); m_postscript->setCursor(KCursor::handCursor()); diff --git a/tdeprint/management/kminstancepage.cpp b/tdeprint/management/kminstancepage.cpp index 25c037516..2d73c6ecd 100644 --- a/tdeprint/management/kminstancepage.cpp +++ b/tdeprint/management/kminstancepage.cpp @@ -41,7 +41,7 @@ KMInstancePage::KMInstancePage(TQWidget *parent, const char *name) : TQWidget(parent,name) { - m_view = new KListBox(this); + m_view = new TDEListBox(this); m_printer = 0; initActions(); diff --git a/tdeprint/management/kminstancepage.h b/tdeprint/management/kminstancepage.h index 7a3075d73..56b045fe2 100644 --- a/tdeprint/management/kminstancepage.h +++ b/tdeprint/management/kminstancepage.h @@ -24,7 +24,7 @@ #include #include -class KListBox; +class TDEListBox; class KMPrinter; class TQButton; @@ -50,7 +50,7 @@ protected: void addButton(const TQString& text, const TQString& pixmap, const char *receiver); private: - KListBox *m_view; + TDEListBox *m_view; TQValueList m_buttons; KMPrinter *m_printer; }; diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index 5e4561c19..0af246f80 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/management/kmjobviewer.cpp @@ -57,7 +57,7 @@ #undef m_manager #define m_manager KMFactory::self()->jobManager() -class KJobListView : public KListView +class KJobListView : public TDEListView { public: KJobListView( TQWidget *parent = 0, const char *name = 0 ); @@ -67,7 +67,7 @@ protected: }; KJobListView::KJobListView( TQWidget *parent, const char *name ) - : KListView( parent, name ) + : TDEListView( parent, name ) { setAcceptDrops( true ); setDropVisualizer( false ); @@ -78,11 +78,11 @@ bool KJobListView::acceptDrag( TQDropEvent *e ) const if ( KURLDrag::canDecode( e ) ) return true; else - return KListView::acceptDrag( e ); + return TDEListView::acceptDrag( e ); } KMJobViewer::KMJobViewer(TQWidget *parent, const char *name) -: KMainWindow(parent,name) +: TDEMainWindow(parent,name) { m_view = 0; m_pop = 0; @@ -259,20 +259,20 @@ void KMJobViewer::init() void KMJobViewer::initActions() { // job actions - KAction *hact = new KAction(i18n("&Hold"),"stop",0,TQT_TQOBJECT(this),TQT_SLOT(slotHold()),actionCollection(),"job_hold"); - KAction *ract = new KAction(i18n("&Resume"),"run",0,TQT_TQOBJECT(this),TQT_SLOT(slotResume()),actionCollection(),"job_resume"); - KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),actionCollection(),"job_remove"); - KAction *sact = new KAction(i18n("Res&tart"),"redo",0,TQT_TQOBJECT(this),TQT_SLOT(slotRestart()),actionCollection(),"job_restart"); - KActionMenu *mact = new KActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move"); + TDEAction *hact = new TDEAction(i18n("&Hold"),"stop",0,TQT_TQOBJECT(this),TQT_SLOT(slotHold()),actionCollection(),"job_hold"); + TDEAction *ract = new TDEAction(i18n("&Resume"),"run",0,TQT_TQOBJECT(this),TQT_SLOT(slotResume()),actionCollection(),"job_resume"); + TDEAction *dact = new TDEAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),actionCollection(),"job_remove"); + TDEAction *sact = new TDEAction(i18n("Res&tart"),"redo",0,TQT_TQOBJECT(this),TQT_SLOT(slotRestart()),actionCollection(),"job_restart"); + TDEActionMenu *mact = new TDEActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move"); mact->setDelayed(false); connect(mact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotMove(int))); connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold())); connect(mact->popupMenu(),TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release())); connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),TQT_SLOT(slotShowMoveMenu())); - KToggleAction *tact = new KToggleAction(i18n("&Toggle Completed Jobs"),"history",0,actionCollection(),"view_completed"); + TDEToggleAction *tact = new TDEToggleAction(i18n("&Toggle Completed Jobs"),"history",0,actionCollection(),"view_completed"); tact->setEnabled(m_manager->actions() & KMJob::ShowCompleted); connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowCompleted(bool))); - KToggleAction *uact = new KToggleAction(i18n("Show Only User Jobs"), "personal", 0, actionCollection(), "view_user_jobs"); + TDEToggleAction *uact = new TDEToggleAction(i18n("Show Only User Jobs"), "personal", 0, actionCollection(), "view_user_jobs"); uact->setCheckedState(KGuiItem(i18n("Hide Only User Jobs"),"personal")); connect(uact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUserOnly(bool))); m_userfield = new TQLineEdit(0); @@ -298,7 +298,7 @@ void KMJobViewer::initActions() } // Filter actions - KActionMenu *fact = new KActionMenu(i18n("&Select Printer"), "tdeprint_printer", actionCollection(), "filter_modify"); + TDEActionMenu *fact = new TDEActionMenu(i18n("&Select Printer"), "tdeprint_printer", actionCollection(), "filter_modify"); fact->setDelayed(false); connect(fact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotPrinterSelected(int))); connect(fact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold())); @@ -307,7 +307,7 @@ void KMJobViewer::initActions() if (!m_standalone) { - KToolBar *toolbar = toolBar(); + TDEToolBar *toolbar = toolBar(); hact->plug(toolbar); ract->plug(toolbar); toolbar->insertSeparator(); @@ -327,7 +327,7 @@ void KMJobViewer::initActions() KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); // refresh action - new KAction(i18n("Refresh"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotRefresh()),actionCollection(),"refresh"); + new TDEAction(i18n("Refresh"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotRefresh()),actionCollection(),"refresh"); // create status bar KStatusBar *statusbar = statusBar(); @@ -367,13 +367,13 @@ void KMJobViewer::buildPrinterMenu(TQPopupMenu *menu, bool use_all, bool use_spe void KMJobViewer::slotShowMoveMenu() { - TQPopupMenu *menu = static_cast(actionCollection()->action("job_move"))->popupMenu(); + TQPopupMenu *menu = static_cast(actionCollection()->action("job_move"))->popupMenu(); buildPrinterMenu(menu, false, false); } void KMJobViewer::slotShowPrinterMenu() { - TQPopupMenu *menu = static_cast(actionCollection()->action("filter_modify"))->popupMenu(); + TQPopupMenu *menu = static_cast(actionCollection()->action("filter_modify"))->popupMenu(); buildPrinterMenu(menu, true, true); } @@ -583,7 +583,7 @@ void KMJobViewer::loadPluginActions() if (m_standalone) { // standalone window, insert actions into main menubar - KAction *act = actionCollection()->action("job_restart"); + TDEAction *act = actionCollection()->action("job_restart"); for (int i=0;icontainerCount();i++) { if (menuBar()->findItem(act->itemId(i), &menu)) @@ -594,8 +594,8 @@ void KMJobViewer::loadPluginActions() } } - TQValueList acts = m_manager->createPluginActions(actionCollection()); - for (TQValueListIterator it=acts.begin(); it!=acts.end(); ++it) + TQValueList acts = m_manager->createPluginActions(actionCollection()); + for (TQValueListIterator it=acts.begin(); it!=acts.end(); ++it) { // connect the action to this connect((*it), TQT_SIGNAL(activated(int)), TQT_SLOT(pluginActionActivated(int))); @@ -611,8 +611,8 @@ void KMJobViewer::loadPluginActions() void KMJobViewer::removePluginActions() { - TQValueList acts = actionCollection()->actions("plugin"); - for (TQValueListIterator it=acts.begin(); it!=acts.end(); ++it) + TQValueList acts = actionCollection()->actions("plugin"); + for (TQValueListIterator it=acts.begin(); it!=acts.end(); ++it) { (*it)->unplugAll(); delete (*it); @@ -650,7 +650,7 @@ void KMJobViewer::reload() // update the "History" action state actionCollection()->action("view_completed")->setEnabled(m_manager->actions() & KMJob::ShowCompleted); - static_cast(actionCollection()->action("view_completed"))->setChecked(false); + static_cast(actionCollection()->action("view_completed"))->setChecked(false); } void KMJobViewer::closeEvent(TQCloseEvent *e) diff --git a/tdeprint/management/kmjobviewer.h b/tdeprint/management/kmjobviewer.h index 1dca024a8..534958656 100644 --- a/tdeprint/management/kmjobviewer.h +++ b/tdeprint/management/kmjobviewer.h @@ -30,7 +30,7 @@ class KMJobManager; class KMJob; -class KListView; +class TDEListView; class JobItem; class TQPopupMenu; class TQListViewItem; @@ -46,7 +46,7 @@ class TQCheckBox; * if you're a TDEPrint developer. The API might change in the * future and binary compatibility might be broken. */ -class TDEPRINT_EXPORT KMJobViewer : public KMainWindow, public KMPrinterPage, public KPReloadObject +class TDEPRINT_EXPORT KMJobViewer : public TDEMainWindow, public KMPrinterPage, public KPReloadObject { Q_OBJECT public: @@ -108,7 +108,7 @@ protected: void updateStatusBar(); private: - KListView *m_view; + TDEListView *m_view; TQPtrList m_jobs; TQPtrList m_items; TQPopupMenu *m_pop; diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp index 858fca0fc..9673d214f 100644 --- a/tdeprint/management/kmmainview.cpp +++ b/tdeprint/management/kmmainview.cpp @@ -78,7 +78,7 @@ int tdeprint_management_add_printer_wizard( TQWidget* parent ) return flag; } -KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *coll) +KMMainView::KMMainView(TQWidget *parent, const char *name, TDEActionCollection *coll) : TQWidget(parent, name) { m_current = 0; @@ -88,15 +88,15 @@ KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *co m_printerview = new KMPrinterView(this, "PrinterView"); m_printerpages = new KMPages(this, "PrinterPages"); m_pop = new TQPopupMenu(this); - m_toolbar = new KToolBar(this, "ToolBar"); + m_toolbar = new TDEToolBar(this, "ToolBar"); m_toolbar->setMovingEnabled(false); m_plugin = new PluginComboBox(this, "Plugin"); /* m_menubar = new KMenuBar( this ); static_cast( m_menubar )->setTopLevelMenu( false ); */ - m_menubar = new KToolBar( this, "MenuBar", false, false ); - m_menubar->setIconText( KToolBar::IconTextRight ); + m_menubar = new TDEToolBar( this, "MenuBar", false, false ); + m_menubar->setIconText( TDEToolBar::IconTextRight ); m_menubar->setMovingEnabled( false ); // layout @@ -122,7 +122,7 @@ KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *co if (coll) m_actions = coll; else - m_actions = new KActionCollection(this); + m_actions = new TDEActionCollection(this); initActions(); // first update @@ -151,13 +151,13 @@ void KMMainView::restoreSettings() setOrientation(conf->readNumEntry("Orientation", Qt::Vertical)); bool view = conf->readBoolEntry("ViewToolBar",false); slotToggleToolBar(view); - ((KToggleAction*)m_actions->action("view_toolbar"))->setChecked(view); + ((TDEToggleAction*)m_actions->action("view_toolbar"))->setChecked(view); view = conf->readBoolEntry( "ViewMenuBar", true ); slotToggleMenuBar( view ); - static_cast( m_actions->action( "view_menubar" ) )->setChecked( view ); + static_cast( m_actions->action( "view_menubar" ) )->setChecked( view ); view = conf->readBoolEntry("ViewPrinterInfos",true); slotShowPrinterInfos(view); - ((KToggleAction*)m_actions->action("view_printerinfos"))->setChecked(view); + ((TDEToggleAction*)m_actions->action("view_printerinfos"))->setChecked(view); } void KMMainView::saveSettings() @@ -166,9 +166,9 @@ void KMMainView::saveSettings() conf->setGroup("General"); conf->writeEntry("ViewType",(int)m_printerview->viewType()); conf->writeEntry("Orientation",(int)orientation()); - conf->writeEntry("ViewToolBar",((KToggleAction*)m_actions->action("view_toolbar"))->isChecked()); - conf->writeEntry("ViewMenuBar",static_cast( m_actions->action("view_menubar") )->isChecked()); - conf->writeEntry("ViewPrinterInfos",((KToggleAction*)m_actions->action("view_printerinfos"))->isChecked()); + conf->writeEntry("ViewToolBar",((TDEToggleAction*)m_actions->action("view_toolbar"))->isChecked()); + conf->writeEntry("ViewMenuBar",static_cast( m_actions->action("view_menubar") )->isChecked()); + conf->writeEntry("ViewPrinterInfos",((TDEToggleAction*)m_actions->action("view_printerinfos"))->isChecked()); conf->sync(); } @@ -181,25 +181,25 @@ void KMMainView::initActions() vact->setCurrentItem(0); connect(vact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeView(int))); - KActionMenu *stateAct = new KActionMenu(i18n("Start/Stop Printer"), "tdeprint_printstate", m_actions, "printer_state_change"); + TDEActionMenu *stateAct = new TDEActionMenu(i18n("Start/Stop Printer"), "tdeprint_printstate", m_actions, "printer_state_change"); stateAct->setDelayed(false); - stateAct->insert(new KAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start")); - stateAct->insert(new KAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop")); + stateAct->insert(new TDEAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start")); + stateAct->insert(new TDEAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop")); - stateAct = new KActionMenu(i18n("Enable/Disable Job Spooling"), "tdeprint_queuestate", m_actions, "printer_spool_change"); + stateAct = new TDEActionMenu(i18n("Enable/Disable Job Spooling"), "tdeprint_queuestate", m_actions, "printer_spool_change"); stateAct->setDelayed(false); - stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable")); - stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable")); - - new KAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove"); - new KAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure"); - new KAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add"); - new KAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special"); - new KAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default"); - new KAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default"); - new KAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test"); - new KAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); - new KAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh"); + stateAct->insert(new TDEAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable")); + stateAct->insert(new TDEAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable")); + + new TDEAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove"); + new TDEAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure"); + new TDEAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add"); + new TDEAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special"); + new TDEAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default"); + new TDEAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default"); + new TDEAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test"); + new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); + new TDEAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh"); KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change"); iconlst.clear(); @@ -208,29 +208,29 @@ void KMMainView::initActions() dact->setCurrentItem(0); connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int))); - new KAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart"); - new KAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure"); - new KAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure"); + new TDEAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart"); + new TDEAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure"); + new TDEAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure"); - KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar"); + TDEToggleAction *tact = new TDEToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar"); tact->setCheckedState(i18n("Hide &Toolbar")); connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotToggleToolBar(bool))); - tact = new KToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" ); + tact = new TDEToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" ); tact->setCheckedState(i18n("Hide Me&nu Toolbar")); connect( tact, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleMenuBar( bool ) ) ); - tact = new KToggleAction(i18n("Show Pr&inter Details"),"tdeprint_printer_infos", 0,m_actions,"view_printerinfos"); + tact = new TDEToggleAction(i18n("Show Pr&inter Details"),"tdeprint_printer_infos", 0,m_actions,"view_printerinfos"); tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"),"tdeprint_printer_infos")); tact->setChecked(true); connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowPrinterInfos(bool))); - tact = new KToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter"); + tact = new TDEToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter"); tact->setChecked(KMManager::self()->isFilterEnabled()); connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool))); - new KAction( i18n( "%1 &Handbook" ).arg( "TDEPrint" ), "contents", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_help" ); - new KAction( i18n( "%1 &Web Site" ).arg( "TDEPrint" ), "network", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_web" ); + new TDEAction( i18n( "%1 &Handbook" ).arg( "TDEPrint" ), "contents", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_help" ); + new TDEAction( i18n( "%1 &Web Site" ).arg( "TDEPrint" ), "network", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_web" ); - KActionMenu *mact = new KActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool"); + TDEActionMenu *mact = new TDEActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool"); mact->setDelayed(false); connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int))); TQStringList files = TDEGlobal::dirs()->findAllResources("data", "tdeprint/tools/*.desktop"); @@ -412,7 +412,7 @@ void KMMainView::slotPrinterSelected(const TQString& prname) void KMMainView::setViewType(int ID) { - ((KSelectAction*)m_actions->action("view_change"))->setCurrentItem(ID); + ((TDESelectAction*)m_actions->action("view_change"))->setCurrentItem(ID); slotChangeView(ID); } @@ -468,8 +468,8 @@ void KMMainView::slotRightButtonClicked(const TQString& prname, const TQPoint& p } if (!printer->isSpecial()) { - TQValueList pactions = m_actions->actions("plugin"); - for (TQValueList::Iterator it=pactions.begin(); it!=pactions.end(); ++it) + TQValueList pactions = m_actions->actions("plugin"); + for (TQValueList::Iterator it=pactions.begin(); it!=pactions.end(); ++it) (*it)->plug(m_pop); if (pactions.count() > 0) m_pop->insertSeparator(); @@ -617,7 +617,7 @@ void KMMainView::slotSoftDefault() void KMMainView::setOrientation(int o) { int ID = (o == Qt::Horizontal ? 1 : 0); - ((KSelectAction*)m_actions->action("orientation_change"))->setCurrentItem(ID); + ((TDESelectAction*)m_actions->action("orientation_change"))->setCurrentItem(ID); slotChangeDirection(ID); } @@ -757,7 +757,7 @@ void KMMainView::slotShowPrinterInfos(bool on) void KMMainView::enableToolbar(bool on) { - KToggleAction *act = (KToggleAction*)m_actions->action("view_toolbar"); + TDEToggleAction *act = (TDEToggleAction*)m_actions->action("view_toolbar"); m_toolbar->setEnabled(on); act->setEnabled(on); if (on && act->isChecked()) @@ -766,7 +766,7 @@ void KMMainView::enableToolbar(bool on) m_toolbar->hide(); } -KAction* KMMainView::action(const char *name) +TDEAction* KMMainView::action(const char *name) { return m_actions->action(name); } @@ -793,23 +793,23 @@ void KMMainView::reload() void KMMainView::showPrinterInfos(bool on) { - static_cast(m_actions->action("view_printerinfos"))->setChecked(on); + static_cast(m_actions->action("view_printerinfos"))->setChecked(on); slotShowPrinterInfos(on); } bool KMMainView::printerInfosShown() const { - return (static_cast(m_actions->action("view_printerinfos"))->isChecked()); + return (static_cast(m_actions->action("view_printerinfos"))->isChecked()); } void KMMainView::loadPluginActions() { KMFactory::self()->manager()->createPluginActions(m_actions); - TQValueList pactions = m_actions->actions("plugin"); + TQValueList pactions = m_actions->actions("plugin"); int index = m_pactionsindex; //TQPopupMenu *menu = m_menubar->findItem( m_menubar->idAt( 1 ) )->popup(); TQPopupMenu *menu = m_menubar->getButton( 1 )->popup(); - for (TQValueList::Iterator it=pactions.begin(); it!=pactions.end(); ++it) + for (TQValueList::Iterator it=pactions.begin(); it!=pactions.end(); ++it) { (*it)->plug(m_toolbar, index++); ( *it )->plug( menu ); @@ -818,8 +818,8 @@ void KMMainView::loadPluginActions() void KMMainView::removePluginActions() { - TQValueList pactions = m_actions->actions("plugin"); - for (TQValueList::Iterator it=pactions.begin(); it!=pactions.end(); ++it) + TQValueList pactions = m_actions->actions("plugin"); + for (TQValueList::Iterator it=pactions.begin(); it!=pactions.end(); ++it) { (*it)->unplugAll(); delete (*it); diff --git a/tdeprint/management/kmmainview.h b/tdeprint/management/kmmainview.h index 7ed53a5c8..54cdffbc2 100644 --- a/tdeprint/management/kmmainview.h +++ b/tdeprint/management/kmmainview.h @@ -32,12 +32,12 @@ class KMManager; class KMPrinterView; class KMPrinter; class KMPages; -class KActionCollection; +class TDEActionCollection; class TQPopupMenu; class TQTimer; class TQSplitter; -class KToolBar; -class KAction; +class TDEToolBar; +class TDEAction; class PluginComboBox; class TQBoxLayout; class MessageWindow; @@ -54,7 +54,7 @@ class TDEPRINT_EXPORT KMMainView : public TQWidget, public KPReloadObject { Q_OBJECT public: - KMMainView(TQWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0); + KMMainView(TQWidget *parent = 0, const char *name = 0, TDEActionCollection *coll = 0); ~KMMainView(); void setOrientation(int); @@ -62,7 +62,7 @@ public: void setViewType(int); int viewType() const; void enableToolbar(bool on = true); - KAction* action(const char *name); + TDEAction* action(const char *name); void showPrinterInfos(bool on); bool printerInfosShown() const; @@ -115,17 +115,17 @@ private: KMPrinterView *m_printerview; KMPages *m_printerpages; TQPopupMenu *m_pop; - KActionCollection *m_actions; + TDEActionCollection *m_actions; KMPrinter *m_current; - KToolBar *m_toolbar; + TDEToolBar *m_toolbar; PluginComboBox *m_plugin; int m_pactionsindex; TQStringList m_toollist; bool m_first; TQBoxLayout *m_boxlayout; - class KMainWindowPrivate; - KMainWindowPrivate *d; - KToolBar *m_menubar; + class TDEMainWindowPrivate; + TDEMainWindowPrivate *d; + TDEToolBar *m_menubar; }; TDEPRINT_EXPORT int tdeprint_management_add_printer_wizard( TQWidget* parent ); diff --git a/tdeprint/management/kmwbackend.cpp b/tdeprint/management/kmwbackend.cpp index cd98a8b07..6fd8cf2dc 100644 --- a/tdeprint/management/kmwbackend.cpp +++ b/tdeprint/management/kmwbackend.cpp @@ -33,13 +33,13 @@ #include #include -class KRadioButton : public TQRadioButton +class TDERadioButton : public TQRadioButton { public: - KRadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0); + TDERadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0); }; -KRadioButton::KRadioButton(const TQString& txt, TQWidget *parent, const char *name) +TDERadioButton::TDERadioButton(const TQString& txt, TQWidget *parent, const char *name) : TQRadioButton(txt,parent,name) { setCursor(KCursor::handCursor()); @@ -158,7 +158,7 @@ void KMWBackend::addBackend(int ID, const TQString& txt, bool on, const TQString } else { - KRadioButton *btn = new KRadioButton(txt, this); + TDERadioButton *btn = new TDERadioButton(txt, this); btn->setEnabled(on); if ( !whatsThis.isEmpty() ) TQWhatsThis::add( btn, whatsThis ); diff --git a/tdeprint/management/kmwclass.cpp b/tdeprint/management/kmwclass.cpp index a87388a6f..cadddf5d0 100644 --- a/tdeprint/management/kmwclass.cpp +++ b/tdeprint/management/kmwclass.cpp @@ -37,9 +37,9 @@ KMWClass::KMWClass(TQWidget *parent, const char *name) m_title = i18n("Class Composition"); m_nextpage = KMWizard::Name; - m_list1 = new KListBox(this); + m_list1 = new TDEListBox(this); m_list1->setSelectionMode(TQListBox::Extended); - m_list2 = new KListBox(this); + m_list2 = new TDEListBox(this); m_list2->setSelectionMode(TQListBox::Extended); TQToolButton *add = new TQToolButton(this); diff --git a/tdeprint/management/kmwclass.h b/tdeprint/management/kmwclass.h index c9b63befb..a74f20117 100644 --- a/tdeprint/management/kmwclass.h +++ b/tdeprint/management/kmwclass.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListBox; +class TDEListBox; class KMWClass : public KMWizardPage { @@ -40,7 +40,7 @@ protected slots: void slotRemove(); private: - KListBox *m_list1, *m_list2; + TDEListBox *m_list1, *m_list2; }; #endif diff --git a/tdeprint/management/kmwdriverselect.cpp b/tdeprint/management/kmwdriverselect.cpp index 88b9410d5..94bf7d02e 100644 --- a/tdeprint/management/kmwdriverselect.cpp +++ b/tdeprint/management/kmwdriverselect.cpp @@ -38,7 +38,7 @@ KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name) m_nextpage = KMWizard::DriverTest; m_entries = NULL; - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQLabel *l1 = new TQLabel(this); l1->setText(i18n("

      Several drivers have been detected for this model. Select the driver " "you want to use. You will have the opportunity to test it as well as to " diff --git a/tdeprint/management/kmwdriverselect.h b/tdeprint/management/kmwdriverselect.h index 464a78239..9c78008c1 100644 --- a/tdeprint/management/kmwdriverselect.h +++ b/tdeprint/management/kmwdriverselect.h @@ -23,7 +23,7 @@ #include "kmwizardpage.h" #include "kmdbentry.h" -class KListBox; +class TDEListBox; class TQPushButton; class KMWDriverSelect : public KMWizardPage @@ -40,7 +40,7 @@ protected slots: void slotDriverComment(); private: - KListBox *m_list; + TDEListBox *m_list; KMDBEntryList *m_entries; TQPushButton *m_drivercomment; }; diff --git a/tdeprint/management/kmwlocal.cpp b/tdeprint/management/kmwlocal.cpp index 7b56b2deb..624e87a44 100644 --- a/tdeprint/management/kmwlocal.cpp +++ b/tdeprint/management/kmwlocal.cpp @@ -41,7 +41,7 @@ KMWLocal::KMWLocal(TQWidget *parent, const char *name) m_initialized = false; m_block = false; - m_ports = new KListView(this); + m_ports = new TDEListView(this); m_ports->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_ports->setLineWidth(1); m_ports->header()->hide(); diff --git a/tdeprint/management/kmwlocal.h b/tdeprint/management/kmwlocal.h index 681d94e51..e65128747 100644 --- a/tdeprint/management/kmwlocal.h +++ b/tdeprint/management/kmwlocal.h @@ -25,7 +25,7 @@ #include class TQLineEdit; -class KListView; +class TDEListView; class TQListViewItem; class KMWLocal : public KMWizardPage @@ -47,7 +47,7 @@ protected: TQListViewItem* lookForItem( const TQString& ); protected: - KListView *m_ports; + TDEListView *m_ports; TQLineEdit *m_localuri; TQStringList m_uris; TQListViewItem *m_parents[4]; diff --git a/tdeprint/management/kmwsocket.cpp b/tdeprint/management/kmwsocket.cpp index ca5defde4..71a70f2e9 100644 --- a/tdeprint/management/kmwsocket.cpp +++ b/tdeprint/management/kmwsocket.cpp @@ -39,7 +39,7 @@ KMWSocket::KMWSocket(TQWidget *parent, const char *name) m_ID = KMWizard::TCP; m_nextpage = KMWizard::Driver; - m_list = new KListView(this); + m_list = new TDEListView(this); m_list->addColumn(""); m_list->header()->hide(); m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); diff --git a/tdeprint/management/kmwsocket.h b/tdeprint/management/kmwsocket.h index 687b52fd4..7489d6ec7 100644 --- a/tdeprint/management/kmwsocket.h +++ b/tdeprint/management/kmwsocket.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListView; +class TDEListView; class TQListViewItem; class TQLineEdit; class NetworkScanner; @@ -43,7 +43,7 @@ protected slots: void slotScanFinished(); private: - KListView *m_list; + TDEListView *m_list; NetworkScanner *m_scanner; TQLineEdit *m_printer, *m_port; }; diff --git a/tdeprint/management/kxmlcommanddlg.cpp b/tdeprint/management/kxmlcommanddlg.cpp index e8e43ba09..df256f082 100644 --- a/tdeprint/management/kxmlcommanddlg.cpp +++ b/tdeprint/management/kxmlcommanddlg.cpp @@ -84,7 +84,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam m_xmlcmd = 0; m_command = new TQLineEdit(this); - m_view = new KListView(this); + m_view = new TDEListView(this); m_view->addColumn(""); m_view->header()->hide(); m_view->setSorting(-1); @@ -137,7 +137,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam TQLabel *m_editlab2 = new TQLabel(i18n("Ma&ximum value:"), w1); m_editlab1->setBuddy(m_edit1); m_editlab2->setBuddy(m_edit2); - m_values = new KListView(w2); + m_values = new TDEListView(w2); m_values->addColumn(i18n("Name")); m_values->addColumn(i18n("Description")); m_values->setAllColumnsShowFocus(true); @@ -841,7 +841,7 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) m_description = new TQLineEdit(topmain); m_idname = new TQLabel(topmain); - m_requirements = new KListView(m_gb2); + m_requirements = new TDEListView(m_gb2); m_requirements->addColumn(""); m_requirements->header()->hide(); m_addreq = new TQToolButton(m_gb2); @@ -850,8 +850,8 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) m_removereq->setIconSet(SmallIconSet("editdelete")); TQPushButton *m_edit = new KPushButton(KGuiItem(i18n("&Edit Command..."), "edit"), topmain); m_mimetype = new TQComboBox(dummy); - m_availablemime = new KListBox(m_gb1); - m_selectedmime = new KListBox(m_gb1); + m_availablemime = new TDEListBox(m_gb1); + m_selectedmime = new TDEListBox(m_gb1); m_addmime = new TQToolButton(m_gb1); m_addmime->setIconSet(TQApplication::reverseLayout()? SmallIconSet("forward") : SmallIconSet("back")); m_removemime = new TQToolButton(m_gb1); diff --git a/tdeprint/management/kxmlcommanddlg.h b/tdeprint/management/kxmlcommanddlg.h index 88e590325..d69c19e62 100644 --- a/tdeprint/management/kxmlcommanddlg.h +++ b/tdeprint/management/kxmlcommanddlg.h @@ -25,13 +25,13 @@ #include #include -class KListView; +class TDEListView; class TQListViewItem; class TQLineEdit; class TQComboBox; class TQWidgetStack; class TQToolButton; -class KListBox; +class TDEListBox; class TQListBoxItem; class TQTextEdit; class TQCheckBox; @@ -74,11 +74,11 @@ protected slots: void slotChanged(); private: - KListView *m_view; + TDEListView *m_view; TQLineEdit *m_name, *m_desc, *m_format, *m_default, *m_command; TQComboBox *m_type; TQWidget *m_dummy; - KListView *m_values; + TDEListView *m_values; TQLineEdit *m_edit1, *m_edit2; TQWidgetStack *m_stack; TQToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down; @@ -115,9 +115,9 @@ private: TQLineEdit *m_description; TQLabel *m_idname; TQComboBox *m_mimetype; - KListBox *m_availablemime, *m_selectedmime; + TDEListBox *m_availablemime, *m_selectedmime; TQToolButton *m_addmime, *m_removemime; - KListView *m_requirements; + TDEListView *m_requirements; TQToolButton *m_removereq, *m_addreq; TQStringList m_mimelist; diff --git a/tdeprint/management/kxmlcommandselector.cpp b/tdeprint/management/kxmlcommandselector.cpp index 093d2a909..67627fb53 100644 --- a/tdeprint/management/kxmlcommandselector.cpp +++ b/tdeprint/management/kxmlcommandselector.cpp @@ -273,7 +273,7 @@ void KXmlCommandSelector::slotXmlCommandToggled( bool on ) void KXmlCommandSelector::slotHelpCommand() { - KPopupFrame *pop = new KPopupFrame( m_helpbtn ); + TDEPopupFrame *pop = new TDEPopupFrame( m_helpbtn ); KActiveLabel *lab = new KActiveLabel( m_help, pop ); lab->resize( lab->sizeHint() ); pop->setMainWidget( lab ); diff --git a/tdeprint/management/pluginaction.cpp b/tdeprint/management/pluginaction.cpp index 0aa3c10a3..377a28217 100644 --- a/tdeprint/management/pluginaction.cpp +++ b/tdeprint/management/pluginaction.cpp @@ -21,7 +21,7 @@ // automatically connect to "pluginActionActived(int)" in the receiver. PluginAction::PluginAction(int ID, const TQString& txt, const TQString& icon, int accel, TQObject *parent, const char *name) -: KAction(txt, icon, accel, parent, name), m_id(ID) +: TDEAction(txt, icon, accel, parent, name), m_id(ID) { connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActivated())); } diff --git a/tdeprint/management/pluginaction.h b/tdeprint/management/pluginaction.h index 0bb368ed2..1d77b71b7 100644 --- a/tdeprint/management/pluginaction.h +++ b/tdeprint/management/pluginaction.h @@ -22,7 +22,7 @@ #include -class TDEPRINT_EXPORT PluginAction : public KAction +class TDEPRINT_EXPORT PluginAction : public TDEAction { Q_OBJECT diff --git a/tdeprint/management/smbview.cpp b/tdeprint/management/smbview.cpp index c5b40f942..10ac359f9 100644 --- a/tdeprint/management/smbview.cpp +++ b/tdeprint/management/smbview.cpp @@ -38,7 +38,7 @@ //********************************************************************************************* SmbView::SmbView(TQWidget *parent, const char *name) -: KListView(parent,name) +: TDEListView(parent,name) { addColumn(i18n("Printer")); addColumn(i18n("Comment")); diff --git a/tdeprint/management/smbview.h b/tdeprint/management/smbview.h index 9b571f4dd..2226fd705 100644 --- a/tdeprint/management/smbview.h +++ b/tdeprint/management/smbview.h @@ -25,7 +25,7 @@ class TDEProcess; class KTempFile; -class SmbView : public KListView +class SmbView : public TDEListView { Q_OBJECT public: diff --git a/tdeprint/rlpr/kmwrlpr.cpp b/tdeprint/rlpr/kmwrlpr.cpp index 15ad88ec2..dc12da040 100644 --- a/tdeprint/rlpr/kmwrlpr.cpp +++ b/tdeprint/rlpr/kmwrlpr.cpp @@ -50,7 +50,7 @@ KMWRlpr::KMWRlpr(TQWidget *parent, const char *name) m_title = i18n("Remote LPD Queue Settings"); m_nextpage = KMWizard::Name; - m_view = new KListView(this); + m_view = new TDEListView(this); m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_view->setLineWidth(1); m_view->addColumn(TQString::fromLatin1("")); diff --git a/tdeprint/rlpr/kmwrlpr.h b/tdeprint/rlpr/kmwrlpr.h index 7c1aa74f2..dc375303d 100644 --- a/tdeprint/rlpr/kmwrlpr.h +++ b/tdeprint/rlpr/kmwrlpr.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListView; +class TDEListView; class TQLineEdit; class TQListViewItem; @@ -43,7 +43,7 @@ protected: void initialize(); private: - KListView *m_view; + TDEListView *m_view; TQLineEdit *m_host, *m_queue; }; diff --git a/tdeprint/tdefilelist.cpp b/tdeprint/tdefilelist.cpp index 9d02b77f6..b365c1fb6 100644 --- a/tdeprint/tdefilelist.cpp +++ b/tdeprint/tdefilelist.cpp @@ -97,7 +97,7 @@ KFileList::KFileList(TQWidget *parent, const char *name) m_block = false; - m_files = new KListView(this); + m_files = new TDEListView(this); m_files->addColumn(i18n("Name")); m_files->addColumn(i18n("Type")); m_files->addColumn(i18n("Path")); diff --git a/tdeprint/tdefilelist.h b/tdeprint/tdefilelist.h index 9b376a15a..912abd07a 100644 --- a/tdeprint/tdefilelist.h +++ b/tdeprint/tdefilelist.h @@ -24,7 +24,7 @@ #include #include -class KListView; +class TDEListView; class TQToolButton; class TQListViewItem; @@ -54,7 +54,7 @@ protected: void selection(TQPtrList&); private: - KListView *m_files; + TDEListView *m_files; TQToolButton *m_add, *m_remove, *m_open, *m_up, *m_down; bool m_block; }; diff --git a/tdeprint/tests/helpwindow.cpp b/tdeprint/tests/helpwindow.cpp index 9f92734f4..aedb9e2b8 100644 --- a/tdeprint/tests/helpwindow.cpp +++ b/tdeprint/tests/helpwindow.cpp @@ -39,7 +39,7 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, TQWidget* parent, const char *name ) - : KMainWindow( parent, name, WDestructiveClose ), + : TDEMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() { readHistory(); diff --git a/tdeprint/tests/helpwindow.h b/tdeprint/tests/helpwindow.h index c444b8144..d32f2f773 100644 --- a/tdeprint/tests/helpwindow.h +++ b/tdeprint/tests/helpwindow.h @@ -20,7 +20,7 @@ class TQComboBox; class TQPopupMenu; -class HelpWindow : public KMainWindow +class HelpWindow : public TDEMainWindow { Q_OBJECT public: diff --git a/tderesources/configpage.cpp b/tderesources/configpage.cpp index 0660710db..3465562fb 100644 --- a/tderesources/configpage.cpp +++ b/tderesources/configpage.cpp @@ -113,7 +113,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name ) mFamilyCombo = new KComboBox( false, groupBox ); groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 ); - mListView = new KListView( groupBox ); + mListView = new TDEListView( groupBox ); mListView->setAllColumnsShowFocus( true ); mListView->setFullWidth( true ); mListView->addColumn( i18n( "Name" ) ); diff --git a/tderesources/configpage.h b/tderesources/configpage.h index 5f3819c0f..789735d5e 100644 --- a/tderesources/configpage.h +++ b/tderesources/configpage.h @@ -30,7 +30,7 @@ #include "manager.h" class KComboBox; -class KListView; +class TDEListView; class TQListViewItem; class TQPushButton; @@ -96,7 +96,7 @@ class TDERESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver > mInfoMap; KComboBox* mFamilyCombo; - KListView* mListView; + TDEListView* mListView; TQPushButton* mAddButton; TQPushButton* mRemoveButton; TQPushButton* mEditButton; diff --git a/tderesources/selectdialog.cpp b/tderesources/selectdialog.cpp index e505140a6..c9355a86c 100644 --- a/tderesources/selectdialog.cpp +++ b/tderesources/selectdialog.cpp @@ -48,7 +48,7 @@ SelectDialog::SelectDialog( TQPtrList list, TQWidget *parent, TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); groupBox->setTitle( i18n( "Resources" ) ); - mResourceId = new KListBox( groupBox ); + mResourceId = new TDEListBox( groupBox ); mainLayout->addWidget( groupBox ); diff --git a/tderesources/selectdialog.h b/tderesources/selectdialog.h index e982b7282..0e8ca5153 100644 --- a/tderesources/selectdialog.h +++ b/tderesources/selectdialog.h @@ -30,7 +30,7 @@ #include -class KListBox; +class TDEListBox; namespace KRES { @@ -77,7 +77,7 @@ class TDERESOURCES_EXPORT SelectDialog : KDialog static Resource *getResource( TQPtrList list, TQWidget *parent = 0 ); private: - KListBox *mResourceId; + TDEListBox *mResourceId; TQMap mResourceMap; }; diff --git a/tdersync/tdersync.h b/tdersync/tdersync.h index 1e11cb959..03d7c6190 100644 --- a/tdersync/tdersync.h +++ b/tdersync/tdersync.h @@ -72,7 +72,7 @@ #include #include -class KActionMenu; +class TDEActionMenu; class KonqDirPart; class KLineEdit; class RsyncConfigDialog; diff --git a/tdeui/AUTHORS b/tdeui/AUTHORS index 61087b1f0..511733bba 100644 --- a/tdeui/AUTHORS +++ b/tdeui/AUTHORS @@ -27,17 +27,17 @@ DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda Read and write numerical config entries, KPanner, KTabControl, -KPopupMenu, KMessageBox, KEdit widgets. +TDEPopupMenu, KMessageBox, KEdit widgets. Martin Jones -Bugfixes in KPixmap and KURL, KColorDialog, KSelector +Bugfixes in KPixmap and KURL, KColorDialog, TDESelector KColorButton Keith Brown KTreeList class Bernd Johannes Wuebben -KFontDialog class +TDEFontDialog class Tim D. Gilman KDatePicker, KDateTable class @@ -49,7 +49,7 @@ Christoph Neerfeld KIconLoader class Sven Radej -KLineEdit, KCombo, KToolbar, KStatusBar +KLineEdit, KCombo, TDEToolbar, KStatusBar Rainer Bawidamann Rubberbanding in KTreeList @@ -65,7 +65,7 @@ KWMModuleApplication, tearing/docking of ktoolbar and kmenubar, heavy modifications to kbutton Stephan Kulow -first versions of KTopLevelWidget and KToolBar, heavy modifications to +first versions of KTopLevelWidget and TDEToolBar, heavy modifications to automake and autoconf Joerg Habenicht @@ -93,5 +93,5 @@ Falk Brettschneider contributes for the Dockwidget class set Holger Freyther -KDialogBase, KGuiItem, KStdGuiItem, KAction, +KDialogBase, KGuiItem, KStdGuiItem, TDEAction, added KMessageBox::questionYesNoCancel( ) diff --git a/tdeui/Mainpage.dox b/tdeui/Mainpage.dox index 778c962f1..cf656363e 100644 --- a/tdeui/Mainpage.dox +++ b/tdeui/Mainpage.dox @@ -13,7 +13,7 @@ * certainly link to libtdeui. * * Most applications with single or multiple toplevel widgets -* should use the KMainWindow class in this library, which +* should use the TDEMainWindow class in this library, which * automatically provides features like session management and simplified * toolbar/menubar/statusbar creation. * diff --git a/tdeui/TODO.xmlgui b/tdeui/TODO.xmlgui index 3c3d4f8a4..0c0753685 100644 --- a/tdeui/TODO.xmlgui +++ b/tdeui/TODO.xmlgui @@ -4,15 +4,15 @@ When removing an xmlgui-client involves destroying toolbars, we need to save the whole set of toolbar positions of the mainwindow, into the xmlgui-client. Data structure: -struct KToolBarPos { +struct TDEToolBarPos { short int index; short int offset; bool newLine; }; -typedef QValueVector KToolBarPosList; +typedef QValueVector TDEToolBarPosList; API: -KToolBarPosList KMainWindow::toolBarPositionList() const; +TDEToolBarPosList TDEMainWindow::toolBarPositionList() const; The remaining problem is to know when to call it: * when we know in advance that we'll be able to remove toolbars? @@ -74,7 +74,7 @@ which would forward the action() and domElement() calls - because a client can be in only one factory at a time. This custom builder needs to know about action plugging too, we don't really want -to call KAction::plug here. So this would be 'virtualized' (new virtual, in a new +to call TDEAction::plug here. So this would be 'virtualized' (new virtual, in a new interface to keep BC, that by default calls plug, but does something else in kedittoolbar's builder). diff --git a/tdeui/kaboutapplication.h b/tdeui/kaboutapplication.h index 7fe088d02..487ef5a20 100644 --- a/tdeui/kaboutapplication.h +++ b/tdeui/kaboutapplication.h @@ -34,9 +34,9 @@ * TDEAboutData that is specified at the start of your program in * main(). Normally you should not use this class directly but rather * the KHelpMenu class or even better just subclass your toplevel - * window from KMainWindow. If you do the latter, the help menu and + * window from TDEMainWindow. If you do the latter, the help menu and * thereby this dialog box is available through the - * KMainWindow::helpMenu() function. + * TDEMainWindow::helpMenu() function. * * @author Waldo Bastian (bastian@kde.org) and Espen Sand (espen@kde.org) */ diff --git a/tdeui/kaboutkde.h b/tdeui/kaboutkde.h index 017d0f220..e2fce6f28 100644 --- a/tdeui/kaboutkde.h +++ b/tdeui/kaboutkde.h @@ -30,9 +30,9 @@ * This class provides the standard "About KDE" dialog box that is used * KHelpMenu Normally you should not use this class directly but * rather the KHelpMenu class or even better just subclass your - * toplevel window from KMainWindow. If you do the latter, the help + * toplevel window from TDEMainWindow. If you do the latter, the help * menu and thereby this dialog box is available through the - * KMainWindow::helpMenu() function. + * TDEMainWindow::helpMenu() function. * * @author Espen Sand (espen@kde.org) */ diff --git a/tdeui/kaccelgen.h b/tdeui/kaccelgen.h index 222d948ba..d1e761876 100644 --- a/tdeui/kaccelgen.h +++ b/tdeui/kaccelgen.h @@ -77,7 +77,7 @@ * + Add more Deref classes so that we can access a wider variety of * collections. * */ -namespace KAccelGen +namespace TDEAccelGen { // HELPERS @@ -274,7 +274,7 @@ generateFromKeys(const TQMap& source, TQStringList& target) } -} // end namespace KAccelGen +} // end namespace TDEAccelGen #endif diff --git a/tdeui/kaction.cpp b/tdeui/kaction.cpp index 6fad7d34b..24a940c2f 100644 --- a/tdeui/kaction.cpp +++ b/tdeui/kaction.cpp @@ -54,52 +54,52 @@ /** * How it works. -* KActionCollection is an organizing container for KActions. -* KActionCollection keeps track of the information necessary to handle +* TDEActionCollection is an organizing container for TDEActions. +* TDEActionCollection keeps track of the information necessary to handle * configuration and shortcuts. * * Focus Widget pointer: * This is the widget which is the focus for action shortcuts. -* It is set either by passing a TQWidget* to the KActionCollection constructor +* It is set either by passing a TQWidget* to the TDEActionCollection constructor * or by calling setWidget() if the widget wasn't known when the object was * initially constructed (as in KXMLGUIClient and KParts::PartBase) * * Shortcuts: * An action's shortcut will not not be connected unless a focus widget has -* been specified in KActionCollection. +* been specified in TDEActionCollection. * * XML Filename: * This is used to save user-modified settings back to the *ui.rc file. * It is set by KXMLGUIFactory. */ -int KAction::getToolButtonID() +int TDEAction::getToolButtonID() { static int toolbutton_no = -2; return toolbutton_no--; } //--------------------------------------------------------------------- -// KAction::KActionPrivate +// TDEAction::TDEActionPrivate //--------------------------------------------------------------------- -class KAction::KActionPrivate : public KGuiItem +class TDEAction::TDEActionPrivate : public KGuiItem { public: - KActionPrivate() : KGuiItem() + TDEActionPrivate() : KGuiItem() { m_kaccel = 0; m_configurable = true; } - KAccel *m_kaccel; - TQValueList m_kaccelList; + TDEAccel *m_kaccel; + TQValueList m_kaccelList; TQString m_groupText; TQString m_group; - KShortcut m_cut; - KShortcut m_cutDefault; + TDEShortcut m_cut; + TDEShortcut m_cutDefault; bool m_configurable; @@ -117,39 +117,39 @@ public: }; //--------------------------------------------------------------------- -// KAction +// TDEAction //--------------------------------------------------------------------- -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const TQString& text, const TQString& sIconName, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& sIconName, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconName( sIconName ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconSet( pix ); } -KAction::KAction( const KGuiItem& item, const KShortcut& cut, +TDEAction::TDEAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( item.text(), cut, receiver, slot ); if( item.hasIcon() ) @@ -159,69 +159,69 @@ KAction::KAction( const KGuiItem& item, const KShortcut& cut, } #ifndef KDE_NO_COMPAT // KDE 4: remove -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); } -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); setIconSet( pix ); } -KAction::KAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); d->setIconName( pix ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); setIconSet( pix ); } -KAction::KAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconName(pix); } -KAction::KAction( TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) +TDEAction::TDEAction( TQObject* parent, const char* name ) + : TQObject( parent, name ), d(new TDEActionPrivate) { - initPrivate( TQString::null, KShortcut(), 0, 0 ); + initPrivate( TQString::null, TDEShortcut(), 0, 0 ); } #endif // KDE 4: remove end -KAction::~KAction() +TDEAction::~TDEAction() { - kdDebug(129) << "KAction::~KAction( this = \"" << name() << "\" )" << endl; // -- ellis + kdDebug(129) << "TDEAction::~TDEAction( this = \"" << name() << "\" )" << endl; // -- ellis #ifndef KDE_NO_COMPAT if (d->m_kaccel) unplugAccel(); @@ -231,9 +231,9 @@ KAction::~KAction() if ( m_parentCollection ) { m_parentCollection->take( this ); - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); for (; itr != itrEnd; ++itr ) @@ -242,7 +242,7 @@ KAction::~KAction() } // Do not call unplugAll from here, as tempting as it sounds. - // KAction is designed around the idea that you need to plug + // TDEAction is designed around the idea that you need to plug // _and_ to unplug it "manually". Unplugging leads to an important // slowdown when e.g. closing the window, in which case we simply // want to destroy everything asap, not to remove actions one by one @@ -251,13 +251,13 @@ KAction::~KAction() delete d; } -void KAction::initPrivate( const TQString& text, const KShortcut& cut, +void TDEAction::initPrivate( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot ) { d->m_cutDefault = cut; - m_parentCollection = tqt_dynamic_cast( parent() ); - kdDebug(129) << "KAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; + m_parentCollection = tqt_dynamic_cast( parent() ); + kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; if ( m_parentCollection ) m_parentCollection->insert( this ); @@ -265,28 +265,28 @@ void KAction::initPrivate( const TQString& text, const KShortcut& cut, connect( this, TQT_SIGNAL( activated() ), receiver, slot ); if( !cut.isNull() && !qstrcmp( name(), "unnamed" ) ) - kdWarning(129) << "KAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; + kdWarning(129) << "TDEAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; d->setText( text ); initShortcut( cut ); } -bool KAction::isPlugged() const +bool TDEAction::isPlugged() const { return (!d->m_containers.empty()) || d->m_kaccel; } -bool KAction::isPlugged( const TQWidget *container ) const +bool TDEAction::isPlugged( const TQWidget *container ) const { return findContainer( container ) > -1; } -bool KAction::isPlugged( const TQWidget *container, int id ) const +bool TDEAction::isPlugged( const TQWidget *container, int id ) const { int i = findContainer( container ); return ( i > -1 && itemId( i ) == id ); } -bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const +bool TDEAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const { int i = findContainer( container ); return ( i > -1 && representative( i ) == _representative ); @@ -295,8 +295,8 @@ bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representat /* Three actionCollection conditions: - 1) Scope is known on creation and KAccel object is created (e.g. KMainWindow) - 2) Scope is unknown and no KAccel object is available (e.g. KXMLGUIClient) + 1) Scope is known on creation and TDEAccel object is created (e.g. TDEMainWindow) + 2) Scope is unknown and no TDEAccel object is available (e.g. KXMLGUIClient) a) addClient() will be called on object b) we just want to add the actions to another KXMLGUIClient object @@ -310,7 +310,7 @@ Undo and Redo should be available in both KoView objects, and calling the undo->setEnabled() should affect both KoViews When addClient is called, it needs to be able to find the undo and redo actions -When it calls plug() on them, they need to be inserted into the KAccel object of the appropriate KoView +When it calls plug() on them, they need to be inserted into the TDEAccel object of the appropriate KoView In this case, the actionCollection belongs to KoDoc and we need to let it know that its shortcuts have the same scope as the KoView actionCollection @@ -325,9 +325,9 @@ View add document actionCollection as sub-collection A parentCollection is created -Scenario 1: parentCollection has a focus widget set (e.g. via KMainWindow) - A KAccel object is created in the parentCollection - A KAction is created with parent=parentCollection +Scenario 1: parentCollection has a focus widget set (e.g. via TDEMainWindow) + A TDEAccel object is created in the parentCollection + A TDEAction is created with parent=parentCollection The shortcut is inserted into this actionCollection Scenario 1a: xml isn't used done @@ -335,13 +335,13 @@ Scenario 1: parentCollection has a focus widget set (e.g. via KMainWindow) setWidget is called -- ignore shortcuts are set Scenario 2: parentCollection has no focus widget (e.g., KParts) - A KAction is created with parent=parentCollection + A TDEAction is created with parent=parentCollection Scenario 2a: xml isn't used no shortcuts Scenario 2b: KXMLGUIBuilder::addClient() called setWidget is called - shortcuts are inserted into current KAccel - shortcuts are set in all other KAccels, if the action is present in the other KAccels + shortcuts are inserted into current TDEAccel + shortcuts are set in all other TDEAccels, if the action is present in the other TDEAccels */ /* @@ -352,21 +352,21 @@ shortcut may be set: - on plugAccel (deprecated) On Construction: [via initShortcut()] - insert into KAccel of m_parentCollection, + insert into TDEAccel of m_parentCollection, if kaccel() && isAutoConnectShortcuts() exists On Plug: [via plug() -> plugShortcut()] - insert into KAccel of m_parentCollection, if exists and not already inserted into + insert into TDEAccel of m_parentCollection, if exists and not already inserted into On Read XML: [via setShortcut()] - set in all current KAccels - insert into KAccel of m_parentCollection, if exists and not already inserted into + set in all current TDEAccels + insert into TDEAccel of m_parentCollection, if exists and not already inserted into */ -KAccel* KAction::kaccelCurrent() +TDEAccel* TDEAction::kaccelCurrent() { - if( m_parentCollection && m_parentCollection->builderKAccel() ) - return m_parentCollection->builderKAccel(); + if( m_parentCollection && m_parentCollection->builderTDEAccel() ) + return m_parentCollection->builderTDEAccel(); else if( m_parentCollection && m_parentCollection->kaccel() ) return m_parentCollection->kaccel(); else @@ -374,55 +374,55 @@ KAccel* KAction::kaccelCurrent() } // Only to be called from initPrivate() -bool KAction::initShortcut( const KShortcut& cut ) +bool TDEAction::initShortcut( const TDEShortcut& cut ) { d->m_cut = cut; - // Only insert action into KAccel if it has a valid name, + // Only insert action into TDEAccel if it has a valid name, if( qstrcmp( name(), "unnamed" ) && m_parentCollection && m_parentCollection->isAutoConnectShortcuts() && m_parentCollection->kaccel() ) { - insertKAccel( m_parentCollection->kaccel() ); + insertTDEAccel( m_parentCollection->kaccel() ); return true; } return false; } // Only to be called from plug() -void KAction::plugShortcut() +void TDEAction::plugShortcut() { - KAccel* const kaccel = kaccelCurrent(); + TDEAccel* const kaccel = kaccelCurrent(); - //kdDebug(129) << "KAction::plugShortcut(): this = " << this << " kaccel() = " << (m_parentCollection ? m_parentCollection->kaccel() : 0) << endl; + //kdDebug(129) << "TDEAction::plugShortcut(): this = " << this << " kaccel() = " << (m_parentCollection ? m_parentCollection->kaccel() : 0) << endl; if( kaccel && qstrcmp( name(), "unnamed" ) ) { - // Check if already plugged into current KAccel object - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + // Check if already plugged into current TDEAccel object + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); for( ; itr != itrEnd; ++itr) { if( (*itr) == kaccel ) return; } - insertKAccel( kaccel ); + insertTDEAccel( kaccel ); } } -bool KAction::setShortcut( const KShortcut& cut ) +bool TDEAction::setShortcut( const TDEShortcut& cut ) { bool bChanged = (d->m_cut != cut); d->m_cut = cut; - KAccel* const kaccel = kaccelCurrent(); + TDEAccel* const kaccel = kaccelCurrent(); bool bInsertRequired = true; - // Apply new shortcut to all existing KAccel objects + // Apply new shortcut to all existing TDEAccel objects - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); for( ; itr != itrEnd; ++itr) { // Check whether shortcut has already been plugged into @@ -430,12 +430,12 @@ bool KAction::setShortcut( const KShortcut& cut ) if( (*itr) == kaccel ) bInsertRequired = false; if( bChanged ) - updateKAccelShortcut( *itr ); + updateTDEAccelShortcut( *itr ); } - // Only insert action into KAccel if it has a valid name, + // Only insert action into TDEAccel if it has a valid name, if( kaccel && bInsertRequired && qstrcmp( name(), "unnamed" ) ) - insertKAccel( kaccel ); + insertTDEAccel( kaccel ); if( bChanged ) { #ifndef KDE_NO_COMPAT // KDE 4: remove @@ -449,10 +449,10 @@ bool KAction::setShortcut( const KShortcut& cut ) return true; } -bool KAction::updateKAccelShortcut( KAccel* kaccel ) +bool TDEAction::updateTDEAccelShortcut( TDEAccel* kaccel ) { // Check if action is permitted - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return false; bool b = true; @@ -472,25 +472,25 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel ) return b; } -void KAction::insertKAccel( KAccel* kaccel ) +void TDEAction::insertTDEAccel( TDEAccel* kaccel ) { - //kdDebug(129) << "KAction::insertKAccel( " << kaccel << " ): this = " << this << endl; + //kdDebug(129) << "TDEAction::insertTDEAccel( " << kaccel << " ): this = " << this << endl; if ( !kaccel->actions().actionPtr( name() ) ) { - if( updateKAccelShortcut( kaccel ) ) { + if( updateTDEAccelShortcut( kaccel ) ) { d->m_kaccelList.append( kaccel ); connect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); } } else - kdWarning(129) << "KAction::insertKAccel( kaccel = " << kaccel << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis + kdWarning(129) << "TDEAction::insertTDEAccel( kaccel = " << kaccel << " ): TDEAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis } -void KAction::removeKAccel( KAccel* kaccel ) +void TDEAction::removeTDEAccel( TDEAccel* kaccel ) { - //kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl; - TQValueList & accelList = d->m_kaccelList; - TQValueList::iterator itr = accelList.begin(); - const TQValueList::iterator itrEnd = accelList.end(); + //kdDebug(129) << "TDEAction::removeTDEAccel( " << i << " ): this = " << this << endl; + TQValueList & accelList = d->m_kaccelList; + TQValueList::iterator itr = accelList.begin(); + const TQValueList::iterator itrEnd = accelList.end(); for( ; itr != itrEnd; ++itr) { if( (*itr) == kaccel ) { @@ -504,13 +504,13 @@ void KAction::removeKAccel( KAccel* kaccel ) #ifndef KDE_NO_COMPAT // KDE 4: remove -void KAction::setAccel( int keyQt ) +void TDEAction::setAccel( int keyQt ) { - setShortcut( KShortcut(keyQt) ); + setShortcut( TDEShortcut(keyQt) ); } #endif // KDE 4: remove end -void KAction::updateShortcut( int i ) +void TDEAction::updateShortcut( int i ) { int id = itemId( i ); @@ -523,10 +523,10 @@ void KAction::updateShortcut( int i ) static_cast(w)->setAccel( d->m_cut.keyCodeQt(), id ); } -void KAction::updateShortcut( TQPopupMenu* menu, int id ) +void TDEAction::updateShortcut( TQPopupMenu* menu, int id ) { - //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; - // If the action has a KAccel object, + //kdDebug(129) << "TDEAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; + // If the action has a TDEAccel object, // show the string representation of its shortcut. if ( d->m_kaccel || d->m_kaccelList.count() ) { TQString s = menu->text( id ); @@ -540,41 +540,41 @@ void KAction::updateShortcut( TQPopupMenu* menu, int id ) } // Otherwise insert the shortcut itself into the popup menu. else { - // This is a fall-hack in case the KAction is missing a proper parent collection. + // This is a fall-hack in case the TDEAction is missing a proper parent collection. // It should be removed eventually. --ellis menu->setAccel( d->m_cut.keyCodeQt(), id ); - kdDebug(129) << "KAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No KAccel, probably missing a parent collection." << endl; + kdDebug(129) << "TDEAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No TDEAccel, probably missing a parent collection." << endl; } } -const KShortcut& KAction::shortcut() const +const TDEShortcut& TDEAction::shortcut() const { return d->m_cut; } -const KShortcut& KAction::shortcutDefault() const +const TDEShortcut& TDEAction::shortcutDefault() const { return d->m_cutDefault; } -TQString KAction::shortcutText() const +TQString TDEAction::shortcutText() const { return d->m_cut.toStringInternal(); } -void KAction::setShortcutText( const TQString& s ) +void TDEAction::setShortcutText( const TQString& s ) { - setShortcut( KShortcut(s) ); + setShortcut( TDEShortcut(s) ); } #ifndef KDE_NO_COMPAT // Remove in KDE 4 -int KAction::accel() const +int TDEAction::accel() const { return d->m_cut.keyCodeQt(); } #endif -void KAction::setGroup( const TQString& grp ) +void TDEAction::setGroup( const TQString& grp ) { d->m_group = grp; @@ -583,27 +583,27 @@ void KAction::setGroup( const TQString& grp ) updateGroup( i ); } -void KAction::updateGroup( int ) +void TDEAction::updateGroup( int ) { // DO SOMETHING } -TQString KAction::group() const +TQString TDEAction::group() const { return d->m_group; } -bool KAction::isEnabled() const +bool TDEAction::isEnabled() const { return d->isEnabled(); } -bool KAction::isShortcutConfigurable() const +bool TDEAction::isShortcutConfigurable() const { return d->m_configurable; } -void KAction::setToolTip( const TQString& tt ) +void TDEAction::setToolTip( const TQString& tt ) { d->setToolTip( tt ); @@ -612,39 +612,39 @@ void KAction::setToolTip( const TQString& tt ) updateToolTip( i ); } -void KAction::updateToolTip( int i ) +void TDEAction::updateToolTip( int i ) { TQWidget *w = container( i ); - if ( ::tqqt_cast( w ) ) - TQToolTip::add( static_cast(w)->getWidget( itemId( i ) ), d->toolTip() ); + if ( ::tqqt_cast( w ) ) + TQToolTip::add( static_cast(w)->getWidget( itemId( i ) ), d->toolTip() ); } -TQString KAction::toolTip() const +TQString TDEAction::toolTip() const { return d->toolTip(); } -int KAction::plug( TQWidget *w, int index ) +int TDEAction::plug( TQWidget *w, int index ) { - //kdDebug(129) << "KAction::plug( " << w << ", " << index << " )" << endl; + //kdDebug(129) << "TDEAction::plug( " << w << ", " << index << " )" << endl; if (!w ) { - kdWarning(129) << "KAction::plug called with 0 argument\n"; + kdWarning(129) << "TDEAction::plug called with 0 argument\n"; return -1; } - // Ellis: print warning if there is a shortcut, but no KAccel available (often due to no widget available in the actioncollection) + // Ellis: print warning if there is a shortcut, but no TDEAccel available (often due to no widget available in the actioncollection) // David: Well, it doesn't matter much, things still work (e.g. Undo in koffice) via TQAccel. - // We should probably re-enable the warning for things that only KAccel can do, though - e.g. WIN key (mapped to Meta). + // We should probably re-enable the warning for things that only TDEAccel can do, though - e.g. WIN key (mapped to Meta). #if 0 //ndef NDEBUG - KAccel* kaccel = kaccelCurrent(); + TDEAccel* kaccel = kaccelCurrent(); if( !d->m_cut.isNull() && !kaccel ) { - kdDebug(129) << "KAction::plug(): has no KAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis + kdDebug(129) << "TDEAction::plug(): has no TDEAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis } #endif // Check if action is permitted - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; plugShortcut(); @@ -653,7 +653,7 @@ int KAction::plug( TQWidget *w, int index ) { TQPopupMenu* menu = static_cast( w ); int id; - // Don't insert shortcut into menu if it's already in a KAccel object. + // Don't insert shortcut into menu if it's already in a TDEAccel object. int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt(); if ( d->hasIcon() ) @@ -672,7 +672,7 @@ int KAction::plug( TQWidget *w, int index ) TQT_SLOT( slotPopupActivated() ), keyQt, -1, index ); - // If the shortcut is already in a KAccel object, then + // If the shortcut is already in a TDEAccel object, then // we need to set the menu item's shortcut text. if ( d->m_kaccelList.count() || d->m_kaccel ) updateShortcut( menu, id ); @@ -693,9 +693,9 @@ int KAction::plug( TQWidget *w, int index ) return d->m_containers.count() - 1; } - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - KToolBar *bar = static_cast( w ); + TDEToolBar *bar = static_cast( w ); int id_ = getToolButtonID(); TDEInstance *instance; @@ -720,7 +720,7 @@ int KAction::plug( TQWidget *w, int index ) d->isEnabled(), d->plainText(), index, instance ); } - KToolBarButton* ktb = bar->getButton(id_); + TDEToolBarButton* ktb = bar->getButton(id_); ktb->setName( TQCString("toolbutton_")+name() ); if ( !d->whatsThis().isEmpty() ) @@ -742,7 +742,7 @@ int KAction::plug( TQWidget *w, int index ) return -1; } -void KAction::unplug( TQWidget *w ) +void TDEAction::unplug( TQWidget *w ) { int i = findContainer( w ); if ( i == -1 ) @@ -754,9 +754,9 @@ void KAction::unplug( TQWidget *w ) TQPopupMenu *menu = static_cast( w ); menu->removeItem( id ); } - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - KToolBar *bar = static_cast( w ); + TDEToolBar *bar = static_cast( w ); bar->removeItemDelayed( id ); } else if ( ::tqqt_cast( w ) ) @@ -770,11 +770,11 @@ void KAction::unplug( TQWidget *w ) m_parentCollection->disconnectHighlight( w, this ); } -void KAction::plugAccel(KAccel *kacc, bool configurable) +void TDEAction::plugAccel(TDEAccel *kacc, bool configurable) { - kdWarning(129) << "KAction::plugAccel(): call to deprecated action." << endl; + kdWarning(129) << "TDEAction::plugAccel(): call to deprecated action." << endl; kdDebug(129) << kdBacktrace() << endl; - //kdDebug(129) << "KAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; + //kdDebug(129) << "TDEAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; if ( d->m_kaccel ) unplugAccel(); @@ -782,25 +782,25 @@ void KAction::plugAccel(KAccel *kacc, bool configurable) //if ( m_parentCollection && !m_parentCollection->accel() ) // m_parentCollection->setAccel( kacc ); - // We can only plug this action into the given KAccel object + // We can only plug this action into the given TDEAccel object // if it does not already contain an action with the same name. if ( !kacc->actions().actionPtr(name()) ) { d->m_kaccel = kacc; d->m_kaccel->insert(name(), d->plainText(), TQString::null, - KShortcut(d->m_cut), + TDEShortcut(d->m_cut), this, TQT_SLOT(slotActivated()), configurable, isEnabled()); connect(d->m_kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed())); //connect(d->m_kaccel, TQT_SIGNAL(keycodeChanged()), this, TQT_SLOT(slotKeycodeChanged())); } else - kdWarning(129) << "KAction::plugAccel( kacc = " << kacc << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis + kdWarning(129) << "TDEAction::plugAccel( kacc = " << kacc << " ): TDEAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis } -void KAction::unplugAccel() +void TDEAction::unplugAccel() { - //kdDebug(129) << "KAction::unplugAccel() " << this << " " << name() << endl; + //kdDebug(129) << "TDEAction::unplugAccel() " << this << " " << name() << endl; if ( d->m_kaccel ) { d->m_kaccel->remove(name()); @@ -808,7 +808,7 @@ void KAction::unplugAccel() } } -void KAction::plugMainWindowAccel( TQWidget *w ) +void TDEAction::plugMainWindowAccel( TQWidget *w ) { // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; @@ -816,16 +816,16 @@ void KAction::plugMainWindowAccel( TQWidget *w ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - KMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow if (mw) plugAccel( mw->accel() ); else - kdDebug(129) << "KAction::plugMainWindowAccel: Toplevel widget isn't a KMainWindow, can't plug accel. " << tl << endl; + kdDebug(129) << "TDEAction::plugMainWindowAccel: Toplevel widget isn't a TDEMainWindow, can't plug accel. " << tl << endl; } -void KAction::setEnabled(bool enable) +void TDEAction::setEnabled(bool enable) { - //kdDebug(129) << "KAction::setEnabled( " << enable << " ): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; + //kdDebug(129) << "TDEAction::setEnabled( " << enable << " ): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; if ( enable == d->isEnabled() ) return; @@ -835,9 +835,9 @@ void KAction::setEnabled(bool enable) d->m_kaccel->setEnabled(name(), enable); #endif // KDE 4: remove end - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); @@ -853,7 +853,7 @@ void KAction::setEnabled(bool enable) emit enabled( d->isEnabled() ); } -void KAction::updateEnabled( int i ) +void TDEAction::updateEnabled( int i ) { TQWidget *w = container( i ); @@ -861,33 +861,33 @@ void KAction::updateEnabled( int i ) static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); else if ( ::tqqt_cast( w ) ) static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); - else if ( ::tqqt_cast( w ) ) - static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); + else if ( ::tqqt_cast( w ) ) + static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); } -void KAction::setShortcutConfigurable( bool b ) +void TDEAction::setShortcutConfigurable( bool b ) { d->m_configurable = b; } -void KAction::setText( const TQString& text ) +void TDEAction::setText( const TQString& text ) { #ifndef KDE_NO_COMPAT // KDE 4: remove if (d->m_kaccel) { - KAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); + TDEAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); if (pAction) pAction->setLabel( text ); } #endif // KDE 4: remove end - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); for( ; itr != itrEnd; ++itr ) { - KAccelAction* const pAction = (*itr)->actions().actionPtr(namePtr); + TDEAccelAction* const pAction = (*itr)->actions().actionPtr(namePtr); if (pAction) pAction->setLabel( text ); } @@ -899,7 +899,7 @@ void KAction::setText( const TQString& text ) updateText( i ); } -void KAction::updateText( int i ) +void TDEAction::updateText( int i ) { TQWidget *w = container( i ); @@ -911,25 +911,25 @@ void KAction::updateText( int i ) } else if ( ::tqqt_cast( w ) ) static_cast(w)->changeItem( itemId( i ), d->text() ); - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - TQWidget *button = static_cast(w)->getWidget( itemId( i ) ); - if ( ::tqqt_cast( button ) ) - static_cast(button)->setText( d->plainText() ); + TQWidget *button = static_cast(w)->getWidget( itemId( i ) ); + if ( ::tqqt_cast( button ) ) + static_cast(button)->setText( d->plainText() ); } } -TQString KAction::text() const +TQString TDEAction::text() const { return d->text(); } -TQString KAction::plainText() const +TQString TDEAction::plainText() const { return d->plainText( ); } -void KAction::setIcon( const TQString &icon ) +void TDEAction::setIcon( const TQString &icon ) { d->setIconName( icon ); @@ -939,7 +939,7 @@ void KAction::setIcon( const TQString &icon ) updateIcon( i ); } -void KAction::updateIcon( int id ) +void TDEAction::updateIcon( int id ) { TQWidget* w = container( id ); @@ -951,16 +951,16 @@ void KAction::updateIcon( int id ) } else if ( ::tqqt_cast( w ) ) static_cast(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); - else if ( ::tqqt_cast( w ) ) - static_cast(w)->setButtonIcon( itemId( id ), d->iconName() ); + else if ( ::tqqt_cast( w ) ) + static_cast(w)->setButtonIcon( itemId( id ), d->iconName() ); } -TQString KAction::icon() const +TQString TDEAction::icon() const { return d->iconName( ); } -void KAction::setIconSet( const TQIconSet &iconset ) +void TDEAction::setIconSet( const TQIconSet &iconset ) { d->setIconSet( iconset ); @@ -970,7 +970,7 @@ void KAction::setIconSet( const TQIconSet &iconset ) } -void KAction::updateIconSet( int id ) +void TDEAction::updateIconSet( int id ) { TQWidget *w = container( id ); @@ -983,26 +983,26 @@ void KAction::updateIconSet( int id ) } else if ( ::tqqt_cast( w ) ) static_cast(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) - static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet() ); + static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet() ); else - static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); + static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); } } -TQIconSet KAction::iconSet( KIcon::Group group, int size ) const +TQIconSet TDEAction::iconSet( KIcon::Group group, int size ) const { return d->iconSet( group, size ); } -bool KAction::hasIcon() const +bool TDEAction::hasIcon() const { return d->hasIcon(); } -void KAction::setWhatsThis( const TQString& text ) +void TDEAction::setWhatsThis( const TQString& text ) { d->setWhatsThis( text ); @@ -1011,7 +1011,7 @@ void KAction::setWhatsThis( const TQString& text ) updateWhatsThis( i ); } -void KAction::updateWhatsThis( int i ) +void TDEAction::updateWhatsThis( int i ) { TQPopupMenu* pm = popupMenu( i ); if ( pm ) @@ -1020,7 +1020,7 @@ void KAction::updateWhatsThis( int i ) return; } - KToolBar *tb = toolBar( i ); + TDEToolBar *tb = toolBar( i ); if ( tb ) { TQWidget *w = tb->getButton( itemId( i ) ); @@ -1030,12 +1030,12 @@ void KAction::updateWhatsThis( int i ) } } -TQString KAction::whatsThis() const +TQString TDEAction::whatsThis() const { return d->whatsThis(); } -TQString KAction::whatsThisWithIcon() const +TQString TDEAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!d->iconName().isEmpty()) @@ -1043,80 +1043,80 @@ TQString KAction::whatsThisWithIcon() const return text; } -TQWidget* KAction::container( int index ) const +TQWidget* TDEAction::container( int index ) const { assert( index < containerCount() ); return d->m_containers[ index ].m_container; } -KToolBar* KAction::toolBar( int index ) const +TDEToolBar* TDEAction::toolBar( int index ) const { - return tqt_dynamic_cast( d->m_containers[ index ].m_container ); + return tqt_dynamic_cast( d->m_containers[ index ].m_container ); } -TQPopupMenu* KAction::popupMenu( int index ) const +TQPopupMenu* TDEAction::popupMenu( int index ) const { return tqt_dynamic_cast( d->m_containers[ index ].m_container ); } -TQWidget* KAction::representative( int index ) const +TQWidget* TDEAction::representative( int index ) const { return d->m_containers[ index ].m_representative; } -int KAction::itemId( int index ) const +int TDEAction::itemId( int index ) const { return d->m_containers[ index ].m_id; } -int KAction::containerCount() const +int TDEAction::containerCount() const { return d->m_containers.count(); } -uint KAction::kaccelCount() const +uint TDEAction::kaccelCount() const { return d->m_kaccelList.count(); } -void KAction::addContainer( TQWidget* c, int id ) +void TDEAction::addContainer( TQWidget* c, int id ) { - KActionPrivate::Container p; + TDEActionPrivate::Container p; p.m_container = c; p.m_id = id; d->m_containers.append( p ); } -void KAction::addContainer( TQWidget* c, TQWidget* w ) +void TDEAction::addContainer( TQWidget* c, TQWidget* w ) { - KActionPrivate::Container p; + TDEActionPrivate::Container p; p.m_container = c; p.m_representative = w; d->m_containers.append( p ); } -void KAction::activate() +void TDEAction::activate() { - emit activated( KAction::EmulatedActivation, Qt::NoButton ); + emit activated( TDEAction::EmulatedActivation, Qt::NoButton ); slotActivated(); } -void KAction::slotActivated() +void TDEAction::slotActivated() { const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); if ( senderObj ) { - if ( ::tqqt_cast( senderObj ) ) - emit activated( KAction::AccelActivation, Qt::NoButton ); + if ( ::tqqt_cast( senderObj ) ) + emit activated( TDEAction::AccelActivation, Qt::NoButton ); } emit activated(); } -// This catches signals emitted by KActions inserted into QPopupMenu +// This catches signals emitted by TDEActions inserted into QPopupMenu // We do crude things inside it, because we need to know which // TQPopupMenu emitted the signal. We need to be sure that it is // only called by QPopupMenus, we plugged us in. -void KAction::slotPopupActivated() +void TDEAction::slotPopupActivated() { if( ::tqqt_cast(sender())) { @@ -1127,30 +1127,30 @@ void KAction::slotPopupActivated() TQPopupMenu* qpm = tqt_dynamic_cast( container(pos) ); if(qpm) { - KPopupMenu* kpm = tqt_dynamic_cast( qpm ); + TDEPopupMenu* kpm = tqt_dynamic_cast( qpm ); TQt::ButtonState state; - if ( kpm ) // KPopupMenu? Nice, it stores the state. + if ( kpm ) // TDEPopupMenu? Nice, it stores the state. state = kpm->state(); else { // just a QPopupMenu? We'll ask for the state now then (small race condition?) - kdDebug(129) << "KAction::slotPopupActivated not a KPopupMenu -> using keyboardMouseState()" << endl; + kdDebug(129) << "TDEAction::slotPopupActivated not a TDEPopupMenu -> using keyboardMouseState()" << endl; state = TDEApplication::keyboardMouseState(); } - emit activated( KAction::PopupMenuActivation, state ); + emit activated( TDEAction::PopupMenuActivation, state ); slotActivated(); return; } } } - kdWarning(129)<<"Don't connect KAction::slotPopupActivated() to anything, expect into QPopupMenus which are in containers. Use slotActivated instead."<m_kaccel->actions().actionPtr(name()); + kdDebug(129) << "TDEAction::slotKeycodeChanged()" << endl; // -- ellis + TDEAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); if( pAction ) setShortcut(pAction->shortcut()); } -KActionCollection *KAction::parentCollection() const +TDEActionCollection *TDEAction::parentCollection() const { return m_parentCollection; } -void KAction::unplugAll() +void TDEAction::unplugAll() { while ( containerCount() != 0 ) unplug( container( 0 ) ); } -const KGuiItem& KAction::guiItem() const +const KGuiItem& TDEAction::guiItem() const { return *d; } -void KAction::virtual_hook( int, void* ) +void TDEAction::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 diff --git a/tdeui/kaction.h b/tdeui/kaction.h index f2860679f..b68ded272 100644 --- a/tdeui/kaction.h +++ b/tdeui/kaction.h @@ -41,39 +41,39 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEConfig; class TDEConfigBase; class KURL; class TDEInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; /** * @short Class to encapsulate user-driven action or event * - * The KAction class (and derived and super classes) provides a way to + * The TDEAction class (and derived and super classes) provides a way to * easily encapsulate a "real" user-selected action or event in your * program. * * For instance, a user may want to @p paste the contents of * the clipboard or @p scroll @p down a document or @p quit the * application. These are all @p actions -- events that the - * user causes to happen. The KAction class allows the developer to + * user causes to happen. The TDEAction class allows the developer to * deal with these actions in an easy and intuitive manner. * - * Specifically, the KAction class encapsulated the various attributes + * Specifically, the TDEAction class encapsulated the various attributes * to an event/action. For instance, an action might have an icon * that goes along with it (a clipboard for a "paste" action or * scissors for a "cut" action). The action might have some text to * describe the action. It will certainly have a method or function * that actually @p executes the action! All these attributes - * are contained within the KAction object. + * are contained within the TDEAction object. * * The advantage of dealing with Actions is that you can manipulate * the Action without regard to the GUI representation of it. For @@ -86,7 +86,7 @@ class KMainWindow; * similar code - but has to be done twice! * * With the Action concept, you simply "plug" the Action into whatever - * GUI element you want. The KAction class will then take care of + * GUI element you want. The TDEAction class will then take care of * correctly defining the menu item (with icons, accelerators, text, * etc) or toolbar button.. or whatever. From then on, if you * manipulate the Action at all, the effect will propogate through all @@ -99,7 +99,7 @@ class KMainWindow; * one-to-one relationship between the "real" action and @p all * GUI representations of it. * - * KAction emits the activated() signal if the user activated the + * TDEAction emits the activated() signal if the user activated the * corresponding GUI element ( menu item, toolbar button, etc. ) * * If you are in the situation of wanting to map the activated() @@ -113,7 +113,7 @@ class KMainWindow; * this, TQT_SLOT( moveWindowToDesktop( int ) ) ); * * for ( uint i = 0; i < numberOfDesktops; ++i ) { - * KAction *desktopAction = new KAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); + * TDEAction *desktopAction = new TDEAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); * connect( desktopAction, TQT_SIGNAL( activated() ), desktopNumberMapper, TQT_SLOT( map() ) ); * desktopNumberMapper->setMapping( desktopAction, i ); * } @@ -125,7 +125,7 @@ class KMainWindow; * * @li Decide which attributes you want to associate with a given * action (icons, text, keyboard shortcut, etc) - * @li Create the action using KAction (or derived or super class). + * @li Create the action using TDEAction (or derived or super class). * @li "Plug" the Action into whatever GUI element you want. Typically, * this will be a menu or toolbar. * @@ -133,8 +133,8 @@ class KMainWindow; * * Here is an example of enabling a "New [document]" action * \code - * KAction *newAct = new KAction(i18n("&New"), "filenew", - * KStdAccel::shortcut(KStdAccel::New), + * TDEAction *newAct = new TDEAction(i18n("&New"), "filenew", + * TDEStdAccel::shortcut(TDEStdAccel::New), * this, TQT_SLOT(fileNew()), * actionCollection(), "new"); * \endcode @@ -166,14 +166,14 @@ class KMainWindow; * and both the menuitem in File and the toolbar button will instantly * be disabled. * - * Do not delete a KAction object without unplugging it from all its + * Do not delete a TDEAction object without unplugging it from all its * containers. The simplest way to do that is to use the unplugAll() * as in the following example: * \code * newAct->unplugAll(); * delete newAct; * \endcode - * Normally you will not need to do this as KActionCollection manages + * Normally you will not need to do this as TDEActionCollection manages * everything for you. * * Note: if you are using a "standard" action like "new", "paste", @@ -183,10 +183,10 @@ class KMainWindow; * * Usage Within the XML Framework:\n * - * If you are using KAction within the context of the XML menu and + * If you are using TDEAction within the context of the XML menu and * toolbar building framework, then there are a few tiny changes. The * first is that you must insert your new action into an action - * collection. The action collection (a KActionCollection) is, + * collection. The action collection (a TDEActionCollection) is, * logically enough, a central collection of all of the actions * defined in your application. The XML UI framework code in KXMLGUI * classes needs access to this collection in order to build up the @@ -199,9 +199,9 @@ class KMainWindow; * * @see KStdAction */ -class TDEUI_EXPORT KAction : public TQObject +class TDEUI_EXPORT TDEAction : public TQObject { - friend class KActionCollection; + friend class TDEActionCollection; Q_OBJECT TQ_PROPERTY( int containerCount READ containerCount ) TQ_PROPERTY( TQString plainText READ plainText ) @@ -221,7 +221,7 @@ public: * If you do not want or have a keyboard shortcut, * set the @p cut param to 0. * - * This is the most common KAction used when you do not have a + * This is the most common TDEAction used when you do not have a * corresponding icon (note that it won't appear in the current version * of the "Edit ToolBar" dialog, because an action needs an icon to be * plugged in a toolbar...). @@ -233,9 +233,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const KShortcut& cut, + TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * Constructs an action with text, icon, potential keyboard @@ -245,7 +245,7 @@ public: * If you do not want or have a keyboard shortcut, set the * @p cut param to 0. * - * This is the other common KAction used. Use it when you + * This is the other common TDEAction used. Use it when you * @p do have a corresponding icon. * * @param text The text that will be displayed. @@ -256,9 +256,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * Constructs an action with text, icon, potential keyboard @@ -269,7 +269,7 @@ public: * If you do not want or have a keyboard shortcut, set the * @p cut param to 0. * - * This is the other common KAction used. Use it when you + * This is the other common TDEAction used. Use it when you * @p do have a corresponding icon. * * @param text The text that will be displayed. @@ -280,9 +280,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * The same as the above constructor, but with a KGuiItem providing @@ -295,49 +295,49 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const KGuiItem& item, const KShortcut& cut, + TDEAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * @obsolete */ - KAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDEAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const KShortcut& cut, + TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( TQObject* parent = 0, const char* name = 0 ); + TDEAction( TQObject* parent = 0, const char* name = 0 ); /** * Standard destructor */ - virtual ~KAction(); + virtual ~TDEAction(); /** * "Plug" or insert this action into a given widget. @@ -346,7 +346,7 @@ public: * typically be a menu or a toolbar. From this point on, you will * never need to directly manipulate the item in the menu or * toolbar. You do all enabling/disabling/manipulation directly - * with your KAction object. + * with your TDEAction object. * * @param widget The GUI element to display this action * @param index The position into which the action is plugged. If @@ -357,14 +357,14 @@ public: /** * @deprecated. Shouldn't be used. No substitute available. * - * "Plug" or insert this action into a given KAccel. + * "Plug" or insert this action into a given TDEAccel. * - * @param accel The KAccel collection which holds this accel + * @param accel The TDEAccel collection which holds this accel * @param configurable If the shortcut is configurable via - * the KAccel configuration dialog (this is somehow deprecated since - * there is now a KAction key configuration dialog). + * the TDEAccel configuration dialog (this is somehow deprecated since + * there is now a TDEAction key configuration dialog). */ - virtual void plugAccel(KAccel *accel, bool configurable = true) KDE_DEPRECATED; + virtual void plugAccel(TDEAccel *accel, bool configurable = true) KDE_DEPRECATED; /** * "Unplug" or remove this action from a given widget. @@ -382,7 +382,7 @@ public: /** * @deprecated. Complement method to plugAccel(). - * Disconnect this action from the KAccel. + * Disconnect this action from the TDEAccel. */ virtual void unplugAccel() KDE_DEPRECATED; @@ -430,11 +430,11 @@ public: /** * Get the keyboard shortcut associated with this action. */ - virtual const KShortcut& shortcut() const; + virtual const TDEShortcut& shortcut() const; /** * Get the default shortcut for this action. */ - virtual const KShortcut& shortcutDefault() const; + virtual const TDEShortcut& shortcutDefault() const; // These two methods are for TQ_PROPERTY TQString shortcutText() const; @@ -477,7 +477,7 @@ public: virtual TQString icon() const; - KActionCollection *parentCollection() const; + TDEActionCollection *parentCollection() const; /** * @internal @@ -503,7 +503,7 @@ public slots: /** * Sets the keyboard shortcut associated with this action. */ - virtual bool setShortcut( const KShortcut& ); + virtual bool setShortcut( const TDEShortcut& ); virtual void setGroup( const TQString& ); @@ -525,9 +525,9 @@ public slots: * For the tooltip to show up on the statusbar you will need to connect * a couple of the actionclass signals to the toolbar. * The easiest way of doing this is in your main window class, when you create - * a statusbar. See the KActionCollection class for more details. + * a statusbar. See the TDEActionCollection class for more details. * - * @see KActionCollection + * @see TDEActionCollection * */ virtual void setToolTip( const TQString& ); @@ -573,7 +573,7 @@ protected slots: void slotButtonClicked( int, TQt::ButtonState state ); // KDE4: make virtual protected: - KToolBar* toolBar( int index ) const; + TDEToolBar* toolBar( int index ) const; TQPopupMenu* popupMenu( int index ) const; void removeContainer( int index ); int findContainer( const TQWidget* widget ) const; @@ -593,7 +593,7 @@ protected: virtual void updateToolTip( int id ); virtual void updateWhatsThis( int i ); - KActionCollection *m_parentCollection; + TDEActionCollection *m_parentCollection; TQString whatsThisWithIcon() const; /** * Return the underlying KGuiItem @@ -620,19 +620,19 @@ signals: * * @since 3.4 */ - void activated( KAction::ActivationReason reason, TQt::ButtonState state ); + void activated( TDEAction::ActivationReason reason, TQt::ButtonState state ); void enabled( bool ); private: - void initPrivate( const TQString& text, const KShortcut& cut, + void initPrivate( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot ); - KAccel* kaccelCurrent(); - bool initShortcut( const KShortcut& ); + TDEAccel* kaccelCurrent(); + bool initShortcut( const TDEShortcut& ); void plugShortcut(); - bool updateKAccelShortcut( KAccel* kaccel ); - void insertKAccel( KAccel* ); - /** @internal To be used exclusively by KActionCollection::removeWidget(). */ - void removeKAccel( KAccel* ); + bool updateTDEAccelShortcut( TDEAccel* kaccel ); + void insertTDEAccel( TDEAccel* ); + /** @internal To be used exclusively by TDEActionCollection::removeWidget(). */ + void removeTDEAccel( TDEAccel* ); #ifndef KDE_NO_COMPAT public: @@ -666,8 +666,8 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - class KActionPrivate; - KActionPrivate* const d; + class TDEActionPrivate; + TDEActionPrivate* const d; }; #include diff --git a/tdeui/kactionclasses.cpp b/tdeui/kactionclasses.cpp index 52b3441c2..87c9932a3 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/kactionclasses.cpp @@ -57,10 +57,10 @@ #include #include -class KToggleAction::KToggleActionPrivate +class TDEToggleAction::TDEToggleActionPrivate { public: - KToggleActionPrivate() + TDEToggleActionPrivate() { m_checked = false; m_checkedGuiItem = 0; @@ -71,86 +71,86 @@ public: KGuiItem* m_checkedGuiItem; }; -KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, cut, parent, name ) + : TDEAction( text, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + : TDEAction( text, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDEToggleAction::TDEToggleAction( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::~KToggleAction() +TDEToggleAction::~TDEToggleAction() { delete d->m_checkedGuiItem; delete d; } -int KToggleAction::plug( TQWidget* widget, int index ) +int TDEToggleAction::plug( TQWidget* widget, int index ) { - if ( !::tqqt_cast( widget ) && !::tqqt_cast( widget ) ) + if ( !::tqqt_cast( widget ) && !::tqqt_cast( widget ) ) { - kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; + kdWarning() << "Can not plug TDEToggleAction in " << widget->className() << endl; return -1; } - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - int _index = KAction::plug( widget, index ); + int _index = TDEAction::plug( widget, index ); if ( _index == -1 ) return _index; - if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = static_cast( widget ); + if ( ::tqqt_cast( widget ) ) { + TDEToolBar *bar = static_cast( widget ); bar->setToggle( itemId( _index ), true ); bar->setButton( itemId( _index ), isChecked() ); @@ -162,11 +162,11 @@ int KToggleAction::plug( TQWidget* widget, int index ) return _index; } -void KToggleAction::setChecked( bool c ) +void TDEToggleAction::setChecked( bool c ) { if ( c == d->m_checked ) return; - //kdDebug(129) << "KToggleAction::setChecked(" << c << ") " << this << " " << name() << endl; + //kdDebug(129) << "TDEToggleAction::setChecked(" << c << ") " << this << " " << name() << endl; d->m_checked = c; @@ -180,9 +180,9 @@ void KToggleAction::setChecked( bool c ) if ( !list.isEmpty() ) { TQObjectListIt it( list ); for( ; it.current(); ++it ) { - if ( ::tqqt_cast( it.current() ) && it.current() != this && - static_cast(it.current())->exclusiveGroup() == exclusiveGroup() ) { - KToggleAction *a = static_cast(it.current()); + if ( ::tqqt_cast( it.current() ) && it.current() != this && + static_cast(it.current())->exclusiveGroup() == exclusiveGroup() ) { + TDEToggleAction *a = static_cast(it.current()); if( a->isChecked() ) { a->setChecked( false ); emit a->toggled( false ); @@ -193,7 +193,7 @@ void KToggleAction::setChecked( bool c ) } } -void KToggleAction::updateChecked( int id ) +void TDEToggleAction::updateChecked( int id ) { TQWidget *w = container( id ); @@ -221,124 +221,124 @@ void KToggleAction::updateChecked( int id ) } else if ( ::tqqt_cast( w ) ) // not handled in plug... static_cast(w)->setItemChecked( itemId( id ), d->m_checked ); - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getButton( itemId( id ) ); - if ( r && ::tqqt_cast( r ) ) { - static_cast( w )->setButton( itemId( id ), d->m_checked ); + TQWidget* r = static_cast( w )->getButton( itemId( id ) ); + if ( r && ::tqqt_cast( r ) ) { + static_cast( w )->setButton( itemId( id ), d->m_checked ); if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) { const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); - static_cast( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); + static_cast( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); } } } } -void KToggleAction::slotActivated() +void TDEToggleAction::slotActivated() { setChecked( !isChecked() ); - KAction::slotActivated(); + TDEAction::slotActivated(); emit toggled( isChecked() ); } -bool KToggleAction::isChecked() const +bool TDEToggleAction::isChecked() const { return d->m_checked; } -void KToggleAction::setExclusiveGroup( const TQString& name ) +void TDEToggleAction::setExclusiveGroup( const TQString& name ) { d->m_exclusiveGroup = name; } -TQString KToggleAction::exclusiveGroup() const +TQString TDEToggleAction::exclusiveGroup() const { return d->m_exclusiveGroup; } -void KToggleAction::setCheckedState( const KGuiItem& checkedItem ) +void TDEToggleAction::setCheckedState( const KGuiItem& checkedItem ) { delete d->m_checkedGuiItem; d->m_checkedGuiItem = new KGuiItem( checkedItem ); } -TQString KToggleAction::toolTip() const +TQString TDEToggleAction::toolTip() const { if ( d->m_checkedGuiItem && d->m_checked ) return d->m_checkedGuiItem->toolTip(); else - return KAction::toolTip(); + return TDEAction::toolTip(); } -KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, cut, parent, name ) +: TDEToggleAction( text, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, parent, name ) +: TDEToggleAction( text, pix, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, parent, name ) +: TDEToggleAction( text, pix, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, pix, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, pix, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( TQObject* parent, const char* name ) -: KToggleAction( parent, name ) +TDERadioAction::TDERadioAction( TQObject* parent, const char* name ) +: TDEToggleAction( parent, name ) { } -void KRadioAction::slotActivated() +void TDERadioAction::slotActivated() { if ( isChecked() ) { const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); - if ( !senderObj || !::tqqt_cast( senderObj ) ) + if ( !senderObj || !::tqqt_cast( senderObj ) ) return; - const_cast( static_cast( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); + const_cast( static_cast( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); return; } - KToggleAction::slotActivated(); + TDEToggleAction::slotActivated(); } -class KSelectAction::KSelectActionPrivate +class TDESelectAction::TDESelectActionPrivate { public: - KSelectActionPrivate() + TDESelectActionPrivate() { m_edit = false; m_menuAccelsEnabled = true; @@ -373,71 +373,71 @@ public: } }; -KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, cut, parent, name ) + : TDEAction( text, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + : TDEAction( text, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDESelectAction::TDESelectAction( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::~KSelectAction() +TDESelectAction::~TDESelectAction() { assert(d); delete d->m_menu; delete d; d = 0; } -void KSelectAction::setCurrentItem( int id ) +void TDESelectAction::setCurrentItem( int id ) { if ( id >= (int)d->m_list.count() ) { Q_ASSERT(id < (int)d->m_list.count()); @@ -459,12 +459,12 @@ void KSelectAction::setCurrentItem( int id ) for( int i = 0; i < len; ++i ) updateCurrentItem( i ); - // emit KAction::activated(); + // emit TDEAction::activated(); // emit activated( currentItem() ); // emit activated( currentText() ); } -void KSelectAction::setComboWidth( int width ) +void TDESelectAction::setComboWidth( int width ) { if ( width < 0 ) return; @@ -478,17 +478,17 @@ void KSelectAction::setComboWidth( int width ) } -void KSelectAction::setMaxComboViewCount( int n ) +void TDESelectAction::setMaxComboViewCount( int n ) { d->m_maxComboViewCount = n; } -TQPopupMenu* KSelectAction::popupMenu() const +TQPopupMenu* TDESelectAction::popupMenu() const { - kdDebug(129) << "KAction::popupMenu()" << endl; // remove -- ellis + kdDebug(129) << "TDEAction::popupMenu()" << endl; // remove -- ellis if ( !d->m_menu ) { - d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); + d->m_menu = new TDEPopupMenu(0L, "TDESelectAction::popupMenu()"); setupMenu(); if ( d->m_current >= 0 ) d->m_menu->setItemChecked( d->m_current, true ); @@ -497,7 +497,7 @@ TQPopupMenu* KSelectAction::popupMenu() const return d->m_menu; } -void KSelectAction::setupMenu() const +void TDESelectAction::setupMenu() const { if ( !d->m_menu ) return; @@ -513,11 +513,11 @@ void KSelectAction::setupMenu() const } } -void KSelectAction::changeItem( int index, const TQString& text ) +void TDESelectAction::changeItem( int index, const TQString& text ) { if ( index < 0 || index >= (int)d->m_list.count() ) { - kdWarning() << "KSelectAction::changeItem Index out of scope" << endl; + kdWarning() << "TDESelectAction::changeItem Index out of scope" << endl; return; } @@ -531,15 +531,15 @@ void KSelectAction::changeItem( int index, const TQString& text ) changeItem( i, index, text ); } -void KSelectAction::changeItem( int id, int index, const TQString& text) +void TDESelectAction::changeItem( int id, int index, const TQString& text) { if ( index < 0 ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) + if ( ::tqqt_cast( w ) ) { - TQWidget* r = (static_cast( w ))->getWidget( itemId( id ) ); + TQWidget* r = (static_cast( w ))->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *b = static_cast( r ); @@ -548,7 +548,7 @@ void KSelectAction::changeItem( int id, int index, const TQString& text) } } -void KSelectAction::setItems( const TQStringList &lst ) +void TDESelectAction::setItems( const TQStringList &lst ) { d->m_list = lst; d->m_current = -1; @@ -563,12 +563,12 @@ void KSelectAction::setItems( const TQStringList &lst ) setEnabled ( lst.count() > 0 || d->m_edit ); } -TQStringList KSelectAction::items() const +TQStringList TDESelectAction::items() const { return d->m_list; } -TQString KSelectAction::currentText() const +TQString TDESelectAction::currentText() const { if ( currentItem() < 0 ) return TQString::null; @@ -576,19 +576,19 @@ TQString KSelectAction::currentText() const return d->m_list[ currentItem() ]; } -int KSelectAction::currentItem() const +int TDESelectAction::currentItem() const { return d->m_current; } -void KSelectAction::updateCurrentItem( int id ) +void TDESelectAction::updateCurrentItem( int id ) { if ( d->m_current < 0 ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *b = static_cast( r ); b->setCurrentItem( d->m_current ); @@ -596,16 +596,16 @@ void KSelectAction::updateCurrentItem( int id ) } } -int KSelectAction::comboWidth() const +int TDESelectAction::comboWidth() const { return d->m_comboWidth; } -void KSelectAction::updateComboWidth( int id ) +void TDESelectAction::updateComboWidth( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *cb = static_cast( r ); cb->setMinimumWidth( d->m_comboWidth ); @@ -614,12 +614,12 @@ void KSelectAction::updateComboWidth( int id ) } } -void KSelectAction::updateItems( int id ) +void TDESelectAction::updateItems( int id ) { - kdDebug(129) << "KAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis + kdDebug(129) << "TDEAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *cb = static_cast( r ); cb->clear(); @@ -636,11 +636,11 @@ void KSelectAction::updateItems( int id ) } } -int KSelectAction::plug( TQWidget *widget, int index ) +int TDESelectAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - kdDebug(129) << "KSelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis + kdDebug(129) << "TDESelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis if ( ::tqqt_cast( widget) ) { // Create the PopupMenu and store it in m_menu @@ -665,10 +665,10 @@ int KSelectAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast( widget ) ) + else if ( ::tqqt_cast( widget ) ) { - KToolBar* bar = static_cast( widget ); - int id_ = KAction::getToolButtonID(); + TDEToolBar* bar = static_cast( widget ); + int id_ = TDEAction::getToolButtonID(); bar->insertCombo( comboItems(), id_, isEditable(), TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( slotActivated( const TQString & ) ), isEnabled(), @@ -718,11 +718,11 @@ int KSelectAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - kdWarning() << "Can not plug KAction in " << widget->className() << endl; + kdWarning() << "Can not plug TDEAction in " << widget->className() << endl; return -1; } -TQStringList KSelectAction::comboItems() const +TQStringList TDESelectAction::comboItems() const { if( d->m_menuAccelsEnabled ) { TQStringList lst; @@ -741,7 +741,7 @@ TQStringList KSelectAction::comboItems() const return d->m_list; } -void KSelectAction::clear() +void TDESelectAction::clear() { if ( d->m_menu ) d->m_menu->clear(); @@ -751,11 +751,11 @@ void KSelectAction::clear() updateClear( i ); } -void KSelectAction::updateClear( int id ) +void TDESelectAction::updateClear( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *b = static_cast( r ); b->clear(); @@ -763,7 +763,7 @@ void KSelectAction::updateClear( int id ) } } -void KSelectAction::slotActivated( int id ) +void TDESelectAction::slotActivated( int id ) { if ( d->m_current == id ) return; @@ -774,7 +774,7 @@ void KSelectAction::slotActivated( int id ) TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); } -void KSelectAction::slotActivated( const TQString &text ) +void TDESelectAction::slotActivated( const TQString &text ) { if ( isEditable() ) { @@ -796,175 +796,175 @@ void KSelectAction::slotActivated( const TQString &text ) TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); } -void KSelectAction::slotActivated() +void TDESelectAction::slotActivated() { - KAction::slotActivated(); - kdDebug(129) << "KSelectAction::slotActivated currentItem=" << currentItem() << " currentText=" << currentText() << endl; + TDEAction::slotActivated(); + kdDebug(129) << "TDESelectAction::slotActivated currentItem=" << currentItem() << " currentText=" << currentText() << endl; emit activated( currentItem() ); emit activated( currentText() ); } -void KSelectAction::setEditable( bool edit ) +void TDESelectAction::setEditable( bool edit ) { d->m_edit = edit; } -bool KSelectAction::isEditable() const +bool TDESelectAction::isEditable() const { return d->m_edit; } -void KSelectAction::setRemoveAmpersandsInCombo( bool b ) +void TDESelectAction::setRemoveAmpersandsInCombo( bool b ) { setMenuAccelsEnabled( b ); } -bool KSelectAction::removeAmpersandsInCombo() const +bool TDESelectAction::removeAmpersandsInCombo() const { return menuAccelsEnabled( ); } -void KSelectAction::setMenuAccelsEnabled( bool b ) +void TDESelectAction::setMenuAccelsEnabled( bool b ) { d->m_menuAccelsEnabled = b; } -bool KSelectAction::menuAccelsEnabled() const +bool TDESelectAction::menuAccelsEnabled() const { return d->m_menuAccelsEnabled; } -class KListAction::KListActionPrivate +class TDEListAction::TDEListActionPrivate { public: - KListActionPrivate() + TDEListActionPrivate() { m_current = 0; } int m_current; }; -KListAction::KListAction( const TQString& text, const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, const TQObject* receiver, +TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( const TQString& text, const TQString& pix, - const KShortcut& cut, const TQObject* receiver, +TDEListAction::TDEListAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEListAction::TDEListAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::~KListAction() +TDEListAction::~TDEListAction() { delete d; d = 0; } -void KListAction::setCurrentItem( int index ) +void TDEListAction::setCurrentItem( int index ) { - KSelectAction::setCurrentItem( index ); + TDESelectAction::setCurrentItem( index ); d->m_current = index; - // emit KAction::activated(); + // emit TDEAction::activated(); // emit activated( currentItem() ); // emit activated( currentText() ); } -TQString KListAction::currentText() const +TQString TDEListAction::currentText() const { - return KSelectAction::currentText(); + return TDESelectAction::currentText(); } -int KListAction::currentItem() const +int TDEListAction::currentItem() const { return d->m_current; } -class KRecentFilesAction::KRecentFilesActionPrivate +class TDERecentFilesAction::TDERecentFilesActionPrivate { public: - KRecentFilesActionPrivate() + TDERecentFilesActionPrivate() { m_maxItems = 0; m_popup = 0; } uint m_maxItems; - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; TQMap m_shortNames; TQMap m_urls; }; -KRecentFilesAction::KRecentFilesAction( const TQString& text, - const KShortcut& cut, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, cut, parent, name) + : TDEListAction( text, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, - const KShortcut& cut, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, cut, parent, name) + : TDEListAction( text, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -974,42 +974,42 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -1019,16 +1019,16 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -1038,20 +1038,20 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( TQObject* parent, const char* name, +TDERecentFilesAction::TDERecentFilesAction( TQObject* parent, const char* name, uint maxItems ) - : KListAction( parent, name ) + : TDEListAction( parent, name ) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -void KRecentFilesAction::init() +void TDERecentFilesAction::init() { - KRecentFilesAction *that = const_cast(this); - that->d->m_popup = new KPopupMenu; + TDERecentFilesAction *that = const_cast(this); + that->d->m_popup = new TDEPopupMenu; connect(d->m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); connect(d->m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); connect( this, TQT_SIGNAL( activated( const TQString& ) ), @@ -1060,20 +1060,20 @@ void KRecentFilesAction::init() setMenuAccelsEnabled( false ); } -KRecentFilesAction::~KRecentFilesAction() +TDERecentFilesAction::~TDERecentFilesAction() { delete d->m_popup; delete d; d = 0; } -uint KRecentFilesAction::maxItems() const +uint TDERecentFilesAction::maxItems() const { return d->m_maxItems; } -void KRecentFilesAction::setMaxItems( uint maxItems ) +void TDERecentFilesAction::setMaxItems( uint maxItems ) { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); uint oldCount = lst.count(); // set new maxItems @@ -1094,17 +1094,17 @@ void KRecentFilesAction::setMaxItems( uint maxItems ) setItems( lst ); } -void KRecentFilesAction::addURL( const KURL& url ) +void TDERecentFilesAction::addURL( const KURL& url ) { addURL( url, url.fileName() ); } -void KRecentFilesAction::addURL( const KURL& url, const TQString& name ) +void TDERecentFilesAction::addURL( const KURL& url, const TQString& name ) { if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; const TQString file = url.pathOrURL(); - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); // remove file if already in list const TQStringList::Iterator end = lst.end(); @@ -1137,9 +1137,9 @@ void KRecentFilesAction::addURL( const KURL& url, const TQString& name ) setItems( lst ); } -void KRecentFilesAction::removeURL( const KURL& url ) +void TDERecentFilesAction::removeURL( const KURL& url ) { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); TQString file = url.pathOrURL(); // remove url @@ -1157,14 +1157,14 @@ void KRecentFilesAction::removeURL( const KURL& url ) } } -void KRecentFilesAction::clearURLList() +void TDERecentFilesAction::clearURLList() { clear(); d->m_shortNames.clear(); d->m_urls.clear(); } -void KRecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) +void TDERecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) { TQString key; TQString value; @@ -1209,12 +1209,12 @@ void KRecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) config->setGroup( oldGroup ); } -void KRecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) +void TDERecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) { TQString key; TQString value; TQString oldGroup; - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); oldGroup = config->group(); @@ -1238,7 +1238,7 @@ void KRecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) config->setGroup( oldGroup ); } -void KRecentFilesAction::itemSelected( const TQString& text ) +void TDERecentFilesAction::itemSelected( const TQString& text ) { //return a copy of the URL since the slot where it is connected might call //addURL or removeURL where the d->m_urls.erase( title ) could destroy the @@ -1246,7 +1246,7 @@ void KRecentFilesAction::itemSelected( const TQString& text ) emit urlSelected( KURL(d->m_urls[ text ]) ); } -void KRecentFilesAction::menuItemActivated( int id ) +void TDERecentFilesAction::menuItemActivated( int id ) { TQString text = d->m_popup->text(id); //return a copy of the URL since the slot where it is connected might call @@ -1255,28 +1255,28 @@ void KRecentFilesAction::menuItemActivated( int id ) emit urlSelected( KURL(d->m_urls[ text ]) ); } -void KRecentFilesAction::menuAboutToShow() +void TDERecentFilesAction::menuAboutToShow() { - KPopupMenu *menu = d->m_popup; + TDEPopupMenu *menu = d->m_popup; menu->clear(); - TQStringList list = KSelectAction::items(); + TQStringList list = TDESelectAction::items(); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { menu->insertItem(*it); } } -int KRecentFilesAction::plug( TQWidget *widget, int index ) +int TDERecentFilesAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - // This is very related to KActionMenu::plug. - // In fact this class could be an interesting base class for KActionMenu - if ( ::tqqt_cast( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); TDEInstance * instance; if ( m_parentCollection ) @@ -1300,36 +1300,36 @@ int KRecentFilesAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KListAction::plug( widget, index ); + return TDEListAction::plug( widget, index ); } -void KRecentFilesAction::slotClicked() +void TDERecentFilesAction::slotClicked() { - KAction::slotActivated(); + TDEAction::slotActivated(); } -void KRecentFilesAction::slotActivated(const TQString& text) +void TDERecentFilesAction::slotActivated(const TQString& text) { - KListAction::slotActivated(text); + TDEListAction::slotActivated(text); } -void KRecentFilesAction::slotActivated(int id) +void TDERecentFilesAction::slotActivated(int id) { - KListAction::slotActivated(id); + TDEListAction::slotActivated(id); } -void KRecentFilesAction::slotActivated() +void TDERecentFilesAction::slotActivated() { emit activated( currentItem() ); emit activated( currentText() ); } //KDE4: rename to urls() and return a KURL::List -TQStringList KRecentFilesAction::items() const +TQStringList TDERecentFilesAction::items() const { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); TQStringList result; for( unsigned int i = 1 ; i <= lst.count() ; i++ ) @@ -1341,130 +1341,130 @@ TQStringList KRecentFilesAction::items() const } //KDE4: remove -TQStringList KRecentFilesAction::completeItems() const +TQStringList TDERecentFilesAction::completeItems() const { - return KSelectAction::items(); + return TDESelectAction::items(); } -class KFontAction::KFontActionPrivate +class TDEFontAction::TDEFontActionPrivate { public: - KFontActionPrivate() + TDEFontActionPrivate() { } TQStringList m_fonts; }; -KFontAction::KFontAction( const TQString& text, - const KShortcut& cut, TQObject* parent, +TDEFontAction::TDEFontAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, receiver, slot, parent, name ) + : TDESelectAction( text, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( uint fontListCriteria, const TQString& text, - const KShortcut& cut, TQObject* parent, +TDEFontAction::TDEFontAction( uint fontListCriteria, const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, fontListCriteria ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, fontListCriteria ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, fontListCriteria ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, fontListCriteria ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEFontAction::TDEFontAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::~KFontAction() +TDEFontAction::~TDEFontAction() { delete d; d = 0; } /* - * Maintenance note: Keep in sync with KFontCombo::setCurrentFont() + * Maintenance note: Keep in sync with TDEFontCombo::setCurrentFont() */ -void KFontAction::setFont( const TQString &family ) +void TDEFontAction::setFont( const TQString &family ) { TQString lowerName = family.lower(); int i = 0; @@ -1521,15 +1521,15 @@ void KFontAction::setFont( const TQString &family ) kdDebug(129) << "Font not found " << family.lower() << endl; } -int KFontAction::plug( TQWidget *w, int index ) +int TDEFontAction::plug( TQWidget *w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast( w ) ) + if ( ::tqqt_cast( w ) ) { - KToolBar* bar = static_cast( w ); - int id_ = KAction::getToolButtonID(); - KFontCombo *cb = new KFontCombo( items(), bar ); + TDEToolBar* bar = static_cast( w ); + int id_ = TDEAction::getToolButtonID(); + TDEFontCombo *cb = new TDEFontCombo( items(), bar ); connect( cb, TQT_SIGNAL( activated( const TQString & ) ), TQT_SLOT( slotActivated( const TQString & ) ) ); cb->setEnabled( isEnabled() ); @@ -1544,85 +1544,85 @@ int KFontAction::plug( TQWidget *w, int index ) return containerCount() - 1; } - else return KSelectAction::plug( w, index ); + else return TDESelectAction::plug( w, index ); } -class KFontSizeAction::KFontSizeActionPrivate +class TDEFontSizeAction::TDEFontSizeActionPrivate { public: - KFontSizeActionPrivate() + TDEFontSizeActionPrivate() { } }; -KFontSizeAction::KFontSizeAction( const TQString& text, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, receiver, slot, parent, name ) + : TDESelectAction( text, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEFontSizeAction::TDEFontSizeAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { init(); } -KFontSizeAction::~KFontSizeAction() +TDEFontSizeAction::~TDEFontSizeAction() { delete d; d = 0; } -void KFontSizeAction::init() +void TDEFontSizeAction::init() { - d = new KFontSizeActionPrivate; + d = new TDEFontSizeActionPrivate; setEditable( true ); TQFontDatabase fontDB; @@ -1634,7 +1634,7 @@ void KFontSizeAction::init() setItems( lst ); } -void KFontSizeAction::setFontSize( int size ) +void TDEFontSizeAction::setFontSize( int size ) { if ( size == fontSize() ) { setCurrentItem( items().findIndex( TQString::number( size ) ) ); @@ -1642,7 +1642,7 @@ void KFontSizeAction::setFontSize( int size ) } if ( size < 1 ) { - kdWarning() << "KFontSizeAction: Size " << size << " is out of range" << endl; + kdWarning() << "TDEFontSizeAction: Size " << size << " is out of range" << endl; return; } @@ -1662,7 +1662,7 @@ void KFontSizeAction::setFontSize( int size ) TQStringList strLst; for (TQValueList::Iterator it = lst.begin() ; it != lst.end() ; ++it) strLst.append( TQString::number(*it) ); - KSelectAction::setItems( strLst ); + TDESelectAction::setItems( strLst ); // Find new current item index = lst.findIndex( size ); setCurrentItem( index ); @@ -1671,130 +1671,130 @@ void KFontSizeAction::setFontSize( int size ) setCurrentItem( index ); - //emit KAction::activated(); + //emit TDEAction::activated(); //emit activated( index ); //emit activated( TQString::number( size ) ); //emit fontSizeChanged( size ); } -int KFontSizeAction::fontSize() const +int TDEFontSizeAction::fontSize() const { return currentText().toInt(); } -void KFontSizeAction::slotActivated( int index ) +void TDEFontSizeAction::slotActivated( int index ) { - KSelectAction::slotActivated( index ); + TDESelectAction::slotActivated( index ); emit fontSizeChanged( items()[ index ].toInt() ); } -void KFontSizeAction::slotActivated( const TQString& size ) +void TDEFontSizeAction::slotActivated( const TQString& size ) { setFontSize( size.toInt() ); // insert sorted first - KSelectAction::slotActivated( size ); + TDESelectAction::slotActivated( size ); emit fontSizeChanged( size.toInt() ); } -class KActionMenu::KActionMenuPrivate +class TDEActionMenu::TDEActionMenuPrivate { public: - KActionMenuPrivate() + TDEActionMenuPrivate() { - m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); + m_popup = new TDEPopupMenu(0L,"TDEActionMenu::TDEActionMenuPrivate"); m_delayed = true; m_stickyMenu = true; } - ~KActionMenuPrivate() + ~TDEActionMenuPrivate() { delete m_popup; m_popup = 0; } - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_delayed; bool m_stickyMenu; }; -KActionMenu::KActionMenu( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDEActionMenu::TDEActionMenu( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, TQObject* parent, +TDEActionMenu::TDEActionMenu( const TQString& text, TQObject* parent, const char* name ) - : KAction( text, 0, parent, name ) + : TDEAction( text, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, const TQIconSet& icon, +TDEActionMenu::TDEActionMenu( const TQString& text, const TQIconSet& icon, TQObject* parent, const char* name ) - : KAction( text, icon, 0, parent, name ) + : TDEAction( text, icon, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, const TQString& icon, +TDEActionMenu::TDEActionMenu( const TQString& text, const TQString& icon, TQObject* parent, const char* name ) - : KAction( text, icon, 0, parent, name ) + : TDEAction( text, icon, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::~KActionMenu() +TDEActionMenu::~TDEActionMenu() { unplugAll(); - kdDebug(129) << "KActionMenu::~KActionMenu()" << endl; // ellis + kdDebug(129) << "TDEActionMenu::~TDEActionMenu()" << endl; // ellis delete d; d = 0; } -void KActionMenu::popup( const TQPoint& global ) +void TDEActionMenu::popup( const TQPoint& global ) { popupMenu()->popup( global ); } -KPopupMenu* KActionMenu::popupMenu() const +TDEPopupMenu* TDEActionMenu::popupMenu() const { return d->m_popup; } -void KActionMenu::insert( KAction* cmd, int index ) +void TDEActionMenu::insert( TDEAction* cmd, int index ) { if ( cmd ) cmd->plug( d->m_popup, index ); } -void KActionMenu::remove( KAction* cmd ) +void TDEActionMenu::remove( TDEAction* cmd ) { if ( cmd ) cmd->unplug( d->m_popup ); } -bool KActionMenu::delayed() const { +bool TDEActionMenu::delayed() const { return d->m_delayed; } -void KActionMenu::setDelayed(bool _delayed) { +void TDEActionMenu::setDelayed(bool _delayed) { d->m_delayed = _delayed; } -bool KActionMenu::stickyMenu() const { +bool TDEActionMenu::stickyMenu() const { return d->m_stickyMenu; } -void KActionMenu::setStickyMenu(bool sticky) { +void TDEActionMenu::setStickyMenu(bool sticky) { d->m_stickyMenu = sticky; } -int KActionMenu::plug( TQWidget* widget, int index ) +int TDEActionMenu::plug( TQWidget* widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - kdDebug(129) << "KActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis + kdDebug(129) << "TDEActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis if ( ::tqqt_cast( widget ) ) { TQPopupMenu* menu = static_cast( widget ); @@ -1815,11 +1815,11 @@ int KActionMenu::plug( TQWidget* widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast( widget ) ) + else if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = static_cast( widget ); + TDEToolBar *bar = static_cast( widget ); - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this, @@ -1879,74 +1879,74 @@ int KActionMenu::plug( TQWidget* widget, int index ) //////// -KToolBarPopupAction::KToolBarPopupAction( const TQString& text, +TDEToolBarPopupAction::TDEToolBarPopupAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, icon, cut, parent, name ) + : TDEAction( text, icon, cut, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::KToolBarPopupAction( const TQString& text, +TDEToolBarPopupAction::TDEToolBarPopupAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, icon, cut, receiver, slot, parent, name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::KToolBarPopupAction( const KGuiItem& item, - const KShortcut& cut, +TDEToolBarPopupAction::TDEToolBarPopupAction( const KGuiItem& item, + const TDEShortcut& cut, const TQObject* receiver, - const char* slot, KActionCollection* parent, + const char* slot, TDEActionCollection* parent, const char* name ) - : KAction( item, cut, receiver, slot, parent, name ) + : TDEAction( item, cut, receiver, slot, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::~KToolBarPopupAction() +TDEToolBarPopupAction::~TDEToolBarPopupAction() { delete m_popup; } -bool KToolBarPopupAction::delayed() const { +bool TDEToolBarPopupAction::delayed() const { return m_delayed; } -void KToolBarPopupAction::setDelayed(bool delayed) { +void TDEToolBarPopupAction::setDelayed(bool delayed) { m_delayed = delayed; } -bool KToolBarPopupAction::stickyMenu() const { +bool TDEToolBarPopupAction::stickyMenu() const { return m_stickyMenu; } -void KToolBarPopupAction::setStickyMenu(bool sticky) { +void TDEToolBarPopupAction::setStickyMenu(bool sticky) { m_stickyMenu = sticky; } -int KToolBarPopupAction::plug( TQWidget *widget, int index ) +int TDEToolBarPopupAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - // This is very related to KActionMenu::plug. - // In fact this class could be an interesting base class for KActionMenu - if ( ::tqqt_cast( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) { bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, @@ -1982,42 +1982,42 @@ int KToolBarPopupAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KAction::plug( widget, index ); + return TDEAction::plug( widget, index ); } -KPopupMenu *KToolBarPopupAction::popupMenu() const +TDEPopupMenu *TDEToolBarPopupAction::popupMenu() const { if ( !m_popup ) { - KToolBarPopupAction *that = const_cast(this); - that->m_popup = new KPopupMenu; + TDEToolBarPopupAction *that = const_cast(this); + that->m_popup = new TDEPopupMenu; } return m_popup; } //////// -KToggleToolBarAction::KToggleToolBarAction( const char* toolBarName, - const TQString& text, KActionCollection* parent, const char* name ) - : KToggleAction( text, KShortcut(), parent, name ) +TDEToggleToolBarAction::TDEToggleToolBarAction( const char* toolBarName, + const TQString& text, TDEActionCollection* parent, const char* name ) + : TDEToggleAction( text, TDEShortcut(), parent, name ) , m_toolBarName( toolBarName ) , m_toolBar( 0L ) { } -KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const TQString &text, - KActionCollection *parent, const char *name ) - : KToggleAction( text, KShortcut(), parent, name ) +TDEToggleToolBarAction::TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text, + TDEActionCollection *parent, const char *name ) + : TDEToggleAction( text, TDEShortcut(), parent, name ) , m_toolBarName( 0 ), m_toolBar( toolBar ) { } -KToggleToolBarAction::~KToggleToolBarAction() +TDEToggleToolBarAction::~TDEToggleToolBarAction() { } -int KToggleToolBarAction::plug( TQWidget* w, int index ) +int TDEToggleToolBarAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; if ( !m_toolBar ) { @@ -2027,7 +2027,7 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - KMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow if ( mw ) m_toolBar = mw->toolBar( m_toolBarName ); @@ -2042,10 +2042,10 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) setEnabled( false ); } - return KToggleAction::plug( w, index ); + return TDEToggleAction::plug( w, index ); } -void KToggleToolBarAction::setChecked( bool c ) +void TDEToggleToolBarAction::setChecked( bool c ) { if( m_toolBar && c != m_toolBar->isVisible() ) { if( c ) { @@ -2054,29 +2054,29 @@ void KToggleToolBarAction::setChecked( bool c ) m_toolBar->hide(); } TQMainWindow* mw = m_toolBar->mainWindow(); - if ( mw && ::tqqt_cast( mw ) ) - static_cast( mw )->setSettingsDirty(); + if ( mw && ::tqqt_cast( mw ) ) + static_cast( mw )->setSettingsDirty(); } - KToggleAction::setChecked( c ); + TDEToggleAction::setChecked( c ); } //////// -KToggleFullScreenAction::KToggleFullScreenAction( const KShortcut &cut, +TDEToggleFullScreenAction::TDEToggleFullScreenAction( const TDEShortcut &cut, const TQObject* receiver, const char* slot, TQObject* parent, TQWidget* window, const char* name ) - : KToggleAction( TQString::null, cut, receiver, slot, parent, name ), + : TDEToggleAction( TQString::null, cut, receiver, slot, parent, name ), window( NULL ) { setWindow( window ); } -KToggleFullScreenAction::~KToggleFullScreenAction() +TDEToggleFullScreenAction::~TDEToggleFullScreenAction() { } -void KToggleFullScreenAction::setWindow( TQWidget* w ) +void TDEToggleFullScreenAction::setWindow( TQWidget* w ) { if( window ) window->removeEventFilter( this ); @@ -2085,7 +2085,7 @@ void KToggleFullScreenAction::setWindow( TQWidget* w ) window->installEventFilter( this ); } -void KToggleFullScreenAction::setChecked( bool c ) +void TDEToggleFullScreenAction::setChecked( bool c ) { if (c) { @@ -2097,10 +2097,10 @@ void KToggleFullScreenAction::setChecked( bool c ) setText(i18n("F&ull Screen Mode")); setIcon("window_fullscreen"); } - KToggleAction::setChecked( c ); + TDEToggleAction::setChecked( c ); } -bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) +bool TDEToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) { if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(window) ) if( e->type() == TQEvent::WindowStateChange ) @@ -2114,10 +2114,10 @@ bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) //////// KWidgetAction::KWidgetAction( TQWidget* widget, - const TQString& text, const KShortcut& cut, + const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + TDEActionCollection* parent, const char* name ) + : TDEAction( text, cut, receiver, slot, parent, name ) , m_widget( widget ) , m_autoSized( false ) { @@ -2138,7 +2138,7 @@ void KWidgetAction::setAutoSized( bool autoSized ) if( !m_widget || !isPlugged() ) return; - KToolBar* toolBar = (KToolBar*)m_widget->parent(); + TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); int i = findContainer( toolBar ); if ( i == -1 ) return; @@ -2149,11 +2149,11 @@ void KWidgetAction::setAutoSized( bool autoSized ) int KWidgetAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( !::tqqt_cast( w ) ) { - kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into KToolBar." << endl; + if ( !::tqqt_cast( w ) ) { + kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into TDEToolBar." << endl; return -1; } if ( !m_widget ) { @@ -2161,9 +2161,9 @@ int KWidgetAction::plug( TQWidget* w, int index ) return -1; } - KToolBar* toolBar = static_cast( w ); + TDEToolBar* toolBar = static_cast( w ); - int id = KAction::getToolButtonID(); + int id = TDEAction::getToolButtonID(); m_widget->reparent( toolBar, TQPoint() ); toolBar->insertWidget( id, 0, m_widget, index ); @@ -2183,13 +2183,13 @@ void KWidgetAction::unplug( TQWidget *w ) if( !m_widget || !isPlugged() ) return; - KToolBar* toolBar = (KToolBar*)m_widget->parent(); + TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); if ( toolBar == w ) { disconnect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) ); m_widget->reparent( 0L, TQPoint(), false /*showIt*/ ); } - KAction::unplug( w ); + TDEAction::unplug( w ); } void KWidgetAction::slotToolbarDestroyed() @@ -2205,16 +2205,16 @@ void KWidgetAction::slotToolbarDestroyed() //////// -KActionSeparator::KActionSeparator( TQObject *parent, const char *name ) - : KAction( parent, name ) +TDEActionSeparator::TDEActionSeparator( TQObject *parent, const char *name ) + : TDEAction( parent, name ) { } -KActionSeparator::~KActionSeparator() +TDEActionSeparator::~TDEActionSeparator() { } -int KActionSeparator::plug( TQWidget *widget, int index ) +int TDEActionSeparator::plug( TQWidget *widget, int index ) { if ( ::tqqt_cast( widget) ) { @@ -2239,9 +2239,9 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast( widget ) ) + else if ( ::tqqt_cast( widget ) ) { - KToolBar *toolBar = static_cast( widget ); + TDEToolBar *toolBar = static_cast( widget ); int id = toolBar->insertSeparator( index ); @@ -2255,40 +2255,40 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return -1; } -KPasteTextAction::KPasteTextAction( const TQString& text, +TDEPasteTextAction::TDEPasteTextAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name) - : KAction( text, icon, cut, receiver, slot, parent, name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { - m_popup = new KPopupMenu; + m_popup = new TDEPopupMenu; connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); m_popup->setCheckable(true); m_mixedMode = true; } -KPasteTextAction::~KPasteTextAction() +TDEPasteTextAction::~TDEPasteTextAction() { delete m_popup; } -void KPasteTextAction::setMixedMode(bool mode) +void TDEPasteTextAction::setMixedMode(bool mode) { m_mixedMode = mode; } -int KPasteTextAction::plug( TQWidget *widget, int index ) +int TDEPasteTextAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast( widget ) ) + if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); TDEInstance * instance; if ( m_parentCollection ) @@ -2312,10 +2312,10 @@ int KPasteTextAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KAction::plug( widget, index ); + return TDEAction::plug( widget, index ); } -void KPasteTextAction::menuAboutToShow() +void TDEPasteTextAction::menuAboutToShow() { m_popup->clear(); TQStringList list; @@ -2343,7 +2343,7 @@ void KPasteTextAction::menuAboutToShow() } } -void KPasteTextAction::menuItemActivated( int id) +void TDEPasteTextAction::menuItemActivated( int id) { DCOPClient *client = kapp->dcopClient(); if (client->isAttached() && client->isApplicationRegistered("klipper")) { @@ -2359,7 +2359,7 @@ void KPasteTextAction::menuItemActivated( int id) TQTimer::singleShot(20, this, TQT_SLOT(slotActivated())); } -void KPasteTextAction::slotActivated() +void TDEPasteTextAction::slotActivated() { if (!m_mixedMode) { TQWidget *w = tqApp->widgetAt(TQCursor::pos(), true); @@ -2367,53 +2367,53 @@ void KPasteTextAction::slotActivated() if (!data->provides("text/plain") && w) { m_popup->popup(w->mapToGlobal(TQPoint(0, w->height()))); } else - KAction::slotActivated(); + TDEAction::slotActivated(); } else - KAction::slotActivated(); + TDEAction::slotActivated(); } -void KToggleAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEToggleAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KRadioAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDERadioAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } -void KSelectAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDESelectAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KListAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEListAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KRecentFilesAction::virtual_hook( int id, void* data ) -{ KListAction::virtual_hook( id, data ); } +void TDERecentFilesAction::virtual_hook( int id, void* data ) +{ TDEListAction::virtual_hook( id, data ); } -void KFontAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEFontAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KFontSizeAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEFontSizeAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KActionMenu::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEActionMenu::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KToolBarPopupAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEToolBarPopupAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KToggleToolBarAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDEToggleToolBarAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } -void KToggleFullScreenAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDEToggleFullScreenAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } void KWidgetAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +{ TDEAction::virtual_hook( id, data ); } -void KActionSeparator::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEActionSeparator::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KPasteTextAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEPasteTextAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } /* vim: et sw=2 ts=2 */ diff --git a/tdeui/kactionclasses.h b/tdeui/kactionclasses.h index ec63cd36b..07078a722 100644 --- a/tdeui/kactionclasses.h +++ b/tdeui/kactionclasses.h @@ -44,18 +44,18 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEConfig; class TDEConfigBase; class KURL; class TDEInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; /** * @short Checkbox like action. @@ -65,7 +65,7 @@ class KMainWindow; * This action provides two states: checked or not. * */ -class TDEUI_EXPORT KToggleAction : public KAction +class TDEUI_EXPORT TDEToggleAction : public TDEAction { Q_OBJECT @@ -83,7 +83,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDEToggleAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -93,7 +93,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -103,7 +103,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -113,7 +113,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -125,7 +125,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -137,7 +137,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -145,12 +145,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( TQObject* parent = 0, const char* name = 0 ); + TDEToggleAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KToggleAction(); + virtual ~TDEToggleAction(); /** * "Plug" or insert this action into a given widget. @@ -158,7 +158,7 @@ public: * This will typically be a menu or a toolbar. From this point * on, you will never need to directly manipulate the item in the * menu or toolbar. You do all enabling/disabling/manipulation - * directly with your KToggleAction object. + * directly with your TDEToggleAction object. * * @param widget The GUI element to display this action. * @param index The index of the item. @@ -218,8 +218,8 @@ signals: protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleActionPrivate; - KToggleActionPrivate *d; + class TDEToggleActionPrivate; + TDEToggleActionPrivate *d; }; /** @@ -228,7 +228,7 @@ private: * An action that operates like a radio button. At any given time * only a single action from the group will be active. */ -class TDEUI_EXPORT KRadioAction : public KToggleAction +class TDEUI_EXPORT TDERadioAction : public TDEToggleAction { Q_OBJECT @@ -243,7 +243,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDERadioAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -253,7 +253,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const KShortcut& cut, + TDERadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -263,7 +263,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -273,7 +273,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -285,7 +285,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -297,7 +297,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -305,7 +305,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( TQObject* parent = 0, const char* name = 0 ); + TDERadioAction( TQObject* parent = 0, const char* name = 0 ); protected: virtual void slotActivated(); @@ -313,8 +313,8 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KRadioActionPrivate; - KRadioActionPrivate *d; + class TDERadioActionPrivate; + TDERadioActionPrivate *d; }; /** @@ -328,7 +328,7 @@ private: * the formerly checked item becomes unchecked. * There can be only one item checked at a time. */ -class TDEUI_EXPORT KSelectAction : public KAction +class TDEUI_EXPORT TDESelectAction : public TDEAction { Q_OBJECT @@ -350,7 +350,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDESelectAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -360,7 +360,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const KShortcut& cut, + TDESelectAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -370,7 +370,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -380,7 +380,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -392,7 +392,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -404,7 +404,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -412,12 +412,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( TQObject* parent = 0, const char* name = 0 ); + TDESelectAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KSelectAction(); + virtual ~TDESelectAction(); /** * "Plug" or insert this action into a given widget. @@ -425,7 +425,7 @@ public: * This will typically be a menu or a toolbar. * From this point on, you will never need to directly * manipulate the item in the menu or toolbar. - * You do all enabling/disabling/manipulation directly with your KSelectAction object. + * You do all enabling/disabling/manipulation directly with your TDESelectAction object. * * @param widget The GUI element to display this action. * @param index The index of the item. @@ -572,16 +572,16 @@ protected: virtual void virtual_hook( int id, void* data ); private: void setupMenu() const; - class KSelectActionPrivate; - KSelectActionPrivate *d; + class TDESelectActionPrivate; + TDESelectActionPrivate *d; }; -/// Remove this class in KDE-4.0. It doesn't add _anything_ to KSelectAction +/// Remove this class in KDE-4.0. It doesn't add _anything_ to TDESelectAction /** - * @deprecated Use KSelectAction instead. + * @deprecated Use TDESelectAction instead. */ -class TDEUI_EXPORT_DEPRECATED KListAction : public KSelectAction +class TDEUI_EXPORT_DEPRECATED TDEListAction : public TDESelectAction { Q_OBJECT @@ -596,7 +596,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEListAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -607,7 +607,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, + TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -617,7 +617,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -627,7 +627,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -639,7 +639,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -652,7 +652,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -660,12 +660,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( TQObject* parent = 0, const char* name = 0 ); + TDEListAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KListAction(); + virtual ~TDEListAction(); virtual TQString currentText() const; @@ -683,8 +683,8 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KListActionPrivate; - KListActionPrivate *d; + class TDEListActionPrivate; + TDEListActionPrivate *d; }; /** @@ -697,7 +697,7 @@ private: * * @author Michael Koch */ -class TDEUI_EXPORT KRecentFilesAction : public KListAction // TODO public KSelectAction +class TDEUI_EXPORT TDERecentFilesAction : public TDEListAction // TODO public TDESelectAction { Q_OBJECT @@ -710,7 +710,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -724,7 +724,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -737,7 +737,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -749,7 +749,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -764,7 +764,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -780,7 +780,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -790,13 +790,13 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( TQObject* parent = 0, const char* name = 0, + TDERecentFilesAction( TQObject* parent = 0, const char* name = 0, uint maxItems = 10 ); /** * Destructor. */ - virtual ~KRecentFilesAction(); + virtual ~TDERecentFilesAction(); virtual int plug( TQWidget *widget, int index = -1 ); @@ -903,44 +903,44 @@ protected: private: void init(); - class KRecentFilesActionPrivate; - KRecentFilesActionPrivate *d; + class TDERecentFilesActionPrivate; + TDERecentFilesActionPrivate *d; }; -class TDEUI_EXPORT KFontAction : public KSelectAction +class TDEUI_EXPORT TDEFontAction : public TDESelectAction { Q_OBJECT TQ_PROPERTY( TQString font READ font WRITE setFont ) public: - KFontAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const KShortcut& cut, + TDEFontAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); // The ctors with fontListCriteria were added after 3.3-beta1. // This define is used in koffice. Remove when koffice has a dependency on tdelibs-3.3 or more. #define KFONTACTION_HAS_CRITERIA_ARG - KFontAction( uint fontListCriteria, const TQString& text, - const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontAction( uint fontListCriteria, const TQString& text, + const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, - const KShortcut& cut = KShortcut(), + TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, + const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( TQObject* parent = 0, const char* name = 0 ); - ~KFontAction(); + TDEFontAction( TQObject* parent = 0, const char* name = 0 ); + ~TDEFontAction(); TQString font() const { return currentText(); @@ -954,33 +954,33 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontActionPrivate; - KFontActionPrivate *d; + class TDEFontActionPrivate; + TDEFontActionPrivate *d; }; -class TDEUI_EXPORT KFontSizeAction : public KSelectAction +class TDEUI_EXPORT TDEFontSizeAction : public TDESelectAction { Q_OBJECT TQ_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) public: - KFontSizeAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontSizeAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, + TDEFontSizeAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( TQObject* parent = 0, const char* name = 0 ); + TDEFontSizeAction( TQObject* parent = 0, const char* name = 0 ); - virtual ~KFontSizeAction(); + virtual ~TDEFontSizeAction(); virtual int fontSize() const; @@ -990,7 +990,7 @@ public slots: protected slots: virtual void slotActivated( int ); virtual void slotActivated( const TQString& ); - virtual void slotActivated() { KAction::slotActivated(); } + virtual void slotActivated() { TDEAction::slotActivated(); } signals: void fontSizeChanged( int ); @@ -1002,22 +1002,22 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontSizeActionPrivate; - KFontSizeActionPrivate *d; + class TDEFontSizeActionPrivate; + TDEFontSizeActionPrivate *d; }; /** - * A KActionMenu is an action that holds a sub-menu of other actions. + * A TDEActionMenu is an action that holds a sub-menu of other actions. * insert() and remove() allow to insert and remove actions into this action-menu. * Plugged in a popupmenu, it will create a submenu. * Plugged in a toolbar, it will create a button with a popup menu. * * This is the action used by the XMLGUI since it holds other actions. - * If you want a submenu for selecting one tool among many (without icons), see KSelectAction. + * If you want a submenu for selecting one tool among many (without icons), see TDESelectAction. * See also setDelayed about the main action. */ -class TDEUI_EXPORT KActionMenu : public KAction +class TDEUI_EXPORT TDEActionMenu : public TDEAction { Q_OBJECT @@ -1025,29 +1025,29 @@ class TDEUI_EXPORT KActionMenu : public KAction TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) public: - KActionMenu( const TQString& text, TQObject* parent = 0, + TDEActionMenu( const TQString& text, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( const TQString& text, const TQIconSet& icon, + TDEActionMenu( const TQString& text, const TQIconSet& icon, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( const TQString& text, const TQString& icon, + TDEActionMenu( const TQString& text, const TQString& icon, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( TQObject* parent = 0, const char* name = 0 ); - virtual ~KActionMenu(); + TDEActionMenu( TQObject* parent = 0, const char* name = 0 ); + virtual ~TDEActionMenu(); - virtual void insert( KAction*, int index = -1 ); - virtual void remove( KAction* ); + virtual void insert( TDEAction*, int index = -1 ); + virtual void remove( TDEAction* ); - KPopupMenu* popupMenu() const; + TDEPopupMenu* popupMenu() const; void popup( const TQPoint& global ); /** * Returns true if this action creates a delayed popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. */ bool delayed() const; /** * If set to true, this action will create a delayed popup menu - * when plugged in a KToolbar. Otherwise it creates a normal popup. + * when plugged in a TDEToolbar. Otherwise it creates a normal popup. * Default: delayed * * Remember that if the "main" action (the toolbar button itself) @@ -1056,7 +1056,7 @@ public: * On the opposite, if the main action can be clicked, it can only happen * in a toolbar: in a menu, the parent of a submenu can't be activated. * To get a "normal" menu item when plugged a menu (and no submenu) - * use KToolBarPopupAction. + * use TDEToolBarPopupAction. */ void setDelayed(bool _delayed); @@ -1067,7 +1067,7 @@ public: bool stickyMenu() const; /** * If set to true, this action will create a sticky popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. * "Sticky", means it's visible until a selection is made or the mouse is * clicked elsewhere. This feature allows you to make a selection without * having to press and hold down the mouse while making a selection. @@ -1080,8 +1080,8 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - class KActionMenuPrivate; - KActionMenuPrivate *d; + class TDEActionMenuPrivate; + TDEActionMenuPrivate *d; }; /** @@ -1091,7 +1091,7 @@ private: * that has more detail in a toolbar than in a menu (e.g. tool chooser * with "Other" leading to a dialog...). */ -class TDEUI_EXPORT KToolBarPopupAction : public KAction +class TDEUI_EXPORT TDEToolBarPopupAction : public TDEAction { Q_OBJECT @@ -1102,7 +1102,7 @@ public: //Not all constructors - because we need an icon, since this action only makes // sense when being plugged at least in a toolbar. /** - * Create a KToolBarPopupAction, with a text, an icon, an optional accelerator, + * Create a TDEToolBarPopupAction, with a text, an icon, an optional accelerator, * parent and name. * * @param text The text that will be displayed. @@ -1111,11 +1111,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut = KShortcut(), + TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** - * Create a KToolBarPopupAction, with a text, an icon, an accelerator, + * Create a TDEToolBarPopupAction, with a text, an icon, an accelerator, * a slot connected to the action, parent and name. * * If you do not want or have a keyboard accelerator, set the @@ -1129,12 +1129,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut, + TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ); /** - * Create a KToolBarPopupAction, with a KGuiItem, an accelerator, + * Create a TDEToolBarPopupAction, with a KGuiItem, an accelerator, * a slot connected to the action, parent and name. The text and the * icon are taken from the KGuiItem. * @@ -1148,11 +1148,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const KGuiItem& item, const KShortcut& cut, + TDEToolBarPopupAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); - virtual ~KToolBarPopupAction(); + virtual ~TDEToolBarPopupAction(); virtual int plug( TQWidget *widget, int index = -1 ); @@ -1161,16 +1161,16 @@ public: * button. You may want to plug items into it on creation, or connect to * aboutToShow for a more dynamic menu. */ - KPopupMenu *popupMenu() const; + TDEPopupMenu *popupMenu() const; /** * Returns true if this action creates a delayed popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. */ bool delayed() const; /** * If set to true, this action will create a delayed popup menu - * when plugged in a KToolbar. Otherwise it creates a normal popup. + * when plugged in a TDEToolbar. Otherwise it creates a normal popup. * Default: delayed. */ void setDelayed(bool delayed); @@ -1181,7 +1181,7 @@ public: bool stickyMenu() const; /** * If set to true, this action will create a sticky popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. * "Sticky", means it's visible until a selection is made or the mouse is * clicked elsewhere. This feature allows you to make a selection without * having to press and hold down the mouse while making a selection. @@ -1191,14 +1191,14 @@ public: void setStickyMenu(bool sticky); private: - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_delayed:1; bool m_stickyMenu:1; protected: virtual void virtual_hook( int id, void* data ); private: - class KToolBarPopupActionPrivate; - KToolBarPopupActionPrivate *d; + class TDEToolBarPopupActionPrivate; + TDEToolBarPopupActionPrivate *d; }; /** @@ -1214,38 +1214,38 @@ private: * visibility has changed, whenever it changes. * @since 3.1 */ -class TDEUI_EXPORT KToggleToolBarAction : public KToggleAction +class TDEUI_EXPORT TDEToggleToolBarAction : public TDEToggleAction { Q_OBJECT public: /** - * Create a KToggleToolbarAction that manages the toolbar + * Create a TDEToggleToolbarAction that manages the toolbar * named toolBarName. This can be either the name of a * toolbar in an xml ui file, or a toolbar programmatically * created with that name. */ - KToggleToolBarAction( const char* toolBarName, const TQString& text, - KActionCollection* parent, const char* name ); - KToggleToolBarAction( KToolBar *toolBar, const TQString &text, - KActionCollection *parent, const char *name ); - virtual ~KToggleToolBarAction(); + TDEToggleToolBarAction( const char* toolBarName, const TQString& text, + TDEActionCollection* parent, const char* name ); + TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text, + TDEActionCollection *parent, const char *name ); + virtual ~TDEToggleToolBarAction(); virtual int plug( TQWidget * widget, int index = -1 ); - KToolBar *toolBar() { return m_toolBar; } + TDEToolBar *toolBar() { return m_toolBar; } public slots: virtual void setChecked( bool ); private: TQCString m_toolBarName; - TQGuardedPtr m_toolBar; + TQGuardedPtr m_toolBar; protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleToolBarActionPrivate; - KToggleToolBarActionPrivate *d; + class TDEToggleToolBarActionPrivate; + TDEToggleToolBarActionPrivate *d; }; /** @@ -1261,13 +1261,13 @@ private: * still needs to explicitly set the window state though. * @since 3.2 */ -class TDEUI_EXPORT KToggleFullScreenAction : public KToggleAction +class TDEUI_EXPORT TDEToggleFullScreenAction : public TDEToggleAction { Q_OBJECT public: /** - * Create a KToggleFullScreenAction + * Create a TDEToggleFullScreenAction * @param cut The corresponding keyboard accelerator (shortcut). * @param receiver The SLOT's parent. * @param slot The TQT_SLOT to invoke to execute this action. @@ -1275,11 +1275,11 @@ public: * @param window the window that will switch to/from full screen mode * @param name An internal name for this action. */ - KToggleFullScreenAction( const KShortcut &cut, + TDEToggleFullScreenAction( const TDEShortcut &cut, const TQObject* receiver, const char* slot, TQObject* parent, TQWidget* window, const char* name ); - virtual ~KToggleFullScreenAction(); + virtual ~TDEToggleFullScreenAction(); /** * Sets the window that will be related to this action. @@ -1297,8 +1297,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleFullScreenActionPrivate; - KToggleFullScreenActionPrivate *d; + class TDEToggleFullScreenActionPrivate; + TDEToggleFullScreenActionPrivate *d; }; @@ -1306,7 +1306,7 @@ private: * An action that automatically embeds a widget into a * toolbar. */ -class TDEUI_EXPORT KWidgetAction : public KAction +class TDEUI_EXPORT KWidgetAction : public TDEAction { Q_OBJECT @@ -1317,9 +1317,9 @@ public: * a toolbar. */ KWidgetAction( TQWidget* widget, const TQString& text, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); virtual ~KWidgetAction(); /** @@ -1331,7 +1331,7 @@ public: /** * Plug the action. The widget passed to the constructor - * will be reparented to w, which must inherit KToolBar. + * will be reparented to w, which must inherit TDEToolBar. */ virtual int plug( TQWidget* widget, int index = -1 ); /** @@ -1351,21 +1351,21 @@ private: KWidgetActionPrivate *d; }; -class TDEUI_EXPORT KActionSeparator : public KAction +class TDEUI_EXPORT TDEActionSeparator : public TDEAction { Q_OBJECT public: - KActionSeparator( TQObject* parent = 0, const char* name = 0 ); - virtual ~KActionSeparator(); + TDEActionSeparator( TQObject* parent = 0, const char* name = 0 ); + virtual ~TDEActionSeparator(); virtual int plug( TQWidget *widget, int index = -1 ); protected: virtual void virtual_hook( int id, void* data ); private: - class KActionSeparatorPrivate; - KActionSeparatorPrivate *d; + class TDEActionSeparatorPrivate; + TDEActionSeparatorPrivate *d; }; /** @@ -1378,13 +1378,13 @@ private: * * @since 3.2 */ -class TDEUI_EXPORT KPasteTextAction: public KAction +class TDEUI_EXPORT TDEPasteTextAction: public TDEAction { Q_OBJECT public: /** - * Create a KPasteTextAction, with a text, an icon, an accelerator, + * Create a TDEPasteTextAction, with a text, an icon, an accelerator, * a slot connected to the action, parent and name. * * If you do not want or have a keyboard accelerator, set the @@ -1398,11 +1398,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KPasteTextAction( const TQString& text, const TQString& icon, const KShortcut& cut, + TDEPasteTextAction( const TQString& text, const TQString& icon, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ); - virtual ~KPasteTextAction(); + virtual ~TDEPasteTextAction(); /** * Controls the behavior of the clipboard history menu popup. @@ -1427,10 +1427,10 @@ protected: virtual void virtual_hook( int id, void* data ); private: - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_mixedMode; - class KPasteTextActionPrivate; - KPasteTextActionPrivate *d; + class TDEPasteTextActionPrivate; + TDEPasteTextActionPrivate *d; }; #endif diff --git a/tdeui/kactioncollection.cpp b/tdeui/kactioncollection.cpp index c841b2730..74f273994 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/kactioncollection.cpp @@ -38,17 +38,17 @@ #include #include -class KActionCollection::KActionCollectionPrivate +class TDEActionCollection::TDEActionCollectionPrivate { public: - KActionCollectionPrivate() + TDEActionCollectionPrivate() { m_instance = 0; - //m_bOneKAccelOnly = false; + //m_bOneTDEAccelOnly = false; //m_iWidgetCurrent = 0; m_bAutoConnectShortcuts = true; m_widget = 0; - m_kaccel = m_builderKAccel = 0; + m_kaccel = m_builderTDEAccel = 0; m_dctHighlightContainers.setAutoDelete( true ); m_highlight = false; m_currentHighlightAction = 0; @@ -59,169 +59,169 @@ public: TDEInstance *m_instance; TQString m_sXMLFile; bool m_bAutoConnectShortcuts; - //bool m_bOneKAccelOnly; + //bool m_bOneTDEAccelOnly; //int m_iWidgetCurrent; //TQValueList m_widgetList; - //TQValueList m_kaccelList; - TQValueList m_docList; + //TQValueList m_kaccelList; + TQValueList m_docList; TQWidget *m_widget; - KAccel *m_kaccel; - KAccel *m_builderKAccel; + TDEAccel *m_kaccel; + TDEAccel *m_builderTDEAccel; - TQAsciiDict m_actionDict; - TQPtrDict< TQPtrList > m_dctHighlightContainers; + TQAsciiDict m_actionDict; + TQPtrDict< TQPtrList > m_dctHighlightContainers; bool m_highlight; - KAction *m_currentHighlightAction; + TDEAction *m_currentHighlightAction; bool m_statusCleared; const KXMLGUIClient *m_parentGUIClient; }; -KActionCollection::KActionCollection( TQWidget *parent, const char *name, +TDEActionCollection::TDEActionCollection( TQWidget *parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis + d = new TDEActionCollectionPrivate; if( parent ) setWidget( parent ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( TQWidget *watch, TQObject* parent, const char *name, +TDEActionCollection::TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis + d = new TDEActionCollectionPrivate; if( watch ) setWidget( watch ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection::KActionCollection( TQObject *parent, const char *name, +TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdWarning(129) << "KActionCollection::KActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis + kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdDebug(129) << kdBacktrace() << endl; - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; TQWidget* w = tqt_dynamic_cast( parent ); if( w ) setWidget( w ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( const KActionCollection © ) +TDEActionCollection::TDEActionCollection( const TDEActionCollection © ) : TQObject() { - kdWarning(129) << "KActionCollection::KActionCollection( const KActionCollection & ): function is severely deprecated." << endl; - d = new KActionCollectionPrivate; + kdWarning(129) << "TDEActionCollection::TDEActionCollection( const TDEActionCollection & ): function is severely deprecated." << endl; + d = new TDEActionCollectionPrivate; *this = copy; } #endif // KDE 4: remove end -KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *parent ) +TDEActionCollection::TDEActionCollection( const char *name, const KXMLGUIClient *parent ) : TQObject( 0L, name ) { - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; d->m_parentGUIClient=parent; d->m_instance=parent->instance(); } -KActionCollection::~KActionCollection() +TDEActionCollection::~TDEActionCollection() { - kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; - for ( TQAsciiDictIterator it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + kdDebug(129) << "TDEActionCollection::~TDEActionCollection(): this = " << this << endl; + for ( TQAsciiDictIterator it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) pAction->m_parentCollection = 0L; } delete d->m_kaccel; - delete d->m_builderKAccel; + delete d->m_builderTDEAccel; delete d; d = 0; } -void KActionCollection::setWidget( TQWidget* w ) +void TDEActionCollection::setWidget( TQWidget* w ) { //if ( d->m_actionDict.count() > 0 ) { - // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; + // kdError(129) << "TDEActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; // kdDebug(129) << kdBacktrace() << endl; //} //else if ( !d->m_widget ) { d->m_widget = w; - d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" ); + d->m_kaccel = new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ); } else if ( d->m_widget != w ) - kdWarning(129) << "KActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; + kdWarning(129) << "TDEActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; } -void KActionCollection::setAutoConnectShortcuts( bool b ) +void TDEActionCollection::setAutoConnectShortcuts( bool b ) { d->m_bAutoConnectShortcuts = b; } -bool KActionCollection::isAutoConnectShortcuts() +bool TDEActionCollection::isAutoConnectShortcuts() { return d->m_bAutoConnectShortcuts; } -bool KActionCollection::addDocCollection( KActionCollection* pDoc ) +bool TDEActionCollection::addDocCollection( TDEActionCollection* pDoc ) { d->m_docList.append( pDoc ); return true; } -void KActionCollection::beginXMLPlug( TQWidget *widget ) +void TDEActionCollection::beginXMLPlug( TQWidget *widget ) { - kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl; + kdDebug(129) << "TDEActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderTDEAccel = " << d->m_builderTDEAccel << endl; - if( widget && !d->m_builderKAccel ) { - d->m_builderKAccel = new KAccel( widget, this, "KActionCollection-BuilderKAccel" ); + if( widget && !d->m_builderTDEAccel ) { + d->m_builderTDEAccel = new TDEAccel( widget, this, "TDEActionCollection-BuilderTDEAccel" ); } } -void KActionCollection::endXMLPlug() +void TDEActionCollection::endXMLPlug() { - kdDebug(129) << "KActionCollection::endXMLPlug(): this = " << this << endl; + kdDebug(129) << "TDEActionCollection::endXMLPlug(): this = " << this << endl; //s_kaccelXML = 0; } -void KActionCollection::prepareXMLUnplug() +void TDEActionCollection::prepareXMLUnplug() { - kdDebug(129) << "KActionCollection::prepareXMLUnplug(): this = " << this << endl; + kdDebug(129) << "TDEActionCollection::prepareXMLUnplug(): this = " << this << endl; unplugShortcuts( d->m_kaccel ); - if( d->m_builderKAccel ) { - unplugShortcuts( d->m_builderKAccel ); - delete d->m_builderKAccel; - d->m_builderKAccel = 0; + if( d->m_builderTDEAccel ) { + unplugShortcuts( d->m_builderTDEAccel ); + delete d->m_builderTDEAccel; + d->m_builderTDEAccel = 0; } } -void KActionCollection::unplugShortcuts( KAccel* kaccel ) +void TDEActionCollection::unplugShortcuts( TDEAccel* kaccel ) { - for ( TQAsciiDictIterator it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); - pAction->removeKAccel( kaccel ); + for ( TQAsciiDictIterator it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); + pAction->removeTDEAccel( kaccel ); } for( uint i = 0; i < d->m_docList.count(); i++ ) d->m_docList[i]->unplugShortcuts( kaccel ); } -/*void KActionCollection::addWidget( TQWidget* w ) +/*void TDEActionCollection::addWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::addWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::addWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { d->m_iWidgetCurrent = i; @@ -230,25 +230,25 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel ) } d->m_iWidgetCurrent = d->m_widgetList.count(); d->m_widgetList.append( w ); - d->m_kaccelList.append( new KAccel( w, this, "KActionCollection-KAccel" ) ); + d->m_kaccelList.append( new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ) ); } } -void KActionCollection::removeWidget( TQWidget* w ) +void TDEActionCollection::removeWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::removeWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::removeWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { - // Remove KAccel object from children. - KAccel* pKAccel = d->m_kaccelList[i]; - for ( TQAsciiDictIterator it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + // Remove TDEAccel object from children. + TDEAccel* pTDEAccel = d->m_kaccelList[i]; + for ( TQAsciiDictIterator it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) { - pAction->removeKAccel( pKAccel ); + pAction->removeTDEAccel( pTDEAccel ); } } - delete pKAccel; + delete pTDEAccel; d->m_widgetList.remove( d->m_widgetList.at( i ) ); d->m_kaccelList.remove( d->m_kaccelList.at( i ) ); @@ -260,26 +260,26 @@ void KActionCollection::removeWidget( TQWidget* w ) return; } } - kdWarning(129) << "KActionCollection::removeWidget( " << w << " ): widget not in list." << endl; + kdWarning(129) << "TDEActionCollection::removeWidget( " << w << " ): widget not in list." << endl; } } -bool KActionCollection::ownsKAccel() const +bool TDEActionCollection::ownsTDEAccel() const { - return d->m_bOneKAccelOnly; + return d->m_bOneTDEAccelOnly; } -uint KActionCollection::widgetCount() const +uint TDEActionCollection::widgetCount() const { return d->m_widgetList.count(); } -const KAccel* KActionCollection::widgetKAccel( uint i ) const +const TDEAccel* TDEActionCollection::widgetTDEAccel( uint i ) const { return d->m_kaccelList[i]; }*/ -KAccel* KActionCollection::kaccel() +TDEAccel* TDEActionCollection::kaccel() { //if( d->m_kaccelList.count() > 0 ) // return d->m_kaccelList[d->m_iWidgetCurrent]; @@ -288,7 +288,7 @@ KAccel* KActionCollection::kaccel() return d->m_kaccel; } -const KAccel* KActionCollection::kaccel() const +const TDEAccel* TDEActionCollection::kaccel() const { //if( d->m_kaccelList.count() > 0 ) // return d->m_kaccelList[d->m_iWidgetCurrent]; @@ -299,7 +299,7 @@ const KAccel* KActionCollection::kaccel() const // Return the key to use in d->m_actionDict for the given action. // Usually name(), except when unnamed. -static const char* actionDictKey( KAction* action, char* buffer ) +static const char* actionDictKey( TDEAction* action, char* buffer ) { const char* name = action->name(); if( !qstrcmp( name, "unnamed" ) ) @@ -310,11 +310,11 @@ static const char* actionDictKey( KAction* action, char* buffer ) return name; } -void KActionCollection::_insert( KAction* action ) +void TDEActionCollection::_insert( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict[ name ]; + TDEAction *a = d->m_actionDict[ name ]; if ( a == action ) return; @@ -323,12 +323,12 @@ void KActionCollection::_insert( KAction* action ) emit inserted( action ); } -void KActionCollection::_remove( KAction* action ) +void TDEActionCollection::_remove( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return; @@ -338,12 +338,12 @@ void KActionCollection::_remove( KAction* action ) delete a; } -KAction* KActionCollection::_take( KAction* action ) +TDEAction* TDEActionCollection::_take( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return 0; @@ -355,30 +355,30 @@ KAction* KActionCollection::_take( KAction* action ) return a; } -void KActionCollection::_clear() +void TDEActionCollection::_clear() { - TQAsciiDictIterator it( d->m_actionDict ); + TQAsciiDictIterator it( d->m_actionDict ); while ( it.current() ) _remove( it.current() ); } -void KActionCollection::insert( KAction* action ) { _insert( action ); } -void KActionCollection::remove( KAction* action ) { _remove( action ); } -KAction* KActionCollection::take( KAction* action ) { return _take( action ); } -void KActionCollection::clear() { _clear(); } -KAccel* KActionCollection::accel() { return kaccel(); } -const KAccel* KActionCollection::accel() const { return kaccel(); } -KAccel* KActionCollection::builderKAccel() const { return d->m_builderKAccel; } +void TDEActionCollection::insert( TDEAction* action ) { _insert( action ); } +void TDEActionCollection::remove( TDEAction* action ) { _remove( action ); } +TDEAction* TDEActionCollection::take( TDEAction* action ) { return _take( action ); } +void TDEActionCollection::clear() { _clear(); } +TDEAccel* TDEActionCollection::accel() { return kaccel(); } +const TDEAccel* TDEActionCollection::accel() const { return kaccel(); } +TDEAccel* TDEActionCollection::builderTDEAccel() const { return d->m_builderTDEAccel; } -KAction* KActionCollection::action( const char* name, const char* classname ) const +TDEAction* TDEActionCollection::action( const char* name, const char* classname ) const { - KAction* pAction = 0; + TDEAction* pAction = 0; if ( !classname && name ) pAction = d->m_actionDict[ name ]; else { - TQAsciiDictIterator it( d->m_actionDict ); + TQAsciiDictIterator it( d->m_actionDict ); for( ; it.current(); ++it ) { if ( ( !name || !strcmp( it.current()->name(), name ) ) && @@ -397,34 +397,34 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co return pAction; } -KAction* KActionCollection::action( int index ) const +TDEAction* TDEActionCollection::action( int index ) const { - TQAsciiDictIterator it( d->m_actionDict ); + TQAsciiDictIterator it( d->m_actionDict ); it += index; return it.current(); // return d->m_actions.at( index ); } -bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - return KActionShortcutList(this).readSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList(this).readSettings( sConfigGroup, pConfig ); } -bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const +bool TDEActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const { - return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList((TDEActionCollection*)this).writeSettings( sConfigGroup, pConfig ); } -uint KActionCollection::count() const +uint TDEActionCollection::count() const { return d->m_actionDict.count(); } -TQStringList KActionCollection::groups() const +TQStringList TDEActionCollection::groups() const { TQStringList lst; - TQAsciiDictIterator it( d->m_actionDict ); + TQAsciiDictIterator it( d->m_actionDict ); for( ; it.current(); ++it ) if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) lst.append( it.current()->group() ); @@ -432,11 +432,11 @@ TQStringList KActionCollection::groups() const return lst; } -KActionPtrList KActionCollection::actions( const TQString& group ) const +TDEActionPtrList TDEActionCollection::actions( const TQString& group ) const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator it( d->m_actionDict ); + TQAsciiDictIterator it( d->m_actionDict ); for( ; it.current(); ++it ) if ( it.current()->group() == group ) lst.append( it.current() ); @@ -446,18 +446,18 @@ KActionPtrList KActionCollection::actions( const TQString& group ) const return lst; } -KActionPtrList KActionCollection::actions() const +TDEActionPtrList TDEActionCollection::actions() const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator it( d->m_actionDict ); + TQAsciiDictIterator it( d->m_actionDict ); for( ; it.current(); ++it ) lst.append( it.current() ); return lst; } -void KActionCollection::setInstance( TDEInstance *instance ) +void TDEActionCollection::setInstance( TDEInstance *instance ) { if ( instance ) d->m_instance = instance; @@ -465,41 +465,41 @@ void KActionCollection::setInstance( TDEInstance *instance ) d->m_instance = TDEGlobal::instance(); } -TDEInstance *KActionCollection::instance() const +TDEInstance *TDEActionCollection::instance() const { return d->m_instance; } -void KActionCollection::setXMLFile( const TQString& sXMLFile ) +void TDEActionCollection::setXMLFile( const TQString& sXMLFile ) { d->m_sXMLFile = sXMLFile; } -const TQString& KActionCollection::xmlFile() const +const TQString& TDEActionCollection::xmlFile() const { return d->m_sXMLFile; } -void KActionCollection::setHighlightingEnabled( bool enable ) +void TDEActionCollection::setHighlightingEnabled( bool enable ) { d->m_highlight = enable; } -bool KActionCollection::highlightingEnabled() const +bool TDEActionCollection::highlightingEnabled() const { return d->m_highlight; } -void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::connectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) { - actionList = new TQPtrList; + actionList = new TQPtrList; if ( ::tqqt_cast( container ) ) { @@ -508,7 +508,7 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) connect( container, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotMenuAboutToHide() ) ); } - else if ( ::tqqt_cast( container ) ) + else if ( ::tqqt_cast( container ) ) { connect( container, TQT_SIGNAL( highlighted( int, bool ) ), this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); @@ -523,12 +523,12 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) actionList->append( action ); } -void KActionCollection::disconnectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::disconnectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) return; @@ -539,7 +539,7 @@ void KActionCollection::disconnectHighlight( TQWidget *container, KAction *actio d->m_dctHighlightContainers.remove( container ); } -void KActionCollection::slotMenuItemHighlighted( int id ) +void TDEActionCollection::slotMenuItemHighlighted( int id ) { if ( !d->m_highlight ) return; @@ -565,7 +565,7 @@ void KActionCollection::slotMenuItemHighlighted( int id ) emit actionStatusText( d->m_currentHighlightAction->toolTip() ); } -void KActionCollection::slotMenuAboutToHide() +void TDEActionCollection::slotMenuAboutToHide() { if ( d->m_currentHighlightAction ) emit actionHighlighted( d->m_currentHighlightAction, false ); @@ -576,14 +576,14 @@ void KActionCollection::slotMenuAboutToHide() d->m_statusCleared = true; } -void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) +void TDEActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) { if ( !d->m_highlight ) return; TQWidget *container = const_cast(TQT_TQWIDGET_CONST( sender() )); - KAction *action = findAction( container, id ); + TDEAction *action = findAction( container, id ); if ( !action ) { @@ -604,19 +604,19 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) } } -void KActionCollection::slotDestroyed() +void TDEActionCollection::slotDestroyed() { d->m_dctHighlightContainers.remove( reinterpret_cast( const_cast(TQT_TQOBJECT_CONST(sender())) ) ); } -KAction *KActionCollection::findAction( TQWidget *container, int id ) +TDEAction *TDEActionCollection::findAction( TQWidget *container, int id ) { - TQPtrList *actionList = d->m_dctHighlightContainers[ reinterpret_cast( container ) ]; + TQPtrList *actionList = d->m_dctHighlightContainers[ reinterpret_cast( container ) ]; if ( !actionList ) return 0; - TQPtrListIterator it( *actionList ); + TQPtrListIterator it( *actionList ); for (; it.current(); ++it ) if ( it.current()->isPlugged( container, id ) ) return it.current(); @@ -624,31 +624,31 @@ KAction *KActionCollection::findAction( TQWidget *container, int id ) return 0; } -const KXMLGUIClient *KActionCollection::parentGUIClient() const +const KXMLGUIClient *TDEActionCollection::parentGUIClient() const { return d->m_parentGUIClient; } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection KActionCollection::operator+(const KActionCollection &c ) const +TDEActionCollection TDEActionCollection::operator+(const TDEActionCollection &c ) const { - kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl; - KActionCollection ret( *this ); + kdWarning(129) << "TDEActionCollection::operator+(): function is severely deprecated." << endl; + TDEActionCollection ret( *this ); - TQValueList actions = c.actions(); - TQValueList::ConstIterator it = actions.begin(); - TQValueList::ConstIterator end = actions.end(); + TQValueList actions = c.actions(); + TQValueList::ConstIterator it = actions.begin(); + TQValueList::ConstIterator end = actions.end(); for (; it != end; ++it ) ret.insert( *it ); return ret; } -KActionCollection &KActionCollection::operator=( const KActionCollection © ) +TDEActionCollection &TDEActionCollection::operator=( const TDEActionCollection © ) { - kdWarning(129) << "KActionCollection::operator=(): function is severely deprecated." << endl; - //d->m_bOneKAccelOnly = copy.d->m_bOneKAccelOnly; + kdWarning(129) << "TDEActionCollection::operator=(): function is severely deprecated." << endl; + //d->m_bOneTDEAccelOnly = copy.d->m_bOneTDEAccelOnly; //d->m_iWidgetCurrent = copy.d->m_iWidgetCurrent; //d->m_widgetList = copy.d->m_widgetList; //d->m_kaccelList = copy.d->m_kaccelList; @@ -659,10 +659,10 @@ KActionCollection &KActionCollection::operator=( const KActionCollection © ) return *this; } -KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) +TDEActionCollection &TDEActionCollection::operator+=( const TDEActionCollection &c ) { - kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl; - TQAsciiDictIterator it(c.d->m_actionDict); + kdWarning(129) << "TDEActionCollection::operator+=(): function is severely deprecated." << endl; + TQAsciiDictIterator it(c.d->m_actionDict); for ( ; it.current(); ++it ) insert( it.current() ); @@ -671,44 +671,44 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) #endif // KDE 4: remove end //--------------------------------------------------------------------- -// KActionShortcutList +// TDEActionShortcutList //--------------------------------------------------------------------- -KActionShortcutList::KActionShortcutList( KActionCollection* pColl ) +TDEActionShortcutList::TDEActionShortcutList( TDEActionCollection* pColl ) : m_actions( *pColl ) { } -KActionShortcutList::~KActionShortcutList() +TDEActionShortcutList::~TDEActionShortcutList() { } -uint KActionShortcutList::count() const +uint TDEActionShortcutList::count() const { return m_actions.count(); } -TQString KActionShortcutList::name( uint i ) const +TQString TDEActionShortcutList::name( uint i ) const { return m_actions.action(i)->name(); } -TQString KActionShortcutList::label( uint i ) const +TQString TDEActionShortcutList::label( uint i ) const { return m_actions.action(i)->text(); } -TQString KActionShortcutList::whatsThis( uint i ) const +TQString TDEActionShortcutList::whatsThis( uint i ) const { return m_actions.action(i)->whatsThis(); } -const KShortcut& KActionShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcut( uint i ) const { return m_actions.action(i)->shortcut(); } -const KShortcut& KActionShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcutDefault( uint i ) const { return m_actions.action(i)->shortcutDefault(); } -bool KActionShortcutList::isConfigurable( uint i ) const +bool TDEActionShortcutList::isConfigurable( uint i ) const { return m_actions.action(i)->isShortcutConfigurable(); } -bool KActionShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions.action(i)->setShortcut( cut ); } -const TDEInstance* KActionShortcutList::instance() const +const TDEInstance* TDEActionShortcutList::instance() const { return m_actions.instance(); } -TQVariant KActionShortcutList::getOther( Other, uint ) const +TQVariant TDEActionShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionShortcutList::setOther( Other, uint, TQVariant ) { return false; } -const KAction *KActionShortcutList::action( uint i) const +const TDEAction *TDEActionShortcutList::action( uint i) const { return m_actions.action(i); } -bool KActionShortcutList::save() const +bool TDEActionShortcutList::save() const { const KXMLGUIClient* guiClient=m_actions.parentGUIClient(); const TQString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile(); - kdDebug(129) << "KActionShortcutList::save(): xmlFile = " << xmlFile << endl; + kdDebug(129) << "TDEActionShortcutList::save(): xmlFile = " << xmlFile << endl; if( m_actions.xmlFile().isEmpty() ) return writeSettings(); @@ -756,44 +756,44 @@ bool KActionShortcutList::save() const } //--------------------------------------------------------------------- -// KActionPtrShortcutList +// TDEActionPtrShortcutList //--------------------------------------------------------------------- -KActionPtrShortcutList::KActionPtrShortcutList( KActionPtrList& list ) +TDEActionPtrShortcutList::TDEActionPtrShortcutList( TDEActionPtrList& list ) : m_actions( list ) { } -KActionPtrShortcutList::~KActionPtrShortcutList() +TDEActionPtrShortcutList::~TDEActionPtrShortcutList() { } -uint KActionPtrShortcutList::count() const +uint TDEActionPtrShortcutList::count() const { return m_actions.count(); } -TQString KActionPtrShortcutList::name( uint i ) const +TQString TDEActionPtrShortcutList::name( uint i ) const { return m_actions[i]->name(); } -TQString KActionPtrShortcutList::label( uint i ) const +TQString TDEActionPtrShortcutList::label( uint i ) const { return m_actions[i]->text(); } -TQString KActionPtrShortcutList::whatsThis( uint i ) const +TQString TDEActionPtrShortcutList::whatsThis( uint i ) const { return m_actions[i]->whatsThis(); } -const KShortcut& KActionPtrShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcut( uint i ) const { return m_actions[i]->shortcut(); } -const KShortcut& KActionPtrShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcutDefault( uint i ) const { return m_actions[i]->shortcutDefault(); } -bool KActionPtrShortcutList::isConfigurable( uint i ) const +bool TDEActionPtrShortcutList::isConfigurable( uint i ) const { return m_actions[i]->isShortcutConfigurable(); } -bool KActionPtrShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionPtrShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions[i]->setShortcut( cut ); } -TQVariant KActionPtrShortcutList::getOther( Other, uint ) const +TQVariant TDEActionPtrShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionPtrShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionPtrShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KActionPtrShortcutList::save() const +bool TDEActionPtrShortcutList::save() const { return false; } -void KActionShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionPtrShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionPtrShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionCollection::virtual_hook( int, void* ) +void TDEActionCollection::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 diff --git a/tdeui/kactioncollection.h b/tdeui/kactioncollection.h index 35dd5dc2d..9ef517579 100644 --- a/tdeui/kactioncollection.h +++ b/tdeui/kactioncollection.h @@ -42,29 +42,29 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEConfig; class TDEConfigBase; class KURL; class TDEInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; class KXMLGUIClient; -typedef TQValueList KActionPtrList; +typedef TQValueList TDEActionPtrList; /** - * A managed set of KAction objects. + * A managed set of TDEAction objects. * - * If you set the tooltips on KActions and want the tooltip to show in statusbar + * If you set the tooltips on TDEActions and want the tooltip to show in statusbar * (recommended) then you will need to connect a couple of the actionclass signals * to the toolbar. - * The easiest way of doing this is in your KMainWindow subclass, where you create + * The easiest way of doing this is in your TDEMainWindow subclass, where you create * a statusbar, do: * * \code @@ -75,25 +75,25 @@ typedef TQValueList KActionPtrList; * statusBar(), TQT_SLOT( clear() ) ); * \endcode */ -class TDEUI_EXPORT KActionCollection : public TQObject +class TDEUI_EXPORT TDEActionCollection : public TQObject { - friend class KAction; + friend class TDEAction; friend class KXMLGUIClient; Q_OBJECT public: - KActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 ); + TDEActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 ); /** * Use this constructor if you want the collection's actions to restrict * their accelerator keys to @p watch rather than the @p parent. If * you don't require shortcuts, you can pass a null to the @p watch parameter. */ - KActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, TDEInstance *instance = 0 ); + TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, TDEInstance *instance = 0 ); #ifndef KDE_NO_COMPAT - KActionCollection( const KActionCollection © ); + TDEActionCollection( const TDEActionCollection © ); #endif - virtual ~KActionCollection(); + virtual ~TDEActionCollection(); /** * This sets the widget to which the keyboard shortcuts should be attached. @@ -124,69 +124,69 @@ public: * would have been ScopeWidget, but that would cause some backwards * compatibility problems. */ - //void setDefaultScope( KAction::Scope ); + //void setDefaultScope( TDEAction::Scope ); /** * Doc/View model. This lets you add the action collection of a document * to a view's action collection. */ - bool addDocCollection( KActionCollection* pDoc ); + bool addDocCollection( TDEActionCollection* pDoc ); /** Returns the number of widgets which this collection is associated with. */ //uint widgetCount() const; /** - * Returns true if the collection has its own KAccel object. This will be + * Returns true if the collection has its own TDEAccel object. This will be * the case if it was constructed with a valid widget ptr or if setWidget() * was called. */ - //bool ownsKAccel() const; + //bool ownsTDEAccel() const; /** @deprecated Deprecated because of ambiguous name. Use kaccel() */ - virtual KAccel* accel() KDE_DEPRECATED; + virtual TDEAccel* accel() KDE_DEPRECATED; /** @deprecated Deprecated because of ambiguous name. Use kaccel() */ - virtual const KAccel* accel() const KDE_DEPRECATED; + virtual const TDEAccel* accel() const KDE_DEPRECATED; - /** Returns the KAccel object of the most recently set widget. */ - KAccel* kaccel(); - /** Returns the KAccel object of the most recently set widget. Const version for convenience. */ - const KAccel* kaccel() const; + /** Returns the TDEAccel object of the most recently set widget. */ + TDEAccel* kaccel(); + /** Returns the TDEAccel object of the most recently set widget. Const version for convenience. */ + const TDEAccel* kaccel() const; - /** @internal, for KAction::kaccelCurrent() */ - KAccel* builderKAccel() const; - /** Returns the KAccel object associated with widget #. */ - //KAccel* widgetKAccel( uint i ); - //const KAccel* widgetKAccel( uint i ) const; + /** @internal, for TDEAction::kaccelCurrent() */ + TDEAccel* builderTDEAccel() const; + /** Returns the TDEAccel object associated with widget #. */ + //TDEAccel* widgetTDEAccel( uint i ); + //const TDEAccel* widgetTDEAccel( uint i ) const; /** Returns the number of actions in the collection */ virtual uint count() const; bool isEmpty() const { return (count() == 0); } /** - * Return the KAction* at position "index" in the action collection. + * Return the TDEAction* at position "index" in the action collection. * @see count() */ - virtual KAction* action( int index ) const; + virtual TDEAction* action( int index ) const; /** - * Find an action (optionally, of a given subclass of KAction) in the action collection. - * @param name Name of the KAction. - * @param classname Name of the KAction subclass. - * @return A pointer to the first KAction in the collection which matches the parameters or + * Find an action (optionally, of a given subclass of TDEAction) in the action collection. + * @param name Name of the TDEAction. + * @param classname Name of the TDEAction subclass. + * @return A pointer to the first TDEAction in the collection which matches the parameters or * null if nothing matches. */ - virtual KAction* action( const char* name, const char* classname = 0 ) const; + virtual TDEAction* action( const char* name, const char* classname = 0 ) const; - /** Returns a list of all the groups of all the KActions in this action collection. - * @see KAction::group() - * @see KAction::setGroup() + /** Returns a list of all the groups of all the TDEActions in this action collection. + * @see TDEAction::group() + * @see TDEAction::setGroup() */ virtual TQStringList groups() const; /** * Returns the list of actions in a particular group managed by this action collection. * @param group The name of the group. */ - virtual KActionPtrList actions( const TQString& group ) const; + virtual TDEActionPtrList actions( const TQString& group ) const; /** Returns the list of actions managed by this action collection. */ - virtual KActionPtrList actions() const; + virtual TDEActionPtrList actions() const; /** * Used for reading shortcut configuration from a non-XML rc file. @@ -212,7 +212,7 @@ public: //TODO FOR KDE4 make this default true /** - * Enable highlighting notification for specific KActions. + * Enable highlighting notification for specific TDEActions. * This is false by default, so, by default, the highlighting * signals will not be emitted. * @@ -234,11 +234,11 @@ public: bool highlightingEnabled() const; /** - * Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar. + * Call this function if you want to receive a signal whenever a TDEAction is highlighted in a menu or a toolbar. * This is only needed if you do not add this action to this container. * You will generally not need to call this function. * - * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar) + * @param container A container in which the TDEAction is plugged (must inherit TQPopupMenu or TDEToolBar) * @param action The action you are interested in * @see disconnectHighlight() * @see actionHighlighted() @@ -246,13 +246,13 @@ public: * @see highlightingEnabled() * @see actionHighlighted() */ - void connectHighlight( TQWidget *container, KAction *action ); + void connectHighlight( TQWidget *container, TDEAction *action ); /** * Disconnect highlight notifications for a particular pair of contianer and action. * This is only needed if you do not add this action to this container. * You will generally not need to call this function. * - * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar) + * @param container A container in which the TDEAction is plugged (must inherit TQPopupMenu or TDEToolBar) * @param action The action you are interested in * @see connectHighlight() * @see actionHighlighted() @@ -260,7 +260,7 @@ public: * @see highlightingEnabled() * @see actionHighlighted() */ - void disconnectHighlight( TQWidget *container, KAction *action ); + void disconnectHighlight( TQWidget *container, TDEAction *action ); /** * The parent KXMLGUIClient, return 0L if not available. @@ -268,8 +268,8 @@ public: const KXMLGUIClient *parentGUIClient() const; signals: - void inserted( KAction* ); - void removed( KAction* ); + void inserted( TDEAction* ); + void removed( TDEAction* ); /** Emitted when @p action is highlighted. * This is only emitted if you have setHighlightingEnabled() @@ -279,7 +279,7 @@ signals: * @see setHighlightingEnabled() * @see highlightingEnabled() */ - void actionHighlighted( KAction *action ); + void actionHighlighted( TDEAction *action ); /** Emitted when @p action is highlighed or loses highlighting. * This is only emitted if you have setHighlightingEnabled() * @see connectHighlight() @@ -288,7 +288,7 @@ signals: * @see setHighlightingEnabled() * @see highlightingEnabled() */ - void actionHighlighted( KAction *action, bool highlight ); + void actionHighlighted( TDEAction *action, bool highlight ); /** Emitted when an action is highlighted, with text * being the tooltip for the action. * This is only emitted if you have setHighlightingEnabled() @@ -309,7 +309,7 @@ signals: private: /** * @internal Only to be called by KXMLGUIFactory::addClient(). - * When actions are being connected, KAction needs to know what + * When actions are being connected, TDEAction needs to know what * widget it should connect widget-scope actions to, and what * main window it should connect */ @@ -317,12 +317,12 @@ private: void endXMLPlug(); /** @internal. Only to be called by KXMLGUIFactory::removeClient() */ void prepareXMLUnplug(); - void unplugShortcuts( KAccel* kaccel ); + void unplugShortcuts( TDEAccel* kaccel ); void _clear(); - void _insert( KAction* ); - void _remove( KAction* ); - KAction* _take( KAction* ); + void _insert( TDEAction* ); + void _remove( TDEAction* ); + TDEAction* _take( TDEAction* ); private slots: void slotMenuItemHighlighted( int id ); @@ -331,11 +331,11 @@ private slots: void slotDestroyed(); private: - KAction *findAction( TQWidget *container, int id ); + TDEAction *findAction( TQWidget *container, int id ); #ifndef KDE_NO_COMPAT public: - KActionCollection( TQObject *parent, const char *name = 0, TDEInstance *instance = 0 ); + TDEActionCollection( TQObject *parent, const char *name = 0, TDEInstance *instance = 0 ); #endif public: @@ -344,34 +344,34 @@ public: * Generally you don't have to call this. The action inserts itself automatically * into its parent collection. This can be useful however for a short-lived * collection (e.g. for a popupmenu, where the signals from the collection are needed too). - * (don't forget that in the simple case, a list of actions should be a simple KActionPtrList). + * (don't forget that in the simple case, a list of actions should be a simple TDEActionPtrList). * If you manually insert actions into a 2nd collection, don't forget to take them out * again before destroying the collection. - * @param action The KAction to add. + * @param action The TDEAction to add. */ - void insert( KAction* action); + void insert( TDEAction* action); /** * Removes an action from the collection and deletes it. - * Since the KAction destructor removes the action from the collection, you generally + * Since the TDEAction destructor removes the action from the collection, you generally * don't have to call this. - * @param action The KAction to remove. + * @param action The TDEAction to remove. */ - void remove( KAction* action ); + void remove( TDEAction* action ); /** * Removes an action from the collection. - * Since the KAction destructor removes the action from the collection, you generally + * Since the TDEAction destructor removes the action from the collection, you generally * don't have to call this. * @return NULL if not found else returns action. - * @param action the KAction to remove. + * @param action the TDEAction to remove. */ - KAction* take( KAction* action ); + TDEAction* take( TDEAction* action ); #ifndef KDE_NO_COMPAT - KActionCollection operator+ ( const KActionCollection& ) const; - KActionCollection& operator= ( const KActionCollection& ); - KActionCollection& operator+= ( const KActionCollection& ); + TDEActionCollection operator+ ( const TDEActionCollection& ) const; + TDEActionCollection& operator= ( const TDEActionCollection& ); + TDEActionCollection& operator+= ( const TDEActionCollection& ); #endif // !KDE_NO_COMPAT // KDE4: clear() doesn't need to be a slot @@ -385,9 +385,9 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - KActionCollection( const char* name, const KXMLGUIClient* parent ); - class KActionCollectionPrivate; - KActionCollectionPrivate *d; + TDEActionCollection( const char* name, const KXMLGUIClient* parent ); + class TDEActionCollectionPrivate; + TDEActionCollectionPrivate *d; }; #endif diff --git a/tdeui/kactionselector.cpp b/tdeui/kactionselector.cpp index ebaffd48e..e913f01f6 100644 --- a/tdeui/kactionselector.cpp +++ b/tdeui/kactionselector.cpp @@ -31,24 +31,24 @@ #include #include -class KActionSelectorPrivate { +class TDEActionSelectorPrivate { public: TQListBox *availableListBox, *selectedListBox; TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown; TQLabel *lAvailable, *lSelected; bool moveOnDoubleClick, keyboardEnabled; - KActionSelector::ButtonIconSize iconSize; + TDEActionSelector::ButtonIconSize iconSize; TQString addIcon, removeIcon, upIcon, downIcon; - KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; + TDEActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; bool showUpDownButtons; }; //BEGIN Constructor/destructor -KActionSelector::KActionSelector( TQWidget *parent, const char *name ) +TDEActionSelector::TDEActionSelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - d = new KActionSelectorPrivate(); + d = new TDEActionSelectorPrivate(); d->moveOnDoubleClick = true; d->keyboardEnabled = true; d->iconSize = SmallIcon; @@ -116,7 +116,7 @@ KActionSelector::KActionSelector( TQWidget *parent, const char *name ) d->selectedListBox->installEventFilter( this ); } -KActionSelector::~KActionSelector() +TDEActionSelector::~TDEActionSelector() { delete d; } @@ -125,17 +125,17 @@ KActionSelector::~KActionSelector() //BEGIN Public Methods -TQListBox *KActionSelector::availableListBox() const +TQListBox *TDEActionSelector::availableListBox() const { return d->availableListBox; } -TQListBox *KActionSelector::selectedListBox() const +TQListBox *TDEActionSelector::selectedListBox() const { return d->selectedListBox; } -void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) +void TDEActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) { switch ( button ) { @@ -156,11 +156,11 @@ void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) d->btnDown->setIconSet( SmallIconSet( icon, d->iconSize ) ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIcon: DAINBREAD!"<btnDown->setIconSet( iconset ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIconSet: DAINBREAD!"<btnDown->setTextLabel( tip ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonToolTip: DAINBREAD!"<btnDown, text ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<btnAdd->setEnabled( d->availableListBox->currentItem() > -1 ); d->btnRemove->setEnabled( d->selectedListBox->currentItem() > -1 ); @@ -236,84 +236,84 @@ void KActionSelector::setButtonsEnabled() //BEGIN Properties -bool KActionSelector::moveOnDoubleClick() const +bool TDEActionSelector::moveOnDoubleClick() const { return d->moveOnDoubleClick; } -void KActionSelector::setMoveOnDoubleClick( bool b ) +void TDEActionSelector::setMoveOnDoubleClick( bool b ) { d->moveOnDoubleClick = b; } -bool KActionSelector::keyboardEnabled() const +bool TDEActionSelector::keyboardEnabled() const { return d->keyboardEnabled; } -void KActionSelector::setKeyboardEnabled( bool b ) +void TDEActionSelector::setKeyboardEnabled( bool b ) { d->keyboardEnabled = b; } -TQString KActionSelector::availableLabel() const +TQString TDEActionSelector::availableLabel() const { return d->lAvailable->text(); } -void KActionSelector::setAvailableLabel( const TQString &text ) +void TDEActionSelector::setAvailableLabel( const TQString &text ) { d->lAvailable->setText( text ); } -TQString KActionSelector::selectedLabel() const +TQString TDEActionSelector::selectedLabel() const { return d->lSelected->text(); } -void KActionSelector::setSelectedLabel( const TQString &text ) +void TDEActionSelector::setSelectedLabel( const TQString &text ) { d->lSelected->setText( text ); } -KActionSelector::ButtonIconSize KActionSelector::buttonIconSize() const +TDEActionSelector::ButtonIconSize TDEActionSelector::buttonIconSize() const { return d->iconSize; } -void KActionSelector::setButtonIconSize( ButtonIconSize size ) +void TDEActionSelector::setButtonIconSize( ButtonIconSize size ) { d->iconSize = size; // reload icons loadIcons(); } -KActionSelector::InsertionPolicy KActionSelector::availableInsertionPolicy() const +TDEActionSelector::InsertionPolicy TDEActionSelector::availableInsertionPolicy() const { return d->availableInsertionPolicy; } -void KActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) { d->availableInsertionPolicy = p; } -KActionSelector::InsertionPolicy KActionSelector::selectedInsertionPolicy() const +TDEActionSelector::InsertionPolicy TDEActionSelector::selectedInsertionPolicy() const { return d->selectedInsertionPolicy; } -void KActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) { d->selectedInsertionPolicy = p; } -bool KActionSelector::showUpDownButtons() const +bool TDEActionSelector::showUpDownButtons() const { return d->showUpDownButtons; } -void KActionSelector::setShowUpDownButtons( bool show ) +void TDEActionSelector::setShowUpDownButtons( bool show ) { d->showUpDownButtons = show; if ( show ) @@ -332,7 +332,7 @@ void KActionSelector::setShowUpDownButtons( bool show ) //BEGIN Public Slots -void KActionSelector::polish() +void TDEActionSelector::polish() { setButtonsEnabled(); } @@ -340,7 +340,7 @@ void KActionSelector::polish() //END Public Slots //BEGIN Protected -void KActionSelector::keyPressEvent( TQKeyEvent *e ) +void TDEActionSelector::keyPressEvent( TQKeyEvent *e ) { if ( ! d->keyboardEnabled ) return; if ( (e->state() & TQt::ControlButton) ) @@ -366,7 +366,7 @@ void KActionSelector::keyPressEvent( TQKeyEvent *e ) } } -bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) +bool TDEActionSelector::eventFilter( TQObject *o, TQEvent *e ) { if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress ) { @@ -413,7 +413,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) //BEGIN Private Slots -void KActionSelector::buttonAddClicked() +void TDEActionSelector::buttonAddClicked() { // move all selected items from available to selected listbox TQListBoxItem *item = d->availableListBox->firstItem(); @@ -432,7 +432,7 @@ void KActionSelector::buttonAddClicked() d->selectedListBox->setFocus(); } -void KActionSelector::buttonRemoveClicked() +void TDEActionSelector::buttonRemoveClicked() { // move all selected items from selected to available listbox TQListBoxItem *item = d->selectedListBox->firstItem(); @@ -451,7 +451,7 @@ void KActionSelector::buttonRemoveClicked() d->availableListBox->setFocus(); } -void KActionSelector::buttonUpClicked() +void TDEActionSelector::buttonUpClicked() { int c = d->selectedListBox->currentItem(); if ( c < 1 ) return; @@ -462,7 +462,7 @@ void KActionSelector::buttonUpClicked() emit movedUp( item ); } -void KActionSelector::buttonDownClicked() +void TDEActionSelector::buttonDownClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 || c == int( d->selectedListBox->count() ) - 1 ) return; @@ -473,7 +473,7 @@ void KActionSelector::buttonDownClicked() emit movedDown( item ); } -void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) +void TDEActionSelector::itemDoubleClicked( TQListBoxItem *item ) { if ( d->moveOnDoubleClick ) moveItem( item ); @@ -483,7 +483,7 @@ void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) //BEGIN Private Methods -void KActionSelector::loadIcons() +void TDEActionSelector::loadIcons() { d->btnAdd->setIconSet( SmallIconSet( d->addIcon, d->iconSize ) ); d->btnRemove->setIconSet( SmallIconSet( d->removeIcon, d->iconSize ) ); @@ -491,7 +491,7 @@ void KActionSelector::loadIcons() d->btnDown->setIconSet( SmallIconSet( d->downIcon, d->iconSize ) ); } -void KActionSelector::moveItem( TQListBoxItem *item ) +void TDEActionSelector::moveItem( TQListBoxItem *item ) { TQListBox *lbFrom = item->listBox(); TQListBox *lbTo; @@ -518,7 +518,7 @@ void KActionSelector::moveItem( TQListBoxItem *item ) emit removed( item ); } -int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) +int TDEActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) { int index; switch ( policy ) diff --git a/tdeui/kactionselector.h b/tdeui/kactionselector.h index 5ac58b0ed..7cdd20116 100644 --- a/tdeui/kactionselector.h +++ b/tdeui/kactionselector.h @@ -29,7 +29,7 @@ class TQKeyEvent; class TQEvent; class TQIconSet; -class KActionSelectorPrivate; +class TDEActionSelectorPrivate; /** @short A widget for selecting and arranging actions/objects @@ -76,7 +76,7 @@ class KActionSelectorPrivate; @author Anders Lund */ -class TDEUI_EXPORT KActionSelector : public TQWidget { +class TDEUI_EXPORT TDEActionSelector : public TQWidget { Q_OBJECT TQ_ENUMS( ButtonIconSize InsertionPolicy ) TQ_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick ) @@ -89,8 +89,8 @@ class TDEUI_EXPORT KActionSelector : public TQWidget { TQ_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons ) public: - KActionSelector( TQWidget *parent=0, const char *name=0 ); - ~KActionSelector(); + TDEActionSelector( TQWidget *parent=0, const char *name=0 ); + ~TDEActionSelector(); /** @return The TQListBox holding the available actions @@ -396,7 +396,7 @@ private: /** @private Private data storage */ - KActionSelectorPrivate *d; + TDEActionSelectorPrivate *d; }; #endif // _KACTION_SELECTOR_H_ diff --git a/tdeui/kactionshortcutlist.h b/tdeui/kactionshortcutlist.h index 7c5f5b0dd..ac8ac020d 100644 --- a/tdeui/kactionshortcutlist.h +++ b/tdeui/kactionshortcutlist.h @@ -5,24 +5,24 @@ #include //--------------------------------------------------------------------- -// class KActionShortcutList +// class TDEActionShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate; -class TDEUI_EXPORT KActionShortcutList : public KShortcutList +class TDEAccelShortcutListPrivate; +class TDEUI_EXPORT TDEActionShortcutList : public TDEShortcutList { public: - KActionShortcutList( KActionCollection* ); - virtual ~KActionShortcutList(); + TDEActionShortcutList( TDEActionCollection* ); + virtual ~TDEActionShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index, const KShortcut& shortcut ); + virtual bool setShortcut( uint index, const TDEShortcut& shortcut ); virtual const TDEInstance* instance() const; @@ -31,36 +31,36 @@ class TDEUI_EXPORT KActionShortcutList : public KShortcutList virtual bool save() const; - const KAction *action( uint ) const; + const TDEAction *action( uint ) const; protected: - KActionCollection& m_actions; + TDEActionCollection& m_actions; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelShortcutListPrivate* d; + TDEAccelShortcutListPrivate* d; }; //--------------------------------------------------------------------- -// class KActionPtrShortcutList +// class TDEActionPtrShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate; -class TDEUI_EXPORT KActionPtrShortcutList : public KShortcutList +class TDEAccelShortcutListPrivate; +class TDEUI_EXPORT TDEActionPtrShortcutList : public TDEShortcutList { public: - KActionPtrShortcutList( KActionPtrList& ); - virtual ~KActionPtrShortcutList(); + TDEActionPtrShortcutList( TDEActionPtrList& ); + virtual ~TDEActionPtrShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index, const KShortcut& shortcut); + virtual bool setShortcut( uint index, const TDEShortcut& shortcut); virtual TQVariant getOther( Other, uint index ) const; virtual bool setOther( Other, uint index, TQVariant ); @@ -68,12 +68,12 @@ class TDEUI_EXPORT KActionPtrShortcutList : public KShortcutList virtual bool save() const; protected: - KActionPtrList& m_actions; + TDEActionPtrList& m_actions; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelShortcutListPrivate* d; + TDEAccelShortcutListPrivate* d; }; #endif // !_KACTIONSHORTCUTLIST_H diff --git a/tdeui/kanimwidget.cpp b/tdeui/kanimwidget.cpp index 7a5928ab3..9f069a259 100644 --- a/tdeui/kanimwidget.cpp +++ b/tdeui/kanimwidget.cpp @@ -47,7 +47,7 @@ KAnimWidget::KAnimWidget( const TQString& icons, int size, TQWidget *parent, { connect( &d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerUpdate())); - if (parent && parent->inherits( "KToolBar" )) + if (parent && parent->inherits( "TDEToolBar" )) connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(updateIcons())); d->loadingCompleted = false; @@ -182,8 +182,8 @@ void KAnimWidget::updateIcons() if (!d->initDone) return; - if (parent()->inherits( "KToolBar" )) - d->size = ((KToolBar*)parent())->iconSize(); + if (parent()->inherits( "TDEToolBar" )) + d->size = ((TDEToolBar*)parent())->iconSize(); if (!d->size) d->size = TDEGlobal::iconLoader()->currentSize(KIcon::MainToolbar); diff --git a/tdeui/kanimwidget.h b/tdeui/kanimwidget.h index 74f663463..2275f2cf9 100644 --- a/tdeui/kanimwidget.h +++ b/tdeui/kanimwidget.h @@ -68,7 +68,7 @@ public: * @param icons The icons name (e.g., "kde") to use for the animation * @param size The size to load * You don't have to set it if the parent is a - * KToolBar; in this case it will use the toolbar's + * TDEToolBar; in this case it will use the toolbar's * size. * @param parent The standard parent * @param name The standard internal name diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index f71a88f79..cedaadde8 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -36,7 +36,7 @@ KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { TDEConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; - menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); + menuKey = TDEShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); } diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index b28002ebc..91e53ea62 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -153,11 +153,11 @@ void KColorButton::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) { + if ( TDEStdAccel::copy().contains( key ) ) { TQMimeSource* mime = new KColorDrag( color() ); TQApplication::clipboard()->setData( mime, TQClipboard::Clipboard ); } - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { TQColor color; KColorDrag::decode( TQApplication::clipboard()->data( TQClipboard::Clipboard ), color ); setColor( color ); diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index 7182e9ddc..874b63d9c 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -260,7 +260,7 @@ void KHSSelector::drawPalette( TQPixmap *pixmap ) //----------------------------------------------------------------------------- KValueSelector::KValueSelector( TQWidget *parent, const char *name ) - : KSelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) + : TDESelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -268,7 +268,7 @@ KValueSelector::KValueSelector( TQWidget *parent, const char *name ) KValueSelector::KValueSelector(Orientation o, TQWidget *parent, const char *name ) - : KSelector( o, parent, name), _hue(0), _sat(0) + : TDESelector( o, parent, name), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -590,7 +590,7 @@ KPaletteTable::KPaletteTable( TQWidget *parent, int minWidth, int cols) sv->setFixedSize(minSize); layout->addWidget(sv); - mNamedColorList = new KListBox( this, "namedColorList", 0 ); + mNamedColorList = new TDEListBox( this, "namedColorList", 0 ); mNamedColorList->setFixedSize(minSize); mNamedColorList->hide(); layout->addWidget(mNamedColorList); @@ -1597,7 +1597,7 @@ void KHSSelector::virtual_hook( int id, void* data ) { KXYSelector::virtual_hook( id, data ); } void KValueSelector::virtual_hook( int id, void* data ) -{ KSelector::virtual_hook( id, data ); } +{ TDESelector::virtual_hook( id, data ); } void KPaletteTable::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdeui/kcolordialog.h b/tdeui/kcolordialog.h index 20c9f799d..7f04d6d17 100644 --- a/tdeui/kcolordialog.h +++ b/tdeui/kcolordialog.h @@ -39,7 +39,7 @@ class TQComboBox; class TQLineEdit; -class KListBox; +class TDEListBox; class KPalette; class KColorCells; @@ -99,7 +99,7 @@ class KValueSelectorPrivate; * @see KHSSelector, KColorDialog * @author Martin Jones (mjones@kde.org) */ -class TDEUI_EXPORT KValueSelector : public KSelector +class TDEUI_EXPORT KValueSelector : public TDESelector { Q_OBJECT @@ -132,7 +132,7 @@ protected: virtual void resizeEvent( TQResizeEvent * ); /** - * Reimplemented from KSelector. The drawing is + * Reimplemented from TDESelector. The drawing is * buffered in a pixmap here. As real drawing * routine, drawPalette() is used. */ @@ -229,7 +229,7 @@ protected: TQComboBox *combo; KColorCells *cells; TQScrollView *sv; - KListBox *mNamedColorList; + TDEListBox *mNamedColorList; KPalette *mPalette; int mMinWidth; int mCols; diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 5d3914327..6fe8d1946 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -616,12 +616,12 @@ void KHistoryCombo::keyPressEvent( TQKeyEvent *e ) KKey event_key( e ); // going up in the history, rotating when reaching TQListBox::count() - if ( KStdAccel::rotateUp().contains(event_key) ) + if ( TDEStdAccel::rotateUp().contains(event_key) ) rotateUp(); // going down in the history, no rotation possible. Last item will be // the text that was in the lineedit before Up was called. - else if ( KStdAccel::rotateDown().contains(event_key) ) + else if ( TDEStdAccel::rotateDown().contains(event_key) ) rotateDown(); else KComboBox::keyPressEvent( e ); @@ -745,12 +745,12 @@ KHistoryComboEditor::KHistoryComboEditor( const TQStringList& entries, TQWidget clearSearch->setTextLabel(i18n("Clear Search"), true); clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); TQLabel* slbl = new TQLabel(i18n("&Search:"), searchbox); - KListViewSearchLine* listViewSearch = new KListViewSearchLine(searchbox); + TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(searchbox); slbl->setBuddy(listViewSearch); connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); // Add ListView - m_pListView = new KListView( box ); + m_pListView = new TDEListView( box ); listViewSearch->setListView(m_pListView); m_pListView->setAllColumnsShowFocus(true); m_pListView->header()->hide(); diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index 247217aaf..edb090f06 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -77,7 +77,7 @@ class KURL; * and consider using TQGuardedPtr. * * The default key-bindings for completion and rotation is determined from the - * global settings in KStdAccel. These values, however, can be overridden + * global settings in TDEStdAccel. These values, however, can be overridden * locally by invoking KCompletionBase::setKeyBinding(). The values can * easily be reverted back to the default setting, by simply calling * useGlobalSettings(). An alternate method would be to default individual @@ -815,7 +815,7 @@ protected: virtual void virtual_hook( int id, void* data ); private: - KListView *m_pListView; + TDEListView *m_pListView; class KHistoryComboEditorPrivate; KHistoryComboEditorPrivate* const d; diff --git a/tdeui/kcommand.cpp b/tdeui/kcommand.cpp index 2c76b21cd..9de26e062 100644 --- a/tdeui/kcommand.cpp +++ b/tdeui/kcommand.cpp @@ -77,22 +77,22 @@ KCommandHistory::KCommandHistory() : clear(); } -KCommandHistory::KCommandHistory(KActionCollection * actionCollection, bool withMenus) : +KCommandHistory::KCommandHistory(TDEActionCollection * actionCollection, bool withMenus) : m_undoLimit(50), m_redoLimit(30), m_first(false) { d=new KCommandHistoryPrivate(); if (withMenus) { - KToolBarPopupAction * undo = new KToolBarPopupAction( i18n("&Undo"), "undo", - KStdAccel::shortcut(KStdAccel::Undo), this, TQT_SLOT( undo() ), + TDEToolBarPopupAction * undo = new TDEToolBarPopupAction( i18n("&Undo"), "undo", + TDEStdAccel::shortcut(TDEStdAccel::Undo), this, TQT_SLOT( undo() ), actionCollection, KStdAction::stdName( KStdAction::Undo ) ); connect( undo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotUndoAboutToShow() ) ); connect( undo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) ); m_undo = undo; m_undoPopup = undo->popupMenu(); - KToolBarPopupAction * redo = new KToolBarPopupAction( i18n("&Redo"), "redo", - KStdAccel::shortcut(KStdAccel::Redo), this, TQT_SLOT( redo() ), + TDEToolBarPopupAction * redo = new TDEToolBarPopupAction( i18n("&Redo"), "redo", + TDEStdAccel::shortcut(TDEStdAccel::Redo), this, TQT_SLOT( redo() ), actionCollection, KStdAction::stdName( KStdAction::Redo ) ); connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) ); connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) ); diff --git a/tdeui/kcommand.h b/tdeui/kcommand.h index f802f8d64..e27e5178b 100644 --- a/tdeui/kcommand.h +++ b/tdeui/kcommand.h @@ -26,8 +26,8 @@ #include #include -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TQPopupMenu; /** @@ -171,7 +171,7 @@ public: * into a toolbar. * @param actionCollection the parent collection */ - KCommandHistory(KActionCollection *actionCollection, bool withMenus = true); + KCommandHistory(TDEActionCollection *actionCollection, bool withMenus = true); /** * Destructs the command history object. @@ -222,12 +222,12 @@ public: public slots: /** * Undoes the last action. - * Call this if you don't use the builtin KActions. + * Call this if you don't use the builtin TDEActions. */ virtual void undo(); /** * Redoes the last undone action. - * Call this if you don't use the builtin KActions. + * Call this if you don't use the builtin TDEActions. */ virtual void redo(); /** @@ -275,7 +275,7 @@ private: void clipCommands(); // ensures that the limits are kept TQPtrList m_commands; - KAction *m_undo, *m_redo; + TDEAction *m_undo, *m_redo; TQPopupMenu *m_undoPopup, *m_redoPopup; int m_undoLimit, m_redoLimit; bool m_first; // attention: it's the first command in the list! diff --git a/tdeui/kcompletionbox.cpp b/tdeui/kcompletionbox.cpp index 2e63cb21f..086df247c 100644 --- a/tdeui/kcompletionbox.cpp +++ b/tdeui/kcompletionbox.cpp @@ -45,7 +45,7 @@ public: }; KCompletionBox::KCompletionBox( TQWidget *parent, const char *name ) - :KListBox( parent, name, (WFlags)WType_Popup ), d(new KCompletionBoxPrivate) + :TDEListBox( parent, name, (WFlags)WType_Popup ), d(new KCompletionBoxPrivate) { d->m_parent = parent; @@ -243,7 +243,7 @@ bool KCompletionBox::eventFilter( TQObject *o, TQEvent *e ) } } - return KListBox::eventFilter( o, e ); + return TDEListBox::eventFilter( o, e ); } @@ -318,7 +318,7 @@ void KCompletionBox::show() // of the parent, and calls hide() - and this hide() happen in the middle // of show(), causing inconsistent state. I'll try to submit a Qt patch too. tqApp->sendPostedEvents(); - KListBox::show(); + TDEListBox::show(); } void KCompletionBox::hide() @@ -326,7 +326,7 @@ void KCompletionBox::hide() if ( d->m_parent ) tqApp->removeEventFilter( this ); d->cancelText = TQString::null; - KListBox::hide(); + TDEListBox::hide(); } TQRect KCompletionBox::calculateGeometry() const @@ -335,8 +335,8 @@ TQRect KCompletionBox::calculateGeometry() const int ih = itemHeight(); int h = QMIN( 15 * ih, (int) count() * ih ) + 2*frameWidth(); - int w = (d->m_parent) ? d->m_parent->width() : KListBox::minimumSizeHint().width(); - w = QMAX( KListBox::minimumSizeHint().width(), w ); + int w = (d->m_parent) ? d->m_parent->width() : TDEListBox::minimumSizeHint().width(); + w = QMAX( TDEListBox::minimumSizeHint().width(), w ); //If we're inside a combox, Qt by default makes the dropdown // as wide as the combo, and gives the style a chance @@ -557,6 +557,6 @@ bool KCompletionBox::activateOnSelect() const } void KCompletionBox::virtual_hook( int id, void* data ) -{ KListBox::virtual_hook( id, data ); } +{ TDEListBox::virtual_hook( id, data ); } #include "kcompletionbox.moc" diff --git a/tdeui/kcompletionbox.h b/tdeui/kcompletionbox.h index 5f2f5b660..da853a6c3 100644 --- a/tdeui/kcompletionbox.h +++ b/tdeui/kcompletionbox.h @@ -40,7 +40,7 @@ class TQEvent; * * @author Carsten Pfeiffer */ -class TDEUI_EXPORT KCompletionBox : public KListBox +class TDEUI_EXPORT KCompletionBox : public TDEListBox { Q_OBJECT TQ_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling ) @@ -216,7 +216,7 @@ protected: void sizeAndPosition(); /** - * Reimplemented from KListBox to get events from the viewport (to hide + * Reimplemented from TDEListBox to get events from the viewport (to hide * this widget on mouse-click, Escape-presses, etc. */ virtual bool eventFilter( TQObject *, TQEvent * ); diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 1ba83bad1..a7d3cb303 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -387,7 +387,7 @@ KDatePicker::selectYearClicked() } int year; - KPopupFrame* popup = new KPopupFrame(this); + TDEPopupFrame* popup = new TDEPopupFrame(this); KDateInternalYearSelector* picker = new KDateInternalYearSelector(popup); // ----- picker->resize(picker->sizeHint()); diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index b73b8b4eb..529b7dac3 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -157,13 +157,13 @@ KDateTable::~KDateTable() void KDateTable::initAccels() { - KAccel* accel = new KAccel(this, "date table accel"); - accel->insert(KStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); - accel->insert(KStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); - accel->insert(KStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); - accel->insert(KStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); - accel->insert(KStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); - accel->insert(KStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); + TDEAccel* accel = new TDEAccel(this, "date table accel"); + accel->insert(TDEStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); + accel->insert(TDEStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); + accel->insert(TDEStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); + accel->insert(TDEStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); + accel->insert(TDEStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); + accel->insert(TDEStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); accel->readSettings(); } @@ -499,7 +499,7 @@ KDateTable::contentsMousePressEvent(TQMouseEvent *e) if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) { - KPopupMenu *menu = new KPopupMenu(); + TDEPopupMenu *menu = new TDEPopupMenu(); menu->insertTitle( TDEGlobal::locale()->formatDate(clickedDate) ); emit aboutToShowContextMenu( menu, clickedDate ); menu->popup(e->globalPos()); @@ -905,31 +905,31 @@ KDateInternalYearSelector::setYear(int year) setText(temp); } -class KPopupFrame::KPopupFramePrivate +class TDEPopupFrame::TDEPopupFramePrivate { public: - KPopupFramePrivate() : exec(false) {} + TDEPopupFramePrivate() : exec(false) {} bool exec; }; -KPopupFrame::KPopupFrame(TQWidget* parent, const char* name) +TDEPopupFrame::TDEPopupFrame(TQWidget* parent, const char* name) : TQFrame(parent, name, (WFlags)WType_Popup), result(0), // rejected main(0), - d(new KPopupFramePrivate) + d(new TDEPopupFramePrivate) { setFrameStyle(TQFrame::Box|TQFrame::Raised); setMidLineWidth(2); } -KPopupFrame::~KPopupFrame() +TDEPopupFrame::~TDEPopupFrame() { delete d; } void -KPopupFrame::keyPressEvent(TQKeyEvent* e) +TDEPopupFrame::keyPressEvent(TQKeyEvent* e) { if(e->key()==Key_Escape) { @@ -940,7 +940,7 @@ KPopupFrame::keyPressEvent(TQKeyEvent* e) } void -KPopupFrame::close(int r) +TDEPopupFrame::close(int r) { result=r; d->exec = false; @@ -948,7 +948,7 @@ KPopupFrame::close(int r) } void -KPopupFrame::hide() +TDEPopupFrame::hide() { TQFrame::hide(); if (d->exec) @@ -959,7 +959,7 @@ KPopupFrame::hide() } void -KPopupFrame::setMainWidget(TQWidget* m) +TDEPopupFrame::setMainWidget(TQWidget* m) { main=m; if(main) @@ -969,7 +969,7 @@ KPopupFrame::setMainWidget(TQWidget* m) } void -KPopupFrame::resizeEvent(TQResizeEvent*) +TDEPopupFrame::resizeEvent(TQResizeEvent*) { if(main) { @@ -979,7 +979,7 @@ KPopupFrame::resizeEvent(TQResizeEvent*) } void -KPopupFrame::popup(const TQPoint &pos) +TDEPopupFrame::popup(const TQPoint &pos) { // Make sure the whole popup is visible. TQRect d = TDEGlobalSettings::desktopGeometry(pos); @@ -1003,7 +1003,7 @@ KPopupFrame::popup(const TQPoint &pos) } int -KPopupFrame::exec(TQPoint pos) +TDEPopupFrame::exec(TQPoint pos) { popup(pos); repaint(); @@ -1017,12 +1017,12 @@ KPopupFrame::exec(TQPoint pos) } int -KPopupFrame::exec(int x, int y) +TDEPopupFrame::exec(int x, int y) { return exec(TQPoint(x, y)); } -void KPopupFrame::virtual_hook( int, void* ) +void TDEPopupFrame::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KDateTable::virtual_hook( int, void* ) diff --git a/tdeui/kdatetbl.h b/tdeui/kdatetbl.h index 5e9adbd15..649dae73c 100644 --- a/tdeui/kdatetbl.h +++ b/tdeui/kdatetbl.h @@ -30,7 +30,7 @@ #include -class KPopupMenu; +class TDEPopupMenu; /** Week selection widget. * @internal @@ -163,7 +163,7 @@ private: * @author Tim Gilman, Mirko Boehm * @version $Id$ */ -class TDEUI_EXPORT KPopupFrame : public TQFrame +class TDEUI_EXPORT TDEPopupFrame : public TQFrame { Q_OBJECT protected: @@ -194,11 +194,11 @@ public: /** * The contructor. Creates a dialog without buttons. */ - KPopupFrame(TQWidget* parent=0, const char* name=0); + TDEPopupFrame(TQWidget* parent=0, const char* name=0); /** * The destructor. */ - ~KPopupFrame(); + ~TDEPopupFrame(); /** * Set the main widget. You cannot set the main widget from the constructor, * since it must be a child of the frame itselfes. @@ -231,8 +231,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KPopupFramePrivate; - KPopupFramePrivate *d; + class TDEPopupFramePrivate; + TDEPopupFramePrivate *d; }; /** @@ -425,7 +425,7 @@ signals: * * @since 3.2 */ - void aboutToShowContextMenu( KPopupMenu * menu, const TQDate &date); + void aboutToShowContextMenu( TDEPopupMenu * menu, const TQDate &date); private slots: void nextMonth(); diff --git a/tdeui/kdcopactionproxy.cpp b/tdeui/kdcopactionproxy.cpp index 2b20e8bd3..730cdacb3 100644 --- a/tdeui/kdcopactionproxy.cpp +++ b/tdeui/kdcopactionproxy.cpp @@ -37,13 +37,13 @@ public: { } - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; DCOPObject *m_parent; TQCString m_prefix; int m_pos; }; -KDCOPActionProxy::KDCOPActionProxy( KActionCollection *actionCollection, DCOPObject *parent ) +KDCOPActionProxy::KDCOPActionProxy( TDEActionCollection *actionCollection, DCOPObject *parent ) { init( actionCollection, parent ); } @@ -53,7 +53,7 @@ KDCOPActionProxy::KDCOPActionProxy( DCOPObject *parent ) init( 0, parent ); } -void KDCOPActionProxy::init( KActionCollection *collection, DCOPObject *parent ) +void KDCOPActionProxy::init( TDEActionCollection *collection, DCOPObject *parent ) { d = new KDCOPActionProxyPrivate; d->m_actionCollection = collection; @@ -67,15 +67,15 @@ KDCOPActionProxy::~KDCOPActionProxy() delete d; } -TQValueListKDCOPActionProxy::actions() const +TQValueListKDCOPActionProxy::actions() const { if ( !d->m_actionCollection ) - return TQValueList(); + return TQValueList(); return d->m_actionCollection->actions(); } -KAction *KDCOPActionProxy::action( const char *name ) const +TDEAction *KDCOPActionProxy::action( const char *name ) const { if ( !d->m_actionCollection ) return 0; @@ -96,9 +96,9 @@ TQMap KDCOPActionProxy::actionMap( const TQCString &appId ) c if ( id.isEmpty() ) id = kapp->dcopClient()->appId(); - TQValueList lst = actions(); - TQValueList::ConstIterator it = lst.begin(); - TQValueList::ConstIterator end = lst.end(); + TQValueList lst = actions(); + TQValueList::ConstIterator it = lst.begin(); + TQValueList::ConstIterator end = lst.end(); for (; it != end; ++it ) res.insert( (*it)->name(), DCOPRef( id, actionObjectId( (*it)->name() ) ) ); @@ -111,7 +111,7 @@ bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, cons if ( obj.left( d->m_pos ) != d->m_prefix ) return false; - KAction *act = action( obj.mid( d->m_pos ) ); + TDEAction *act = action( obj.mid( d->m_pos ) ); if ( !act ) return false; @@ -119,7 +119,7 @@ bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, cons } bool KDCOPActionProxy::processAction( const TQCString &, const TQCString &fun, const TQByteArray &data, - TQCString &replyType, TQByteArray &replyData, KAction *action ) + TQCString &replyType, TQByteArray &replyData, TDEAction *action ) { if ( fun == "activate()" ) { diff --git a/tdeui/kdcopactionproxy.h b/tdeui/kdcopactionproxy.h index 429264899..0bb80fec1 100644 --- a/tdeui/kdcopactionproxy.h +++ b/tdeui/kdcopactionproxy.h @@ -23,15 +23,15 @@ #include #include -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; /** * @short A proxy class publishing a DCOP interface for actions. * - * The KDCOPActionProxy class provides an easy way to publish a collection of KAction objects + * The KDCOPActionProxy class provides an easy way to publish a collection of TDEAction objects * through DCOP. For the DCOP client the exported actions behave like full-fledged DCOP objects, - * providing full access to the KAction object functionality in the server. + * providing full access to the TDEAction object functionality in the server. * * This class can generate DCOP object ids for given action objects, which it automatically * processes, as being a DCOPObjectProxy . @@ -41,13 +41,13 @@ class TDEUI_EXPORT KDCOPActionProxy : public DCOPObjectProxy public: /** * Constructs a dcop action proxy, being able to export the actions of the provided - * KActionCollection through DCOP, using the parent DCOPObject's object id to + * TDEActionCollection through DCOP, using the parent DCOPObject's object id to * generate unique object ids for the actions. */ - KDCOPActionProxy( KActionCollection *actionCollection, DCOPObject *parent ); + KDCOPActionProxy( TDEActionCollection *actionCollection, DCOPObject *parent ); /** * Use this constructor if do not want to provide the exportable actions through a - * KActionCollection . You have to reimplement the virtual actions() and + * TDEActionCollection . You have to reimplement the virtual actions() and * action() methods if you use this constructor. */ KDCOPActionProxy( DCOPObject *parent ); @@ -58,14 +58,14 @@ public: /** * Returns a list of exportable actions. The default implementation returns a list of actions - * provided by a KActionCollection, if the first constructor has been used. + * provided by a TDEActionCollection, if the first constructor has been used. */ - virtual TQValueList actions() const; + virtual TQValueList actions() const; /** * Returns an action object with the given name. The default implementation queries the action object - * from the KActionCollection, if the first constructor has been used. + * from the TDEActionCollection, if the first constructor has been used. */ - virtual KAction *action( const char *name ) const; + virtual TDEAction *action( const char *name ) const; /** * Use this method to retrieve a DCOP object id for an action with the given name. @@ -98,9 +98,9 @@ public: * action object. */ virtual bool processAction( const TQCString &obj, const TQCString &fun, const TQByteArray &data, - TQCString &replyType, TQByteArray &replyData, KAction *action ); + TQCString &replyType, TQByteArray &replyData, TDEAction *action ); private: - void init( KActionCollection *collection, DCOPObject *parent ); + void init( TDEActionCollection *collection, DCOPObject *parent ); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kdetrayproxy/kdetrayproxy.h b/tdeui/kdetrayproxy/kdetrayproxy.h index 640ae322b..9331aad5c 100644 --- a/tdeui/kdetrayproxy/kdetrayproxy.h +++ b/tdeui/kdetrayproxy/kdetrayproxy.h @@ -40,7 +40,7 @@ class KDETrayProxy void dockWindow( Window w, Window owner ); void withdrawWindow( Window w ); static Atom makeSelectionAtom(); - KSelectionWatcher selection; + TDESelectionWatcher selection; KWinModule module; TQValueList< Window > pending_windows; TQValueList< Window > tray_windows; diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 0bfebe0ab..fc668e6d4 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -91,7 +91,7 @@ static const char* const not_close_xpm[]={ "#####"}; /** - * A special kind of KMainWindow that is able to have dockwidget child widgets. + * A special kind of TDEMainWindow that is able to have dockwidget child widgets. * * The main widget should be a dockwidget where other dockwidgets can be docked to * the left, right, top, bottom or to the middle. @@ -100,7 +100,7 @@ static const char* const not_close_xpm[]={ * @author Max Judin. */ KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f) -:KMainWindow( parent, name, f ) +:TDEMainWindow( parent, name, f ) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new KDockManager( this, new_name.latin1() ); @@ -126,7 +126,7 @@ void KDockMainWindow::setView( TQWidget *view ) } #ifndef NO_KDE2 - KMainWindow::setCentralWidget(view); + TDEMainWindow::setCentralWidget(view); #else TQMainWindow::setCentralWidget(view); #endif @@ -1653,7 +1653,7 @@ KDockManager::KDockManager( TQWidget* mainWindow , const char* name ) menuData->setAutoDelete( true ); #ifndef NO_KDE2 - menu = new KPopupMenu(); + menu = new TDEPopupMenu(); #else menu = new TQPopupMenu(); #endif @@ -3320,10 +3320,10 @@ void KDockManager::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KDockMainWindow::virtual_hook( int id, void* data ) -{ KMainWindow::virtual_hook( id, data ); } +{ TDEMainWindow::virtual_hook( id, data ); } void KDockArea::virtual_hook( int, void* ) -{ /*KMainWindow::virtual_hook( id, data );*/ } +{ /*TDEMainWindow::virtual_hook( id, data );*/ } #ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index 27b7f2b74..7d52d354c 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -36,7 +36,7 @@ - KDockTabGroup - minor helper class - KDockWidget - IMPORTANT CLASS: the one and only dockwidget class - KDockManager - helper class - - KDockMainWindow - IMPORTANT CLASS: a special KMainWindow that can have dockwidgets + - KDockMainWindow - IMPORTANT CLASS: a special TDEMainWindow that can have dockwidgets - KDockArea - like KDockMainWindow but inherits just QWidget IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition! @@ -80,7 +80,7 @@ class TQHBoxLayout; class TQPixmap; #ifndef NO_KDE2 -class KToolBar; +class TDEToolBar; class TDEConfig; #else class TQToolBar; @@ -1269,7 +1269,7 @@ private: }; /** - * A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set). + * A special kind of TDEMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set). * * The main widget should be a KDockWidget where other KDockWidget can be docked to * the left, right, top, bottom or to the middle. @@ -1311,7 +1311,7 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class TDEUI_EXPORT KDockMainWindow : public KMainWindow +class TDEUI_EXPORT KDockMainWindow : public TDEMainWindow { Q_OBJECT diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index 5b4c21883..69bdc8aab 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -466,48 +466,48 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) killing = false; - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) copy(); else if ( isReadOnly() ) TQMultiLineEdit::keyPressEvent( e ); // If this is an unmodified printable key, send it directly to TQMultiLineEdit. else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && TQString(e->text()).unicode()->isPrint() ) TQMultiLineEdit::keyPressEvent( e ); - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::cut().contains( key ) ) { + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::undo().contains( key ) ) { + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::redo().contains( key ) ) { + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::deleteWordBack().contains( key ) ) { + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { moveCursor(MoveWordBackward, true); if (hasSelectedText()) del(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::deleteWordForward().contains( key ) ) { + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { moveCursor(MoveWordForward, true); if (hasSelectedText()) del(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::backwardWord().contains( key ) ) { + else if ( TDEStdAccel::backwardWord().contains( key ) ) { CursorAction action = MoveWordBackward; int para, index; getCursorPosition( ¶, & index ); @@ -516,7 +516,7 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) moveCursor(action, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::forwardWord().contains( key ) ) { + else if ( TDEStdAccel::forwardWord().contains( key ) ) { CursorAction action = MoveWordForward; int para, index; getCursorPosition( ¶, & index ); @@ -525,27 +525,27 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) moveCursor( action, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::next().contains( key ) ) { + else if ( TDEStdAccel::next().contains( key ) ) { moveCursor( MovePgDown, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::prior().contains( key ) ) { + else if ( TDEStdAccel::prior().contains( key ) ) { moveCursor( MovePgUp, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::home().contains( key ) ) { + else if ( TDEStdAccel::home().contains( key ) ) { moveCursor( MoveHome, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::end().contains( key ) ) { + else if ( TDEStdAccel::end().contains( key ) ) { moveCursor( MoveEnd, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::beginningOfLine().contains( key ) ) { + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { moveCursor( MoveLineStart, false); slotCursorPositionChanged(); } - else if ( KStdAccel::endOfLine().contains( key ) ) { + else if ( TDEStdAccel::endOfLine().contains( key ) ) { moveCursor( MoveLineEnd, false); slotCursorPositionChanged(); } @@ -567,7 +567,7 @@ void KEdit::installRBPopup(TQPopupMenu *p) { void KEdit::selectFont(){ TQFont font = this->font(); - KFontDialog::getFont(font); + TDEFontDialog::getFont(font); this->setFont(font); } diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index 5f9d71c0f..5b16e19df 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -78,7 +78,7 @@ public: TQDomDocument m_document; XmlType m_type; bool m_isModified; - KActionCollection* m_actionCollection; + TDEActionCollection* m_actionCollection; ToolbarList m_barList; }; @@ -88,7 +88,7 @@ typedef TQValueList XmlDataList; class ToolbarItem : public TQListViewItem { public: - ToolbarItem(KListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) + ToolbarItem(TDEListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) : TQListViewItem(parent), m_tag(tag), m_name(name), @@ -96,7 +96,7 @@ public: { } - ToolbarItem(KListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) + ToolbarItem(TDEListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) : TQListViewItem(parent, item), m_tag(tag), m_name(name), @@ -175,11 +175,11 @@ public: } }; -class ToolbarListView : public KListView +class ToolbarListView : public TDEListView { public: ToolbarListView(TQWidget *parent=0, const char *name=0) - : KListView(parent, name) + : TDEListView(parent, name) { } protected: @@ -214,7 +214,7 @@ public: * In a KParts application we let create a KXMLGUIClient create a dummy one, * but it probably isn't used. */ - KEditToolbarWidgetPrivate(TDEInstance *instance, KActionCollection* collection) + KEditToolbarWidgetPrivate(TDEInstance *instance, TDEActionCollection* collection) : m_collection( collection ) { m_instance = instance; @@ -337,8 +337,8 @@ public: } #endif - //TQValueList m_actionList; - KActionCollection* m_collection; + //TQValueList m_actionList; + TDEActionCollection* m_collection; TDEInstance *m_instance; XmlData* m_currentXmlData; @@ -368,14 +368,14 @@ public: // Save parameters for recreating widget after resetting toolbar bool m_global; - KActionCollection* m_collection; + TDEActionCollection* m_collection; TQString m_file; KXMLGUIFactory* m_factory; }; const char *KEditToolbar::s_defaultToolbar = 0L; -KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, +KEditToolbar::KEditToolbar(TDEActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this)) @@ -386,7 +386,7 @@ KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, d->m_file = file; } -KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection, +KEditToolbar::KEditToolbar(const TQString& defaultToolbar, TDEActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), @@ -537,7 +537,7 @@ void KEditToolbar::setDefaultToolbar(const char *toolbarName) s_defaultToolbar = toolbarName; } -KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection, +KEditToolbarWidget::KEditToolbarWidget(TDEActionCollection *collection, const TQString& file, bool global, TQWidget *parent) : TQWidget(parent), @@ -551,7 +551,7 @@ KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection, } KEditToolbarWidget::KEditToolbarWidget(const TQString& defaultToolbar, - KActionCollection *collection, + TDEActionCollection *collection, const TQString& file, bool global, TQWidget *parent) : TQWidget(parent), @@ -594,7 +594,7 @@ KEditToolbarWidget::~KEditToolbarWidget() delete d; } -void KEditToolbarWidget::initNonKPart(KActionCollection *collection, +void KEditToolbarWidget::initNonKPart(TDEActionCollection *collection, const TQString& file, bool global) { //d->m_actionList = collection->actions(); @@ -805,10 +805,10 @@ void KEditToolbarWidget::setupLayout() m_activeList->setSorting(-1); active_label->setBuddy(m_activeList); - connect(m_inactiveList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*))); - connect(m_activeList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*))); + connect(m_inactiveList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); + connect(m_activeList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); connect(m_activeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotActiveSelected(TQListViewItem *))); connect(m_activeList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), @@ -960,7 +960,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) m_downAction->setEnabled(false); // We'll use this action collection - KActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection; + TDEActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection; // store the names of our active actions TQMap active_list; @@ -1008,7 +1008,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) // putting any action into any client... for (unsigned int i = 0; i < actionCollection->count(); i++) { - KAction *action = actionCollection->action( i ); + TDEAction *action = actionCollection->action( i ); // do we have a match? if (it.attribute( attrName ) == action->name()) @@ -1031,7 +1031,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) // go through the rest of the collection for (int i = actionCollection->count() - 1; i > -1; --i) { - KAction *action = actionCollection->action( i ); + TDEAction *action = actionCollection->action( i ); // skip our active ones if (active_list.contains(action->name())) @@ -1053,7 +1053,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) act->setText(1, SEPARATORSTRING); } -KActionCollection *KEditToolbarWidget::actionCollection() const +TDEActionCollection *KEditToolbarWidget::actionCollection() const { return d->m_collection; } @@ -1135,7 +1135,7 @@ void KEditToolbarWidget::slotActiveSelected(TQListViewItem *item) } } -void KEditToolbarWidget::slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after) +void KEditToolbarWidget::slotDropped(TDEListView *list, TQDropEvent *e, TQListViewItem *after) { ToolbarItem *item = new ToolbarItem(m_inactiveList); // needs parent, use inactiveList temporarily if(!ToolbarItemDrag::decode(e, *item)) { diff --git a/tdeui/kedittoolbar.h b/tdeui/kedittoolbar.h index cc1a0069a..829cdd347 100644 --- a/tdeui/kedittoolbar.h +++ b/tdeui/kedittoolbar.h @@ -24,10 +24,10 @@ #include class TDEProcess; -class KActionCollection; +class TDEActionCollection; class TQComboBox; class TQToolButton; -class KListView; +class TDEListView; class TQListViewItem; class KEditToolbarWidget; @@ -61,7 +61,7 @@ namespace * That code snippet also takes care of redrawing the menu and * toolbars if you have made any changes. * - * If you are using KMainWindow's settings methods (either save/apply manually + * If you are using TDEMainWindow's settings methods (either save/apply manually * or autoSaveSettings), you should write something like: * \code * void MyClass::slotConfigureToolbars() @@ -123,7 +123,7 @@ public: * relative) of your application's UI resource file. If it is * left blank, then the resource file: share/apps/appname/appnameui.rc * is used. This is the same resource file that is used by the - * default createGUI() function in KMainWindow so you're usually + * default createGUI() function in TDEMainWindow so you're usually * pretty safe in leaving it blank. * * The third parameter, global(), controls whether or not the @@ -141,7 +141,7 @@ public: * @param parent The parent of the dialog. * @param name An internal name. */ - KEditToolbar(KActionCollection *collection, + KEditToolbar(TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget* parent = 0, const char* name = 0); @@ -157,7 +157,7 @@ public: * @param name An internal name. * @since 3.2 */ - KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection, + KEditToolbar(const TQString& defaultToolbar, TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget* parent = 0, const char* name = 0); /** @@ -179,9 +179,9 @@ public: * @param parent The usual parent for the dialog. * @param name An internal name. * - * Some people seem tempted to use this also in non-KParts apps, using KMainWindow::guiFactory(). + * Some people seem tempted to use this also in non-KParts apps, using TDEMainWindow::guiFactory(). * This works, but only _if_ setting conserveMemory to false when calling - * KMainWindow::createGUI()! If not, use the other KEditToolbar constructor. + * TDEMainWindow::createGUI()! If not, use the other KEditToolbar constructor. */ KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent = 0, const char* name = 0); @@ -281,7 +281,7 @@ public: * relative) of your application's UI resource file. If it is * left blank, then the resource file: share/apps/appname/appnameui.rc * is used. This is the same resource file that is used by the - * default createGUI function in KMainWindow so you're usually + * default createGUI function in TDEMainWindow so you're usually * pretty safe in leaving it blank. * * The third parameter, global, controls whether or not the @@ -300,7 +300,7 @@ public: * be parsed * @param parent This widget's parent */ - KEditToolbarWidget(KActionCollection *collection, + KEditToolbarWidget(TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget *parent = 0L); @@ -316,7 +316,7 @@ public: * @since 3.2 */ KEditToolbarWidget(const TQString& defaultToolbar, - KActionCollection *collection, + TDEActionCollection *collection, const TQString& file = TQString::null, bool global = true, TQWidget *parent = 0L); @@ -366,7 +366,7 @@ public: /** * @internal Reimplemented for internal purposes. */ - virtual KActionCollection *actionCollection() const; + virtual TDEActionCollection *actionCollection() const; /** * Save any changes the user made. The file will be in the user's @@ -396,7 +396,7 @@ protected slots: void slotInactiveSelected(TQListViewItem *item); void slotActiveSelected(TQListViewItem *item); - void slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after); + void slotDropped(TDEListView *list, TQDropEvent *e, TQListViewItem *after); void slotInsertButton(); void slotRemoveButton(); @@ -414,7 +414,7 @@ protected: // KDE4: make private void insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend = false); void removeActive(ToolbarItem *item); void moveActive(ToolbarItem *item, TQListViewItem *before); - void initNonKPart(KActionCollection *collection, const TQString& file, bool global); + void initNonKPart(TDEActionCollection *collection, const TQString& file, bool global); void initKPart(KXMLGUIFactory* factory); void loadToolbarCombo(const TQString& defaultToolbar = TQString::null); void loadActionList(TQDomElement& elem); diff --git a/tdeui/kfontcombo.cpp b/tdeui/kfontcombo.cpp index f36b18510..8ce088f8b 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/kfontcombo.cpp @@ -41,9 +41,9 @@ #include -struct KFontComboPrivate +struct TDEFontComboPrivate { - KFontComboPrivate() + TDEFontComboPrivate() : bold(false), italic(false), underline(false), @@ -65,11 +65,11 @@ struct KFontComboPrivate TQString defaultFamily; }; -class KFontListItem : public TQListBoxItem +class TDEFontListItem : public TQListBoxItem { public: - KFontListItem(const TQString &fontName, KFontCombo *combo); - virtual ~KFontListItem(); + TDEFontListItem(const TQString &fontName, TDEFontCombo *combo); + virtual ~TDEFontListItem(); virtual int width(const TQListBox *) const; virtual int height(const TQListBox *) const; @@ -83,13 +83,13 @@ private: void createFont(); private: - KFontCombo *m_combo; + TDEFontCombo *m_combo; TQString m_fontName; TQFont *m_font; bool m_canPaintName; }; -KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo) +TDEFontListItem::TDEFontListItem(const TQString &fontName, TDEFontCombo *combo) : TQListBoxItem(combo->listBox()), m_combo(combo), m_fontName(fontName), @@ -99,19 +99,19 @@ KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo) setText(fontName); } -KFontListItem::~KFontListItem() +TDEFontListItem::~TDEFontListItem() { delete m_font; } -int KFontListItem::width(const TQListBox *lb) const +int TDEFontListItem::width(const TQListBox *lb) const { if (m_font) return TQFontMetrics(*m_font).width(text()) + 6; return lb->fontMetrics().width(text()) + 6; } -int KFontListItem::height(const TQListBox *lb) const +int TDEFontListItem::height(const TQListBox *lb) const { if (m_combo->d->displayFonts) return m_combo->d->lineSpacing + 2; @@ -119,7 +119,7 @@ int KFontListItem::height(const TQListBox *lb) const return fm.lineSpacing() + 2; } -void KFontListItem::paint(TQPainter *p) +void TDEFontListItem::paint(TQPainter *p) { if (m_combo->d->displayFonts) { @@ -144,7 +144,7 @@ void KFontListItem::paint(TQPainter *p) } } -void KFontListItem::updateFont() +void TDEFontListItem::updateFont() { if (!m_font) return; @@ -156,7 +156,7 @@ void KFontListItem::updateFont() m_font->setPointSize(m_combo->d->size); } -void KFontListItem::createFont() +void TDEFontListItem::createFont() { if (m_font) return; @@ -172,33 +172,33 @@ void KFontListItem::createFont() updateFont(); } -KFontCombo::KFontCombo(TQWidget *parent, const char *name) +TDEFontCombo::TDEFontCombo(TQWidget *parent, const char *name) : KComboBox(true, parent, name) { init(); TQStringList families; - KFontChooser::getFontList(families, 0); + TDEFontChooser::getFontList(families, 0); setFonts(families); } -KFontCombo::KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name) +TDEFontCombo::TDEFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name) : KComboBox(true, parent, name) { init(); setFonts(fonts); } -void KFontCombo::setFonts(const TQStringList &fonts) +void TDEFontCombo::setFonts(const TQStringList &fonts) { clear(); for (TQStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it) - new KFontListItem(*it, this); + new TDEFontListItem(*it, this); } /* - * Maintenance note: Keep in sync with KFontAction::setFont() + * Maintenance note: Keep in sync with TDEFontAction::setFont() */ -void KFontCombo::setCurrentFont(const TQString &family) +void TDEFontCombo::setCurrentFont(const TQString &family) { TQString lowerName = family.lower(); int c = count(); @@ -257,27 +257,27 @@ void KFontCombo::setCurrentFont(const TQString &family) setCurrentFont( realFamily ); } -void KFontCombo::slotModified( int ) +void TDEFontCombo::slotModified( int ) { d->modified = 1; } -TQString KFontCombo::currentFont() const +TQString TDEFontCombo::currentFont() const { if (d->modified) return currentText(); return d->defaultFamily; } -void KFontCombo::setCurrentItem(int i) +void TDEFontCombo::setCurrentItem(int i) { d->modified = true; TQComboBox::setCurrentItem(i); } -void KFontCombo::init() +void TDEFontCombo::init() { - d = new KFontComboPrivate; + d = new TDEFontComboPrivate; d->displayFonts = displayFonts(); setInsertionPolicy(NoInsertion); setAutoCompletion(true); @@ -285,12 +285,12 @@ void KFontCombo::init() connect( this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotModified(int))); } -KFontCombo::~KFontCombo() +TDEFontCombo::~TDEFontCombo() { delete d; } -void KFontCombo::setBold(bool bold) +void TDEFontCombo::setBold(bool bold) { if (d->bold == bold) return; @@ -298,12 +298,12 @@ void KFontCombo::setBold(bool bold) updateFonts(); } -bool KFontCombo::bold() const +bool TDEFontCombo::bold() const { return d->bold; } -void KFontCombo::setItalic(bool italic) +void TDEFontCombo::setItalic(bool italic) { if (d->italic == italic) return; @@ -311,12 +311,12 @@ void KFontCombo::setItalic(bool italic) updateFonts(); } -bool KFontCombo::italic() const +bool TDEFontCombo::italic() const { return d->italic; } -void KFontCombo::setUnderline(bool underline) +void TDEFontCombo::setUnderline(bool underline) { if (d->underline == underline) return; @@ -324,12 +324,12 @@ void KFontCombo::setUnderline(bool underline) updateFonts(); } -bool KFontCombo::underline() const +bool TDEFontCombo::underline() const { return d->underline; } -void KFontCombo::setStrikeOut(bool strikeOut) +void TDEFontCombo::setStrikeOut(bool strikeOut) { if (d->strikeOut == strikeOut) return; @@ -337,12 +337,12 @@ void KFontCombo::setStrikeOut(bool strikeOut) updateFonts(); } -bool KFontCombo::strikeOut() const +bool TDEFontCombo::strikeOut() const { return d->strikeOut; } -void KFontCombo::setSize(int size) +void TDEFontCombo::setSize(int size) { if (d->size == size) return; @@ -354,29 +354,29 @@ void KFontCombo::setSize(int size) updateFonts(); } -int KFontCombo::size() const +int TDEFontCombo::size() const { return d->size; } -void KFontCombo::updateFonts() +void TDEFontCombo::updateFonts() { if (!d->displayFonts) return; for (unsigned int i = 0; i < listBox()->count(); ++i) { - KFontListItem *item = static_cast(listBox()->item(i)); + TDEFontListItem *item = static_cast(listBox()->item(i)); item->updateFont(); } } -bool KFontCombo::displayFonts() +bool TDEFontCombo::displayFonts() { TDEConfigGroupSaver saver(TDEGlobal::config(), "KDE"); return TDEGlobal::config()->readBoolEntry("DisplayFontItems", true); } -void KFontCombo::virtual_hook( int id, void* data ) +void TDEFontCombo::virtual_hook( int id, void* data ) { KComboBox::virtual_hook( id, data ); } diff --git a/tdeui/kfontcombo.h b/tdeui/kfontcombo.h index 9b480ff18..13c55215b 100644 --- a/tdeui/kfontcombo.h +++ b/tdeui/kfontcombo.h @@ -32,7 +32,7 @@ * * @author Malte Starostik */ -class TDEUI_EXPORT KFontCombo : public KComboBox +class TDEUI_EXPORT TDEFontCombo : public KComboBox { Q_OBJECT TQ_PROPERTY(TQString family READ currentFont WRITE setCurrentFont) @@ -48,7 +48,7 @@ public: * @param parent The parent widget * @param name The object name for the widget */ - KFontCombo(TQWidget *parent, const char *name = 0); + TDEFontCombo(TQWidget *parent, const char *name = 0); /** * Constructor that takes an already initialzed font list * @@ -56,11 +56,11 @@ public: * @param parent The parent widget * @param name The object name for the widget */ - KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0); + TDEFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0); /** * Destructor */ - virtual ~KFontCombo(); + virtual ~TDEFontCombo(); /** * Sets the font list. @@ -168,11 +168,11 @@ private: void init(); private: - friend class KFontListItem; + friend class TDEFontListItem; protected: virtual void virtual_hook( int id, void* data ); private: - struct KFontComboPrivate *d; + struct TDEFontComboPrivate *d; }; #endif diff --git a/tdeui/kfontdialog.cpp b/tdeui/kfontdialog.cpp index 97f43544c..107755e7f 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/kfontdialog.cpp @@ -80,16 +80,16 @@ static int minimumListHeight( const TQListBox *list, int numVisibleEntry ) return ( w * numVisibleEntry + 2 * list->frameWidth() ); } -class KFontChooser::KFontChooserPrivate +class TDEFontChooser::TDEFontChooserPrivate { public: - KFontChooserPrivate() + TDEFontChooserPrivate() { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, Qt::black); m_palette.setColor(TQPalette::Active, TQColorGroup::Base, Qt::white); } TQPalette m_palette; }; -KFontChooser::KFontChooser(TQWidget *parent, const char *name, +TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, bool onlyFixed, const TQStringList &fontList, bool makeFrame, int visibleListSize, bool diff, TQButton::ToggleState *sizeIsRelativeState ) @@ -101,7 +101,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, i18n( "Here you can choose the font to be used." ); TQWhatsThis::add( this, mainWhatsThisText ); - d = new KFontChooserPrivate; + d = new TDEFontChooserPrivate; TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); int checkBoxGap = KDialog::spacingHint() / 2; @@ -192,7 +192,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, // // now create the actual boxes that hold the info // - familyListBox = new KListBox( page, "familyListBox"); + familyListBox = new TDEListBox( page, "familyListBox"); familyListBox->setEnabled( !diff ); gridLayout->addWidget( familyListBox, row, 0 ); TQString fontFamilyWhatsThisText = @@ -214,7 +214,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, familyListBox->setMinimumHeight( minimumListHeight( familyListBox, visibleListSize ) ); - styleListBox = new KListBox( page, "styleListBox"); + styleListBox = new TDEListBox( page, "styleListBox"); styleListBox->setEnabled( !diff ); gridLayout->addWidget(styleListBox, row, 1); TQString fontStyleWhatsThisText = @@ -233,7 +233,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, TQT_SLOT(style_chosen_slot(const TQString &))); - sizeListBox = new KListBox( page, "sizeListBox"); + sizeListBox = new TDEListBox( page, "sizeListBox"); sizeOfFont = new KIntNumInput( page, "sizeOfFont"); sizeOfFont->setMinValue(4); @@ -335,12 +335,12 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } -KFontChooser::~KFontChooser() +TDEFontChooser::~TDEFontChooser() { delete d; } -void KFontChooser::fillSizeList() { +void TDEFontChooser::fillSizeList() { if(! sizeListBox) return; //assertion. static const int c[] = @@ -359,7 +359,7 @@ void KFontChooser::fillSizeList() { } } -void KFontChooser::setColor( const TQColor & col ) +void TDEFontChooser::setColor( const TQColor & col ) { d->m_palette.setColor( TQPalette::Active, TQColorGroup::Text, col ); TQPalette pal = sampleEdit->palette(); @@ -367,12 +367,12 @@ void KFontChooser::setColor( const TQColor & col ) sampleEdit->setPalette( pal ); } -TQColor KFontChooser::color() const +TQColor TDEFontChooser::color() const { return d->m_palette.color( TQPalette::Active, TQColorGroup::Text ); } -void KFontChooser::setBackgroundColor( const TQColor & col ) +void TDEFontChooser::setBackgroundColor( const TQColor & col ) { d->m_palette.setColor( TQPalette::Active, TQColorGroup::Base, col ); TQPalette pal = sampleEdit->palette(); @@ -380,12 +380,12 @@ void KFontChooser::setBackgroundColor( const TQColor & col ) sampleEdit->setPalette( pal ); } -TQColor KFontChooser::backgroundColor() const +TQColor TDEFontChooser::backgroundColor() const { return d->m_palette.color( TQPalette::Active, TQColorGroup::Base ); } -void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) +void TDEFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) { // check or uncheck or gray out the "relative" checkbox if( sizeIsRelativeCheckBox ) { @@ -396,20 +396,20 @@ void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) } } -TQButton::ToggleState KFontChooser::sizeIsRelative() const +TQButton::ToggleState TDEFontChooser::sizeIsRelative() const { return sizeIsRelativeCheckBox ? sizeIsRelativeCheckBox->state() : TQButton::NoChange; } -TQSize KFontChooser::sizeHint( void ) const +TQSize TDEFontChooser::sizeHint( void ) const { return minimumSizeHint(); } -void KFontChooser::enableColumn( int column, bool state ) +void TDEFontChooser::enableColumn( int column, bool state ) { if( column & FamilyList ) { @@ -426,7 +426,7 @@ void KFontChooser::enableColumn( int column, bool state ) } -void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) +void TDEFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) { selFont = aFont; selectedSize=aFont.pointSize(); @@ -443,7 +443,7 @@ void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) } -int KFontChooser::fontDiffFlags() { +int TDEFontChooser::fontDiffFlags() { int diffFlags = 0; if (familyCheckbox && styleCheckbox && sizeCheckbox) { diffFlags = (int)(familyCheckbox->isChecked() ? FontDiffFamily : 0) @@ -453,7 +453,7 @@ int KFontChooser::fontDiffFlags() { return diffFlags; } -void KFontChooser::toggled_checkbox() +void TDEFontChooser::toggled_checkbox() { familyListBox->setEnabled( familyCheckbox->isChecked() ); styleListBox->setEnabled( styleCheckbox->isChecked() ); @@ -461,7 +461,7 @@ void KFontChooser::toggled_checkbox() sizeOfFont->setEnabled( sizeCheckbox->isChecked() ); } -void KFontChooser::family_chosen_slot(const TQString& family) +void TDEFontChooser::family_chosen_slot(const TQString& family) { TQFontDatabase dbase; TQStringList styles = TQStringList(dbase.styles(family)); @@ -496,7 +496,7 @@ void KFontChooser::family_chosen_slot(const TQString& family) style_chosen_slot(TQString::null); } -void KFontChooser::size_chosen_slot(const TQString& size){ +void TDEFontChooser::size_chosen_slot(const TQString& size){ selectedSize=size.toInt(); sizeOfFont->setValue(selectedSize); @@ -504,12 +504,12 @@ void KFontChooser::size_chosen_slot(const TQString& size){ emit fontSelected(selFont); } -void KFontChooser::size_value_slot(int val) { +void TDEFontChooser::size_value_slot(int val) { selFont.setPointSize(val); emit fontSelected(selFont); } -void KFontChooser::style_chosen_slot(const TQString& style) +void TDEFontChooser::style_chosen_slot(const TQString& style) { TQString currentStyle; if (style.isEmpty()) @@ -549,7 +549,7 @@ void KFontChooser::style_chosen_slot(const TQString& style) selectedStyle = style; } -void KFontChooser::displaySample(const TQFont& font) +void TDEFontChooser::displaySample(const TQFont& font) { sampleEdit->setFont(font); sampleEdit->setCursorPosition(0); @@ -561,7 +561,7 @@ void KFontChooser::displaySample(const TQFont& font) //kdDebug() << " (" << font.toString() << ")\n"; } -void KFontChooser::setupDisplay() +void TDEFontChooser::setupDisplay() { // Calling familyListBox->setCurrentItem() causes the value of selFont // to change, so we save the family, style and size beforehand. @@ -638,7 +638,7 @@ void KFontChooser::setupDisplay() } -void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) +void TDEFontChooser::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; TQStringList lstSys(dbase.families()); @@ -671,7 +671,7 @@ void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) list = lstSys; } -void KFontChooser::addFont( TQStringList &list, const char *xfont ) +void TDEFontChooser::addFont( TQStringList &list, const char *xfont ) { const char *ptr = strchr( xfont, '-' ); if ( !ptr ) @@ -699,7 +699,7 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont ) } } -void KFontChooser::fillFamilyListBox(bool onlyFixedFonts) +void TDEFontChooser::fillFamilyListBox(bool onlyFixedFonts) { TQStringList fontList; getFontList(fontList, onlyFixedFonts?FixedWidthFonts:0); @@ -707,7 +707,7 @@ void KFontChooser::fillFamilyListBox(bool onlyFixedFonts) familyListBox->insertStringList(fontList); } -void KFontChooser::showXLFDArea(bool show) +void TDEFontChooser::showXLFDArea(bool show) { if( show ) { @@ -721,24 +721,24 @@ void KFontChooser::showXLFDArea(bool show) /////////////////////////////////////////////////////////////////////////////// -KFontDialog::KFontDialog( TQWidget *parent, const char* name, +TDEFontDialog::TDEFontDialog( TQWidget *parent, const char* name, bool onlyFixed, bool modal, const TQStringList &fontList, bool makeFrame, bool diff, TQButton::ToggleState *sizeIsRelativeState ) : KDialogBase( parent, name, modal, i18n("Select Font"), Ok|Cancel, Ok ) { - chooser = new KFontChooser( this, "fontChooser", + chooser = new TDEFontChooser( this, "fontChooser", onlyFixed, fontList, makeFrame, 8, diff, sizeIsRelativeState ); setMainWidget(chooser); } -int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, +int TDEFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), + TDEFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), makeFrame, true, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -753,11 +753,11 @@ int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, return result; } -int KFontDialog::getFont( TQFont &theFont, bool onlyFixed, +int TDEFontDialog::getFont( TQFont &theFont, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), + TDEFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), makeFrame, false, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -772,12 +772,12 @@ int KFontDialog::getFont( TQFont &theFont, bool onlyFixed, } -int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString, +int TDEFontDialog::getFontAndText( TQFont &theFont, TQString &theString, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true, + TDEFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true, TQStringList(), makeFrame, false, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -792,8 +792,8 @@ int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString, return result; } -void KFontChooser::virtual_hook( int, void* ) +void TDEFontChooser::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KFontDialog::virtual_hook( int id, void* data ) +void TDEFontDialog::virtual_hook( int id, void* data ) { KDialogBase::virtual_hook( id, data ); } diff --git a/tdeui/kfontdialog.h b/tdeui/kfontdialog.h index 7f859543c..cce427eba 100644 --- a/tdeui/kfontdialog.h +++ b/tdeui/kfontdialog.h @@ -36,22 +36,22 @@ class TQFont; class TQGroupBox; class TQLabel; class TQStringList; -class KListBox; +class TDEListBox; class KIntNumInput; /** * @short A font selection widget. * - * While KFontChooser as an ordinary widget can be embedded in + * While TDEFontChooser as an ordinary widget can be embedded in * custom dialogs and therefore is very flexible, in most cases * it is preferable to use the convenience functions in - * KFontDialog. + * TDEFontDialog. * * \image html kfontchooser.png "KDE Font Chooser" * * @author Preston Brown , Bernd Wuebben * @version $Id$ */ -class TDEUI_EXPORT KFontChooser : public TQWidget +class TDEUI_EXPORT TDEFontChooser : public TQWidget { Q_OBJECT TQ_PROPERTY( TQFont font READ font WRITE setFont ) @@ -79,8 +79,8 @@ public: *

      Consider the following code snippet; * \code * TQStringList list; - * KFontChooser::getFontList(list,SmoothScalableFonts); - * KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list); + * TDEFontChooser::getFontList(list,SmoothScalableFonts); + * TDEFontChooser chooseFont = new TDEFontChooser(0, "FontList", false, list); * \endcode *

      * The above creates a font chooser dialog with only SmoothScaleble fonts. @@ -94,7 +94,7 @@ public: * If that has not been created, X is queried, and all fonts * available on the system are displayed. * @param diff Display the difference version dialog. - * See KFontDialog::getFontDiff(). + * See TDEFontDialog::getFontDiff(). * @param makeFrame Draws a frame with titles around the contents. * @param visibleListSize The minimum number of visible entries in the * fontlists. @@ -105,7 +105,7 @@ public: * *sizeIsRelativeState, user choice may be retrieved by * calling sizeIsRelative(). */ - KFontChooser(TQWidget *parent = 0L, const char *name = 0L, + TDEFontChooser(TQWidget *parent = 0L, const char *name = 0L, bool onlyFixed = false, const TQStringList &fontList = TQStringList(), bool makeFrame = true, int visibleListSize=8, @@ -114,7 +114,7 @@ public: /** * Destructs the font chooser. */ - virtual ~KFontChooser(); + virtual ~TDEFontChooser(); /** * Enables or disable a font column in the chooser. @@ -245,7 +245,7 @@ public: * * @param list The list is returned here. * @param fontListCriteria should contain all the restrictions for font selection as OR-ed values - * @see KFontChooser::FontListCriteria for the individual values + * @see TDEFontChooser::FontListCriteria for the individual values */ static void getFontList( TQStringList &list, uint fontListCriteria); @@ -291,9 +291,9 @@ private: TQCheckBox *styleCheckbox; TQCheckBox *sizeCheckbox; TQLabel *sizeLabel; - KListBox *familyListBox; - KListBox *styleListBox; - KListBox *sizeListBox; + TDEListBox *familyListBox; + TDEListBox *styleListBox; + TDEListBox *sizeListBox; TQComboBox *charsetsCombo; // BIC: remove in KDE4 TQCheckBox *sizeIsRelativeCheckBox; @@ -308,17 +308,17 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontChooserPrivate; - KFontChooserPrivate *d; + class TDEFontChooserPrivate; + TDEFontChooserPrivate *d; }; /** * @short A font selection dialog. * - * The KFontDialog provides a dialog for interactive font selection. - * It is basically a thin wrapper around the KFontChooser widget, + * The TDEFontDialog provides a dialog for interactive font selection. + * It is basically a thin wrapper around the TDEFontChooser widget, * which can also be used standalone. In most cases, the simplest - * use of this class is the static method KFontDialog::getFont(), + * use of this class is the static method TDEFontDialog::getFont(), * which pops up the dialog, allows the user to select a font, and * returns when the dialog is closed. * @@ -326,8 +326,8 @@ private: * * \code * TQFont myFont; - * int result = KFontDialog::getFont( myFont ); - * if ( result == KFontDialog::Accepted ) + * int result = TDEFontDialog::getFont( myFont ); + * if ( result == TDEFontDialog::Accepted ) * ... * \endcode * @@ -336,7 +336,7 @@ private: * @author Preston Brown , Bernd Wuebben * @version $Id$ */ -class TDEUI_EXPORT KFontDialog : public KDialogBase { +class TDEUI_EXPORT TDEFontDialog : public KDialogBase { Q_OBJECT public: @@ -362,7 +362,7 @@ public: * calling sizeIsRelative(). * */ - KFontDialog( TQWidget *parent = 0L, const char *name = 0, + TDEFontDialog( TQWidget *parent = 0L, const char *name = 0, bool onlyFixed = false, bool modal = false, const TQStringList &fontlist = TQStringList(), bool makeFrame = true, bool diff = false, @@ -434,11 +434,11 @@ public: * difference selection bitmask should be written. * Check the returned bitmask like: * \code - * if ( diffFlags & KFontChooser::FontDiffFamily ) + * if ( diffFlags & TDEFontChooser::FontDiffFamily ) * [...] - * if ( diffFlags & KFontChooser::FontDiffStyle ) + * if ( diffFlags & TDEFontChooser::FontDiffStyle ) * [...] - * if ( diffFlags & KFontChooser::FontDiffSize ) + * if ( diffFlags & TDEFontChooser::FontDiffSize ) * [...] * \endcode * @param onlyFixed if true, only select from fixed-width fonts. @@ -491,13 +491,13 @@ signals: void fontSelected( const TQFont &font ); protected: - KFontChooser *chooser; + TDEFontChooser *chooser; protected: virtual void virtual_hook( int id, void* data ); private: - class KFontDialogPrivate; - KFontDialogPrivate *d; + class TDEFontDialogPrivate; + TDEFontDialogPrivate *d; }; diff --git a/tdeui/kfontrequester.cpp b/tdeui/kfontrequester.cpp index 293f9d546..8ae0d705d 100644 --- a/tdeui/kfontrequester.cpp +++ b/tdeui/kfontrequester.cpp @@ -28,7 +28,7 @@ #include #include -KFontRequester::KFontRequester( TQWidget *parent, const char *name, +TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name, bool onlyFixed ) : TQWidget( parent, name ), m_onlyFixed( onlyFixed ) { @@ -49,7 +49,7 @@ KFontRequester::KFontRequester( TQWidget *parent, const char *name, setToolTip(); } -void KFontRequester::setFont( const TQFont &font, bool onlyFixed ) +void TDEFontRequester::setFont( const TQFont &font, bool onlyFixed ) { m_selFont = font; m_onlyFixed = onlyFixed; @@ -58,21 +58,21 @@ void KFontRequester::setFont( const TQFont &font, bool onlyFixed ) emit fontSelected( m_selFont ); } -void KFontRequester::setSampleText( const TQString &text ) +void TDEFontRequester::setSampleText( const TQString &text ) { m_sampleText = text; displaySampleText(); } -void KFontRequester::setTitle( const TQString &title ) +void TDEFontRequester::setTitle( const TQString &title ) { m_title = title; setToolTip(); } -void KFontRequester::buttonClicked() +void TDEFontRequester::buttonClicked() { - int result = KFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() ); + int result = TDEFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() ); if ( result == KDialog::Accepted ) { @@ -81,7 +81,7 @@ void KFontRequester::buttonClicked() } } -void KFontRequester::displaySampleText() +void TDEFontRequester::displaySampleText() { m_sampleLabel->setFont( m_selFont ); @@ -96,7 +96,7 @@ void KFontRequester::displaySampleText() m_sampleLabel->setText( m_sampleText ); } -void KFontRequester::setToolTip() +void TDEFontRequester::setToolTip() { TQToolTip::remove( m_button ); TQToolTip::add( m_button, i18n( "Click to select a font" ) ); diff --git a/tdeui/kfontrequester.h b/tdeui/kfontrequester.h index 5d59f5897..b686cf178 100644 --- a/tdeui/kfontrequester.h +++ b/tdeui/kfontrequester.h @@ -31,7 +31,7 @@ class TQPushButton; /** * This class provides a widget with a lineedit and a button, which invokes - * a font dialog (KFontDialog). + * a font dialog (TDEFontDialog). * * The lineedit provides a preview of the selected font. The preview text can * be customized. You can also have the font dialog show only the fixed fonts. @@ -41,7 +41,7 @@ class TQPushButton; * @author Nadeem Hasan * */ -class TDEUI_EXPORT KFontRequester : public TQWidget +class TDEUI_EXPORT TDEFontRequester : public TQWidget { Q_OBJECT @@ -59,7 +59,7 @@ class TDEUI_EXPORT KFontRequester : public TQWidget * @param onlyFixed Only display fonts which have fixed-width character * sizes. */ - KFontRequester( TQWidget *parent=0L, const char *name=0L, + TDEFontRequester( TQWidget *parent=0L, const char *name=0L, bool onlyFixed=false ); /** @@ -147,8 +147,8 @@ class TDEUI_EXPORT KFontRequester : public TQWidget private: - class KFontRequesterPrivate; - KFontRequesterPrivate *d; + class TDEFontRequesterPrivate; + TDEFontRequesterPrivate *d; }; #endif // KFONTREQUESTER_H diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 0faa137e4..33e6210ff 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -75,7 +75,7 @@ KHelpMenu::KHelpMenu( TQWidget *parent, const TQString &aboutAppText, } KHelpMenu::KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, - bool showWhatsThis, KActionCollection *actions ) + bool showWhatsThis, TDEActionCollection *actions ) : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0), d(new KHelpMenuPrivate) { @@ -109,7 +109,7 @@ KHelpMenu::~KHelpMenu() } -KPopupMenu* KHelpMenu::menu() +TDEPopupMenu* KHelpMenu::menu() { if( !mMenu ) { @@ -121,20 +121,20 @@ KPopupMenu* KHelpMenu::menu() const TDEAboutData *aboutData = d->mAboutData ? d->mAboutData : TDEGlobal::instance()->aboutData(); TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(tqApp->name()); - mMenu = new KPopupMenu(); + mMenu = new TDEPopupMenu(); connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed())); bool need_separator = false; - if (kapp->authorizeKAction("help_contents")) + if (kapp->authorizeTDEAction("help_contents")) { mMenu->insertItem( BarIcon( "contents", KIcon::SizeSmall), TQString(i18n( "%1 &Handbook" ).arg( appName)) ,menuHelpContents ); mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) ); - mMenu->setAccel( KStdAccel::shortcut(KStdAccel::Help), menuHelpContents ); + mMenu->setAccel( TDEStdAccel::shortcut(TDEStdAccel::Help), menuHelpContents ); need_separator = true; } - if( mShowWhatsThis && kapp->authorizeKAction("help_whats_this") ) + if( mShowWhatsThis && kapp->authorizeTDEAction("help_whats_this") ) { TQToolButton* wtb = TQWhatsThis::whatsThisButton(0); mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ), menuWhatsThis); @@ -144,7 +144,7 @@ KPopupMenu* KHelpMenu::menu() need_separator = true; } - if (kapp->authorizeKAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) + if (kapp->authorizeTDEAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) { if (need_separator) mMenu->insertSeparator(); @@ -153,7 +153,7 @@ KPopupMenu* KHelpMenu::menu() need_separator = true; } - if (kapp->authorizeKAction("switch_application_language")) + if (kapp->authorizeTDEAction("switch_application_language")) { if (need_separator) mMenu->insertSeparator(); @@ -165,14 +165,14 @@ KPopupMenu* KHelpMenu::menu() if (need_separator) mMenu->insertSeparator(); - if (kapp->authorizeKAction("help_about_app")) + if (kapp->authorizeTDEAction("help_about_app")) { mMenu->insertItem( kapp->miniIcon(), TQString(i18n( "&About %1" ).arg(appName)), menuAboutApp ); mMenu->connectItem( menuAboutApp, this, TQT_SLOT( aboutApplication() ) ); } - if (kapp->authorizeKAction("help_about_kde")) + if (kapp->authorizeTDEAction("help_about_kde")) { mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE ); mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) ); diff --git a/tdeui/khelpmenu.h b/tdeui/khelpmenu.h index 0f2a7078f..64745d79d 100644 --- a/tdeui/khelpmenu.h +++ b/tdeui/khelpmenu.h @@ -27,8 +27,8 @@ #include -class KActionCollection; -class KPopupMenu; +class TDEActionCollection; +class TDEPopupMenu; class TQWidget; class TDEAboutData; @@ -44,10 +44,10 @@ class KHelpMenuPrivate; * This class provides the standard %KDE help menu with the default "about" * dialog boxes and help entry. * - * This class is used in KMainWindow so + * This class is used in TDEMainWindow so * normally you don't need to use this class yourself. However, if you * need the help menu or any of its dialog boxes in your code that is - * not subclassed from KMainWindow you should use this class. + * not subclassed from TDEMainWindow you should use this class. * * The usage is simple: * @@ -64,7 +64,7 @@ class KHelpMenuPrivate; * \endcode * * IMPORTANT: - * The first time you use KHelpMenu::menu(), a KPopupMenu object is + * The first time you use KHelpMenu::menu(), a TDEPopupMenu object is * allocated. Only one object is created by the class so if you call * KHelpMenu::menu() twice or more, the same pointer is returned. The class * will destroy the popupmenu in the destructor so do not delete this @@ -115,7 +115,7 @@ class KHelpMenuPrivate; * void MyClass::myFunc() * { * KHelpMenu *helpMenu = new KHelpMenu( this ); - * KPopupMenu *help = mHelpMenu->menu(); + * TDEPopupMenu *help = mHelpMenu->menu(); * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) ); * } * @@ -171,12 +171,12 @@ class TDEUI_EXPORT KHelpMenu : public TQObject * @param aboutData User and app data used in the About app dialog * @param showWhatsThis Decides whether a "Whats this" entry will be * added to the dialog. - * @param actions KActionCollection that is used instead of the + * @param actions TDEActionCollection that is used instead of the * standard actions. * */ KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, - bool showWhatsThis=true, KActionCollection *actions = 0 ); + bool showWhatsThis=true, TDEActionCollection *actions = 0 ); /** * Destructor @@ -192,7 +192,7 @@ class TDEUI_EXPORT KHelpMenu : public TQObject * Note: This method will only create one instance of the menu. If * you call this method twice or more the same pointer is returned */ - KPopupMenu *menu(); + TDEPopupMenu *menu(); public slots: /** @@ -261,7 +261,7 @@ class TDEUI_EXPORT KHelpMenu : public TQObject void showAboutApplication(); private: - KPopupMenu *mMenu; + TDEPopupMenu *mMenu; KDialogBase *mAboutApp; KAboutKDE *mAboutKDE; KBugReport *mBugReport; diff --git a/tdeui/kinputdialog.cpp b/tdeui/kinputdialog.cpp index 61b30cce1..948cdd393 100644 --- a/tdeui/kinputdialog.cpp +++ b/tdeui/kinputdialog.cpp @@ -44,7 +44,7 @@ class KInputDialogPrivate KIntSpinBox *m_intSpinBox; KDoubleSpinBox *m_doubleSpinBox; KComboBox *m_comboBox; - KListBox *m_listBox; + TDEListBox *m_listBox; KTextEdit *m_textEdit; }; @@ -187,7 +187,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, slotUpdateButtons( d->m_comboBox->currentText() ); d->m_comboBox->setFocus(); } else { - d->m_listBox = new KListBox( frame ); + d->m_listBox = new TDEListBox( frame ); d->m_listBox->insertStringList( list ); d->m_listBox->setSelected( current, true ); d->m_listBox->ensureCurrentVisible(); @@ -217,7 +217,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, d->m_label = new TQLabel( label, frame ); layout->addWidget( d->m_label ); - d->m_listBox = new KListBox( frame ); + d->m_listBox = new TDEListBox( frame ); d->m_listBox->insertStringList( list ); layout->addWidget( d->m_listBox ); @@ -456,7 +456,7 @@ KComboBox *KInputDialog::comboBox() const return d->m_comboBox; } -KListBox *KInputDialog::listBox() const +TDEListBox *KInputDialog::listBox() const { return d->m_listBox; } diff --git a/tdeui/kinputdialog.h b/tdeui/kinputdialog.h index f7326460d..7a039ac45 100644 --- a/tdeui/kinputdialog.h +++ b/tdeui/kinputdialog.h @@ -79,7 +79,7 @@ class TDEUI_EXPORT KInputDialog : public KDialogBase KIntSpinBox *intSpinBox() const; KDoubleSpinBox *doubleSpinBox() const; KComboBox *comboBox() const; - KListBox *listBox() const; + TDEListBox *listBox() const; KTextEdit *textEdit() const; private slots: diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index 6cf02e75e..fd413742d 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -110,7 +110,7 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) d->mListFrame = new TQWidget( d->mSplitter ); TQVBoxLayout *dummy = new TQVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() ); dummy->setAutoAdd( true ); - mTreeList = new KListView( d->mListFrame ); + mTreeList = new TDEListView( d->mListFrame ); mTreeList->addColumn( TQString::null ); mTreeList->header()->hide(); mTreeList->setRootIsDecorated(true); @@ -939,7 +939,7 @@ bool KJanusWidget::eventFilter( TQObject *o, TQEvent *e ) KJanusWidget::IconListBox::IconListBox( TQWidget *parent, const char *name, WFlags f ) - :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false), + :TDEListBox( parent, name, f ), mShowAll(false), mHeightValid(false), mWidthValid(false), mOldItem(0) { @@ -1008,7 +1008,7 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll ) void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) { - KListBox::leaveEvent( ev ); + TDEListBox::leaveEvent( ev ); if ( mOldItem && !mOldItem->isSelected() ) { @@ -1020,7 +1020,7 @@ void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) // hack because qt does not support Q_OBJECT in nested classes void KJanusWidget::IconListBox::slotOnItem(TQListBoxItem *qitem) { - KListBox::slotOnItem( qitem ); + TDEListBox::slotOnItem( qitem ); if ( qitem == mOldItem ) { diff --git a/tdeui/kjanuswidget.h b/tdeui/kjanuswidget.h index 8cc0c667c..d5bec6142 100644 --- a/tdeui/kjanuswidget.h +++ b/tdeui/kjanuswidget.h @@ -28,7 +28,7 @@ #include #include -class KListView; +class TDEListView; class TQGrid; class TQHBox; @@ -69,7 +69,7 @@ class TDEUI_EXPORT KJanusWidget : public TQWidget Q_OBJECT private: - class IconListBox : public KListBox + class IconListBox : public TDEListBox { friend class KJanusWidget; @@ -586,7 +586,7 @@ class TDEUI_EXPORT KJanusWidget : public TQWidget TQStringList *mTitleList; int mFace; - KListView *mTreeList; + TDEListView *mTreeList; IconListBox *mIconList; TQWidgetStack *mPageStack; TQLabel *mTitleLabel; diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index 6626a9a46..1568ea684 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -72,7 +72,7 @@ KKeyButton::KKeyButton(TQWidget *parent, const char *name) setFocusPolicy( TQ_StrongFocus ); m_bEditing = false; connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) ); - setShortcut( KShortcut(), true ); + setShortcut( TDEShortcut(), true ); } KKeyButton::~KKeyButton () @@ -80,7 +80,7 @@ KKeyButton::~KKeyButton () delete d; } -void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) +void KKeyButton::setShortcut( const TDEShortcut& cut, bool bQtShortcut ) { d->bQtShortcut = bQtShortcut; m_cut = cut; @@ -90,7 +90,7 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) } // deprecated // -void KKeyButton::setShortcut( const KShortcut& cut ) +void KKeyButton::setShortcut( const TDEShortcut& cut ) { setShortcut( cut, false ); } @@ -103,13 +103,13 @@ void KKeyButton::setText( const TQString& text ) void KKeyButton::captureShortcut() { - KShortcut cut; + TDEShortcut cut; m_bEditing = true; repaint(); { - KShortcutDialog dlg( m_cut, d->bQtShortcut, this ); + TDEShortcutDialog dlg( m_cut, d->bQtShortcut, this ); if( dlg.exec() == KDialog::Accepted ) cut = dlg.shortcut(); } // emit the signal after the dialog is destroyed, otherwise it still has grab diff --git a/tdeui/kkeybutton.h b/tdeui/kkeybutton.h index 34f5f1ac9..9dd806095 100644 --- a/tdeui/kkeybutton.h +++ b/tdeui/kkeybutton.h @@ -52,10 +52,10 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton virtual ~KKeyButton(); /** @deprecated Use setShortcut( cut, false ) instead */ - void setShortcut( const KShortcut& cut ) KDE_DEPRECATED; + void setShortcut( const TDEShortcut& cut ) KDE_DEPRECATED; /// @since 3.1 - void setShortcut( const KShortcut& cut, bool bQtShortcut ); - const KShortcut& shortcut() const + void setShortcut( const TDEShortcut& cut, bool bQtShortcut ); + const TDEShortcut& shortcut() const { return m_cut; } /** @@ -64,7 +64,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton void setText( const TQString& text ); signals: - void capturedShortcut( const KShortcut& ); + void capturedShortcut( const TDEShortcut& ); public slots: /** @@ -74,7 +74,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton void captureShortcut(); protected: - KShortcut m_cut; + TDEShortcut m_cut; bool m_bEditing; /** diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 8de6a6e59..d6375d039 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -77,32 +77,32 @@ const int XKeyRelease = KeyRelease; // KKeyChooserItem //--------------------------------------------------------------------- -class KKeyChooserItem : public KListViewItem +class KKeyChooserItem : public TDEListViewItem { public: - KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ); - KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ); + KKeyChooserItem( TDEListView* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ); + KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ); TQString actionName() const; - const KShortcut& shortcut() const; + const TDEShortcut& shortcut() const; bool isConfigurable() const { return m_pList->isConfigurable( m_iAction ); } - const KShortcut& shortcutDefault() const + const TDEShortcut& shortcutDefault() const { return m_pList->shortcutDefault( m_iAction ); } TQString whatsThis() const { return m_pList->whatsThis( m_iAction ); } - void setShortcut( const KShortcut& cut ); + void setShortcut( const TDEShortcut& cut ); void commitChanges(); virtual TQString text( int iCol ) const; virtual int compare( TQListViewItem*, int iCol, bool bAscending ) const; protected: - KShortcutList* m_pList; + TDEShortcutList* m_pList; uint m_iAction; bool m_bModified; - KShortcut m_cut; + TDEShortcut m_cut; }; // WhatsThis on KKeyChooserItems @@ -126,16 +126,16 @@ private: class KKeyChooserPrivate { public: - TQValueList rgpLists; - TQValueList rgpListsAllocated; + TQValueList rgpLists; + TQValueList rgpListsAllocated; - KListView *pList; + TDEListView *pList; TQLabel *lInfo; KKeyButton *pbtnShortcut; TQGroupBox *fCArea; TQButtonGroup *kbGroup; - TQMap mapGlobals; + TQMap mapGlobals; // If this is set, then shortcuts require a modifier: // so 'A' would not be valid, whereas 'Ctrl+A' would be. @@ -157,14 +157,14 @@ KKeyChooser::KKeyChooser( TQWidget* parent, ActionType type, bool bAllowLetterSh initGUI( type, bAllowLetterShortcuts ); } -KKeyChooser::KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( Application, bAllowLetterShortcuts ); insert( coll ); } -KKeyChooser::KKeyChooser( KAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( Application, bAllowLetterShortcuts ); @@ -178,14 +178,14 @@ KKeyChooser::KKeyChooser( TDEGlobalAccel* pAccel, TQWidget* parent ) insert( pAccel ); } -KKeyChooser::KKeyChooser( KShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( type, bAllowLetterShortcuts ); insert( pList ); } -KKeyChooser::KKeyChooser( KAccel* actions, TQWidget* parent, +KKeyChooser::KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey ) @@ -224,46 +224,46 @@ static KStaticDeleter< TQValueList< KKeyChooser* > > allChoosersDeleter; KKeyChooser::~KKeyChooser() { allChoosers->remove( this ); - // Delete allocated KShortcutLists + // Delete allocated TDEShortcutLists for( uint i = 0; i < d->rgpListsAllocated.count(); i++ ) delete d->rgpListsAllocated[i]; delete d; } -bool KKeyChooser::insert( KActionCollection *pColl) +bool KKeyChooser::insert( TDEActionCollection *pColl) { return insert(pColl, TQString::null); } -bool KKeyChooser::insert( KActionCollection* pColl, const TQString &title ) +bool KKeyChooser::insert( TDEActionCollection* pColl, const TQString &title ) { TQString str = title; if ( title.isEmpty() && pColl->instance() && pColl->instance()->aboutData() ) str = pColl->instance()->aboutData()->programName(); - KShortcutList* pList = new KActionShortcutList( pColl ); + TDEShortcutList* pList = new TDEActionShortcutList( pColl ); d->rgpListsAllocated.append( pList ); d->rgpLists.append( pList ); buildListView(d->rgpLists.count() - 1, str); return true; } -bool KKeyChooser::insert( KAccel* pAccel ) +bool KKeyChooser::insert( TDEAccel* pAccel ) { - KShortcutList* pList = new KAccelShortcutList( pAccel ); + TDEShortcutList* pList = new TDEAccelShortcutList( pAccel ); d->rgpListsAllocated.append( pList ); return insert( pList ); } bool KKeyChooser::insert( TDEGlobalAccel* pAccel ) { - KShortcutList* pList = new KAccelShortcutList( pAccel ); + TDEShortcutList* pList = new TDEAccelShortcutList( pAccel ); d->rgpListsAllocated.append( pList ); return insert( pList ); } -bool KKeyChooser::insert( KShortcutList* pList ) +bool KKeyChooser::insert( TDEShortcutList* pList ) { d->rgpLists.append( pList ); buildListView( d->rgpLists.count() - 1, TQString::null ); @@ -323,7 +323,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) searchLayout->addWidget(clearSearch); TQLabel* slbl = new TQLabel(i18n("&Search:"), this); searchLayout->addWidget(slbl); - KListViewSearchLine* listViewSearch = new KListViewSearchLine(this); + TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(this); searchLayout->addWidget(listViewSearch); slbl->setBuddy(listViewSearch); connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); @@ -343,7 +343,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) topLayout->addLayout( TQT_TQLAYOUT(stackLayout), 10 ); stackLayout->setRowStretch( 1, 10 ); // Only list will stretch - d->pList = new KListView( this ); + d->pList = new TDEListView( this ); listViewSearch->setListView(d->pList); // Plug into search line TQValueList columns; columns.append(0); @@ -422,7 +422,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) d->pbtnShortcut = new KKeyButton(d->fCArea, "key"); d->pbtnShortcut->setEnabled( false ); - connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&)) ); + connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(capturedShortcut(const TDEShortcut&)) ); grid->addRowSpacing( 1, d->pbtnShortcut->sizeHint().height() + 5 ); wtstr = i18n("Use this button to choose a new shortcut key. Once you click it, " @@ -460,15 +460,15 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) // Add all shortcuts to the list void KKeyChooser::buildListView( uint iList, const TQString &title ) { - KShortcutList* pList = d->rgpLists[iList]; - KActionShortcutList *pAList = dynamic_cast(pList); + TDEShortcutList* pList = d->rgpLists[iList]; + TDEActionShortcutList *pAList = dynamic_cast(pList); if( m_type == Global || m_type == ApplicationGlobal ) d->pList->setSorting( -1 ); - KListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem; + TDEListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem; TQString str = (title.isEmpty() ? i18n("Shortcuts") : title); - pParentItem = pProgramItem = pItem = new KListViewItem( d->pList, str ); + pParentItem = pProgramItem = pItem = new TDEListViewItem( d->pList, str ); pParentItem->setExpandable( true ); pParentItem->setOpen( true ); pParentItem->setSelectable( false ); @@ -477,7 +477,7 @@ void KKeyChooser::buildListView( uint iList, const TQString &title ) TQString sName = pList->name(iAction); kdDebug(125) << "Key: " << sName << endl; if( sName.startsWith( "Program:" ) ) { - pItem = new KListViewItem( d->pList, pProgramItem, pList->label(iAction) ); + pItem = new TDEListViewItem( d->pList, pProgramItem, pList->label(iAction) ); pItem->setSelectable( false ); pItem->setExpandable( true ); pItem->setOpen( true ); @@ -485,7 +485,7 @@ void KKeyChooser::buildListView( uint iList, const TQString &title ) delete pProgramItem; pProgramItem = pParentItem = pItem; } else if( sName.startsWith( "Group:" ) ) { - pItem = new KListViewItem( pProgramItem, pParentItem, pList->label(iAction) ); + pItem = new TDEListViewItem( pProgramItem, pParentItem, pList->label(iAction) ); pItem->setSelectable( false ); pItem->setExpandable( true ); pItem->setOpen( true ); @@ -520,11 +520,11 @@ void KKeyChooser::updateButtons() m_prbDef->setEnabled( false ); m_prbCustom->setEnabled( false ); d->pbtnShortcut->setEnabled( false ); - d->pbtnShortcut->setShortcut( KShortcut(), false ); + d->pbtnShortcut->setShortcut( TDEShortcut(), false ); } else { bool bConfigurable = pItem->isConfigurable(); bool bQtShortcut = (m_type == Application || m_type == Standard); - const KShortcut& cutDef = pItem->shortcutDefault(); + const TDEShortcut& cutDef = pItem->shortcutDefault(); // Set key strings TQString keyStrCfg = pItem->shortcut().toString(); @@ -558,7 +558,7 @@ void KKeyChooser::slotNoKey() KKeyChooserItem* pItem = dynamic_cast( d->pList->currentItem() ); if( pItem ) { //kdDebug(125) << "no Key" << d->pList->currentItem()->text(0) << endl; - pItem->setShortcut( KShortcut() ); + pItem->setShortcut( TDEShortcut() ); updateButtons(); emit keyChange(); } @@ -585,12 +585,12 @@ void KKeyChooser::readGlobalKeys() readGlobalKeys( d->mapGlobals ); } -void KKeyChooser::readGlobalKeys( TQMap< TQString, KShortcut >& map ) +void KKeyChooser::readGlobalKeys( TQMap< TQString, TDEShortcut >& map ) { TQMap mapEntry = TDEGlobal::config()->entryMap( "Global Shortcuts" ); TQMap::Iterator it( mapEntry.begin() ); for( uint i = 0; it != mapEntry.end(); ++it, i++ ) - map[it.key()] = KShortcut(*it); + map[it.key()] = TDEShortcut(*it); } void KKeyChooser::slotSettingsChanged( int category ) @@ -649,7 +649,7 @@ void KKeyChooser::setPreferFourModifierKeys( bool bPreferFourModifierKeys ) d->bPreferFourModifierKeys = bPreferFourModifierKeys; } -void KKeyChooser::capturedShortcut( const KShortcut& cut ) +void KKeyChooser::capturedShortcut( const TDEShortcut& cut ) { if( cut.isNull() ) slotNoKey(); @@ -665,7 +665,7 @@ void KKeyChooser::listSync() if( d->pColl ) { // TODO: This is very inefficient. Come up with something better. - KAccelActions aa; + TDEAccelActions aa; d->pColl->createKeyMap( aa ); d->actionsNew.updateShortcuts( aa ); } else if( d->pActionsOrig ) { @@ -699,7 +699,7 @@ void KKeyChooser::syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pCo kdDebug(125) << "KKeyChooser::syncToConfig() done" << endl; } -void KKeyChooser::setShortcut( const KShortcut& cut ) +void KKeyChooser::setShortcut( const TDEShortcut& cut ) { kdDebug(125) << "KKeyChooser::setShortcut( " << cut.toString() << " )" << endl; KKeyChooserItem* pItem = dynamic_cast(d->pList->currentItem()); @@ -732,7 +732,7 @@ void KKeyChooser::setShortcut( const KShortcut& cut ) // Returns iSeq index if cut2 has a sequence of equal or higher priority to a sequence in cut. // else -1 -static int keyConflict( const KShortcut& cut, const KShortcut& cut2 ) +static int keyConflict( const TDEShortcut& cut, const TDEShortcut& cut2 ) { for( uint iSeq = 0; iSeq < cut.count(); iSeq++ ) { for( uint iSeq2 = 0; iSeq2 < cut2.count(); iSeq2++ ) { @@ -744,13 +744,13 @@ static int keyConflict( const KShortcut& cut, const KShortcut& cut2 ) } // Removes the sequences in cut2 from cut1 -static void removeFromShortcut( KShortcut & cut1, const KShortcut &cut2) +static void removeFromShortcut( TDEShortcut & cut1, const TDEShortcut &cut2) { for( uint iSeq2 = 0; iSeq2 < cut2.count(); iSeq2++ ) cut1.remove(cut2.seq(iSeq2)); } -bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser ) +bool KKeyChooser::isKeyPresent( const TDEShortcut& cut, bool bWarnUser ) { KKeyChooserItem* pItem = dynamic_cast(d->pList->currentItem()); @@ -796,12 +796,12 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser ) } // KDE4 remove -bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ) +bool KKeyChooser::isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ) { return isKeyPresentLocally( cut, ignoreItem, !warnText.isNull()); } -bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ) +bool KKeyChooser::isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ) { if ( cut.toString().isEmpty()) return false; @@ -816,7 +816,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig if( !promptForReassign( cut.seq(iSeq), pItem2->text(0), Application, this )) return true; // else remove the shortcut from it - KShortcut cut2 = pItem2->shortcut(); + TDEShortcut cut2 = pItem2->shortcut(); removeFromShortcut(cut2, cut); pItem2->setShortcut(cut2); updateButtons(); @@ -828,35 +828,35 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig return false; } -bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent ) +bool KKeyChooser::checkStandardShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent ) { // For each key sequence in the shortcut, for( uint i = 0; i < cut.count(); i++ ) { const KKeySequence& seq = cut.seq(i); - KStdAccel::StdAccel id = KStdAccel::findStdAccel( seq ); - if( id != KStdAccel::AccelNone - && keyConflict( cut, KStdAccel::shortcut( id ) ) > -1 ) { + TDEStdAccel::StdAccel id = TDEStdAccel::findStdAccel( seq ); + if( id != TDEStdAccel::AccelNone + && keyConflict( cut, TDEStdAccel::shortcut( id ) ) > -1 ) { if( bWarnUser ) { - if( !promptForReassign( seq, KStdAccel::label(id), Standard, parent )) + if( !promptForReassign( seq, TDEStdAccel::label(id), Standard, parent )) return true; - removeStandardShortcut( KStdAccel::label(id), dynamic_cast< KKeyChooser* > ( parent ), KStdAccel::shortcut( id ), cut); + removeStandardShortcut( TDEStdAccel::label(id), dynamic_cast< KKeyChooser* > ( parent ), TDEStdAccel::shortcut( id ), cut); } } } return false; } -bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent ) +bool KKeyChooser::checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent ) { - TQMap< TQString, KShortcut > map; + TQMap< TQString, TDEShortcut > map; readGlobalKeys( map ); return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, TQString::null ); } -bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent, - const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction ) +bool KKeyChooser::checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent, + const TQMap< TQString, TDEShortcut >& map, const TQString& ignoreAction ) { - TQMap::ConstIterator it; + TQMap::ConstIterator it; for( it = map.begin(); it != map.end(); ++it ) { int iSeq = keyConflict( cut, (*it) ); if( iSeq > -1 ) { @@ -872,7 +872,7 @@ bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarn return false; } -void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ) +void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ) { bool was_in_choosers = false; if( allChoosers != NULL ) { @@ -885,8 +885,8 @@ void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* cho } } if( !was_in_choosers ) { // not edited, needs to be changed in config file - KStdAccel::ShortcutList std_list; - KShortcut newCut = origCut; + TDEStdAccel::ShortcutList std_list; + TDEShortcut newCut = origCut; removeFromShortcut(newCut, cut); int index = std_list.index( name ); if ( index >= 0 ) { @@ -896,7 +896,7 @@ void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* cho } } -void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ) +void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ) { bool was_in_choosers = false; if( allChoosers != NULL ) { @@ -909,21 +909,21 @@ void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* choos } } if( !was_in_choosers ) { // not edited, needs to be changed in config file - KAccelActions actions; - KShortcut newCut = origCut; + TDEAccelActions actions; + TDEShortcut newCut = origCut; removeFromShortcut(newCut, cut); actions.insert( name, "", "", newCut, newCut); actions.writeActions( "Global Shortcuts", 0, true, true ); } } -bool KKeyChooser::removeShortcut( const TQString& name, const KShortcut &cut ) +bool KKeyChooser::removeShortcut( const TQString& name, const TDEShortcut &cut ) { for( TQListViewItemIterator it( d->pList ); it.current(); ++it ) { KKeyChooserItem* pItem2 = dynamic_cast(it.current()); if( pItem2 && pItem2->actionName() == name ) { // remove the shortcut from it - KShortcut cut2 = pItem2->shortcut(); + TDEShortcut cut2 = pItem2->shortcut(); removeFromShortcut(cut2, cut); pItem2->setShortcut(cut2); updateButtons(); @@ -978,8 +978,8 @@ bool KKeyChooser::promptForReassign( const KKeySequence& cut, const TQString& sA } //--------------------------------------------------- -KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ) -: KListViewItem( parent, after ) +KKeyChooserItem::KKeyChooserItem( TDEListView* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ) +: TDEListViewItem( parent, after ) { m_pList = pList; m_iAction = iAction; @@ -987,8 +987,8 @@ KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KSho m_cut = m_pList->shortcut(m_iAction); } -KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ) -: KListViewItem( parent, after ) +KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ) +: TDEListViewItem( parent, after ) { m_pList = pList; m_iAction = iAction; @@ -1001,12 +1001,12 @@ TQString KKeyChooserItem::actionName() const return m_pList->name(m_iAction); } -const KShortcut& KKeyChooserItem::shortcut() const +const TDEShortcut& KKeyChooserItem::shortcut() const { return m_cut; } -void KKeyChooserItem::setShortcut( const KShortcut& cut ) +void KKeyChooserItem::setShortcut( const TDEShortcut& cut ) { m_cut = cut; m_bModified = (m_cut != m_pList->shortcut(m_iAction)); @@ -1117,12 +1117,12 @@ KKeyDialog::~KKeyDialog() group.writeEntry( "Dialog Size", size(), true, true ); } -bool KKeyDialog::insert( KActionCollection* pColl ) +bool KKeyDialog::insert( TDEActionCollection* pColl ) { return m_pKeyChooser->insert( pColl ); } -bool KKeyDialog::insert(KActionCollection *pColl, const TQString &title) +bool KKeyDialog::insert(TDEActionCollection *pColl, const TQString &title) { return m_pKeyChooser->insert(pColl, title); } @@ -1144,12 +1144,12 @@ void KKeyDialog::commitChanges() m_pKeyChooser->commitChanges(); } -int KKeyDialog::configure( KActionCollection* coll, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEActionCollection* coll, TQWidget* parent, bool bSaveSettings ) { return configure( coll, true, parent, bSaveSettings); } -int KKeyDialog::configure( KAccel* keys, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEAccel* keys, TQWidget* parent, bool bSaveSettings ) { return configure( keys, true, parent, bSaveSettings); } @@ -1159,7 +1159,7 @@ int KKeyDialog::configure( TDEGlobalAccel* keys, TQWidget* parent, bool bSaveSet return configure( keys, true, parent, bSaveSettings); } -int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { KKeyDialog dlg( bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( keys ); @@ -1179,18 +1179,18 @@ int KKeyDialog::configure( TDEGlobalAccel* keys, bool bAllowLetterShortcuts, TQW return b; } -int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { - kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << bSaveSettings << " )" << endl; + kdDebug(125) << "KKeyDialog::configureKeys( TDEActionCollection*, " << bSaveSettings << " )" << endl; KKeyDialog dlg( bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( coll ); return dlg.configure( bSaveSettings ); } -/*int KKeyDialog::configure( KActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings ) +/*int KKeyDialog::configure( TDEActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings ) { - kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << file << ", " << bSaveSettings << " )" << endl; - KAccelActions actions; + kdDebug(125) << "KKeyDialog::configureKeys( TDEActionCollection*, " << file << ", " << bSaveSettings << " )" << endl; + TDEAccelActions actions; coll->createKeyMap( actions ); int retcode = configure( actions, file, parent, bSaveSettings ); diff --git a/tdeui/kkeydialog.h b/tdeui/kkeydialog.h index eba8d0069..c6468e7c1 100644 --- a/tdeui/kkeydialog.h +++ b/tdeui/kkeydialog.h @@ -31,20 +31,20 @@ class TQGroupBox; class TQLabel; class TQLineEdit; class TQRadioButton; -class KAccel; -class KAccelActions; -class KActionCollection; +class TDEAccel; +class TDEAccelActions; +class TDEActionCollection; class TDEConfigBase; class TDEGlobalAccel; class KKeySequence; -class KShortcut; -class KShortcutList; +class TDEShortcut; +class TDEShortcutList; class KKeyChooserItem; /** - * @short Widget for configuration of KAccel and TDEGlobalAccel. + * @short Widget for configuration of TDEAccel and TDEGlobalAccel. * - * Configure dictionaries of key/action associations for KAccel and + * Configure dictionaries of key/action associations for TDEAccel and * TDEGlobalAccel. * * The class takes care of all aspects of configuration, including @@ -73,15 +73,15 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget /** * \overload * @param parent parent widget - * @param coll the KActionCollection to configure + * @param coll the TDEActionCollection to configure * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric * keys ('A', '1', etc.) are not permissible shortcuts. */ - KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true ); - KKeyChooser( KAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true ); KKeyChooser( TDEGlobalAccel* actions, TQWidget* parent ); - KKeyChooser( KShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ); virtual ~KKeyChooser(); @@ -89,14 +89,14 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * Insert an action collection, i.e. add all its actions to the ones * already associated with the KKeyChooser object. */ - bool insert( KActionCollection* ); // #### KDE4 : remove me + bool insert( TDEActionCollection* ); // #### KDE4 : remove me /** * Insert an action collection, i.e. add all its actions to the ones * already associated with the KKeyChooser object. * @param title subtree title of this collection of shortcut. * @since 3.1 */ - bool insert( KActionCollection *, const TQString &title); + bool insert( TDEActionCollection *, const TQString &title); void syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ); @@ -108,7 +108,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget /** * This commits and then saves the actions to disk. - * Any KActionCollection objects with the xmlFile() value set + * Any TDEActionCollection objects with the xmlFile() value set * will be written to an XML file. All other will be written * to the application's rc file. */ @@ -127,7 +127,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * * @since 3.2 */ - static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent ); + static bool checkGlobalShortcutsConflict( const TDEShortcut& cut, bool warnUser, TQWidget* parent ); /** * Checks whether the given shortcut conflicts with standard keyboard shortcuts. @@ -142,7 +142,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * * @since 3.2 */ - static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent ); + static bool checkStandardShortcutsConflict( const TDEShortcut& cut, bool warnUser, TQWidget* parent ); signals: /** @@ -168,9 +168,9 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget enum { NoKey = 1, DefaultKey, CustomKey }; void initGUI( ActionType type, bool bAllowLetterShortcuts ); - bool insert( KAccel* ); + bool insert( TDEAccel* ); bool insert( TDEGlobalAccel* ); - bool insert( KShortcutList* ); + bool insert( TDEShortcutList* ); /// @since 3.1 void buildListView( uint iList, const TQString &title = TQString::null ); @@ -178,9 +178,9 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget void updateButtons(); void fontChange( const TQFont& _font ); - void setShortcut( const KShortcut& cut ); - bool isKeyPresent( const KShortcut& cut, bool warnuser = true ); - bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ); + void setShortcut( const TDEShortcut& cut ); + bool isKeyPresent( const TDEShortcut& cut, bool warnuser = true ); + bool isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ); void _warning( const KKeySequence& seq, TQString sAction, TQString sTitle ); protected slots: @@ -188,7 +188,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget void slotDefaultKey(); void slotCustomKey(); void slotListItemSelected( TQListViewItem *item ); - void capturedShortcut( const KShortcut& cut ); + void capturedShortcut( const TDEShortcut& cut ); void slotSettingsChanged( int ); void slotListItemDoubleClicked ( TQListViewItem * ipoQListViewItem, const TQPoint & ipoQPoint, int c ); @@ -205,19 +205,19 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget TQRadioButton* m_prbCustom; private: - bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ); + bool isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ); static bool promptForReassign( const KKeySequence& cut, const TQString& sAction, ActionType action, TQWidget* parent ); // Remove the key sequences contained in cut from the standard shortcut @p name // which currently has @p origCut as shortcut. - static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ); + static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ); // Remove the key sequences contained in cut from the global shortcut @p name // which currently has @p origCut as shortcut. - static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ); - static void readGlobalKeys( TQMap< TQString, KShortcut >& map ); - static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent, - const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction ); + static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ); + static void readGlobalKeys( TQMap< TQString, TDEShortcut >& map ); + static bool checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent, + const TQMap< TQString, TDEShortcut >& map, const TQString& ignoreAction ); // Remove the key sequences contained in cut from this item - bool removeShortcut( const TQString& name, const KShortcut &cut ); + bool removeShortcut( const TQString& name, const TDEShortcut &cut ); private slots: void captureCurrentItem(); @@ -227,7 +227,7 @@ private slots: /** * @obsolete */ - KKeyChooser( KAccel* actions, TQWidget* parent, + KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false ); @@ -256,14 +256,14 @@ private slots: typedef KKeyChooser KKeyChooser; /** - * @short Dialog for configuration of KActionCollection, KAccel, and TDEGlobalAccel. + * @short Dialog for configuration of TDEActionCollection, TDEAccel, and TDEGlobalAccel. * * The KKeyDialog class is used for configuring dictionaries of key/action - * associations for KActionCollection, KAccel, and TDEGlobalAccel. It uses the KKeyChooser widget + * associations for TDEActionCollection, TDEAccel, and TDEGlobalAccel. It uses the KKeyChooser widget * and offers buttons to set all keys to defaults and invoke on-line help. * * Several static methods are supplied which provide the most convenient interface - * to the dialog. The most common and most encouraged use is with KActionCollection. + * to the dialog. The most common and most encouraged use is with TDEActionCollection. * * \code * KKeyDialog::configure( actionCollection() ); @@ -296,7 +296,7 @@ public: * Simply call insert with the action collections of each one in turn. * @return true :) */ - bool insert( KActionCollection* ); // #### KDE4: remove me + bool insert( TDEActionCollection* ); // #### KDE4: remove me /** * Insert an action collection, i.e. add all its actions to the ones @@ -310,7 +310,7 @@ public: * @return true :) * @since 3.1 */ - bool insert(KActionCollection *, const TQString &title); + bool insert(TDEActionCollection *, const TQString &title); /** * Run the dialog and call commitChanges() if @p bSaveSettings @@ -332,14 +332,14 @@ public: * the *uirc file which they were intially read from. * @return Accept if the dialog was closed with OK, Reject otherwise. */ - static int configure( KActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function, except that settings * are saved to a *.rc file using TDEConfig. */ - static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. @@ -352,20 +352,20 @@ public: * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. * - * @param coll the KActionCollection to configure + * @param coll the TDEActionCollection to configure * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric * keys ('A', '1', etc.) are not permissible shortcuts. * @param parent the parent widget to attach to * @param bSaveSettings if true, the settings will also be saved back to * the *uirc file which they were intially read from. */ - static int configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. **/ - static int configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true /** * This is an overloaded member function, provided for convenience. @@ -377,7 +377,7 @@ public: * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( KAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) + static KDE_DEPRECATED int configureKeys( TDEAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) { return configure( keys, parent, save_settings ); } /** * @deprecated Obsolete. @@ -389,7 +389,7 @@ public: * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( KActionCollection* coll, const TQString& /*xmlfile*/, + static KDE_DEPRECATED int configureKeys( TDEActionCollection* coll, const TQString& /*xmlfile*/, bool save_settings = true, TQWidget* parent = 0 ) { return configure( coll, parent, save_settings ); } diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index f6fa42611..61d0daf26 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -441,17 +441,17 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) { copy(); return; } - else if ( KStdAccel::paste().contains( key ) ) + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); return; } - else if ( KStdAccel::pasteSelection().contains( key ) ) + else if ( TDEStdAccel::pasteSelection().contains( key ) ) { TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); insert( text ); @@ -459,22 +459,22 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) return; } - else if ( KStdAccel::cut().contains( key ) ) + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); return; } - else if ( KStdAccel::undo().contains( key ) ) + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); return; } - else if ( KStdAccel::redo().contains( key ) ) + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); return; } - else if ( KStdAccel::deleteWordBack().contains( key ) ) + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { cursorWordBackward(true); if ( hasSelectedText() ) @@ -483,7 +483,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::deleteWordForward().contains( key ) ) + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { // Workaround for QT bug where cursorWordForward(true); @@ -493,25 +493,25 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::backwardWord().contains( key ) ) + else if ( TDEStdAccel::backwardWord().contains( key ) ) { cursorWordBackward(false); e->accept(); return; } - else if ( KStdAccel::forwardWord().contains( key ) ) + else if ( TDEStdAccel::forwardWord().contains( key ) ) { cursorWordForward(false); e->accept(); return; } - else if ( KStdAccel::beginningOfLine().contains( key ) ) + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { home(false); e->accept(); return; } - else if ( KStdAccel::endOfLine().contains( key ) ) + else if ( TDEStdAccel::endOfLine().contains( key ) ) { end(false); e->accept(); @@ -723,9 +723,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) else if ( mode == TDEGlobalSettings::CompletionShell ) { // Handles completion. - KShortcut cut; + TDEShortcut cut; if ( keys[TextCompletion].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::TextCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::TextCompletion); else cut = keys[TextCompletion]; @@ -752,9 +752,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) if ( mode != TDEGlobalSettings::CompletionNone ) { // Handles previous match - KShortcut cut; + TDEShortcut cut; if ( keys[PrevCompletionMatch].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::PrevCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::PrevCompletion); else cut = keys[PrevCompletionMatch]; @@ -769,7 +769,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) // Handles next match if ( keys[NextCompletionMatch].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::NextCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::NextCompletion); else cut = keys[NextCompletionMatch]; @@ -786,9 +786,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) // substring completion if ( compObj() ) { - KShortcut cut; + TDEShortcut cut; if ( keys[SubstringCompletion].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::SubstringCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion); else cut = keys[SubstringCompletion]; @@ -893,7 +893,7 @@ TQPopupMenu *KLineEdit::createPopupMenu() subMenu->insertItem( i18n("Short Automatic"), ShortAutoCompletion ); subMenu->insertItem( i18n("Dropdown List && Automatic"), PopupAutoCompletion ); - subMenu->setAccel( KStdAccel::completion(), ShellCompletion ); + subMenu->setAccel( TDEStdAccel::completion(), ShellCompletion ); TDEGlobalSettings::Completion mode = completionMode(); subMenu->setItemChecked( NoCompletion, @@ -1124,13 +1124,13 @@ void KLineEdit::userCancelled(const TQString & cancelText) bool KLineEdit::overrideAccel (const TQKeyEvent* e) { - KShortcut scKey; + TDEShortcut scKey; KKey key( e ); KeyBindingMap keys = getKeyBindings(); if (keys[TextCompletion].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::TextCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::TextCompletion); else scKey = keys[TextCompletion]; @@ -1138,7 +1138,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; if (keys[NextCompletionMatch].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::NextCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::NextCompletion); else scKey = keys[NextCompletionMatch]; @@ -1146,7 +1146,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; if (keys[PrevCompletionMatch].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::PrevCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::PrevCompletion); else scKey = keys[PrevCompletionMatch]; @@ -1154,27 +1154,27 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; // Override all the text manupilation accelerators... - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) return true; - else if ( KStdAccel::paste().contains( key ) ) + else if ( TDEStdAccel::paste().contains( key ) ) return true; - else if ( KStdAccel::cut().contains( key ) ) + else if ( TDEStdAccel::cut().contains( key ) ) return true; - else if ( KStdAccel::undo().contains( key ) ) + else if ( TDEStdAccel::undo().contains( key ) ) return true; - else if ( KStdAccel::redo().contains( key ) ) + else if ( TDEStdAccel::redo().contains( key ) ) return true; - else if (KStdAccel::deleteWordBack().contains( key )) + else if (TDEStdAccel::deleteWordBack().contains( key )) return true; - else if (KStdAccel::deleteWordForward().contains( key )) + else if (TDEStdAccel::deleteWordForward().contains( key )) return true; - else if (KStdAccel::forwardWord().contains( key )) + else if (TDEStdAccel::forwardWord().contains( key )) return true; - else if (KStdAccel::backwardWord().contains( key )) + else if (TDEStdAccel::backwardWord().contains( key )) return true; - else if (KStdAccel::beginningOfLine().contains( key )) + else if (TDEStdAccel::beginningOfLine().contains( key )) return true; - else if (KStdAccel::endOfLine().contains( key )) + else if (TDEStdAccel::endOfLine().contains( key )) return true; if (d->completionBox && d->completionBox->isVisible ()) diff --git a/tdeui/klineedit.h b/tdeui/klineedit.h index 84e554316..be25a35d9 100644 --- a/tdeui/klineedit.h +++ b/tdeui/klineedit.h @@ -72,7 +72,7 @@ class KURL; * the above functions to false. * * The default key-bindings for completion and rotation is determined - * from the global settings in KStdAccel. These values, however, can + * from the global settings in TDEStdAccel. These values, however, can * be overridden locally by invoking @p setKeyBinding(). You can easily * revert these settings back to the default by simply calling * @p useGlobalSettings(). An alternate method would be to default diff --git a/tdeui/klistbox.cpp b/tdeui/klistbox.cpp index d4fb92ef2..bc31f020d 100644 --- a/tdeui/klistbox.cpp +++ b/tdeui/klistbox.cpp @@ -27,7 +27,7 @@ #include "klistbox.h" -KListBox::KListBox( TQWidget *parent, const char *name, WFlags f ) +TDEListBox::TDEListBox( TQWidget *parent, const char *name, WFlags f ) : TQListBox( parent, name, f ), d(0) { connect( this, TQT_SIGNAL( onViewport() ), @@ -48,7 +48,7 @@ KListBox::KListBox( TQWidget *parent, const char *name, WFlags f ) this, TQT_SLOT( slotAutoSelect() ) ); } -void KListBox::slotOnItem( TQListBoxItem *item ) +void TDEListBox::slotOnItem( TQListBoxItem *item ) { if ( item && m_bChangeCursorOverItem && m_bUseSingle ) viewport()->setCursor( KCursor().handCursor() ); @@ -59,7 +59,7 @@ void KListBox::slotOnItem( TQListBoxItem *item ) } } -void KListBox::slotOnViewport() +void TDEListBox::slotOnViewport() { if ( m_bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -69,7 +69,7 @@ void KListBox::slotOnViewport() } -void KListBox::slotSettingsChanged(int category) +void TDEListBox::slotSettingsChanged(int category) { if (category != TDEApplication::SETTINGS_MOUSE) return; @@ -106,7 +106,7 @@ void KListBox::slotSettingsChanged(int category) viewport()->unsetCursor(); } -void KListBox::slotAutoSelect() +void TDEListBox::slotAutoSelect() { // check that the item still exists if( index( m_pCurrentItem ) == -1 ) @@ -176,7 +176,7 @@ void KListBox::slotAutoSelect() kdDebug() << "That´s not supposed to happen!!!!" << endl; } -void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) +void TDEListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) { ButtonState keybstate = TDEApplication::keyboardMouseState(); @@ -196,7 +196,7 @@ void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) // to start help or close the dialog. This functionality // should be done in TQListView but it is not (at least now) // -void KListBox::keyPressEvent(TQKeyEvent *e) +void TDEListBox::keyPressEvent(TQKeyEvent *e) { if( e->key() == Key_Escape ) { @@ -212,21 +212,21 @@ void KListBox::keyPressEvent(TQKeyEvent *e) } } -void KListBox::focusOutEvent( TQFocusEvent *fe ) +void TDEListBox::focusOutEvent( TQFocusEvent *fe ) { m_pAutoSelect->stop(); TQListBox::focusOutEvent( fe ); } -void KListBox::leaveEvent( TQEvent *e ) +void TDEListBox::leaveEvent( TQEvent *e ) { m_pAutoSelect->stop(); TQListBox::leaveEvent( e ); } -void KListBox::contentsMousePressEvent( TQMouseEvent *e ) +void TDEListBox::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { bool block = signalsBlocked(); @@ -240,7 +240,7 @@ void KListBox::contentsMousePressEvent( TQMouseEvent *e ) TQListBox::contentsMousePressEvent( e ); } -void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) +void TDEListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { TQListBox::contentsMouseDoubleClickEvent( e ); @@ -254,13 +254,13 @@ void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) } } -void KListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) +void TDEListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) { if( (btn == Qt::LeftButton) && item ) emitExecute( item, pos ); } -void KListBox::virtual_hook( int, void* ) +void TDEListBox::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "klistbox.moc" diff --git a/tdeui/klistbox.h b/tdeui/klistbox.h index 981cfa3a3..8ef949527 100644 --- a/tdeui/klistbox.h +++ b/tdeui/klistbox.h @@ -37,12 +37,12 @@ * settings. If you want to get informed when the user selects * something connect to the TQListBox::selectionChanged() signal. **/ -class TDEUI_EXPORT KListBox : public TQListBox +class TDEUI_EXPORT TDEListBox : public TQListBox { Q_OBJECT public: - KListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + TDEListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); signals: @@ -121,8 +121,8 @@ private slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KListBoxPrivate; - KListBoxPrivate* const d; + class TDEListBoxPrivate; + TDEListBoxPrivate* const d; }; #endif diff --git a/tdeui/klistview.cpp b/tdeui/klistview.cpp index 24c5f3a4b..b3eb2222c 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/klistview.cpp @@ -37,10 +37,10 @@ #include "klistview.h" #include "klistviewlineedit.h" -class KListView::Tooltip : public TQToolTip +class TDEListView::Tooltip : public TQToolTip { public: - Tooltip (KListView* parent, TQToolTipGroup* group = 0L); + Tooltip (TDEListView* parent, TQToolTipGroup* group = 0L); virtual ~Tooltip () {} protected: @@ -50,29 +50,29 @@ protected: virtual void maybeTip (const TQPoint&); private: - KListView* mParent; + TDEListView* mParent; }; -KListView::Tooltip::Tooltip (KListView* parent, TQToolTipGroup* group) +TDEListView::Tooltip::Tooltip (TDEListView* parent, TQToolTipGroup* group) : TQToolTip (parent, group), mParent (parent) { } -void KListView::Tooltip::maybeTip (const TQPoint&) +void TDEListView::Tooltip::maybeTip (const TQPoint&) { // FIXME } -class KListView::KListViewPrivate +class TDEListView::TDEListViewPrivate { public: - KListViewPrivate (KListView* listview) + TDEListViewPrivate (TDEListView* listview) : pCurrentItem (0), autoSelectDelay(0), dragOverItem(0), dragDelay (TDEGlobalSettings::dndEventDelay()), - editor (new KListViewLineEdit (listview)), + editor (new TDEListViewLineEdit (listview)), cursorInExecuteArea(false), itemsMovable (true), selectedBySimpleMove(false), @@ -107,7 +107,7 @@ public: connect(editor, TQT_SIGNAL(done(TQListViewItem*,int)), listview, TQT_SLOT(doneEditing(TQListViewItem*,int))); } - ~KListViewPrivate () + ~TDEListViewPrivate () { delete editor; } @@ -124,7 +124,7 @@ public: TQPoint startDragPos; int dragDelay; - KListViewLineEdit *editor; + TDEListViewLineEdit *editor; TQValueList renameable; bool cursorInExecuteArea:1; @@ -173,7 +173,7 @@ public: }; -KListViewLineEdit::KListViewLineEdit(KListView *parent) +TDEListViewLineEdit::TDEListViewLineEdit(TDEListView *parent) : KLineEdit(parent->viewport()), item(0), col(0), p(parent) { setFrame( false ); @@ -183,16 +183,16 @@ KListViewLineEdit::KListViewLineEdit(KListView *parent) TQT_SLOT( slotItemRemoved( TQListViewItem * ) )); } -KListViewLineEdit::~KListViewLineEdit() +TDEListViewLineEdit::~TDEListViewLineEdit() { } -TQListViewItem *KListViewLineEdit::currentItem() const +TQListViewItem *TDEListViewLineEdit::currentItem() const { return item; } -void KListViewLineEdit::load(TQListViewItem *i, int c) +void TDEListViewLineEdit::load(TQListViewItem *i, int c) { item=i; col=c; @@ -232,7 +232,7 @@ void KListViewLineEdit::load(TQListViewItem *i, int c) * tabOrderedRename functionality. */ -static int nextCol (KListView *pl, TQListViewItem *pi, int start, int dir) +static int nextCol (TDEListView *pl, TQListViewItem *pi, int start, int dir) { if (pi) { @@ -273,7 +273,7 @@ static TQListViewItem *lastQChild (TQListViewItem *pi) return pi; } -void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward) +void TDEListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward) { const int ncols = p->columns(); const int dir = forward ? +1 : -1; @@ -321,7 +321,7 @@ void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool #undef KeyPress #endif -bool KListViewLineEdit::event (TQEvent *pe) +bool TDEListViewLineEdit::event (TQEvent *pe) { if (pe->type() == TQEvent::KeyPress) { @@ -340,7 +340,7 @@ bool KListViewLineEdit::event (TQEvent *pe) return KLineEdit::event(pe); } -void KListViewLineEdit::keyPressEvent(TQKeyEvent *e) +void TDEListViewLineEdit::keyPressEvent(TQKeyEvent *e) { if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) terminate(true); @@ -355,16 +355,16 @@ void KListViewLineEdit::keyPressEvent(TQKeyEvent *e) KLineEdit::keyPressEvent(e); } -void KListViewLineEdit::terminate() +void TDEListViewLineEdit::terminate() { terminate(true); } -void KListViewLineEdit::terminate(bool commit) +void TDEListViewLineEdit::terminate(bool commit) { if ( item ) { - //kdDebug() << "KListViewLineEdit::terminate " << commit << endl; + //kdDebug() << "TDEListViewLineEdit::terminate " << commit << endl; if (commit) item->setText(col, text()); int c=col; @@ -378,7 +378,7 @@ void KListViewLineEdit::terminate(bool commit) } } -void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev) +void TDEListViewLineEdit::focusOutEvent(TQFocusEvent *ev) { TQFocusEvent * focusEv = static_cast(ev); // Don't let a RMB close the editor @@ -388,7 +388,7 @@ void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev) KLineEdit::focusOutEvent(ev); } -void KListViewLineEdit::paintEvent( TQPaintEvent *e ) +void TDEListViewLineEdit::paintEvent( TQPaintEvent *e ) { KLineEdit::paintEvent( e ); @@ -402,7 +402,7 @@ void KListViewLineEdit::paintEvent( TQPaintEvent *e ) // selection changed -> terminate. As our "item" can be already deleted, // we can't call terminate(false), because that would emit done() with // a dangling pointer to "item". -void KListViewLineEdit::slotSelectionChanged() +void TDEListViewLineEdit::slotSelectionChanged() { item = 0; col = 0; @@ -411,7 +411,7 @@ void KListViewLineEdit::slotSelectionChanged() // if the current item was removed -> terminate. Can't call terminate(false) // due to same reason as slotSelectionChanged(). -void KListViewLineEdit::slotItemRemoved(TQListViewItem *i) +void TDEListViewLineEdit::slotItemRemoved(TQListViewItem *i) { if (currentItem() != i) return; @@ -422,9 +422,9 @@ void KListViewLineEdit::slotItemRemoved(TQListViewItem *i) } -KListView::KListView( TQWidget *parent, const char *name ) +TDEListView::TDEListView( TQWidget *parent, const char *name ) : TQListView( parent, name ), - d (new KListViewPrivate (this)) + d (new TDEListViewPrivate (this)) { setDragAutoScroll(true); @@ -462,17 +462,17 @@ KListView::KListView( TQWidget *parent, const char *name ) this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } - connect (this, TQT_SIGNAL (menuShortCutPressed (KListView*, TQListViewItem*)), - this, TQT_SLOT (emitContextMenu (KListView*, TQListViewItem*))); + connect (this, TQT_SIGNAL (menuShortCutPressed (TDEListView*, TQListViewItem*)), + this, TQT_SLOT (emitContextMenu (TDEListView*, TQListViewItem*))); d->alternateBackground = TDEGlobalSettings::alternateBackgroundColor(); } -KListView::~KListView() +TDEListView::~TDEListView() { delete d; } -bool KListView::isExecuteArea( const TQPoint& point ) +bool TDEListView::isExecuteArea( const TQPoint& point ) { TQListViewItem* item = itemAt( point ); if ( item ) { @@ -482,12 +482,12 @@ bool KListView::isExecuteArea( const TQPoint& point ) return false; } -bool KListView::isExecuteArea( int x ) +bool TDEListView::isExecuteArea( int x ) { return isExecuteArea( x, 0 ); } -bool KListView::isExecuteArea( int x, TQListViewItem* item ) +bool TDEListView::isExecuteArea( int x, TQListViewItem* item ) { if( allColumnsShowFocus() ) return true; @@ -521,7 +521,7 @@ bool KListView::isExecuteArea( int x, TQListViewItem* item ) } } -void KListView::slotOnItem( TQListViewItem *item ) +void TDEListView::slotOnItem( TQListViewItem *item ) { TQPoint vp = viewport()->mapFromGlobal( TQCursor::pos() ); if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) { @@ -530,7 +530,7 @@ void KListView::slotOnItem( TQListViewItem *item ) } } -void KListView::slotOnViewport() +void TDEListView::slotOnViewport() { if ( d->bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -539,7 +539,7 @@ void KListView::slotOnViewport() d->pCurrentItem = 0L; } -void KListView::slotSettingsChanged(int category) +void TDEListView::slotSettingsChanged(int category) { switch (category) { @@ -588,7 +588,7 @@ void KListView::slotSettingsChanged(int category) } } -void KListView::slotAutoSelect() +void TDEListView::slotAutoSelect() { // check that the item still exists if( itemIndex( d->pCurrentItem ) == -1 ) @@ -661,10 +661,10 @@ void KListView::slotAutoSelect() } } else - kdDebug() << "KListView::slotAutoSelect: That�s not supposed to happen!!!!" << endl; + kdDebug() << "TDEListView::slotAutoSelect: That�s not supposed to happen!!!!" << endl; } -void KListView::slotHeaderChanged() +void TDEListView::slotHeaderChanged() { const int colCount = columns(); @@ -677,7 +677,7 @@ void KListView::slotHeaderChanged() } } -void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) { if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) { d->validDrag=false; @@ -705,9 +705,9 @@ void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) } } -void KListView::focusInEvent( TQFocusEvent *fe ) +void TDEListView::focusInEvent( TQFocusEvent *fe ) { - // kdDebug()<<"KListView::focusInEvent()"<selectedBySimpleMove) && (d->selectionMode == FileManager) @@ -721,7 +721,7 @@ void KListView::focusInEvent( TQFocusEvent *fe ) }; } -void KListView::focusOutEvent( TQFocusEvent *fe ) +void TDEListView::focusOutEvent( TQFocusEvent *fe ) { cleanDropVisualizer(); cleanItemHighlighter(); @@ -743,14 +743,14 @@ void KListView::focusOutEvent( TQFocusEvent *fe ) TQListView::focusOutEvent( fe ); } -void KListView::leaveEvent( TQEvent *e ) +void TDEListView::leaveEvent( TQEvent *e ) { d->autoSelect.stop(); TQListView::leaveEvent( e ); } -bool KListView::event( TQEvent *e ) +bool TDEListView::event( TQEvent *e ) { if (e->type() == TQEvent::ApplicationPaletteChange) d->alternateBackground=TDEGlobalSettings::alternateBackgroundColor(); @@ -758,7 +758,7 @@ bool KListView::event( TQEvent *e ) return TQListView::event(e); } -void KListView::contentsMousePressEvent( TQMouseEvent *e ) +void TDEListView::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { @@ -805,7 +805,7 @@ void KListView::contentsMousePressEvent( TQMouseEvent *e ) TQListView::contentsMousePressEvent( e ); } -void KListView::contentsMouseMoveEvent( TQMouseEvent *e ) +void TDEListView::contentsMouseMoveEvent( TQMouseEvent *e ) { if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) TQListView::contentsMouseMoveEvent (e); @@ -845,7 +845,7 @@ void KListView::contentsMouseMoveEvent( TQMouseEvent *e ) } } -void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) +void TDEListView::contentsMouseReleaseEvent( TQMouseEvent *e ) { if (e->button() == Qt::LeftButton) { @@ -878,7 +878,7 @@ void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) TQListView::contentsMouseReleaseEvent( e ); } -void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) +void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) { // We don't want to call the parent method because it does setOpen, // whereas we don't do it in single click mode... (David) @@ -900,13 +900,13 @@ void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) } } -void KListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) { if( (btn == Qt::LeftButton) && item ) emitExecute(item, pos, c); } -void KListView::contentsDropEvent(TQDropEvent* e) +void TDEListView::contentsDropEvent(TQDropEvent* e) { cleanDropVisualizer(); cleanItemHighlighter(); @@ -932,7 +932,7 @@ void KListView::contentsDropEvent(TQDropEvent* e) } } -void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) +void TDEListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) { TQPtrList items, afterFirsts, afterNows; TQListViewItem *current=currentItem(); @@ -982,7 +982,7 @@ void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterm emit moved(); } -void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) +void TDEListView::contentsDragMoveEvent(TQDragMoveEvent *event) { if (acceptDrag(event)) { @@ -1026,20 +1026,20 @@ void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) event->ignore(); } -void KListView::slotDragExpand() +void TDEListView::slotDragExpand() { if ( itemAt( d->dragOverPoint ) == d->dragOverItem ) d->dragOverItem->setOpen( true ); } -void KListView::contentsDragLeaveEvent (TQDragLeaveEvent*) +void TDEListView::contentsDragLeaveEvent (TQDragLeaveEvent*) { d->dragExpand.stop(); cleanDropVisualizer(); cleanItemHighlighter(); } -void KListView::cleanDropVisualizer() +void TDEListView::cleanDropVisualizer() { if (d->mOldDropVisualizer.isValid()) { @@ -1049,12 +1049,12 @@ void KListView::cleanDropVisualizer() } } -int KListView::depthToPixels( int depth ) +int TDEListView::depthToPixels( int depth ) { return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin(); } -void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) +void TDEListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) { TQPoint p (contentsToViewport(pos)); @@ -1123,7 +1123,7 @@ void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListView parent = after ? after->parent() : 0L ; } -TQListViewItem* KListView::lastChild () const +TQListViewItem* TDEListView::lastChild () const { TQListViewItem* lastchild = firstChild(); @@ -1133,7 +1133,7 @@ TQListViewItem* KListView::lastChild () const return lastchild; } -TQListViewItem *KListView::lastItem() const +TQListViewItem *TDEListView::lastItem() const { TQListViewItem* last = lastChild(); @@ -1143,12 +1143,12 @@ TQListViewItem *KListView::lastItem() const return last; } -KLineEdit *KListView::renameLineEdit() const +KLineEdit *TDEListView::renameLineEdit() const { return d->editor; } -void KListView::startDrag() +void TDEListView::startDrag() { TQDragObject *drag = dragObject(); @@ -1159,7 +1159,7 @@ void KListView::startDrag() emit moved(); } -TQDragObject *KListView::dragObject() +TQDragObject *TDEListView::dragObject() { if (!currentItem()) return 0; @@ -1168,63 +1168,63 @@ TQDragObject *KListView::dragObject() return new TQStoredDrag("application/x-qlistviewitem", viewport()); } -void KListView::setItemsMovable(bool b) +void TDEListView::setItemsMovable(bool b) { d->itemsMovable=b; } -bool KListView::itemsMovable() const +bool TDEListView::itemsMovable() const { return d->itemsMovable; } -void KListView::setItemsRenameable(bool b) +void TDEListView::setItemsRenameable(bool b) { d->itemsRenameable=b; } -bool KListView::itemsRenameable() const +bool TDEListView::itemsRenameable() const { return d->itemsRenameable; } -void KListView::setDragEnabled(bool b) +void TDEListView::setDragEnabled(bool b) { d->dragEnabled=b; } -bool KListView::dragEnabled() const +bool TDEListView::dragEnabled() const { return d->dragEnabled; } -void KListView::setAutoOpen(bool b) +void TDEListView::setAutoOpen(bool b) { d->autoOpen=b; } -bool KListView::autoOpen() const +bool TDEListView::autoOpen() const { return d->autoOpen; } -bool KListView::dropVisualizer() const +bool TDEListView::dropVisualizer() const { return d->dropVisualizer; } -void KListView::setDropVisualizer(bool b) +void TDEListView::setDropVisualizer(bool b) { d->dropVisualizer=b; } -TQPtrList KListView::selectedItems() const +TQPtrList TDEListView::selectedItems() const { return selectedItems(true); } -TQPtrList KListView::selectedItems(bool includeHiddenItems) const +TQPtrList TDEListView::selectedItems(bool includeHiddenItems) const { TQPtrList list; @@ -1248,7 +1248,7 @@ TQPtrList KListView::selectedItems(bool includeHiddenItems) cons flags |= TQListViewItemIterator::Visible; } - TQListViewItemIterator it(const_cast(this), flags); + TQListViewItemIterator it(const_cast(this), flags); for(; it.current(); ++it) list.append(it.current()); @@ -1261,7 +1261,7 @@ TQPtrList KListView::selectedItems(bool includeHiddenItems) cons } -void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after) +void TDEListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after) { // sanity check - don't move a item into its own child structure TQListViewItem *i = parent; @@ -1291,18 +1291,18 @@ void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListVie insertItem(item); } -void KListView::contentsDragEnterEvent(TQDragEnterEvent *event) +void TDEListView::contentsDragEnterEvent(TQDragEnterEvent *event) { if (acceptDrag (event)) event->accept(); } -void KListView::setDropVisualizerWidth (int w) +void TDEListView::setDropVisualizerWidth (int w) { d->mDropVisualizerWidth = w > 0 ? w : 1; } -TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, +TQRect TDEListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, TQListViewItem *after) { TQRect insertmarker; @@ -1341,7 +1341,7 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, insertmarker.setBottom (insertmarker.bottom() + d->mDropVisualizerWidth/2); } - // This is not used anymore, at least by KListView itself (see viewportPaintEvent) + // This is not used anymore, at least by TDEListView itself (see viewportPaintEvent) // Remove for KDE 4.0. if (p) p->fillRect(insertmarker, Dense4Pattern); @@ -1349,7 +1349,7 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, return insertmarker; } -TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) +TQRect TDEListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) { TQRect r; @@ -1365,7 +1365,7 @@ TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) return r; } -void KListView::cleanItemHighlighter () +void TDEListView::cleanItemHighlighter () { if (d->mOldDropHighlighter.isValid()) { @@ -1375,7 +1375,7 @@ void KListView::cleanItemHighlighter () } } -void KListView::rename(TQListViewItem *item, int c) +void TDEListView::rename(TQListViewItem *item, int c) { if (d->renameable.contains(c)) { @@ -1384,12 +1384,12 @@ void KListView::rename(TQListViewItem *item, int c) } } -bool KListView::isRenameable (int col) const +bool TDEListView::isRenameable (int col) const { return d->renameable.contains(col); } -void KListView::setRenameable (int col, bool renameable) +void TDEListView::setRenameable (int col, bool renameable) { if (col>=header()->count()) return; @@ -1398,69 +1398,69 @@ void KListView::setRenameable (int col, bool renameable) d->renameable+=col; } -void KListView::doneEditing(TQListViewItem *item, int row) +void TDEListView::doneEditing(TQListViewItem *item, int row) { emit itemRenamed(item, item->text(row), row); emit itemRenamed(item); } -bool KListView::acceptDrag(TQDropEvent* e) const +bool TDEListView::acceptDrag(TQDropEvent* e) const { return acceptDrops() && itemsMovable() && (e->source()==viewport()); } -void KListView::setCreateChildren(bool b) +void TDEListView::setCreateChildren(bool b) { d->createChildren=b; } -bool KListView::createChildren() const +bool TDEListView::createChildren() const { return d->createChildren; } -int KListView::tooltipColumn() const +int TDEListView::tooltipColumn() const { return d->tooltipColumn; } -void KListView::setTooltipColumn(int column) +void TDEListView::setTooltipColumn(int column) { d->tooltipColumn=column; } -void KListView::setDropHighlighter(bool b) +void TDEListView::setDropHighlighter(bool b) { d->dropHighlighter=b; } -bool KListView::dropHighlighter() const +bool TDEListView::dropHighlighter() const { return d->dropHighlighter; } -bool KListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const +bool TDEListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const { return ((column==tooltipColumn()) && !tooltip(item, column).isEmpty()); } -TQString KListView::tooltip(TQListViewItem *item, int column) const +TQString TDEListView::tooltip(TQListViewItem *item, int column) const { return item->text(column); } -void KListView::setTabOrderedRenaming(bool b) +void TDEListView::setTabOrderedRenaming(bool b) { d->tabRename = b; } -bool KListView::tabOrderedRenaming() const +bool TDEListView::tabOrderedRenaming() const { return d->tabRename; } -void KListView::keyPressEvent (TQKeyEvent* e) +void TDEListView::keyPressEvent (TQKeyEvent* e) { //don't we need a contextMenuModifier too ? (aleXXX) if (e->key() == d->contextMenuKey) @@ -1475,7 +1475,7 @@ void KListView::keyPressEvent (TQKeyEvent* e) fileManagerKeyPressEvent (e); } -void KListView::activateAutomaticSelection() +void TDEListView::activateAutomaticSelection() { d->selectedBySimpleMove=true; d->selectedUsingMouse=false; @@ -1487,17 +1487,17 @@ void KListView::activateAutomaticSelection() }; } -void KListView::deactivateAutomaticSelection() +void TDEListView::deactivateAutomaticSelection() { d->selectedBySimpleMove=false; } -bool KListView::automaticSelection() const +bool TDEListView::automaticSelection() const { return d->selectedBySimpleMove; } -void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) +void TDEListView::fileManagerKeyPressEvent (TQKeyEvent* e) { //don't care whether it's on the keypad or not int e_state=(e->state() & ~Keypad); @@ -1827,7 +1827,7 @@ void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) emit selectionChanged(); } -void KListView::setSelectionModeExt (SelectionModeExt mode) +void TDEListView::setSelectionModeExt (SelectionModeExt mode) { d->selectionMode = mode; @@ -1850,12 +1850,12 @@ void KListView::setSelectionModeExt (SelectionModeExt mode) } } -KListView::SelectionModeExt KListView::selectionModeExt () const +TDEListView::SelectionModeExt TDEListView::selectionModeExt () const { return d->selectionMode; } -int KListView::itemIndex( const TQListViewItem *item ) const +int TDEListView::itemIndex( const TQListViewItem *item ) const { if ( !item ) return -1; @@ -1874,7 +1874,7 @@ int KListView::itemIndex( const TQListViewItem *item ) const } } -TQListViewItem* KListView::itemAtIndex(int index) +TQListViewItem* TDEListView::itemAtIndex(int index) { if (index<0) return 0; @@ -1890,7 +1890,7 @@ TQListViewItem* KListView::itemAtIndex(int index) } -void KListView::emitContextMenu (KListView*, TQListViewItem* i) +void TDEListView::emitContextMenu (TDEListView*, TQListViewItem* i) { TQPoint p; @@ -1902,24 +1902,24 @@ void KListView::emitContextMenu (KListView*, TQListViewItem* i) emit contextMenu (this, i, p); } -void KListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int) +void TDEListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int) { emit contextMenu (this, i, p); } -void KListView::setAcceptDrops (bool val) +void TDEListView::setAcceptDrops (bool val) { TQListView::setAcceptDrops (val); viewport()->setAcceptDrops (val); } -int KListView::dropVisualizerWidth () const +int TDEListView::dropVisualizerWidth () const { return d->mDropVisualizerWidth; } -void KListView::viewportPaintEvent(TQPaintEvent *e) +void TDEListView::viewportPaintEvent(TQPaintEvent *e) { d->paintAbove = 0; d->paintCurrent = 0; @@ -1946,23 +1946,23 @@ void KListView::viewportPaintEvent(TQPaintEvent *e) d->painting = false; } -void KListView::setFullWidth() +void TDEListView::setFullWidth() { setFullWidth(true); } -void KListView::setFullWidth(bool fullWidth) +void TDEListView::setFullWidth(bool fullWidth) { d->fullWidth = fullWidth; header()->setStretchEnabled(fullWidth, columns()-1); } -bool KListView::fullWidth() const +bool TDEListView::fullWidth() const { return d->fullWidth; } -int KListView::addColumn(const TQString& label, int width) +int TDEListView::addColumn(const TQString& label, int width) { int result = TQListView::addColumn(label, width); if (d->fullWidth) { @@ -1972,7 +1972,7 @@ int KListView::addColumn(const TQString& label, int width) return result; } -int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int width) +int TDEListView::addColumn(const TQIconSet& iconset, const TQString& label, int width) { int result = TQListView::addColumn(iconset, label, width); if (d->fullWidth) { @@ -1982,40 +1982,40 @@ int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int wi return result; } -void KListView::removeColumn(int index) +void TDEListView::removeColumn(int index) { TQListView::removeColumn(index); if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1); } -void KListView::viewportResizeEvent(TQResizeEvent* e) +void TDEListView::viewportResizeEvent(TQResizeEvent* e) { TQListView::viewportResizeEvent(e); } -const TQColor &KListView::alternateBackground() const +const TQColor &TDEListView::alternateBackground() const { return d->alternateBackground; } -void KListView::setAlternateBackground(const TQColor &c) +void TDEListView::setAlternateBackground(const TQColor &c) { d->alternateBackground = c; repaint(); } -void KListView::setShadeSortColumn(bool shadeSortColumn) +void TDEListView::setShadeSortColumn(bool shadeSortColumn) { d->shadeSortColumn = shadeSortColumn; repaint(); } -bool KListView::shadeSortColumn() const +bool TDEListView::shadeSortColumn() const { return d->shadeSortColumn; } -void KListView::saveLayout(TDEConfig *config, const TQString &group) const +void TDEListView::saveLayout(TDEConfig *config, const TQString &group) const { TDEConfigGroupSaver saver(config, group); TQStringList widths, order; @@ -2033,7 +2033,7 @@ void KListView::saveLayout(TDEConfig *config, const TQString &group) const config->writeEntry("SortAscending", d->sortAscending); } -void KListView::restoreLayout(TDEConfig *config, const TQString &group) +void TDEListView::restoreLayout(TDEConfig *config, const TQString &group) { TDEConfigGroupSaver saver(config, group); TQStringList cols = config->readListEntry("ColumnWidths"); @@ -2068,7 +2068,7 @@ void KListView::restoreLayout(TDEConfig *config, const TQString &group) setSorting(config->readNumEntry("SortColumn"), config->readBoolEntry("SortAscending", true)); } -void KListView::setSorting(int column, bool ascending) +void TDEListView::setSorting(int column, bool ascending) { TQListViewItem *selected = 0; @@ -2095,23 +2095,23 @@ void KListView::setSorting(int column, bool ascending) TQListViewItem* item = firstChild(); while ( item ) { - KListViewItem *kItem = dynamic_cast(item); + TDEListViewItem *kItem = dynamic_cast(item); if (kItem) kItem->m_known = false; item = item->itemBelow(); } } -int KListView::columnSorted(void) const +int TDEListView::columnSorted(void) const { return d->sortColumn; } -bool KListView::ascendingSort(void) const +bool TDEListView::ascendingSort(void) const { return d->sortAscending; } -void KListView::takeItem(TQListViewItem *item) +void TDEListView::takeItem(TQListViewItem *item) { if(item && item == d->editor->currentItem()) d->editor->terminate(); @@ -2119,7 +2119,7 @@ void KListView::takeItem(TQListViewItem *item) TQListView::takeItem(item); } -void KListView::disableAutoSelection() +void TDEListView::disableAutoSelection() { if ( d->disableAutoSelection ) return; @@ -2129,7 +2129,7 @@ void KListView::disableAutoSelection() d->autoSelectDelay = -1; } -void KListView::resetAutoSelection() +void TDEListView::resetAutoSelection() { if ( !d->disableAutoSelection ) return; @@ -2138,36 +2138,36 @@ void KListView::resetAutoSelection() d->autoSelectDelay = TDEGlobalSettings::autoSelectDelay(); } -void KListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c ) { emit TQListView::doubleClicked( item, pos, c ); } -KListViewItem::KListViewItem(TQListView *parent) +TDEListViewItem::TDEListViewItem(TQListView *parent) : TQListViewItem(parent) { init(); } -KListViewItem::KListViewItem(TQListViewItem *parent) +TDEListViewItem::TDEListViewItem(TQListViewItem *parent) : TQListViewItem(parent) { init(); } -KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after) +TDEListViewItem::TDEListViewItem(TQListView *parent, TQListViewItem *after) : TQListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after) +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQListViewItem *after) : TQListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(TQListView *parent, +TDEListViewItem::TDEListViewItem(TQListView *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2175,7 +2175,7 @@ KListViewItem::KListViewItem(TQListView *parent, init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2183,7 +2183,7 @@ KListViewItem::KListViewItem(TQListViewItem *parent, init(); } -KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after, +TDEListViewItem::TDEListViewItem(TQListView *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2191,7 +2191,7 @@ KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after, init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after, +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2199,44 +2199,44 @@ KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after, init(); } -KListViewItem::~KListViewItem() +TDEListViewItem::~TDEListViewItem() { if(listView()) - emit static_cast(listView())->itemRemoved(this); + emit static_cast(listView())->itemRemoved(this); } -void KListViewItem::init() +void TDEListViewItem::init() { m_odd = m_known = false; - KListView *lv = static_cast(listView()); + TDEListView *lv = static_cast(listView()); setDragEnabled( dragEnabled() || lv->dragEnabled() ); emit lv->itemAdded(this); } -void KListViewItem::insertItem(TQListViewItem *item) +void TDEListViewItem::insertItem(TQListViewItem *item) { TQListViewItem::insertItem(item); if(listView()) - emit static_cast(listView())->itemAdded(item); + emit static_cast(listView())->itemAdded(item); } -void KListViewItem::takeItem(TQListViewItem *item) +void TDEListViewItem::takeItem(TQListViewItem *item) { TQListViewItem::takeItem(item); if(listView()) - emit static_cast(listView())->itemRemoved(item); + emit static_cast(listView())->itemRemoved(item); } -const TQColor &KListViewItem::backgroundColor() +const TQColor &TDEListViewItem::backgroundColor() { if (isAlternate()) - return static_cast< KListView* >(listView())->alternateBackground(); + return static_cast< TDEListView* >(listView())->alternateBackground(); return listView()->viewport()->colorGroup().base(); } -TQColor KListViewItem::backgroundColor(int column) +TQColor TDEListViewItem::backgroundColor(int column) { - KListView* view = static_cast< KListView* >(listView()); + TDEListView* view = static_cast< TDEListView* >(listView()); TQColor color = isAlternate() ? view->alternateBackground() : view->viewport()->colorGroup().base(); @@ -2260,14 +2260,14 @@ TQColor KListViewItem::backgroundColor(int column) return color; } -bool KListViewItem::isAlternate() +bool TDEListViewItem::isAlternate() { - KListView* const lv = static_cast(listView()); + TDEListView* const lv = static_cast(listView()); if (lv && lv->alternateBackground().isValid()) { - KListViewItem *above; + TDEListViewItem *above; - KListView::KListViewPrivate* const lvD = lv->d; + TDEListView::TDEListViewPrivate* const lvD = lv->d; // Ok, there's some weirdness here that requires explanation as this is a // speed hack. itemAbove() is a O(n) operation (though this isn't @@ -2294,11 +2294,11 @@ bool KListViewItem::isAlternate() lvD->paintBelow = itemBelow(); } - above = dynamic_cast(lvD->paintAbove); + above = dynamic_cast(lvD->paintAbove); } else { - above = dynamic_cast(itemAbove()); + above = dynamic_cast(itemAbove()); } m_known = above ? above->m_known : true; @@ -2308,18 +2308,18 @@ bool KListViewItem::isAlternate() } else { - KListViewItem *item; + TDEListViewItem *item; bool previous = true; if (parent()) { - item = dynamic_cast(parent()); + item = dynamic_cast(parent()); if (item) previous = item->m_odd; - item = dynamic_cast(parent()->firstChild()); + item = dynamic_cast(parent()->firstChild()); } else { - item = dynamic_cast(lv->firstChild()); + item = dynamic_cast(lv->firstChild()); } while(item) @@ -2327,7 +2327,7 @@ bool KListViewItem::isAlternate() previous = !previous; item->m_odd = previous; item->m_known = true; - item = dynamic_cast(item->nextSibling()); + item = dynamic_cast(item->nextSibling()); } } return m_odd; @@ -2335,7 +2335,7 @@ bool KListViewItem::isAlternate() return false; } -void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) +void TDEListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { TQColorGroup _cg = cg; TQListView* lv = listView(); @@ -2363,7 +2363,7 @@ void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, selection of the current item is just set to \a select. */ -void KListView::selectAll( bool select ) +void TDEListView::selectAll( bool select ) { if ( selectionMode() == Multi || selectionMode() == Extended ) { bool b = signalsBlocked(); @@ -2402,7 +2402,7 @@ void KListView::selectAll( bool select ) } } -void KListView::virtual_hook( int, void* ) +void TDEListView::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "klistview.moc" diff --git a/tdeui/klistview.h b/tdeui/klistview.h index ee283aa5f..750100b8c 100644 --- a/tdeui/klistview.h +++ b/tdeui/klistview.h @@ -46,13 +46,13 @@ class KLineEdit; * To see where you are dropping, setDropVisualizer(true). * And also you'll need acceptDrag(TQDropEvent*) * - * KListView is drag-enabled, too: to benefit from that you have to derive from it. + * TDEListView is drag-enabled, too: to benefit from that you have to derive from it. * Reimplement dragObject() and (possibly) startDrag(), * and setDragEnabled(true). */ -class TDEUI_EXPORT KListView : public TQListView +class TDEUI_EXPORT TDEListView : public TQListView { - friend class KListViewItem; + friend class TDEListViewItem; Q_OBJECT @@ -116,12 +116,12 @@ public: * The parameters @p parent and @p name are handled by * TQListView, as usual. */ - KListView (TQWidget *parent = 0, const char *name = 0); + TDEListView (TQWidget *parent = 0, const char *name = 0); /** * Destructor. */ - virtual ~KListView(); + virtual ~TDEListView(); /** * Reimplemented for internal reasons. @@ -333,7 +333,7 @@ public: /** * sets the alternate background background color. - * This only has an effect if the items are KListViewItems + * This only has an effect if the items are TDEListViewItems * * @param c the color to use for every other item. Set to an invalid * color to disable alternate colors. @@ -452,7 +452,7 @@ signals: * @param after is the item after which the drop occurred (or 0L, if * the drop was above all items */ - void dropped (KListView* list, TQDropEvent* e, TQListViewItem* after); + void dropped (TDEListView* list, TQDropEvent* e, TQListViewItem* after); /** * This signal gets emitted whenever something acceptable is @@ -466,7 +466,7 @@ signals: * @param after is the item after which the drop occurred (or 0L, if * the drop was above all items */ - void dropped (KListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); + void dropped (TDEListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); /** * This signal gets emitted whenever something acceptable is @@ -494,7 +494,7 @@ signals: * a move is made, for example, to disable sorting * * This is sent only once per each groups of moves. That is, for each - * drop that is a move this will be emitted once, before KListView calls + * drop that is a move this will be emitted once, before TDEListView calls * @see moveItem() */ void aboutToMove(); @@ -538,13 +538,13 @@ signals: * This signal is emitted when the shortcut key for popup-menus is pressed. * * Normally you should not use this, just connect a slot to signal - * contextMenu (KListView*, TQListViewItem*, const TQPoint&) to correctly + * contextMenu (TDEListView*, TQListViewItem*, const TQPoint&) to correctly * handle showing context menus regardless of settings. * * @param list is this listview. * @param item is the currentItem() at the time the key was pressed. May be 0L. */ - void menuShortCutPressed (KListView* list, TQListViewItem* item); + void menuShortCutPressed (TDEListView* list, TQListViewItem* item); /** * This signal is emitted whenever a context-menu should be shown for item @p i. @@ -554,7 +554,7 @@ signals: * @param i is the item for which the menu should be shown. May be 0L. * @param p is the point at which the menu should be shown. */ - void contextMenu (KListView* l, TQListViewItem* i, const TQPoint& p); + void contextMenu (TDEListView* l, TQListViewItem* i, const TQPoint& p); void itemAdded(TQListViewItem *item); void itemRemoved(TQListViewItem *item); @@ -571,7 +571,7 @@ public slots: * Use this function to enable the feature on other columns. * * If you want more intelligent (dynamic) selection, - * you'll have to derive from KListView, + * you'll have to derive from TDEListView, * and override rename() and call only call it * if you want the item to be renamed. */ @@ -947,7 +947,7 @@ protected slots: /** * Emit the contextMenu signal. This slot is for key presses. */ - void emitContextMenu (KListView*, TQListViewItem*); + void emitContextMenu (TDEListView*, TQListViewItem*); /** * Accessory slot for AutoSelect @@ -1004,8 +1004,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KListViewPrivate; - KListViewPrivate* const d; + class TDEListViewPrivate; + TDEListViewPrivate* const d; bool isExecuteArea( int x, TQListViewItem* item ); }; @@ -1015,46 +1015,46 @@ private: * * @short listview item with alternate background color support */ -class TDEUI_EXPORT KListViewItem : public TQListViewItem +class TDEUI_EXPORT TDEListViewItem : public TQListViewItem { - friend class KListView; + friend class TDEListView; public: /** * constructors. The semantics remain as in TQListViewItem. * Although they accept a TQListViewItem as parent, please - * don't mix KListViewItem (or subclasses) with QListViewItem + * don't mix TDEListViewItem (or subclasses) with QListViewItem * (or subclasses). */ - KListViewItem(TQListView *parent); - KListViewItem(TQListViewItem *parent); - KListViewItem(TQListView *parent, TQListViewItem *after); - KListViewItem(TQListViewItem *parent, TQListViewItem *after); + TDEListViewItem(TQListView *parent); + TDEListViewItem(TQListViewItem *parent); + TDEListViewItem(TQListView *parent, TQListViewItem *after); + TDEListViewItem(TQListViewItem *parent, TQListViewItem *after); - KListViewItem(TQListView *parent, + TDEListViewItem(TQListView *parent, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListViewItem *parent, + TDEListViewItem(TQListViewItem *parent, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListView *parent, TQListViewItem *after, + TDEListViewItem(TQListView *parent, TQListViewItem *after, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListViewItem *parent, TQListViewItem *after, + TDEListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - virtual ~KListViewItem(); + virtual ~TDEListViewItem(); virtual void insertItem(TQListViewItem *item); virtual void takeItem(TQListViewItem *item); diff --git a/tdeui/klistviewlineedit.h b/tdeui/klistviewlineedit.h index f08997925..d0019698e 100644 --- a/tdeui/klistviewlineedit.h +++ b/tdeui/klistviewlineedit.h @@ -22,15 +22,15 @@ #include /** - * the editor for a KListView. please don't use this. + * the editor for a TDEListView. please don't use this. * @internal **/ -class TDEUI_EXPORT KListViewLineEdit : public KLineEdit +class TDEUI_EXPORT TDEListViewLineEdit : public KLineEdit { Q_OBJECT public: - KListViewLineEdit(KListView *parent); - ~KListViewLineEdit(); + TDEListViewLineEdit(TDEListView *parent); + ~TDEListViewLineEdit(); TQListViewItem *currentItem() const; @@ -52,7 +52,7 @@ protected: void terminate(bool commit); TQListViewItem *item; int col; - KListView* const p; + TDEListView* const p; protected slots: void slotSelectionChanged(); diff --git a/tdeui/klistviewsearchline.cpp b/tdeui/klistviewsearchline.cpp index 7f96ed94d..96bf82370 100644 --- a/tdeui/klistviewsearchline.cpp +++ b/tdeui/klistviewsearchline.cpp @@ -33,17 +33,17 @@ #define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004 -class KListViewSearchLine::KListViewSearchLinePrivate +class TDEListViewSearchLine::TDEListViewSearchLinePrivate { public: - KListViewSearchLinePrivate() : + TDEListViewSearchLinePrivate() : listView(0), caseSensitive(false), activeSearch(false), keepParentsVisible(true), queuedSearches(0) {} - KListView *listView; + TDEListView *listView; bool caseSensitive; bool activeSearch; bool keepParentsVisible; @@ -56,10 +56,10 @@ public: // public methods //////////////////////////////////////////////////////////////////////////////// -KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, const char *name) : +TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, TDEListView *listView, const char *name) : KLineEdit(parent, name) { - d = new KListViewSearchLinePrivate; + d = new TDEListViewSearchLinePrivate; d->listView = listView; @@ -77,10 +77,10 @@ KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, setEnabled(false); } -KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) : +TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, const char *name) : KLineEdit(parent, name) { - d = new KListViewSearchLinePrivate; + d = new TDEListViewSearchLinePrivate; d->listView = 0; @@ -90,27 +90,27 @@ KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) : setEnabled(false); } -KListViewSearchLine::~KListViewSearchLine() +TDEListViewSearchLine::~TDEListViewSearchLine() { delete d; } -bool KListViewSearchLine::caseSensitive() const +bool TDEListViewSearchLine::caseSensitive() const { return d->caseSensitive; } -TQValueList KListViewSearchLine::searchColumns() const +TQValueList TDEListViewSearchLine::searchColumns() const { return d->searchColumns; } -bool KListViewSearchLine::keepParentsVisible() const +bool TDEListViewSearchLine::keepParentsVisible() const { return d->keepParentsVisible; } -KListView *KListViewSearchLine::listView() const +TDEListView *TDEListViewSearchLine::listView() const { return d->listView; } @@ -119,7 +119,7 @@ KListView *KListViewSearchLine::listView() const // public slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::updateSearch(const TQString &s) +void TDEListViewSearchLine::updateSearch(const TQString &s) { if(!d->listView) return; @@ -133,9 +133,9 @@ void KListViewSearchLine::updateSearch(const TQString &s) switch(d->listView->selectionMode()) { - case KListView::NoSelection: + case TDEListView::NoSelection: break; - case KListView::Single: + case TDEListView::Single: currentItem = d->listView->selectedItem(); break; default: @@ -160,22 +160,22 @@ void KListViewSearchLine::updateSearch(const TQString &s) d->listView->ensureItemVisible(currentItem); } -void KListViewSearchLine::setCaseSensitive(bool cs) +void TDEListViewSearchLine::setCaseSensitive(bool cs) { d->caseSensitive = cs; } -void KListViewSearchLine::setKeepParentsVisible(bool v) +void TDEListViewSearchLine::setKeepParentsVisible(bool v) { d->keepParentsVisible = v; } -void KListViewSearchLine::setSearchColumns(const TQValueList &columns) +void TDEListViewSearchLine::setSearchColumns(const TQValueList &columns) { d->searchColumns = columns; } -void KListViewSearchLine::setListView(KListView *lv) +void TDEListViewSearchLine::setListView(TDEListView *lv) { if(d->listView) { disconnect(d->listView, TQT_SIGNAL(destroyed()), @@ -202,7 +202,7 @@ void KListViewSearchLine::setListView(KListView *lv) // protected members //////////////////////////////////////////////////////////////////////////////// -bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const +bool TDEListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const { if(s.isEmpty()) return true; @@ -231,7 +231,7 @@ bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString return false; } -TQPopupMenu *KListViewSearchLine::createPopupMenu() +TQPopupMenu *TDEListViewSearchLine::createPopupMenu() { TQPopupMenu *popup = KLineEdit::createPopupMenu(); @@ -281,14 +281,14 @@ TQPopupMenu *KListViewSearchLine::createPopupMenu() // protected slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::queueSearch(const TQString &search) +void TDEListViewSearchLine::queueSearch(const TQString &search) { d->queuedSearches++; d->search = search; TQTimer::singleShot(200, this, TQT_SLOT(activateSearch())); } -void KListViewSearchLine::activateSearch() +void TDEListViewSearchLine::activateSearch() { --(d->queuedSearches); @@ -300,18 +300,18 @@ void KListViewSearchLine::activateSearch() // private slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::itemAdded(TQListViewItem *item) const +void TDEListViewSearchLine::itemAdded(TQListViewItem *item) const { item->setVisible(itemMatches(item, text())); } -void KListViewSearchLine::listViewDeleted() +void TDEListViewSearchLine::listViewDeleted() { d->listView = 0; setEnabled(false); } -void KListViewSearchLine::searchColumnsMenuActivated(int id) +void TDEListViewSearchLine::searchColumnsMenuActivated(int id) { if(id == KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID) { if(d->searchColumns.isEmpty()) @@ -340,7 +340,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) // private methods //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::checkItemParentsNotVisible() +void TDEListViewSearchLine::checkItemParentsNotVisible() { TQListViewItemIterator it(d->listView); for(; it.current(); ++it) @@ -364,7 +364,7 @@ void KListViewSearchLine::checkItemParentsNotVisible() * \return \c true if an item which should be visible is found, \c false if all items found should be hidden. If this function * returns true and \p highestHiddenParent was not 0, highestHiddenParent will have been shown. */ -bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) +bool TDEListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) { bool visible = false; TQListViewItem * first = item; @@ -403,24 +403,24 @@ bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListVi } //////////////////////////////////////////////////////////////////////////////// -// KListViewSearchLineWidget +// TDEListViewSearchLineWidget //////////////////////////////////////////////////////////////////////////////// -class KListViewSearchLineWidget::KListViewSearchLineWidgetPrivate +class TDEListViewSearchLineWidget::TDEListViewSearchLineWidgetPrivate { public: - KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} - KListView *listView; - KListViewSearchLine *searchLine; + TDEListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} + TDEListView *listView; + TDEListViewSearchLine *searchLine; TQToolButton *clearButton; }; -KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, +TDEListViewSearchLineWidget::TDEListViewSearchLineWidget(TDEListView *listView, TQWidget *parent, const char *name) : TQHBox(parent, name) { - d = new KListViewSearchLineWidgetPrivate; + d = new TDEListViewSearchLineWidgetPrivate; d->listView = listView; setSpacing(5); @@ -428,19 +428,19 @@ KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, TQTimer::singleShot(0, this, TQT_SLOT(createWidgets())); } -KListViewSearchLineWidget::~KListViewSearchLineWidget() +TDEListViewSearchLineWidget::~TDEListViewSearchLineWidget() { delete d; } -KListViewSearchLine *KListViewSearchLineWidget::createSearchLine(KListView *listView) +TDEListViewSearchLine *TDEListViewSearchLineWidget::createSearchLine(TDEListView *listView) { if(!d->searchLine) - d->searchLine = new KListViewSearchLine(this, listView); + d->searchLine = new TDEListViewSearchLine(this, listView); return d->searchLine; } -void KListViewSearchLineWidget::createWidgets() +void TDEListViewSearchLineWidget::createWidgets() { positionInToolBar(); @@ -463,14 +463,14 @@ void KListViewSearchLineWidget::createWidgets() connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear())); } -KListViewSearchLine *KListViewSearchLineWidget::searchLine() const +TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const { return d->searchLine; } -void KListViewSearchLineWidget::positionInToolBar() +void TDEListViewSearchLineWidget::positionInToolBar() { - KToolBar *toolBar = tqt_dynamic_cast(parent()); + TDEToolBar *toolBar = tqt_dynamic_cast(parent()); if(toolBar) { @@ -486,7 +486,7 @@ void KListViewSearchLineWidget::positionInToolBar() toolBar->setItemAutoSized(id); if(!d->clearButton) { TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"; - d->clearButton = new KToolBarButton(icon, 2005, toolBar); + d->clearButton = new TDEToolBarButton(icon, 2005, toolBar); } toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index); break; diff --git a/tdeui/klistviewsearchline.h b/tdeui/klistviewsearchline.h index f763aad72..4c278a9d9 100644 --- a/tdeui/klistviewsearchline.h +++ b/tdeui/klistviewsearchline.h @@ -22,7 +22,7 @@ #include #include -class KListView; +class TDEListView; class TQListViewItem; class TQToolButton; @@ -31,12 +31,12 @@ class TQToolButton; * listview based on a simple text search. * * No changes to the application other than instantiating this class with an - * appropriate KListView should be needed. + * appropriate TDEListView should be needed. * * If you want the clear button and the search label, you should take a look at - * the KListViewSearchLineWidget + * the TDEListViewSearchLineWidget * - * @note { When iterating over items in the KListView, make sure that + * @note { When iterating over items in the TDEListView, make sure that * the iterator only includes visible items (for example, by adding * TQListViewItemIterator::Visible to the iterator flags). Otherwise, * actions (such as deletion) may be taken on items that have been @@ -44,31 +44,31 @@ class TQToolButton; * @since 3.3 */ -class TDEUI_EXPORT KListViewSearchLine : public KLineEdit +class TDEUI_EXPORT TDEListViewSearchLine : public KLineEdit { Q_OBJECT public: /** - * Constructs a KListViewSearchLine with \a listView being the KListView to + * Constructs a TDEListViewSearchLine with \a listView being the TDEListView to * be filtered. * * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - KListViewSearchLine(TQWidget *parent = 0, KListView *listView = 0, const char *name = 0); + TDEListViewSearchLine(TQWidget *parent = 0, TDEListView *listView = 0, const char *name = 0); /** - * Constructs a KListViewSearchLine without any KListView to filter. The - * KListView object has to be set later with setListView(). + * Constructs a TDEListViewSearchLine without any TDEListView to filter. The + * TDEListView object has to be set later with setListView(). */ - KListViewSearchLine(TQWidget *parent, const char *name); + TDEListViewSearchLine(TQWidget *parent, const char *name); /** - * Destroys the KListViewSearchLine. + * Destroys the TDEListViewSearchLine. */ - virtual ~KListViewSearchLine(); + virtual ~TDEListViewSearchLine(); /** * Returns true if the search is case sensitive. This defaults to false. @@ -98,7 +98,7 @@ public: * * @see setListView() */ - KListView *listView() const; + TDEListView *listView() const; public slots: /** @@ -136,12 +136,12 @@ public slots: void setSearchColumns(const TQValueList &columns); /** - * Sets the KListView that is filtered by this search line. If \a lv is null + * Sets the TDEListView that is filtered by this search line. If \a lv is null * then the widget will be disabled. * * @see listView() */ - void setListView(KListView *lv); + void setListView(TDEListView *lv); protected: @@ -206,43 +206,43 @@ private slots: void searchColumnsMenuActivated(int); private: - class KListViewSearchLinePrivate; - KListViewSearchLinePrivate *d; + class TDEListViewSearchLinePrivate; + TDEListViewSearchLinePrivate *d; }; /** - * Creates a widget featuring a KListViewSearchLine, a label with the text + * Creates a widget featuring a TDEListViewSearchLine, a label with the text * "Search" and a button to clear the search. * * @since 3.4 */ -class TDEUI_EXPORT KListViewSearchLineWidget : public TQHBox +class TDEUI_EXPORT TDEListViewSearchLineWidget : public TQHBox { Q_OBJECT public: /** - * Creates a KListViewSearchLineWidget for \a listView with \a parent as the + * Creates a TDEListViewSearchLineWidget for \a listView with \a parent as the * parent with and \a name. */ - KListViewSearchLineWidget(KListView *listView = 0, TQWidget *parent = 0, + TDEListViewSearchLineWidget(TDEListView *listView = 0, TQWidget *parent = 0, const char *name = 0); /** - * Destroys the KListViewSearchLineWidget + * Destroys the TDEListViewSearchLineWidget */ - ~KListViewSearchLineWidget(); + ~TDEListViewSearchLineWidget(); /** * Creates the search line. This can be useful to reimplement in cases where - * a KListViewSearchLine subclass is used. + * a TDEListViewSearchLine subclass is used. */ - virtual KListViewSearchLine *createSearchLine(KListView *listView); + virtual TDEListViewSearchLine *createSearchLine(TDEListView *listView); /** * Returns a pointer to the search line. */ - KListViewSearchLine *searchLine() const; + TDEListViewSearchLine *searchLine() const; protected slots: /** @@ -257,8 +257,8 @@ private slots: void positionInToolBar(); private: - class KListViewSearchLineWidgetPrivate; - KListViewSearchLineWidgetPrivate *d; + class TDEListViewSearchLineWidgetPrivate; + TDEListViewSearchLineWidgetPrivate *d; }; #endif diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp index de9bb8f8f..743c273cc 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/kmainwindow.cpp @@ -57,7 +57,7 @@ #include #include -class KMainWindowPrivate { +class TDEMainWindowPrivate { public: bool showHelpMenu:1; @@ -67,16 +67,16 @@ public: bool care_about_geometry:1; bool shuttingDown:1; TQString autoSaveGroup; - KAccel * kaccel; - KMainWindowInterface *m_interface; + TDEAccel * kaccel; + TDEMainWindowInterface *m_interface; KDEPrivate::ToolBarHandler *toolBarHandler; TQTimer* settingsTimer; - KToggleAction *showStatusBarAction; + TDEToggleAction *showStatusBarAction; TQRect defaultWindowSize; TQPtrList hiddenDockWindows; }; -TQPtrList* KMainWindow::memberList = 0L; +TQPtrList* TDEMainWindow::memberList = 0L; static bool no_query_exit = false; static KMWSessionManaged* ksm = 0; static KStaticDeleter ksmd; @@ -93,13 +93,13 @@ public: bool saveState( TQSessionManager& ) { TDEConfig* config = TDEApplication::kApplication()->sessionConfig(); - if ( KMainWindow::memberList->first() ){ + if ( TDEMainWindow::memberList->first() ){ // According to Jochen Wilhelmy , this // hook is useful for better document orientation - KMainWindow::memberList->first()->saveGlobalProperties(config); + TDEMainWindow::memberList->first()->saveGlobalProperties(config); } - TQPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*TDEMainWindow::memberList); int n = 0; for (it.toFirst(); it.current(); ++it){ n++; @@ -115,10 +115,10 @@ public: // not really a fast method but the only compatible one if ( sm.allowsInteraction() ) { bool canceled = false; - TQPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*TDEMainWindow::memberList); ::no_query_exit = true; for (it.toFirst(); it.current() && !canceled;){ - KMainWindow *window = *it; + TDEMainWindow *window = *it; ++it; // Update now, the current window might get deleted if ( !window->testWState( TQt::WState_ForceHide ) ) { TQCloseEvent e; @@ -144,9 +144,9 @@ public: if (canceled) return false; - KMainWindow* last = 0; + TDEMainWindow* last = 0; for (it.toFirst(); it.current() && !canceled; ++it){ - KMainWindow *window = *it; + TDEMainWindow *window = *it; if ( !window->testWState( TQt::WState_ForceHide ) ) { last = window; } @@ -164,19 +164,19 @@ public: static bool being_first = true; -KMainWindow::KMainWindow( TQWidget* parent, const char *name, WFlags f ) +TDEMainWindow::TDEMainWindow( TQWidget* parent, const char *name, WFlags f ) : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 ) { - initKMainWindow(name, 0); + initTDEMainWindow(name, 0); } -KMainWindow::KMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) +TDEMainWindow::TDEMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 ) { - initKMainWindow(name, cflags); + initTDEMainWindow(name, cflags); } -void KMainWindow::initKMainWindow(const char *name, int cflags) +void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) { KWhatsThisManager::init (); setDockMenuEnabled( false ); @@ -185,7 +185,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) actionCollection()->setWidget( this ); connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown())); if( !memberList ) - memberList = new TQPtrList; + memberList = new TQPtrList; if ( !ksm ) ksm = ksmd.setObject(ksm, new KMWSessionManaged()); @@ -233,7 +233,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) memberList->append( this ); - d = new KMainWindowPrivate; + d = new TDEMainWindowPrivate; d->showHelpMenu = true; d->settingsDirty = false; d->autoSaveSettings = false; @@ -255,13 +255,13 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) if ( cflags & NoDCOPObject) d->m_interface = 0; else - d->m_interface = new KMainWindowInterface(this); + d->m_interface = new TDEMainWindowInterface(this); if (!kapp->authorize("movable_toolbars")) setDockWindowsMovable(false); } -KAction *KMainWindow::toolBarMenuAction() +TDEAction *TDEMainWindow::toolBarMenuAction() { if ( !d->toolBarHandler ) return 0; @@ -270,13 +270,13 @@ KAction *KMainWindow::toolBarMenuAction() } -void KMainWindow::setupToolbarMenuActions() +void TDEMainWindow::setupToolbarMenuActions() { if ( d->toolBarHandler ) d->toolBarHandler->setupActions(); } -void KMainWindow::parseGeometry(bool parsewidth) +void TDEMainWindow::parseGeometry(bool parsewidth) { assert ( !kapp->geometryArgument().isNull() ); assert ( d->care_about_geometry ); @@ -311,7 +311,7 @@ void KMainWindow::parseGeometry(bool parsewidth) #endif } -KMainWindow::~KMainWindow() +TDEMainWindow::~TDEMainWindow() { delete d->settingsTimer; TQMenuBar* mb = internalMenuBar(); @@ -321,7 +321,7 @@ KMainWindow::~KMainWindow() memberList->remove( this ); } -KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis ) +TDEPopupMenu* TDEMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis ) { if( !mHelpMenu ) { if ( aboutAppText.isEmpty() ) @@ -338,7 +338,7 @@ KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsT return mHelpMenu->menu(); } -KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis ) +TDEPopupMenu* TDEMainWindow::customHelpMenu( bool showWhatsThis ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this, TQString::null, showWhatsThis ); @@ -349,7 +349,7 @@ KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis ) return mHelpMenu->menu(); } -bool KMainWindow::canBeRestored( int number ) +bool TDEMainWindow::canBeRestored( int number ) { if ( !kapp->isRestored() ) return false; @@ -361,7 +361,7 @@ bool KMainWindow::canBeRestored( int number ) return number >= 1 && number <= n; } -const TQString KMainWindow::classNameOfToplevel( int number ) +const TQString TDEMainWindow::classNameOfToplevel( int number ) { if ( !kapp->isRestored() ) return TQString::null; @@ -378,7 +378,7 @@ const TQString KMainWindow::classNameOfToplevel( int number ) return config->readEntry( TQString::fromLatin1("ClassName") ); } -void KMainWindow::show() +void TDEMainWindow::show() { TQMainWindow::show(); @@ -388,7 +388,7 @@ void KMainWindow::show() d->hiddenDockWindows.clear(); } -void KMainWindow::hide() +void TDEMainWindow::hide() { if ( isVisible() ) { @@ -408,27 +408,27 @@ void KMainWindow::hide() TQWidget::hide(); } -bool KMainWindow::restore( int number, bool show ) +bool TDEMainWindow::restore( int number, bool show ) { if ( !canBeRestored( number ) ) return false; TDEConfig *config = kapp->sessionConfig(); if ( readPropertiesInternal( config, number ) ){ if ( show ) - KMainWindow::show(); + TDEMainWindow::show(); return false; } return false; } -KXMLGUIFactory *KMainWindow::guiFactory() +KXMLGUIFactory *TDEMainWindow::guiFactory() { if ( !factory_ ) factory_ = new KXMLGUIFactory( this, TQT_TQOBJECT(this), "guifactory" ); return factory_; } -int KMainWindow::configureToolbars() +int TDEMainWindow::configureToolbars() { saveMainWindowSettings(TDEGlobal::config()); KEditToolbar dlg(actionCollection(), xmlFile(), true, this); @@ -436,17 +436,17 @@ int KMainWindow::configureToolbars() return dlg.exec(); } -void KMainWindow::saveNewToolbarConfig() +void TDEMainWindow::saveNewToolbarConfig() { createGUI(xmlFile()); applyMainWindowSettings( TDEGlobal::config() ); } -void KMainWindow::setupGUI( int options, const TQString & xmlfile ) { +void TDEMainWindow::setupGUI( int options, const TQString & xmlfile ) { setupGUI(TQSize(), options, xmlfile); } -void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { +void TDEMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { if( options & Keys ){ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); @@ -488,7 +488,7 @@ void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xm } -void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) +void TDEMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) { // disabling the updates prevents unnecessary redraws setUpdatesEnabled( false ); @@ -544,7 +544,7 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) // using stuff like the toolbar editor ). // In addition we have to take care of not removing containers // like popupmenus, defined in the XML document. - // this code should probably go into a separate method in KMainWindow. + // this code should probably go into a separate method in TDEMainWindow. // there's just one problem: I'm bad in finding names ;-) , so // I skipped this ;-) @@ -568,27 +568,27 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) updateGeometry(); } -void KMainWindow::setHelpMenuEnabled(bool showHelpMenu) +void TDEMainWindow::setHelpMenuEnabled(bool showHelpMenu) { d->showHelpMenu = showHelpMenu; } -bool KMainWindow::isHelpMenuEnabled() +bool TDEMainWindow::isHelpMenuEnabled() { return d->showHelpMenu; } -void KMainWindow::setCaption( const TQString &caption ) +void TDEMainWindow::setCaption( const TQString &caption ) { setPlainCaption( kapp->makeStdCaption(caption) ); } -void KMainWindow::setCaption( const TQString &caption, bool modified ) +void TDEMainWindow::setCaption( const TQString &caption, bool modified ) { setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); } -void KMainWindow::setPlainCaption( const TQString &caption ) +void TDEMainWindow::setPlainCaption( const TQString &caption ) { TQMainWindow::setCaption( caption ); #if defined Q_WS_X11 @@ -597,7 +597,7 @@ void KMainWindow::setPlainCaption( const TQString &caption ) #endif } -void KMainWindow::appHelpActivated( void ) +void TDEMainWindow::appHelpActivated( void ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this ); @@ -607,7 +607,7 @@ void KMainWindow::appHelpActivated( void ) mHelpMenu->appHelpActivated(); } -void KMainWindow::slotStateChanged(const TQString &newstate) +void TDEMainWindow::slotStateChanged(const TQString &newstate) { stateChanged(newstate, KXMLGUIClient::StateNoReverse); } @@ -615,7 +615,7 @@ void KMainWindow::slotStateChanged(const TQString &newstate) /* * Get rid of this for KDE 4.0 */ -void KMainWindow::slotStateChanged(const TQString &newstate, +void TDEMainWindow::slotStateChanged(const TQString &newstate, KXMLGUIClient::ReverseStateChange reverse) { stateChanged(newstate, reverse); @@ -624,14 +624,14 @@ void KMainWindow::slotStateChanged(const TQString &newstate, /* * Enable this for KDE 4.0 */ -// void KMainWindow::slotStateChanged(const TQString &newstate, +// void TDEMainWindow::slotStateChanged(const TQString &newstate, // bool reverse) // { // stateChanged(newstate, // reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); // } -void KMainWindow::closeEvent ( TQCloseEvent *e ) +void TDEMainWindow::closeEvent ( TQCloseEvent *e ) { // Save settings if auto-save is enabled, and settings have changed if (d->settingsDirty && d->autoSaveSettings) @@ -641,7 +641,7 @@ void KMainWindow::closeEvent ( TQCloseEvent *e ) e->accept(); int not_withdrawn = 0; - TQPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*TDEMainWindow::memberList); for (it.toFirst(); it.current(); ++it){ if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this ) not_withdrawn++; @@ -661,35 +661,35 @@ void KMainWindow::closeEvent ( TQCloseEvent *e ) } } -bool KMainWindow::queryExit() +bool TDEMainWindow::queryExit() { return true; } -bool KMainWindow::queryClose() +bool TDEMainWindow::queryClose() { return true; } -void KMainWindow::saveGlobalProperties( TDEConfig* ) +void TDEMainWindow::saveGlobalProperties( TDEConfig* ) { } -void KMainWindow::readGlobalProperties( TDEConfig* ) +void TDEMainWindow::readGlobalProperties( TDEConfig* ) { } #if defined(KDE_COMPAT) -void KMainWindow::updateRects() +void TDEMainWindow::updateRects() { } #endif -void KMainWindow::showAboutApplication() +void TDEMainWindow::showAboutApplication() { } -void KMainWindow::savePropertiesInternal( TDEConfig *config, int number ) +void TDEMainWindow::savePropertiesInternal( TDEConfig *config, int number ) { bool oldASWS = d->autoSaveWindowSize; d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size @@ -713,9 +713,9 @@ void KMainWindow::savePropertiesInternal( TDEConfig *config, int number ) d->autoSaveWindowSize = oldASWS; } -void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) +void TDEMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) { - kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl; + kdDebug(200) << "TDEMainWindow::saveMainWindowSettings " << configGroup << endl; TQString oldGroup; if (!configGroup.isEmpty()) @@ -746,8 +746,8 @@ void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &conf } int n = 1; // Toolbar counter. toolbars are counted from 1, - KToolBar *toolbar = 0; - TQPtrListIterator it( toolBarIterator() ); + TDEToolBar *toolbar = 0; + TQPtrListIterator it( toolBarIterator() ); while ( ( toolbar = it.current() ) ) { ++it; TQString group; @@ -766,7 +766,7 @@ void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &conf config->setGroup(oldGroup); } -void KMainWindow::setStandardToolBarMenuEnabled( bool enable ) +void TDEMainWindow::setStandardToolBarMenuEnabled( bool enable ) { if ( enable ) { if ( d->toolBarHandler ) @@ -788,12 +788,12 @@ void KMainWindow::setStandardToolBarMenuEnabled( bool enable ) } } -bool KMainWindow::isStandardToolBarMenuEnabled() const +bool TDEMainWindow::isStandardToolBarMenuEnabled() const { return ( d->toolBarHandler ); } -void KMainWindow::createStandardStatusBarAction(){ +void TDEMainWindow::createStandardStatusBarAction(){ if(!d->showStatusBarAction){ d->showStatusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(setSettingsDirty()), actionCollection()); KStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already. @@ -802,7 +802,7 @@ void KMainWindow::createStandardStatusBarAction(){ } } -bool KMainWindow::readPropertiesInternal( TDEConfig *config, int number ) +bool TDEMainWindow::readPropertiesInternal( TDEConfig *config, int number ) { if ( number == 1 ) readGlobalProperties( config ); @@ -826,14 +826,14 @@ bool KMainWindow::readPropertiesInternal( TDEConfig *config, int number ) return true; } -void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) +void TDEMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) { return applyMainWindowSettings(config,configGroup,false); } -void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) +void TDEMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) { - kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl; + kdDebug(200) << "TDEMainWindow::applyMainWindowSettings" << endl; TDEConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); @@ -860,8 +860,8 @@ void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &con } int n = 1; // Toolbar counter. toolbars are counted from 1, - KToolBar *toolbar; - TQPtrListIterator it( toolBarIterator() ); // must use own iterator + TDEToolBar *toolbar; + TQPtrListIterator it( toolBarIterator() ); // must use own iterator for ( ; it.current(); ++it) { toolbar= it.current(); @@ -881,9 +881,9 @@ void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &con finalizeGUI( true ); } -void KMainWindow::finalizeGUI( bool force ) +void TDEMainWindow::finalizeGUI( bool force ) { - //kdDebug(200) << "KMainWindow::finalizeGUI force=" << force << endl; + //kdDebug(200) << "TDEMainWindow::finalizeGUI force=" << force << endl; // The whole reason for this is that moveToolBar relies on the indexes // of the other toolbars, so in theory it should be called only once per // toolbar, but in increasing order of indexes. @@ -891,7 +891,7 @@ void KMainWindow::finalizeGUI( bool force ) // we call positionYourself again for each of them, but this time // the toolbariterator should give them in the proper order. // Both the XMLGUI and applySettings call this, hence "force" for the latter. - TQPtrListIterator it( toolBarIterator() ); + TQPtrListIterator it( toolBarIterator() ); for ( ; it.current() ; ++it ) { it.current()->positionYourself( force ); } @@ -899,7 +899,7 @@ void KMainWindow::finalizeGUI( bool force ) d->settingsDirty = false; } -void KMainWindow::saveWindowSize( TDEConfig * config ) const +void TDEMainWindow::saveWindowSize( TDEConfig * config ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); @@ -931,7 +931,7 @@ void KMainWindow::saveWindowSize( TDEConfig * config ) const config->writeEntry(heightString, h ); } -void KMainWindow::restoreWindowSize( TDEConfig * config ) +void TDEMainWindow::restoreWindowSize( TDEConfig * config ) { if (d->care_about_geometry) { parseGeometry(true); @@ -977,19 +977,19 @@ void KMainWindow::restoreWindowSize( TDEConfig * config ) } } -bool KMainWindow::initialGeometrySet() const +bool TDEMainWindow::initialGeometrySet() const { return d->care_about_geometry; } -void KMainWindow::ignoreInitialGeometry() +void TDEMainWindow::ignoreInitialGeometry() { d->care_about_geometry = false; } -void KMainWindow::setSettingsDirty() +void TDEMainWindow::setSettingsDirty() { - //kdDebug(200) << "KMainWindow::setSettingsDirty" << endl; + //kdDebug(200) << "TDEMainWindow::setSettingsDirty" << endl; d->settingsDirty = true; if ( d->autoSaveSettings ) { @@ -1004,17 +1004,17 @@ void KMainWindow::setSettingsDirty() } } -bool KMainWindow::settingsDirty() const +bool TDEMainWindow::settingsDirty() const { return d->settingsDirty; } -TQString KMainWindow::settingsGroup() const +TQString TDEMainWindow::settingsGroup() const { return d->autoSaveGroup; } -void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize ) +void TDEMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize ) { d->autoSaveSettings = true; d->autoSaveGroup = groupName; @@ -1029,27 +1029,27 @@ void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWind applyMainWindowSettings( TDEGlobal::config(), groupName ); } -void KMainWindow::resetAutoSaveSettings() +void TDEMainWindow::resetAutoSaveSettings() { d->autoSaveSettings = false; if ( d->settingsTimer ) d->settingsTimer->stop(); } -bool KMainWindow::autoSaveSettings() const +bool TDEMainWindow::autoSaveSettings() const { return d->autoSaveSettings; } -TQString KMainWindow::autoSaveGroup() const +TQString TDEMainWindow::autoSaveGroup() const { return d->autoSaveGroup; } -void KMainWindow::saveAutoSaveSettings() +void TDEMainWindow::saveAutoSaveSettings() { Q_ASSERT( d->autoSaveSettings ); - //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl; + //kdDebug(200) << "TDEMainWindow::saveAutoSaveSettings -> saving settings" << endl; saveMainWindowSettings( TDEGlobal::config(), d->autoSaveGroup ); TDEGlobal::config()->sync(); d->settingsDirty = false; @@ -1057,18 +1057,18 @@ void KMainWindow::saveAutoSaveSettings() d->settingsTimer->stop(); } -void KMainWindow::resizeEvent( TQResizeEvent * ) +void TDEMainWindow::resizeEvent( TQResizeEvent * ) { if ( d->autoSaveWindowSize ) setSettingsDirty(); } -bool KMainWindow::hasMenuBar() +bool TDEMainWindow::hasMenuBar() { return (internalMenuBar()); } -KMenuBar *KMainWindow::menuBar() +KMenuBar *TDEMainWindow::menuBar() { KMenuBar * mb = internalMenuBar(); if ( !mb ) { @@ -1080,7 +1080,7 @@ KMenuBar *KMainWindow::menuBar() return mb; } -KStatusBar *KMainWindow::statusBar() +KStatusBar *TDEMainWindow::statusBar() { KStatusBar * sb = internalStatusBar(); if ( !sb ) { @@ -1092,7 +1092,7 @@ KStatusBar *KMainWindow::statusBar() return sb; } -void KMainWindow::shuttingDown() +void TDEMainWindow::shuttingDown() { // Needed for Qt <= 3.0.3 at least to prevent reentrancy // when queryExit() shows a dialog. Check before removing! @@ -1107,7 +1107,7 @@ void KMainWindow::shuttingDown() } -KMenuBar *KMainWindow::internalMenuBar() +KMenuBar *TDEMainWindow::internalMenuBar() { TQObjectList *l = queryList( "KMenuBar", 0, false, false ); if ( !l || !l->first() ) { @@ -1120,7 +1120,7 @@ KMenuBar *KMainWindow::internalMenuBar() return m; } -KStatusBar *KMainWindow::internalStatusBar() +KStatusBar *TDEMainWindow::internalStatusBar() { TQObjectList *l = queryList( "KStatusBar", 0, false, false ); if ( !l || !l->first() ) { @@ -1133,70 +1133,70 @@ KStatusBar *KMainWindow::internalStatusBar() return s; } -void KMainWindow::childEvent( TQChildEvent* e) +void TDEMainWindow::childEvent( TQChildEvent* e) { TQMainWindow::childEvent( e ); } -KToolBar *KMainWindow::toolBar( const char * name ) +TDEToolBar *TDEMainWindow::toolBar( const char * name ) { if (!name) name = "mainToolBar"; - KToolBar *tb = (KToolBar*)child( name, "KToolBar" ); + TDEToolBar *tb = (TDEToolBar*)child( name, "TDEToolBar" ); if ( tb ) return tb; bool honor_mode = (!strcmp(name, "mainToolBar")); if ( builderClient() ) - return new KToolBar(this, name, honor_mode); // XMLGUI constructor + return new TDEToolBar(this, name, honor_mode); // XMLGUI constructor else - return new KToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI + return new TDEToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI } -TQPtrListIterator KMainWindow::toolBarIterator() +TQPtrListIterator TDEMainWindow::toolBarIterator() { toolbarList.clear(); TQPtrList lst; for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) { lst = toolBars( (ToolBarDock)i ); for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) { - if ( !tb->inherits( "KToolBar" ) ) + if ( !tb->inherits( "TDEToolBar" ) ) continue; - toolbarList.append( (KToolBar*)tb ); + toolbarList.append( (TDEToolBar*)tb ); } } - return TQPtrListIterator( toolbarList ); + return TQPtrListIterator( toolbarList ); } -KAccel * KMainWindow::accel() +TDEAccel * TDEMainWindow::accel() { if ( !d->kaccel ) - d->kaccel = new KAccel( this, "kmw-kaccel" ); + d->kaccel = new TDEAccel( this, "kmw-kaccel" ); return d->kaccel; } -void KMainWindow::paintEvent( TQPaintEvent * pe ) +void TDEMainWindow::paintEvent( TQPaintEvent * pe ) { TQMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering } -TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) +TQSize TDEMainWindow::sizeForCentralWidgetSize(TQSize size) { - KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); + TDEToolBar *tb = (TDEToolBar*)child( "mainToolBar", "TDEToolBar" ); if (tb && !tb->isHidden()) { switch( tb->barPos() ) { - case KToolBar::Top: - case KToolBar::Bottom: + case TDEToolBar::Top: + case TDEToolBar::Bottom: size += TQSize(0, tb->sizeHint().height()); break; - case KToolBar::Left: - case KToolBar::Right: + case TDEToolBar::Left: + case TDEToolBar::Right: size += TQSize(toolBar()->sizeHint().width(), 0); break; - case KToolBar::Flat: + case TDEToolBar::Flat: size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); break; @@ -1222,24 +1222,24 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) #warning Remove, should be in Qt #endif #endif -void KMainWindow::setIcon( const TQPixmap& p ) +void TDEMainWindow::setIcon( const TQPixmap& p ) { TQMainWindow::setIcon( p ); #ifdef Q_WS_X11 // Qt3 doesn't support _NET_WM_ICON, but TDEApplication::setTopWidget(), which - // is used by KMainWindow, sets it + // is used by TDEMainWindow, sets it KWin::setIcons( winId(), p, TQPixmap()); #endif } -TQPtrList* KMainWindow::getMemberList() { return memberList; } +TQPtrList* TDEMainWindow::getMemberList() { return memberList; } // why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI; // DF: because they compile KDE much faster :) -void KMainWindow::finalizeGUI( KXMLGUIClient *client ) +void TDEMainWindow::finalizeGUI( KXMLGUIClient *client ) { KXMLGUIBuilder::finalizeGUI( client ); } -void KMainWindow::virtual_hook( int id, void* data ) +void TDEMainWindow::virtual_hook( int id, void* data ) { KXMLGUIBuilder::virtual_hook( id, data ); KXMLGUIClient::virtual_hook( id, data ); } diff --git a/tdeui/kmainwindow.h b/tdeui/kmainwindow.h index 5ddb669ee..9ad7dedc6 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/kmainwindow.h @@ -28,7 +28,7 @@ #include #include -class KPopupMenu; +class TDEPopupMenu; class KXMLGUIFactory; class TDEConfig; class KHelpMenu; @@ -36,9 +36,9 @@ class KStatusBar; class TQStatusBar; class KMenuBar; class KMWSessionManaged; -class KMainWindowPrivate; -class KAccel; -class KToolBarMenuAction; +class TDEMainWindowPrivate; +class TDEAccel; +class TDEToolBarMenuAction; class DCOPObject; #define KDE_DEFAULT_WINDOWFLAGS WType_TopLevel | WDestructiveClose @@ -53,7 +53,7 @@ class DCOPObject; * It manages the geometry for all its children, including your * main widget. * - * Normally, you will inherit from KMainWindow, + * Normally, you will inherit from TDEMainWindow, * then construct (or use some existing) widget as * your main view. You can set only one main view. * @@ -61,18 +61,18 @@ class DCOPObject; * and only one statusbar. * * The toolbars, menubar, and statusbar can be created by the - * KMainWindow and - unlike the old KMainWindow - may, but do not - * have to, be deleted by you. KMainWindow will handle that internally. + * TDEMainWindow and - unlike the old TDEMainWindow - may, but do not + * have to, be deleted by you. TDEMainWindow will handle that internally. * * Height and width can be operated independently from each other. Simply * define the minimum/maximum height/width of your main widget and - * KMainWindow will take this into account. For fixed size windows set + * TDEMainWindow will take this into account. For fixed size windows set * your main widget to a fixed size. * * Fixed aspect ratios (heightForWidth()) and fixed width widgets are * not supported. * - * KMainWindow will set icon, mini icon and caption, which it gets + * TDEMainWindow will set icon, mini icon and caption, which it gets * from TDEApplication. It provides full session management, and * will save its position, geometry and positions of toolbars and * menubar on logout. If you want to save additional data, reimplement @@ -85,7 +85,7 @@ class DCOPObject; * There are also kRestoreMainWindows convenience functions which * can restore all your windows on next login. * - * Note that a KMainWindow per-default is created with the + * Note that a TDEMainWindow per-default is created with the * WDestructiveClose flag, i.e. it is automatically destroyed when the * window is closed. If you do not want this behavior, specify 0 as * widget flag in the constructor. @@ -95,7 +95,7 @@ class DCOPObject; */ -class TDEUI_EXPORT KMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient +class TDEUI_EXPORT TDEMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient { friend class KMWSessionManaged; Q_OBJECT @@ -105,15 +105,15 @@ public: * Construct a main window. * * @param parent The widget parent. This is usually 0 but it may also be the window - * group leader. In that case, the KMainWindow becomes sort of a + * group leader. In that case, the TDEMainWindow becomes sort of a * secondary window. * * @param name The object name. For session management and window management to work * properly, all main windows in the application should have a - * different name. When passing 0 (the default), KMainWindow will create + * different name. When passing 0 (the default), TDEMainWindow will create * a unique name, but it's recommended to explicitly pass a window name that will * also describe the type of the window. If there can be several windows of the same - * type, append '#' (hash) to the name, and KMainWindow will append numbers to make + * type, append '#' (hash) to the name, and TDEMainWindow will append numbers to make * the names unique. For example, for a mail client which has one main window showing * the mails and folders, and which can also have one or more windows for composing * mails, the name for the folders window should be e.g. "mainwindow" and @@ -128,25 +128,25 @@ public: * * @see http://doc.trolltech.com/3.2/tqt.html#WidgetFlags-enum * - * KMainWindows must be created on the heap with 'new', like: + * TDEMainWindows must be created on the heap with 'new', like: * \code - * KMainWindow *kmw = new KMainWindow (...); + * TDEMainWindow *kmw = new TDEMainWindow (...); * \endcode **/ #ifdef qdoc - KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + TDEMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); #else - KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); + TDEMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); #endif /** * Flags that can be passed in an argument to the constructor to * change the behavior. * - * NoDCOPObject tells KMainWindow not to create a KMainWindowInterface. + * NoDCOPObject tells TDEMainWindow not to create a TDEMainWindowInterface. * This can be useful in particular for inherited classes, which * might want to create more specific dcop interfaces. It's a good - * idea to use KMainWindowInterface as the base class for such interfaces + * idea to use TDEMainWindowInterface as the base class for such interfaces * though (to provide the standard mainwindow functionality via DCOP). */ enum CreationFlags @@ -155,14 +155,14 @@ public: }; /** - * Overloaded constructor which allows passing some KMainWindow::CreationFlags. + * Overloaded constructor which allows passing some TDEMainWindow::CreationFlags. * * @since 3.2 */ #ifdef qdoc - KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + TDEMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); #else - KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); + TDEMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); #endif /** @@ -171,7 +171,7 @@ public: * Will also destroy the toolbars, and menubar if * needed. */ - virtual ~KMainWindow(); + virtual ~TDEMainWindow(); /** * Retrieve the standard help menu. @@ -183,7 +183,7 @@ public: * * Example (adding a standard help menu to your application): * \code - * KPopupMenu *help = helpMenu( ); + * TDEPopupMenu *help = helpMenu( ); * menuBar()->insertItem( i18n("&Help"), help ); * \endcode * @@ -197,7 +197,7 @@ public: * * @return A standard help menu. */ - KPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null, + TDEPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null, bool showWhatsThis = true ); /** @@ -222,7 +222,7 @@ public: * * @return A standard help menu. */ - KPopupMenu* customHelpMenu( bool showWhatsThis = true ); + TDEPopupMenu* customHelpMenu( bool showWhatsThis = true ); /** * Session Management @@ -236,7 +236,7 @@ public: * \code * if (kapp->isRestored()){ * int n = 1; - * while (KMainWindow::canBeRestored(n)){ + * while (TDEMainWindow::canBeRestored(n)){ * (new childMW)->restore(n); * n++; * } @@ -250,7 +250,7 @@ public: * application. * * If your application uses different kinds of toplevel - * windows, then you can use KMainWindow::classNameOfToplevel(n) + * windows, then you can use TDEMainWindow::classNameOfToplevel(n) * to determine the exact type before calling the childMW * constructor in the example from above. * @@ -270,7 +270,7 @@ public: * less code to write. * * For new code or if you have more than one kind of toplevel - * widget (each derived from KMainWindow, of course), you can + * widget (each derived from TDEMainWindow, of course), you can * use the templated kRestoreMainWindows global functions: * * \code @@ -381,23 +381,23 @@ public: * * Note that tooltips for kactions in actionCollection() are not * automatically connected to this statusBar. - * See the KActionCollection documentation for more details. + * See the TDEActionCollection documentation for more details. * - * @see KActionCollection + * @see TDEActionCollection */ KStatusBar *statusBar(); /** - * List of members of KMainWindow class. + * List of members of TDEMainWindow class. */ - static TQPtrList* memberList; + static TQPtrList* memberList; //KDE4: replace with memberList() and make memberList member private /** - * List of members of KMainWindow class. + * List of members of TDEMainWindow class. * @since 3.4 */ - static TQPtrList* getMemberList(); + static TQPtrList* getMemberList(); /** * Returns a pointer to the toolbar with the specified name. @@ -409,18 +409,18 @@ public: * * @return A pointer to the toolbar **/ - KToolBar *toolBar( const char *name=0 ); + TDEToolBar *toolBar( const char *name=0 ); /** * @return An iterator over the list of all toolbars for this window. */ - TQPtrListIterator toolBarIterator(); + TQPtrListIterator toolBarIterator(); /** - * @return A KAccel instance bound to this mainwindow. Used automatically - * by KAction to make keybindings work in all cases. + * @return A TDEAccel instance bound to this mainwindow. Used automatically + * by TDEAction to make keybindings work in all cases. */ - KAccel *accel(); + TDEAccel *accel(); void setFrameBorderWidth( int ) {} @@ -437,11 +437,11 @@ public: * when saving. * * Typically, you will call setAutoSaveSettings() in your - * KMainWindow-inherited class constructor, and it will take care + * TDEMainWindow-inherited class constructor, and it will take care * of restoring and saving automatically. Make sure you call this * _after all_ your *bars have been created. * - * To make sure that KMainWindow propertly obtains the default + * To make sure that TDEMainWindow propertly obtains the default * size of the window you should do the following: * - Remove hard coded resize() calls in the constructor or main, they * should be removed in favor of letting the automatic resizing @@ -504,8 +504,8 @@ public: void saveMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** - * Sets whether KMainWindow should provide a menu that allows showing/hiding - * the available toolbars ( using KToggleToolBarAction ) . In case there + * Sets whether TDEMainWindow should provide a menu that allows showing/hiding + * the available toolbars ( using TDEToggleToolBarAction ) . In case there * is only one toolbar configured a simple 'Show \' menu item * is shown. * @@ -527,8 +527,8 @@ public: /** - * Sets whether KMainWindow should provide a menu that allows showing/hiding - * of the statusbar ( using KToggleStatusBarAction ). + * Sets whether TDEMainWindow should provide a menu that allows showing/hiding + * of the statusbar ( using TDEToggleStatusBarAction ). * * The menu / menu item is implemented using xmlgui. It will be inserted * in your menu structure in the 'Settings' menu. @@ -537,13 +537,13 @@ public: * ( or similar ). * * If an application maintains the action on its own (i.e. never calls - * this function) a connection needs to be made to let KMainWindow + * this function) a connection needs to be made to let TDEMainWindow * know when that status (hidden/shown) of the statusbar has changed. * For example: * connect(action, TQT_SIGNAL(activated()), * kmainwindow, TQT_SLOT(setSettingsDirty())); * Otherwise the status (hidden/show) of the statusbar might not be saved - * by KMainWindow. + * by TDEMainWindow. * @since 3.2 */ void createStandardStatusBarAction(); @@ -622,10 +622,10 @@ public: * Returns a pointer to the mainwindows action responsible for the toolbars menu * @since 3.1 */ - KAction *toolBarMenuAction(); + TDEAction *toolBarMenuAction(); /** - * @internal for KToolBar + * @internal for TDEToolBar * @since 3.3.1 */ void setupToolbarMenuActions(); @@ -874,7 +874,7 @@ protected: * to save its state. * * You @em must @em not change the group of the @p tdeconfig object, since - * KMainWindow uses one group for each window. Please + * TDEMainWindow uses one group for each window. Please * reimplement these function in childclasses. * * Note: No user interaction is allowed @@ -1007,16 +1007,16 @@ private: KStatusBar *internalStatusBar(); KHelpMenu *mHelpMenu, *helpMenu2; KXMLGUIFactory *factory_; - TQPtrList toolbarList; + TQPtrList toolbarList; protected: virtual void virtual_hook( int id, void* data ); private: - KMainWindowPrivate *d; - void initKMainWindow(const char *name, int cflags); + TDEMainWindowPrivate *d; + void initTDEMainWindow(const char *name, int cflags); }; #define RESTORE(type) { int n = 1;\ - while (KMainWindow::canBeRestored(n)){\ + while (TDEMainWindow::canBeRestored(n)){\ (new type)->restore(n);\ n++;}} @@ -1027,15 +1027,15 @@ private: * number of template arguments) are a replacement for the RESTORE * macro provided in earlier versions of KDE. The old RESTORE macro * is still provided for backwards compatibility. See - * KMainWindow documentation for more. + * TDEMainWindow documentation for more. * * \since KDE 3.2 * **/ template inline void kRestoreMainWindows() { - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) ) (new T)->restore( n ); } @@ -1046,8 +1046,8 @@ inline void kRestoreMainWindows() { const char * classNames[2]; classNames[0] = T0::staticMetaObject()->className(); classNames[1] = T1::staticMetaObject()->className(); - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); else if ( className == TQString::fromLatin1( classNames[1] ) ) @@ -1061,8 +1061,8 @@ inline void kRestoreMainWindows() { classNames[0] = T0::staticMetaObject()->className(); classNames[1] = T1::staticMetaObject()->className(); classNames[2] = T2::staticMetaObject()->className(); - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); else if ( className == TQString::fromLatin1( classNames[1] ) ) diff --git a/tdeui/kmainwindowiface.cpp b/tdeui/kmainwindowiface.cpp index f8ef88c31..ec8ee3630 100644 --- a/tdeui/kmainwindowiface.cpp +++ b/tdeui/kmainwindowiface.cpp @@ -28,7 +28,7 @@ #include -KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) +TDEMainWindowInterface::TDEMainWindowInterface(TDEMainWindow * mainWindow) : DCOPObject( mainWindow->name()) { m_MainWindow = mainWindow; @@ -36,30 +36,30 @@ KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) m_dcopPropertyProxy = new KDCOPPropertyProxy(TQT_TQOBJECT(m_MainWindow)); } -KMainWindowInterface::~KMainWindowInterface() +TDEMainWindowInterface::~TDEMainWindowInterface() { delete m_dcopActionProxy; delete m_dcopPropertyProxy; } -QCStringList KMainWindowInterface::actions() +QCStringList TDEMainWindowInterface::actions() { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); QCStringList tmp_actions; - TQValueList lst = m_dcopActionProxy->actions(); - TQValueList::ConstIterator it = lst.begin(); - TQValueList::ConstIterator end = lst.end(); + TQValueList lst = m_dcopActionProxy->actions(); + TQValueList::ConstIterator it = lst.begin(); + TQValueList::ConstIterator end = lst.end(); for (; it != end; ++it ) if ((*it)->isPlugged()) tmp_actions.append( (TQCString)(*it)->name() ); return tmp_actions; } -bool KMainWindowInterface::activateAction( TQCString action) +bool TDEMainWindowInterface::activateAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->activate(); @@ -68,11 +68,11 @@ bool KMainWindowInterface::activateAction( TQCString action) else return false; } -bool KMainWindowInterface::disableAction( TQCString action) +bool TDEMainWindowInterface::disableAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->setEnabled(false); @@ -81,11 +81,11 @@ bool KMainWindowInterface::disableAction( TQCString action) else return false; } -bool KMainWindowInterface::enableAction( TQCString action) +bool TDEMainWindowInterface::enableAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->setEnabled(true); @@ -94,11 +94,11 @@ bool KMainWindowInterface::enableAction( TQCString action) else return false; } -bool KMainWindowInterface::actionIsEnabled( TQCString action) +bool TDEMainWindowInterface::actionIsEnabled( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { return tmp_Action->isEnabled(); @@ -106,11 +106,11 @@ bool KMainWindowInterface::actionIsEnabled( TQCString action) else return false; } -TQCString KMainWindowInterface::actionToolTip( TQCString action) +TQCString TDEMainWindowInterface::actionToolTip( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { return tmp_Action->toolTip().utf8(); @@ -119,74 +119,74 @@ TQCString KMainWindowInterface::actionToolTip( TQCString action) return "Error no such object!"; } -DCOPRef KMainWindowInterface::action( const TQCString &name ) +DCOPRef TDEMainWindowInterface::action( const TQCString &name ) { return DCOPRef( kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) ); } -TQMap KMainWindowInterface::actionMap() +TQMap TDEMainWindowInterface::actionMap() { return m_dcopActionProxy->actionMap(); } -int KMainWindowInterface::getWinID() +int TDEMainWindowInterface::getWinID() { return (int) m_MainWindow->winId(); } -void KMainWindowInterface::grabWindowToClipBoard() +void TDEMainWindowInterface::grabWindowToClipBoard() { TQClipboard *clipboard = TQApplication::clipboard(); clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow)); } -void KMainWindowInterface::hide() +void TDEMainWindowInterface::hide() { m_MainWindow->hide(); } -void KMainWindowInterface::maximize() +void TDEMainWindowInterface::maximize() { m_MainWindow->showMaximized(); } -void KMainWindowInterface::minimize() +void TDEMainWindowInterface::minimize() { m_MainWindow->showMinimized(); } -void KMainWindowInterface::resize(int newX, int newY) +void TDEMainWindowInterface::resize(int newX, int newY) { m_MainWindow->resize(newX, newY); } -void KMainWindowInterface::move(int newX, int newY) +void TDEMainWindowInterface::move(int newX, int newY) { m_MainWindow->move(newX, newY); } -void KMainWindowInterface::setGeometry(int newX, int newY, int newWidth, int newHeight) +void TDEMainWindowInterface::setGeometry(int newX, int newY, int newWidth, int newHeight) { m_MainWindow->setGeometry(newX, newY, newWidth, newHeight); } -void KMainWindowInterface::raise() +void TDEMainWindowInterface::raise() { m_MainWindow->raise(); } -void KMainWindowInterface::lower() +void TDEMainWindowInterface::lower() { m_MainWindow->lower(); } -void KMainWindowInterface::restore() +void TDEMainWindowInterface::restore() { m_MainWindow->showNormal(); } -void KMainWindowInterface::close() +void TDEMainWindowInterface::close() { m_MainWindow->close(); } -void KMainWindowInterface::show() +void TDEMainWindowInterface::show() { m_MainWindow->show(); } -QCStringList KMainWindowInterface::functionsDynamic() +QCStringList TDEMainWindowInterface::functionsDynamic() { return m_dcopPropertyProxy->functions(); } -bool KMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) +bool TDEMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) { return m_dcopPropertyProxy->processPropertyRequest( fun, data, replyType, replyData); diff --git a/tdeui/kmainwindowiface.h b/tdeui/kmainwindowiface.h index 58ca74e2c..9ba1c4da9 100644 --- a/tdeui/kmainwindowiface.h +++ b/tdeui/kmainwindowiface.h @@ -27,32 +27,32 @@ class KDCOPActionProxy; class KDCOPPropertyProxy; -class KMainWindow; +class TDEMainWindow; /** - * @short DCOP interface to KMainWindow. + * @short DCOP interface to TDEMainWindow. * - * This is the main interface to the KMainWindow. This will provide a consistent + * This is the main interface to the TDEMainWindow. This will provide a consistent * DCOP interface to all KDE applications that use it. * * @author Ian Reinhart Geiser */ -class TDEUI_EXPORT KMainWindowInterface : virtual public DCOPObject +class TDEUI_EXPORT TDEMainWindowInterface : virtual public DCOPObject { K_DCOP public: /** Construct a new interface object. - @param mainWindow - The parent KMainWindow object - that will provide us with the KAction objects. + @param mainWindow - The parent TDEMainWindow object + that will provide us with the TDEAction objects. */ - KMainWindowInterface( KMainWindow * mainWindow ); + TDEMainWindowInterface( TDEMainWindow * mainWindow ); /** Destructor Cleans up the dcop action proxy object. **/ - ~KMainWindowInterface(); + ~TDEMainWindowInterface(); QCStringList functionsDynamic(); bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); @@ -106,7 +106,7 @@ k_dcop: TQCString actionToolTip( TQCString action); /** - Returns a dcop reference to the selected KAction + Returns a dcop reference to the selected TDEAction @param name The name of the action. The names of valid actions can be found by calling actions(). @return A DCOPRef for the kaction. @@ -151,7 +151,7 @@ k_dcop: // QCStringList getQTProperties(); private: - KMainWindow *m_MainWindow; + TDEMainWindow *m_MainWindow; KDCOPActionProxy *m_dcopActionProxy; KDCOPPropertyProxy *m_dcopPropertyProxy; }; diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index d2b97f3b0..9f21ce300 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -94,7 +94,7 @@ public: int margin; // dtto bool fallback_mode; // dtto #ifdef Q_WS_X11 - KSelectionWatcher* selection; + TDESelectionWatcher* selection; #endif TQTimer selection_timer; TQSize min_size; @@ -177,7 +177,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) if ( isTopLevelMenu() ) { #ifdef Q_WS_X11 - d->selection = new KSelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), + d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); connect( d->selection, TQT_SIGNAL( newOwner( Window )), this, TQT_SLOT( updateFallbackSize())); diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index d0c4f0a11..69020eae7 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -224,10 +224,10 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, lay->addWidget( label2 ); lay->addStretch(); - KListBox *listbox = 0; + TDEListBox *listbox = 0; if (!strlist.isEmpty()) { - listbox=new KListBox( topcontents ); + listbox=new TDEListBox( topcontents ); listbox->insertStringList( strlist ); listbox->setSelectionMode( TQListBox::NoSelection ); topcontents->setStretchFactor(listbox, 1); diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index a995661c3..c266079c7 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -41,13 +41,13 @@ public: }; KPanelMenu::KPanelMenu(const TQString &startDir, TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { init(startDir); } KPanelMenu::KPanelMenu(TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { init(); } @@ -67,7 +67,7 @@ void KPanelMenu::init(const TQString& path) config->setGroup("menus"); d->clearDelay = config->readNumEntry("MenuCacheTime", 60000); // 1 minute - //KAcceleratorManager::manage(this); + //TDEAcceleratorManager::manage(this); setKeyboardShortcutsEnabled(true); } @@ -154,5 +154,5 @@ void KPanelMenu::internalInitialize() } void KPanelMenu::virtual_hook( int id, void* data ) -{ KPopupMenu::virtual_hook( id, data ); } +{ TDEPopupMenu::virtual_hook( id, data ); } diff --git a/tdeui/kpanelmenu.h b/tdeui/kpanelmenu.h index 2e28010fb..0c03d6fd4 100644 --- a/tdeui/kpanelmenu.h +++ b/tdeui/kpanelmenu.h @@ -50,7 +50,7 @@ class KPanelMenuPrivate; * * @author The kicker maintainers, Michael Goffioul */ -class TDEUI_EXPORT KPanelMenu : public KPopupMenu +class TDEUI_EXPORT KPanelMenu : public TDEPopupMenu { Q_OBJECT diff --git a/tdeui/kpartgui.dtd b/tdeui/kpartgui.dtd index a3cbb8121..4b36929e2 100644 --- a/tdeui/kpartgui.dtd +++ b/tdeui/kpartgui.dtd @@ -83,17 +83,17 @@ - insertTitle(i18n("Image Operations")); - KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw", + TDEAction *action = new TDEAction(i18n("&Rotate Clockwise"), "rotate_cw", 0, TQT_TQOBJECT(this), TQT_SLOT(rotateClockwise()), TQT_TQOBJECT(popup), "rotateclockwise"); action->plug(popup); - action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", + action = new TDEAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", 0, TQT_TQOBJECT(this), TQT_SLOT(rotateCounterclockwise()), TQT_TQOBJECT(popup), "rotatecounterclockwise"); action->plug(popup); @@ -215,7 +215,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) if ( mev->button() == Qt::RightButton ) { - KPopupMenu *popup = createPopupMenu( ); + TDEPopupMenu *popup = createPopupMenu( ); popup->exec( mev->globalPos() ); delete popup; return TRUE; diff --git a/tdeui/kpixmapregionselectorwidget.h b/tdeui/kpixmapregionselectorwidget.h index 344580ff4..0277a0d10 100644 --- a/tdeui/kpixmapregionselectorwidget.h +++ b/tdeui/kpixmapregionselectorwidget.h @@ -25,7 +25,7 @@ #include #include -class KPopupMenu; +class TDEPopupMenu; #include @@ -135,9 +135,9 @@ public slots: protected: /** - * Creates a KPopupMenu with the menu that appears when clicking with the right button on the label + * Creates a TDEPopupMenu with the menu that appears when clicking with the right button on the label */ - virtual KPopupMenu *createPopupMenu(); + virtual TDEPopupMenu *createPopupMenu(); private: bool eventFilter(TQObject *obj, TQEvent *ev); diff --git a/tdeui/kpopupmenu.cpp b/tdeui/kpopupmenu.cpp index d910b7781..5547d9316 100644 --- a/tdeui/kpopupmenu.cpp +++ b/tdeui/kpopupmenu.cpp @@ -32,13 +32,13 @@ #include #include -KPopupTitle::KPopupTitle(TQWidget *parent, const char *name) +TDEPopupTitle::TDEPopupTitle(TQWidget *parent, const char *name) : TQWidget(parent, name) { setMinimumSize(16, fontMetrics().height()+8); } -KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */, +TDEPopupTitle::TDEPopupTitle(KPixmapEffect::GradientType /* gradient */, const TQColor &/* color */, const TQColor &/* textColor */, TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -46,7 +46,7 @@ KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */, calcSize(); } -KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* color */, +TDEPopupTitle::TDEPopupTitle(const KPixmap & /* background */, const TQColor &/* color */, const TQColor &/* textColor */, TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -54,7 +54,7 @@ KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* col calcSize(); } -void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) +void TDEPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) { titleStr = text; if (icon) @@ -65,19 +65,19 @@ void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) calcSize(); } -void KPopupTitle::setText( const TQString &text ) +void TDEPopupTitle::setText( const TQString &text ) { titleStr = text; calcSize(); } -void KPopupTitle::setIcon( const TQPixmap &pix ) +void TDEPopupTitle::setIcon( const TQPixmap &pix ) { miniicon = pix; calcSize(); } -void KPopupTitle::calcSize() +void TDEPopupTitle::calcSize() { TQFont f = font(); f.setBold(true); @@ -86,7 +86,7 @@ void KPopupTitle::calcSize() setMinimumSize( w+16, h+8 ); } -void KPopupTitle::paintEvent(TQPaintEvent *) +void TDEPopupTitle::paintEvent(TQPaintEvent *) { TQRect r(rect()); TQPainter p(this); @@ -115,15 +115,15 @@ void KPopupTitle::paintEvent(TQPaintEvent *) } } -TQSize KPopupTitle::sizeHint() const +TQSize TDEPopupTitle::sizeHint() const { return minimumSize(); } -class KPopupMenu::KPopupMenuPrivate +class TDEPopupMenu::TDEPopupMenuPrivate { public: - KPopupMenuPrivate () + TDEPopupMenuPrivate () : noMatches(false) , shortcuts(false) , autoExec(false) @@ -132,7 +132,7 @@ public: , m_ctxMenu(0) {} - ~KPopupMenuPrivate () + ~TDEPopupMenuPrivate () { delete m_ctxMenu; } @@ -156,112 +156,112 @@ public: TQPopupMenu* m_ctxMenu; static bool s_continueCtxMenuShow; static int s_highlightedItem; - static KPopupMenu* s_contextedMenu; + static TDEPopupMenu* s_contextedMenu; }; -int KPopupMenu::KPopupMenuPrivate::s_highlightedItem(-1); -KPopupMenu* KPopupMenu::KPopupMenuPrivate::s_contextedMenu(0); -bool KPopupMenu::KPopupMenuPrivate::s_continueCtxMenuShow(true); +int TDEPopupMenu::TDEPopupMenuPrivate::s_highlightedItem(-1); +TDEPopupMenu* TDEPopupMenu::TDEPopupMenuPrivate::s_contextedMenu(0); +bool TDEPopupMenu::TDEPopupMenuPrivate::s_continueCtxMenuShow(true); -KPopupMenu::KPopupMenu(TQWidget *parent, const char *name) +TDEPopupMenu::TDEPopupMenu(TQWidget *parent, const char *name) : TQPopupMenu(parent, name) { - d = new KPopupMenuPrivate; + d = new TDEPopupMenuPrivate; resetKeyboardVars(); connect(&(d->clearTimer), TQT_SIGNAL(timeout()), TQT_SLOT(resetKeyboardVars())); } -KPopupMenu::~KPopupMenu() +TDEPopupMenu::~TDEPopupMenu() { - if (KPopupMenuPrivate::s_contextedMenu == this) + if (TDEPopupMenuPrivate::s_contextedMenu == this) { - KPopupMenuPrivate::s_contextedMenu = 0; - KPopupMenuPrivate::s_highlightedItem = -1; + TDEPopupMenuPrivate::s_contextedMenu = 0; + TDEPopupMenuPrivate::s_highlightedItem = -1; } delete d; } -int KPopupMenu::insertTitle(const TQString &text, int id, int index) +int TDEPopupMenu::insertTitle(const TQString &text, int id, int index) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(text); int ret = insertItem(titleItem, id, index); setItemEnabled(ret, false); return ret; } -int KPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, +int TDEPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, int index) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(text, &icon); int ret = insertItem(titleItem, id, index); setItemEnabled(ret, false); return ret; } -void KPopupMenu::changeTitle(int id, const TQString &text) +void TDEPopupMenu::changeTitle(int id, const TQString &text) { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - ((KPopupTitle *)item->widget())->setTitle(text); + ((TDEPopupTitle *)item->widget())->setTitle(text); #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with non-title id "<< id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with non-title id "<< id << endl; #endif } #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with invalid id " << id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with invalid id " << id << endl; #endif } -void KPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) +void TDEPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - ((KPopupTitle *)item->widget())->setTitle(text, &icon); + ((TDEPopupTitle *)item->widget())->setTitle(text, &icon); #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with non-title id "<< id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with non-title id "<< id << endl; #endif } #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with invalid id " << id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with invalid id " << id << endl; #endif } -TQString KPopupMenu::title(int id) const +TQString TDEPopupMenu::title(int id) const { if(id == -1) // obsolete return d->m_lastTitle; TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - return ((KPopupTitle *)item->widget())->title(); + return ((TDEPopupTitle *)item->widget())->title(); else - tqWarning("KPopupMenu: title() called with non-title id %d.", id); + tqWarning("TDEPopupMenu: title() called with non-title id %d.", id); } else - tqWarning("KPopupMenu: title() called with invalid id %d.", id); + tqWarning("TDEPopupMenu: title() called with invalid id %d.", id); return TQString::null; } -TQPixmap KPopupMenu::titlePixmap(int id) const +TQPixmap TDEPopupMenu::titlePixmap(int id) const { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - return ((KPopupTitle *)item->widget())->icon(); + return ((TDEPopupTitle *)item->widget())->icon(); else - tqWarning("KPopupMenu: titlePixmap() called with non-title id %d.", id); + tqWarning("TDEPopupMenu: titlePixmap() called with non-title id %d.", id); } else - tqWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id); + tqWarning("TDEPopupMenu: titlePixmap() called with invalid id %d.", id); TQPixmap tmp; return tmp; } @@ -269,25 +269,25 @@ TQPixmap KPopupMenu::titlePixmap(int id) const /** * This is re-implemented for keyboard navigation. */ -void KPopupMenu::closeEvent(TQCloseEvent*e) +void TDEPopupMenu::closeEvent(TQCloseEvent*e) { if (d->shortcuts) resetKeyboardVars(); TQPopupMenu::closeEvent(e); } -void KPopupMenu::activateItemAt(int index) +void TDEPopupMenu::activateItemAt(int index) { d->state = Qt::NoButton; TQPopupMenu::activateItemAt(index); } -TQt::ButtonState KPopupMenu::state() const +TQt::ButtonState TDEPopupMenu::state() const { return d->state; } -void KPopupMenu::keyPressEvent(TQKeyEvent* e) +void TDEPopupMenu::keyPressEvent(TQKeyEvent* e) { d->state = Qt::NoButton; if (!d->shortcuts) { @@ -445,13 +445,13 @@ void KPopupMenu::keyPressEvent(TQKeyEvent* e) TQPopupMenu::keyPressEvent(e); } -bool KPopupMenu::focusNextPrevChild( bool next ) +bool TDEPopupMenu::focusNextPrevChild( bool next ) { resetKeyboardVars(); return TQPopupMenu::focusNextPrevChild( next ); } -TQString KPopupMenu::underlineText(const TQString& text, uint length) +TQString TDEPopupMenu::underlineText(const TQString& text, uint length) { TQString ret = text; for (uint i = 0; i < length; i++) { @@ -461,7 +461,7 @@ TQString KPopupMenu::underlineText(const TQString& text, uint length) return ret; } -void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */) +void TDEPopupMenu::resetKeyboardVars(bool noMatches /* = false */) { // Clean up keyboard variables if (d->lastHitIndex != -1) { @@ -476,12 +476,12 @@ void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */) d->noMatches = noMatches; } -void KPopupMenu::setKeyboardShortcutsEnabled(bool enable) +void TDEPopupMenu::setKeyboardShortcutsEnabled(bool enable) { d->shortcuts = enable; } -void KPopupMenu::setKeyboardShortcutsExecute(bool enable) +void TDEPopupMenu::setKeyboardShortcutsExecute(bool enable) { d->autoExec = enable; } @@ -493,7 +493,7 @@ void KPopupMenu::setKeyboardShortcutsExecute(bool enable) * RMB menus on menus */ -void KPopupMenu::mousePressEvent(TQMouseEvent* e) +void TDEPopupMenu::mousePressEvent(TQMouseEvent* e) { if (d->m_ctxMenu && d->m_ctxMenu->isVisible()) { @@ -504,7 +504,7 @@ void KPopupMenu::mousePressEvent(TQMouseEvent* e) TQPopupMenu::mousePressEvent(e); } -void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e) +void TDEPopupMenu::mouseReleaseEvent(TQMouseEvent* e) { // Save the button, and the modifiers from state() d->state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); @@ -513,7 +513,7 @@ void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e) TQPopupMenu::mouseReleaseEvent(e); } -TQPopupMenu* KPopupMenu::contextMenu() +TQPopupMenu* TDEPopupMenu::contextMenu() { if (!d->m_ctxMenu) { @@ -524,27 +524,27 @@ TQPopupMenu* KPopupMenu::contextMenu() return d->m_ctxMenu; } -const TQPopupMenu* KPopupMenu::contextMenu() const +const TQPopupMenu* TDEPopupMenu::contextMenu() const { - return const_cast< KPopupMenu* >( this )->contextMenu(); + return const_cast< TDEPopupMenu* >( this )->contextMenu(); } -void KPopupMenu::hideContextMenu() +void TDEPopupMenu::hideContextMenu() { - KPopupMenuPrivate::s_continueCtxMenuShow = false; + TDEPopupMenuPrivate::s_continueCtxMenuShow = false; } -int KPopupMenu::contextMenuFocusItem() +int TDEPopupMenu::contextMenuFocusItem() { - return KPopupMenuPrivate::s_highlightedItem; + return TDEPopupMenuPrivate::s_highlightedItem; } -KPopupMenu* KPopupMenu::contextMenuFocus() +TDEPopupMenu* TDEPopupMenu::contextMenuFocus() { - return KPopupMenuPrivate::s_contextedMenu; + return TDEPopupMenuPrivate::s_contextedMenu; } -void KPopupMenu::itemHighlighted(int /* whichItem */) +void TDEPopupMenu::itemHighlighted(int /* whichItem */) { if (!d->m_ctxMenu || !d->m_ctxMenu->isVisible()) { @@ -555,9 +555,9 @@ void KPopupMenu::itemHighlighted(int /* whichItem */) showCtxMenu(mapFromGlobal(TQCursor::pos())); } -void KPopupMenu::showCtxMenu(TQPoint pos) +void TDEPopupMenu::showCtxMenu(TQPoint pos) { - TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(TDEPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -567,30 +567,30 @@ void KPopupMenu::showCtxMenu(TQPoint pos) } } - KPopupMenuPrivate::s_highlightedItem = idAt(pos); + TDEPopupMenuPrivate::s_highlightedItem = idAt(pos); - if (KPopupMenuPrivate::s_highlightedItem == -1) + if (TDEPopupMenuPrivate::s_highlightedItem == -1) { - KPopupMenuPrivate::s_contextedMenu = 0; + TDEPopupMenuPrivate::s_contextedMenu = 0; return; } - emit aboutToShowContextMenu(this, KPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); + emit aboutToShowContextMenu(this, TDEPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); - TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu())); TQTimer::singleShot(100, subMenu, TQT_SLOT(hide())); } - if (!KPopupMenuPrivate::s_continueCtxMenuShow) + if (!TDEPopupMenuPrivate::s_continueCtxMenuShow) { - KPopupMenuPrivate::s_continueCtxMenuShow = true; + TDEPopupMenuPrivate::s_continueCtxMenuShow = true; return; } - KPopupMenuPrivate::s_contextedMenu = this; + TDEPopupMenuPrivate::s_contextedMenu = this; d->m_ctxMenu->popup(this->mapToGlobal(pos)); connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); } @@ -599,9 +599,9 @@ void KPopupMenu::showCtxMenu(TQPoint pos) * this method helps prevent submenus popping up while we have a context menu * showing */ -void KPopupMenu::ctxMenuHideShowingMenu() +void TDEPopupMenu::ctxMenuHideShowingMenu() { - TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(TDEPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -612,11 +612,11 @@ void KPopupMenu::ctxMenuHideShowingMenu() } } -void KPopupMenu::ctxMenuHiding() +void TDEPopupMenu::ctxMenuHiding() { - if (KPopupMenuPrivate::s_highlightedItem) + if (TDEPopupMenuPrivate::s_highlightedItem) { - TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu())); @@ -624,10 +624,10 @@ void KPopupMenu::ctxMenuHiding() } disconnect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); - KPopupMenuPrivate::s_continueCtxMenuShow = true; + TDEPopupMenuPrivate::s_continueCtxMenuShow = true; } -void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e) +void TDEPopupMenu::contextMenuEvent(TQContextMenuEvent* e) { if (d->m_ctxMenu) { @@ -647,7 +647,7 @@ void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e) TQPopupMenu::contextMenuEvent(e); } -void KPopupMenu::hideEvent(TQHideEvent*) +void TDEPopupMenu::hideEvent(TQHideEvent*) { if (d->m_ctxMenu && d->m_ctxMenu->isVisible()) { @@ -669,26 +669,26 @@ void KPopupMenu::hideEvent(TQHideEvent*) */ // Obsolete -KPopupMenu::KPopupMenu(const TQString& title, TQWidget *parent, const char *name) +TDEPopupMenu::TDEPopupMenu(const TQString& title, TQWidget *parent, const char *name) : TQPopupMenu(parent, name) { - d = new KPopupMenuPrivate; + d = new TDEPopupMenuPrivate; insertTitle(title); } // Obsolete -void KPopupMenu::setTitle(const TQString &title) +void TDEPopupMenu::setTitle(const TQString &title) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(title); insertItem(titleItem); d->m_lastTitle = title; } -void KPopupTitle::virtual_hook( int, void* ) +void TDEPopupTitle::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KPopupMenu::virtual_hook( int, void* ) +void TDEPopupMenu::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kpopupmenu.moc" diff --git a/tdeui/kpopupmenu.h b/tdeui/kpopupmenu.h index 5c29fd2f9..2d50e2d56 100644 --- a/tdeui/kpopupmenu.h +++ b/tdeui/kpopupmenu.h @@ -25,17 +25,17 @@ #include #include /** - * @short KPopupMenu title widget. + * @short TDEPopupMenu title widget. * - * Title widget for use in KPopupMenu. + * Title widget for use in TDEPopupMenu. * * You usually don't have to create this manually since - * KPopupMenu::insertTitle will do it for you, but it is allowed if + * TDEPopupMenu::insertTitle will do it for you, but it is allowed if * you wish to customize it's look. * * @author Daniel M. Duley */ -class TDEUI_EXPORT KPopupTitle : public TQWidget +class TDEUI_EXPORT TDEPopupTitle : public TQWidget { Q_OBJECT @@ -44,19 +44,19 @@ public: * Constructs a title widget with the user specified gradient, pixmap, * and colors. */ - KPopupTitle(TQWidget *parent=0, const char *name=0); + TDEPopupTitle(TQWidget *parent=0, const char *name=0); /** * @deprecated * Constructs a title widget with the specified gradient and colors. */ - KPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, + TDEPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * @deprecated * Constructs a title widget with the specified pixmap and colors. */ - KPopupTitle(const KPixmap &background, const TQColor &color, + TDEPopupTitle(const KPixmap &background, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** @@ -98,14 +98,14 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KPopupTitlePrivate; - KPopupTitlePrivate *d; + class TDEPopupTitlePrivate; + TDEPopupTitlePrivate *d; }; /** * @short A menu with title items. * - * KPopupMenu is a class for menus with standard title items and keyboard + * TDEPopupMenu is a class for menus with standard title items and keyboard * accessibility for popups with many options and/or varying options. It acts * identically to TQPopupMenu, with the addition of insertTitle(), * changeTitle(), setKeyboardShortcutsEnabled() and @@ -120,19 +120,19 @@ private: * @author Daniel M. Duley * @author Hamish Rodda */ -class TDEUI_EXPORT KPopupMenu : public TQPopupMenu { +class TDEUI_EXPORT TDEPopupMenu : public TQPopupMenu { Q_OBJECT public: /** - * Constructs a KPopupMenu. + * Constructs a TDEPopupMenu. */ - KPopupMenu(TQWidget *parent=0, const char *name=0); + TDEPopupMenu(TQWidget *parent=0, const char *name=0); /** * Destructs the object */ - ~KPopupMenu(); + ~TDEPopupMenu(); /** * Inserts a title item with no icon. @@ -191,7 +191,7 @@ public: * Obsolete method provided for backwards compatibility only. Use the * normal constructor and insertTitle instead. */ - KPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; + TDEPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * @deprecated @@ -219,10 +219,10 @@ public: void hideContextMenu(); /** - * Returns the KPopupMenu associated with the current context menu + * Returns the TDEPopupMenu associated with the current context menu * @since 3.2 */ - static KPopupMenu* contextMenuFocus(); + static TDEPopupMenu* contextMenuFocus(); /** * returns the ID of the menuitem associated with the current context menu @@ -250,7 +250,7 @@ signals: * @param ctxMenu The context menu itself * @since 3.2 */ - void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu); + void aboutToShowContextMenu(TDEPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu); protected: virtual void closeEvent(TQCloseEvent *); @@ -275,8 +275,8 @@ protected slots: void ctxMenuHideShowingMenu(); private: - class KPopupMenuPrivate; - KPopupMenuPrivate *d; + class TDEPopupMenuPrivate; + TDEPopupMenuPrivate *d; }; #endif diff --git a/tdeui/kselect.cpp b/tdeui/kselect.cpp index 70a63a9a8..19214ede3 100644 --- a/tdeui/kselect.cpp +++ b/tdeui/kselect.cpp @@ -235,14 +235,14 @@ void KXYSelector::drawCursor( TQPainter *p, int xp, int yp ) */ -KSelector::KSelector( TQWidget *parent, const char *name ) +TDESelector::TDESelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { _orientation = Qt::Horizontal; _indent = true; } -KSelector::KSelector( Orientation o, TQWidget *parent, const char *name ) +TDESelector::TDESelector( Orientation o, TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { _orientation = o; @@ -250,11 +250,11 @@ KSelector::KSelector( Orientation o, TQWidget *parent, const char *name ) } -KSelector::~KSelector() +TDESelector::~TDESelector() {} -TQRect KSelector::contentsRect() const +TQRect TDESelector::contentsRect() const { int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; @@ -264,7 +264,7 @@ TQRect KSelector::contentsRect() const return TQRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 ); } -void KSelector::paintEvent( TQPaintEvent * ) +void TDESelector::paintEvent( TQPaintEvent * ) { TQPainter painter; int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); @@ -292,23 +292,23 @@ void KSelector::paintEvent( TQPaintEvent * ) painter.end(); } -void KSelector::mousePressEvent( TQMouseEvent *e ) +void TDESelector::mousePressEvent( TQMouseEvent *e ) { moveArrow( e->pos() ); } -void KSelector::mouseMoveEvent( TQMouseEvent *e ) +void TDESelector::mouseMoveEvent( TQMouseEvent *e ) { moveArrow( e->pos() ); } -void KSelector::wheelEvent( TQWheelEvent *e ) +void TDESelector::wheelEvent( TQWheelEvent *e ) { int val = value() + e->delta()/120; setValue( val ); } -void KSelector::valueChange() +void TDESelector::valueChange() { TQPainter painter; TQPoint pos; @@ -326,7 +326,7 @@ void KSelector::valueChange() emit valueChanged( value() ); } -void KSelector::moveArrow( const TQPoint &pos ) +void TDESelector::moveArrow( const TQPoint &pos ) { int val; int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); @@ -342,7 +342,7 @@ void KSelector::moveArrow( const TQPoint &pos ) setValue( val ); } -TQPoint KSelector::calcArrowPos( int val ) +TQPoint TDESelector::calcArrowPos( int val ) { TQPoint p; @@ -364,10 +364,10 @@ TQPoint KSelector::calcArrowPos( int val ) return p; } -void KSelector::drawContents( TQPainter * ) +void TDESelector::drawContents( TQPainter * ) {} -void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) +void TDESelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) { if ( show ) { @@ -404,7 +404,7 @@ void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) //---------------------------------------------------------------------------- KGradientSelector::KGradientSelector( TQWidget *parent, const char *name ) - : KSelector( parent, name ) + : TDESelector( parent, name ) { init(); } @@ -412,7 +412,7 @@ KGradientSelector::KGradientSelector( TQWidget *parent, const char *name ) KGradientSelector::KGradientSelector( Orientation o, TQWidget *parent, const char *name ) - : KSelector( o, parent, name ) + : TDESelector( o, parent, name ) { init(); } @@ -524,11 +524,11 @@ void KGradientSelector::drawContents( TQPainter *painter ) void KXYSelector::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KSelector::virtual_hook( int, void* ) +void TDESelector::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KGradientSelector::virtual_hook( int id, void* data ) -{ KSelector::virtual_hook( id, data ); } +{ TDESelector::virtual_hook( id, data ); } #include "kselect.moc" diff --git a/tdeui/kselect.h b/tdeui/kselect.h index 77b35a175..fd9a90ccd 100644 --- a/tdeui/kselect.h +++ b/tdeui/kselect.h @@ -148,7 +148,7 @@ private: /** - * KSelector is the base class for other widgets which + * TDESelector is the base class for other widgets which * provides the ability to choose from a one-dimensional * range of values. An example is the KGradientSelector * which allows to choose from a range of colors. @@ -156,7 +156,7 @@ private: * A custom drawing routine for the widget surface has * to be provided by the subclass. */ -class TDEUI_EXPORT KSelector : public TQWidget, public TQRangeControl +class TDEUI_EXPORT TDESelector : public TQWidget, public TQRangeControl { Q_OBJECT TQ_PROPERTY( int value READ value WRITE setValue ) @@ -167,16 +167,16 @@ public: /** * Constructs a horizontal one-dimensional selection widget. */ - KSelector( TQWidget *parent=0, const char *name=0 ); + TDESelector( TQWidget *parent=0, const char *name=0 ); /** * Constructs a one-dimensional selection widget with * a given orientation. */ - KSelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L ); + TDESelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L ); /* * Destructs the widget. */ - ~KSelector(); + ~TDESelector(); /** * @return the orientation of the widget. @@ -277,8 +277,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KSelectorPrivate; - KSelectorPrivate *d; + class TDESelectorPrivate; + TDESelectorPrivate *d; }; @@ -290,7 +290,7 @@ private: * \image html kgradientselector.png "KDE Gradient Selector Widget" * **/ -class TDEUI_EXPORT KGradientSelector : public KSelector +class TDEUI_EXPORT KGradientSelector : public TDESelector { Q_OBJECT diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/kshortcutdialog.cpp index db5e32322..14cdd9190 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/kshortcutdialog.cpp @@ -62,9 +62,9 @@ #include #include -bool KShortcutDialog::s_showMore = false; +bool TDEShortcutDialog::s_showMore = false; -KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name ) +TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n("Configure Shortcut"), KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true ) { @@ -75,9 +75,9 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T m_stack->setMargin(0); setMainWidget(m_stack); - m_simple = new KShortcutDialogSimple(m_stack); + m_simple = new TDEShortcutDialogSimple(m_stack); - m_adv = new KShortcutDialogAdvanced(m_stack); + m_adv = new TDEShortcutDialogAdvanced(m_stack); m_adv->hide(); m_bQtShortcut = bQtShortcut; @@ -127,19 +127,19 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T #endif } -KShortcutDialog::~KShortcutDialog() +TDEShortcutDialog::~TDEShortcutDialog() { TDEConfigGroup group(TDEGlobal::config(), "General"); group.writeEntry("ShowAlternativeShortcutConfig", s_showMore); } -void KShortcutDialog::setShortcut( const KShortcut & shortcut ) +void TDEShortcutDialog::setShortcut( const TDEShortcut & shortcut ) { m_shortcut = shortcut; updateShortcutDisplay(); } -void KShortcutDialog::updateShortcutDisplay() +void TDEShortcutDialog::updateShortcutDisplay() { TQString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() }; @@ -190,13 +190,13 @@ void KShortcutDialog::updateShortcutDisplay() enableButton(Details, bLessOk); } -void KShortcutDialog::slotDetails() +void TDEShortcutDialog::slotDetails() { s_showMore = (m_adv->isHidden()); updateDetails(); } -void KShortcutDialog::updateDetails() +void TDEShortcutDialog::updateDetails() { bool showAdvanced = s_showMore || (m_shortcut.count() > 1); setDetails(showAdvanced); @@ -224,7 +224,7 @@ void KShortcutDialog::updateDetails() adjustSize(); } -void KShortcutDialog::slotSelectPrimary() +void TDEShortcutDialog::slotSelectPrimary() { m_bRecording = false; m_iSeq = 0; @@ -235,7 +235,7 @@ void KShortcutDialog::slotSelectPrimary() updateShortcutDisplay(); } -void KShortcutDialog::slotSelectAlternate() +void TDEShortcutDialog::slotSelectAlternate() { m_bRecording = false; m_iSeq = 1; @@ -246,20 +246,20 @@ void KShortcutDialog::slotSelectAlternate() updateShortcutDisplay(); } -void KShortcutDialog::slotClearShortcut() +void TDEShortcutDialog::slotClearShortcut() { m_shortcut.setSeq( 0, KKeySequence() ); updateShortcutDisplay(); } -void KShortcutDialog::slotClearPrimary() +void TDEShortcutDialog::slotClearPrimary() { m_shortcut.setSeq( 0, KKeySequence() ); m_adv->m_btnPrimary->setChecked( true ); slotSelectPrimary(); } -void KShortcutDialog::slotClearAlternate() +void TDEShortcutDialog::slotClearAlternate() { if( m_shortcut.count() == 2 ) m_shortcut.init( m_shortcut.seq(0) ); @@ -267,7 +267,7 @@ void KShortcutDialog::slotClearAlternate() slotSelectAlternate(); } -void KShortcutDialog::slotMultiKeyMode( bool bOn ) +void TDEShortcutDialog::slotMultiKeyMode( bool bOn ) { // If turning off multi-key mode during a recording, if( !bOn && m_bRecording ) { @@ -281,7 +281,7 @@ void KShortcutDialog::slotMultiKeyMode( bool bOn ) /* we don't use the generic Qt code on X11 because it allows us to grab the keyboard so that all keypresses are seen */ -bool KShortcutDialog::x11Event( XEvent *pEvent ) +bool TDEShortcutDialog::x11Event( XEvent *pEvent ) { switch( pEvent->type ) { case XKeyPress: @@ -348,7 +348,7 @@ static bool convertSymXToMod( uint keySymX, uint* pmod ) return true; } -void KShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) +void TDEShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) { KKeyNative keyNative( pEvent ); uint keyModX = keyNative.mod(); @@ -370,7 +370,7 @@ void KShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) updateShortcutDisplay(); } -void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) +void TDEShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) { // We're only interested in the release of modifier keys, // and then only when it's for the first key in a sequence. @@ -391,7 +391,7 @@ void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) } } #elif defined(Q_WS_WIN) -void KShortcutDialog::keyPressEvent( TQKeyEvent * e ) +void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e ) { kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl; //if key is a letter, it must be stored as lowercase @@ -457,7 +457,7 @@ void KShortcutDialog::keyPressEvent( TQKeyEvent * e ) } } -bool KShortcutDialog::event ( TQEvent * e ) +bool TDEShortcutDialog::event ( TQEvent * e ) { if (e->type()==TQEvent::KeyRelease) { int modQt = KKeyServer::qtButtonStateToMod( static_cast(e)->state() ); @@ -488,7 +488,7 @@ bool KShortcutDialog::event ( TQEvent * e ) } #endif -void KShortcutDialog::keyPressed( KKey key ) +void TDEShortcutDialog::keyPressed( KKey key ) { kdDebug(125) << "keyPressed: " << key.toString() << endl; diff --git a/tdeui/kshortcutdialog.h b/tdeui/kshortcutdialog.h index e1f7643be..59a4bb565 100644 --- a/tdeui/kshortcutdialog.h +++ b/tdeui/kshortcutdialog.h @@ -25,42 +25,42 @@ class TQVBox; class KPushButton; -class KShortcutDialogSimple; -class KShortcutDialogAdvanced; +class TDEShortcutDialogSimple; +class TDEShortcutDialogAdvanced; /** * @short Dialog for configuring a shortcut. * - * This dialog allows configuring a single KShortcut. KKeyDialog + * This dialog allows configuring a single TDEShortcut. KKeyDialog * should be usually used instead. * * @internal * @see KKeyDialog * @since 3.4 */ -class TDEUI_EXPORT KShortcutDialog : public KDialogBase +class TDEUI_EXPORT TDEShortcutDialog : public KDialogBase { Q_OBJECT public: - KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); - ~KShortcutDialog(); + TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); + ~TDEShortcutDialog(); - void setShortcut( const KShortcut & shortcut ); - const KShortcut& shortcut() const { return m_shortcut; } + void setShortcut( const TDEShortcut & shortcut ); + const TDEShortcut& shortcut() const { return m_shortcut; } private: // true if qt shortcut, false if native shortcut bool m_bQtShortcut; - KShortcut m_shortcut; + TDEShortcut m_shortcut; bool m_bGrab; KPushButton* m_ptxtCurrent; uint m_iSeq; uint m_iKey; bool m_bRecording; uint m_mod; - KShortcutDialogSimple *m_simple; - KShortcutDialogAdvanced *m_adv; + TDEShortcutDialogSimple *m_simple; + TDEShortcutDialogAdvanced *m_adv; TQVBox *m_stack; void updateShortcutDisplay(); @@ -89,7 +89,7 @@ protected slots: void slotMultiKeyMode( bool bOn ); private: - class KShortcutDialogPrivate* d; + class TDEShortcutDialogPrivate* d; static bool s_showMore; }; diff --git a/tdeui/kshortcutdialog_advanced.ui b/tdeui/kshortcutdialog_advanced.ui index 6466174d2..77c7fae14 100644 --- a/tdeui/kshortcutdialog_advanced.ui +++ b/tdeui/kshortcutdialog_advanced.ui @@ -1,8 +1,8 @@ -KShortcutDialogAdvanced +TDEShortcutDialogAdvanced - KShortcutDialogAdvanced + TDEShortcutDialogAdvanced @@ -243,7 +243,7 @@ kpushbutton.h - class KShortcut + class TDEShortcut diff --git a/tdeui/kshortcutdialog_simple.ui b/tdeui/kshortcutdialog_simple.ui index 97d87b582..e271e2bd6 100644 --- a/tdeui/kshortcutdialog_simple.ui +++ b/tdeui/kshortcutdialog_simple.ui @@ -1,8 +1,8 @@ -KShortcutDialogSimple +TDEShortcutDialogSimple - KShortcutDialogSimple + TDEShortcutDialogSimple @@ -110,7 +110,7 @@ kpushbutton.h - class KShortcut + class TDEShortcut diff --git a/tdeui/kstatusbar.h b/tdeui/kstatusbar.h index a1b89d0a7..2c7574a79 100644 --- a/tdeui/kstatusbar.h +++ b/tdeui/kstatusbar.h @@ -64,14 +64,14 @@ signals: * * You can insert text labels or custom widgets. Their geometry is managed * internally. KStatusBar resizes itself, but positioning is left to - * KMainWindow (or to you, if you don't use KMainWindow ). + * TDEMainWindow (or to you, if you don't use TDEMainWindow ). * * A special type of item is a message which is a temporary text-message * displayed on top of other items in full-width. Messages are visible for * specified time, or until you call the slot TQStatusBar::clear(). See * TQStatusBar::message for details. * - * It is useful to connect the KActionCollection signals to the + * It is useful to connect the TDEActionCollection signals to the * TQStatusBar::message slots. * * KStatusBar inherits TQStatusBar, you can freely use all QStatusBar @@ -82,7 +82,7 @@ signals: * * @author Mark Donohoe (donohoe@kde.org) Maintained by Sven Radej - * @see KActionCollection + * @see TDEActionCollection */ class TDEUI_EXPORT KStatusBar : public TQStatusBar { @@ -97,7 +97,7 @@ public: enum BarStatus{ Toggle, Show, Hide }; /** - * Constructs a status bar. @p parent is usually KMainWindow. + * Constructs a status bar. @p parent is usually TDEMainWindow. */ KStatusBar( TQWidget* parent = 0L, const char* name = 0L ); diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index 2f33e4843..41c7e72ea 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -40,9 +40,9 @@ TQStringList stdNames() return internal_stdNames(); } -KAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, KActionCollection* parent ) +TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, TDEActionCollection* parent ) { - KAction* pAction = 0; + TDEAction* pAction = 0; const KStdActionInfo* pInfo = infoPtr( id ); kdDebug(125) << "KStdAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; // ellis if( pInfo ) { @@ -86,10 +86,10 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch if (id == LastPage) iconName = "start"; } - KShortcut cut = KStdAccel::shortcut(pInfo->idAccel); + TDEShortcut cut = TDEStdAccel::shortcut(pInfo->idAccel); switch( id ) { case OpenRecent: - pAction = new KRecentFilesAction( sLabel, pInfo->psIconName, cut, + pAction = new TDERecentFilesAction( sLabel, pInfo->psIconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); break; @@ -97,8 +97,8 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch case ShowToolbar: case ShowStatusbar: { - KToggleAction *ret; - ret = new KToggleAction( sLabel, pInfo->psIconName, cut, + TDEToggleAction *ret; + ret = new TDEToggleAction( sLabel, pInfo->psIconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); ret->setChecked( true ); @@ -107,8 +107,8 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch } case FullScreen: { - KToggleFullScreenAction *ret; - ret = new KToggleFullScreenAction( cut, recvr, slot, + TDEToggleFullScreenAction *ret; + ret = new TDEToggleFullScreenAction( cut, recvr, slot, parent, NULL, (name) ? name : pInfo->psName ); ret->setChecked( false ); pAction = ret; @@ -116,15 +116,15 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch } case PasteText: { - KPasteTextAction *ret; - ret = new KPasteTextAction(sLabel, iconName, cut, + TDEPasteTextAction *ret; + ret = new TDEPasteTextAction(sLabel, iconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); pAction = ret; break; } default: - pAction = new KAction( sLabel, iconName, cut, + pAction = new TDEAction( sLabel, iconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); break; @@ -139,103 +139,103 @@ const char* name( StdAction id ) return (pInfo) ? pInfo->psName : 0; } -KAction *openNew( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *openNew( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( New, name, recvr, slot, parent ); } -KAction *open( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *open( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Open, name, recvr, slot, parent ); } -KRecentFilesAction *openRecent( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) - { return (KRecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } -KAction *save( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDERecentFilesAction *openRecent( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) + { return (TDERecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } +TDEAction *save( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Save, name, recvr, slot, parent ); } -KAction *saveAs( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *saveAs( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SaveAs, name, recvr, slot, parent ); } -KAction *revert( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *revert( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Revert, name, recvr, slot, parent ); } -KAction *print( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *print( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Print, name, recvr, slot, parent ); } -KAction *printPreview( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *printPreview( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( PrintPreview, name, recvr, slot, parent ); } -KAction *close( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *close( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Close, name, recvr, slot, parent ); } -KAction *mail( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *mail( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Mail, name, recvr, slot, parent ); } -KAction *quit( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *quit( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Quit, name, recvr, slot, parent ); } -KAction *undo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *undo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Undo, name, recvr, slot, parent ); } -KAction *redo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *redo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Redo, name, recvr, slot, parent ); } -KAction *cut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *cut( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Cut, name, recvr, slot, parent ); } -KAction *copy( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *copy( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Copy, name, recvr, slot, parent ); } -KAction *paste( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *paste( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Paste, name, recvr, slot, parent ); } -KAction *pasteText( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *pasteText( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( PasteText, name, recvr, slot, parent ); } -KAction *clear( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *clear( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Clear, name, recvr, slot, parent ); } -KAction *selectAll( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *selectAll( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SelectAll, name, recvr, slot, parent ); } -KAction *deselect( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *deselect( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Deselect, name, recvr, slot, parent ); } -KAction *find( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *find( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Find, name, recvr, slot, parent ); } -KAction *findNext( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *findNext( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FindNext, name, recvr, slot, parent ); } -KAction *findPrev( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *findPrev( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FindPrev, name, recvr, slot, parent ); } -KAction *replace( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *replace( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Replace, name, recvr, slot, parent ); } -KAction *actualSize( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *actualSize( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ActualSize, name, recvr, slot, parent ); } -KAction *fitToPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToPage, name, recvr, slot, parent ); } -KAction *fitToWidth( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToWidth( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToWidth, name, recvr, slot, parent ); } -KAction *fitToHeight( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToHeight( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToHeight, name, recvr, slot, parent ); } -KAction *zoomIn( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoomIn( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ZoomIn, name, recvr, slot, parent ); } -KAction *zoomOut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoomOut( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ZoomOut, name, recvr, slot, parent ); } -KAction *zoom( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoom( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Zoom, name, recvr, slot, parent ); } -KAction *redisplay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *redisplay( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Redisplay, name, recvr, slot, parent ); } -KAction *up( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *up( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Up, name, recvr, slot, parent ); } -KAction *back( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *back( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Back, name, recvr, slot, parent ); } -KAction *forward( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *forward( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Forward, name, recvr, slot, parent ); } -KAction *home( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *home( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Home, name, recvr, slot, parent ); } -KAction *prior( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *prior( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Prior, name, recvr, slot, parent ); } -KAction *next( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *next( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Next, name, recvr, slot, parent ); } -KAction *goTo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *goTo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Goto, name, recvr, slot, parent ); } -KAction *gotoPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *gotoPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( GotoPage, name, recvr, slot, parent ); } -KAction *gotoLine( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *gotoLine( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( GotoLine, name, recvr, slot, parent ); } -KAction *firstPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *firstPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FirstPage, name, recvr, slot, parent ); } -KAction *lastPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *lastPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( LastPage, name, recvr, slot, parent ); } -KAction *addBookmark( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *addBookmark( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AddBookmark, name, recvr, slot, parent ); } -KAction *editBookmarks( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *editBookmarks( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( EditBookmarks, name, recvr, slot, parent ); } -KAction *spelling( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *spelling( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Spelling, name, recvr, slot, parent ); } -KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) +TDEToggleAction *showMenubar( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show &Menubar"), "showmenu", KStdAccel::shortcut(KStdAccel::ShowMenubar), recvr, slot, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show &Menubar"), "showmenu", TDEStdAccel::shortcut(TDEStdAccel::ShowMenubar), recvr, slot, parent, _name ? _name : name(ShowMenubar)); ret->setWhatsThis( i18n( "Show Menubar

      " "Shows the menubar again after it has been hidden" ) ); @@ -248,10 +248,10 @@ KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionColl } // obsolete -KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) +TDEToggleAction *showToolbar( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, _name ? _name : name(ShowToolbar)); ret->setChecked(true); return ret; @@ -259,19 +259,19 @@ KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionColl } // obsolete -KToggleToolBarAction *showToolbar( const char* toolBarName, KActionCollection* parent, const char *_name ) +TDEToggleToolBarAction *showToolbar( const char* toolBarName, TDEActionCollection* parent, const char *_name ) { - KToggleToolBarAction *ret; - ret = new KToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, + TDEToggleToolBarAction *ret; + ret = new TDEToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, _name ? _name : name(ShowToolbar)); return ret; } -KToggleAction *showStatusbar( const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *_name ) +TDEToggleAction *showStatusbar( const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, _name ? _name : name(ShowStatusbar)); ret->setWhatsThis( i18n( "Show Statusbar

      " "Shows the statusbar, which is the bar at the bottom of the window used for status information." ) ); @@ -284,40 +284,40 @@ KToggleAction *showStatusbar( const TQObject *recvr, const char *slot, return ret; } -KToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, KActionCollection* parent, +TDEToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, TDEActionCollection* parent, TQWidget* window, const char *name ) { - KToggleFullScreenAction *ret; - ret = static_cast< KToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent )); + TDEToggleFullScreenAction *ret; + ret = static_cast< TDEToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent )); ret->setWindow( window ); return ret; } -KAction *saveOptions( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *saveOptions( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SaveOptions, name, recvr, slot, parent ); } -KAction *keyBindings( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *keyBindings( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( KeyBindings, name, recvr, slot, parent ); } -KAction *preferences( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *preferences( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Preferences, name, recvr, slot, parent ); } -KAction *configureToolbars( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *configureToolbars( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ConfigureToolbars, name, recvr, slot, parent ); } -KAction *configureNotifications( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *configureNotifications( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ConfigureNotifications, name, recvr, slot, parent ); } -KAction *help( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *help( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Help, name, recvr, slot, parent ); } -KAction *helpContents( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *helpContents( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( HelpContents, name, recvr, slot, parent ); } -KAction *whatsThis( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *whatsThis( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( WhatsThis, name, recvr, slot, parent ); } -KAction *tipOfDay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *tipOfDay( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( TipofDay, name, recvr, slot, parent ); } -KAction *reportBug( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *reportBug( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ReportBug, name, recvr, slot, parent ); } -KAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SwitchApplicationLanguage, name, recvr, slot, parent ); } -KAction *aboutApp( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *aboutApp( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AboutApp, name, recvr, slot, parent ); } -KAction *aboutKDE( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *aboutKDE( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AboutKDE, name, recvr, slot, parent ); } } diff --git a/tdeui/kstdaction.h b/tdeui/kstdaction.h index 7fa18968d..31b80618c 100644 --- a/tdeui/kstdaction.h +++ b/tdeui/kstdaction.h @@ -21,12 +21,12 @@ class TQObject; class TQWidget; -class KAction; -class KActionCollection; -class KRecentFilesAction; -class KToggleAction; -class KToggleToolBarAction; -class KToggleFullScreenAction; +class TDEAction; +class TDEActionCollection; +class TDERecentFilesAction; +class TDEToggleAction; +class TDEToggleToolBarAction; +class TDEToggleFullScreenAction; #include @@ -40,8 +40,8 @@ class KToggleFullScreenAction; * conform to the KDE UI Style Guide * @see http://developer.kde.org/documentation/standards/kde/style/basics/index.html . * - * All of the documentation for KAction holds for KStdAction - * also. When in doubt on how things work, check the KAction + * All of the documentation for TDEAction holds for KStdAction + * also. When in doubt on how things work, check the TDEAction * documention first. * * Simple Example:\n @@ -50,15 +50,15 @@ class KToggleFullScreenAction; * for regular actions. For example, if you previously had: * * \code - * KAction *newAct = new KAction(i18n("&New"), TQIconSet(BarIcon("filenew")), - * KStdAccel::shortcut(KStdAccel::New), this, + * TDEAction *newAct = new TDEAction(i18n("&New"), TQIconSet(BarIcon("filenew")), + * TDEStdAccel::shortcut(TDEStdAccel::New), this, * TQT_SLOT(fileNew()), actionCollection()); * \endcode * * You could drop that and replace it with: * * \code - * KAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), + * TDEAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), * actionCollection()); * \endcode * @@ -97,7 +97,7 @@ class KToggleFullScreenAction; * could do it the hard way: * * \code - * KAction *cut = actionCollection()->action(KStdAction::stdName(KStdAction::Cut)); + * TDEAction *cut = actionCollection()->action(KStdAction::stdName(KStdAction::Cut)); * \endcode * * Another non-standard usage concerns instantiating the action in the @@ -165,22 +165,22 @@ namespace KStdAction * Creates an action corresponding to the * KStdAction::StdAction enum. */ - TDEUI_EXPORT KAction* create( StdAction id, const char *name, + TDEUI_EXPORT TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, - KActionCollection* parent ); + TDEActionCollection* parent ); - inline KAction* create( StdAction id, + inline TDEAction* create( StdAction id, const TQObject *recvr, const char *slot, - KActionCollection* parent ) + TDEActionCollection* parent ) { return KStdAction::create( id, 0, recvr, slot, parent ); } /** * @obsolete. Creates an action corresponding to the * KStdAction::StdAction enum. */ - inline KAction *action(StdAction act_enum, + inline TDEAction *action(StdAction act_enum, const TQObject *recvr, const char *slot, - KActionCollection *parent, const char *name = 0L ) + TDEActionCollection *parent, const char *name = 0L ) { return KStdAction::create( act_enum, name, recvr, slot, parent ); } /** @@ -192,7 +192,7 @@ namespace KStdAction inline const char* stdName(StdAction act_enum) { return name( act_enum ); } /** - * Returns a list of all standard names. Used by KAccelManager + * Returns a list of all standard names. Used by TDEAccelManager * to give those heigher weight. * @since 3.1 */ @@ -201,12 +201,12 @@ namespace KStdAction /** * Create a new document or window. */ - TDEUI_EXPORT KAction *openNew(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *openNew(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Open an existing file. */ - TDEUI_EXPORT KAction *open(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *open(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Open a recently used document. The signature of the slot being called @@ -217,87 +217,87 @@ namespace KStdAction * @param parent parent widget * @param name name of widget */ - TDEUI_EXPORT KRecentFilesAction *openRecent(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDERecentFilesAction *openRecent(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Save the current document. */ - TDEUI_EXPORT KAction *save(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *save(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Save the current document under a different name. */ - TDEUI_EXPORT KAction *saveAs(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *saveAs(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Revert the current document to the last saved version * (essentially will undo all changes). */ - TDEUI_EXPORT KAction *revert(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *revert(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Close the current document. */ - TDEUI_EXPORT KAction *close(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *close(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Print the current document. */ - TDEUI_EXPORT KAction *print(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *print(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Show a print preview of the current document. */ - TDEUI_EXPORT KAction *printPreview(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *printPreview(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Mail this document. */ - TDEUI_EXPORT KAction *mail(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *mail(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Quit the program. */ - TDEUI_EXPORT KAction *quit(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *quit(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Undo the last operation. */ - TDEUI_EXPORT KAction *undo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *undo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Redo the last operation. */ - TDEUI_EXPORT KAction *redo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *redo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Cut selected area and store it in the clipboard. */ - TDEUI_EXPORT KAction *cut(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *cut(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Copy the selected area into the clipboard. */ - TDEUI_EXPORT KAction *copy(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *copy(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Paste the contents of clipboard at the current mouse or cursor * position. */ - TDEUI_EXPORT KAction *paste(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *paste(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Paste the contents of clipboard at the current mouse or cursor @@ -305,228 +305,228 @@ namespace KStdAction * menu if Klipper is running. * @since 3.2 */ - TDEUI_EXPORT KAction *pasteText(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *pasteText(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Clear the content of the focus widget * @since 3.2 */ - TDEUI_EXPORT KAction *clear(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *clear(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Select all elements in the current document. */ - TDEUI_EXPORT KAction *selectAll(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *selectAll(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Deselect any selected elements in the current document. */ - TDEUI_EXPORT KAction *deselect(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *deselect(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Initiate a 'find' request in the current document. */ - TDEUI_EXPORT KAction *find(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *find(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find the next instance of a stored 'find'. */ - TDEUI_EXPORT KAction *findNext(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *findNext(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find a previous instance of a stored 'find'. */ - TDEUI_EXPORT KAction *findPrev(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *findPrev(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find and replace matches. */ - TDEUI_EXPORT KAction *replace(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *replace(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * View the document at its actual size. */ - TDEUI_EXPORT KAction *actualSize(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *actualSize(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the size of the current window. */ - TDEUI_EXPORT KAction *fitToPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the width of the current window. */ - TDEUI_EXPORT KAction *fitToWidth(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToWidth(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the height of the current window. */ - TDEUI_EXPORT KAction *fitToHeight(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToHeight(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Zoom in. */ - TDEUI_EXPORT KAction *zoomIn(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoomIn(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Zoom out. */ - TDEUI_EXPORT KAction *zoomOut(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoomOut(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Popup a zoom dialog. */ - TDEUI_EXPORT KAction *zoom(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoom(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Redisplay or redraw the document. */ - TDEUI_EXPORT KAction *redisplay(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *redisplay(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move up (web style menu). */ - TDEUI_EXPORT KAction *up(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *up(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move back (web style menu). */ - TDEUI_EXPORT KAction *back(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *back(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move forward (web style menu). */ - TDEUI_EXPORT KAction *forward(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *forward(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to the "Home" position or document. */ - TDEUI_EXPORT KAction *home(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *home(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Scroll up one page. */ - TDEUI_EXPORT KAction *prior(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *prior(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Scroll down one page. */ - TDEUI_EXPORT KAction *next(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *next(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to somewhere in general. */ - TDEUI_EXPORT KAction *goTo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *goTo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to a specific page (dialog). */ - TDEUI_EXPORT KAction *gotoPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *gotoPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to a specific line (dialog). */ - TDEUI_EXPORT KAction *gotoLine(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *gotoLine(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Jump to the first page. */ - TDEUI_EXPORT KAction *firstPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *firstPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Jump to the last page. */ - TDEUI_EXPORT KAction *lastPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *lastPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Add the current page to the bookmarks tree. */ - TDEUI_EXPORT KAction *addBookmark(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *addBookmark(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Edit the application bookmarks. */ - TDEUI_EXPORT KAction *editBookmarks(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *editBookmarks(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Pop up the spell checker. */ - TDEUI_EXPORT KAction *spelling(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *spelling(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Show/Hide the menubar. */ - TDEUI_EXPORT KToggleAction *showMenubar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEToggleAction *showMenubar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. - * See: KMainWindow::createStandardStatusBarAction() + * See: TDEMainWindow::createStandardStatusBarAction() * Show/Hide the primary toolbar. * @since 3.1 */ - TDEUI_EXPORT KToggleAction *showToolbar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEUI_EXPORT TDEToggleAction *showToolbar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. - * See: KMainWindow::setStandardToolBarMenuEnabled(bool); + * See: TDEMainWindow::setStandardToolBarMenuEnabled(bool); * Show/Hide the primary toolbar. */ - TDEUI_EXPORT KToggleToolBarAction *showToolbar(const char* toolBarName, - KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEUI_EXPORT TDEToggleToolBarAction *showToolbar(const char* toolBarName, + TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; /** * Show/Hide the statusbar. */ - TDEUI_EXPORT KToggleAction *showStatusbar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEToggleAction *showStatusbar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Switch to/from full screen mode * @since 3.2 */ - TDEUI_EXPORT KToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, - KActionCollection* parent, TQWidget* window, const char *name = 0 ); + TDEUI_EXPORT TDEToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, TQWidget* window, const char *name = 0 ); /** * Display the save options dialog. */ - TDEUI_EXPORT KAction *saveOptions(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *saveOptions(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the configure key bindings dialog. @@ -534,81 +534,81 @@ namespace KStdAction * Note that you might be able to use the pre-built KXMLGUIFactory's fuction: * KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); */ - TDEUI_EXPORT KAction *keyBindings(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *keyBindings(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the preferences/options dialog. */ - TDEUI_EXPORT KAction *preferences(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *preferences(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * The Customize Toolbar dialog. */ - TDEUI_EXPORT KAction *configureToolbars(const TQObject *recvr, + TDEUI_EXPORT TDEAction *configureToolbars(const TQObject *recvr, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name = 0 ); /** * The Configure Notifications dialog. * @since 3.1 */ - TDEUI_EXPORT KAction *configureNotifications(const TQObject *recvr, + TDEUI_EXPORT TDEAction *configureNotifications(const TQObject *recvr, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name = 0); /** * Display the help. */ - TDEUI_EXPORT KAction *help(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *help(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the help contents. */ - TDEUI_EXPORT KAction *helpContents(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *helpContents(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Trigger the What's This cursor. */ - TDEUI_EXPORT KAction *whatsThis(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *whatsThis(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display "Tip of the Day" * @since 3.1 */ - TDEUI_EXPORT KAction *tipOfDay(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *tipOfDay(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Open up the Report Bug dialog. */ - TDEUI_EXPORT KAction *reportBug(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *reportBug(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the application's About box. */ - TDEUI_EXPORT KAction *aboutApp(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *aboutApp(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the About KDE dialog. */ - TDEUI_EXPORT KAction *aboutKDE(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *aboutKDE(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display "Switch application language" dialog. * @since 3.5.8 */ - TDEUI_EXPORT KAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); } #endif // KSTDACTION_H diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h index f7e649fa8..b99421d04 100644 --- a/tdeui/kstdaction_p.h +++ b/tdeui/kstdaction_p.h @@ -28,7 +28,7 @@ namespace KStdAction struct KStdActionInfo { StdAction id; - KStdAccel::StdAccel idAccel; + TDEStdAccel::StdAccel idAccel; const char* psName; const char* psLabel; const char* psWhatsThis; @@ -37,82 +37,82 @@ struct KStdActionInfo static const KStdActionInfo g_rgActionInfo[] = { - { New, KStdAccel::New, "file_new", I18N_NOOP("&New"), 0, "filenew" }, - { Open, KStdAccel::Open, "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, - { OpenRecent, KStdAccel::AccelNone, "file_open_recent", I18N_NOOP("Open &Recent"), 0, "fileopen" }, - { Save, KStdAccel::Save, "file_save", I18N_NOOP("&Save"), 0, "filesave" }, - { SaveAs, KStdAccel::AccelNone, "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, - { Revert, KStdAccel::AccelNone, "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, - { Close, KStdAccel::Close, "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, - { Print, KStdAccel::Print, "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, - { PrintPreview, KStdAccel::AccelNone, "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, - { Mail, KStdAccel::AccelNone, "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, - { Quit, KStdAccel::Quit, "file_quit", I18N_NOOP("&Quit"), 0, "exit" }, - - { Undo, KStdAccel::Undo, "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, - { Redo, KStdAccel::Redo, "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, - { Cut, KStdAccel::Cut, "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, - { Copy, KStdAccel::Copy, "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, - { Paste, KStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, - { PasteText, KStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, - { Clear, KStdAccel::AccelNone, "edit_clear", I18N_NOOP("C&lear"), 0, "editclear" }, - { SelectAll, KStdAccel::SelectAll, "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, - { Deselect, KStdAccel::Deselect, "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, - { Find, KStdAccel::Find, "edit_find", I18N_NOOP("&Find..."), 0, "find" }, - { FindNext, KStdAccel::FindNext, "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, + { New, TDEStdAccel::New, "file_new", I18N_NOOP("&New"), 0, "filenew" }, + { Open, TDEStdAccel::Open, "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, + { OpenRecent, TDEStdAccel::AccelNone, "file_open_recent", I18N_NOOP("Open &Recent"), 0, "fileopen" }, + { Save, TDEStdAccel::Save, "file_save", I18N_NOOP("&Save"), 0, "filesave" }, + { SaveAs, TDEStdAccel::AccelNone, "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, + { Revert, TDEStdAccel::AccelNone, "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, + { Close, TDEStdAccel::Close, "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, + { Print, TDEStdAccel::Print, "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, + { PrintPreview, TDEStdAccel::AccelNone, "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, + { Mail, TDEStdAccel::AccelNone, "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, + { Quit, TDEStdAccel::Quit, "file_quit", I18N_NOOP("&Quit"), 0, "exit" }, + + { Undo, TDEStdAccel::Undo, "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, + { Redo, TDEStdAccel::Redo, "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, + { Cut, TDEStdAccel::Cut, "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, + { Copy, TDEStdAccel::Copy, "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, + { Paste, TDEStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, + { PasteText, TDEStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, + { Clear, TDEStdAccel::AccelNone, "edit_clear", I18N_NOOP("C&lear"), 0, "editclear" }, + { SelectAll, TDEStdAccel::SelectAll, "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, + { Deselect, TDEStdAccel::Deselect, "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, + { Find, TDEStdAccel::Find, "edit_find", I18N_NOOP("&Find..."), 0, "find" }, + { FindNext, TDEStdAccel::FindNext, "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, // FIXME: rename edit_find_last to edit_find_prev for KDE 4 - { FindPrev, KStdAccel::FindPrev, "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, - { Replace, KStdAccel::Replace, "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, - - { ActualSize, KStdAccel::AccelNone, "view_actual_size", I18N_NOOP("&Actual Size"), 0, "viewmag1" }, - { FitToPage, KStdAccel::AccelNone, "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, "view_fit_window" }, - { FitToWidth, KStdAccel::AccelNone, "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, "view_fit_width" }, - { FitToHeight, KStdAccel::AccelNone, "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, "view_fit_height" }, - { ZoomIn, KStdAccel::ZoomIn, "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, - { ZoomOut, KStdAccel::ZoomOut, "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, - { Zoom, KStdAccel::AccelNone, "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, - // KDE4: give Redisplay the shortcut KStdAccel::AccelReload - { Redisplay, KStdAccel::AccelNone, "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, - - { Up, KStdAccel::Up, "go_up", I18N_NOOP("&Up"), 0, "up" }, + { FindPrev, TDEStdAccel::FindPrev, "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, + { Replace, TDEStdAccel::Replace, "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, + + { ActualSize, TDEStdAccel::AccelNone, "view_actual_size", I18N_NOOP("&Actual Size"), 0, "viewmag1" }, + { FitToPage, TDEStdAccel::AccelNone, "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, "view_fit_window" }, + { FitToWidth, TDEStdAccel::AccelNone, "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, "view_fit_width" }, + { FitToHeight, TDEStdAccel::AccelNone, "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, "view_fit_height" }, + { ZoomIn, TDEStdAccel::ZoomIn, "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, + { ZoomOut, TDEStdAccel::ZoomOut, "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, + { Zoom, TDEStdAccel::AccelNone, "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, + // KDE4: give Redisplay the shortcut TDEStdAccel::AccelReload + { Redisplay, TDEStdAccel::AccelNone, "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, + + { Up, TDEStdAccel::Up, "go_up", I18N_NOOP("&Up"), 0, "up" }, // The following three have special i18n() needs for sLabel - { Back, KStdAccel::Back, "go_back", 0, 0, "back" }, - { Forward, KStdAccel::Forward, "go_forward", 0, 0, "forward" }, - { Home, KStdAccel::Home, "go_home", 0, 0, "gohome" }, - { Prior, KStdAccel::Prior, "go_previous", I18N_NOOP("&Previous Page"), 0, "back" }, - { Next, KStdAccel::Next, "go_next", I18N_NOOP("&Next Page"), 0, "forward" }, - { Goto, KStdAccel::AccelNone, "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, - { GotoPage, KStdAccel::AccelNone, "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, - { GotoLine, KStdAccel::GotoLine, "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, - { FirstPage, KStdAccel::Home, "go_first", I18N_NOOP("&First Page"), 0, "start" }, - { LastPage, KStdAccel::End, "go_last", I18N_NOOP("&Last Page"), 0, "finish" }, - - { AddBookmark, KStdAccel::AddBookmark, "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, - { EditBookmarks, KStdAccel::AccelNone, "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, - - { Spelling, KStdAccel::AccelNone, "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, - - { ShowMenubar, KStdAccel::ShowMenubar, "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, - { ShowToolbar, KStdAccel::AccelNone, "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, - { ShowStatusbar, KStdAccel::AccelNone, "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, - { FullScreen, KStdAccel::FullScreen, "fullscreen", I18N_NOOP("F&ull Screen Mode"), 0, "window_fullscreen" }, - { SaveOptions, KStdAccel::AccelNone, "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, - { KeyBindings, KStdAccel::AccelNone, "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, - { Preferences, KStdAccel::AccelNone, "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, - { ConfigureToolbars, KStdAccel::AccelNone, "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, - { ConfigureNotifications, KStdAccel::AccelNone, "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, + { Back, TDEStdAccel::Back, "go_back", 0, 0, "back" }, + { Forward, TDEStdAccel::Forward, "go_forward", 0, 0, "forward" }, + { Home, TDEStdAccel::Home, "go_home", 0, 0, "gohome" }, + { Prior, TDEStdAccel::Prior, "go_previous", I18N_NOOP("&Previous Page"), 0, "back" }, + { Next, TDEStdAccel::Next, "go_next", I18N_NOOP("&Next Page"), 0, "forward" }, + { Goto, TDEStdAccel::AccelNone, "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, + { GotoPage, TDEStdAccel::AccelNone, "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, + { GotoLine, TDEStdAccel::GotoLine, "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, + { FirstPage, TDEStdAccel::Home, "go_first", I18N_NOOP("&First Page"), 0, "start" }, + { LastPage, TDEStdAccel::End, "go_last", I18N_NOOP("&Last Page"), 0, "finish" }, + + { AddBookmark, TDEStdAccel::AddBookmark, "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, + { EditBookmarks, TDEStdAccel::AccelNone, "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, + + { Spelling, TDEStdAccel::AccelNone, "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, + + { ShowMenubar, TDEStdAccel::ShowMenubar, "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, + { ShowToolbar, TDEStdAccel::AccelNone, "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, + { ShowStatusbar, TDEStdAccel::AccelNone, "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, + { FullScreen, TDEStdAccel::FullScreen, "fullscreen", I18N_NOOP("F&ull Screen Mode"), 0, "window_fullscreen" }, + { SaveOptions, TDEStdAccel::AccelNone, "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, + { KeyBindings, TDEStdAccel::AccelNone, "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, + { Preferences, TDEStdAccel::AccelNone, "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, + { ConfigureToolbars, TDEStdAccel::AccelNone, "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, + { ConfigureNotifications, TDEStdAccel::AccelNone, "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, // the idea here is that Contents is used in menus, and Help in dialogs, so both share the same // shortcut - { Help, KStdAccel::Help, "help", 0, 0, "help" }, - { HelpContents, KStdAccel::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, - { WhatsThis, KStdAccel::WhatsThis, "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, - { TipofDay, KStdAccel::AccelNone, "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, - { ReportBug, KStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, 0 }, - { SwitchApplicationLanguage, KStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, 0 }, - { AboutApp, KStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, - { AboutKDE, KStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, - { ActionNone, KStdAccel::AccelNone, 0, 0, 0, 0 } + { Help, TDEStdAccel::Help, "help", 0, 0, "help" }, + { HelpContents, TDEStdAccel::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, + { WhatsThis, TDEStdAccel::WhatsThis, "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, + { TipofDay, TDEStdAccel::AccelNone, "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, + { ReportBug, TDEStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, 0 }, + { SwitchApplicationLanguage, TDEStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, 0 }, + { AboutApp, TDEStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, + { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, + { ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0 } }; inline const KStdActionInfo* infoPtr( StdAction id ) diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index 3b68d583a..83cb0e024 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -54,7 +54,7 @@ public: delete actionCollection; } - KActionCollection* actionCollection; + TDEActionCollection* actionCollection; bool on_all_desktops; // valid only when the parent widget was hidden }; @@ -66,7 +66,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) #endif d = new KSystemTrayPrivate; - d->actionCollection = new KActionCollection(this); + d->actionCollection = new TDEActionCollection(this); #ifdef Q_WS_X11 KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() ); @@ -74,14 +74,14 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); hasQuit = 0; - menu = new KPopupMenu( this ); + menu = new TDEPopupMenu( this ); menu->insertTitle( kapp->miniIcon(), kapp->caption() ); move( -1000, -1000 ); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(maybeQuit()), d->actionCollection); if (parentWidget()) { - new KAction(i18n("Minimize"), KShortcut(), + new TDEAction(i18n("Minimize"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( minimizeRestoreAction() ), d->actionCollection, "minimizeRestore"); #ifdef Q_WS_X11 @@ -112,7 +112,7 @@ void KSystemTray::showEvent( TQShowEvent * ) { if ( !hasQuit ) { menu->insertSeparator(); - KAction* action = d->actionCollection->action("minimizeRestore"); + TDEAction* action = d->actionCollection->action("minimizeRestore"); if (action) { @@ -136,7 +136,7 @@ void KSystemTray::enterEvent( TQEvent* e ) TQLabel::enterEvent( e ); } -KPopupMenu* KSystemTray::contextMenu() const +TDEPopupMenu* KSystemTray::contextMenu() const { return menu; } @@ -155,7 +155,7 @@ void KSystemTray::mousePressEvent( TQMouseEvent *e ) // fall through case Qt::RightButton: if ( parentWidget() ) { - KAction* action = d->actionCollection->action("minimizeRestore"); + TDEAction* action = d->actionCollection->action("minimizeRestore"); if ( parentWidget()->isVisible() ) action->setText( i18n("&Minimize") ); else @@ -175,7 +175,7 @@ void KSystemTray::mouseReleaseEvent( TQMouseEvent * ) } -void KSystemTray::contextMenuAboutToShow( KPopupMenu* ) +void KSystemTray::contextMenuAboutToShow( TDEPopupMenu* ) { } @@ -307,7 +307,7 @@ void KSystemTray::minimizeRestore( bool restore ) #endif } -KActionCollection* KSystemTray::actionCollection() +TDEActionCollection* KSystemTray::actionCollection() { return d->actionCollection; } diff --git a/tdeui/ksystemtray.h b/tdeui/ksystemtray.h index 151cf0166..711515985 100644 --- a/tdeui/ksystemtray.h +++ b/tdeui/ksystemtray.h @@ -21,8 +21,8 @@ #include #include -class KActionCollection; -class KPopupMenu; +class TDEActionCollection; +class TDEPopupMenu; class KSystemTrayPrivate; /** @@ -89,14 +89,14 @@ public: Access to the context menu. This makes it easy to add new items to it. */ - KPopupMenu* contextMenu() const; + TDEPopupMenu* contextMenu() const; /** Easy access to the actions in the context menu Currently includes KStdAction::Quit and minimizeRestore @since 3.1 */ - KActionCollection* actionCollection(); + TDEActionCollection* actionCollection(); /** * Changes the tray's icon. @@ -183,7 +183,7 @@ protected: Makes it easy to adjust some menu items right before the context menu becomes visible. */ - virtual void contextMenuAboutToShow( KPopupMenu* menu ); + virtual void contextMenuAboutToShow( TDEPopupMenu* menu ); /** Reimplemented for internal reasons. @@ -202,7 +202,7 @@ private slots: private: void activateOrHide(); void minimizeRestore( bool restore ); - KPopupMenu* menu; + TDEPopupMenu* menu; // minimizeRestoreId is no longer needed. remove in KDE 4.0 int minimizeRestoreId; uint hasQuit :1; diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index eac18058b..c78658cfc 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -75,44 +75,44 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) { + if ( TDEStdAccel::copy().contains( key ) ) { copy(); e->accept(); return; } - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); e->accept(); return; } - else if ( KStdAccel::cut().contains( key ) ) { + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); e->accept(); return; } - else if ( KStdAccel::undo().contains( key ) ) { + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); e->accept(); return; } - else if ( KStdAccel::redo().contains( key ) ) { + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); e->accept(); return; } - else if ( KStdAccel::deleteWordBack().contains( key ) ) + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { deleteWordBack(); e->accept(); return; } - else if ( KStdAccel::deleteWordForward().contains( key ) ) + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { deleteWordForward(); e->accept(); return; } - else if ( KStdAccel::backwardWord().contains( key ) ) + else if ( TDEStdAccel::backwardWord().contains( key ) ) { CursorAction action = MoveWordBackward; int para, index; @@ -123,7 +123,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::forwardWord().contains( key ) ) + else if ( TDEStdAccel::forwardWord().contains( key ) ) { CursorAction action = MoveWordForward; int para, index; @@ -134,43 +134,43 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::next().contains( key ) ) + else if ( TDEStdAccel::next().contains( key ) ) { moveCursor( MovePgDown, false ); e->accept(); return; } - else if ( KStdAccel::prior().contains( key ) ) + else if ( TDEStdAccel::prior().contains( key ) ) { moveCursor( MovePgUp, false ); e->accept(); return; } - else if ( KStdAccel::home().contains( key ) ) + else if ( TDEStdAccel::home().contains( key ) ) { moveCursor( MoveHome, false ); e->accept(); return; } - else if ( KStdAccel::end().contains( key ) ) + else if ( TDEStdAccel::end().contains( key ) ) { moveCursor( MoveEnd, false ); e->accept(); return; } - else if ( KStdAccel::beginningOfLine().contains( key ) ) + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { moveCursor( MoveLineStart, false ); e->accept(); return; } - else if ( KStdAccel::endOfLine().contains( key ) ) + else if ( TDEStdAccel::endOfLine().contains( key ) ) { moveCursor(MoveLineEnd, false); e->accept(); return; } - else if ( KStdAccel::pasteSelection().contains( key ) ) + else if ( TDEStdAccel::pasteSelection().contains( key ) ) { TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); if ( !text.isEmpty() ) diff --git a/tdeui/ktimezonewidget.cpp b/tdeui/ktimezonewidget.cpp index 5db720a68..94c5d65ce 100644 --- a/tdeui/ktimezonewidget.cpp +++ b/tdeui/ktimezonewidget.cpp @@ -34,7 +34,7 @@ #define COLUMN_ZONE 3 KTimezoneWidget::KTimezoneWidget(TQWidget *parent, const char *name, KTimezones *db) : - KListView(parent, name), + TDEListView(parent, name), d(0) { // If the user did not provide a timezone database, we'll use the system default. @@ -115,7 +115,7 @@ void KTimezoneWidget::setSelected(const TQString &zone, bool selected) { if (listItem->text(COLUMN_ZONE) == zone) { - KListView::setSelected(listItem, selected); + TDEListView::setSelected(listItem, selected); // Ensure the selected item is visible as appropriate. listItem = selectedItem(); diff --git a/tdeui/ktimezonewidget.h b/tdeui/ktimezonewidget.h index 3400e256b..6d708e6f1 100644 --- a/tdeui/ktimezonewidget.h +++ b/tdeui/ktimezonewidget.h @@ -49,7 +49,7 @@ class KTimezoneWidgetPrivate; * \code * * m_timezones = new KTimezoneWidget(this, "Timezones", vcalendarTimezones); - * m_timezones->setSelectionModeExt(KListView::Multi); + * m_timezones->setSelectionModeExt(TDEListView::Multi); * ... * \endcode * @@ -57,7 +57,7 @@ class KTimezoneWidgetPrivate; * @since 3.5 */ class TDEUI_EXPORT KTimezoneWidget : - public KListView + public TDEListView { Q_OBJECT diff --git a/tdeui/ktoolbar.cpp b/tdeui/ktoolbar.cpp index 8c64dfdc6..71d182275 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/ktoolbar.cpp @@ -76,12 +76,12 @@ enum { CONTEXT_ICONSIZES = 50 // starting point for the icon size list, put everything else before }; -class KToolBarPrivate +class TDEToolBarPrivate { public: - KToolBarPrivate() { + TDEToolBarPrivate() { m_iconSize = 0; - m_iconText = KToolBar::IconOnly; + m_iconText = TDEToolBar::IconOnly; m_highlight = true; m_transparent = true; m_honorStyle = false; @@ -105,7 +105,7 @@ public: } int m_iconSize; - KToolBar::IconText m_iconText; + TDEToolBar::IconText m_iconText; bool m_highlight : 1; bool m_transparent : 1; bool m_honorStyle : 1; @@ -144,7 +144,7 @@ public: TQPtrList idleButtons; }; -KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent, +TDEToolBarSeparator::TDEToolBarSeparator(Orientation o , bool l, TQToolBar *parent, const char* name ) :TQFrame( parent, name ), line( l ) { @@ -155,13 +155,13 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent, setBackgroundOrigin( ParentOrigin ); } -void KToolBarSeparator::setOrientation( Orientation o ) +void TDEToolBarSeparator::setOrientation( Orientation o ) { orient = o; setFrameStyle( NoFrame ); } -void KToolBarSeparator::drawContents( TQPainter* p ) +void TDEToolBarSeparator::drawContents( TQPainter* p ) { if ( line ) { TQStyle::SFlags flags = TQStyle::Style_Default; @@ -176,23 +176,23 @@ void KToolBarSeparator::drawContents( TQPainter* p ) } } -void KToolBarSeparator::styleChange( TQStyle& ) +void TDEToolBarSeparator::styleChange( TQStyle& ) { setOrientation( orient ); } -TQSize KToolBarSeparator::sizeHint() const +TQSize TDEToolBarSeparator::sizeHint() const { int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); } -TQSizePolicy KToolBarSeparator::sizePolicy() const +TQSizePolicy TDEToolBarSeparator::sizePolicy() const { return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); } -KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), tqt_dynamic_cast(parent), parent, false, @@ -201,7 +201,7 @@ KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool re init( readConfig, honorStyle ); } -KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") @@ -209,7 +209,7 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, init( readConfig, honorStyle ); } -KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") @@ -217,15 +217,15 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, co init( readConfig, honorStyle ); } -KToolBar::~KToolBar() +TDEToolBar::~TDEToolBar() { emit toolbarDestroyed(); delete d; } -void KToolBar::init( bool readConfig, bool honorStyle ) +void TDEToolBar::init( bool readConfig, bool honorStyle ) { - d = new KToolBarPrivate; + d = new TDEToolBarPrivate; setFullSize( true ); d->m_honorStyle = honorStyle; context = 0; @@ -254,10 +254,10 @@ void KToolBar::init( bool readConfig, bool honorStyle ) connect( this, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(rebuildLayout()) ); } -int KToolBar::insertButton(const TQString& icon, int id, bool enabled, +int TDEToolBar::insertButton(const TQString& icon, int id, bool enabled, const TQString& text, int index, TDEInstance *_instance ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance ); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text, _instance ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); @@ -266,11 +266,11 @@ int KToolBar::insertButton(const TQString& icon, int id, bool enabled, } -int KToolBar::insertButton(const TQString& icon, int id, const char *signal, +int TDEToolBar::insertButton(const TQString& icon, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& text, int index, TDEInstance *_instance ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text, _instance); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); connect( button, signal, receiver, slot ); @@ -279,10 +279,10 @@ int KToolBar::insertButton(const TQString& icon, int id, const char *signal, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, const TQString& text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); doConnections( button ); @@ -290,12 +290,12 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); connect( button, signal, receiver, slot ); @@ -304,10 +304,10 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, } -int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, +int TDEToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, bool enabled, const TQString &text, int index ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text ); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); button->setPopup( popup ); @@ -316,10 +316,10 @@ int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, bool enabled, const TQString &text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text ); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); button->setPopup( popup ); @@ -328,7 +328,7 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, } -int KToolBar::insertLined (const TQString& text, int id, +int TDEToolBar::insertLined (const TQString& text, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled , @@ -347,7 +347,7 @@ int KToolBar::insertLined (const TQString& text, int id, return index; } -int KToolBar::insertCombo (const TQStringList &list, int id, bool writable, +int TDEToolBar::insertCombo (const TQStringList &list, int id, bool writable, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& tooltiptext, @@ -371,7 +371,7 @@ int KToolBar::insertCombo (const TQStringList &list, int id, bool writable, } -int KToolBar::insertCombo (const TQString& text, int id, bool writable, +int TDEToolBar::insertCombo (const TQString& text, int id, bool writable, const char *signal, TQObject *receiver, const char *slot, bool enabled, const TQString& tooltiptext, @@ -391,29 +391,29 @@ int KToolBar::insertCombo (const TQString& text, int id, bool writable, return index; } -int KToolBar::insertSeparator(int index, int id) +int TDEToolBar::insertSeparator(int index, int id) { - TQWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" ); + TQWidget *w = new TDEToolBarSeparator( orientation(), false, this, "tool bar separator" ); insertWidgetInternal( w, index, id ); return index; } -int KToolBar::insertLineSeparator(int index, int id) +int TDEToolBar::insertLineSeparator(int index, int id) { - TQWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" ); + TQWidget *w = new TDEToolBarSeparator( orientation(), true, this, "tool bar separator" ); insertWidgetInternal( w, index, id ); return index; } -int KToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index) +int TDEToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index) { removeWidgetInternal( widget ); // in case we already have it ? insertWidgetInternal( widget, index, id ); return index; } -int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, +int TDEToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, const TQString& icons, int index ) { KAnimWidget *anim = new KAnimWidget( icons, d->m_iconSize, this ); @@ -425,7 +425,7 @@ int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, return index; } -KAnimWidget *KToolBar::animatedWidget( int id ) +KAnimWidget *TDEToolBar::animatedWidget( int id ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -453,7 +453,7 @@ KAnimWidget *KToolBar::animatedWidget( int id ) } -void KToolBar::addConnection (int id, const char *signal, +void TDEToolBar::addConnection (int id, const char *signal, const TQObject *receiver, const char *slot) { TQWidget* w = getWidget( id ); @@ -461,7 +461,7 @@ void KToolBar::addConnection (int id, const char *signal, connect( w, signal, receiver, slot ); } -void KToolBar::setItemEnabled( int id, bool enabled ) +void TDEToolBar::setItemEnabled( int id, bool enabled ) { TQWidget* w = getWidget( id ); if ( w ) @@ -469,77 +469,77 @@ void KToolBar::setItemEnabled( int id, bool enabled ) } -void KToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap ) +void TDEToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setPixmap( _pixmap ); } -void KToolBar::setButtonIcon( int id, const TQString& _icon ) +void TDEToolBar::setButtonIcon( int id, const TQString& _icon ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setIcon( _icon ); } -void KToolBar::setButtonIconSet( int id, const TQIconSet& iconset ) +void TDEToolBar::setButtonIconSet( int id, const TQIconSet& iconset ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setIconSet( iconset ); } -void KToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle ) +void TDEToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setDelayedPopup( _popup, toggle ); } -void KToolBar::setAutoRepeat (int id, bool flag) +void TDEToolBar::setAutoRepeat (int id, bool flag) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setAutoRepeat( flag ); } -void KToolBar::setToggle (int id, bool flag ) +void TDEToolBar::setToggle (int id, bool flag ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setToggle( flag ); } -void KToolBar::toggleButton (int id) +void TDEToolBar::toggleButton (int id) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->toggle(); } -void KToolBar::setButton (int id, bool flag) +void TDEToolBar::setButton (int id, bool flag) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->on( flag ); } -bool KToolBar::isButtonOn (int id) const +bool TDEToolBar::isButtonOn (int id) const { - KToolBarButton * button = const_cast( this )->getButton( id ); + TDEToolBarButton * button = const_cast( this )->getButton( id ); return button ? button->isOn() : false; } -void KToolBar::setLinedText (int id, const TQString& text) +void TDEToolBar::setLinedText (int id, const TQString& text) { KLineEdit * lineEdit = getLined( id ); if ( lineEdit ) @@ -547,21 +547,21 @@ void KToolBar::setLinedText (int id, const TQString& text) } -TQString KToolBar::getLinedText (int id) const +TQString TDEToolBar::getLinedText (int id) const { - KLineEdit * lineEdit = const_cast( this )->getLined( id ); + KLineEdit * lineEdit = const_cast( this )->getLined( id ); return lineEdit ? lineEdit->text() : TQString::null; } -void KToolBar::insertComboItem (int id, const TQString& text, int index) +void TDEToolBar::insertComboItem (int id, const TQString& text, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) comboBox->insertItem( text, index ); } -void KToolBar::insertComboList (int id, const TQStringList &list, int index) +void TDEToolBar::insertComboList (int id, const TQStringList &list, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -569,7 +569,7 @@ void KToolBar::insertComboList (int id, const TQStringList &list, int index) } -void KToolBar::removeComboItem (int id, int index) +void TDEToolBar::removeComboItem (int id, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -577,7 +577,7 @@ void KToolBar::removeComboItem (int id, int index) } -void KToolBar::setCurrentComboItem (int id, int index) +void TDEToolBar::setCurrentComboItem (int id, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -585,7 +585,7 @@ void KToolBar::setCurrentComboItem (int id, int index) } -void KToolBar::changeComboItem (int id, const TQString& text, int index) +void TDEToolBar::changeComboItem (int id, const TQString& text, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -593,7 +593,7 @@ void KToolBar::changeComboItem (int id, const TQString& text, int index) } -void KToolBar::clearCombo (int id) +void TDEToolBar::clearCombo (int id) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -601,14 +601,14 @@ void KToolBar::clearCombo (int id) } -TQString KToolBar::getComboItem (int id, int index) const +TQString TDEToolBar::getComboItem (int id, int index) const { - KComboBox * comboBox = const_cast( this )->getCombo( id ); + KComboBox * comboBox = const_cast( this )->getCombo( id ); return comboBox ? comboBox->text( index ) : TQString::null; } -KComboBox * KToolBar::getCombo(int id) +KComboBox * TDEToolBar::getCombo(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -617,7 +617,7 @@ KComboBox * KToolBar::getCombo(int id) } -KLineEdit * KToolBar::getLined (int id) +KLineEdit * TDEToolBar::getLined (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -626,16 +626,16 @@ KLineEdit * KToolBar::getLined (int id) } -KToolBarButton * KToolBar::getButton (int id) +TDEToolBarButton * TDEToolBar::getButton (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast( *it ); + return tqt_dynamic_cast( *it ); } -void KToolBar::alignItemRight (int id, bool right ) +void TDEToolBar::alignItemRight (int id, bool right ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -647,14 +647,14 @@ void KToolBar::alignItemRight (int id, bool right ) } -TQWidget *KToolBar::getWidget (int id) +TQWidget *TDEToolBar::getWidget (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); return ( it == id2widget.end() ) ? 0 : (*it); } -void KToolBar::setItemAutoSized (int id, bool yes ) +void TDEToolBar::setItemAutoSized (int id, bool yes ) { TQWidget *w = getWidget(id); if ( w && yes ) @@ -662,7 +662,7 @@ void KToolBar::setItemAutoSized (int id, bool yes ) } -void KToolBar::clear () +void TDEToolBar::clear () { /* Delete any idle buttons, so TQToolBar doesn't delete them itself, making a mess */ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) @@ -675,12 +675,12 @@ void KToolBar::clear () } -void KToolBar::removeItem(int id) +void TDEToolBar::removeItem(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { - kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; + kdDebug(220) << name() << " TDEToolBar::removeItem item " << id << " not found" << endl; return; } TQWidget * w = (*it); @@ -691,12 +691,12 @@ void KToolBar::removeItem(int id) } -void KToolBar::removeItemDelayed(int id) +void TDEToolBar::removeItemDelayed(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { - kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; + kdDebug(220) << name() << " TDEToolBar::removeItem item " << id << " not found" << endl; return; } TQWidget * w = (*it); @@ -710,7 +710,7 @@ void KToolBar::removeItemDelayed(int id) } -void KToolBar::hideItem (int id) +void TDEToolBar::hideItem (int id) { TQWidget *w = getWidget(id); if ( w ) @@ -718,7 +718,7 @@ void KToolBar::hideItem (int id) } -void KToolBar::showItem (int id) +void TDEToolBar::showItem (int id) { TQWidget *w = getWidget(id); if ( w ) @@ -726,38 +726,38 @@ void KToolBar::showItem (int id) } -int KToolBar::itemIndex (int id) +int TDEToolBar::itemIndex (int id) { TQWidget *w = getWidget(id); return w ? widgets.findRef(w) : -1; } -int KToolBar::idAt (int index) +int TDEToolBar::idAt (int index) { TQWidget *w = widgets.at(index); return widget2id[w]; } -void KToolBar::setFullSize(bool flag ) +void TDEToolBar::setFullSize(bool flag ) { setHorizontalStretchable( flag ); setVerticalStretchable( flag ); } -bool KToolBar::fullSize() const +bool TDEToolBar::fullSize() const { return isHorizontalStretchable() || isVerticalStretchable(); } -void KToolBar::enableMoving(bool flag ) +void TDEToolBar::enableMoving(bool flag ) { setMovingEnabled(flag); } -void KToolBar::setBarPos (BarPosition bpos) +void TDEToolBar::setBarPos (BarPosition bpos) { if ( !mainWindow() ) return; @@ -766,22 +766,22 @@ void KToolBar::setBarPos (BarPosition bpos) } -KToolBar::BarPosition KToolBar::barPos() const +TDEToolBar::BarPosition TDEToolBar::barPos() const { if ( !this->mainWindow() ) - return place() == TQDockWindow::InDock ? KToolBar::Top : KToolBar::Floating; + return place() == TQDockWindow::InDock ? TDEToolBar::Top : TDEToolBar::Floating; Dock dock; int dm1, dm2; bool dm3; this->mainWindow()->getLocation( (TQToolBar*)this, dock, dm1, dm3, dm2 ); if ( dock == DockUnmanaged ) { - return (KToolBar::BarPosition)DockTop; + return (TDEToolBar::BarPosition)DockTop; } return (BarPosition)dock; } -bool KToolBar::enable(BarStatus stat) +bool TDEToolBar::enable(BarStatus stat) { bool mystat = isVisible(); @@ -794,47 +794,47 @@ bool KToolBar::enable(BarStatus stat) } -void KToolBar::setMaxHeight ( int h ) +void TDEToolBar::setMaxHeight ( int h ) { setMaximumHeight( h ); } -int KToolBar::maxHeight() +int TDEToolBar::maxHeight() { return maximumHeight(); } -void KToolBar::setMaxWidth (int dw) +void TDEToolBar::setMaxWidth (int dw) { setMaximumWidth( dw ); } -int KToolBar::maxWidth() +int TDEToolBar::maxWidth() { return maximumWidth(); } -void KToolBar::setTitle (const TQString& _title) +void TDEToolBar::setTitle (const TQString& _title) { setLabel( _title ); } -void KToolBar::enableFloating (bool ) +void TDEToolBar::enableFloating (bool ) { } -void KToolBar::setIconText(IconText it) +void TDEToolBar::setIconText(IconText it) { setIconText( it, true ); } -void KToolBar::setIconText(IconText icontext, bool update) +void TDEToolBar::setIconText(IconText icontext, bool update) { bool doUpdate=false; @@ -865,18 +865,18 @@ void KToolBar::setIconText(IconText icontext, bool update) } -KToolBar::IconText KToolBar::iconText() const +TDEToolBar::IconText TDEToolBar::iconText() const { return d->m_iconText; } -void KToolBar::setIconSize(int size) +void TDEToolBar::setIconSize(int size) { setIconSize( size, true ); } -void KToolBar::setIconSize(int size, bool update) +void TDEToolBar::setIconSize(int size, bool update) { bool doUpdate=false; @@ -902,7 +902,7 @@ void KToolBar::setIconSize(int size, bool update) } } -int KToolBar::iconSize() const +int TDEToolBar::iconSize() const { if ( !d->m_iconSize ) // default value? return iconSizeDefault(); @@ -910,7 +910,7 @@ int KToolBar::iconSize() const return d->m_iconSize; } -int KToolBar::iconSizeDefault() const +int TDEToolBar::iconSizeDefault() const { if (!::qstrcmp(name(), "mainToolBar")) return TDEGlobal::iconLoader()->currentSize(KIcon::MainToolbar); @@ -918,27 +918,27 @@ int KToolBar::iconSizeDefault() const return TDEGlobal::iconLoader()->currentSize(KIcon::Toolbar); } -void KToolBar::setEnableContextMenu(bool enable ) +void TDEToolBar::setEnableContextMenu(bool enable ) { d->m_enableContext = enable; } -bool KToolBar::contextMenuEnabled() const +bool TDEToolBar::contextMenuEnabled() const { return d->m_enableContext; } -void KToolBar::setItemNoStyle(int id, bool no_style ) +void TDEToolBar::setItemNoStyle(int id, bool no_style ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if (button) button->setNoStyle( no_style ); } -void KToolBar::setFlat (bool flag) +void TDEToolBar::setFlat (bool flag) { if ( !mainWindow() ) return; @@ -947,19 +947,19 @@ void KToolBar::setFlat (bool flag) else mainWindow()->moveDockWindow( this, DockTop ); // And remember to save the new look later - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } -int KToolBar::count() const +int TDEToolBar::count() const { return id2widget.count(); } -void KToolBar::saveState() +void TDEToolBar::saveState() { // first, try to save to the xml file if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() ) { @@ -1025,7 +1025,7 @@ void KToolBar::saveState() config->sync(); } -TQString KToolBar::settingsGroup() const +TQString TDEToolBar::settingsGroup() const { TQString configGroup; if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar")) @@ -1040,7 +1040,7 @@ TQString KToolBar::settingsGroup() const return configGroup; } -void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) +void TDEToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) { TQString configGroup = _configGroup; if (configGroup.isEmpty()) @@ -1093,22 +1093,22 @@ void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) // reappear at the same position the next time. // The whole set of indexes has to be saved. //kdDebug(220) << name() << " writing index " << index << endl; - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); // don't save if there's only one toolbar // Don't use kmw->toolBarIterator() because you might // mess up someone else's iterator. Make the list on your own - TQPtrList toolbarList; + TQPtrList toolbarList; TQPtrList lst; for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) { lst = kmw->toolBars( (ToolBarDock)i ); for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) { - if ( !tb->inherits( "KToolBar" ) ) + if ( !tb->inherits( "TDEToolBar" ) ) continue; - toolbarList.append( (KToolBar*)tb ); + toolbarList.append( (TDEToolBar*)tb ); } } - TQPtrListIterator toolbarIterator( toolbarList ); + TQPtrListIterator toolbarIterator( toolbarList ); if ( !kmw || toolbarIterator.count() > 1 ) config->writeEntry("Index", index); else @@ -1126,24 +1126,24 @@ void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) } -void KToolBar::setXMLGUIClient( KXMLGUIClient *client ) +void TDEToolBar::setXMLGUIClient( KXMLGUIClient *client ) { d->m_xmlguiClient = client; } -void KToolBar::setText( const TQString & txt ) +void TDEToolBar::setText( const TQString & txt ) { setLabel( txt + " (" + kapp->caption() + ") " ); } -TQString KToolBar::text() const +TQString TDEToolBar::text() const { return label(); } -void KToolBar::doConnections( KToolBarButton *button ) +void TDEToolBar::doConnections( TDEToolBarButton *button ) { connect(button, TQT_SIGNAL(clicked(int)), this, TQT_SIGNAL( clicked( int ) ) ); connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL( doubleClicked( int ) ) ); @@ -1153,14 +1153,14 @@ void KToolBar::doConnections( KToolBarButton *button ) connect(button, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SIGNAL( highlighted( int, bool ) ) ); } -void KToolBar::mousePressEvent ( TQMouseEvent *m ) +void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) { if ( !mainWindow() ) return; TQMainWindow *mw = mainWindow(); if ( mw->toolBarsMovable() && d->m_enableContext ) { if ( m->button() == Qt::RightButton ) { - TQGuardedPtr guard( this ); + TQGuardedPtr guard( this ); int i = contextMenu()->exec( m->globalPos(), 0 ); // "Configure Toolbars" recreates toolbars, so we might not exist anymore. if ( guard ) @@ -1204,14 +1204,14 @@ void KToolBar::mousePressEvent ( TQMouseEvent *m ) else return; // assume this was an action handled elsewhere, no need for setSettingsDirty() } - KMainWindow *kmw = tqt_dynamic_cast(mw); + TDEMainWindow *kmw = tqt_dynamic_cast(mw); if ( kmw ) kmw->setSettingsDirty(); } } } -void KToolBar::doModeChange() +void TDEToolBar::doModeChange() { for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) w->blockSignals(false); @@ -1220,7 +1220,7 @@ void KToolBar::doModeChange() emit modechange(); } -void KToolBar::rebuildLayout() +void TDEToolBar::rebuildLayout() { for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) w->blockSignals(false); @@ -1238,7 +1238,7 @@ void KToolBar::rebuildLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( w == rightAligned ) continue; - KToolBarSeparator *ktbs = tqt_dynamic_cast(w); + TDEToolBarSeparator *ktbs = tqt_dynamic_cast(w); if ( ktbs && !ktbs->showLine() ) { l->addSpacing( orientation() == Qt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); w->hide(); @@ -1267,7 +1267,7 @@ void KToolBar::rebuildLayout() TQApplication::postEvent( this, new TQEvent( TQEvent::LayoutHint ) ); } -void KToolBar::childEvent( TQChildEvent *e ) +void TDEToolBar::childEvent( TQChildEvent *e ) { if ( e->child()->isWidgetType() ) { TQWidget * w = tqt_dynamic_cast(e->child()); @@ -1304,7 +1304,7 @@ void KToolBar::childEvent( TQChildEvent *e ) TQToolBar::childEvent( e ); } -void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) +void TDEToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) { // we can't have it in widgets, or something is really wrong //widgets.removeRef( w ); @@ -1323,19 +1323,19 @@ void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) widget2id.insert( w, id ); } -void KToolBar::showEvent( TQShowEvent *e ) +void TDEToolBar::showEvent( TQShowEvent *e ) { TQToolBar::showEvent( e ); rebuildLayout(); } -void KToolBar::setStretchableWidget( TQWidget *w ) +void TDEToolBar::setStretchableWidget( TQWidget *w ) { TQToolBar::setStretchableWidget( w ); stretchableWidget = w; } -TQSizePolicy KToolBar::sizePolicy() const +TQSizePolicy TDEToolBar::sizePolicy() const { if ( orientation() == Qt::Horizontal ) return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); @@ -1343,18 +1343,18 @@ TQSizePolicy KToolBar::sizePolicy() const return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); } -TQSize KToolBar::sizeHint() const +TQSize TDEToolBar::sizeHint() const { TQSize minSize(0,0); - KToolBar *ncThis = const_cast(this); + TDEToolBar *ncThis = const_cast(this); ncThis->polish(); int margin = static_cast(ncThis)->layout()->margin() + frameWidth(); switch( barPos() ) { - case KToolBar::Top: - case KToolBar::Bottom: + case TDEToolBar::Top: + case TDEToolBar::Bottom: for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); @@ -1375,8 +1375,8 @@ TQSize KToolBar::sizeHint() const minSize += TQSize(margin*2, margin*2); break; - case KToolBar::Left: - case KToolBar::Right: + case TDEToolBar::Left: + case TDEToolBar::Right: for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); @@ -1401,32 +1401,32 @@ TQSize KToolBar::sizeHint() const return minSize; } -TQSize KToolBar::minimumSize() const +TQSize TDEToolBar::minimumSize() const { return minimumSizeHint(); } -TQSize KToolBar::minimumSizeHint() const +TQSize TDEToolBar::minimumSizeHint() const { return sizeHint(); } -bool KToolBar::highlight() const +bool TDEToolBar::highlight() const { return d->m_highlight; } -void KToolBar::hide() +void TDEToolBar::hide() { TQToolBar::hide(); } -void KToolBar::show() +void TDEToolBar::show() { TQToolBar::show(); } -void KToolBar::resizeEvent( TQResizeEvent *e ) +void TDEToolBar::resizeEvent( TQResizeEvent *e ) { bool b = isUpdatesEnabled(); setUpdatesEnabled( false ); @@ -1445,12 +1445,12 @@ void KToolBar::resizeEvent( TQResizeEvent *e ) } } // else { -// printf("[WARNING] In KToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); +// printf("[WARNING] In TDEToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); // setUpdatesEnabled( true ); // } } -void KToolBar::slotIconChanged(int group) +void TDEToolBar::slotIconChanged(int group) { if ((group != KIcon::Toolbar) && (group != KIcon::MainToolbar)) return; @@ -1463,7 +1463,7 @@ void KToolBar::slotIconChanged(int group) updateGeometry(); } -void KToolBar::slotReadConfig() +void TDEToolBar::slotReadConfig() { //kdDebug(220) << name() << " slotReadConfig" << endl; // Read appearance settings (hmm, we used to do both here, @@ -1472,19 +1472,19 @@ void KToolBar::slotReadConfig() applyAppearanceSettings(TDEGlobal::config(), TQString::null ); } -void KToolBar::slotAppearanceChanged() +void TDEToolBar::slotAppearanceChanged() { // Read appearance settings from global file. applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ ); // And remember to save the new look later - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } //static -bool KToolBar::highlightSetting() +bool TDEToolBar::highlightSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); @@ -1492,7 +1492,7 @@ bool KToolBar::highlightSetting() } //static -bool KToolBar::transparentSetting() +bool TDEToolBar::transparentSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); @@ -1500,7 +1500,7 @@ bool KToolBar::transparentSetting() } //static -KToolBar::IconText KToolBar::iconTextSetting() +TDEToolBar::IconText TDEToolBar::iconTextSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); @@ -1515,7 +1515,7 @@ KToolBar::IconText KToolBar::iconTextSetting() return IconOnly; } -void KToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) +void TDEToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) { TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; //kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl; @@ -1637,12 +1637,12 @@ void KToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_confi updateGeometry(); } -void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) +void TDEToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) { return applySettings(config,_configGroup,false); } -void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) +void TDEToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) { //kdDebug(220) << name() << " applySettings group=" << _configGroup << endl; @@ -1705,7 +1705,7 @@ void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bo if ( mainWindow() ) { //kdDebug(220) << name() << " applySettings updating ToolbarInfo" << endl; - d->toolBarInfo = KToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); + d->toolBarInfo = TDEToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); positionYourself( true ); } if (isVisible ()) @@ -1713,7 +1713,7 @@ void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bo } } -bool KToolBar::event( TQEvent *e ) +bool TDEToolBar::event( TQEvent *e ) { if ( (e->type() == TQEvent::LayoutHint) && isUpdatesEnabled() ) d->repaintTimer.start( 100, true ); @@ -1730,7 +1730,7 @@ bool KToolBar::event( TQEvent *e ) return TQToolBar::event( e ); } -void KToolBar::slotRepaint() +void TDEToolBar::slotRepaint() { setUpdatesEnabled( false ); // Send a resizeEvent to update the "toolbar extension arrow" @@ -1743,40 +1743,40 @@ void KToolBar::slotRepaint() repaint( true ); } -void KToolBar::toolBarPosChanged( TQToolBar *tb ) +void TDEToolBar::toolBarPosChanged( TQToolBar *tb ) { if ( tb != this ) return; if ( d->oldPos == DockMinimized ) rebuildLayout(); d->oldPos = (TQMainWindow::ToolBarDock)barPos(); - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } -static KToolBar::Dock stringToDock( const TQString& attrPosition ) +static TDEToolBar::Dock stringToDock( const TQString& attrPosition ) { - KToolBar::Dock dock = KToolBar::DockTop; + TDEToolBar::Dock dock = TDEToolBar::DockTop; if ( !attrPosition.isEmpty() ) { if ( attrPosition == "top" ) - dock = KToolBar::DockTop; + dock = TDEToolBar::DockTop; else if ( attrPosition == "left" ) - dock = KToolBar::DockLeft; + dock = TDEToolBar::DockLeft; else if ( attrPosition == "right" ) - dock = KToolBar::DockRight; + dock = TDEToolBar::DockRight; else if ( attrPosition == "bottom" ) - dock = KToolBar::DockBottom; + dock = TDEToolBar::DockBottom; else if ( attrPosition == "floating" ) - dock = KToolBar::DockTornOff; + dock = TDEToolBar::DockTornOff; else if ( attrPosition == "flat" ) - dock = KToolBar::DockMinimized; + dock = TDEToolBar::DockMinimized; } return dock; } -void KToolBar::loadState( const TQDomElement &element ) +void TDEToolBar::loadState( const TQDomElement &element ) { TQMainWindow *mw = mainWindow(); @@ -1834,13 +1834,13 @@ void KToolBar::loadState( const TQDomElement &element ) if ( !attrIconText.isEmpty() ) { //kdDebug(220) << name() << " loadState attrIconText=" << attrIconText << endl; if ( attrIconText == "icontextright" ) - setIconText( KToolBar::IconTextRight ); + setIconText( TDEToolBar::IconTextRight ); else if ( attrIconText == "textonly" ) - setIconText( KToolBar::TextOnly ); + setIconText( TDEToolBar::TextOnly ); else if ( attrIconText == "icontextbottom" ) - setIconText( KToolBar::IconTextBottom ); + setIconText( TDEToolBar::IconTextBottom ); else if ( attrIconText == "icononly" ) - setIconText( KToolBar::IconOnly ); + setIconText( TDEToolBar::IconOnly ); } else { //kdDebug(220) << name() << " loadState no iconText attribute in XML, using iconTextSetting=" << iconTextSetting() << endl; @@ -1889,7 +1889,7 @@ void KToolBar::loadState( const TQDomElement &element ) } } - d->toolBarInfo = KToolBarPrivate::ToolBarInfo( dock, index, newLine, offset ); + d->toolBarInfo = TDEToolBarPrivate::ToolBarInfo( dock, index, newLine, offset ); mw->addDockWindow( this, dock, newLine ); mw->moveDockWindow( this, dock, newLine, index, offset ); @@ -1914,12 +1914,12 @@ void KToolBar::loadState( const TQDomElement &element ) // Apply transparent-toolbar-moving setting (ok, this is global to the mainwindow, // but we do it only if there are toolbars...) - // KDE4: move to KMainWindow + // KDE4: move to TDEMainWindow if ( transparentSetting() != !mw->opaqueMoving() ) mw->setOpaqueMoving( !transparentSetting() ); } -int KToolBar::dockWindowIndex() +int TDEToolBar::dockWindowIndex() { int index = 0; Q_ASSERT( mainWindow() ); @@ -1932,26 +1932,26 @@ int KToolBar::dockWindowIndex() return index; } -void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index ) +void TDEToolBar::getAttributes( TQString &position, TQString &icontext, int &index ) { // get all of the stuff to save switch ( barPos() ) { - case KToolBar::Flat: + case TDEToolBar::Flat: position = "Flat"; break; - case KToolBar::Bottom: + case TDEToolBar::Bottom: position = "Bottom"; break; - case KToolBar::Left: + case TDEToolBar::Left: position = "Left"; break; - case KToolBar::Right: + case TDEToolBar::Right: position = "Right"; break; - case KToolBar::Floating: + case TDEToolBar::Floating: position = "Floating"; break; - case KToolBar::Top: + case TDEToolBar::Top: default: position = "Top"; break; @@ -1960,16 +1960,16 @@ void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index index = dockWindowIndex(); switch (d->m_iconText) { - case KToolBar::IconTextRight: + case TDEToolBar::IconTextRight: icontext = "IconTextRight"; break; - case KToolBar::IconTextBottom: + case TDEToolBar::IconTextBottom: icontext = "IconTextBottom"; break; - case KToolBar::TextOnly: + case TDEToolBar::TextOnly: icontext = "TextOnly"; break; - case KToolBar::IconOnly: + case TDEToolBar::IconOnly: default: icontext = "IconOnly"; break; @@ -1977,7 +1977,7 @@ void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index //kdDebug(220) << name() << " getAttributes: icontext=" << icontext << endl; } -void KToolBar::saveState( TQDomElement ¤t ) +void TDEToolBar::saveState( TQDomElement ¤t ) { Q_ASSERT( !current.isNull() ); TQString position, icontext; @@ -2006,8 +2006,8 @@ void KToolBar::saveState( TQDomElement ¤t ) //kdDebug(220) << name() << " saveState: saving index=" << index << " iconText=" << icontext << " hidden=" << isHidden() << endl; } -// Called by KMainWindow::finalizeGUI -void KToolBar::positionYourself( bool force ) +// Called by TDEMainWindow::finalizeGUI +void TDEToolBar::positionYourself( bool force ) { if (force) d->positioned = false; @@ -2035,16 +2035,16 @@ void KToolBar::positionYourself( bool force ) d->positioned = true; } -KPopupMenu *KToolBar::contextMenu() +TDEPopupMenu *TDEToolBar::contextMenu() { if ( context ) return context; // Construct our context popup menu. Name it qt_dockwidget_internal so it // won't be deleted by TQToolBar::clear(). - context = new KPopupMenu( this, "qt_dockwidget_internal" ); + context = new TDEPopupMenu( this, "qt_dockwidget_internal" ); context->insertTitle(i18n("Toolbar Menu")); - KPopupMenu *orient = new KPopupMenu( context, "orient" ); + TDEPopupMenu *orient = new TDEPopupMenu( context, "orient" ); orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP ); orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT ); orient->insertItem( i18n("toolbar position string","Right"), CONTEXT_RIGHT ); @@ -2053,13 +2053,13 @@ KPopupMenu *KToolBar::contextMenu() orient->insertItem( i18n("toolbar position string","Floating"), CONTEXT_FLOAT ); orient->insertItem( i18n("min toolbar", "Flat"), CONTEXT_FLAT ); - KPopupMenu *mode = new KPopupMenu( context, "mode" ); + TDEPopupMenu *mode = new TDEPopupMenu( context, "mode" ); mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS ); mode->insertItem( i18n("Text Only"), CONTEXT_TEXT ); mode->insertItem( i18n("Text Alongside Icons"), CONTEXT_TEXTRIGHT ); mode->insertItem( i18n("Text Under Icons"), CONTEXT_TEXTUNDER ); - KPopupMenu *size = new KPopupMenu( context, "size" ); + TDEPopupMenu *size = new TDEPopupMenu( context, "size" ); size->insertItem( i18n("Default"), CONTEXT_ICONSIZES ); // Query the current theme for available sizes KIconTheme *theme = TDEGlobal::instance()->iconLoader()->theme(); @@ -2131,24 +2131,24 @@ KPopupMenu *KToolBar::contextMenu() return context; } -void KToolBar::slotContextAboutToShow() +void TDEToolBar::slotContextAboutToShow() { // The idea here is to reuse the "static" part of the menu to save time. // But the "Toolbars" action is dynamic (can be a single action or a submenu) // and ToolBarHandler::setupActions() deletes it, so better not keep it around. // So we currently plug/unplug the last two actions of the menu. // Another way would be to keep around the actions and plug them all into a (new each time) popupmenu. - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) { kmw->setupToolbarMenuActions(); // Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar) - KAction *tbAction = kmw->toolBarMenuAction(); + TDEAction *tbAction = kmw->toolBarMenuAction(); if ( tbAction && tbAction->containerCount() > 0 ) tbAction->plug(context); } // try to find "configure toolbars" action - KAction *configureAction = 0; + TDEAction *configureAction = 0; const char* actionName = KStdAction::name(KStdAction::ConfigureToolbars); if ( d->m_xmlguiClient ) configureAction = d->m_xmlguiClient->actionCollection()->action(actionName); @@ -2192,39 +2192,39 @@ void KToolBar::slotContextAboutToShow() switch ( barPos() ) { - case KToolBar::Flat: + case TDEToolBar::Flat: context->setItemChecked( CONTEXT_FLAT, true ); break; - case KToolBar::Bottom: + case TDEToolBar::Bottom: context->setItemChecked( CONTEXT_BOTTOM, true ); break; - case KToolBar::Left: + case TDEToolBar::Left: context->setItemChecked( CONTEXT_LEFT, true ); break; - case KToolBar::Right: + case TDEToolBar::Right: context->setItemChecked( CONTEXT_RIGHT, true ); break; - case KToolBar::Floating: + case TDEToolBar::Floating: context->setItemChecked( CONTEXT_FLOAT, true ); break; - case KToolBar::Top: + case TDEToolBar::Top: context->setItemChecked( CONTEXT_TOP, true ); break; default: break; } } -void KToolBar::slotContextAboutToHide() +void TDEToolBar::slotContextAboutToHide() { // We have to unplug whatever slotContextAboutToShow plugged into the menu. // Unplug the toolbar menu action - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw && kmw->toolBarMenuAction() ) if ( kmw->toolBarMenuAction()->containerCount() > 1 ) kmw->toolBarMenuAction()->unplug(context); // Unplug the configure toolbars action too, since it's afterwards anyway - KAction *configureAction = 0; + TDEAction *configureAction = 0; const char* actionName = KStdAction::name(KStdAction::ConfigureToolbars); if ( d->m_xmlguiClient ) configureAction = d->m_xmlguiClient->actionCollection()->action(actionName); @@ -2242,12 +2242,12 @@ void KToolBar::slotContextAboutToHide() } } -void KToolBar::widgetDestroyed() +void TDEToolBar::widgetDestroyed() { removeWidgetInternal( (TQWidget*)sender() ); } -void KToolBar::removeWidgetInternal( TQWidget * w ) +void TDEToolBar::removeWidgetInternal( TQWidget * w ) { widgets.removeRef( w ); TQMap< TQWidget*, int >::Iterator it = widget2id.find( w ); @@ -2257,7 +2257,7 @@ void KToolBar::removeWidgetInternal( TQWidget * w ) widget2id.remove( it ); } -void KToolBar::virtual_hook( int, void* ) +void TDEToolBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "ktoolbar.moc" diff --git a/tdeui/ktoolbar.h b/tdeui/ktoolbar.h index 2a86b0687..43362f512 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/ktoolbar.h @@ -44,23 +44,23 @@ class TQDomDocument; class TQTimer; class KLineEdit; -class KToolBar; -class KToolBarButton; -class KToolBoxManager; +class TDEToolBar; +class TDEToolBarButton; +class TDEToolBoxManager; class KAnimWidget; -class KPopupMenu; +class TDEPopupMenu; class TDEInstance; class KComboBox; class KXMLGUIClient; -class KToolBarPrivate; +class TDEToolBarPrivate; -class TDEUI_EXPORT KToolBarSeparator : public TQFrame +class TDEUI_EXPORT TDEToolBarSeparator : public TQFrame { Q_OBJECT public: - KToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); + TDEToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); TQSize sizeHint() const; Orientation orientation() const { return orient; } @@ -82,26 +82,26 @@ private: * * A KDE-style toolbar. * - * KToolBar can be dragged around in and between different docks. + * TDEToolBar can be dragged around in and between different docks. * - * A KToolBar can contain all sorts of widgets. + * A TDEToolBar can contain all sorts of widgets. * - * KToolBar can be used as a standalone widget, but KMainWindow + * TDEToolBar can be used as a standalone widget, but TDEMainWindow * provides easy factories and management of one or more toolbars. - * Once you have a KToolBar object, you can insert items into it with the + * Once you have a TDEToolBar object, you can insert items into it with the * insert... methods, or remove them with the removeItem() method. This * can be done at any time; the toolbar will be automatically updated. * There are also many methods to set per-child properties like alignment * and toggle behavior. * - * KToolBar uses a global config group to load toolbar settings on + * TDEToolBar uses a global config group to load toolbar settings on * construction. It will reread this config group on a * TDEApplication::appearanceChanged() signal. * * @author Reginald Stadlbauer , Stephan Kulow , Sven Radej . */ -class TDEUI_EXPORT KToolBar : public TQToolBar +class TDEUI_EXPORT TDEToolBar : public TQToolBar { Q_OBJECT @@ -136,12 +136,12 @@ public: * true. All other toolbars will be IconOnly and use Medium icons. * * @param parent The standard toolbar parent (usually a - * KMainWindow) + * TDEMainWindow) * @param name The standard internal name * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true ); + TDEToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** * Constructor for non-XML-GUI applications. @@ -158,7 +158,7 @@ public: * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false, + TDEToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** @@ -176,20 +176,20 @@ public: * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false, + TDEToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** * Destructor */ - virtual ~KToolBar(); + virtual ~TDEToolBar(); /** - * Insert a button (a KToolBarButton) with a pixmap. The + * Insert a button (a TDEToolBarButton) with a pixmap. The * pixmap is loaded by the button itself based on the global icon * settings. * - * You should connect to one or more signals in KToolBar: + * You should connect to one or more signals in TDEToolBar: * clicked() , pressed() , released() , or * highlighted() and if the button is a toggle button * ( setToggle() ) toggled() . Those signals have @p id @@ -233,7 +233,7 @@ public: int index=-1, TDEInstance *_instance = TDEGlobal::instance() ); /** - * Inserts a button (a KToolBarButton) with the specified + * Inserts a button (a TDEToolBarButton) with the specified * pixmap. This pixmap will be used as the "active" one and the * disabled and default ones will be autogenerated. * @@ -241,7 +241,7 @@ public: * allows you to specify the icon name rather then the pixmap * itself. Specifying the icon name is much more flexible. * - * You should connect to one or more signals in KToolBar: + * You should connect to one or more signals in TDEToolBar: * clicked() , pressed() , released() , or * highlighted() and if the button is a toggle button * ( setToggle() ) toggled() . Those signals have @p id @@ -602,12 +602,12 @@ public: KComboBox * getCombo(int id); /** - * Returns a pointer to KToolBarLined with @p id. - * @return a pointer to KToolBarLined with @p id. + * Returns a pointer to TDEToolBarLined with @p id. + * @return a pointer to TDEToolBarLined with @p id. * * Example: * \code - * KLineEdit * lined = toolbar->getKToolBarLined(lined_id); + * KLineEdit * lined = toolbar->getTDEToolBarLined(lined_id); * \endcode * That way you can get access to other public methods * that KLineEdit provides. KLineEdit is the same thing @@ -616,18 +616,18 @@ public: KLineEdit * getLined (int id); /** - * Returns a pointer to KToolBarButton. + * Returns a pointer to TDEToolBarButton. * * Example: * \code - * KToolBarButton * button = toolbar->getButton(button_id); + * TDEToolBarButton * button = toolbar->getButton(button_id); * \endcode * That way you can get access to other public methods - * that KToolBarButton provides. + * that TDEToolBarButton provides. * * Using this method is not recommended. */ - KToolBarButton * getButton (int id); + TDEToolBarButton * getButton (int id); /** * Align item to the right. @@ -900,7 +900,7 @@ public: * precedence). */ void saveState(); // BIC: remove for KDE4? This doesn't appear to be used internally, - // and apps use saveMainWindowSettings in KMainWindow anyway. + // and apps use saveMainWindowSettings in TDEMainWindow anyway. /** * Save the toolbar settings to group @p configGroup in @p config. @@ -1036,8 +1036,8 @@ signals: * Emitted when toolbar changes position, or when * an item is removed from toolbar. * - * If you subclass KMainWindow and reimplement - * KMainWindow::resizeEvent() be sure to connect to + * If you subclass TDEMainWindow and reimplement + * TDEMainWindow::resizeEvent() be sure to connect to * this signal. Note: You can connect this signal to a slot that * doesn't take parameter. */ @@ -1054,7 +1054,7 @@ signals: /** * This signal is emitted when the toolbar is getting deleted, - * and before ~KToolbar finishes (so it's still time to remove + * and before ~TDEToolbar finishes (so it's still time to remove * widgets from the toolbar). * Used by KWidgetAction. * @since 3.2 @@ -1106,25 +1106,25 @@ private slots: private: void init( bool readConfig = true, bool honorStyle = false ); - void doConnections( KToolBarButton *button ); + void doConnections( TDEToolBarButton *button ); void insertWidgetInternal( TQWidget *w, int &index, int id ); void removeWidgetInternal( TQWidget *w ); void getAttributes( TQString &position, TQString &icontext, int &index ); int dockWindowIndex(); - KPopupMenu *contextMenu(); + TDEPopupMenu *contextMenu(); void doModeChange(); TQMap widget2id; typedef TQMap Id2WidgetMap; Id2WidgetMap id2widget; - KPopupMenu *context; + TDEPopupMenu *context; TQPtrList widgets; TQTimer *layoutTimer; TQGuardedPtr stretchableWidget, rightAligned; protected: virtual void virtual_hook( int id, void* data ); private: - KToolBarPrivate *d; + TDEToolBarPrivate *d; }; #endif diff --git a/tdeui/ktoolbarbutton.cpp b/tdeui/ktoolbarbutton.cpp index 5a4240f04..49ceb57fa 100644 --- a/tdeui/ktoolbarbutton.cpp +++ b/tdeui/ktoolbarbutton.cpp @@ -48,12 +48,12 @@ // needed to get our instance #include -template class TQIntDict; +template class TQIntDict; -class KToolBarButtonPrivate +class TDEToolBarButtonPrivate { public: - KToolBarButtonPrivate() + TDEToolBarButtonPrivate() { m_buttonDown = false; @@ -65,13 +65,13 @@ public: m_isActive = false; m_iconName = TQString::null; - m_iconText = KToolBar::IconOnly; + m_iconText = TDEToolBar::IconOnly; m_iconSize = 0; m_parent = 0; m_instance = TDEGlobal::instance(); } - ~KToolBarButtonPrivate() + ~TDEToolBarButtonPrivate() { } @@ -86,8 +86,8 @@ public: TQString m_iconName; - KToolBar *m_parent; - KToolBar::IconText m_iconText; + TDEToolBar *m_parent; + TDEToolBar::IconText m_iconText; int m_iconSize; TQSize size; @@ -97,28 +97,28 @@ public: }; // This will construct a separator -KToolBarButton::KToolBarButton( TQWidget *_parent, const char *_name ) +TDEToolBarButton::TDEToolBarButton( TQWidget *_parent, const char *_name ) : TQToolButton( _parent , _name) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; resize(6,6); hide(); d->m_isSeparator = true; } -KToolBarButton::KToolBarButton( const TQString& _icon, int _id, +TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id, TQWidget *_parent, const char *_name, const TQString &_txt, TDEInstance *_instance ) : TQToolButton( _parent, _name ), d( 0 ) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; d->m_id = _id; TQToolButton::setTextLabel(_txt); d->m_instance = _instance; - d->m_parent = tqt_dynamic_cast(_parent); + d->m_parent = tqt_dynamic_cast(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -141,17 +141,17 @@ KToolBarButton::KToolBarButton( const TQString& _icon, int _id, modeChange(); } -KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id, +TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id, TQWidget *_parent, const char *name, const TQString& txt) : TQToolButton( _parent, name ), d( 0 ) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; d->m_id = _id; TQToolButton::setTextLabel(txt); - d->m_parent = tqt_dynamic_cast(_parent); + d->m_parent = tqt_dynamic_cast(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -173,12 +173,12 @@ KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id, modeChange(); } -KToolBarButton::~KToolBarButton() +TDEToolBarButton::~TDEToolBarButton() { delete d; d = 0; } -void KToolBarButton::modeChange() +void TDEToolBarButton::modeChange() { TQSize mysize; @@ -206,7 +206,7 @@ void KToolBarButton::modeChange() int text_width = 0; TQToolTip::remove(this); - if (d->m_iconText != KToolBar::IconOnly) + if (d->m_iconText != TDEToolBar::IconOnly) { // okay, we have to deal with fonts. let's get our information now TQFont tmp_font = TDEGlobalSettings::toolBarFont(); @@ -226,19 +226,19 @@ void KToolBarButton::modeChange() switch (d->m_iconText) { - case KToolBar::IconOnly: + case TDEToolBar::IconOnly: mysize = TQSize(pix_width, pix_height); break; - case KToolBar::IconTextRight: + case TDEToolBar::IconTextRight: mysize = TQSize(pix_width + text_width + 4, pix_height); break; - case KToolBar::TextOnly: + case TDEToolBar::TextOnly: mysize = TQSize(text_width + 4, text_height); break; - case KToolBar::IconTextBottom: + case TDEToolBar::IconTextBottom: mysize = TQSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height); break; @@ -257,7 +257,7 @@ void KToolBarButton::modeChange() updateGeometry(); } -void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) +void TDEToolBarButton::setTextLabel( const TQString& text, bool tipToo) { if (text.isNull()) return; @@ -270,13 +270,13 @@ void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) update(); } -void KToolBarButton::setText( const TQString& text) +void TDEToolBarButton::setText( const TQString& text) { setTextLabel(text, true); modeChange(); } -void KToolBarButton::setIcon( const TQString &icon ) +void TDEToolBarButton::setIcon( const TQString &icon ) { d->m_iconName = icon; if (d->m_parent) @@ -290,13 +290,13 @@ void KToolBarButton::setIcon( const TQString &icon ) d->m_iconName, KIcon::Toolbar, d->m_iconSize )); } -void KToolBarButton::setIconSet( const TQIconSet &iconset ) +void TDEToolBarButton::setIconSet( const TQIconSet &iconset ) { TQToolButton::setIconSet( iconset ); } // remove? -void KToolBarButton::setPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setPixmap( const TQPixmap &pixmap ) { if( pixmap.isNull()) // called by TQToolButton { @@ -308,21 +308,21 @@ void KToolBarButton::setPixmap( const TQPixmap &pixmap ) TQToolButton::setIconSet( set ); } -void KToolBarButton::setDefaultPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setDefaultPixmap( const TQPixmap &pixmap ) { TQIconSet set = iconSet(); set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Normal ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) { TQIconSet set = iconSet(); set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Disabled ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDefaultIcon( const TQString& icon ) +void TDEToolBarButton::setDefaultIcon( const TQString& icon ) { TQIconSet set = iconSet(); TQPixmap pm; @@ -336,7 +336,7 @@ void KToolBarButton::setDefaultIcon( const TQString& icon ) TQToolButton::setIconSet( set ); } -void KToolBarButton::setDisabledIcon( const TQString& icon ) +void TDEToolBarButton::setDisabledIcon( const TQString& icon ) { TQIconSet set = iconSet(); TQPixmap pm; @@ -350,27 +350,27 @@ void KToolBarButton::setDisabledIcon( const TQString& icon ) TQToolButton::setIconSet( set ); } -TQPopupMenu *KToolBarButton::popup() +TQPopupMenu *TDEToolBarButton::popup() { // obsolete // KDE4: remove me return TQToolButton::popup(); } -void KToolBarButton::setPopup(TQPopupMenu *p, bool) +void TDEToolBarButton::setPopup(TQPopupMenu *p, bool) { TQToolButton::setPopup(p); TQToolButton::setPopupDelay(-1); } -void KToolBarButton::setDelayedPopup (TQPopupMenu *p, bool) +void TDEToolBarButton::setDelayedPopup (TQPopupMenu *p, bool) { TQToolButton::setPopup(p); TQToolButton::setPopupDelay(TQApplication::startDragTime()); } -void KToolBarButton::leaveEvent(TQEvent *) +void TDEToolBarButton::leaveEvent(TQEvent *) { if( d->m_isRaised || d->m_isActive ) { @@ -382,7 +382,7 @@ void KToolBarButton::leaveEvent(TQEvent *) emit highlighted(d->m_id, false); } -void KToolBarButton::enterEvent(TQEvent *) +void TDEToolBarButton::enterEvent(TQEvent *) { if (d->m_highlight) { @@ -403,7 +403,7 @@ void KToolBarButton::enterEvent(TQEvent *) emit highlighted(d->m_id, true); } -bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) +bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) { @@ -446,7 +446,7 @@ bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) return TQToolButton::eventFilter(o, ev); } -void KToolBarButton::mousePressEvent( TQMouseEvent * e ) +void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) { d->m_buttonDown = true; @@ -460,7 +460,7 @@ void KToolBarButton::mousePressEvent( TQMouseEvent * e ) TQToolButton::mousePressEvent(e); } -void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) +void TDEToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) { TQt::ButtonState state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); if ( e->button() == Qt::MidButton ) @@ -479,7 +479,7 @@ void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) emit buttonClicked( d->m_id, state ); } -void KToolBarButton::drawButton( TQPainter *_painter ) +void TDEToolBarButton::drawButton( TQPainter *_painter ) { TQStyle::SFlags flags = TQStyle::Style_Default; TQStyle::SCFlags active = TQStyle::SC_None; @@ -503,7 +503,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) TQRect textRect; int textFlags = 0; - if (d->m_iconText == KToolBar::IconOnly) // icon only + if (d->m_iconText == TDEToolBar::IconOnly) // icon only { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -521,7 +521,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) _painter->drawPixmap( dx, dy, pixmap ); } } - else if (d->m_iconText == KToolBar::IconTextRight) // icon and text (if any) + else if (d->m_iconText == TDEToolBar::IconTextRight) // icon and text (if any) { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -555,7 +555,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textRect = TQRect(dx, dy, width()-dx, height()); } } - else if (d->m_iconText == KToolBar::TextOnly) + else if (d->m_iconText == TDEToolBar::TextOnly) { if (!textLabel().isNull()) { @@ -570,7 +570,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() ); } } - else if (d->m_iconText == KToolBar::IconTextBottom) + else if (d->m_iconText == TDEToolBar::IconTextBottom) { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -629,7 +629,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) } } -void KToolBarButton::paletteChange(const TQPalette &) +void TDEToolBarButton::paletteChange(const TQPalette &) { if(!d->m_isSeparator) { @@ -638,12 +638,12 @@ void KToolBarButton::paletteChange(const TQPalette &) } } -bool KToolBarButton::event(TQEvent *e) +bool TDEToolBarButton::event(TQEvent *e) { if (e->type() == TQEvent::ParentFontChange || e->type() == TQEvent::ApplicationFontChange) { //If we use toolbar text, apply the settings again, to relayout... - if (d->m_iconText != KToolBar::IconOnly) + if (d->m_iconText != TDEToolBar::IconOnly) modeChange(); return true; } @@ -652,19 +652,19 @@ bool KToolBarButton::event(TQEvent *e) } -void KToolBarButton::showMenu() +void TDEToolBarButton::showMenu() { // obsolete // KDE4: remove me } -void KToolBarButton::slotDelayTimeout() +void TDEToolBarButton::slotDelayTimeout() { // obsolete // KDE4: remove me } -void KToolBarButton::slotClicked() +void TDEToolBarButton::slotClicked() { emit clicked( d->m_id ); @@ -677,37 +677,37 @@ void KToolBarButton::slotClicked() } } -void KToolBarButton::slotPressed() +void TDEToolBarButton::slotPressed() { emit pressed( d->m_id ); } -void KToolBarButton::slotReleased() +void TDEToolBarButton::slotReleased() { emit released( d->m_id ); } -void KToolBarButton::slotToggled() +void TDEToolBarButton::slotToggled() { emit toggled( d->m_id ); } -void KToolBarButton::setNoStyle(bool no_style) +void TDEToolBarButton::setNoStyle(bool no_style) { d->m_noStyle = no_style; modeChange(); - d->m_iconText = KToolBar::IconTextRight; + d->m_iconText = TDEToolBar::IconTextRight; repaint(false); } -void KToolBarButton::setRadio (bool f) +void TDEToolBarButton::setRadio (bool f) { if ( d ) d->m_isRadio = f; } -void KToolBarButton::on(bool flag) +void TDEToolBarButton::on(bool flag) { if(isToggleButton()) setOn(flag); @@ -719,13 +719,13 @@ void KToolBarButton::on(bool flag) repaint(); } -void KToolBarButton::toggle() +void TDEToolBarButton::toggle() { setOn(!isOn()); repaint(); } -void KToolBarButton::setToggle(bool flag) +void TDEToolBarButton::setToggle(bool flag) { setToggleButton(flag); if (flag) @@ -734,48 +734,48 @@ void KToolBarButton::setToggle(bool flag) disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); } -TQSize KToolBarButton::sizeHint() const +TQSize TDEToolBarButton::sizeHint() const { return d->size; } -TQSize KToolBarButton::minimumSizeHint() const +TQSize TDEToolBarButton::minimumSizeHint() const { return d->size; } -TQSize KToolBarButton::minimumSize() const +TQSize TDEToolBarButton::minimumSize() const { return d->size; } -bool KToolBarButton::isRaised() const +bool TDEToolBarButton::isRaised() const { return d->m_isRaised; } -bool KToolBarButton::isActive() const +bool TDEToolBarButton::isActive() const { return d->m_isActive; } -int KToolBarButton::iconTextMode() const +int TDEToolBarButton::iconTextMode() const { return static_cast( d->m_iconText ); } -int KToolBarButton::id() const +int TDEToolBarButton::id() const { return d->m_id; } -// KToolBarButtonList -KToolBarButtonList::KToolBarButtonList() +// TDEToolBarButtonList +TDEToolBarButtonList::TDEToolBarButtonList() { setAutoDelete(false); } -void KToolBarButton::virtual_hook( int, void* ) +void TDEToolBarButton::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "ktoolbarbutton.moc" diff --git a/tdeui/ktoolbarbutton.h b/tdeui/ktoolbarbutton.h index 126f8923a..49e906e6e 100644 --- a/tdeui/ktoolbarbutton.h +++ b/tdeui/ktoolbarbutton.h @@ -29,19 +29,19 @@ #include #include -class KToolBar; -class KToolBarButtonPrivate; +class TDEToolBar; +class TDEToolBarButtonPrivate; class TDEInstance; class TQEvent; class TQPopupMenu; class TQPainter; /** - * A toolbar button. This is used internally by KToolBar, use the - * KToolBar methods instead. + * A toolbar button. This is used internally by TDEToolBar, use the + * TDEToolBar methods instead. * @internal */ -class TDEUI_EXPORT KToolBarButton : public TQToolButton +class TDEUI_EXPORT TDEToolBarButton : public TQToolButton { Q_OBJECT @@ -59,7 +59,7 @@ public: * @param txt This button's text (in a tooltip or otherwise) * @param _instance the instance to use for this button */ - KToolBarButton(const TQString& icon, int id, TQWidget *parent, + TDEToolBarButton(const TQString& icon, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null, TDEInstance *_instance = TDEGlobal::instance()); @@ -74,7 +74,7 @@ public: * @param name This button's internal name * @param txt This button's text (in a tooltip or otherwise) */ - KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent, + TDEToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null); /** @@ -83,12 +83,12 @@ public: * @param parent This button's parent * @param name This button's internal name */ - KToolBarButton(TQWidget *parent=0L, const char *name=0L); + TDEToolBarButton(TQWidget *parent=0L, const char *name=0L); /** * Standard destructor */ - ~KToolBarButton(); + ~TDEToolBarButton(); #ifndef KDE_NO_COMPAT /** @@ -313,19 +313,19 @@ protected slots: protected: virtual void virtual_hook( int id, void* data ); private: - KToolBarButtonPrivate *d; + TDEToolBarButtonPrivate *d; }; /** -* List of KToolBarButton objects. +* List of TDEToolBarButton objects. * @internal * @version $Id$ */ -class TDEUI_EXPORT KToolBarButtonList : public TQIntDict +class TDEUI_EXPORT TDEToolBarButtonList : public TQIntDict { public: - KToolBarButtonList(); - ~KToolBarButtonList() {} + TDEToolBarButtonList(); + ~TDEToolBarButtonList() {} }; #endif diff --git a/tdeui/ktoolbarhandler.cpp b/tdeui/ktoolbarhandler.cpp index bdeba7281..1d08565d7 100644 --- a/tdeui/ktoolbarhandler.cpp +++ b/tdeui/ktoolbarhandler.cpp @@ -44,14 +44,14 @@ namespace class BarActionBuilder { public: - BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, TQPtrList &oldToolBarList ) + BarActionBuilder( TDEActionCollection *actionCollection, TDEMainWindow *mainWindow, TQPtrList &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) { TQPtrList dockWindows = m_mainWindow->dockWindows(); TQPtrListIterator dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { - KToolBar *toolBar = tqt_dynamic_cast( dockWindowIt.current() ); + TDEToolBar *toolBar = tqt_dynamic_cast( dockWindowIt.current() ); if ( !toolBar ) continue; @@ -67,30 +67,30 @@ namespace bool needsRebuild() const { return m_needsRebuild; } - TQPtrList create() + TQPtrList create() { if ( !m_needsRebuild ) - return TQPtrList(); + return TQPtrList(); - TQPtrListIterator toolBarIt( m_toolBars ); + TQPtrListIterator toolBarIt( m_toolBars ); for ( ; toolBarIt.current(); ++toolBarIt ) handleToolBar( toolBarIt.current() ); - TQPtrList actions; + TQPtrList actions; if ( m_toolBarActions.count() == 0 ) return actions; if ( m_toolBarActions.count() == 1 ) { - KToggleToolBarAction* action = static_cast( m_toolBarActions.getFirst() ); + TDEToggleToolBarAction* action = static_cast( m_toolBarActions.getFirst() ); action->setText( i18n( "Show Toolbar" ) ); action->setCheckedState( i18n( "Hide Toolbar" ) ); return m_toolBarActions; } - KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); + TDEActionMenu *menuAction = new TDEActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); - TQPtrListIterator actionIt( m_toolBarActions ); + TQPtrListIterator actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) menuAction->insert( actionIt.current() ); @@ -98,12 +98,12 @@ namespace return actions; } - const TQPtrList &toolBars() const { return m_toolBars; } + const TQPtrList &toolBars() const { return m_toolBars; } private: - void handleToolBar( KToolBar *toolBar ) + void handleToolBar( TDEToolBar *toolBar ) { - KToggleToolBarAction *action = new KToggleToolBarAction( + TDEToggleToolBarAction *action = new TDEToggleToolBarAction( toolBar, toolBar->label(), m_actionCollection, @@ -112,11 +112,11 @@ namespace m_toolBarActions.append( action ); } - KActionCollection *m_actionCollection; - KMainWindow *m_mainWindow; + TDEActionCollection *m_actionCollection; + TDEMainWindow *m_mainWindow; - TQPtrList m_toolBars; - TQPtrList m_toolBarActions; + TQPtrList m_toolBars; + TQPtrList m_toolBarActions; bool m_needsRebuild : 1; }; @@ -124,13 +124,13 @@ namespace using namespace KDEPrivate; -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, const char *name ) +ToolBarHandler::ToolBarHandler( TDEMainWindow *mainWindow, const char *name ) : TQObject( mainWindow, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); } -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name ) +ToolBarHandler::ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name ) : TQObject( parent, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); @@ -142,7 +142,7 @@ ToolBarHandler::~ToolBarHandler() m_actions.clear(); } -KAction *ToolBarHandler::toolBarMenuAction() +TDEAction *ToolBarHandler::toolBarMenuAction() { assert( m_actions.count() == 1 ); return m_actions.getFirst(); @@ -167,7 +167,7 @@ void ToolBarHandler::setupActions() m_actions = builder.create(); /* - for ( TQPtrListIterator toolBarIt( m_toolBars ); + for ( TQPtrListIterator toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) toolBarIt.current()->disconnect( this ); */ @@ -175,13 +175,13 @@ void ToolBarHandler::setupActions() m_toolBars = builder.toolBars(); /* - for ( TQPtrListIterator toolBarIt( m_toolBars ); + for ( TQPtrListIterator toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ), this, TQT_SLOT( setupActions() ) ); */ - if (kapp && kapp->authorizeKAction("options_show_toolbar")) + if (kapp && kapp->authorizeTDEAction("options_show_toolbar")) plugActionList( actionListName, m_actions ); connectToActionContainers(); @@ -193,7 +193,7 @@ void ToolBarHandler::clientAdded( KXMLGUIClient *client ) setupActions(); } -void ToolBarHandler::init( KMainWindow *mainWindow ) +void ToolBarHandler::init( TDEMainWindow *mainWindow ) { d = 0; m_mainWindow = mainWindow; @@ -218,12 +218,12 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) void ToolBarHandler::connectToActionContainers() { - TQPtrListIterator actionIt( m_actions ); + TQPtrListIterator actionIt( m_actions ); for ( ; actionIt.current(); ++actionIt ) connectToActionContainer( actionIt.current() ); } -void ToolBarHandler::connectToActionContainer( KAction *action ) +void ToolBarHandler::connectToActionContainer( TDEAction *action ) { uint containerCount = action->containerCount(); for ( uint i = 0; i < containerCount; ++i ) diff --git a/tdeui/ktoolbarhandler.h b/tdeui/ktoolbarhandler.h index e6336967f..729129a67 100644 --- a/tdeui/ktoolbarhandler.h +++ b/tdeui/ktoolbarhandler.h @@ -23,8 +23,8 @@ #include #include -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; namespace KDEPrivate { @@ -35,11 +35,11 @@ class ToolBarHandler : public TQObject, { Q_OBJECT public: - ToolBarHandler( KMainWindow *mainWindow, const char *name = 0 ); - ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); + ToolBarHandler( TDEMainWindow *mainWindow, const char *name = 0 ); + ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); virtual ~ToolBarHandler(); - KAction *toolBarMenuAction(); + TDEAction *toolBarMenuAction(); public slots: void setupActions(); @@ -48,17 +48,17 @@ private slots: void clientAdded( KXMLGUIClient *client ); private: - void init( KMainWindow *mainWindow ); + void init( TDEMainWindow *mainWindow ); void connectToActionContainers(); - void connectToActionContainer( KAction *action ); + void connectToActionContainer( TDEAction *action ); void connectToActionContainer( TQWidget *container ); struct Data; Data *d; - TQGuardedPtr m_mainWindow; - TQPtrList m_actions; - TQPtrList m_toolBars; + TQGuardedPtr m_mainWindow; + TQPtrList m_actions; + TQPtrList m_toolBars; }; } // namespace KDEPrivate diff --git a/tdeui/ktoolbarlabelaction.cpp b/tdeui/ktoolbarlabelaction.cpp index b86906e57..1716a64e8 100644 --- a/tdeui/ktoolbarlabelaction.cpp +++ b/tdeui/ktoolbarlabelaction.cpp @@ -21,10 +21,10 @@ #include #include -class KToolBarLabelAction::KToolBarLabelActionPrivate +class TDEToolBarLabelAction::TDEToolBarLabelActionPrivate { public: - KToolBarLabelActionPrivate() + TDEToolBarLabelActionPrivate() : m_label(0) { } @@ -32,53 +32,53 @@ public: }; -KToolBarLabelAction::KToolBarLabelAction(const TQString &text, - const KShortcut &cut, +TDEToolBarLabelAction::TDEToolBarLabelAction(const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name) : KWidgetAction(new TQLabel(text, 0, "kde toolbar widget"), text, cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { init(); } -KToolBarLabelAction::KToolBarLabelAction(TQWidget* buddy, +TDEToolBarLabelAction::TDEToolBarLabelAction(TQWidget* buddy, const TQString &text, - const KShortcut &cut, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name) : KWidgetAction(new TQLabel(buddy, text, 0, "kde toolbar widget"), text, cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { init(); } -KToolBarLabelAction::KToolBarLabelAction(TQLabel* label, - const KShortcut &cut, +TDEToolBarLabelAction::TDEToolBarLabelAction(TQLabel* label, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name) : KWidgetAction(label, label->text(), cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name()); init(); } -KToolBarLabelAction::~KToolBarLabelAction() +TDEToolBarLabelAction::~TDEToolBarLabelAction() { delete d; d = 0; } -void KToolBarLabelAction::init() +void TDEToolBarLabelAction::init() { d->m_label = static_cast(widget()); /* these lines were copied from Konqueror's KonqDraggableLabel class in @@ -90,28 +90,28 @@ void KToolBarLabelAction::init() d->m_label->adjustSize(); } -void KToolBarLabelAction::setText(const TQString& text) +void TDEToolBarLabelAction::setText(const TQString& text) { KWidgetAction::setText(text); d->m_label->setText(text); } -void KToolBarLabelAction::setBuddy(TQWidget* buddy) +void TDEToolBarLabelAction::setBuddy(TQWidget* buddy) { d->m_label->setBuddy(buddy); } -TQWidget* KToolBarLabelAction::buddy() const +TQWidget* TDEToolBarLabelAction::buddy() const { return d->m_label->buddy(); } -TQLabel* KToolBarLabelAction::label() const +TQLabel* TDEToolBarLabelAction::label() const { return d->m_label; } -void KToolBarLabelAction::virtual_hook(int, void*) +void TDEToolBarLabelAction::virtual_hook(int, void*) { } diff --git a/tdeui/ktoolbarlabelaction.h b/tdeui/ktoolbarlabelaction.h index 2cf7c99be..02b1cd28c 100644 --- a/tdeui/ktoolbarlabelaction.h +++ b/tdeui/ktoolbarlabelaction.h @@ -25,7 +25,7 @@ class TQLabel; /** * @short Class to display a label in a toolbar. * - * KToolBarLabelAction is a convenience class for displaying a label in a + * TDEToolBarLabelAction is a convenience class for displaying a label in a * toolbar. * * It provides easy access to the label's #setBuddy(TQWidget*) and #buddy() @@ -38,7 +38,7 @@ class TQLabel; * = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this, * TQT_SLOT(slotFocus()), actionCollection(), "find_combo"); * - * new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, + * new TDEToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, * TQT_SLOT(slotFocus()), actionCollection(), * "find_label"); * @@ -46,7 +46,7 @@ class TQLabel; * * @author Felix Berger */ -class TDEUI_EXPORT KToolBarLabelAction : public KWidgetAction +class TDEUI_EXPORT TDEToolBarLabelAction : public KWidgetAction { public: /** @@ -59,10 +59,10 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(const TQString &text, - const KShortcut &cut, + TDEToolBarLabelAction(const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + TDEActionCollection *parent, const char *name); /** * Constructs a toolbar label setting a buddy for the label. * @@ -75,10 +75,10 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(TQWidget* buddy, const TQString &text, - const KShortcut &cut, + TDEToolBarLabelAction(TQWidget* buddy, const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + TDEActionCollection *parent, const char *name); /** * Constructs a toolbar label for a label. * @@ -98,11 +98,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(TQLabel* label, const KShortcut &cut, + TDEToolBarLabelAction(TQLabel* label, const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection* parent, const char *name); + TDEActionCollection* parent, const char *name); - virtual ~KToolBarLabelAction(); + virtual ~TDEToolBarLabelAction(); /** * Reimplemented to update both the action's text and the label's text. */ @@ -128,8 +128,8 @@ protected: virtual void virtual_hook(int id, void* data); private: - class KToolBarLabelActionPrivate; - KToolBarLabelActionPrivate *d; + class TDEToolBarLabelActionPrivate; + TDEToolBarLabelActionPrivate *d; void init(); }; diff --git a/tdeui/ktoolbarradiogroup.cpp b/tdeui/ktoolbarradiogroup.cpp index ab8e50e08..7526158b9 100644 --- a/tdeui/ktoolbarradiogroup.cpp +++ b/tdeui/ktoolbarradiogroup.cpp @@ -27,31 +27,31 @@ #include "ktoolbarbutton.h" /************************************************************************* - * KToolBarRadioGroup * + * TDEToolBarRadioGroup * *************************************************************************/ -KToolBarRadioGroup::KToolBarRadioGroup (KToolBar *_parent, const char *_name) +TDEToolBarRadioGroup::TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_name) : TQObject(_parent, _name) { - buttons = new KToolBarButtonList(); + buttons = new TDEToolBarButtonList(); tb = _parent; connect (tb, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int))); } -KToolBarRadioGroup::~KToolBarRadioGroup() +TDEToolBarRadioGroup::~TDEToolBarRadioGroup() { delete buttons; } -void KToolBarRadioGroup::addButton (int id) +void TDEToolBarRadioGroup::addButton (int id) { - KToolBarButton *b = tb->getButton( id ); + TDEToolBarButton *b = tb->getButton( id ); b->setRadio( true ); buttons->insert( id, b ); } -void KToolBarRadioGroup::removeButton (int id) +void TDEToolBarRadioGroup::removeButton (int id) { if (!buttons->find(id)) return; @@ -59,11 +59,11 @@ void KToolBarRadioGroup::removeButton (int id) buttons->remove(id); } -void KToolBarRadioGroup::slotToggled(int id) +void TDEToolBarRadioGroup::slotToggled(int id) { if (buttons->find(id) && buttons->find(id)->isOn()) { - TQIntDictIterator it(*buttons); + TQIntDictIterator it(*buttons); while (it.current()) { if (it.currentKey() != id) diff --git a/tdeui/ktoolbarradiogroup.h b/tdeui/ktoolbarradiogroup.h index 6b2cc5140..de567ae62 100644 --- a/tdeui/ktoolbarradiogroup.h +++ b/tdeui/ktoolbarradiogroup.h @@ -26,19 +26,19 @@ #include -class KToolBar; -class KToolBarButtonList; -class KToolBarRadioGroupPrivate; +class TDEToolBar; +class TDEToolBarButtonList; +class TDEToolBarRadioGroupPrivate; /************************************************************************* - * KToolBarRadioGroup * + * TDEToolBarRadioGroup * *************************************************************************/ /** * @short Class for group of radio butons in toolbar. * - * KToolBarRadioGroup is class for group of radio butons in toolbar. + * TDEToolBarRadioGroup is class for group of radio butons in toolbar. * Take toggle buttons which you already inserted into toolbar, - * create KToolBarRadioGroup instance and add them here. + * create TDEToolBarRadioGroup instance and add them here. * All buttons will emit signals toggled (bool) (or you can * use sitgnal toggled (int id) from toolbar). When one button is set * down, all others are unset. All buttons emit signals - those who @@ -46,19 +46,19 @@ class KToolBarRadioGroupPrivate; * * @author Sven Radej */ -class TDEUI_EXPORT KToolBarRadioGroup : public TQObject +class TDEUI_EXPORT TDEToolBarRadioGroup : public TQObject { Q_OBJECT public: /** - * Constructor. Parent must be KToolBar . + * Constructor. Parent must be TDEToolBar . */ - KToolBarRadioGroup (KToolBar *_parent, const char *_name=0); + TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_name=0); /** * Destructor. */ - ~KToolBarRadioGroup (); + ~TDEToolBarRadioGroup (); /** * Adds button to group. Button cannot be unset by mouse clicks (you @@ -79,10 +79,10 @@ public slots: void slotToggled (int); private: - KToolBarButtonList *buttons; - KToolBar *tb; + TDEToolBarButtonList *buttons; + TDEToolBar *tb; - KToolBarRadioGroupPrivate *d; + TDEToolBarRadioGroupPrivate *d; }; #endif diff --git a/tdeui/kwhatsthismanager_p.h b/tdeui/kwhatsthismanager_p.h index cce1c8ea5..084c83641 100644 --- a/tdeui/kwhatsthismanager_p.h +++ b/tdeui/kwhatsthismanager_p.h @@ -30,7 +30,7 @@ class TQStyleSheet; class TQTextEdit; /** - * This class is used automatically by KMainWindow and KDialog to attach a + * This class is used automatically by TDEMainWindow and KDialog to attach a * What's This templates to all new widgets. If you don't use either of those * classes and want this functionality, call KWhatsThisManager::init () before * creating any widgets. diff --git a/tdeui/kxmlgui.xsd b/tdeui/kxmlgui.xsd index c0979cb72..dc2fad341 100644 --- a/tdeui/kxmlgui.xsd +++ b/tdeui/kxmlgui.xsd @@ -148,7 +148,7 @@ Defines both Standard and app-specific actions. An action can appear in a menu, a toolbar or in a menubar. Attributes: - - name of the action: this is matched with the KAction name. + - name of the action: this is matched with the TDEAction name. - group: this is used to control the placement of the action when merging e.g. a part, it matches the name of a DefineGroup in the mainwindow's rc file. @@ -157,7 +157,7 @@ there. Note that this feature is currently only available for the mainwindow, not for parts/plugins. - text, whatsThis, toolTip, shortText, shortcut, icon: all those are - mapped to KAction properties. + mapped to TDEAction properties. diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index 32083a2c3..817a54514 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -116,9 +116,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ id = -1; if ( element.tagName().lower() == d->tagMainWindow ) { - KMainWindow *mainwindow = 0; - if ( ::tqqt_cast( d->m_widget ) ) - mainwindow = static_cast(d->m_widget); + TDEMainWindow *mainwindow = 0; + if ( ::tqqt_cast( d->m_widget ) ) + mainwindow = static_cast(d->m_widget); return mainwindow; } @@ -127,8 +127,8 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ { KMenuBar *bar; - if ( ::tqqt_cast( d->m_widget ) ) - bar = static_cast(d->m_widget)->menuBar(); + if ( ::tqqt_cast( d->m_widget ) ) + bar = static_cast(d->m_widget)->menuBar(); else bar = new KMenuBar( d->m_widget ); @@ -145,15 +145,15 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ // And we don't want to set the parent for a standalone popupmenu, // otherwise its shortcuts appear. TQWidget* p = parent; - while ( p && !::tqqt_cast( p ) ) + while ( p && !::tqqt_cast( p ) ) p = p->parentWidget(); TQCString name = element.attribute( d->attrName ).utf8(); - if (!kapp->authorizeKAction(name)) + if (!kapp->authorizeTDEAction(name)) return 0; - KPopupMenu *popup = new KPopupMenu( p, name); + TDEPopupMenu *popup = new TDEPopupMenu( p, name); TQString i18nText; TQDomElement textElem = element.namedItem( d->attrText1 ).toElement(); @@ -205,13 +205,13 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ TQCString name = element.attribute( d->attrName ).utf8(); - KToolBar *bar = static_cast(TQT_TQWIDGET(d->m_widget->child( name, "KToolBar" ))); + TDEToolBar *bar = static_cast(TQT_TQWIDGET(d->m_widget->child( name, "TDEToolBar" ))); if( !bar ) { - bar = new KToolBar( d->m_widget, name, honor, false ); + bar = new TDEToolBar( d->m_widget, name, honor, false ); } - if ( ::tqqt_cast( d->m_widget ) ) + if ( ::tqqt_cast( d->m_widget ) ) { if ( d->m_client && !d->m_client->xmlFile().isEmpty() ) bar->setXMLGUIClient( d->m_client ); @@ -224,9 +224,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( element.tagName().lower() == d->tagStatusBar ) { - if ( ::tqqt_cast( d->m_widget ) ) + if ( ::tqqt_cast( d->m_widget ) ) { - KMainWindow *mainWin = static_cast(d->m_widget); + TDEMainWindow *mainWin = static_cast(d->m_widget); mainWin->statusBar()->show(); return mainWin->statusBar(); } @@ -253,9 +253,9 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD delete container; } - else if ( ::tqqt_cast( container ) ) + else if ( ::tqqt_cast( container ) ) { - KToolBar *tb = static_cast( container ); + TDEToolBar *tb = static_cast( container ); tb->saveState( element ); delete tb; @@ -271,7 +271,7 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD } else if ( ::tqqt_cast( container ) ) { - if ( ::tqqt_cast( d->m_widget ) ) + if ( ::tqqt_cast( d->m_widget ) ) container->hide(); else delete static_cast(container); @@ -319,9 +319,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( ::tqqt_cast( parent ) ) return static_cast(parent)->insertSeparator( index ); - else if ( ::tqqt_cast( parent ) ) + else if ( ::tqqt_cast( parent ) ) { - KToolBar *bar = static_cast( parent ); + TDEToolBar *bar = static_cast( parent ); bool isLineSep = true; @@ -339,7 +339,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } } - int id = KAction::getToolButtonID(); + int id = TDEAction::getToolButtonID(); if ( isLineSep ) bar->insertLineSeparator( index, id ); @@ -356,7 +356,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( element.tagName().lower() == d->tagMenuTitle ) { - if ( ::tqqt_cast( parent ) ) + if ( ::tqqt_cast( parent ) ) { TQString i18nText; TQCString text = element.text().utf8(); @@ -379,9 +379,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } if ( !icon.isEmpty() ) - return static_cast(parent)->insertTitle( pix, i18nText, -1, index ); + return static_cast(parent)->insertTitle( pix, i18nText, -1, index ); else - return static_cast(parent)->insertTitle( i18nText, -1, index ); + return static_cast(parent)->insertTitle( i18nText, -1, index ); } } return 0; @@ -393,8 +393,8 @@ void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id ) static_cast(parent)->removeItem( id ); else if ( ::tqqt_cast( parent ) ) static_cast(parent)->removeItem( id ); - else if ( ::tqqt_cast( parent ) ) - static_cast(parent)->removeItemDelayed( id ); + else if ( ::tqqt_cast( parent ) ) + static_cast(parent)->removeItemDelayed( id ); } KXMLGUIClient *KXMLGUIBuilder::builderClient() const @@ -421,18 +421,18 @@ void KXMLGUIBuilder::setBuilderInstance( TDEInstance *instance ) void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * ) { - if ( !d->m_widget || !::tqqt_cast( d->m_widget ) ) + if ( !d->m_widget || !::tqqt_cast( d->m_widget ) ) return; #if 0 - KToolBar *toolbar = 0; - QListIterator it( ( (KMainWindow*)d->m_widget )->toolBarIterator() ); + TDEToolBar *toolbar = 0; + QListIterator it( ( (TDEMainWindow*)d->m_widget )->toolBarIterator() ); while ( ( toolbar = it.current() ) ) { kdDebug() << "KXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar << endl; ++it; toolbar->positionYourself(); } #else - static_cast(d->m_widget)->finalizeGUI( false ); + static_cast(d->m_widget)->finalizeGUI( false ); #endif } diff --git a/tdeui/kxmlguibuilder.h b/tdeui/kxmlguibuilder.h index 657add5f8..885bb1058 100644 --- a/tdeui/kxmlguibuilder.h +++ b/tdeui/kxmlguibuilder.h @@ -32,8 +32,8 @@ class KXMLGUIClient; /** * Abstract interface for a "GUI builder", used by the GUIFactory - * This interface is implemented by KMainWindow for the case where - * the toplevel widget is a KMainWindow. Other implementations may appear + * This interface is implemented by TDEMainWindow for the case where + * the toplevel widget is a TDEMainWindow. Other implementations may appear * in the future (dialogs for instance) */ class TDEUI_EXPORT KXMLGUIBuilder diff --git a/tdeui/kxmlguiclient.cpp b/tdeui/kxmlguiclient.cpp index da22e83fb..853a9ee52 100644 --- a/tdeui/kxmlguiclient.cpp +++ b/tdeui/kxmlguiclient.cpp @@ -53,7 +53,7 @@ public: TDEInstance *m_instance; TQDomDocument m_doc; - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; TQDomDocument m_buildDocument; TQGuardedPtr m_factory; KXMLGUIClient *m_parent; @@ -90,9 +90,9 @@ KXMLGUIClient::~KXMLGUIClient() delete d; } -KAction *KXMLGUIClient::action( const char *name ) const +TDEAction *KXMLGUIClient::action( const char *name ) const { - KAction* act = actionCollection()->action( name ); + TDEAction* act = actionCollection()->action( name ); if ( !act ) { TQPtrListIterator childIt( d->m_children ); for (; childIt.current(); ++childIt ) { @@ -104,17 +104,17 @@ KAction *KXMLGUIClient::action( const char *name ) const return act; } -KActionCollection *KXMLGUIClient::actionCollection() const +TDEActionCollection *KXMLGUIClient::actionCollection() const { if ( !d->m_actionCollection ) { - d->m_actionCollection = new KActionCollection( - "KXMLGUIClient-KActionCollection", this ); + d->m_actionCollection = new TDEActionCollection( + "KXMLGUIClient-TDEActionCollection", this ); } return d->m_actionCollection; } -KAction *KXMLGUIClient::action( const TQDomElement &element ) const +TDEAction *KXMLGUIClient::action( const TQDomElement &element ) const { static const TQString &attrName = TDEGlobal::staticQString( "name" ); return actionCollection()->action( element.attribute( attrName ).latin1() ); @@ -248,7 +248,7 @@ void KXMLGUIClient::setDOMDocument( const TQDomDocument &document, bool merge ) setXMLGUIBuildDocument( TQDomDocument() ); } -bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, KActionCollection *actionCollection ) +bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, TDEActionCollection *actionCollection ) { static const TQString &tagAction = TDEGlobal::staticQString( "Action" ); static const TQString &tagMerge = TDEGlobal::staticQString( "Merge" ); @@ -292,7 +292,7 @@ bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, { TQCString name = e.attribute( attrName ).utf8(); // WABA if ( !actionCollection->action( name.data() ) || - (kapp && !kapp->authorizeKAction(name))) + (kapp && !kapp->authorizeTDEAction(name))) { // remove this child as we aren't using it base.removeChild( e ); @@ -602,7 +602,7 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const return d->m_builder; } -void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList &actionList ) +void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList &actionList ) { if ( !d->m_factory ) return; @@ -908,7 +908,7 @@ void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::Revers for ( TQStringList::Iterator it = stateChange.actionsToEnable.begin(); it != stateChange.actionsToEnable.end(); ++it ) { - KAction *action = actionCollection()->action((*it).latin1()); + TDEAction *action = actionCollection()->action((*it).latin1()); if (action) action->setEnabled(setTrue); } @@ -917,7 +917,7 @@ void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::Revers for ( TQStringList::Iterator it = stateChange.actionsToDisable.begin(); it != stateChange.actionsToDisable.end(); ++it ) { - KAction *action = actionCollection()->action((*it).latin1()); + TDEAction *action = actionCollection()->action((*it).latin1()); if (action) action->setEnabled(setFalse); } diff --git a/tdeui/kxmlguiclient.h b/tdeui/kxmlguiclient.h index 78c412602..9fa3951a7 100644 --- a/tdeui/kxmlguiclient.h +++ b/tdeui/kxmlguiclient.h @@ -27,8 +27,8 @@ #include class TQWidget; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TDEInstance; class KXMLGUIClientPrivate; class KXMLGUIFactory; @@ -74,25 +74,25 @@ public: * This method is provided for convenience, as it uses actionCollection() * to get the action object. */ - KAction* action( const char* name ) const; + TDEAction* action( const char* name ) const; /** * Retrieves an action for a given TQDomElement. The default * implementation uses the "name" attribute to query the action * object via the other action() method. */ - virtual KAction *action( const TQDomElement &element ) const; + virtual TDEAction *action( const TQDomElement &element ) const; /** * Retrieves the entire action collection for the GUI client. If * you subclass KXMLGUIClient you should call - * KActionCollection::setWidget( TQWidget* ) with this object, or - * you will encounter subtle bugs with KAction keyboard shortcuts. - * This is not necessary if your KXMLGUIClient is a KMainWindow. + * TDEActionCollection::setWidget( TQWidget* ) with this object, or + * you will encounter subtle bugs with TDEAction keyboard shortcuts. + * This is not necessary if your KXMLGUIClient is a TDEMainWindow. * - * @see KActionCollection::setWidget( TQWidget* ) + * @see TDEActionCollection::setWidget( TQWidget* ) */ - virtual KActionCollection* actionCollection() const; + virtual TDEActionCollection* actionCollection() const; /** * @return The instance ( TDEInstance ) for this GUI client. @@ -218,7 +218,7 @@ public: * This tag will get expanded to a list of actions. In the example * above ( a file manager with a dynamic file menu ), you would call * \code - * TQPtrList file_actions; + * TQPtrList file_actions; * for( ... ) * if( ... ) * file_actions.append( cool_action ); @@ -234,7 +234,7 @@ public: * plugActionList() would leave the previous actions in the * menu too.. */ - void plugActionList( const TQString &name, const TQPtrList &actionList ); + void plugActionList( const TQString &name, const TQPtrList &actionList ); /** * The complement of plugActionList() ... @@ -342,7 +342,7 @@ private: }; bool mergeXML( TQDomElement &base, const TQDomElement &additive, - KActionCollection *actionCollection ); + TDEActionCollection *actionCollection ); TQDomElement findMatchingElement( const TQDomElement &base, const TQDomElement &additive ); diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 78b918862..d7d166f78 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -368,7 +368,7 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client ) // reset some variables d->BuildState::reset(); - // This will destruct the KAccel object built around the given widget. + // This will destruct the TDEAccel object built around the given widget. client->prepareXMLUnplug( d->builder->widget() ); d->popState(); @@ -468,7 +468,7 @@ TQPtrList KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, } void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const TQString &name, - const TQPtrList &actionList ) + const TQPtrList &actionList ) { d->pushState(); d->guiClient = client; @@ -506,7 +506,7 @@ void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElemen if ( e.tagName().lower() != tagAction ) continue; - KAction *action = d->guiClient->action( e ); + TDEAction *action = d->guiClient->action( e ); if ( !action ) continue; @@ -514,7 +514,7 @@ void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElemen } } -void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap &attributes ) +void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes ) { for ( uint i = 0; i < attributes.length(); i++ ) { @@ -526,7 +526,7 @@ void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap & } } -void KXMLGUIFactory::configureAction( KAction *action, const TQDomAttr &attribute ) +void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomAttr &attribute ) { static const TQString &attrShortcut = TDEGlobal::staticQString( "shortcut" ); diff --git a/tdeui/kxmlguifactory.h b/tdeui/kxmlguifactory.h index bf49c6b60..2f225b5ba 100644 --- a/tdeui/kxmlguifactory.h +++ b/tdeui/kxmlguifactory.h @@ -28,7 +28,7 @@ #include -class KAction; +class TDEAction; class KXMLGUIFactoryPrivate; class KXMLGUIClient; class KXMLGUIBuilder; @@ -52,7 +52,7 @@ class BuildHelper; * and merging the GUI from an unlimited number of clients. * * Each client provides XML through a TQDomDocument and actions through a - * KActionCollection . The XML document contains the rules for how to merge the + * TDEActionCollection . The XML document contains the rules for how to merge the * GUI. * * KXMLGUIFactory processes the DOM tree provided by a client and plugs in the client's actions, @@ -124,7 +124,7 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject */ void removeClient( KXMLGUIClient *client ); - void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList &actionList ); + void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList &actionList ); void unplugActionList( KXMLGUIClient *client, const TQString &name ); /** @@ -206,8 +206,8 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject TQPtrList findRecursive( KXMLGUI::ContainerNode *node, const TQString &tagName ); void applyActionProperties( const TQDomElement &element ); - void configureAction( KAction *action, const TQDomNamedNodeMap &attributes ); - void configureAction( KAction *action, const TQDomAttr &attribute ); + void configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes ); + void configureAction( TDEAction *action, const TQDomAttr &attribute ); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kxmlguifactory_p.cpp b/tdeui/kxmlguifactory_p.cpp index 522fb659d..ffe9ffab1 100644 --- a/tdeui/kxmlguifactory_p.cpp +++ b/tdeui/kxmlguifactory_p.cpp @@ -388,7 +388,7 @@ void ContainerNode::unplugActions( BuildState &state ) ContainerClientListIt clientIt( clients ); /* - Disabled because it means in KToolBar::saveState isHidden is always true then, + Disabled because it means in TDEToolBar::saveState isHidden is always true then, which is clearly wrong. if ( clients.count() == 1 && clientIt.current()->client == client && @@ -606,7 +606,7 @@ bool BuildHelper::processActionElement( const TQDomElement &e, int idx ) assert( m_state.guiClient ); // look up the action and plug it in - KAction *action = m_state.guiClient->action( e ); + TDEAction *action = m_state.guiClient->action( e ); //kdDebug() << "BuildHelper::processActionElement " << e.attribute( "name" ) << " -> " << action << " (in " << m_state.guiClient->actionCollection() << ")" << endl; if ( !action ) diff --git a/tdeui/kxmlguifactory_p.h b/tdeui/kxmlguifactory_p.h index dc263b677..769d674c8 100644 --- a/tdeui/kxmlguifactory_p.h +++ b/tdeui/kxmlguifactory_p.h @@ -36,21 +36,21 @@ namespace KXMLGUI struct BuildState; -class TDEUI_EXPORT ActionList : public TQPtrList +class TDEUI_EXPORT ActionList : public TQPtrList { public: ActionList() {} - ActionList( const TQPtrList &rhs ) - : TQPtrList( rhs ) + ActionList( const TQPtrList &rhs ) + : TQPtrList( rhs ) {} - ActionList &operator=( const TQPtrList &rhs ) - { TQPtrList::operator=( rhs ); return *this; } + ActionList &operator=( const TQPtrList &rhs ) + { TQPtrList::operator=( rhs ); return *this; } void plug( TQWidget *container, int index ) const; void unplug( TQWidget *container ) const; }; -typedef TQPtrListIterator ActionListIt; +typedef TQPtrListIterator ActionListIt; typedef TQMap< TQString, ActionList > ActionListMap; /* diff --git a/tdeui/tdespelldlg.h b/tdeui/tdespelldlg.h index c42476814..9b0da8205 100644 --- a/tdeui/tdespelldlg.h +++ b/tdeui/tdespelldlg.h @@ -26,7 +26,7 @@ class TQStringList; class TQLabel; class TQListViewItem; class TQPushButton; -class KListBox; +class TDEListBox; class KLineEdit; class KProgress; @@ -51,7 +51,7 @@ class TDEUI_EXPORT KSpellDlg : public KDialogBase KSpellDlgPrivate *d; KLineEdit *editbox; KProgress *progbar; - KListBox *listbox; + TDEListBox *listbox; TQStringList *sugg; TQPushButton *qpbrep, *qpbrepa; TQLabel *wordlabel; diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index bb0c0338b..c3bfcbe95 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -1,5 +1,5 @@ /* -* Tests the item container widgets KIconView, KListView, KListBox +* Tests the item container widgets KIconView, TDEListView, TDEListBox * * Copyright (c) 2000 by Michael Reiher * @@ -88,7 +88,7 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) m_plblItem = new TQLabel( gbItem ); vBox->addWidget( gbItem ); - TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "KListView", this); + TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "TDEListView", this); TQCheckBox* cbListView = new TQCheckBox("Single Column", bgListView); vBox->addWidget( bgListView ); connect( cbListView, TQT_SIGNAL( toggled( bool ) ), @@ -105,8 +105,8 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) this, TQT_SLOT( slotIconViewExec( TQIconViewItem* ) ) ); //Create ListView - TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "KListView", this); - m_pListView = new KListView( gbListView ); + TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "TDEListView", this); + m_pListView = new TDEListView( gbListView ); m_pListView->addColumn("Item"); m_pListView->addColumn("Text"); hBox->addWidget( gbListView ); @@ -115,8 +115,8 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) this, TQT_SLOT( slotListViewExec( TQListViewItem* ) ) ); //Create ListBox - TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "KListBox", this); - m_pListBox = new KListBox( gbListBox ); + TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "TDEListBox", this); + m_pListBox = new TDEListBox( gbListBox ); hBox->addWidget( gbListBox ); connect( m_pListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ), this, TQT_SLOT( slotListBoxExec( TQListBoxItem* ) ) ); @@ -153,22 +153,22 @@ void TopLevel::slotSwitchMode( int id ) case TopLevel::NoSelection: m_pIconView->setSelectionMode( KIconView::NoSelection ); m_pListView->setSelectionMode( TQListView::NoSelection ); - m_pListBox->setSelectionMode( KListBox::NoSelection ); + m_pListBox->setSelectionMode( TDEListBox::NoSelection ); break; case TopLevel::Single: m_pIconView->setSelectionMode( KIconView::Single ); m_pListView->setSelectionMode( TQListView::Single ); - m_pListBox->setSelectionMode( KListBox::Single ); + m_pListBox->setSelectionMode( TDEListBox::Single ); break; case TopLevel::Multi: m_pIconView->setSelectionMode( KIconView::Multi ); m_pListView->setSelectionMode( TQListView::Multi ); - m_pListBox->setSelectionMode( KListBox::Multi ); + m_pListBox->setSelectionMode( TDEListBox::Multi ); break; case TopLevel::Extended: m_pIconView->setSelectionMode( KIconView::Extended ); m_pListView->setSelectionMode( TQListView::Extended ); - m_pListBox->setSelectionMode( KListBox::Extended ); + m_pListBox->setSelectionMode( TDEListBox::Extended ); break; default: Q_ASSERT(0); @@ -187,7 +187,7 @@ void TopLevel::slotIconViewExec( TQIconViewItem* item ) void TopLevel::slotListViewExec( TQListViewItem* item ) { - m_plblWidget->setText("KListView"); + m_plblWidget->setText("TDEListView"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text(0) ); @@ -197,7 +197,7 @@ void TopLevel::slotListViewExec( TQListViewItem* item ) void TopLevel::slotListBoxExec( TQListBoxItem* item ) { - m_plblWidget->setText("KListBox"); + m_plblWidget->setText("TDEListBox"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text() ); diff --git a/tdeui/tests/itemcontainertest.h b/tdeui/tests/itemcontainertest.h index 86a356ab3..3abc0e0a0 100644 --- a/tdeui/tests/itemcontainertest.h +++ b/tdeui/tests/itemcontainertest.h @@ -4,8 +4,8 @@ #include class KIconView; -class KListView; -class KListBox; +class TDEListView; +class TDEListBox; class TQButtonGroup; class TQLabel; @@ -32,8 +32,8 @@ public slots: void slotDoubleClicked( TQIconViewItem* ) { tqDebug("DOUBLE CLICK");} protected: KIconView* m_pIconView; - KListView* m_pListView; - KListBox* m_pListBox; + TDEListView* m_pListView; + TDEListBox* m_pListBox; TQButtonGroup* m_pbgView; TQButtonGroup* m_pbgMode; diff --git a/tdeui/tests/kaccelgentest.cpp b/tdeui/tests/kaccelgentest.cpp index f5f95ac57..783a0f36f 100644 --- a/tdeui/tests/kaccelgentest.cpp +++ b/tdeui/tests/kaccelgentest.cpp @@ -30,7 +30,7 @@ int main() << "&yoyo && dyne"; TQStringList output; - KAccelGen::generate( input, output ); + TDEAccelGen::generate( input, output ); check( "TQStringList value generation", expected, output ); TQMap map; @@ -39,13 +39,13 @@ int main() } input.sort(); expected.clear(); - KAccelGen::generate( input, expected ); + TDEAccelGen::generate( input, expected ); output.clear(); - KAccelGen::generateFromValues( map, output ); + TDEAccelGen::generateFromValues( map, output ); check( "map value generation", expected, output ); output.clear(); - KAccelGen::generateFromKeys( map, output ); + TDEAccelGen::generateFromKeys( map, output ); check( "map key generation", expected, output ); } diff --git a/tdeui/tests/kactiontest.cpp b/tdeui/tests/kactiontest.cpp index 238f912c5..73a108ab0 100644 --- a/tdeui/tests/kactiontest.cpp +++ b/tdeui/tests/kactiontest.cpp @@ -10,15 +10,15 @@ int main( int argc, char **argv ) { TDEApplication app( argc, argv, "kactiontest" ); - KActionCollection coll( static_cast( 0 ) ); - - TQGuardedPtr action1 = new KRadioAction("test",0, &coll); - TQGuardedPtr action2 = new KRadioAction("test",0, &coll); - TQGuardedPtr action3 = new KRadioAction("test",0, &coll); - TQGuardedPtr action4 = new KRadioAction("test",0, &coll); - TQGuardedPtr action5 = new KRadioAction("test",0, &coll); - TQGuardedPtr action6 = new KRadioAction("test",0, &coll); - TQGuardedPtr action7 = new KRadioAction("test",0, &coll); + TDEActionCollection coll( static_cast( 0 ) ); + + TQGuardedPtr action1 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action2 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action3 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action4 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action5 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action6 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action7 = new TDERadioAction("test",0, &coll); coll.clear(); assert( coll.isEmpty() ); diff --git a/tdeui/tests/kdockwidgettest.cpp b/tdeui/tests/kdockwidgettest.cpp index dfe9bfff7..bfed1bdd2 100644 --- a/tdeui/tests/kdockwidgettest.cpp +++ b/tdeui/tests/kdockwidgettest.cpp @@ -184,7 +184,7 @@ void DockApplication::initMenuBar() void DockApplication::initToolBars() { TQPixmap p(folder); - KToolBar* tool_bar_0 = toolBar(0); + TDEToolBar* tool_bar_0 = toolBar(0); tool_bar_0->setFullSize(false); tool_bar_0->insertButton( p, 1 ); tool_bar_0->insertButton(p, 2 ); diff --git a/tdeui/tests/kfontdialogtest.cpp b/tdeui/tests/kfontdialogtest.cpp index 0b3d4eb30..66f0b3664 100644 --- a/tdeui/tests/kfontdialogtest.cpp +++ b/tdeui/tests/kfontdialogtest.cpp @@ -31,19 +31,19 @@ int main( int argc, char **argv ) { - TDEApplication app( argc, argv, "KFontDialogTest" ); + TDEApplication app( argc, argv, "TDEFontDialogTest" ); TDEConfig aConfig; - aConfig.setGroup( "KFontDialog-test" ); + aConfig.setGroup( "TDEFontDialog-test" ); app.setFont(TQFont("Helvetica",12)); // TQFont font = TQFont("Times",18,TQFont::Bold); TQFont font = aConfig.readFontEntry( "Chosen" ); - int nRet = KFontDialog::getFont(font); + int nRet = TDEFontDialog::getFont(font); int flags; - nRet = KFontDialog::getFontDiff(font, flags); + nRet = TDEFontDialog::getFontDiff(font, flags); aConfig.writeEntry( "Chosen", font, true ); aConfig.sync(); diff --git a/tdeui/tests/klistviewtest.cpp b/tdeui/tests/klistviewtest.cpp index 9fc108e52..4be086af6 100644 --- a/tdeui/tests/klistviewtest.cpp +++ b/tdeui/tests/klistviewtest.cpp @@ -8,8 +8,8 @@ int main( int argc, char **argv ) { TDEApplication app( argc, argv, "klistviewtest" ); KDialogBase dialog; - KListView *view = new KListView( dialog.makeVBoxMainWidget() ); - view->setSelectionModeExt( KListView::FileManager ); + TDEListView *view = new TDEListView( dialog.makeVBoxMainWidget() ); + view->setSelectionModeExt( TDEListView::FileManager ); view->setDragEnabled( true ); view->setItemsMovable( false ); view->setAcceptDrops( true ); @@ -17,20 +17,20 @@ int main( int argc, char **argv ) view->addColumn("Column 2"); view->addColumn("Column 3"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 2", "Some more", "Hi Mom :)" ); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 2", "Some more", "Hi Mom :)" ); view->restoreLayout( TDEGlobal::config(), "ListView" ); - new KListViewItem( view, "Item 3" ); + new TDEListViewItem( view, "Item 3" ); dialog.exec(); view->saveLayout( TDEGlobal::config(), "ListView" ); diff --git a/tdeui/tests/kmainwindowrestoretest.h b/tdeui/tests/kmainwindowrestoretest.h index f29ae2fca..938311461 100644 --- a/tdeui/tests/kmainwindowrestoretest.h +++ b/tdeui/tests/kmainwindowrestoretest.h @@ -3,45 +3,45 @@ #include -class MainWin1 : public KMainWindow { +class MainWin1 : public TDEMainWindow { Q_OBJECT public: - MainWin1() : KMainWindow() {} + MainWin1() : TDEMainWindow() {} virtual ~MainWin1() {} }; -class MainWin2 : public KMainWindow { +class MainWin2 : public TDEMainWindow { Q_OBJECT public: - MainWin2() : KMainWindow() {} + MainWin2() : TDEMainWindow() {} virtual ~MainWin2() {} }; -class MainWin3 : public KMainWindow { +class MainWin3 : public TDEMainWindow { Q_OBJECT public: - MainWin3() : KMainWindow() {} + MainWin3() : TDEMainWindow() {} virtual ~MainWin3() {} }; -class MainWin4 : public KMainWindow { +class MainWin4 : public TDEMainWindow { Q_OBJECT public: - MainWin4() : KMainWindow() {} + MainWin4() : TDEMainWindow() {} virtual ~MainWin4() {} }; -class MainWin5 : public KMainWindow { +class MainWin5 : public TDEMainWindow { Q_OBJECT public: - MainWin5() : KMainWindow() {} + MainWin5() : TDEMainWindow() {} virtual ~MainWin5() {} }; -class MainWin6 : public KMainWindow { +class MainWin6 : public TDEMainWindow { Q_OBJECT public: - MainWin6() : KMainWindow() {} + MainWin6() : TDEMainWindow() {} virtual ~MainWin6() {} }; diff --git a/tdeui/tests/kmainwindowtest.h b/tdeui/tests/kmainwindowtest.h index 4fb426ac5..21ca2fe7e 100644 --- a/tdeui/tests/kmainwindowtest.h +++ b/tdeui/tests/kmainwindowtest.h @@ -3,7 +3,7 @@ #include -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { Q_OBJECT public: diff --git a/tdeui/tests/kpopuptest.cpp b/tdeui/tests/kpopuptest.cpp index e5d01c985..89c932f46 100644 --- a/tdeui/tests/kpopuptest.cpp +++ b/tdeui/tests/kpopuptest.cpp @@ -5,7 +5,7 @@ class DemoWidget : public TQWidget { private: - KPopupMenu *menu; + TDEPopupMenu *menu; void mousePressEvent(TQMouseEvent *) { @@ -20,7 +20,7 @@ void paintEvent(TQPaintEvent *) public: DemoWidget() : TQWidget() { - menu = new KPopupMenu("Popup Menu:"); + menu = new TDEPopupMenu("Popup Menu:"); menu->insertItem("Item1"); menu->insertItem("Item2"); menu->insertSeparator(); diff --git a/tdeui/tests/krulertest.cpp b/tdeui/tests/krulertest.cpp index f227301b9..628c5096e 100644 --- a/tdeui/tests/krulertest.cpp +++ b/tdeui/tests/krulertest.cpp @@ -51,7 +51,7 @@ MouseWidget::resizeEvent( TQResizeEvent *r ) KRulerTest::KRulerTest( const char *name ) - : KMainWindow(0, name) + : TDEMainWindow(0, name) { mainframe = new TQFrame(this); diff --git a/tdeui/tests/krulertest.h b/tdeui/tests/krulertest.h index d180e93a0..67a9ae7e0 100644 --- a/tdeui/tests/krulertest.h +++ b/tdeui/tests/krulertest.h @@ -42,7 +42,7 @@ private: }; -class KRulerTest : public KMainWindow +class KRulerTest : public TDEMainWindow { Q_OBJECT public: diff --git a/tdeui/tests/kstatusbartest.cpp b/tdeui/tests/kstatusbartest.cpp index 742490aae..507604480 100644 --- a/tdeui/tests/kstatusbartest.cpp +++ b/tdeui/tests/kstatusbartest.cpp @@ -16,7 +16,7 @@ #include "kstatusbartest.h" testWindow::testWindow (TQWidget *, const char *name) - : KMainWindow (0, name) + : TDEMainWindow (0, name) { // Setup Menus menuBar = new KMenuBar (this); diff --git a/tdeui/tests/kstatusbartest.h b/tdeui/tests/kstatusbartest.h index 37f500334..809f3f643 100644 --- a/tdeui/tests/kstatusbartest.h +++ b/tdeui/tests/kstatusbartest.h @@ -8,7 +8,7 @@ class TQMultiLineEdit; -class testWindow : public KMainWindow +class testWindow : public TDEMainWindow { Q_OBJECT diff --git a/tdeui/tests/ktoolbarlabelactiontest.cpp b/tdeui/tests/ktoolbarlabelactiontest.cpp index 617808f40..9596e9d32 100644 --- a/tdeui/tests/ktoolbarlabelactiontest.cpp +++ b/tdeui/tests/ktoolbarlabelactiontest.cpp @@ -30,7 +30,7 @@ #include -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { public: MainWindow() @@ -47,7 +47,7 @@ public: // first constructor - KToolBarLabelAction* label1 = new KToolBarLabelAction("&Label 1", 0, + TDEToolBarLabelAction* label1 = new TDEToolBarLabelAction("&Label 1", 0, 0, 0, actionCollection(), "label1"); @@ -55,8 +55,8 @@ public: KLineEdit* lineEdit = new KLineEdit(this); new KWidgetAction(lineEdit, "Line Edit", 0, this, 0, actionCollection(), "lineEdit"); - KToolBarLabelAction* label2 = - new KToolBarLabelAction(lineEdit, "L&abel 2", 0, 0, 0, + TDEToolBarLabelAction* label2 = + new TDEToolBarLabelAction(lineEdit, "L&abel 2", 0, 0, 0, actionCollection(), "label2"); @@ -69,7 +69,7 @@ public: ("&Really long, long, long and boring text goes here", this, "kde toolbar widget"); - KToolBarLabelAction* label3 = new KToolBarLabelAction(customLabel, 0, 0, 0, + TDEToolBarLabelAction* label3 = new TDEToolBarLabelAction(customLabel, 0, 0, 0, actionCollection(), "label3"); diff --git a/tdeui/tests/kxmlguitest.cpp b/tdeui/tests/kxmlguitest.cpp index 4c9e83bc1..17f7daac9 100644 --- a/tdeui/tests/kxmlguitest.cpp +++ b/tdeui/tests/kxmlguitest.cpp @@ -24,7 +24,7 @@ int main( int argc, char **argv ) // Let's add $PWD (ideally $srcdir instead...) to it TDEGlobal::dirs()->addResourceDir( "data", TQDir::currentDirPath() ); - KMainWindow *mainwindow = new KMainWindow; + TDEMainWindow *mainwindow = new TDEMainWindow; TQLineEdit* line = new TQLineEdit( mainwindow ); mainwindow->setCentralWidget( line ); @@ -39,7 +39,7 @@ int main( int argc, char **argv ) shell->setInstance( new TDEInstance( "konqueror" ) ); shell->instance()->dirs()->addResourceDir( "data", TQDir::currentDirPath() ); - (void)new KAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" ); + (void)new TDEAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" ); shell->setXMLFile( "./kxmlguitest_shell.rc" ); @@ -47,8 +47,8 @@ int main( int argc, char **argv ) Client *part = new Client; - (void)new KAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" ); - (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); + (void)new TDEAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" ); + (void)new TDEAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); part->setXMLFile( "./kxmlguitest_part.rc" ); diff --git a/tdeui/tests/twindowtest.cpp b/tdeui/tests/twindowtest.cpp index 32027bce1..0ad1b726b 100644 --- a/tdeui/tests/twindowtest.cpp +++ b/tdeui/tests/twindowtest.cpp @@ -26,19 +26,19 @@ //#include /* - Ok this is a constructor of our top widget. It inherits KMainWindow. + Ok this is a constructor of our top widget. It inherits TDEMainWindow. In constructor wi will create all of our interface elements: menubar, toolbar(s), statusbar, and main widget. Non of those interface is obligatory, i.e. you don't have to use menubar, toolbars or statusbar if you don't want to. Theoreticly, you don't need even main widget (but in that case, you'll get blank - KMainWindow). + TDEMainWindow). */ static int itemId = 0; testWindow::testWindow (TQWidget *parent, const char *name) - : KMainWindow (parent,name) + : TDEMainWindow (parent,name) { ena=false; setCaption("test window"); @@ -153,7 +153,7 @@ setAutoSaveSettings(); tb->alignItemRight (6); // Another toolbar - tb1 = new KToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators + tb1 = new TDEToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators pix = BarIcon("filenew"); @@ -194,7 +194,7 @@ setAutoSaveSettings(); tb1->setToggle(7); //Create - rg = new KToolBarRadioGroup (tb1); + rg = new TDEToolBarRadioGroup (tb1); rg->addButton(4); rg->addButton(5); @@ -230,7 +230,7 @@ setAutoSaveSettings(); //... and main widget setCentralWidget (widget); - // This is not strictly related to toolbars, menubars or KMainWindow. + // This is not strictly related to toolbars, menubars or TDEMainWindow. // Setup popup for completions completions = new TQPopupMenu; @@ -328,7 +328,7 @@ void testWindow::slotCompletion() completions->popup(TQCursor::pos()); // This popup should understunf keys up and down /* This is just an example. KLined automatically sets cursor at end of string - when ctrl-d or ctrl-s is pressed. KToolBar will also put cursor at end of text in Lined + when ctrl-d or ctrl-s is pressed. TDEToolBar will also put cursor at end of text in Lined after inserting text with setLinedText (...). */ diff --git a/tdeui/tests/twindowtest.h b/tdeui/tests/twindowtest.h index 14e2a6da8..f0dad1537 100644 --- a/tdeui/tests/twindowtest.h +++ b/tdeui/tests/twindowtest.h @@ -10,10 +10,10 @@ #include class TQMultiLineEdit; -class KToolBarRadioGroup; +class TDEToolBarRadioGroup; class KHelpMenu; -class testWindow : public KMainWindow +class testWindow : public TDEMainWindow { Q_OBJECT @@ -56,8 +56,8 @@ protected: TQPopupMenu *toolBarMenu; KStatusBar *statusBar; KHelpMenu *helpMenu; - KToolBar *tb; - KToolBar *tb1; + TDEToolBar *tb; + TDEToolBar *tb1; bool lineL; bool exitB; bool greenF; @@ -65,7 +65,7 @@ protected: TQMultiLineEdit *widget; TQTimer *timer; TQProgressBar *pr; - KToolBarRadioGroup *rg; + TDEToolBarRadioGroup *rg; }; #endif diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index b1d05c57e..e23cf18da 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -83,7 +83,7 @@ int NameSortedInfoList::compareItems( TQPtrCollection::Item s1, TQPtrCollection: } // namespace KWindowListMenu::KWindowListMenu(TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { twin_module = new KWinModule(TQT_TQOBJECT(this)); @@ -251,7 +251,7 @@ void KWindowListMenu::slotCascadeWindows() } void KWindowListMenu::virtual_hook( int id, void* data ) -{ KPopupMenu::virtual_hook( id, data ); } +{ TDEPopupMenu::virtual_hook( id, data ); } #endif // Q_WS_X11 diff --git a/tdeui/twindowlistmenu.h b/tdeui/twindowlistmenu.h index dcd81826f..b0b3634f3 100644 --- a/tdeui/twindowlistmenu.h +++ b/tdeui/twindowlistmenu.h @@ -37,7 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class KWinModule; class KWindowListMenuPrivate; -class TDEUI_EXPORT KWindowListMenu : public KPopupMenu +class TDEUI_EXPORT KWindowListMenu : public TDEPopupMenu { Q_OBJECT diff --git a/tdeutils/kpluginselector.cpp b/tdeutils/kpluginselector.cpp index 8e30f75d4..a6390ec19 100644 --- a/tdeutils/kpluginselector.cpp +++ b/tdeutils/kpluginselector.cpp @@ -67,7 +67,7 @@ class KPluginInfoLVI : public TQCheckListItem { public: - KPluginInfoLVI( KPluginInfo *pluginInfo, KListView *parent ) + KPluginInfoLVI( KPluginInfo *pluginInfo, TDEListView *parent ) : TQCheckListItem( parent, pluginInfo->name(), TQCheckListItem::CheckBox ), m_pluginInfo( pluginInfo ) { } @@ -86,15 +86,15 @@ private: class KPluginListViewToolTip : public TQToolTip { public: - KPluginListViewToolTip( TQWidget *parent, KListView *lv ); + KPluginListViewToolTip( TQWidget *parent, TDEListView *lv ); void maybeTip( const TQPoint &pos ); private: - KListView *m_listView; + TDEListView *m_listView; }; -KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, KListView *lv ) +KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, TDEListView *lv ) : TQToolTip( parent ), m_listView( lv ) { } @@ -182,7 +182,7 @@ void KPluginSelectionWidget::init( const TQValueList & plugininfos { // setup Widgets ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); - KListView * listview = new KListView( this ); + TDEListView * listview = new TDEListView( this ); d->tooltip = new KPluginListViewToolTip( listview->viewport(), listview ); connect( listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this, TQT_SLOT( executed( TQListViewItem * ) ) ); @@ -195,7 +195,7 @@ void KPluginSelectionWidget::init( const TQValueList & plugininfos listview->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred ); listview->setAcceptDrops( false ); listview->setFullWidth( true ); - listview->setSelectionModeExt( KListView::Single ); + listview->setSelectionModeExt( TDEListView::Single ); listview->setAllColumnsShowFocus( true ); listview->addColumn( i18n( "Name" ) ); for( TQValueList::ConstIterator it = plugininfos.begin(); diff --git a/tdeutils/ksettings/componentsdialog.cpp b/tdeutils/ksettings/componentsdialog.cpp index 89a5e2cd7..97a0bad4f 100644 --- a/tdeutils/ksettings/componentsdialog.cpp +++ b/tdeutils/ksettings/componentsdialog.cpp @@ -35,7 +35,7 @@ namespace KSettings class ComponentsDialog::ComponentsDialogPrivate { public: - KListView * listview; + TDEListView * listview; TQFrame * infowidget; TQLabel * iconwidget; TQLabel * commentwidget; @@ -51,7 +51,7 @@ ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name ) TQWidget * page = new TQWidget( this ); setMainWidget( page ); ( new TQHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); - d->listview = new KListView( page ); + d->listview = new TDEListView( page ); d->listview->setMinimumSize( 200, 200 ); d->infowidget = new TQFrame( page ); d->infowidget->setMinimumSize( 200, 200 ); @@ -68,7 +68,7 @@ ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name ) d->listview->setRootIsDecorated( true ); d->listview->setSorting( -1 ); d->listview->setAcceptDrops( false ); - d->listview->setSelectionModeExt( KListView::Single ); + d->listview->setSelectionModeExt( TDEListView::Single ); d->listview->setAllColumnsShowFocus( true ); connect( d->listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this, diff --git a/tdeutils/tdemultitabbar.cpp b/tdeutils/tdemultitabbar.cpp index 313d23d55..da2f3b23e 100644 --- a/tdeutils/tdemultitabbar.cpp +++ b/tdeutils/tdemultitabbar.cpp @@ -870,7 +870,7 @@ KMultiTabBar::~KMultiTabBar() { /*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&) { - (new KToolbarButton(pic,id,m_internal))->show(); + (new TDEToolbarButton(pic,id,m_internal))->show(); return 0; }*/ -- cgit v1.2.3 From ed99a30644c19b0a3cf0d2147243532df4daa16b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 15 Feb 2013 21:57:54 -0600 Subject: Rename additional header files to avoid conflicts with KDE4 --- CMakeLists.txt | 2 +- KDE2PORTING.html | 4 +- Mainpage.dox | 4 +- Makefile.am.in | 2 +- arts/kde/kaudioplaystream.cpp | 2 +- arts/kde/kaudiorecordstream.cpp | 2 +- arts/kde/kconverttest.cc | 2 +- arts/kde/kiotest.cc | 2 +- arts/kde/kiotestslow.cc | 2 +- arts/kde/kvideowidget.cpp | 2 +- arts/kde/mcop-dcop/kmcop.cpp | 2 +- arts/knotify/knotify.cpp | 6 +- arts/message/artsmessage.cc | 6 +- configure.in.in | 2 +- interfaces/tdeimproxy/library/tdeimproxy.cpp | 2 +- .../tdefileaudiopreview/tdefileaudiopreview.cpp | 4 +- interfaces/tdescript/scriptloader.cpp | 4 +- interfaces/tdescript/scriptmanager.cpp | 4 +- interfaces/tdetexteditor/CMakeLists.txt | 2 +- interfaces/tdetexteditor/Makefile.am | 2 +- interfaces/tdetexteditor/editorchooser.cpp | 2 +- interfaces/tdetexteditor/templateinterface.cpp | 6 +- interfaces/terminal/test/main.cc | 2 +- kab/addressbook.cc | 6 +- kab/kabapi.cc | 4 +- kabc/CMakeLists.txt | 123 - kabc/HACKING | 100 - kabc/HOWTO | 372 - kabc/Makefile.am | 72 - kabc/README | 28 - kabc/README.AddressFormat | 66 - kabc/TODO | 1 - kabc/address.cpp | 592 - kabc/address.h | 341 - kabc/addressbook.cpp | 842 -- kabc/addressbook.h | 431 - kabc/addresseedialog.cpp | 259 - kabc/addresseedialog.h | 161 - kabc/addresseehelper.cpp | 111 - kabc/addresseehelper.h | 66 - kabc/addresseelist.cpp | 256 - kabc/addresseelist.h | 221 - kabc/addresslineedit.cpp | 610 - kabc/addresslineedit.h | 123 - kabc/agent.cpp | 148 - kabc/agent.h | 128 - kabc/countrytransl.map | 12381 ------------------- kabc/distributionlist.cpp | 298 - kabc/distributionlist.h | 217 - kabc/distributionlistdialog.cpp | 399 - kabc/distributionlistdialog.h | 139 - kabc/distributionlisteditor.cpp | 310 - kabc/distributionlisteditor.h | 86 - kabc/errorhandler.cpp | 55 - kabc/errorhandler.h | 95 - kabc/field.h | 176 - kabc/format.h | 49 - kabc/formatfactory.cpp | 168 - kabc/formatfactory.h | 101 - kabc/formatplugin.h | 73 - kabc/formats/CMakeLists.txt | 47 - kabc/formats/Makefile.am | 22 - kabc/formats/binary.desktop | 89 - kabc/formats/binaryformat.cpp | 221 - kabc/formats/binaryformat.h | 69 - kabc/geo.cpp | 109 - kabc/geo.h | 101 - kabc/kabc_manager.desktop | 76 - kabc/key.cpp | 153 - kabc/key.h | 150 - kabc/ldapclient.cpp | 427 - kabc/ldapclient.h | 248 - kabc/ldapconfigwidget.cpp | 626 - kabc/ldapconfigwidget.h | 300 - kabc/ldapurl.cpp | 201 - kabc/ldapurl.h | 110 - kabc/ldif.cpp | 365 - kabc/ldif.h | 182 - kabc/ldifconverter.cpp | 573 - kabc/ldifconverter.h | 100 - kabc/lock.cpp | 162 - kabc/lock.h | 88 - kabc/locknull.cpp | 63 - kabc/locknull.h | 54 - kabc/phonenumber.cpp | 213 - kabc/phonenumber.h | 161 - kabc/picture.cpp | 120 - kabc/picture.h | 128 - kabc/plugin.cpp | 61 - kabc/plugin.h | 52 - kabc/plugins/CMakeLists.txt | 15 - kabc/plugins/Makefile.am | 1 - kabc/plugins/dir/CMakeLists.txt | 73 - kabc/plugins/dir/Makefile.am | 28 - kabc/plugins/dir/dir.desktop | 92 - kabc/plugins/dir/resourcedir.cpp | 310 - kabc/plugins/dir/resourcedir.h | 113 - kabc/plugins/dir/resourcedirconfig.cpp | 107 - kabc/plugins/dir/resourcedirconfig.h | 54 - kabc/plugins/dir/resourcedirplugin.cpp | 32 - kabc/plugins/evolution/Makefile.am | 19 - kabc/plugins/evolution/README | 15 - kabc/plugins/evolution/dbwrapper.cpp | 187 - kabc/plugins/evolution/dbwrapper.h | 60 - kabc/plugins/evolution/evolution.desktop | 26 - kabc/plugins/evolution/resourceevo.cpp | 132 - kabc/plugins/evolution/resourceevo.h | 23 - kabc/plugins/file/CMakeLists.txt | 73 - kabc/plugins/file/Makefile.am | 28 - kabc/plugins/file/file.desktop | 82 - kabc/plugins/file/resourcefile.cpp | 395 - kabc/plugins/file/resourcefile.h | 162 - kabc/plugins/file/resourcefileconfig.cpp | 118 - kabc/plugins/file/resourcefileconfig.h | 57 - kabc/plugins/file/resourcefileplugin.cpp | 32 - kabc/plugins/ldaptdeio/CMakeLists.txt | 73 - kabc/plugins/ldaptdeio/Makefile.am | 28 - kabc/plugins/ldaptdeio/ldaptdeio.desktop | 10 - kabc/plugins/ldaptdeio/resourceldaptdeio.cpp | 1041 -- kabc/plugins/ldaptdeio/resourceldaptdeio.h | 171 - kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp | 388 - kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h | 118 - kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp | 36 - kabc/plugins/net/CMakeLists.txt | 73 - kabc/plugins/net/Makefile.am | 28 - kabc/plugins/net/net.desktop | 90 - kabc/plugins/net/resourcenet.cpp | 393 - kabc/plugins/net/resourcenet.h | 117 - kabc/plugins/net/resourcenetconfig.cpp | 102 - kabc/plugins/net/resourcenetconfig.h | 53 - kabc/plugins/net/resourcenetplugin.cpp | 32 - kabc/plugins/sql/Makefile.am | 20 - kabc/plugins/sql/resourcesql.cpp | 338 - kabc/plugins/sql/resourcesql.h | 63 - kabc/plugins/sql/resourcesqlconfig.cpp | 95 - kabc/plugins/sql/resourcesqlconfig.h | 51 - kabc/plugins/sql/sql.desktop | 10 - kabc/resource.cpp | 351 - kabc/resource.h | 319 - kabc/resourceselectdialog.cpp | 111 - kabc/resourceselectdialog.h | 57 - kabc/scripts/Makefile.am | 6 - kabc/scripts/addressee.src.cpp | 1127 -- kabc/scripts/addressee.src.h | 407 - kabc/scripts/createisomap.pl | 35 - kabc/scripts/entrylist | 82 - kabc/scripts/field.src.cpp | 512 - kabc/scripts/makeaddressee | 215 - kabc/secrecy.cpp | 100 - kabc/secrecy.h | 100 - kabc/sortmode.cpp | 79 - kabc/sortmode.h | 114 - kabc/sound.cpp | 118 - kabc/sound.h | 153 - kabc/stdaddressbook.cpp | 203 - kabc/stdaddressbook.h | 153 - kabc/tdeab2tdeabc.cpp | 476 - kabc/tdeab2tdeabc.desktop | 105 - kabc/tests/Makefile.am | 55 - kabc/tests/bigread.cpp | 65 - kabc/tests/bigwrite.cpp | 70 - kabc/tests/kabcargl.cpp | 70 - kabc/tests/testaddressee.cpp | 57 - kabc/tests/testaddresseelist.cpp | 196 - kabc/tests/testaddressfmt.cpp | 63 - kabc/tests/testaddresslineedit.cpp | 29 - kabc/tests/testdb.cpp | 33 - kabc/tests/testdistlist.cpp | 59 - kabc/tests/testkabc.cpp | 62 - kabc/tests/testkabcdlg.cpp | 45 - kabc/tests/testldapclient.cpp | 161 - kabc/tests/testldapclient.h | 51 - kabc/tests/testlock.cpp | 206 - kabc/tests/testlock.h | 51 - kabc/timezone.cpp | 85 - kabc/timezone.h | 89 - kabc/vcard/AdrParam.cpp | 126 - kabc/vcard/AdrValue.cpp | 140 - kabc/vcard/AgentParam.cpp | 103 - kabc/vcard/AgentValue.cpp | 81 - kabc/vcard/CMakeLists.txt | 40 - kabc/vcard/ClassValue.cpp | 120 - kabc/vcard/ContentLine.cpp | 302 - kabc/vcard/DateParam.cpp | 82 - kabc/vcard/DateValue.cpp | 434 - kabc/vcard/EmailParam.cpp | 116 - kabc/vcard/Entity.cpp | 134 - kabc/vcard/Enum.cpp | 490 - kabc/vcard/FloatValue.cpp | 120 - kabc/vcard/GeoValue.cpp | 100 - kabc/vcard/ImageParam.cpp | 81 - kabc/vcard/ImageValue.cpp | 81 - kabc/vcard/ImgValue.cpp | 81 - kabc/vcard/LangValue.cpp | 127 - kabc/vcard/Makefile.am | 21 - kabc/vcard/NValue.cpp | 128 - kabc/vcard/OrgValue.cpp | 107 - kabc/vcard/Param.cpp | 129 - kabc/vcard/PhoneNumberValue.cpp | 81 - kabc/vcard/README | 15 - kabc/vcard/RToken.cpp | 88 - kabc/vcard/SoundValue.cpp | 81 - kabc/vcard/SourceParam.cpp | 112 - kabc/vcard/TelParam.cpp | 81 - kabc/vcard/TelValue.cpp | 81 - kabc/vcard/TextBinParam.cpp | 81 - kabc/vcard/TextBinValue.cpp | 104 - kabc/vcard/TextListValue.cpp | 107 - kabc/vcard/TextParam.cpp | 82 - kabc/vcard/TextValue.cpp | 86 - kabc/vcard/URIValue.cpp | 133 - kabc/vcard/UTCValue.cpp | 110 - kabc/vcard/VCard.cpp | 283 - kabc/vcard/VCardEntity.cpp | 119 - kabc/vcard/Value.cpp | 81 - kabc/vcard/include/VCard.h | 43 - kabc/vcard/include/VCardAdrParam.h | 64 - kabc/vcard/include/VCardAdrValue.h | 83 - kabc/vcard/include/VCardAgentParam.h | 60 - kabc/vcard/include/VCardAgentValue.h | 44 - kabc/vcard/include/VCardClassValue.h | 56 - kabc/vcard/include/VCardContentLine.h | 77 - kabc/vcard/include/VCardDateParam.h | 44 - kabc/vcard/include/VCardDateValue.h | 99 - kabc/vcard/include/VCardDefines.h | 52 - kabc/vcard/include/VCardEmailParam.h | 56 - kabc/vcard/include/VCardEntity.h | 68 - kabc/vcard/include/VCardEnum.h | 123 - kabc/vcard/include/VCardFloatValue.h | 51 - kabc/vcard/include/VCardGeoValue.h | 49 - kabc/vcard/include/VCardGroup.h | 39 - kabc/vcard/include/VCardImageParam.h | 44 - kabc/vcard/include/VCardImageValue.h | 44 - kabc/vcard/include/VCardImgValue.h | 39 - kabc/vcard/include/VCardLangValue.h | 51 - kabc/vcard/include/VCardNValue.h | 56 - kabc/vcard/include/VCardOrgValue.h | 50 - kabc/vcard/include/VCardParam.h | 59 - kabc/vcard/include/VCardPhoneNumberValue.h | 39 - kabc/vcard/include/VCardRToken.h | 40 - kabc/vcard/include/VCardSndValue.h | 39 - kabc/vcard/include/VCardSoundValue.h | 44 - kabc/vcard/include/VCardSourceParam.h | 58 - kabc/vcard/include/VCardTelParam.h | 51 - kabc/vcard/include/VCardTelValue.h | 44 - kabc/vcard/include/VCardTextBinParam.h | 44 - kabc/vcard/include/VCardTextBinValue.h | 67 - kabc/vcard/include/VCardTextListValue.h | 51 - kabc/vcard/include/VCardTextParam.h | 44 - kabc/vcard/include/VCardTextValue.h | 41 - kabc/vcard/include/VCardURIValue.h | 52 - kabc/vcard/include/VCardUTCValue.h | 58 - kabc/vcard/include/VCardVCard.h | 63 - kabc/vcard/include/VCardVCardEntity.h | 56 - kabc/vcard/include/VCardValue.h | 46 - kabc/vcard/include/generated/AdrParam-generated.h | 23 - kabc/vcard/include/generated/AdrValue-generated.h | 23 - .../vcard/include/generated/AgentParam-generated.h | 23 - .../vcard/include/generated/AgentValue-generated.h | 23 - .../vcard/include/generated/ClassValue-generated.h | 23 - .../include/generated/ContentLine-generated.h | 23 - kabc/vcard/include/generated/DateParam-generated.h | 23 - kabc/vcard/include/generated/DateValue-generated.h | 23 - .../vcard/include/generated/EmailParam-generated.h | 23 - .../vcard/include/generated/FloatValue-generated.h | 23 - kabc/vcard/include/generated/GeoValue-generated.h | 23 - kabc/vcard/include/generated/Group-generated.h | 23 - .../vcard/include/generated/ImageParam-generated.h | 23 - .../vcard/include/generated/ImageValue-generated.h | 23 - kabc/vcard/include/generated/ImgParam-generated.h | 23 - kabc/vcard/include/generated/ImgValue-generated.h | 23 - kabc/vcard/include/generated/LangValue-generated.h | 23 - kabc/vcard/include/generated/NValue-generated.h | 23 - kabc/vcard/include/generated/Name-generated.h | 22 - kabc/vcard/include/generated/OrgValue-generated.h | 23 - kabc/vcard/include/generated/Param-generated.h | 23 - kabc/vcard/include/generated/ParamName-generated.h | 22 - .../vcard/include/generated/ParamValue-generated.h | 22 - .../include/generated/PhoneNumberValue-generated.h | 23 - .../vcard/include/generated/SoundValue-generated.h | 23 - .../include/generated/SourceParam-generated.h | 23 - kabc/vcard/include/generated/TelParam-generated.h | 23 - kabc/vcard/include/generated/TelValue-generated.h | 23 - .../include/generated/TextBinParam-generated.h | 23 - .../include/generated/TextBinValue-generated.h | 23 - .../include/generated/TextListValue-generated.h | 23 - .../include/generated/TextNSParam-generated.h | 23 - kabc/vcard/include/generated/TextParam-generated.h | 23 - kabc/vcard/include/generated/TextValue-generated.h | 23 - kabc/vcard/include/generated/URIValue-generated.h | 23 - kabc/vcard/include/generated/UTCValue-generated.h | 23 - kabc/vcard/include/generated/VCard-generated.h | 23 - .../include/generated/VCardEntity-generated.h | 23 - kabc/vcard/include/generated/Value-generated.h | 23 - kabc/vcard/include/generated/generate | 2 - kabc/vcard/include/generated/generateHeaders.awk | 41 - kabc/vcard/include/generated/headerBodies | 34 - kabc/vcard/testread.cpp | 129 - kabc/vcard/testwrite.cpp | 41 - kabc/vcard/vCard-all.cpp | 37 - kabc/vcard21parser.cpp | 608 - kabc/vcard21parser.h | 221 - kabc/vcardconverter.cpp | 129 - kabc/vcardconverter.h | 163 - kabc/vcardformat.cpp | 59 - kabc/vcardformat.h | 49 - kabc/vcardformatimpl.cpp | 1001 -- kabc/vcardformatimpl.h | 106 - kabc/vcardformatplugin.cpp | 120 - kabc/vcardformatplugin.h | 56 - kabc/vcardparser/CMakeLists.txt | 40 - kabc/vcardparser/Makefile.am | 31 - kabc/vcardparser/README.testing | 15 - kabc/vcardparser/checkvcard.pl | 75 - kabc/vcardparser/testread.cpp | 89 - kabc/vcardparser/testread2.cpp | 42 - kabc/vcardparser/tests/vcard1.vcf | 13 - kabc/vcardparser/tests/vcard1.vcf.ref | 15 - kabc/vcardparser/tests/vcard2.vcf | 11 - kabc/vcardparser/tests/vcard2.vcf.ref | 12 - kabc/vcardparser/tests/vcard3.vcf | 11 - kabc/vcardparser/tests/vcard3.vcf.ref | 12 - kabc/vcardparser/tests/vcard4.vcf | 14 - kabc/vcardparser/tests/vcard4.vcf.ref | 14 - kabc/vcardparser/tests/vcard5.vcf | 313 - kabc/vcardparser/tests/vcard5.vcf.ref | 313 - kabc/vcardparser/tests/vcard6.vcf | 10 - kabc/vcardparser/tests/vcard6.vcf.ref | 10 - kabc/vcardparser/tests/vcard7.vcf | 7 - kabc/vcardparser/tests/vcard7.vcf.ref | 8 - kabc/vcardparser/testutils.cpp | 99 - kabc/vcardparser/testutils.h | 14 - kabc/vcardparser/testwrite.cpp | 134 - kabc/vcardparser/vcard.cpp | 109 - kabc/vcardparser/vcard.h | 91 - kabc/vcardparser/vcardline.cpp | 151 - kabc/vcardparser/vcardline.h | 115 - kabc/vcardparser/vcardparser.cpp | 297 - kabc/vcardparser/vcardparser.h | 44 - kabc/vcardtool.cpp | 896 -- kabc/vcardtool.h | 88 - kate/part/kateautoindent.cpp | 2 +- kate/part/katebookmarks.cpp | 2 +- kate/part/katebuffer.cpp | 2 +- kate/part/katecmds.cpp | 2 +- kate/part/kateconfig.cpp | 4 +- kate/part/katedialogs.cpp | 10 +- kate/part/katedocument.cpp | 10 +- kate/part/katedocument.h | 2 +- kate/part/katedocumenthelpers.cpp | 2 +- kate/part/katefactory.cpp | 2 +- kate/part/katefiletype.cpp | 2 +- kate/part/katefont.cpp | 2 +- kate/part/katehighlight.cpp | 8 +- kate/part/katejscript.cpp | 4 +- kate/part/kateluaindentscript.cpp | 4 +- kate/part/kateprinter.cpp | 2 +- kate/part/kateschema.cpp | 4 +- kate/part/katesearch.cpp | 4 +- kate/part/katespell.cpp | 2 +- kate/part/katesyntaxdocument.cpp | 4 +- kate/part/katetextline.cpp | 2 +- kate/part/kateview.cpp | 8 +- kate/part/kateviewhelpers.cpp | 6 +- kate/part/kateviewinternal.cpp | 2 +- kate/part/test_regression.cpp | 2 +- kate/plugins/autobookmarker/autobookmarker.cpp | 2 +- kate/plugins/insertfile/insertfileplugin.cpp | 6 +- kate/plugins/isearch/ISearchPlugin.cpp | 2 +- kate/plugins/kdatatool/kate_kdatatool.cpp | 2 +- kate/plugins/wordcompletion/docwordcompletion.cpp | 2 +- kded/kbuildimageiofactory.cpp | 4 +- kded/kbuildprotocolinfofactory.cpp | 4 +- kded/kbuildservicefactory.cpp | 4 +- kded/kbuildservicegroupfactory.cpp | 4 +- kded/kbuildservicetypefactory.cpp | 4 +- kded/kded.cpp | 4 +- kded/khostname.cpp | 4 +- kded/tde-menu.cpp | 4 +- kded/tdebuildsycoca.cpp | 6 +- kded/vfolder_menu.cpp | 2 +- kdewidgets/CMakeLists.txt | 2 +- kdewidgets/kde.widgets | 2 +- kdewidgets/tests/test.widgets | 2 +- kdoctools/meinproc.cpp | 2 +- kdoctools/tdeio_help.cpp | 4 +- kdoctools/xslt.cpp | 2 +- kimgio/dds.cpp | 2 +- kimgio/eps.cpp | 2 +- kimgio/exr.cpp | 2 +- kimgio/gimp.h | 2 +- kimgio/hdr.cpp | 2 +- kimgio/jp2.cpp | 2 +- kinit/autostart.cpp | 2 +- kinit/kinit.cpp | 6 +- kinit/tdelauncher.cpp | 8 +- kinit/tdelauncher_main.cpp | 2 +- knewstuff/downloaddialog.cpp | 4 +- knewstuff/engine.cpp | 4 +- knewstuff/entry.cpp | 4 +- knewstuff/ghns.cpp | 2 +- knewstuff/knewstuff.cpp | 2 +- knewstuff/knewstuffbutton.cpp | 2 +- knewstuff/knewstuffgeneric.cpp | 4 +- knewstuff/knewstuffsecure.cpp | 6 +- knewstuff/provider.cpp | 6 +- knewstuff/providerdialog.cpp | 4 +- knewstuff/security.cpp | 4 +- knewstuff/tdehotnewstuff.cpp | 2 +- knewstuff/testnewstuff.cpp | 2 +- knewstuff/uploaddialog.cpp | 4 +- kstyles/highcontrast/config/highcontrastconfig.cpp | 4 +- kstyles/klegacy/klegacystyle.cpp | 2 +- kstyles/klegacy/plugin.cpp | 2 +- kstyles/kthemestyle/kthemestyle.cpp | 2 +- kstyles/plastik/config/plastitdeconf.cpp | 4 +- kstyles/utils/installtheme/main.cpp | 4 +- kstyles/web/plugin.cpp | 2 +- kstyles/web/webstyle.cpp | 2 +- libtdemid/deviceman.cc | 2 +- libtdescreensaver/main.cpp | 4 +- networkstatus/connectionmanager.cpp | 4 +- networkstatus/networkstatusindicator.cpp | 2 +- tdeabc/CMakeLists.txt | 123 + tdeabc/HACKING | 100 + tdeabc/HOWTO | 372 + tdeabc/Makefile.am | 72 + tdeabc/README | 28 + tdeabc/README.AddressFormat | 66 + tdeabc/TODO | 1 + tdeabc/address.cpp | 592 + tdeabc/address.h | 341 + tdeabc/addressbook.cpp | 842 ++ tdeabc/addressbook.h | 431 + tdeabc/addresseedialog.cpp | 259 + tdeabc/addresseedialog.h | 161 + tdeabc/addresseehelper.cpp | 111 + tdeabc/addresseehelper.h | 66 + tdeabc/addresseelist.cpp | 256 + tdeabc/addresseelist.h | 221 + tdeabc/addresslineedit.cpp | 610 + tdeabc/addresslineedit.h | 123 + tdeabc/agent.cpp | 148 + tdeabc/agent.h | 128 + tdeabc/countrytransl.map | 12381 +++++++++++++++++++ tdeabc/distributionlist.cpp | 298 + tdeabc/distributionlist.h | 217 + tdeabc/distributionlistdialog.cpp | 399 + tdeabc/distributionlistdialog.h | 139 + tdeabc/distributionlisteditor.cpp | 310 + tdeabc/distributionlisteditor.h | 86 + tdeabc/errorhandler.cpp | 55 + tdeabc/errorhandler.h | 95 + tdeabc/field.h | 176 + tdeabc/format.h | 49 + tdeabc/formatfactory.cpp | 168 + tdeabc/formatfactory.h | 101 + tdeabc/formatplugin.h | 73 + tdeabc/formats/CMakeLists.txt | 47 + tdeabc/formats/Makefile.am | 22 + tdeabc/formats/binary.desktop | 89 + tdeabc/formats/binaryformat.cpp | 221 + tdeabc/formats/binaryformat.h | 69 + tdeabc/geo.cpp | 109 + tdeabc/geo.h | 101 + tdeabc/kabc_manager.desktop | 76 + tdeabc/key.cpp | 153 + tdeabc/key.h | 150 + tdeabc/ldapclient.cpp | 427 + tdeabc/ldapclient.h | 248 + tdeabc/ldapconfigwidget.cpp | 626 + tdeabc/ldapconfigwidget.h | 300 + tdeabc/ldapurl.cpp | 201 + tdeabc/ldapurl.h | 110 + tdeabc/ldif.cpp | 365 + tdeabc/ldif.h | 182 + tdeabc/ldifconverter.cpp | 573 + tdeabc/ldifconverter.h | 100 + tdeabc/lock.cpp | 162 + tdeabc/lock.h | 88 + tdeabc/locknull.cpp | 63 + tdeabc/locknull.h | 54 + tdeabc/phonenumber.cpp | 213 + tdeabc/phonenumber.h | 161 + tdeabc/picture.cpp | 120 + tdeabc/picture.h | 128 + tdeabc/plugin.cpp | 61 + tdeabc/plugin.h | 52 + tdeabc/plugins/CMakeLists.txt | 15 + tdeabc/plugins/Makefile.am | 1 + tdeabc/plugins/dir/CMakeLists.txt | 73 + tdeabc/plugins/dir/Makefile.am | 28 + tdeabc/plugins/dir/dir.desktop | 92 + tdeabc/plugins/dir/resourcedir.cpp | 310 + tdeabc/plugins/dir/resourcedir.h | 113 + tdeabc/plugins/dir/resourcedirconfig.cpp | 107 + tdeabc/plugins/dir/resourcedirconfig.h | 54 + tdeabc/plugins/dir/resourcedirplugin.cpp | 32 + tdeabc/plugins/evolution/Makefile.am | 19 + tdeabc/plugins/evolution/README | 15 + tdeabc/plugins/evolution/dbwrapper.cpp | 187 + tdeabc/plugins/evolution/dbwrapper.h | 60 + tdeabc/plugins/evolution/evolution.desktop | 26 + tdeabc/plugins/evolution/resourceevo.cpp | 132 + tdeabc/plugins/evolution/resourceevo.h | 23 + tdeabc/plugins/file/CMakeLists.txt | 73 + tdeabc/plugins/file/Makefile.am | 28 + tdeabc/plugins/file/file.desktop | 82 + tdeabc/plugins/file/resourcefile.cpp | 395 + tdeabc/plugins/file/resourcefile.h | 162 + tdeabc/plugins/file/resourcefileconfig.cpp | 118 + tdeabc/plugins/file/resourcefileconfig.h | 57 + tdeabc/plugins/file/resourcefileplugin.cpp | 32 + tdeabc/plugins/ldaptdeio/CMakeLists.txt | 73 + tdeabc/plugins/ldaptdeio/Makefile.am | 28 + tdeabc/plugins/ldaptdeio/ldaptdeio.desktop | 10 + tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp | 1041 ++ tdeabc/plugins/ldaptdeio/resourceldaptdeio.h | 171 + .../plugins/ldaptdeio/resourceldaptdeioconfig.cpp | 388 + tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h | 118 + .../plugins/ldaptdeio/resourceldaptdeioplugin.cpp | 36 + tdeabc/plugins/net/CMakeLists.txt | 73 + tdeabc/plugins/net/Makefile.am | 28 + tdeabc/plugins/net/net.desktop | 90 + tdeabc/plugins/net/resourcenet.cpp | 393 + tdeabc/plugins/net/resourcenet.h | 117 + tdeabc/plugins/net/resourcenetconfig.cpp | 102 + tdeabc/plugins/net/resourcenetconfig.h | 53 + tdeabc/plugins/net/resourcenetplugin.cpp | 32 + tdeabc/plugins/sql/Makefile.am | 20 + tdeabc/plugins/sql/resourcesql.cpp | 338 + tdeabc/plugins/sql/resourcesql.h | 63 + tdeabc/plugins/sql/resourcesqlconfig.cpp | 95 + tdeabc/plugins/sql/resourcesqlconfig.h | 51 + tdeabc/plugins/sql/sql.desktop | 10 + tdeabc/resource.cpp | 351 + tdeabc/resource.h | 319 + tdeabc/resourceselectdialog.cpp | 111 + tdeabc/resourceselectdialog.h | 57 + tdeabc/scripts/Makefile.am | 6 + tdeabc/scripts/addressee.src.cpp | 1127 ++ tdeabc/scripts/addressee.src.h | 407 + tdeabc/scripts/createisomap.pl | 35 + tdeabc/scripts/entrylist | 82 + tdeabc/scripts/field.src.cpp | 512 + tdeabc/scripts/makeaddressee | 215 + tdeabc/secrecy.cpp | 100 + tdeabc/secrecy.h | 100 + tdeabc/sortmode.cpp | 79 + tdeabc/sortmode.h | 114 + tdeabc/sound.cpp | 118 + tdeabc/sound.h | 153 + tdeabc/stdaddressbook.cpp | 203 + tdeabc/stdaddressbook.h | 153 + tdeabc/tdeab2tdeabc.cpp | 476 + tdeabc/tdeab2tdeabc.desktop | 105 + tdeabc/tests/Makefile.am | 55 + tdeabc/tests/bigread.cpp | 65 + tdeabc/tests/bigwrite.cpp | 70 + tdeabc/tests/kabcargl.cpp | 70 + tdeabc/tests/testaddressee.cpp | 57 + tdeabc/tests/testaddresseelist.cpp | 196 + tdeabc/tests/testaddressfmt.cpp | 63 + tdeabc/tests/testaddresslineedit.cpp | 29 + tdeabc/tests/testdb.cpp | 33 + tdeabc/tests/testdistlist.cpp | 59 + tdeabc/tests/testkabc.cpp | 62 + tdeabc/tests/testkabcdlg.cpp | 45 + tdeabc/tests/testldapclient.cpp | 161 + tdeabc/tests/testldapclient.h | 51 + tdeabc/tests/testlock.cpp | 206 + tdeabc/tests/testlock.h | 51 + tdeabc/timezone.cpp | 85 + tdeabc/timezone.h | 89 + tdeabc/vcard/AdrParam.cpp | 126 + tdeabc/vcard/AdrValue.cpp | 140 + tdeabc/vcard/AgentParam.cpp | 103 + tdeabc/vcard/AgentValue.cpp | 81 + tdeabc/vcard/CMakeLists.txt | 40 + tdeabc/vcard/ClassValue.cpp | 120 + tdeabc/vcard/ContentLine.cpp | 302 + tdeabc/vcard/DateParam.cpp | 82 + tdeabc/vcard/DateValue.cpp | 434 + tdeabc/vcard/EmailParam.cpp | 116 + tdeabc/vcard/Entity.cpp | 134 + tdeabc/vcard/Enum.cpp | 490 + tdeabc/vcard/FloatValue.cpp | 120 + tdeabc/vcard/GeoValue.cpp | 100 + tdeabc/vcard/ImageParam.cpp | 81 + tdeabc/vcard/ImageValue.cpp | 81 + tdeabc/vcard/ImgValue.cpp | 81 + tdeabc/vcard/LangValue.cpp | 127 + tdeabc/vcard/Makefile.am | 21 + tdeabc/vcard/NValue.cpp | 128 + tdeabc/vcard/OrgValue.cpp | 107 + tdeabc/vcard/Param.cpp | 129 + tdeabc/vcard/PhoneNumberValue.cpp | 81 + tdeabc/vcard/README | 15 + tdeabc/vcard/RToken.cpp | 88 + tdeabc/vcard/SoundValue.cpp | 81 + tdeabc/vcard/SourceParam.cpp | 112 + tdeabc/vcard/TelParam.cpp | 81 + tdeabc/vcard/TelValue.cpp | 81 + tdeabc/vcard/TextBinParam.cpp | 81 + tdeabc/vcard/TextBinValue.cpp | 104 + tdeabc/vcard/TextListValue.cpp | 107 + tdeabc/vcard/TextParam.cpp | 82 + tdeabc/vcard/TextValue.cpp | 86 + tdeabc/vcard/URIValue.cpp | 133 + tdeabc/vcard/UTCValue.cpp | 110 + tdeabc/vcard/VCard.cpp | 283 + tdeabc/vcard/VCardEntity.cpp | 119 + tdeabc/vcard/Value.cpp | 81 + tdeabc/vcard/include/VCard.h | 43 + tdeabc/vcard/include/VCardAdrParam.h | 64 + tdeabc/vcard/include/VCardAdrValue.h | 83 + tdeabc/vcard/include/VCardAgentParam.h | 60 + tdeabc/vcard/include/VCardAgentValue.h | 44 + tdeabc/vcard/include/VCardClassValue.h | 56 + tdeabc/vcard/include/VCardContentLine.h | 77 + tdeabc/vcard/include/VCardDateParam.h | 44 + tdeabc/vcard/include/VCardDateValue.h | 99 + tdeabc/vcard/include/VCardDefines.h | 52 + tdeabc/vcard/include/VCardEmailParam.h | 56 + tdeabc/vcard/include/VCardEntity.h | 68 + tdeabc/vcard/include/VCardEnum.h | 123 + tdeabc/vcard/include/VCardFloatValue.h | 51 + tdeabc/vcard/include/VCardGeoValue.h | 49 + tdeabc/vcard/include/VCardGroup.h | 39 + tdeabc/vcard/include/VCardImageParam.h | 44 + tdeabc/vcard/include/VCardImageValue.h | 44 + tdeabc/vcard/include/VCardImgValue.h | 39 + tdeabc/vcard/include/VCardLangValue.h | 51 + tdeabc/vcard/include/VCardNValue.h | 56 + tdeabc/vcard/include/VCardOrgValue.h | 50 + tdeabc/vcard/include/VCardParam.h | 59 + tdeabc/vcard/include/VCardPhoneNumberValue.h | 39 + tdeabc/vcard/include/VCardRToken.h | 40 + tdeabc/vcard/include/VCardSndValue.h | 39 + tdeabc/vcard/include/VCardSoundValue.h | 44 + tdeabc/vcard/include/VCardSourceParam.h | 58 + tdeabc/vcard/include/VCardTelParam.h | 51 + tdeabc/vcard/include/VCardTelValue.h | 44 + tdeabc/vcard/include/VCardTextBinParam.h | 44 + tdeabc/vcard/include/VCardTextBinValue.h | 67 + tdeabc/vcard/include/VCardTextListValue.h | 51 + tdeabc/vcard/include/VCardTextParam.h | 44 + tdeabc/vcard/include/VCardTextValue.h | 41 + tdeabc/vcard/include/VCardURIValue.h | 52 + tdeabc/vcard/include/VCardUTCValue.h | 58 + tdeabc/vcard/include/VCardVCard.h | 63 + tdeabc/vcard/include/VCardVCardEntity.h | 56 + tdeabc/vcard/include/VCardValue.h | 46 + .../vcard/include/generated/AdrParam-generated.h | 23 + .../vcard/include/generated/AdrValue-generated.h | 23 + .../vcard/include/generated/AgentParam-generated.h | 23 + .../vcard/include/generated/AgentValue-generated.h | 23 + .../vcard/include/generated/ClassValue-generated.h | 23 + .../include/generated/ContentLine-generated.h | 23 + .../vcard/include/generated/DateParam-generated.h | 23 + .../vcard/include/generated/DateValue-generated.h | 23 + .../vcard/include/generated/EmailParam-generated.h | 23 + .../vcard/include/generated/FloatValue-generated.h | 23 + .../vcard/include/generated/GeoValue-generated.h | 23 + tdeabc/vcard/include/generated/Group-generated.h | 23 + .../vcard/include/generated/ImageParam-generated.h | 23 + .../vcard/include/generated/ImageValue-generated.h | 23 + .../vcard/include/generated/ImgParam-generated.h | 23 + .../vcard/include/generated/ImgValue-generated.h | 23 + .../vcard/include/generated/LangValue-generated.h | 23 + tdeabc/vcard/include/generated/NValue-generated.h | 23 + tdeabc/vcard/include/generated/Name-generated.h | 22 + .../vcard/include/generated/OrgValue-generated.h | 23 + tdeabc/vcard/include/generated/Param-generated.h | 23 + .../vcard/include/generated/ParamName-generated.h | 22 + .../vcard/include/generated/ParamValue-generated.h | 22 + .../include/generated/PhoneNumberValue-generated.h | 23 + .../vcard/include/generated/SoundValue-generated.h | 23 + .../include/generated/SourceParam-generated.h | 23 + .../vcard/include/generated/TelParam-generated.h | 23 + .../vcard/include/generated/TelValue-generated.h | 23 + .../include/generated/TextBinParam-generated.h | 23 + .../include/generated/TextBinValue-generated.h | 23 + .../include/generated/TextListValue-generated.h | 23 + .../include/generated/TextNSParam-generated.h | 23 + .../vcard/include/generated/TextParam-generated.h | 23 + .../vcard/include/generated/TextValue-generated.h | 23 + .../vcard/include/generated/URIValue-generated.h | 23 + .../vcard/include/generated/UTCValue-generated.h | 23 + tdeabc/vcard/include/generated/VCard-generated.h | 23 + .../include/generated/VCardEntity-generated.h | 23 + tdeabc/vcard/include/generated/Value-generated.h | 23 + tdeabc/vcard/include/generated/generate | 2 + tdeabc/vcard/include/generated/generateHeaders.awk | 41 + tdeabc/vcard/include/generated/headerBodies | 34 + tdeabc/vcard/testread.cpp | 129 + tdeabc/vcard/testwrite.cpp | 41 + tdeabc/vcard/vCard-all.cpp | 37 + tdeabc/vcard21parser.cpp | 608 + tdeabc/vcard21parser.h | 221 + tdeabc/vcardconverter.cpp | 129 + tdeabc/vcardconverter.h | 163 + tdeabc/vcardformat.cpp | 59 + tdeabc/vcardformat.h | 49 + tdeabc/vcardformatimpl.cpp | 1001 ++ tdeabc/vcardformatimpl.h | 106 + tdeabc/vcardformatplugin.cpp | 120 + tdeabc/vcardformatplugin.h | 56 + tdeabc/vcardparser/CMakeLists.txt | 40 + tdeabc/vcardparser/Makefile.am | 31 + tdeabc/vcardparser/README.testing | 15 + tdeabc/vcardparser/checkvcard.pl | 75 + tdeabc/vcardparser/testread.cpp | 89 + tdeabc/vcardparser/testread2.cpp | 42 + tdeabc/vcardparser/tests/vcard1.vcf | 13 + tdeabc/vcardparser/tests/vcard1.vcf.ref | 15 + tdeabc/vcardparser/tests/vcard2.vcf | 11 + tdeabc/vcardparser/tests/vcard2.vcf.ref | 12 + tdeabc/vcardparser/tests/vcard3.vcf | 11 + tdeabc/vcardparser/tests/vcard3.vcf.ref | 12 + tdeabc/vcardparser/tests/vcard4.vcf | 14 + tdeabc/vcardparser/tests/vcard4.vcf.ref | 14 + tdeabc/vcardparser/tests/vcard5.vcf | 313 + tdeabc/vcardparser/tests/vcard5.vcf.ref | 313 + tdeabc/vcardparser/tests/vcard6.vcf | 10 + tdeabc/vcardparser/tests/vcard6.vcf.ref | 10 + tdeabc/vcardparser/tests/vcard7.vcf | 7 + tdeabc/vcardparser/tests/vcard7.vcf.ref | 8 + tdeabc/vcardparser/testutils.cpp | 99 + tdeabc/vcardparser/testutils.h | 14 + tdeabc/vcardparser/testwrite.cpp | 134 + tdeabc/vcardparser/vcard.cpp | 109 + tdeabc/vcardparser/vcard.h | 91 + tdeabc/vcardparser/vcardline.cpp | 151 + tdeabc/vcardparser/vcardline.h | 115 + tdeabc/vcardparser/vcardparser.cpp | 297 + tdeabc/vcardparser/vcardparser.h | 44 + tdeabc/vcardtool.cpp | 896 ++ tdeabc/vcardtool.h | 88 + tdecert/tdecertpart.cc | 4 +- tdecmshell/main.cpp | 6 +- tdeconf_update/tdeconf_update.cpp | 6 +- tdecore/CMakeLists.txt | 16 +- tdecore/MAINTAINERS | 10 +- tdecore/Makefile.am | 16 +- tdecore/kappdcopiface.cpp | 2 +- tdecore/kapplication_win.cpp | 2 +- tdecore/kcalendarsystem.cpp | 4 +- tdecore/kcalendarsystemgregorian.cpp | 2 +- tdecore/kcalendarsystemhebrew.cpp | 2 +- tdecore/kcalendarsystemhijri.cpp | 2 +- tdecore/kcalendarsystemjalali.cpp | 4 +- tdecore/kcharsets.cpp | 4 +- tdecore/kcheckaccelerators.cpp | 4 +- tdecore/kclipboard.cpp | 2 +- tdecore/kcompletion.cpp | 4 +- tdecore/kcompletion.h | 2 +- tdecore/kcrash.cpp | 2 +- tdecore/kdebug.areas | 2 +- tdecore/kdebug.cpp | 4 +- tdecore/kdebugrc | 2 +- tdecore/kdesktopfile.cpp | 2 +- tdecore/kdetcompmgr.cpp | 2 +- tdecore/kgenericfactory.h | 4 +- tdecore/kglobal.cpp | 6 +- tdecore/kglobalaccel.cpp | 2 +- tdecore/kglobalsettings.cpp | 6 +- tdecore/kiconeffect.cpp | 4 +- tdecore/kiconloader.cpp | 2 +- tdecore/kiconloader.h | 2 +- tdecore/kicontheme.cpp | 2 +- tdecore/kinstance.cpp | 4 +- tdecore/kkeynative_x11.cpp | 2 +- tdecore/kkeyserver_x11.cpp | 4 +- tdecore/klibloader.cpp | 2 +- tdecore/klibloader.h | 2 +- tdecore/klocale.cpp | 4 +- tdecore/klocale.h | 2 +- tdecore/klockfile.cpp | 4 +- tdecore/kmimesourcefactory.cpp | 2 +- tdecore/kmimesourcefactory.h | 2 +- tdecore/kpalette.cpp | 2 +- tdecore/kprotocolinfo_tdecore.cpp | 2 +- tdecore/kprotocolinfofactory.cpp | 2 +- tdecore/krootprop.cpp | 4 +- tdecore/ksavefile.h | 2 +- tdecore/ksimpleconfig.cpp | 2 +- tdecore/ksimpledirwatch.cpp | 2 +- tdecore/ksockaddr.cpp | 2 +- tdecore/ksocks.cpp | 2 +- tdecore/kstandarddirs.h | 2 +- tdecore/kstartupinfo.cpp | 4 +- tdecore/kstartupinfo.h | 2 +- tdecore/kstaticdeleter.h | 2 +- tdecore/kstringhandler.cpp | 2 +- tdecore/ktempdir.cpp | 2 +- tdecore/ktempfile.cpp | 4 +- tdecore/ktimezones.cpp | 2 +- tdecore/kuniqueapplication.cpp | 2 +- tdecore/kurl.cpp | 2 +- tdecore/kurldrag.cpp | 4 +- tdecore/kvmallocator.cpp | 2 +- tdecore/netsupp.cpp | 2 +- tdecore/network/kresolver.cpp | 2 +- tdecore/network/kresolverstandardworkers.cpp | 2 +- tdecore/network/tdesocketaddress.cpp | 2 +- tdecore/network/tdesocketbase.cpp | 2 +- .../network-manager/network-manager_p.h | 2 +- tdecore/tde-config.cpp.cmake | 6 +- tdecore/tde-config.cpp.in | 6 +- tdecore/tdeaboutdata.h | 2 +- tdecore/tdeaccel.cpp | 2 +- tdecore/tdeaccelaction.cpp | 4 +- tdecore/tdeaccelbase.cpp | 4 +- tdecore/tdeapplication.cpp | 8 +- tdecore/tdecmdlineargs.cpp | 4 +- tdecore/tdeconfig.cpp | 2 +- tdecore/tdeconfig_compiler/example/autoexample.cpp | 4 +- tdecore/tdeconfig_compiler/example/example.cpp | 4 +- tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp | 8 +- tdecore/tdeconfig_compiler/tests/test2.cpp.ref | 2 +- tdecore/tdeconfig_compiler/tests/test8a.h.ref | 2 +- .../tdeconfig_compiler/tests/test_dpointer.cpp.ref | 2 +- tdecore/tdeconfigbackend.cpp | 4 +- tdecore/tdeconfigbackend.h | 2 +- tdecore/tdeconfigbase.cpp | 4 +- tdecore/tdeconfigdialogmanager.cpp | 2 +- tdecore/tdeconfigskeleton.cpp | 4 +- tdecore/tdeconfigskeleton.h | 2 +- tdecore/tdehardwaredevices.cpp | 6 +- tdecore/tdenetworkconnections.cpp | 2 +- tdecore/tdeshortcut.cpp | 4 +- tdecore/tdeshortcutlist.cpp | 2 +- tdecore/tdeshortcutmenu.cpp | 2 +- tdecore/tdestdaccel.cpp | 4 +- tdecore/tdesycoca.cpp | 2 +- tdecore/tests/Makefile.am | 2 +- tdecore/tests/kapptest.cpp | 2 +- tdecore/tests/kcalendartest.cpp | 4 +- tdecore/tests/kcmdlineargstest.cpp | 2 +- tdecore/tests/kglobaltest.cpp | 2 +- tdecore/tests/klocaletest.cpp | 6 +- tdecore/tests/kmdcodectest.cpp | 2 +- tdecore/tests/krfcdatetest.cpp | 2 +- tdecore/tests/ksocktest.cpp | 2 +- tdecore/tests/ktempfiletest.cpp | 2 +- tdecore/tests/kuniqueapptest.cpp | 2 +- tdecore/tests/kurltest.cpp | 2 +- tdecore/tests/startserviceby.cpp | 2 +- tdecore/tests/testqtargs.cpp | 2 +- tdecore/twin.cpp | 6 +- tdecore/twinmodule.cpp | 2 +- tdefile-plugins/elf/tdefile_elf.cpp | 2 +- tdehtml/css/csshelper.cpp | 2 +- tdehtml/css/cssparser.cpp | 2 +- tdehtml/css/cssstyleselector.cpp | 2 +- tdehtml/ecma/kjs_debugwin.cpp | 10 +- tdehtml/ecma/kjs_html.cpp | 4 +- tdehtml/ecma/kjs_mozilla.cpp | 2 +- tdehtml/ecma/kjs_navigator.cpp | 4 +- tdehtml/ecma/kjs_proxy.cpp | 6 +- tdehtml/ecma/kjs_window.cpp | 6 +- tdehtml/html/dtd.cpp | 2 +- tdehtml/html/html_documentimpl.cpp | 4 +- tdehtml/html/html_elementimpl.cpp | 2 +- tdehtml/html/html_formimpl.cpp | 6 +- tdehtml/html/html_imageimpl.cpp | 2 +- tdehtml/html/html_tableimpl.cpp | 2 +- tdehtml/html/htmlparser.cpp | 2 +- tdehtml/html/htmltokenizer.cpp | 2 +- tdehtml/java/kjavaapplet.cpp | 2 +- tdehtml/java/kjavaappletcontext.cpp | 4 +- tdehtml/java/kjavaappletserver.cpp | 4 +- tdehtml/java/kjavaappletviewer.cpp | 2 +- tdehtml/java/kjavaappletwidget.cpp | 2 +- tdehtml/java/kjavaprocess.cpp | 2 +- tdehtml/misc/arena.cpp | 2 +- tdehtml/misc/decoder.cpp | 4 +- tdehtml/misc/htmlhashes.cpp | 2 +- tdehtml/misc/htmltags.h | 2 +- tdehtml/misc/knsplugininstaller.cpp | 6 +- tdehtml/misc/loader.cpp | 4 +- tdehtml/misc/loader_jpeg.cpp | 2 +- tdehtml/misc/maketags | 2 +- tdehtml/rendering/font.cpp | 2 +- tdehtml/rendering/render_applet.cpp | 2 +- tdehtml/rendering/render_body.cpp | 2 +- tdehtml/rendering/render_box.cpp | 2 +- tdehtml/rendering/render_canvas.cpp | 2 +- tdehtml/rendering/render_flow.cpp | 2 +- tdehtml/rendering/render_form.cpp | 4 +- tdehtml/rendering/render_frames.cpp | 4 +- tdehtml/rendering/render_image.cpp | 2 +- tdehtml/rendering/render_inline.cpp | 2 +- tdehtml/rendering/render_line.cpp | 2 +- tdehtml/rendering/render_list.cpp | 2 +- tdehtml/rendering/render_object.cpp | 2 +- tdehtml/rendering/render_object.h | 2 +- tdehtml/rendering/render_replaced.cpp | 2 +- tdehtml/rendering/render_table.cpp | 2 +- tdehtml/rendering/render_text.cpp | 2 +- tdehtml/rendering/table_layout.cpp | 2 +- tdehtml/tdehtml_ext.cpp | 4 +- tdehtml/tdehtml_factory.cpp | 2 +- tdehtml/tdehtml_pagecache.cpp | 2 +- tdehtml/tdehtml_part.cpp | 10 +- tdehtml/tdehtml_printsettings.cpp | 2 +- tdehtml/tdehtml_run.cpp | 2 +- tdehtml/tdehtml_settings.cc | 8 +- tdehtml/tdehtmlimage.cpp | 2 +- tdehtml/tdehtmlview.cpp | 2 +- tdehtml/tdemultipart/tdemultipart.cpp | 6 +- tdehtml/test_regression.cpp | 2 +- tdehtml/xml/dom_docimpl.cpp | 4 +- tdehtml/xml/dom_nodeimpl.cpp | 2 +- tdehtml/xml/xml_tokenizer.cpp | 2 +- tdeio/bookmarks/kbookmark.cc | 4 +- tdeio/bookmarks/kbookmarkexporter.cc | 2 +- tdeio/bookmarks/kbookmarkimporter.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_crash.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_ie.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_kde1.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_ns.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_opera.cc | 2 +- tdeio/bookmarks/kbookmarkmanager.cc | 4 +- tdeio/bookmarks/kbookmarkmenu.cc | 4 +- tdeio/bookmarks/kbookmarkmenu.h | 2 +- tdeio/bookmarks/kbookmarkmenu_p.h | 2 +- tdeio/httpfilter/httpfilter.cc | 2 +- tdeio/kpasswdserver/kpasswdserver.cpp | 4 +- tdeio/kssl/kssl.cc | 2 +- tdeio/kssl/ksslcertdlg.cc | 6 +- tdeio/kssl/ksslcertificate.cc | 4 +- tdeio/kssl/ksslinfodlg.cc | 6 +- tdeio/kssl/ksslkeygen.cc | 6 +- tdeio/kssl/ksslpemcallback.cc | 2 +- tdeio/kssl/ksslpkcs12.cc | 2 +- tdeio/kssl/ksslpkcs7.cc | 2 +- tdeio/kssl/ksslsettings.cc | 2 +- tdeio/kssl/ksslutils.cc | 4 +- tdeio/misc/kpac/discovery.cpp | 2 +- tdeio/misc/kpac/downloader.cpp | 4 +- tdeio/misc/kpac/proxyscout.cpp | 4 +- tdeio/misc/kssld/kssld.cpp | 2 +- tdeio/misc/tdefile/fileprops.cpp | 2 +- tdeio/misc/tdemailservice.cpp | 2 +- tdeio/misc/tdesendbugmail/main.cpp | 4 +- tdeio/misc/tdetelnetservice.cpp | 4 +- tdeio/misc/tdewalletd/tdewalletd.cpp | 6 +- tdeio/misc/tdewalletd/tdewalletwizard.ui | 2 +- tdeio/misc/uiserver.cpp | 6 +- tdeio/tdefile/CMakeLists.txt | 4 +- tdeio/tdefile/ChangeLog | 14 +- tdeio/tdefile/Makefile.am | 4 +- tdeio/tdefile/kacleditwidget.cpp | 2 +- tdeio/tdefile/kcombiview.cpp | 2 +- tdeio/tdefile/kcombiview.h | 2 +- tdeio/tdefile/kcustommenueditor.cpp | 4 +- tdeio/tdefile/kdiroperator.cpp | 8 +- tdeio/tdefile/kdirselectdialog.cpp | 6 +- tdeio/tdefile/kdirsize.cpp | 2 +- tdeio/tdefile/kencodingfiledialog.cpp | 6 +- tdeio/tdefile/kicondialog.cpp | 4 +- tdeio/tdefile/kimagefilepreview.cpp | 4 +- tdeio/tdefile/kmetaprops.cpp | 6 +- tdeio/tdefile/knotifydialog.cpp | 4 +- tdeio/tdefile/knotifydialog.h | 2 +- tdeio/tdefile/kopenwith.cpp | 4 +- tdeio/tdefile/kpreviewprops.cpp | 4 +- tdeio/tdefile/kpropertiesdialog.cpp | 8 +- tdeio/tdefile/kurlbar.cpp | 4 +- tdeio/tdefile/kurlcombobox.cpp | 4 +- tdeio/tdefile/kurlrequester.cpp | 4 +- tdeio/tdefile/kurlrequesterdlg.cpp | 4 +- tdeio/tdefile/tdefiledetailview.cpp | 6 +- tdeio/tdefile/tdefiledialog.cpp | 10 +- tdeio/tdefile/tdefilefiltercombo.cpp | 2 +- tdeio/tdefile/tdefileiconview.cpp | 4 +- tdeio/tdefile/tdefilemetainfowidget.cpp | 2 +- tdeio/tdefile/tdefilepreview.cpp | 2 +- tdeio/tdefile/tdefilesharedlg.cpp | 6 +- tdeio/tdefile/tdefilespeedbar.cpp | 6 +- tdeio/tdefile/tdefiletreeview.cpp | 2 +- tdeio/tdefile/tdefileview.cpp | 4 +- tdeio/tdefile/tderecentdirs.cpp | 2 +- tdeio/tdefile/tests/kcustommenueditortest.cpp | 2 +- tdeio/tdefile/tests/kdirselectdialogtest.cpp | 2 +- tdeio/tdefile/tests/kfdtest.cpp | 2 +- tdeio/tdefile/tests/kfstest.cpp | 4 +- tdeio/tdefile/tests/tdefiletreeviewtest.cpp | 2 +- tdeio/tdeio/CMakeLists.txt | 8 +- tdeio/tdeio/Makefile.am | 8 +- tdeio/tdeio/chmodjob.cpp | 4 +- tdeio/tdeio/dataslave.cpp | 2 +- tdeio/tdeio/defaultprogress.cpp | 4 +- tdeio/tdeio/global.cpp | 6 +- tdeio/tdeio/job.cpp | 10 +- tdeio/tdeio/kdcopservicestarter.cpp | 2 +- tdeio/tdeio/kdirlister.cpp | 8 +- tdeio/tdeio/kdirwatch.cpp | 2 +- tdeio/tdeio/kemailsettings.cpp | 4 +- tdeio/tdeio/kimageio.cpp | 4 +- tdeio/tdeio/kmessageboxwrapper.h | 2 +- tdeio/tdeio/kmimetype.cpp | 2 +- tdeio/tdeio/kmimetypechooser.cpp | 2 +- tdeio/tdeio/kprotocolinfo.cpp | 2 +- tdeio/tdeio/kprotocolmanager.cpp | 6 +- tdeio/tdeio/krun.cpp | 4 +- tdeio/tdeio/krun.h | 2 +- tdeio/tdeio/kscan.cpp | 2 +- tdeio/tdeio/kservice.cpp | 4 +- tdeio/tdeio/kservicefactory.cpp | 4 +- tdeio/tdeio/kservicegroup.cpp | 4 +- tdeio/tdeio/kservicegroupfactory.cpp | 4 +- tdeio/tdeio/kshred.cpp | 2 +- tdeio/tdeio/ktar.cpp | 2 +- tdeio/tdeio/kurlcompletion.cpp | 4 +- tdeio/tdeio/kuserprofile.cpp | 2 +- tdeio/tdeio/netaccess.cpp | 4 +- tdeio/tdeio/observer.cpp | 4 +- tdeio/tdeio/passdlg.cpp | 2 +- tdeio/tdeio/paste.cpp | 8 +- tdeio/tdeio/pastedialog.cpp | 2 +- tdeio/tdeio/previewjob.cpp | 4 +- tdeio/tdeio/renamedlg.cpp | 6 +- tdeio/tdeio/scheduler.cpp | 4 +- tdeio/tdeio/sessiondata.cpp | 6 +- tdeio/tdeio/skipdlg.cpp | 2 +- tdeio/tdeio/slave.cpp | 8 +- tdeio/tdeio/slavebase.cpp | 2 +- tdeio/tdeio/slaveconfig.cpp | 2 +- tdeio/tdeio/statusbarprogress.cpp | 2 +- tdeio/tdeio/tcpslavebase.cpp | 6 +- tdeio/tdeio/tdefilefilter.cpp | 2 +- tdeio/tdeio/tdefileitem.cpp | 6 +- tdeio/tdeio/tdefilemetainfo.cpp | 2 +- tdeio/tdeio/tdefileshare.cpp | 2 +- tdeio/tdeioexec/main.cpp | 6 +- tdeio/tests/kiopassdlgtest.cpp | 4 +- tdeio/tests/kpropsdlgtest.cpp | 2 +- tdeio/tests/kprotocolinfotest.cpp | 4 +- tdeio/tests/tdeioslavetest.cpp | 2 +- tdeioslave/file/file.cc | 6 +- tdeioslave/ftp/ftp.cc | 2 +- tdeioslave/http/http.cc | 2 +- tdeioslave/http/http_cache_cleaner.cpp | 6 +- tdeioslave/http/kcookiejar/kcookiewin.cpp | 4 +- tdeioslave/http/kcookiejar/main.cpp | 2 +- tdeioslave/metainfo/metainfo.cpp | 2 +- tdelfeditor/tdelfeditor.cpp | 2 +- tdemdi/tdemdi/dockcontainer.cpp | 4 +- tdemdi/tdemdi/guiclient.cpp | 2 +- tdemdi/tdemdi/mainwindow.cpp | 4 +- tdemdi/tdemdi/mainwindow.h | 2 +- tdemdi/tdemdichildarea.cpp | 4 +- tdemdi/tdemdichildfrm.cpp | 2 +- tdemdi/tdemdichildfrmcaption.cpp | 2 +- tdemdi/tdemdichildview.cpp | 2 +- tdemdi/tdemdidockcontainer.cpp | 4 +- tdemdi/tdemdiguiclient.cpp | 2 +- tdemdi/tdemdimainfrm.cpp | 4 +- tdemdi/tdemdimainfrm.h | 2 +- tdeparts/browserextension.cpp | 4 +- tdeparts/browserrun.cpp | 6 +- tdeparts/factory.cpp | 4 +- tdeparts/part.cpp | 6 +- tdeparts/partmanager.cpp | 2 +- tdeparts/plugin.cpp | 2 +- tdeparts/tests/example.cpp | 4 +- tdeparts/tests/ghostview.cpp | 4 +- tdeparts/tests/normalktm.cpp | 6 +- tdeparts/tests/notepad.cpp | 2 +- tdeparts/tests/parts.cpp | 4 +- tdeparts/tests/plugin_spellcheck.cpp | 4 +- tdeprint/cups/cupsaddsmb2.cpp | 4 +- tdeprint/cups/cupsdconf2/addressdialog.cpp | 2 +- tdeprint/cups/cupsdconf2/browsedialog.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdcomment.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdconf.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsddialog.cpp | 6 +- tdeprint/cups/cupsdconf2/cupsddirpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdjobspage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdlogpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp | 4 +- tdeprint/cups/cupsdconf2/cupsdserverpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdsplash.cpp | 2 +- tdeprint/cups/cupsdconf2/editlist.cpp | 2 +- tdeprint/cups/cupsdconf2/locationdialog.cpp | 2 +- tdeprint/cups/cupsdconf2/main.cpp | 2 +- tdeprint/cups/cupsdconf2/portdialog.cpp | 2 +- tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp | 2 +- tdeprint/cups/cupsdconf2/sizewidget.cpp | 2 +- tdeprint/cups/cupsinfos.cpp | 2 +- tdeprint/cups/ippreportdlg.cpp | 4 +- tdeprint/cups/ipprequest.cpp | 4 +- tdeprint/cups/kmconfigcups.cpp | 2 +- tdeprint/cups/kmconfigcupsdir.cpp | 2 +- tdeprint/cups/kmcupsconfigwidget.cpp | 2 +- tdeprint/cups/kmcupsfactory.cpp | 2 +- tdeprint/cups/kmcupsjobmanager.cpp | 2 +- tdeprint/cups/kmcupsmanager.cpp | 4 +- tdeprint/cups/kmcupsuimanager.cpp | 4 +- tdeprint/cups/kmpropbanners.cpp | 2 +- tdeprint/cups/kmpropquota.cpp | 2 +- tdeprint/cups/kmpropusers.cpp | 2 +- tdeprint/cups/kmwbanners.cpp | 2 +- tdeprint/cups/kmwfax.cpp | 2 +- tdeprint/cups/kmwipp.cpp | 2 +- tdeprint/cups/kmwippprinter.cpp | 4 +- tdeprint/cups/kmwippselect.cpp | 2 +- tdeprint/cups/kmwother.cpp | 2 +- tdeprint/cups/kmwquota.cpp | 2 +- tdeprint/cups/kmwusers.cpp | 2 +- tdeprint/cups/kphpgl2page.cpp | 2 +- tdeprint/cups/kpimagepage.cpp | 2 +- tdeprint/cups/kpschedulepage.cpp | 2 +- tdeprint/cups/kptagspage.cpp | 2 +- tdeprint/cups/kptextpage.cpp | 2 +- tdeprint/driver.cpp | 2 +- tdeprint/driverview.cpp | 2 +- tdeprint/droptionview.cpp | 2 +- tdeprint/ext/kextprinterimpl.cpp | 2 +- tdeprint/ext/kmextmanager.cpp | 2 +- tdeprint/ext/kmextuimanager.cpp | 2 +- tdeprint/foomatic/kfoomaticprinterimpl.cpp | 2 +- tdeprint/foomatic/kmfoomaticmanager.cpp | 2 +- tdeprint/foomatic2loader.cpp | 2 +- tdeprint/kmfactory.cpp | 4 +- tdeprint/kmjob.cpp | 2 +- tdeprint/kmmanager.cpp | 2 +- tdeprint/kmprinter.cpp | 2 +- tdeprint/kmspecialmanager.cpp | 4 +- tdeprint/kmuimanager.cpp | 2 +- tdeprint/kmvirtualmanager.cpp | 4 +- tdeprint/kpcopiespage.cpp | 2 +- tdeprint/kpdriverpage.cpp | 2 +- tdeprint/kpfileselectpage.cpp | 2 +- tdeprint/kpfilterpage.cpp | 4 +- tdeprint/kpgeneralpage.cpp | 2 +- tdeprint/kpmarginpage.cpp | 4 +- tdeprint/kpposterpage.cpp | 2 +- tdeprint/kpqtpage.cpp | 2 +- tdeprint/kprintaction.cpp | 2 +- tdeprint/kprintdialog.cpp | 6 +- tdeprint/kprinter.cpp | 6 +- tdeprint/kprinterimpl.cpp | 4 +- tdeprint/kprinterpropertydialog.cpp | 4 +- tdeprint/kprintpreview.cpp | 4 +- tdeprint/kprintprocess.cpp | 2 +- tdeprint/kxmlcommand.cpp | 4 +- tdeprint/lpd/klpdprinterimpl.cpp | 2 +- tdeprint/lpd/kmlpdmanager.cpp | 2 +- tdeprint/lpd/kmlpduimanager.cpp | 2 +- tdeprint/lpd/lpdtools.cpp | 2 +- tdeprint/lpdunix/klpdunixprinterimpl.cpp | 2 +- tdeprint/lpdunix/kmlpdunixmanager.cpp | 2 +- tdeprint/lpdunix/kmlpdunixuimanager.cpp | 2 +- tdeprint/lpr/apshandler.cpp | 2 +- tdeprint/lpr/editentrydialog.cpp | 2 +- tdeprint/lpr/kmconfiglpr.cpp | 2 +- tdeprint/lpr/kmlprjobmanager.cpp | 2 +- tdeprint/lpr/kmlprmanager.cpp | 4 +- tdeprint/lpr/kmlpruimanager.cpp | 2 +- tdeprint/lpr/lpchelper.cpp | 2 +- tdeprint/lpr/lprhandler.cpp | 2 +- tdeprint/lpr/lprngtoolhandler.cpp | 2 +- tdeprint/lpr/matichandler.cpp | 2 +- tdeprint/management/kaddprinterwizard.cpp | 6 +- tdeprint/management/kmconfigcommand.cpp | 2 +- tdeprint/management/kmconfigdialog.cpp | 2 +- tdeprint/management/kmconfigfilter.cpp | 2 +- tdeprint/management/kmconfigfonts.cpp | 2 +- tdeprint/management/kmconfiggeneral.cpp | 4 +- tdeprint/management/kmconfigjobs.cpp | 2 +- tdeprint/management/kmconfigpreview.cpp | 2 +- tdeprint/management/kmdbcreator.cpp | 2 +- tdeprint/management/kmdriverdb.cpp | 2 +- tdeprint/management/kmdriverdbwidget.cpp | 4 +- tdeprint/management/kmdriverdialog.cpp | 4 +- tdeprint/management/kminfopage.cpp | 2 +- tdeprint/management/kminstancepage.cpp | 4 +- tdeprint/management/kmjobviewer.cpp | 6 +- tdeprint/management/kmlistview.cpp | 2 +- tdeprint/management/kmmainview.cpp | 6 +- tdeprint/management/kmpages.cpp | 2 +- tdeprint/management/kmprinterview.cpp | 2 +- tdeprint/management/kmpropbackend.cpp | 2 +- tdeprint/management/kmpropcontainer.cpp | 2 +- tdeprint/management/kmpropdriver.cpp | 2 +- tdeprint/management/kmpropgeneral.cpp | 2 +- tdeprint/management/kmpropmembers.cpp | 2 +- tdeprint/management/kmpropwidget.cpp | 4 +- tdeprint/management/kmspecialprinterdlg.cpp | 4 +- tdeprint/management/kmwbackend.cpp | 2 +- tdeprint/management/kmwclass.cpp | 2 +- tdeprint/management/kmwdriver.cpp | 2 +- tdeprint/management/kmwdriverselect.cpp | 4 +- tdeprint/management/kmwdrivertest.cpp | 4 +- tdeprint/management/kmwend.cpp | 2 +- tdeprint/management/kmwfile.cpp | 2 +- tdeprint/management/kmwinfopage.cpp | 2 +- tdeprint/management/kmwizard.cpp | 4 +- tdeprint/management/kmwlocal.cpp | 4 +- tdeprint/management/kmwlpd.cpp | 4 +- tdeprint/management/kmwname.cpp | 4 +- tdeprint/management/kmwpassword.cpp | 2 +- tdeprint/management/kmwsmb.cpp | 2 +- tdeprint/management/kmwsocket.cpp | 4 +- tdeprint/management/kmwsocketutil.cpp | 4 +- tdeprint/management/kxmlcommanddlg.cpp | 4 +- tdeprint/management/kxmlcommandselector.cpp | 4 +- tdeprint/management/networkscanner.cpp | 4 +- tdeprint/management/smbview.cpp | 6 +- tdeprint/management/tdeprint_management_module.cpp | 4 +- tdeprint/marginpreview.cpp | 2 +- tdeprint/marginwidget.cpp | 4 +- tdeprint/plugincombobox.cpp | 2 +- tdeprint/posterpreview.cpp | 4 +- tdeprint/ppdloader.cpp | 2 +- tdeprint/printerfilter.cpp | 2 +- tdeprint/rlpr/kmconfigproxy.cpp | 2 +- tdeprint/rlpr/kmproprlpr.cpp | 2 +- tdeprint/rlpr/kmproxywidget.cpp | 2 +- tdeprint/rlpr/kmrlprmanager.cpp | 2 +- tdeprint/rlpr/kmrlpruimanager.cpp | 2 +- tdeprint/rlpr/kmwrlpr.cpp | 2 +- tdeprint/rlpr/krlprprinterimpl.cpp | 2 +- tdeprint/tdefilelist.cpp | 2 +- tdeprint/tdeprintd.cpp | 4 +- tdeprint/tests/helpwindow.cpp | 2 +- tdeprint/tools/escputil/escpwidget.cpp | 4 +- tdeprint/util.h | 2 +- tderandr/ktimerdialog.cpp | 2 +- tderandr/libtderandr.cc | 4 +- tderandr/randr.cpp | 4 +- tderesources/configdialog.cpp | 4 +- tderesources/configpage.cpp | 4 +- tderesources/factory.cpp | 2 +- tderesources/kcmtderesources.cpp | 2 +- tderesources/resource.cpp | 2 +- tderesources/selectdialog.cpp | 4 +- tdersync/rsyncconfigdialog.cpp | 4 +- tdersync/tdersync.h | 4 +- tdespell2/settings.cpp | 4 +- tdespell2/ui/configdialog.cpp | 2 +- tdespell2/ui/configwidget.cpp | 2 +- tdespell2/ui/dialog.cpp | 2 +- tdesu/ssh.cpp | 2 +- tdesu/su.cpp | 2 +- tdeui/CMakeLists.txt | 8 +- tdeui/MAINTAINERS | 4 +- tdeui/Makefile.am | 8 +- tdeui/kauthicon.cpp | 2 +- tdeui/kbugreport.cpp | 6 +- tdeui/kbuttonbox.cpp | 2 +- tdeui/kcharselect.cpp | 2 +- tdeui/kcmenumngr.cpp | 2 +- tdeui/kcolorbutton.cpp | 2 +- tdeui/kcolorcombo.cpp | 8 +- tdeui/kcolordialog.cpp | 8 +- tdeui/kcombobox.cpp | 2 +- tdeui/kcommand.cpp | 2 +- tdeui/kcursor.cpp | 2 +- tdeui/kdatepicker.cpp | 4 +- tdeui/kdatetbl.cpp | 6 +- tdeui/kdatewidget.cpp | 4 +- tdeui/kdialog.cpp | 4 +- tdeui/kdialogbase.cpp | 6 +- tdeui/kdockwidget.cpp | 6 +- tdeui/kdualcolorbutton.cpp | 2 +- tdeui/keditcl1.cpp | 4 +- tdeui/keditcl2.cpp | 4 +- tdeui/keditlistbox.cpp | 2 +- tdeui/kedittoolbar.cpp | 4 +- tdeui/kguiitem.h | 2 +- tdeui/khelpmenu.cpp | 4 +- tdeui/kiconview.cpp | 4 +- tdeui/kiconviewsearchline.cpp | 2 +- tdeui/kjanuswidget.cpp | 6 +- tdeui/kkeybutton.cpp | 2 +- tdeui/kkeydialog.cpp | 6 +- tdeui/klineedit.cpp | 2 +- tdeui/klineeditdlg.cpp | 2 +- tdeui/kmenubar.cpp | 8 +- tdeui/kmessagebox.cpp | 6 +- tdeui/knuminput.cpp | 4 +- tdeui/knumvalidator.cpp | 4 +- tdeui/kpanelmenu.cpp | 2 +- tdeui/kpassdlg.cpp | 6 +- tdeui/kpassivepopup.cpp | 2 +- tdeui/kpixmapio.cpp | 2 +- tdeui/kpixmapregionselectordialog.cpp | 2 +- tdeui/kpixmapregionselectorwidget.cpp | 2 +- tdeui/kprogress.cpp | 2 +- tdeui/kprogressbox.cpp | 2 +- tdeui/kpushbutton.cpp | 4 +- tdeui/ksconfig.cpp | 4 +- tdeui/kscrollview.cpp | 2 +- tdeui/ksplashscreen.cpp | 4 +- tdeui/kstatusbar.cpp | 2 +- tdeui/kstdaction.cpp | 4 +- tdeui/kstdaction_p.h | 2 +- tdeui/kstdguiitem.cpp | 2 +- tdeui/kswitchlanguagedialog.cpp | 4 +- tdeui/ksyntaxhighlighter.cpp | 4 +- tdeui/ksystemtray.cpp | 4 +- tdeui/ksystemtray.h | 2 +- tdeui/ktabbar.cpp | 4 +- tdeui/ktextbrowser.cpp | 2 +- tdeui/ktextedit.cpp | 4 +- tdeui/ktimezonewidget.cpp | 2 +- tdeui/ktip.cpp | 6 +- tdeui/kurllabel.cpp | 2 +- tdeui/kwhatsthismanager.cpp | 2 +- tdeui/kwizard.cpp | 4 +- tdeui/kxmlguibuilder.cpp | 6 +- tdeui/kxmlguifactory.cpp | 2 +- tdeui/kxmlguifactory_p.cpp | 2 +- tdeui/tdeaboutapplication.cpp | 4 +- tdeui/tdeaboutdialog.cpp | 6 +- tdeui/tdeabouttde.cpp | 2 +- tdeui/tdeaction.cpp | 2 +- tdeui/tdeactionclasses.cpp | 4 +- tdeui/tdeactionselector.cpp | 2 +- tdeui/tdecmodule.cpp | 4 +- tdeui/tdecompletionbox.cpp | 2 +- tdeui/tdeconfigdialog.cpp | 2 +- tdeui/tdefontcombo.cpp | 2 +- tdeui/tdefontdialog.cpp | 6 +- tdeui/tdefontrequester.cpp | 2 +- tdeui/tdelistbox.cpp | 2 +- tdeui/tdelistview.cpp | 2 +- tdeui/tdelistviewsearchline.cpp | 2 +- tdeui/tdemainwindow.cpp | 4 +- tdeui/tdeshortcutdialog.cpp | 4 +- tdeui/tdespell.cpp | 4 +- tdeui/tdespelldlg.cpp | 2 +- tdeui/tdetoolbar.cpp | 4 +- tdeui/tdetoolbar.h | 2 +- tdeui/tdetoolbarbutton.cpp | 4 +- tdeui/tdetoolbarbutton.h | 2 +- tdeui/tdetoolbarhandler.cpp | 2 +- tdeui/tests/itemcontainertest.cpp | 2 +- tdeui/tests/kaboutdialogtest.cpp | 2 +- tdeui/tests/kcharselecttest.cpp | 2 +- tdeui/tests/kcolordlgtest.cpp | 2 +- tdeui/tests/kcomboboxtest.cpp | 2 +- tdeui/tests/kcompletiontest.cpp | 2 +- tdeui/tests/kdatepicktest.cpp | 2 +- tdeui/tests/kdatetimewidgettest.cpp | 2 +- tdeui/tests/kdatewidgettest.cpp | 2 +- tdeui/tests/kdockwidgettest.cpp | 2 +- tdeui/tests/kdualcolortest.cpp | 2 +- tdeui/tests/klineedittest.cpp | 4 +- tdeui/tests/kmessageboxtest.cpp | 4 +- tdeui/tests/kstatusbartest.cpp | 2 +- tdeui/tests/kstatusbartest.h | 2 +- tdeui/tests/ktimewidgettest.cpp | 2 +- tdeui/tests/tdemainwindowtest.cpp | 2 +- tdeui/tests/twindowtest.cpp | 4 +- tdeui/tests/twindowtest.h | 2 +- tdeui/twindowlistmenu.cpp | 2 +- tdeunittest/modrunner.cpp | 4 +- tdeunittest/runner.cpp | 2 +- tdeunittest/tester.h | 2 +- tdeutils/kcmultidialog.cpp | 4 +- tdeutils/kcmultidialog.h | 2 +- tdeutils/kfind.cpp | 4 +- tdeutils/kfinddialog.cpp | 4 +- tdeutils/kplugininfo.cpp | 2 +- tdeutils/kpluginselector.cpp | 6 +- tdeutils/kreplace.cpp | 4 +- tdeutils/kreplacedialog.cpp | 4 +- tdeutils/ksettings/componentsdialog.cpp | 2 +- tdeutils/ksettings/dialog.cpp | 2 +- tdeutils/tdecmodulecontainer.cpp | 2 +- tdeutils/tdecmoduleinfo.cpp | 4 +- tdeutils/tdecmoduleloader.cpp | 4 +- tdeutils/tdecmoduleproxy.cpp | 2 +- tdewallet/backend/tdewalletbackend.cc | 4 +- tdewallet/tests/tdewalletasync.cpp | 2 +- tdewallet/tests/tdewalletboth.cpp | 2 +- tdewallet/tests/tdewalletsync.cpp | 2 +- win/pro_files/kabc/kabc.pro | 4 +- win/pro_files/kabc/vcard/vcard.pro | 4 +- win/pro_files/kio/kio.pro | 6 +- win/pro_files/tdecore/tdecore.pro | 10 +- win/pro_files/tdeui/tdeui.pro | 4 +- win/tools/build_tdelibs_dbg | 2 +- win/tools/build_tdelibs_rel | 2 +- 1393 files changed, 51761 insertions(+), 51761 deletions(-) delete mode 100644 kabc/CMakeLists.txt delete mode 100644 kabc/HACKING delete mode 100644 kabc/HOWTO delete mode 100644 kabc/Makefile.am delete mode 100644 kabc/README delete mode 100644 kabc/README.AddressFormat delete mode 100644 kabc/TODO delete mode 100644 kabc/address.cpp delete mode 100644 kabc/address.h delete mode 100644 kabc/addressbook.cpp delete mode 100644 kabc/addressbook.h delete mode 100644 kabc/addresseedialog.cpp delete mode 100644 kabc/addresseedialog.h delete mode 100644 kabc/addresseehelper.cpp delete mode 100644 kabc/addresseehelper.h delete mode 100644 kabc/addresseelist.cpp delete mode 100644 kabc/addresseelist.h delete mode 100644 kabc/addresslineedit.cpp delete mode 100644 kabc/addresslineedit.h delete mode 100644 kabc/agent.cpp delete mode 100644 kabc/agent.h delete mode 100644 kabc/countrytransl.map delete mode 100644 kabc/distributionlist.cpp delete mode 100644 kabc/distributionlist.h delete mode 100644 kabc/distributionlistdialog.cpp delete mode 100644 kabc/distributionlistdialog.h delete mode 100644 kabc/distributionlisteditor.cpp delete mode 100644 kabc/distributionlisteditor.h delete mode 100644 kabc/errorhandler.cpp delete mode 100644 kabc/errorhandler.h delete mode 100644 kabc/field.h delete mode 100644 kabc/format.h delete mode 100644 kabc/formatfactory.cpp delete mode 100644 kabc/formatfactory.h delete mode 100644 kabc/formatplugin.h delete mode 100644 kabc/formats/CMakeLists.txt delete mode 100644 kabc/formats/Makefile.am delete mode 100644 kabc/formats/binary.desktop delete mode 100644 kabc/formats/binaryformat.cpp delete mode 100644 kabc/formats/binaryformat.h delete mode 100644 kabc/geo.cpp delete mode 100644 kabc/geo.h delete mode 100644 kabc/kabc_manager.desktop delete mode 100644 kabc/key.cpp delete mode 100644 kabc/key.h delete mode 100644 kabc/ldapclient.cpp delete mode 100644 kabc/ldapclient.h delete mode 100644 kabc/ldapconfigwidget.cpp delete mode 100644 kabc/ldapconfigwidget.h delete mode 100644 kabc/ldapurl.cpp delete mode 100644 kabc/ldapurl.h delete mode 100644 kabc/ldif.cpp delete mode 100644 kabc/ldif.h delete mode 100644 kabc/ldifconverter.cpp delete mode 100644 kabc/ldifconverter.h delete mode 100644 kabc/lock.cpp delete mode 100644 kabc/lock.h delete mode 100644 kabc/locknull.cpp delete mode 100644 kabc/locknull.h delete mode 100644 kabc/phonenumber.cpp delete mode 100644 kabc/phonenumber.h delete mode 100644 kabc/picture.cpp delete mode 100644 kabc/picture.h delete mode 100644 kabc/plugin.cpp delete mode 100644 kabc/plugin.h delete mode 100644 kabc/plugins/CMakeLists.txt delete mode 100644 kabc/plugins/Makefile.am delete mode 100644 kabc/plugins/dir/CMakeLists.txt delete mode 100644 kabc/plugins/dir/Makefile.am delete mode 100644 kabc/plugins/dir/dir.desktop delete mode 100644 kabc/plugins/dir/resourcedir.cpp delete mode 100644 kabc/plugins/dir/resourcedir.h delete mode 100644 kabc/plugins/dir/resourcedirconfig.cpp delete mode 100644 kabc/plugins/dir/resourcedirconfig.h delete mode 100644 kabc/plugins/dir/resourcedirplugin.cpp delete mode 100644 kabc/plugins/evolution/Makefile.am delete mode 100644 kabc/plugins/evolution/README delete mode 100644 kabc/plugins/evolution/dbwrapper.cpp delete mode 100644 kabc/plugins/evolution/dbwrapper.h delete mode 100644 kabc/plugins/evolution/evolution.desktop delete mode 100644 kabc/plugins/evolution/resourceevo.cpp delete mode 100644 kabc/plugins/evolution/resourceevo.h delete mode 100644 kabc/plugins/file/CMakeLists.txt delete mode 100644 kabc/plugins/file/Makefile.am delete mode 100644 kabc/plugins/file/file.desktop delete mode 100644 kabc/plugins/file/resourcefile.cpp delete mode 100644 kabc/plugins/file/resourcefile.h delete mode 100644 kabc/plugins/file/resourcefileconfig.cpp delete mode 100644 kabc/plugins/file/resourcefileconfig.h delete mode 100644 kabc/plugins/file/resourcefileplugin.cpp delete mode 100644 kabc/plugins/ldaptdeio/CMakeLists.txt delete mode 100644 kabc/plugins/ldaptdeio/Makefile.am delete mode 100644 kabc/plugins/ldaptdeio/ldaptdeio.desktop delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeio.cpp delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeio.h delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp delete mode 100644 kabc/plugins/net/CMakeLists.txt delete mode 100644 kabc/plugins/net/Makefile.am delete mode 100644 kabc/plugins/net/net.desktop delete mode 100644 kabc/plugins/net/resourcenet.cpp delete mode 100644 kabc/plugins/net/resourcenet.h delete mode 100644 kabc/plugins/net/resourcenetconfig.cpp delete mode 100644 kabc/plugins/net/resourcenetconfig.h delete mode 100644 kabc/plugins/net/resourcenetplugin.cpp delete mode 100644 kabc/plugins/sql/Makefile.am delete mode 100644 kabc/plugins/sql/resourcesql.cpp delete mode 100644 kabc/plugins/sql/resourcesql.h delete mode 100644 kabc/plugins/sql/resourcesqlconfig.cpp delete mode 100644 kabc/plugins/sql/resourcesqlconfig.h delete mode 100644 kabc/plugins/sql/sql.desktop delete mode 100644 kabc/resource.cpp delete mode 100644 kabc/resource.h delete mode 100644 kabc/resourceselectdialog.cpp delete mode 100644 kabc/resourceselectdialog.h delete mode 100644 kabc/scripts/Makefile.am delete mode 100644 kabc/scripts/addressee.src.cpp delete mode 100644 kabc/scripts/addressee.src.h delete mode 100755 kabc/scripts/createisomap.pl delete mode 100644 kabc/scripts/entrylist delete mode 100644 kabc/scripts/field.src.cpp delete mode 100755 kabc/scripts/makeaddressee delete mode 100644 kabc/secrecy.cpp delete mode 100644 kabc/secrecy.h delete mode 100644 kabc/sortmode.cpp delete mode 100644 kabc/sortmode.h delete mode 100644 kabc/sound.cpp delete mode 100644 kabc/sound.h delete mode 100644 kabc/stdaddressbook.cpp delete mode 100644 kabc/stdaddressbook.h delete mode 100644 kabc/tdeab2tdeabc.cpp delete mode 100644 kabc/tdeab2tdeabc.desktop delete mode 100644 kabc/tests/Makefile.am delete mode 100644 kabc/tests/bigread.cpp delete mode 100644 kabc/tests/bigwrite.cpp delete mode 100644 kabc/tests/kabcargl.cpp delete mode 100644 kabc/tests/testaddressee.cpp delete mode 100644 kabc/tests/testaddresseelist.cpp delete mode 100644 kabc/tests/testaddressfmt.cpp delete mode 100644 kabc/tests/testaddresslineedit.cpp delete mode 100644 kabc/tests/testdb.cpp delete mode 100644 kabc/tests/testdistlist.cpp delete mode 100644 kabc/tests/testkabc.cpp delete mode 100644 kabc/tests/testkabcdlg.cpp delete mode 100644 kabc/tests/testldapclient.cpp delete mode 100644 kabc/tests/testldapclient.h delete mode 100644 kabc/tests/testlock.cpp delete mode 100644 kabc/tests/testlock.h delete mode 100644 kabc/timezone.cpp delete mode 100644 kabc/timezone.h delete mode 100644 kabc/vcard/AdrParam.cpp delete mode 100644 kabc/vcard/AdrValue.cpp delete mode 100644 kabc/vcard/AgentParam.cpp delete mode 100644 kabc/vcard/AgentValue.cpp delete mode 100644 kabc/vcard/CMakeLists.txt delete mode 100644 kabc/vcard/ClassValue.cpp delete mode 100644 kabc/vcard/ContentLine.cpp delete mode 100644 kabc/vcard/DateParam.cpp delete mode 100644 kabc/vcard/DateValue.cpp delete mode 100644 kabc/vcard/EmailParam.cpp delete mode 100644 kabc/vcard/Entity.cpp delete mode 100644 kabc/vcard/Enum.cpp delete mode 100644 kabc/vcard/FloatValue.cpp delete mode 100644 kabc/vcard/GeoValue.cpp delete mode 100644 kabc/vcard/ImageParam.cpp delete mode 100644 kabc/vcard/ImageValue.cpp delete mode 100644 kabc/vcard/ImgValue.cpp delete mode 100644 kabc/vcard/LangValue.cpp delete mode 100644 kabc/vcard/Makefile.am delete mode 100644 kabc/vcard/NValue.cpp delete mode 100644 kabc/vcard/OrgValue.cpp delete mode 100644 kabc/vcard/Param.cpp delete mode 100644 kabc/vcard/PhoneNumberValue.cpp delete mode 100644 kabc/vcard/README delete mode 100644 kabc/vcard/RToken.cpp delete mode 100644 kabc/vcard/SoundValue.cpp delete mode 100644 kabc/vcard/SourceParam.cpp delete mode 100644 kabc/vcard/TelParam.cpp delete mode 100644 kabc/vcard/TelValue.cpp delete mode 100644 kabc/vcard/TextBinParam.cpp delete mode 100644 kabc/vcard/TextBinValue.cpp delete mode 100644 kabc/vcard/TextListValue.cpp delete mode 100644 kabc/vcard/TextParam.cpp delete mode 100644 kabc/vcard/TextValue.cpp delete mode 100644 kabc/vcard/URIValue.cpp delete mode 100644 kabc/vcard/UTCValue.cpp delete mode 100644 kabc/vcard/VCard.cpp delete mode 100644 kabc/vcard/VCardEntity.cpp delete mode 100644 kabc/vcard/Value.cpp delete mode 100644 kabc/vcard/include/VCard.h delete mode 100644 kabc/vcard/include/VCardAdrParam.h delete mode 100644 kabc/vcard/include/VCardAdrValue.h delete mode 100644 kabc/vcard/include/VCardAgentParam.h delete mode 100644 kabc/vcard/include/VCardAgentValue.h delete mode 100644 kabc/vcard/include/VCardClassValue.h delete mode 100644 kabc/vcard/include/VCardContentLine.h delete mode 100644 kabc/vcard/include/VCardDateParam.h delete mode 100644 kabc/vcard/include/VCardDateValue.h delete mode 100644 kabc/vcard/include/VCardDefines.h delete mode 100644 kabc/vcard/include/VCardEmailParam.h delete mode 100644 kabc/vcard/include/VCardEntity.h delete mode 100644 kabc/vcard/include/VCardEnum.h delete mode 100644 kabc/vcard/include/VCardFloatValue.h delete mode 100644 kabc/vcard/include/VCardGeoValue.h delete mode 100644 kabc/vcard/include/VCardGroup.h delete mode 100644 kabc/vcard/include/VCardImageParam.h delete mode 100644 kabc/vcard/include/VCardImageValue.h delete mode 100644 kabc/vcard/include/VCardImgValue.h delete mode 100644 kabc/vcard/include/VCardLangValue.h delete mode 100644 kabc/vcard/include/VCardNValue.h delete mode 100644 kabc/vcard/include/VCardOrgValue.h delete mode 100644 kabc/vcard/include/VCardParam.h delete mode 100644 kabc/vcard/include/VCardPhoneNumberValue.h delete mode 100644 kabc/vcard/include/VCardRToken.h delete mode 100644 kabc/vcard/include/VCardSndValue.h delete mode 100644 kabc/vcard/include/VCardSoundValue.h delete mode 100644 kabc/vcard/include/VCardSourceParam.h delete mode 100644 kabc/vcard/include/VCardTelParam.h delete mode 100644 kabc/vcard/include/VCardTelValue.h delete mode 100644 kabc/vcard/include/VCardTextBinParam.h delete mode 100644 kabc/vcard/include/VCardTextBinValue.h delete mode 100644 kabc/vcard/include/VCardTextListValue.h delete mode 100644 kabc/vcard/include/VCardTextParam.h delete mode 100644 kabc/vcard/include/VCardTextValue.h delete mode 100644 kabc/vcard/include/VCardURIValue.h delete mode 100644 kabc/vcard/include/VCardUTCValue.h delete mode 100644 kabc/vcard/include/VCardVCard.h delete mode 100644 kabc/vcard/include/VCardVCardEntity.h delete mode 100644 kabc/vcard/include/VCardValue.h delete mode 100644 kabc/vcard/include/generated/AdrParam-generated.h delete mode 100644 kabc/vcard/include/generated/AdrValue-generated.h delete mode 100644 kabc/vcard/include/generated/AgentParam-generated.h delete mode 100644 kabc/vcard/include/generated/AgentValue-generated.h delete mode 100644 kabc/vcard/include/generated/ClassValue-generated.h delete mode 100644 kabc/vcard/include/generated/ContentLine-generated.h delete mode 100644 kabc/vcard/include/generated/DateParam-generated.h delete mode 100644 kabc/vcard/include/generated/DateValue-generated.h delete mode 100644 kabc/vcard/include/generated/EmailParam-generated.h delete mode 100644 kabc/vcard/include/generated/FloatValue-generated.h delete mode 100644 kabc/vcard/include/generated/GeoValue-generated.h delete mode 100644 kabc/vcard/include/generated/Group-generated.h delete mode 100644 kabc/vcard/include/generated/ImageParam-generated.h delete mode 100644 kabc/vcard/include/generated/ImageValue-generated.h delete mode 100644 kabc/vcard/include/generated/ImgParam-generated.h delete mode 100644 kabc/vcard/include/generated/ImgValue-generated.h delete mode 100644 kabc/vcard/include/generated/LangValue-generated.h delete mode 100644 kabc/vcard/include/generated/NValue-generated.h delete mode 100644 kabc/vcard/include/generated/Name-generated.h delete mode 100644 kabc/vcard/include/generated/OrgValue-generated.h delete mode 100644 kabc/vcard/include/generated/Param-generated.h delete mode 100644 kabc/vcard/include/generated/ParamName-generated.h delete mode 100644 kabc/vcard/include/generated/ParamValue-generated.h delete mode 100644 kabc/vcard/include/generated/PhoneNumberValue-generated.h delete mode 100644 kabc/vcard/include/generated/SoundValue-generated.h delete mode 100644 kabc/vcard/include/generated/SourceParam-generated.h delete mode 100644 kabc/vcard/include/generated/TelParam-generated.h delete mode 100644 kabc/vcard/include/generated/TelValue-generated.h delete mode 100644 kabc/vcard/include/generated/TextBinParam-generated.h delete mode 100644 kabc/vcard/include/generated/TextBinValue-generated.h delete mode 100644 kabc/vcard/include/generated/TextListValue-generated.h delete mode 100644 kabc/vcard/include/generated/TextNSParam-generated.h delete mode 100644 kabc/vcard/include/generated/TextParam-generated.h delete mode 100644 kabc/vcard/include/generated/TextValue-generated.h delete mode 100644 kabc/vcard/include/generated/URIValue-generated.h delete mode 100644 kabc/vcard/include/generated/UTCValue-generated.h delete mode 100644 kabc/vcard/include/generated/VCard-generated.h delete mode 100644 kabc/vcard/include/generated/VCardEntity-generated.h delete mode 100644 kabc/vcard/include/generated/Value-generated.h delete mode 100755 kabc/vcard/include/generated/generate delete mode 100755 kabc/vcard/include/generated/generateHeaders.awk delete mode 100644 kabc/vcard/include/generated/headerBodies delete mode 100644 kabc/vcard/testread.cpp delete mode 100644 kabc/vcard/testwrite.cpp delete mode 100644 kabc/vcard/vCard-all.cpp delete mode 100644 kabc/vcard21parser.cpp delete mode 100644 kabc/vcard21parser.h delete mode 100644 kabc/vcardconverter.cpp delete mode 100644 kabc/vcardconverter.h delete mode 100644 kabc/vcardformat.cpp delete mode 100644 kabc/vcardformat.h delete mode 100644 kabc/vcardformatimpl.cpp delete mode 100644 kabc/vcardformatimpl.h delete mode 100644 kabc/vcardformatplugin.cpp delete mode 100644 kabc/vcardformatplugin.h delete mode 100644 kabc/vcardparser/CMakeLists.txt delete mode 100644 kabc/vcardparser/Makefile.am delete mode 100644 kabc/vcardparser/README.testing delete mode 100755 kabc/vcardparser/checkvcard.pl delete mode 100644 kabc/vcardparser/testread.cpp delete mode 100644 kabc/vcardparser/testread2.cpp delete mode 100644 kabc/vcardparser/tests/vcard1.vcf delete mode 100644 kabc/vcardparser/tests/vcard1.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard2.vcf delete mode 100644 kabc/vcardparser/tests/vcard2.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard3.vcf delete mode 100644 kabc/vcardparser/tests/vcard3.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard4.vcf delete mode 100644 kabc/vcardparser/tests/vcard4.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard5.vcf delete mode 100644 kabc/vcardparser/tests/vcard5.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard6.vcf delete mode 100644 kabc/vcardparser/tests/vcard6.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard7.vcf delete mode 100644 kabc/vcardparser/tests/vcard7.vcf.ref delete mode 100644 kabc/vcardparser/testutils.cpp delete mode 100644 kabc/vcardparser/testutils.h delete mode 100644 kabc/vcardparser/testwrite.cpp delete mode 100644 kabc/vcardparser/vcard.cpp delete mode 100644 kabc/vcardparser/vcard.h delete mode 100644 kabc/vcardparser/vcardline.cpp delete mode 100644 kabc/vcardparser/vcardline.h delete mode 100644 kabc/vcardparser/vcardparser.cpp delete mode 100644 kabc/vcardparser/vcardparser.h delete mode 100644 kabc/vcardtool.cpp delete mode 100644 kabc/vcardtool.h create mode 100644 tdeabc/CMakeLists.txt create mode 100644 tdeabc/HACKING create mode 100644 tdeabc/HOWTO create mode 100644 tdeabc/Makefile.am create mode 100644 tdeabc/README create mode 100644 tdeabc/README.AddressFormat create mode 100644 tdeabc/TODO create mode 100644 tdeabc/address.cpp create mode 100644 tdeabc/address.h create mode 100644 tdeabc/addressbook.cpp create mode 100644 tdeabc/addressbook.h create mode 100644 tdeabc/addresseedialog.cpp create mode 100644 tdeabc/addresseedialog.h create mode 100644 tdeabc/addresseehelper.cpp create mode 100644 tdeabc/addresseehelper.h create mode 100644 tdeabc/addresseelist.cpp create mode 100644 tdeabc/addresseelist.h create mode 100644 tdeabc/addresslineedit.cpp create mode 100644 tdeabc/addresslineedit.h create mode 100644 tdeabc/agent.cpp create mode 100644 tdeabc/agent.h create mode 100644 tdeabc/countrytransl.map create mode 100644 tdeabc/distributionlist.cpp create mode 100644 tdeabc/distributionlist.h create mode 100644 tdeabc/distributionlistdialog.cpp create mode 100644 tdeabc/distributionlistdialog.h create mode 100644 tdeabc/distributionlisteditor.cpp create mode 100644 tdeabc/distributionlisteditor.h create mode 100644 tdeabc/errorhandler.cpp create mode 100644 tdeabc/errorhandler.h create mode 100644 tdeabc/field.h create mode 100644 tdeabc/format.h create mode 100644 tdeabc/formatfactory.cpp create mode 100644 tdeabc/formatfactory.h create mode 100644 tdeabc/formatplugin.h create mode 100644 tdeabc/formats/CMakeLists.txt create mode 100644 tdeabc/formats/Makefile.am create mode 100644 tdeabc/formats/binary.desktop create mode 100644 tdeabc/formats/binaryformat.cpp create mode 100644 tdeabc/formats/binaryformat.h create mode 100644 tdeabc/geo.cpp create mode 100644 tdeabc/geo.h create mode 100644 tdeabc/kabc_manager.desktop create mode 100644 tdeabc/key.cpp create mode 100644 tdeabc/key.h create mode 100644 tdeabc/ldapclient.cpp create mode 100644 tdeabc/ldapclient.h create mode 100644 tdeabc/ldapconfigwidget.cpp create mode 100644 tdeabc/ldapconfigwidget.h create mode 100644 tdeabc/ldapurl.cpp create mode 100644 tdeabc/ldapurl.h create mode 100644 tdeabc/ldif.cpp create mode 100644 tdeabc/ldif.h create mode 100644 tdeabc/ldifconverter.cpp create mode 100644 tdeabc/ldifconverter.h create mode 100644 tdeabc/lock.cpp create mode 100644 tdeabc/lock.h create mode 100644 tdeabc/locknull.cpp create mode 100644 tdeabc/locknull.h create mode 100644 tdeabc/phonenumber.cpp create mode 100644 tdeabc/phonenumber.h create mode 100644 tdeabc/picture.cpp create mode 100644 tdeabc/picture.h create mode 100644 tdeabc/plugin.cpp create mode 100644 tdeabc/plugin.h create mode 100644 tdeabc/plugins/CMakeLists.txt create mode 100644 tdeabc/plugins/Makefile.am create mode 100644 tdeabc/plugins/dir/CMakeLists.txt create mode 100644 tdeabc/plugins/dir/Makefile.am create mode 100644 tdeabc/plugins/dir/dir.desktop create mode 100644 tdeabc/plugins/dir/resourcedir.cpp create mode 100644 tdeabc/plugins/dir/resourcedir.h create mode 100644 tdeabc/plugins/dir/resourcedirconfig.cpp create mode 100644 tdeabc/plugins/dir/resourcedirconfig.h create mode 100644 tdeabc/plugins/dir/resourcedirplugin.cpp create mode 100644 tdeabc/plugins/evolution/Makefile.am create mode 100644 tdeabc/plugins/evolution/README create mode 100644 tdeabc/plugins/evolution/dbwrapper.cpp create mode 100644 tdeabc/plugins/evolution/dbwrapper.h create mode 100644 tdeabc/plugins/evolution/evolution.desktop create mode 100644 tdeabc/plugins/evolution/resourceevo.cpp create mode 100644 tdeabc/plugins/evolution/resourceevo.h create mode 100644 tdeabc/plugins/file/CMakeLists.txt create mode 100644 tdeabc/plugins/file/Makefile.am create mode 100644 tdeabc/plugins/file/file.desktop create mode 100644 tdeabc/plugins/file/resourcefile.cpp create mode 100644 tdeabc/plugins/file/resourcefile.h create mode 100644 tdeabc/plugins/file/resourcefileconfig.cpp create mode 100644 tdeabc/plugins/file/resourcefileconfig.h create mode 100644 tdeabc/plugins/file/resourcefileplugin.cpp create mode 100644 tdeabc/plugins/ldaptdeio/CMakeLists.txt create mode 100644 tdeabc/plugins/ldaptdeio/Makefile.am create mode 100644 tdeabc/plugins/ldaptdeio/ldaptdeio.desktop create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeio.h create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp create mode 100644 tdeabc/plugins/net/CMakeLists.txt create mode 100644 tdeabc/plugins/net/Makefile.am create mode 100644 tdeabc/plugins/net/net.desktop create mode 100644 tdeabc/plugins/net/resourcenet.cpp create mode 100644 tdeabc/plugins/net/resourcenet.h create mode 100644 tdeabc/plugins/net/resourcenetconfig.cpp create mode 100644 tdeabc/plugins/net/resourcenetconfig.h create mode 100644 tdeabc/plugins/net/resourcenetplugin.cpp create mode 100644 tdeabc/plugins/sql/Makefile.am create mode 100644 tdeabc/plugins/sql/resourcesql.cpp create mode 100644 tdeabc/plugins/sql/resourcesql.h create mode 100644 tdeabc/plugins/sql/resourcesqlconfig.cpp create mode 100644 tdeabc/plugins/sql/resourcesqlconfig.h create mode 100644 tdeabc/plugins/sql/sql.desktop create mode 100644 tdeabc/resource.cpp create mode 100644 tdeabc/resource.h create mode 100644 tdeabc/resourceselectdialog.cpp create mode 100644 tdeabc/resourceselectdialog.h create mode 100644 tdeabc/scripts/Makefile.am create mode 100644 tdeabc/scripts/addressee.src.cpp create mode 100644 tdeabc/scripts/addressee.src.h create mode 100755 tdeabc/scripts/createisomap.pl create mode 100644 tdeabc/scripts/entrylist create mode 100644 tdeabc/scripts/field.src.cpp create mode 100755 tdeabc/scripts/makeaddressee create mode 100644 tdeabc/secrecy.cpp create mode 100644 tdeabc/secrecy.h create mode 100644 tdeabc/sortmode.cpp create mode 100644 tdeabc/sortmode.h create mode 100644 tdeabc/sound.cpp create mode 100644 tdeabc/sound.h create mode 100644 tdeabc/stdaddressbook.cpp create mode 100644 tdeabc/stdaddressbook.h create mode 100644 tdeabc/tdeab2tdeabc.cpp create mode 100644 tdeabc/tdeab2tdeabc.desktop create mode 100644 tdeabc/tests/Makefile.am create mode 100644 tdeabc/tests/bigread.cpp create mode 100644 tdeabc/tests/bigwrite.cpp create mode 100644 tdeabc/tests/kabcargl.cpp create mode 100644 tdeabc/tests/testaddressee.cpp create mode 100644 tdeabc/tests/testaddresseelist.cpp create mode 100644 tdeabc/tests/testaddressfmt.cpp create mode 100644 tdeabc/tests/testaddresslineedit.cpp create mode 100644 tdeabc/tests/testdb.cpp create mode 100644 tdeabc/tests/testdistlist.cpp create mode 100644 tdeabc/tests/testkabc.cpp create mode 100644 tdeabc/tests/testkabcdlg.cpp create mode 100644 tdeabc/tests/testldapclient.cpp create mode 100644 tdeabc/tests/testldapclient.h create mode 100644 tdeabc/tests/testlock.cpp create mode 100644 tdeabc/tests/testlock.h create mode 100644 tdeabc/timezone.cpp create mode 100644 tdeabc/timezone.h create mode 100644 tdeabc/vcard/AdrParam.cpp create mode 100644 tdeabc/vcard/AdrValue.cpp create mode 100644 tdeabc/vcard/AgentParam.cpp create mode 100644 tdeabc/vcard/AgentValue.cpp create mode 100644 tdeabc/vcard/CMakeLists.txt create mode 100644 tdeabc/vcard/ClassValue.cpp create mode 100644 tdeabc/vcard/ContentLine.cpp create mode 100644 tdeabc/vcard/DateParam.cpp create mode 100644 tdeabc/vcard/DateValue.cpp create mode 100644 tdeabc/vcard/EmailParam.cpp create mode 100644 tdeabc/vcard/Entity.cpp create mode 100644 tdeabc/vcard/Enum.cpp create mode 100644 tdeabc/vcard/FloatValue.cpp create mode 100644 tdeabc/vcard/GeoValue.cpp create mode 100644 tdeabc/vcard/ImageParam.cpp create mode 100644 tdeabc/vcard/ImageValue.cpp create mode 100644 tdeabc/vcard/ImgValue.cpp create mode 100644 tdeabc/vcard/LangValue.cpp create mode 100644 tdeabc/vcard/Makefile.am create mode 100644 tdeabc/vcard/NValue.cpp create mode 100644 tdeabc/vcard/OrgValue.cpp create mode 100644 tdeabc/vcard/Param.cpp create mode 100644 tdeabc/vcard/PhoneNumberValue.cpp create mode 100644 tdeabc/vcard/README create mode 100644 tdeabc/vcard/RToken.cpp create mode 100644 tdeabc/vcard/SoundValue.cpp create mode 100644 tdeabc/vcard/SourceParam.cpp create mode 100644 tdeabc/vcard/TelParam.cpp create mode 100644 tdeabc/vcard/TelValue.cpp create mode 100644 tdeabc/vcard/TextBinParam.cpp create mode 100644 tdeabc/vcard/TextBinValue.cpp create mode 100644 tdeabc/vcard/TextListValue.cpp create mode 100644 tdeabc/vcard/TextParam.cpp create mode 100644 tdeabc/vcard/TextValue.cpp create mode 100644 tdeabc/vcard/URIValue.cpp create mode 100644 tdeabc/vcard/UTCValue.cpp create mode 100644 tdeabc/vcard/VCard.cpp create mode 100644 tdeabc/vcard/VCardEntity.cpp create mode 100644 tdeabc/vcard/Value.cpp create mode 100644 tdeabc/vcard/include/VCard.h create mode 100644 tdeabc/vcard/include/VCardAdrParam.h create mode 100644 tdeabc/vcard/include/VCardAdrValue.h create mode 100644 tdeabc/vcard/include/VCardAgentParam.h create mode 100644 tdeabc/vcard/include/VCardAgentValue.h create mode 100644 tdeabc/vcard/include/VCardClassValue.h create mode 100644 tdeabc/vcard/include/VCardContentLine.h create mode 100644 tdeabc/vcard/include/VCardDateParam.h create mode 100644 tdeabc/vcard/include/VCardDateValue.h create mode 100644 tdeabc/vcard/include/VCardDefines.h create mode 100644 tdeabc/vcard/include/VCardEmailParam.h create mode 100644 tdeabc/vcard/include/VCardEntity.h create mode 100644 tdeabc/vcard/include/VCardEnum.h create mode 100644 tdeabc/vcard/include/VCardFloatValue.h create mode 100644 tdeabc/vcard/include/VCardGeoValue.h create mode 100644 tdeabc/vcard/include/VCardGroup.h create mode 100644 tdeabc/vcard/include/VCardImageParam.h create mode 100644 tdeabc/vcard/include/VCardImageValue.h create mode 100644 tdeabc/vcard/include/VCardImgValue.h create mode 100644 tdeabc/vcard/include/VCardLangValue.h create mode 100644 tdeabc/vcard/include/VCardNValue.h create mode 100644 tdeabc/vcard/include/VCardOrgValue.h create mode 100644 tdeabc/vcard/include/VCardParam.h create mode 100644 tdeabc/vcard/include/VCardPhoneNumberValue.h create mode 100644 tdeabc/vcard/include/VCardRToken.h create mode 100644 tdeabc/vcard/include/VCardSndValue.h create mode 100644 tdeabc/vcard/include/VCardSoundValue.h create mode 100644 tdeabc/vcard/include/VCardSourceParam.h create mode 100644 tdeabc/vcard/include/VCardTelParam.h create mode 100644 tdeabc/vcard/include/VCardTelValue.h create mode 100644 tdeabc/vcard/include/VCardTextBinParam.h create mode 100644 tdeabc/vcard/include/VCardTextBinValue.h create mode 100644 tdeabc/vcard/include/VCardTextListValue.h create mode 100644 tdeabc/vcard/include/VCardTextParam.h create mode 100644 tdeabc/vcard/include/VCardTextValue.h create mode 100644 tdeabc/vcard/include/VCardURIValue.h create mode 100644 tdeabc/vcard/include/VCardUTCValue.h create mode 100644 tdeabc/vcard/include/VCardVCard.h create mode 100644 tdeabc/vcard/include/VCardVCardEntity.h create mode 100644 tdeabc/vcard/include/VCardValue.h create mode 100644 tdeabc/vcard/include/generated/AdrParam-generated.h create mode 100644 tdeabc/vcard/include/generated/AdrValue-generated.h create mode 100644 tdeabc/vcard/include/generated/AgentParam-generated.h create mode 100644 tdeabc/vcard/include/generated/AgentValue-generated.h create mode 100644 tdeabc/vcard/include/generated/ClassValue-generated.h create mode 100644 tdeabc/vcard/include/generated/ContentLine-generated.h create mode 100644 tdeabc/vcard/include/generated/DateParam-generated.h create mode 100644 tdeabc/vcard/include/generated/DateValue-generated.h create mode 100644 tdeabc/vcard/include/generated/EmailParam-generated.h create mode 100644 tdeabc/vcard/include/generated/FloatValue-generated.h create mode 100644 tdeabc/vcard/include/generated/GeoValue-generated.h create mode 100644 tdeabc/vcard/include/generated/Group-generated.h create mode 100644 tdeabc/vcard/include/generated/ImageParam-generated.h create mode 100644 tdeabc/vcard/include/generated/ImageValue-generated.h create mode 100644 tdeabc/vcard/include/generated/ImgParam-generated.h create mode 100644 tdeabc/vcard/include/generated/ImgValue-generated.h create mode 100644 tdeabc/vcard/include/generated/LangValue-generated.h create mode 100644 tdeabc/vcard/include/generated/NValue-generated.h create mode 100644 tdeabc/vcard/include/generated/Name-generated.h create mode 100644 tdeabc/vcard/include/generated/OrgValue-generated.h create mode 100644 tdeabc/vcard/include/generated/Param-generated.h create mode 100644 tdeabc/vcard/include/generated/ParamName-generated.h create mode 100644 tdeabc/vcard/include/generated/ParamValue-generated.h create mode 100644 tdeabc/vcard/include/generated/PhoneNumberValue-generated.h create mode 100644 tdeabc/vcard/include/generated/SoundValue-generated.h create mode 100644 tdeabc/vcard/include/generated/SourceParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TelParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TelValue-generated.h create mode 100644 tdeabc/vcard/include/generated/TextBinParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TextBinValue-generated.h create mode 100644 tdeabc/vcard/include/generated/TextListValue-generated.h create mode 100644 tdeabc/vcard/include/generated/TextNSParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TextParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TextValue-generated.h create mode 100644 tdeabc/vcard/include/generated/URIValue-generated.h create mode 100644 tdeabc/vcard/include/generated/UTCValue-generated.h create mode 100644 tdeabc/vcard/include/generated/VCard-generated.h create mode 100644 tdeabc/vcard/include/generated/VCardEntity-generated.h create mode 100644 tdeabc/vcard/include/generated/Value-generated.h create mode 100755 tdeabc/vcard/include/generated/generate create mode 100755 tdeabc/vcard/include/generated/generateHeaders.awk create mode 100644 tdeabc/vcard/include/generated/headerBodies create mode 100644 tdeabc/vcard/testread.cpp create mode 100644 tdeabc/vcard/testwrite.cpp create mode 100644 tdeabc/vcard/vCard-all.cpp create mode 100644 tdeabc/vcard21parser.cpp create mode 100644 tdeabc/vcard21parser.h create mode 100644 tdeabc/vcardconverter.cpp create mode 100644 tdeabc/vcardconverter.h create mode 100644 tdeabc/vcardformat.cpp create mode 100644 tdeabc/vcardformat.h create mode 100644 tdeabc/vcardformatimpl.cpp create mode 100644 tdeabc/vcardformatimpl.h create mode 100644 tdeabc/vcardformatplugin.cpp create mode 100644 tdeabc/vcardformatplugin.h create mode 100644 tdeabc/vcardparser/CMakeLists.txt create mode 100644 tdeabc/vcardparser/Makefile.am create mode 100644 tdeabc/vcardparser/README.testing create mode 100755 tdeabc/vcardparser/checkvcard.pl create mode 100644 tdeabc/vcardparser/testread.cpp create mode 100644 tdeabc/vcardparser/testread2.cpp create mode 100644 tdeabc/vcardparser/tests/vcard1.vcf create mode 100644 tdeabc/vcardparser/tests/vcard1.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard2.vcf create mode 100644 tdeabc/vcardparser/tests/vcard2.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard3.vcf create mode 100644 tdeabc/vcardparser/tests/vcard3.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard4.vcf create mode 100644 tdeabc/vcardparser/tests/vcard4.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard5.vcf create mode 100644 tdeabc/vcardparser/tests/vcard5.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard6.vcf create mode 100644 tdeabc/vcardparser/tests/vcard6.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard7.vcf create mode 100644 tdeabc/vcardparser/tests/vcard7.vcf.ref create mode 100644 tdeabc/vcardparser/testutils.cpp create mode 100644 tdeabc/vcardparser/testutils.h create mode 100644 tdeabc/vcardparser/testwrite.cpp create mode 100644 tdeabc/vcardparser/vcard.cpp create mode 100644 tdeabc/vcardparser/vcard.h create mode 100644 tdeabc/vcardparser/vcardline.cpp create mode 100644 tdeabc/vcardparser/vcardline.h create mode 100644 tdeabc/vcardparser/vcardparser.cpp create mode 100644 tdeabc/vcardparser/vcardparser.h create mode 100644 tdeabc/vcardtool.cpp create mode 100644 tdeabc/vcardtool.h (limited to 'tdeprint/management/kxmlcommandselector.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a9f23a4d..ac1ecf1a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -953,7 +953,7 @@ add_subdirectory( kinit ) add_subdirectory( tdeprint ) add_subdirectory( kab ) add_subdirectory( tderesources ) -add_subdirectory( kabc ) +add_subdirectory( tdeabc ) add_subdirectory( arts ) add_subdirectory( interfaces ) add_subdirectory( kate ) diff --git a/KDE2PORTING.html b/KDE2PORTING.html index b375854de..322efffb2 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -204,9 +204,9 @@ must have created a TDEApplication object before the methods can be used.

      -      #include <kglobal.h>
      +      #include <tdeglobal.h>
             #include <tdeconfig.h>      // Needed to use TDEConfig
      -      #include <klocale.h>      // Needed to use TDELocale
      +      #include <tdelocale.h>      // Needed to use TDELocale
             #include <kiconloader.h>  // Needed to use TDEIconLoader
           
      diff --git a/Mainpage.dox b/Mainpage.dox index 15904678c..702510fc5 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -49,8 +49,8 @@ * (classes)\n * Defines interfaces for common components so that new implementations * can be dropped in. - * - kabc - * (classes)\n + * - kabc + * (classes)\n * Access to the Trinity address book. * - tderesources * (classes)\n diff --git a/Makefile.am.in b/Makefile.am.in index 83d0901fa..2ebb4f8c6 100644 --- a/Makefile.am.in +++ b/Makefile.am.in @@ -39,7 +39,7 @@ potdir = $(kde_includes) pot_DATA = kde.pot messages: - cd kabc/scripts && perl ./makeaddressee + cd tdeabc/scripts && perl ./makeaddressee find . -type d | grep -v '\.svn' | sed -e 's,$$,/,' > dirs mfs=`find . -name Makefile.am | xargs egrep -l '^messages:'` ;\ for dir in $$mfs; do \ diff --git a/arts/kde/kaudioplaystream.cpp b/arts/kde/kaudioplaystream.cpp index 52743a67e..0ef5b8332 100644 --- a/arts/kde/kaudioplaystream.cpp +++ b/arts/kde/kaudioplaystream.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/arts/kde/kaudiorecordstream.cpp b/arts/kde/kaudiorecordstream.cpp index 0d180d1f1..0c11bcf04 100644 --- a/arts/kde/kaudiorecordstream.cpp +++ b/arts/kde/kaudiorecordstream.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/arts/kde/kconverttest.cc b/arts/kde/kconverttest.cc index 70c4b7918..647c2f320 100644 --- a/arts/kde/kconverttest.cc +++ b/arts/kde/kconverttest.cc @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include diff --git a/arts/kde/kiotest.cc b/arts/kde/kiotest.cc index 01ce8f3f1..ed9a3fadf 100644 --- a/arts/kde/kiotest.cc +++ b/arts/kde/kiotest.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include "qiomanager.h" diff --git a/arts/kde/kiotestslow.cc b/arts/kde/kiotestslow.cc index df6ed645f..93bfac388 100644 --- a/arts/kde/kiotestslow.cc +++ b/arts/kde/kiotestslow.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index 389228d99..c03a18c21 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -27,7 +27,7 @@ #endif #include -#include +#include #include "kvideowidget.h" diff --git a/arts/kde/mcop-dcop/kmcop.cpp b/arts/kde/mcop-dcop/kmcop.cpp index d134aeca4..d5e8c8642 100644 --- a/arts/kde/mcop-dcop/kmcop.cpp +++ b/arts/kde/mcop-dcop/kmcop.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index 3d0e45d02..313a7a993 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -52,9 +52,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/arts/message/artsmessage.cc b/arts/message/artsmessage.cc index 4eb62f1fb..eaa5c8e2c 100644 --- a/arts/message/artsmessage.cc +++ b/arts/message/artsmessage.cc @@ -31,11 +31,11 @@ Gnome, etc. and used instead. #include -#include -#include +#include +#include #include #include -#include +#include #include // command line options diff --git a/configure.in.in b/configure.in.in index 651d6f2eb..c414bafdb 100644 --- a/configure.in.in +++ b/configure.in.in @@ -249,7 +249,7 @@ AC_SUBST(LIBRESOLV) AC_SUBST(LIBICE) AC_SUBST(LIB_KAB, '$(top_builddir)/kab/libkab.la') -AC_SUBST(LIB_KABC, '$(top_builddir)/kabc/libkabc.la') +AC_SUBST(LIB_KABC, '$(top_builddir)/tdeabc/libkabc.la') AC_SUBST(LIB_TDECORE, '$(top_builddir)/tdecore/libtdecore.la') AC_SUBST(LIB_TDEUI, '$(top_builddir)/tdeui/libtdeui.la') AC_SUBST(LIB_KIO, '$(top_builddir)/tdeio/libtdeio.la') diff --git a/interfaces/tdeimproxy/library/tdeimproxy.cpp b/interfaces/tdeimproxy/library/tdeimproxy.cpp index c4d77c61e..fb2db0eb4 100644 --- a/interfaces/tdeimproxy/library/tdeimproxy.cpp +++ b/interfaces/tdeimproxy/library/tdeimproxy.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp index 7dd746c4f..370805a74 100644 --- a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp +++ b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp @@ -5,10 +5,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdescript/scriptloader.cpp b/interfaces/tdescript/scriptloader.cpp index ad6c8df20..803feb3a6 100644 --- a/interfaces/tdescript/scriptloader.cpp +++ b/interfaces/tdescript/scriptloader.cpp @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/interfaces/tdescript/scriptmanager.cpp b/interfaces/tdescript/scriptmanager.cpp index 42e20cd5b..a0dfbe921 100644 --- a/interfaces/tdescript/scriptmanager.cpp +++ b/interfaces/tdescript/scriptmanager.cpp @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include #include //using namespace KScriptInterface; diff --git a/interfaces/tdetexteditor/CMakeLists.txt b/interfaces/tdetexteditor/CMakeLists.txt index 0808a84f3..ca0176ce7 100644 --- a/interfaces/tdetexteditor/CMakeLists.txt +++ b/interfaces/tdetexteditor/CMakeLists.txt @@ -90,7 +90,7 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 0.0.0 - LINK tdeui-shared kabc-shared tdeparts-shared + LINK tdeui-shared tdeabc-shared tdeparts-shared DEPENDENCIES dcopidl dcopidl2cpp DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/interfaces/tdetexteditor/Makefile.am b/interfaces/tdetexteditor/Makefile.am index b535b39cc..4b1590abe 100644 --- a/interfaces/tdetexteditor/Makefile.am +++ b/interfaces/tdetexteditor/Makefile.am @@ -46,7 +46,7 @@ servicetype_DATA = tdetexteditor.desktop tdetexteditoreditor.desktop tdetextedit kcm_tdetexteditor_DATA = kcm_tdetexteditor.desktop kcm_tdetexteditordir = $(kde_datadir)/kcm_componentchooser -templateinterface.lo: $(top_builddir)/kabc/addressee.h +templateinterface.lo: $(top_builddir)/tdeabc/addressee.h include ../../admin/Doxyfile.am diff --git a/interfaces/tdetexteditor/editorchooser.cpp b/interfaces/tdetexteditor/editorchooser.cpp index aed904c54..1eddfb8d6 100644 --- a/interfaces/tdetexteditor/editorchooser.cpp +++ b/interfaces/tdetexteditor/editorchooser.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdetexteditor/templateinterface.cpp b/interfaces/tdetexteditor/templateinterface.cpp index ecc34c7e2..01e0c292f 100644 --- a/interfaces/tdetexteditor/templateinterface.cpp +++ b/interfaces/tdetexteditor/templateinterface.cpp @@ -22,11 +22,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/interfaces/terminal/test/main.cc b/interfaces/terminal/test/main.cc index bcce6fdbc..8130f85d6 100644 --- a/interfaces/terminal/test/main.cc +++ b/interfaces/terminal/test/main.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include "main.h" #include "main.moc" diff --git a/kab/addressbook.cc b/kab/addressbook.cc index ab73111be..852f56d57 100644 --- a/kab/addressbook.cc +++ b/kab/addressbook.cc @@ -22,11 +22,11 @@ #include #include -#include +#include #include -#include +#include #include -#include +#include extern "C" { #include diff --git a/kab/kabapi.cc b/kab/kabapi.cc index 05cffe946..7f2159e24 100644 --- a/kab/kabapi.cc +++ b/kab/kabapi.cc @@ -18,8 +18,8 @@ #include "kabapi.h" #include -#include -#include +#include +#include #include diff --git a/kabc/CMakeLists.txt b/kabc/CMakeLists.txt deleted file mode 100644 index 57c4741fe..000000000 --- a/kabc/CMakeLists.txt +++ /dev/null @@ -1,123 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( vcard ) -add_subdirectory( vcardparser ) -add_subdirectory( formats ) -add_subdirectory( plugins ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include - ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include/generated - ${CMAKE_CURRENT_SOURCE_DIR}/vcardparser - - # external includes - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/kab -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - address.h addressbook.h addresseedialog.h - agent.h distributionlist.h distributionlistdialog.h - distributionlisteditor.h errorhandler.h field.h - format.h formatfactory.h formatplugin.h geo.h key.h - phonenumber.h picture.h plugin.h resource.h secrecy.h - resourceselectdialog.h sound.h stdaddressbook.h - timezone.h vcardconverter.h vcardformat.h lock.h - vcardformatplugin.h ldifconverter.h addresslineedit.h - ldapclient.h addresseelist.h locknull.h ldif.h - ldapurl.h ldapconfigwidget.h sortmode.h - ${CMAKE_CURRENT_BINARY_DIR}/addressee.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES tdeab2tdeabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) -install( FILES kabc_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources ) -install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc ) - - -##### generated files ########################### -# FIXME this hack make compatibility with out-of-source mode - -file( COPY - scripts/makeaddressee scripts/addressee.src.cpp - scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp - DESTINATION scripts ) - -add_custom_command( - OUTPUT addressee.cpp addressee.h field.cpp - COMMAND perl - ARGS makeaddressee - DEPENDS scripts/addressee.src.cpp scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts -) - - -##### kabc ###################################### - -set( target kabc ) - -set( ${target}_SRCS - address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp - agent.cpp distributionlist.cpp distributionlistdialog.cpp - distributionlisteditor.cpp errorhandler.cpp field.cpp - formatfactory.cpp geo.cpp key.cpp phonenumber.cpp - picture.cpp plugin.cpp resource.cpp resourceselectdialog.cpp - secrecy.cpp sound.cpp stdaddressbook.cpp timezone.cpp - vcard21parser.cpp vcardconverter.cpp vcardformat.cpp - vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp - addresslineedit.cpp ldapclient.cpp addresseelist.cpp - vcardtool.cpp addresseehelper.cpp lock.cpp locknull.cpp - ldif.cpp ldapurl.cpp ldapconfigwidget.cpp sortmode.cpp - addresseehelper.skel -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.2.0 - LINK vcards-static vcard-shared tdeio-shared tderesources-shared - DEPENDENCIES addressee.h dcopidl - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### tdeab2tdeabc ################################## - -set( target tdeab2tdeabc ) - -set( ${target}_SRCS - tdeab2tdeabc.cpp -) - -tde_add_executable( ${target} - SOURCES ${${target}_SRCS} - LINK kab-static kabc-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kabc/HACKING b/kabc/HACKING deleted file mode 100644 index 429ae0865..000000000 --- a/kabc/HACKING +++ /dev/null @@ -1,100 +0,0 @@ -Coding Style -============ - -See http://korganizer.kde.org/hacking.html for an HTML version. - -Formatting ----------- - -- No Tabs. -- Indent with 2 spaces. -- A line must not have more than 80 chars. -- Put Spaces between brackets and arguments of functions. -- For if, else, while and similar statements put the brackets on the same line - as the statement. -- Function and class definitions have their brackets on separate lines. - -Example: - -void MyClass::myFunction() -{ - if ( blah == fasel ) { - blubbVariable = arglValue; - } else { - blubbVariable = oerxValue; - } -} - - -Header Formatting ------------------ - -- General formatting rules apply. -- Access modifiers are indented. -- Put curly brackets of class definition on its own line. -- Double inclusion protection defines are all upper case letters and are - composed of the namespace (if available), the classname and a H suffix - separated by underscores. -- Inside a namespace there is no indentation. - -Example: - -#ifndef XKJ_MYCLASS_H -#define XKJ_MYCLASS_H - -namespace XKJ { - -class MyClass -{ - public: - MyClass(); - - private: - int mMyInt; -}; - -} - -#endif - - -API docs --------- - -- Each public function must have a Doxygen compatible comment in the header -- Use C-style comments without additional asterisks -- Indent correctly. -- Comments should be grammatically correct, e.g. sentences start with uppercase - letters and end with a full stop. -- Be concise. - -Example: - - /** - This function makes tea. - - @param cups number of cups. - @result tea - */ - Tea makeTea( int cups ); - - -Class and File Names --------------------- - -- Put classes in files, which have the same name as the class, but only - lower-case letters. -- Designer-generated files should have a name classname_base.ui and shoul - contain a class called ClassnameBase. -- Classes inheriting from designer-generated classes have the same name as the - generated class, but without the Base suffix. - -Class and Variable Names ------------------------- - -- For class, variable, function names seperate multiple words by upper-casing - the words precedeed by other words. -- Class names start with an upper-case letter. -- Function names start with a lower-case letter. -- Variable names start with a lower-case letter. -- Member variables of a class start with "m" followed by an upper-case letter. diff --git a/kabc/HOWTO b/kabc/HOWTO deleted file mode 100644 index 7b41371b0..000000000 --- a/kabc/HOWTO +++ /dev/null @@ -1,372 +0,0 @@ -The KDE Address Book Framework -=============================== - -The KDE address book framework tries to provide an easy to use and powerful -mechanism to handle contacts in all KDE applications. - -If you want to make use of it, this small introduction to programming -with libkabc may be helpful. - - -General Concepts -================= - -In libkabc the storage and management of contacts is devided in 2 layers. - -****************** -Management Layer * -****************** - - .-------------------. - | KABC::AddressBook | - .--------------------------------. - | KABC::Addressee | => Iterators - | KABC::Addressee | - | KABC::Addressee | => Search functions - | ... | - `--------------------------------' - | - - - - - - - - - - - - | - - - - - - - - - - - - - - | -*************** | -Storage Layer * | -*************** | ....................... - | . . - Network - .---------------. | . .---------------. . - | ResourceFile |----+-----| ResourceLDAP | . - `---------------' | . `---------------' . - .---------------. | . .---------------. . - | ResourceDir |----+-----| ResourceNet | . - `---------------' . `---------------' . - . . - ....................... - - -The Management Layer ---------------------- -The Management Layer consists of the two classes KABC::AddressBook and -KABC::Addressee. KABC::AddressBook is a container for KABC::Addressee objects -and provides 2 kinds of access methods. -1) Iterators - With iterators you can iterate over each of the contacts of the - address book and perform an action on it - -2) Search functions - With search functions you can search for contacts with special attributes - such as "all contacts with the name 'Harald'" - -The class KABC::Addressee represents a single contact and contains all data -a vCard could store (as specified in RFC 2426). - -The Storage Layer ------------------- -The Storage Layer consists of the class KABC::Resource and its derived classes. -These classes are used by KABC::AddressBook to load and store the contacts to -the single backends. -At the moment libkabc provides 4 types of resources: -1) ResourceFile - - stores all contacts in a single file - -2) ResourceDir - - stores each contact in its own file with the unique identifier of the - contact as a filename, will all of the files together in one directory - -3) ResourceLDAP - - stores all of the contacts on a LDAP server - -4) ResourceNet - - stores all contacts in a single file, which can be accessable via HTTP, - FTP, Fish, WebDAV, POP3, IMAP or whatever the KIO frame work supports - -In general the developer does not have to take how to save the single contacts. -He just has to plug one of the above mentioned resources into KABC::AddressBook -and perform a save action. - -Examples -========= -Like a picture, C/C++ code is worth a 1000 words I'd like to give you a -lot of examples now, how to use libkabc for several tasks: - - -Using KABC::StdAddressBook and Iterators ------------------------------------------ -Normally you have to plugin the resources manually into the addressbook object -and call the load() function before you can access the contacts, but there is -a special class KABC::StdAddressBook, which loads all resources of the standard -address book of the user automatically. You can use it the following way: - - - #include - - 1: KABC::AddressBook *ab = KABC::StdAddressBook::self(); - 2: KABC::AddressBook::Iterator it; - 3: for ( it = ab->begin(); it != ab->end(); ++it ) { - 4: KABC::Addressee addr = (*it); - 5: - 6: kdDebug() << "Name = " << addr.formattedName() << endl; - 7: } - -The above example prints out the names of all the contacts in the user's address -book. In line 1 you retrieve a pointer to the user's standard address book -(provided by KABC::StdAddressBook via a singleton design pattern). -In line 2 an iterator is defined, which is used in line 3 to iterate over the -whole address book. The assignment in line 4 is intended only to show more -clearly how iterators function. -You could also use (*it).formattedName() directly. In line 6 the formatted name -of the current contact is printed out to stderr. -As you can see that's all magic, and it's quite easy ;) - - -Using KABC::AddressBook manually ---------------------------------- -In some cases you don't want to load the user's standard address book, but, -for example, just a single vCard. For this purpose you have to use the -class KABC::AddressBook and handle the resource stuff manually. -The following code will create a file resource and save a contact into it: - - - #include - #include - - 1: KABC::AddressBook ab; - 2: - 3: // create a file resource - 4: KABC::Resource *res = new KABC::ResourceFile( "/home/user/myvcard.vcf", "vcard" ); - 5: - 6: if ( !ab.addResource( res ) ) { - 7: kdDebug() << "Unable to open resource" << endl; - 8: return 1; - 9: } -10: -11: if ( !ab.load() ) { -12: kdDebug() << "Unable to load address book!" << endl; -13: return 2; -14: } -15: -16: KABC::Addressee addr; -17: addr.setNameFromString( "Otto Harald Meyer" ); -18: addr.setBirthday( QDate( 1982, 07, 19 ) ); -19: addr.setNickName( "otto" ); -20: addr.setMailer( "kmail" ); -21: -22: // TZ -23: KABC::TimeZone tz( 60 ); // takes time shift in minutes as argument -24: addr.setTimeZone( tz ); -25: -26: // GEO -27: KABC::Geo geo( 52.5, 13.36 ); // takes latitude and longitude as argument -28: addr.setGeo( geo ); -29: -30: addr.setTitle( "dude, the" ); -31: addr.setRole( "developer" ); -32: addr.setOrganization( "KDE e.V." ); -33: addr.setNote( "Yet another senseless note..." ); -34: addr.setUrl( KURL( "http://kaddressbook.org" ) ); -35: -36: // CLASS -37: KABC::Secrecy secrecy( KABC::Secrecy::Confidential ); -38: addr.setSecrecy( secrecy ); -39: -40: // PHOTO or LOGO -41: KABC::Picture photo; -42: QImage img; -43: if ( img.load( "face.png", "PNG" ) ) { -44: photo.setData( img ); -45: photo.setType( "image/png" ); -46: addr.setPhoto( photo ); -47: } -48: -49: addr.insertEmail( "otto@kde.se", true ); // preferred email -50: addr.insertEmail( "otti@yahoo.com", false ); -51: -52: // TEL -53: KABC::PhoneNumber phoneHome( "0351 5466738", KABC::PhoneNumber::Home ); -54: KABC::PhoneNumber phoneWork( "0351 2335411", KABC::PhoneNumber::Work ); -55: addr.insertPhoneNumber( phoneHome ); -56: addr.insertPhoneNumber( phoneWork ); -57: -58: // ADR -59: KABC::Address homeAddr( KABC::Address::Home ); -60: homeAddr.setStreet( "Milliwaystreet 42" ); -61: homeAddr.setLocality( "London" ); -62: homeAddr.setRegion( "Saxony" ); -63: homeAddr.setPostalCode( "43435" ); -64: homeAddr.setCountry( "Germany" ); -65: addr.insertAddress( homeAddr ); -66: -67: addr.insertCategory( "LUG-Dresden-Members" ); -68: -69: addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", "21.04.2009" ); -70: -71: ab.insertAddressee( addr ); // will be assigned to the standard resource -72: // automatically -73: -74: KABC::Ticket *ticket = ab.requestSaveTicket( res ); -75: if ( !ticket ) { -76: kdError() << "Resource is locked by other application!" << endl; -77: } else { -78: if ( !ab.save( ticket ) ) { -79: kdError() << "Saving failed!" << endl; -80: ab.releaseSaveTicket( ticket ); -81: } -82: -83: } -84: -85: return 0; - -In line 1 the KABC::AddressBook is created. In line 4 you creat the -KABC::ResourceFile (which will handle the loading/saving). -The resource takes 2 arguments, the first is the file name and the -second one the file format. At the moment libkabc supports two file formats: -1) vCard, as specified in RFC 2426 -2) Binary, which increases performance during loading and saving - -In line 6 we try to plug the resource into the addressbook. The addressbook -class tries to open the resource immediately and returns whether opening was -successful. We add here only one resource, but you can add as many resources -as you want. - -In line 11 we try to load all contacts from the backends into the address book. -As before, it returns whether opening was successful. - -In line 16 a KABC::Addressee is created, which we will fill now with data, -before inserting it into the KABC::AddressBook. -The setNameFromString() function in the following line takes a string as -argument and tries to parse it into the single name components such as: given -name, family name, additional names, honoric prefix and honoric suffix. -You can set these values manually as well by calling - addr.setGivenName( "Otto" ); -and - addr.setFamilyName( "Meyer" ); -etc. etc. - -In line 23 we use the class KABC::TimeZone to store the timezone. This class -takes the time shift in minutes. - -In line 27 the KABC::Geo class is used for storing the geographical -information. The arguments are the latitude and longitude as float values. - -KABC::Secrecy in line 37 represents the CLASS entity of a vCard and can take -KABC::Secrecy::Public, KABC::Secrecy::Private or KABC::Secrecy::Confidential -as argument. - -In line 41 we make use of KABC::Picture class to store the photo of the -contact. This class can contain either an URL or the raw image data in form -of a QImage, in this example we use the latter. - -In line 43 we try to load the image "face.png" from the local directory and -assign this QImage to the KABC::Picture class via the setData() function. -Additionally we set the type of the picture to "image/png". - -From 49 - 50 we insert 2 email addresses with the first one as preferred -(second argument is true). - -In 53 and the following 3 lines we add two telephone numbers. For this purpose -libkabc provides the KABC::PhoneNumber class, which takes the phone number in -string representation as first argument and the type as second. The types can -be combined, so 'KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax' would be -the Home Fax. - -In line 59 we create a KABC::Address object and set the single parts in the -following lines. - -In line 67 we assign the contact to a special category. - -A contact can also contain custom entries, which are not specified in the API, -so you can add custom values with insertCustom() as shown in line 69. -The first argument of this function should be the name of the application, so -2 applications which use the same custom entry accidentally, do not overwrite -the data for each other. The second argument contains the name of the -custom entry and the third argument the value in string representation. - -In line 71 we finally insert the KABC::Addressee object into the -KABC::AddressBook. Since we have only one resource loaded, the contact is -automatically assigned to this resource. If you have several writeable -resources loaded, you should ask the user which resource the contact shall -belong to and assign the selected resource to the contact with - KABC::Addressee.setResource( KABC::Resource *resource ); -before inserting it into the address book. - -To prevent multiple access to one resource and possible resulting data loss -we have to lock the resource before saving our changes. -For this purpose KABC::AddressBook provides the function - requestSaveTicket( KABC::Resource* ) -which takes a pointer to the resource which shall be saved as argument and -returns a so called 'Save Ticket' if locking succeeded or a null pointer -if the resource is already locked by another application. - -So when we retrieved a valid ticket in line 74, we try to save our changes in -line 78. -The KABC::AddressBook::save() function takes the save ticket as argument and -returns whether saving succeeded. It also releases the save ticket when successful. - -Important! -If the save() call fails, you have to release the save ticket manually, as is -done in line 80, otherwise possible locks, created by the resources, won't be -removed. - -You can see also, that manual use is quite easy for the KABC::AddressBook class -and for the ResourceFile. For more information about the API of KABC::Addressee -please take a look at the official API documentation or the header files. - - -Distribution Lists -------------------- -libkabc provides so called distribution lists to group contacts. These lists -just store the uid of contacts, so they can be used for every kind of contact -grouping. There are 2 classes which handle the whole distribution list tasks, -KABC::DistributionListManager and KABC::DistributionList. The first one keeps -track of all available distribution lists and the latter one is the -representation of one list. - - - #include - #include - - 1: KABC::DistributionListManager manager( KABC::StdAddressBook::self() ); - 2: - 3: // load the lists - 4: manager.load(); - 5: - 6: QStringList listNames = manager.listNames(); - 7: QStringList::Iterator it; - 8: for ( it = listNames.begin(); it != listNames.end(); ++it ) { - 9: KABC::DistributionList *list = manager.list( *it ); -10: kdDebug() << list->name() << endl; -11: -12: QStringList emails = list->emails(); -13: QStringList::Iterator eit; -14: for ( eit = emails.begin(); eit != emails.end(); ++eit ) -15: kdDebug() << QString( "\t%1" ).arg( (*eit).latin1() ) << endl; -16: } - -In the first line a KABC::DistributionListManager is created. The manager takes -a pointer to a KABC::AddressBook, because he has to resolve the stored uids to -currently available email addresses. -In line 4 the manager loads all distribution lists from the central config file -$HOME/.trinity/share/apps/kabc/distlists. -The next line queries the names of all available distribution lists, which are -used in line 9 to retrieve a pointer to the specific list. -Now that you have a KABC::DistributionList object, you can performe the -following actions on it: - - set / get the name - - insert an entry - - remove an entry - - get a list of all email addresses - - get a list of all entries (which includes the uids) - -In line 12 we query all email addresses of every resource and print them out. - - contains also the declaration for the class -KABC::DistributionListWatcher. This class exists only once per application and -its only job is to emit a signal as soon as the distribution list file has -changed. So to make your application aware of changes use the following code: - - - #include - - 1: connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ), - 2: this, SLOT( slotDistributionListChanged() ) ); - -You see, as usual, easy ;) - diff --git a/kabc/Makefile.am b/kabc/Makefile.am deleted file mode 100644 index 57e72aec2..000000000 --- a/kabc/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ -SUBDIRS = vcard vcardparser . formats plugins scripts tests - -# Make sure $(all_includes) remains last! -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ - -I$(srcdir)/vcard/include -I$(srcdir)/vcardparser/ \ - -I$(srcdir)/vcard/include/generated \ - -I$(srcdir)/vcardparser $(all_includes) - -field.cpp: addressee.h addressee.cpp -addressee.cpp: addressee.h -addressee.cpp addressee.h field.cpp: \ - $(srcdir)/scripts/makeaddressee \ - $(srcdir)/scripts/addressee.src.cpp \ - $(srcdir)/scripts/addressee.src.h \ - $(srcdir)/scripts/entrylist \ - $(srcdir)/scripts/field.src.cpp - mysrcdir=`cd $(srcdir)/scripts && pwd` ;\ - cd scripts && $(PERL) $$mysrcdir/makeaddressee - -CLEANFILES = addressee.h addressee.cpp field.cpp - -lib_LTLIBRARIES = libkabc.la -libkabc_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 3:0:2 -no-undefined -libkabc_la_LIBADD = vcard/libvcard.la vcardparser/libvcards.la $(LIB_KIO) \ - $(top_builddir)/tderesources/libtderesources.la $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE) -libkabc_la_COMPILE_FIRST = addressee.h - -libkabc_la_SOURCES = \ - address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp agent.cpp \ - distributionlist.cpp distributionlistdialog.cpp distributionlisteditor.cpp \ - errorhandler.cpp field.cpp formatfactory.cpp geo.cpp key.cpp \ - phonenumber.cpp picture.cpp plugin.cpp resource.cpp \ - resourceselectdialog.cpp secrecy.cpp sound.cpp stdaddressbook.cpp \ - timezone.cpp vcard21parser.cpp vcardconverter.cpp vcardformat.cpp \ - vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp addresslineedit.cpp \ - ldapclient.cpp addresseelist.cpp vcardtool.cpp addresseehelper.cpp \ - addresseehelper.skel lock.cpp locknull.cpp ldif.cpp ldapurl.cpp ldapconfigwidget.cpp \ - sortmode.cpp - - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = address.h addressbook.h addressee.h addresseedialog.h \ - agent.h distributionlist.h distributionlistdialog.h distributionlisteditor.h \ - errorhandler.h field.h format.h formatfactory.h formatplugin.h geo.h key.h \ - phonenumber.h picture.h plugin.h resource.h \ - resourceselectdialog.h secrecy.h sound.h stdaddressbook.h timezone.h \ - vcardconverter.h vcardformat.h vcardformatplugin.h ldifconverter.h \ - addresslineedit.h ldapclient.h addresseelist.h lock.h locknull.h ldif.h \ - ldapurl.h ldapconfigwidget.h sortmode.h - -METASOURCES = AUTO - -bin_PROGRAMS = tdeab2tdeabc - -tdeab2tdeabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -tdeab2tdeabc_LDADD = libkabc.la ../kab/libkab.la -tdeab2tdeabc_SOURCES = tdeab2tdeabc.cpp - -autostart_DATA = tdeab2tdeabc.desktop -autostartdir = $(datadir)/autostart - -manager_DATA = kabc_manager.desktop -managerdir = $(kde_servicesdir)/tderesources - -DOXYGEN_REFERENCES = tdecore tdeui - -map_DATA = countrytransl.map -mapdir = $(kde_datadir)/kabc - -EXTRA_DIST = $(map_DATA) - -include ../admin/Doxyfile.am diff --git a/kabc/README b/kabc/README deleted file mode 100644 index 46d21b9b6..000000000 --- a/kabc/README +++ /dev/null @@ -1,28 +0,0 @@ -LIBKABC - new address book API for KDE - -PURPOSE: - -libkabc provides an API for address book data. This can be used by all KDE -application using data of this type, e.g. KAddressBook, KMail, KOrganizer, -KPilot etc. It is meant as replacement for libkab (in tdebase/kab). - -FEATURES: - -- Value based interface, addressbook entry data is implicitly shared. -- Address book entries are identified by a unique id. -- vCard backend (RFC 2425 / RFC 2426). -- Locking mechanism to support concurrent access to the address book by - multiple processes. -- Notification on change of addressbook by other process. -- Dialog for selecting address book entries, supports mouse and keyboard - selection, supports automatic name completion. -- GUI client for viewing, modifying address book data. This is aimed at - developers not end users. -- Tool for converting data, written with libkab, to libkabc format. -- Multiple backends (resources) for storing entries e.g. LDAP - -AUTHOR: Cornelius Schumacher - -LICENCE: LPGL - -DATE: 13 Oct 2001 diff --git a/kabc/README.AddressFormat b/kabc/README.AddressFormat deleted file mode 100644 index 8079e4914..000000000 --- a/kabc/README.AddressFormat +++ /dev/null @@ -1,66 +0,0 @@ -Address formats can be a tricky thing. libkabc tries very hard to perfectly fit -the needs of ~95% of users and to be at least sufficient for the other 5%. - -The formatting of an address depends on the destination country as well as on -the origin country of a letter. Basically, the part indicating the destination -country follows the rules of the country of origin, all the rest follows the -rules of the destination country. So we need to store for every country a) the -country positioning and b) the address formatting. - -Address formats should usually be stored in a country's entry.desktop. There we -store the country position in field "AddressCountryPosition" and the address -format in a field "AddressFormat". Note that for most countries one field -"AddressFormat" is sufficient for personal as well as company addresses -(because personal addresses look just like business addresses without company); -however, in some countries (eg. Hungary) business addresses differ in their -structure. In this case you have the possibility of adding another field -"BusinessAddressFormat" which will be preferred for formatting of business -addresses; if libkabc can't find such a field, it will fall back to -"AddressFormat". (Please use BusinessAddressFormat ONLY if you really need to) - -The format consists mainly of tags that will be replaced by address fields. -The list of tags may grow in the future, the format *might* change in the near -future, but I hope not. - -Any comments very very welcome to kde-pim@kde.org or to jost@schenck.de. - --Jost. - -Fields AddressFormat and BusinessAddressFormat ------------------------------------------------- -%n = real name -%N = REAL NAME -%cm = company -%CM = COMPANY -%s = street -%S = STREET -%z = zip code -%l = location -%L = LOCATION -%r = region -%R = REGION -%p = post office box -%, = conditional comma+whitespace, - will be left out if the value left or right of it is purged -%w = conditional whitespace, - will be left out if the value left or right of it is purged -%0(...) = the text inside the brackets will be completely purged if not - at least one tag inside it evaluates to something. Example: when the - address doesn't have a postbox, the string %0(PO Box %p) will not - evaluate to "PO Box " but to an empty string. -\n = newline - -Field AddressCountryPosition ------------------------------------------------- -below = country name below rest of address -BELOW = country name below in capital letters -above = country name above rest of address -ABOVE = country name above in capital letters - -Some Tips ------------------------------------------------- -- You sometimes have three fields in a line which can all be empty. If you eg. -separate them all with conditional whitespace (same goes for cond. comma) like -in "%z%w%r%w%l" and only the middle value (here: region) is empty, there will -be no whitespace at all between the outer values (here: zipcode and location). -To avoid this, combine two of these values with purge brackets: %0(%z%w%r)%w%l. diff --git a/kabc/TODO b/kabc/TODO deleted file mode 100644 index 13f75b6bb..000000000 --- a/kabc/TODO +++ /dev/null @@ -1 +0,0 @@ -Factor out TDELockFile. diff --git a/kabc/address.cpp b/kabc/address.cpp deleted file mode 100644 index 46b483b43..000000000 --- a/kabc/address.cpp +++ /dev/null @@ -1,592 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "address.h" - -#include -#include -#include -#include -#include -#include - -#include - -using namespace KABC; - -TQMap *Address::mISOMap = 0; -static KStaticDeleter< TQMap > isoMapDeleter; - -Address::Address() : - mEmpty( true ), mType( 0 ) -{ - mId = TDEApplication::randomString( 10 ); -} - -Address::Address( int type ) : - mEmpty( true ), mType( type ) -{ - mId = TDEApplication::randomString( 10 ); -} - -bool Address::operator==( const Address &a ) const -{ - if ( mPostOfficeBox != a.mPostOfficeBox ) return false; - if ( mExtended != a.mExtended ) return false; - if ( mStreet != a.mStreet ) return false; - if ( mLocality != a.mLocality ) return false; - if ( mRegion != a.mRegion ) return false; - if ( mPostalCode != a.mPostalCode ) return false; - if ( mCountry != a.mCountry ) return false; - if ( mLabel != a.mLabel ) return false; - - return true; -} - -bool Address::operator!=( const Address &a ) const -{ - return !( a == *this ); -} - -bool Address::isEmpty() const -{ - if ( mPostOfficeBox.isEmpty() && - mExtended.isEmpty() && - mStreet.isEmpty() && - mLocality.isEmpty() && - mRegion.isEmpty() && - mPostalCode.isEmpty() && - mCountry.isEmpty() && - mLabel.isEmpty() ) { - return true; - } - return false; -} - -void Address::clear() -{ - *this = Address(); -} - -void Address::setId( const TQString &id ) -{ - mEmpty = false; - - mId = id; -} - -TQString Address::id() const -{ - return mId; -} - -void Address::setType( int type ) -{ - mEmpty = false; - - mType = type; -} - -int Address::type() const -{ - return mType; -} - -TQString Address::typeLabel() const -{ - TQString label; - bool first = true; - - const TypeList list = typeList(); - - TypeList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { - label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); - if ( first ) - first = false; - } - } - - return label; -} - -void Address::setPostOfficeBox( const TQString &s ) -{ - mEmpty = false; - - mPostOfficeBox = s; -} - -TQString Address::postOfficeBox() const -{ - return mPostOfficeBox; -} - -TQString Address::postOfficeBoxLabel() -{ - return i18n("Post Office Box"); -} - - -void Address::setExtended( const TQString &s ) -{ - mEmpty = false; - - mExtended = s; -} - -TQString Address::extended() const -{ - return mExtended; -} - -TQString Address::extendedLabel() -{ - return i18n("Extended Address Information"); -} - - -void Address::setStreet( const TQString &s ) -{ - mEmpty = false; - - mStreet = s; -} - -TQString Address::street() const -{ - return mStreet; -} - -TQString Address::streetLabel() -{ - return i18n("Street"); -} - - -void Address::setLocality( const TQString &s ) -{ - mEmpty = false; - - mLocality = s; -} - -TQString Address::locality() const -{ - return mLocality; -} - -TQString Address::localityLabel() -{ - return i18n("Locality"); -} - - -void Address::setRegion( const TQString &s ) -{ - mEmpty = false; - - mRegion = s; -} - -TQString Address::region() const -{ - return mRegion; -} - -TQString Address::regionLabel() -{ - return i18n("Region"); -} - - -void Address::setPostalCode( const TQString &s ) -{ - mEmpty = false; - - mPostalCode = s; -} - -TQString Address::postalCode() const -{ - return mPostalCode; -} - -TQString Address::postalCodeLabel() -{ - return i18n("Postal Code"); -} - - -void Address::setCountry( const TQString &s ) -{ - mEmpty = false; - - mCountry = s; -} - -TQString Address::country() const -{ - return mCountry; -} - -TQString Address::countryLabel() -{ - return i18n("Country"); -} - - -void Address::setLabel( const TQString &s ) -{ - mEmpty = false; - - mLabel = s; -} - -TQString Address::label() const -{ - return mLabel; -} - -TQString Address::labelLabel() -{ - return i18n("Delivery Label"); -} - -Address::TypeList Address::typeList() -{ - static TypeList list; - - if ( list.isEmpty() ) - list << Dom << Intl << Postal << Parcel << Home << Work << Pref; - - return list; -} - -TQString Address::typeLabel( int type ) -{ - if ( type & Pref ) - return i18n( "Preferred address", "Preferred" ); - - switch ( type ) { - case Dom: - return i18n("Domestic"); - break; - case Intl: - return i18n("International"); - break; - case Postal: - return i18n("Postal"); - break; - case Parcel: - return i18n("Parcel"); - break; - case Home: - return i18n("Home Address", "Home"); - break; - case Work: - return i18n("Work Address", "Work"); - break; - case Pref: - return i18n("Preferred Address"); - break; - default: - return i18n("Other"); - break; - } -} - -void Address::dump() const -{ - kdDebug(5700) << " Address {" << endl; - kdDebug(5700) << " Id: " << id() << endl; - kdDebug(5700) << " Extended: " << extended() << endl; - kdDebug(5700) << " Street: " << street() << endl; - kdDebug(5700) << " Postal Code: " << postalCode() << endl; - kdDebug(5700) << " Locality: " << locality() << endl; - kdDebug(5700) << " }" << endl; -} - - -TQString Address::formattedAddress( const TQString &realName, - const TQString &orgaName ) const -{ - TQString ciso; - TQString addrTemplate; - TQString ret; - - // FIXME: first check for iso-country-field and prefer that one - if ( !country().isEmpty() ) { - ciso = countryToISO( country() ); - } else { - // fall back to our own country - ciso = TDEGlobal::locale()->country(); - } - KSimpleConfig entry( locate( "locale", - TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) ); - entry.setGroup( "KCM Locale" ); - - // decide whether this needs special business address formatting - if ( orgaName.isEmpty() ) { - addrTemplate = entry.readEntry( "AddressFormat" ); - } else { - addrTemplate = entry.readEntry( "BusinessAddressFormat" ); - if ( addrTemplate.isEmpty() ) - addrTemplate = entry.readEntry( "AddressFormat" ); - } - - // in the case there's no format found at all, default to what we've always - // used: - if ( addrTemplate.isEmpty() ) { - kdWarning(5700) << "address format database incomplete " - << "(no format for locale " << ciso - << " found). Using default address formatting." << endl; - addrTemplate = "%0(%n\\n)%0(%cm\\n)%0(%s\\n)%0(PO BOX %p\\n)%0(%l%w%r)%,%z"; - } - - // scan - parseAddressTemplateSection( addrTemplate, ret, realName, orgaName ); - - // now add the country line if needed (formatting this time according to - // the rules of our own system country ) - if ( !country().isEmpty() ) { - KSimpleConfig entry( locate( "locale", TQString( "l10n/" ) - + TDEGlobal::locale()->country() + TQString( "/entry.desktop" ) ) ); - entry.setGroup( "KCM Locale" ); - TQString cpos = entry.readEntry( "AddressCountryPosition" ); - if ( "BELOW" == cpos || cpos.isEmpty() ) { - ret = ret + "\n\n" + country().upper(); - } else if ( "below" == cpos ) { - ret = ret + "\n\n" + country(); - } else if ( "ABOVE" == cpos ) { - ret = country().upper() + "\n\n" + ret; - } else if ( "above" == cpos ) { - ret = country() + "\n\n" + ret; - } - } - - return ret; -} - -bool Address::parseAddressTemplateSection( const TQString &tsection, - TQString &result, const TQString &realName, const TQString &orgaName ) const -{ - // This method first parses and substitutes any bracketed sections and - // after that replaces any tags with their values. If a bracketed section - // or a tag evaluate to zero, they are not just removed but replaced - // with a placeholder. This is because in the last step conditionals are - // resolved which depend on information about zero-evaluations. - result = tsection; - int stpos = 0; - bool ret = false; - - // first check for brackets that have to be evaluated first - int fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); - while ( -1 != fpos ) { - int bpos1 = fpos + KABC_FMTTAG_purgeempty.length(); - int bpos2; - // expect opening bracket and find next balanced closing bracket. If - // next char is no opening bracket, continue parsing (no valid tag) - if ( '(' == result[bpos1] ) { - bpos2 = findBalancedBracket( result, bpos1 ); - if ( -1 != bpos2 ) { - // we have balanced brackets, recursively parse: - TQString rplstr; - bool purge = !parseAddressTemplateSection( result.mid( bpos1+1, - bpos2-bpos1-1 ), rplstr, - realName, orgaName ); - if ( purge ) { - // purge -> remove all - // replace with !_P_!, so conditional tags work later - result.replace( fpos, bpos2 - fpos + 1, "!_P_!" ); - // leave stpos as it is - } else { - // no purge -> replace with recursively parsed string - result.replace( fpos, bpos2 - fpos + 1, rplstr ); - ret = true; - stpos = fpos + rplstr.length(); - } - } else { - // unbalanced brackets: keep on parsing (should not happen - // and will result in bad formatting) - stpos = bpos1; - } - } - fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); - } - - // after sorting out all purge tags, we just search'n'replace the rest, - // keeping track of whether at least one tag evaluates to something. - // The following macro needs TQString for R_FIELD - // It substitutes !_P_! for empty fields so conditional tags work later -#define REPLTAG(R_TAG,R_FIELD) \ - if ( result.find(R_TAG, false) != -1 ) { \ - TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \ - result.replace( R_TAG, rpl ); \ - if ( !R_FIELD.isEmpty() ) { \ - ret = true; \ - } \ - } - REPLTAG( KABC_FMTTAG_realname, realName ); - REPLTAG( KABC_FMTTAG_REALNAME, realName.upper() ); - REPLTAG( KABC_FMTTAG_company, orgaName ); - REPLTAG( KABC_FMTTAG_COMPANY, orgaName.upper() ); - REPLTAG( KABC_FMTTAG_pobox, postOfficeBox() ); - REPLTAG( KABC_FMTTAG_street, street() ); - REPLTAG( KABC_FMTTAG_STREET, street().upper() ); - REPLTAG( KABC_FMTTAG_zipcode, postalCode() ); - REPLTAG( KABC_FMTTAG_location, locality() ); - REPLTAG( KABC_FMTTAG_LOCATION, locality().upper() ); - REPLTAG( KABC_FMTTAG_region, region() ); - REPLTAG( KABC_FMTTAG_REGION, region().upper() ); - result.replace( KABC_FMTTAG_newline, "\n" ); -#undef REPLTAG - - // conditional comma - fpos = result.find( KABC_FMTTAG_condcomma, 0 ); - while ( -1 != fpos ) { - TQString str1 = result.mid( fpos - 5, 5 ); - TQString str2 = result.mid( fpos + 2, 5 ); - if ( str1 != "!_P_!" && str2 != "!_P_!" ) { - result.replace( fpos, 2, ", " ); - } else { - result.remove( fpos, 2 ); - } - fpos = result.find( KABC_FMTTAG_condcomma, fpos ); - } - // conditional whitespace - fpos = result.find( KABC_FMTTAG_condwhite, 0 ); - while ( -1 != fpos ) { - TQString str1 = result.mid( fpos - 5, 5 ); - TQString str2 = result.mid( fpos + 2, 5 ); - if ( str1 != "!_P_!" && str2 != "!_P_!" ) { - result.replace( fpos, 2, " " ); - } else { - result.remove( fpos, 2 ); - } - fpos = result.find( KABC_FMTTAG_condwhite, fpos ); - } - - // remove purged: - result.remove( "!_P_!" ); - - return ret; -} - -int Address::findBalancedBracket( const TQString &tsection, int pos ) const -{ - int balancecounter = 0; - for( unsigned int i = pos + 1; i < tsection.length(); i++ ) { - if ( ')' == tsection[i] && 0 == balancecounter ) { - // found end of brackets - return i; - } else - if ( '(' == tsection[i] ) { - // nested brackets - balancecounter++; - } - } - return -1; -} - -TQString Address::countryToISO( const TQString &cname ) -{ - // we search a map file for translations from country names to - // iso codes, storing caching things in a TQMap for faster future - // access. - if ( !mISOMap ) - isoMapDeleter.setObject( mISOMap, new TQMap() ); - - TQMap::ConstIterator it; - it = mISOMap->find( cname ); - if ( it != mISOMap->end() ) - return it.data(); - - TQString mapfile = TDEGlobal::dirs()->findResource( "data", - TQString::fromLatin1( "kabc/countrytransl.map" ) ); - - TQFile file( mapfile ); - if ( file.open( IO_ReadOnly ) ) { - TQTextStream s( &file ); - TQString strbuf = s.readLine(); - while( !strbuf.isEmpty() ) { - TQStringList countryInfo = TQStringList::split( '\t', strbuf, true ); - if ( countryInfo[ 0 ] == cname ) { - file.close(); - mISOMap->insert( cname, countryInfo[ 1 ] ); - return countryInfo[ 1 ]; - } - strbuf = s.readLine(); - } - file.close(); - } - - // fall back to system country - mISOMap->insert( cname, TDEGlobal::locale()->country() ); - return TDEGlobal::locale()->country(); -} - -TQString Address::ISOtoCountry( const TQString &ISOname ) -{ - // get country name from ISO country code (e.g. "no" -> i18n("Norway")) - if ( ISOname.simplifyWhiteSpace().isEmpty() ) - return TQString::null; - - TQString mapfile = TDEGlobal::dirs()->findResource( "data", - TQString::fromLatin1( "kabc/countrytransl.map" ) ); - - TQFile file( mapfile ); - if ( file.open( IO_ReadOnly ) ) { - TQTextStream s( &file ); - TQString searchStr = "\t" + ISOname.simplifyWhiteSpace().lower(); - TQString strbuf = s.readLine(); - int pos; - while ( !strbuf.isEmpty() ) { - if ( (pos = strbuf.find( searchStr )) != -1 ) { - file.close(); - return i18n( strbuf.left( pos ).utf8() ); - } - strbuf = s.readLine(); - } - file.close(); - } - - return ISOname; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Address &addr ) -{ - return s << addr.mId << addr.mType << addr.mPostOfficeBox << - addr.mExtended << addr.mStreet << addr.mLocality << - addr.mRegion << addr.mPostalCode << addr.mCountry << - addr.mLabel; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Address &addr ) -{ - s >> addr.mId >> addr.mType >> addr.mPostOfficeBox >> addr.mExtended >> - addr.mStreet >> addr.mLocality >> addr.mRegion >> - addr.mPostalCode >> addr.mCountry >> addr.mLabel; - - addr.mEmpty = false; - - return s; -} diff --git a/kabc/address.h b/kabc/address.h deleted file mode 100644 index b4165a098..000000000 --- a/kabc/address.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESS_H -#define KABC_ADDRESS_H - -#include -#include -#include - -#include - -// template tags for address formatting localization -#define KABC_FMTTAG_realname TQString("%n") -#define KABC_FMTTAG_REALNAME TQString("%N") -#define KABC_FMTTAG_company TQString("%cm") -#define KABC_FMTTAG_COMPANY TQString("%CM") -#define KABC_FMTTAG_pobox TQString("%p") -#define KABC_FMTTAG_street TQString("%s") -#define KABC_FMTTAG_STREET TQString("%S") -#define KABC_FMTTAG_zipcode TQString("%z") -#define KABC_FMTTAG_location TQString("%l") -#define KABC_FMTTAG_LOCATION TQString("%L") -#define KABC_FMTTAG_region TQString("%r") -#define KABC_FMTTAG_REGION TQString("%R") -#define KABC_FMTTAG_newline TQString("\\n") -#define KABC_FMTTAG_condcomma TQString("%,") -#define KABC_FMTTAG_condwhite TQString("%w") -#define KABC_FMTTAG_purgeempty TQString("%0") - -namespace KABC { - -/** - @short Postal address information. - - This class represents information about a postal address. -*/ -class KABC_EXPORT Address -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); - - public: - /** - List of addresses. - */ - typedef TQValueList
      List; - typedef TQValueList TypeList; - - /** - Address types: - - @li @p Dom - domestic - @li @p Intl - international - @li @p Postal - postal - @li @p Parcel - parcel - @li @p Home - home address - @li @p Work - address at work - @li @p Pref - preferred address - */ - enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, - Pref = 64 }; - - /** - Constructor that creates an empty Address, which is initialized - with a unique id (see id()). - */ - Address(); - - /** - This is like Address() just above, with the difference - that you can specify the type. - */ - Address( int ); - - bool operator==( const Address & ) const; - bool operator!=( const Address & ) const; - - /** - Returns true, if the address is empty. - */ - bool isEmpty() const; - - /** - Clears all entries of the address. - */ - void clear(); - - /** - Sets the unique id. - */ - void setId( const TQString & ); - - /* - Returns the unique id. - */ - TQString id() const; - - /** - Sets the type of address. See enum for definiton of types. - - @param type type, can be a bitwise or of multiple types. - */ - void setType( int type ); - - /** - Returns the type of address. Can be a bitwise or of multiple types. - */ - int type() const; - - /** - Returns a translated string of all types the address has. - */ - TQString typeLabel() const; - - /** - Sets the post office box. - */ - void setPostOfficeBox( const TQString & ); - - /** - Returns the post office box. - */ - TQString postOfficeBox() const; - - /** - Returns the translated label for post office box field. - */ - static TQString postOfficeBoxLabel(); - - /** - Sets the extended address information. - */ - void setExtended( const TQString & ); - - /** - Returns the extended address information. - */ - TQString extended() const; - - /** - Returns the translated label for extended field. - */ - static TQString extendedLabel(); - - /** - Sets the street (including number). - */ - void setStreet( const TQString & ); - - /** - Returns the street. - */ - TQString street() const; - - /** - Returns the translated label for street field. - */ - static TQString streetLabel(); - - /** - Sets the locality, e.g. city. - */ - void setLocality( const TQString & ); - - /** - Returns the locality. - */ - TQString locality() const; - - /** - Returns the translated label for locality field. - */ - static TQString localityLabel(); - - /** - Sets the region, e.g. state. - */ - void setRegion( const TQString & ); - - /** - Returns the region. - */ - TQString region() const; - - /** - Returns the translated label for region field. - */ - static TQString regionLabel(); - - /** - Sets the postal code. - */ - void setPostalCode( const TQString & ); - - /** - Returns the postal code. - */ - TQString postalCode() const; - - /** - Returns the translated label for postal code field. - */ - static TQString postalCodeLabel(); - - /** - Sets the country. - */ - void setCountry( const TQString & ); - - /** - Returns the country. - */ - TQString country() const; - - /** - Returns the translated label for country field. - */ - static TQString countryLabel(); - - /** - Sets the delivery label. This is the literal text to be used as label. - */ - void setLabel( const TQString & ); - - /** - Returns the delivery label. - */ - TQString label() const; - - /** - Returns the translated label for delivery label field. - */ - static TQString labelLabel(); - - /** - Returns the list of available types. - */ - static TypeList typeList(); - - /** - Returns the translated label for a special type. - */ - static TQString typeLabel( int type ); - - /** - Used for debug output. - */ - void dump() const; - - /** - Returns this address formatted according to the country-specific - address formatting rules. The formatting rules applied depend on - either the addresses {@link #country country} field, or (if the - latter is empty) on the system country setting. If companyName is - provided, an available business address format will be preferred. - - @param realName the formatted name of the contact - @param orgaName the name of the organization or company - @return the formatted address (containing newline characters) - */ - TQString formattedAddress( const TQString &realName=TQString::null - , const TQString &orgaName=TQString::null ) const; - - /** - Returns ISO code for a localized country name. Only localized country - names will be understood. This might be replaced by a TDELocale method in - the future. - @param cname name of the country - @return two digit ISO code - */ - static TQString countryToISO( const TQString &cname ); - - /** - Returns a localized country name for a ISO code. - This might be replaced by a TDELocale method in the future. - @param ISOname two digit ISO code - @return localized name of the country - @since 3.2 - */ - static TQString ISOtoCountry( const TQString &ISOname ); - - private: - /** - Parses a snippet of an address template - @param tsection the template string to be parsed - @param result TQString reference in which the result will be stored - @return true if at least one tag evaluated positively, else false - */ - bool parseAddressTemplateSection( const TQString &tsection - , TQString &result - , const TQString &realName - , const TQString &orgaName ) const; - - /** - Finds the balanced closing bracket starting from the opening bracket at - pos in tsection. - @return position of closing bracket, -1 for unbalanced brackets - */ - int findBalancedBracket( const TQString &tsection, int pos ) const; - - bool mEmpty; - - TQString mId; - int mType; - - TQString mPostOfficeBox; - TQString mExtended; - TQString mStreet; - TQString mLocality; - TQString mRegion; - TQString mPostalCode; - TQString mCountry; - TQString mLabel; - - static TQMap *mISOMap; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); - -} - -#endif diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp deleted file mode 100644 index 8e1eca333..000000000 --- a/kabc/addressbook.cpp +++ /dev/null @@ -1,842 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "errorhandler.h" -#include "resource.h" - -#include "addressbook.h" -#include "addressbook.moc" - -using namespace KABC; - -struct AddressBook::AddressBookData -{ - Field::List mAllFields; - ErrorHandler *mErrorHandler; - TDEConfig *mConfig; - KRES::Manager *mManager; - TQPtrList mPendingLoadResources; - TQPtrList mPendingSaveResources; - Iterator end; -}; - -struct AddressBook::Iterator::IteratorData -{ - Resource::Iterator mIt; - TQValueList mResources; - int mCurrRes; -}; - -struct AddressBook::ConstIterator::ConstIteratorData -{ - Resource::ConstIterator mIt; - TQValueList mResources; - int mCurrRes; -}; - -AddressBook::Iterator::Iterator() - : d( new IteratorData ) -{ -} - -AddressBook::Iterator::Iterator( const AddressBook::Iterator &i ) - : d( new IteratorData ) -{ - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; -} - -AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iterator &i ) -{ - if ( this == &i ) - return *this; // guard against self assignment - - delete d; // delete the old data the Iterator was completely constructed before - d = new IteratorData; - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; - - return *this; -} - -AddressBook::Iterator::~Iterator() -{ - delete d; - d = 0; -} - -const Addressee &AddressBook::Iterator::operator*() const -{ - return *(d->mIt); -} - -Addressee &AddressBook::Iterator::operator*() -{ - return *(d->mIt); -} - -Addressee *AddressBook::Iterator::operator->() -{ - return &(*(d->mIt)); -} - -AddressBook::Iterator &AddressBook::Iterator::operator++() -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::Iterator &AddressBook::Iterator::operator++( int ) -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::Iterator &AddressBook::Iterator::operator--() -{ - (d->mIt)--; - - return *this; -} - -AddressBook::Iterator &AddressBook::Iterator::operator--( int ) -{ - (d->mIt)--; - - return *this; -} - -bool AddressBook::Iterator::operator==( const Iterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool AddressBook::Iterator::operator!=( const Iterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - - -AddressBook::ConstIterator::ConstIterator() - : d( new ConstIteratorData ) -{ -} - -AddressBook::ConstIterator::ConstIterator( const AddressBook::ConstIterator &i ) - : d( new ConstIteratorData ) -{ - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; -} - -AddressBook::ConstIterator::ConstIterator( const AddressBook::Iterator &i ) -{ - d = new ConstIteratorData; - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator=( const AddressBook::ConstIterator &i ) -{ - if ( this == &i ) - return *this; // guard for self assignment - - delete d; // delete the old data because the Iterator was really constructed before - d = new ConstIteratorData; - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; - - return *this; -} - -AddressBook::ConstIterator::~ConstIterator() -{ - delete d; - d = 0; -} - -const Addressee &AddressBook::ConstIterator::operator*() const -{ - return *(d->mIt); -} - -const Addressee* AddressBook::ConstIterator::operator->() const -{ - return &(*(d->mIt)); -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator++() -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator++(int) -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator--() -{ - (d->mIt)--; - return *this; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator--(int) -{ - (d->mIt)--; - return *this; -} - -bool AddressBook::ConstIterator::operator==( const ConstIterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool AddressBook::ConstIterator::operator!=( const ConstIterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - - -AddressBook::AddressBook() - : d( new AddressBookData ) -{ - d->mErrorHandler = 0; - d->mConfig = 0; - d->mManager = new KRES::Manager( "contact" ); - d->end.d->mResources = TQValueList(); - d->end.d->mCurrRes = -1; -} - -AddressBook::AddressBook( const TQString &config ) - : d( new AddressBookData ) -{ - d->mErrorHandler = 0; - if ( config.isEmpty() ) - d->mConfig = 0; - else - d->mConfig = new TDEConfig( config ); - d->mManager = new KRES::Manager( "contact" ); - d->mManager->readConfig( d->mConfig ); - d->end.d->mResources = TQValueList(); - d->end.d->mCurrRes = -1; -} - -AddressBook::~AddressBook() -{ - delete d->mManager; d->mManager = 0; - delete d->mConfig; d->mConfig = 0; - delete d->mErrorHandler; d->mErrorHandler = 0; - delete d; d = 0; -} - -bool AddressBook::load() -{ - kdDebug(5700) << "AddressBook::load()" << endl; - - clear(); - - KRES::Manager::ActiveIterator it; - bool ok = true; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( !(*it)->load() ) { - error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); - ok = false; - } - } - - return ok; -} - -bool AddressBook::asyncLoad() -{ - kdDebug(5700) << "AddressBook::asyncLoad()" << endl; - - clear(); - - KRES::Manager::ActiveIterator it; - bool ok = true; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - d->mPendingLoadResources.append( *it ); - if ( !(*it)->asyncLoad() ) { - error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); - ok = false; - } - } - - return ok; -} - -bool AddressBook::save( Ticket *ticket ) -{ - kdDebug(5700) << "AddressBook::save()"<< endl; - - if ( ticket->resource() ) { - deleteRemovedAddressees(); - bool ok = ticket->resource()->save( ticket ); - if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); - return ok; - } - - return false; -} - -bool AddressBook::asyncSave( Ticket *ticket ) -{ - kdDebug(5700) << "AddressBook::asyncSave()"<< endl; - - if ( ticket->resource() ) { - d->mPendingSaveResources.append( ticket->resource() ); - bool ok = ticket->resource()->asyncSave( ticket ); - if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); - return ok; - } - - return false; -} - -AddressBook::Iterator AddressBook::begin() -{ - TQValueList list; - KRES::Manager::ActiveIterator resIt; - for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) - list.append( *resIt ); - - if ( list.count() == 0 ) - return end(); - - Iterator it = Iterator(); - it.d->mResources = list; - it.d->mCurrRes = 0; - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - - while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { - if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) - return end(); - - it.d->mCurrRes++; - - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - } - - return it; -} - -AddressBook::ConstIterator AddressBook::begin() const -{ - TQValueList list; - KRES::Manager::ActiveIterator resIt; - for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) - list.append( *resIt ); - - if ( list.count() == 0 ) - return end(); - - Iterator it = Iterator(); - it.d->mResources = list; - it.d->mCurrRes = 0; - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - - while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { - if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) - return end(); - - it.d->mCurrRes++; - - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - } - - return it; -} - -AddressBook::Iterator AddressBook::end() -{ - KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); - - if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available - d->end.d->mIt = Resource::Iterator(); - } else { - d->end.d->mIt = (*resIt)->end(); - } - - return d->end; -} - -AddressBook::ConstIterator AddressBook::end() const -{ - KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); - - if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available - d->end.d->mIt = Resource::Iterator(); - } else { - d->end.d->mIt = (*resIt)->end(); - } - - return d->end; -} - -void AddressBook::clear() -{ - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - (*it)->clear(); -} - -Ticket *AddressBook::requestSaveTicket( Resource *resource ) -{ - kdDebug(5700) << "AddressBook::requestSaveTicket()" << endl; - - if ( !resource ) - resource = standardResource(); - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( (*it) == resource ) { - if ( (*it)->readOnly() || !(*it)->isOpen() ) - return 0; - else - return (*it)->requestSaveTicket(); - } - } - - return 0; -} - -void AddressBook::releaseSaveTicket( Ticket *ticket ) -{ - if ( !ticket ) - return; - - if ( ticket->resource() ) { - ticket->resource()->releaseSaveTicket( ticket ); - } -} - -void AddressBook::insertAddressee( const Addressee &a ) -{ - Resource *resource = a.resource(); - if ( resource == 0 ) - resource = standardResource(); - - Resource::Iterator it; - Addressee fAddr = resource->findByUid( a.uid() ); - - Addressee addr( a ); - if ( !fAddr.isEmpty() ) { - if ( fAddr != a ) - addr.setRevision( TQDateTime::currentDateTime() ); - else { - if ( fAddr.resource() == 0 ) { - fAddr.setResource( resource ); - //NOTE: Should we have setChanged( true ) here? - resource->insertAddressee( fAddr ); - } - return; - } - } - - addr.setResource( resource ); - addr.setChanged( true ); - resource->insertAddressee( addr ); -} - -void AddressBook::removeAddressee( const Addressee &a ) -{ - if ( a.resource() ) - a.resource()->removeAddressee( a ); -} - -void AddressBook::removeAddressee( const Iterator &it ) -{ - if ( (*it).resource() ) - (*it).resource()->removeAddressee( *it ); -} - -AddressBook::Iterator AddressBook::find( const Addressee &a ) -{ - Iterator it; - for ( it = begin(); it != end(); ++it ) { - if ( a.uid() == (*it).uid() ) - return it; - } - - return end(); -} - -Addressee AddressBook::findByUid( const TQString &uid ) -{ - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - Addressee addr = (*it)->findByUid( uid ); - if ( !addr.isEmpty() ) - return addr; - } - - return Addressee(); -} - -Addressee::List AddressBook::allAddressees() -{ - Addressee::List list; - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) - list.append( *it ); - - return list; -} - -Addressee::List AddressBook::findByName( const TQString &name ) -{ - Addressee::List results; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->findByName( name ); - - return results; -} - -Addressee::List AddressBook::findByEmail( const TQString &email ) -{ - Addressee::List results; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->findByEmail( email ); - - return results; -} - -Addressee::List AddressBook::findByCategory( const TQString &category ) -{ - Addressee::List results; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->findByCategory( category ); - - return results; -} - -void AddressBook::dump() const -{ - kdDebug(5700) << "AddressBook::dump() --- begin ---" << endl; - - ConstIterator it; - for( it = begin(); it != end(); ++it ) { - (*it).dump(); - } - - kdDebug(5700) << "AddressBook::dump() --- end ---" << endl; -} - -TQString AddressBook::identifier() -{ - TQStringList identifier; - - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( !(*it)->identifier().isEmpty() ) - identifier.append( (*it)->identifier() ); - } - - return identifier.join( ":" ); -} - -Field::List AddressBook::fields( int category ) -{ - if ( d->mAllFields.isEmpty() ) { - d->mAllFields = Field::allFields(); - } - - if ( category == Field::All ) return d->mAllFields; - - Field::List result; - Field::List::ConstIterator it; - for ( it = d->mAllFields.constBegin(); it != d->mAllFields.constEnd(); ++it ) { - if ( (*it)->category() & category ) - result.append( *it ); - } - - return result; -} - -bool AddressBook::addCustomField( const TQString &label, int category, - const TQString &key, const TQString &app ) -{ - if ( d->mAllFields.isEmpty() ) { - d->mAllFields = Field::allFields(); - } - - TQString a = app.isNull() ? TDEGlobal::instance()->instanceName() : app; - TQString k = key.isNull() ? label : key; - - Field *field = Field::createCustomField( label, category, k, a ); - - if ( !field ) return false; - - d->mAllFields.append( field ); - - return true; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const AddressBook &ab ) -{ - if (!ab.d) return s; - - return s;// << ab.d->mAddressees; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, AddressBook &ab ) -{ - if (!ab.d) return s; - -// s >> ab.d->mAddressees; - - return s; -} - -bool AddressBook::addResource( Resource *resource ) -{ - if ( !resource->open() ) { - kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl; - return false; - } - - d->mManager->add( resource ); - resource->setAddressBook( this ); - - connect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), - this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); - connect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), - this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); - - connect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - connect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); - - return true; -} - -bool AddressBook::removeResource( Resource *resource ) -{ - resource->close(); - - if ( resource == standardResource() ) - d->mManager->setStandardResource( 0 ); - - resource->setAddressBook( 0 ); - - disconnect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), - this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); - disconnect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), - this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); - - disconnect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - disconnect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - - d->mManager->remove( resource ); - - return true; -} - -TQPtrList AddressBook::resources() -{ - TQPtrList list; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( d->mManager->standardResource() == (*it) ) - list.prepend( *it ); - else - list.append( *it ); - } - - return list; -} - -void AddressBook::setErrorHandler( ErrorHandler *handler ) -{ - delete d->mErrorHandler; - d->mErrorHandler = handler; -} - -void AddressBook::error( const TQString& msg ) -{ - if ( !d->mErrorHandler ) // create default error handler - d->mErrorHandler = new ConsoleErrorHandler; - - if ( d->mErrorHandler ) - d->mErrorHandler->error( msg ); - else - kdError(5700) << "no error handler defined" << endl; -} - -void AddressBook::deleteRemovedAddressees() -{ - // no any longer needed -} - -void AddressBook::setStandardResource( Resource *resource ) -{ - d->mManager->setStandardResource( resource ); -} - -Resource *AddressBook::standardResource() -{ - return d->mManager->standardResource(); -} - -KRES::Manager *AddressBook::resourceManager() -{ - return d->mManager; -} - -void AddressBook::cleanUp() -{ -} - -bool AddressBook::loadingHasFinished() const -{ - return d->mPendingLoadResources.isEmpty(); -} - -void AddressBook::resourceLoadingFinished( Resource *res ) -{ - d->mPendingLoadResources.remove( res ); - emit loadingFinished( res ); - - if ( d->mPendingLoadResources.count() == 0 ) - emit addressBookChanged( this ); -} - -void AddressBook::resourceSavingFinished( Resource *res ) -{ - d->mPendingSaveResources.remove( res ); - - emit savingFinished( res ); -} - -void AddressBook::resourceLoadingError( Resource *res, const TQString &errMsg ) -{ - error( errMsg ); - - d->mPendingLoadResources.remove( res ); - if ( d->mPendingLoadResources.count() == 0 ) - emit addressBookChanged( this ); -} - -void AddressBook::resourceSavingError( Resource *res, const TQString &errMsg ) -{ - error( errMsg ); - - d->mPendingSaveResources.remove( res ); -} diff --git a/kabc/addressbook.h b/kabc/addressbook.h deleted file mode 100644 index 8b87b6898..000000000 --- a/kabc/addressbook.h +++ /dev/null @@ -1,431 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSBOOK_H -#define KABC_ADDRESSBOOK_H - -#include -#include - -#include - -#include "addressee.h" -#include "field.h" - -namespace KABC { - -class ErrorHandler; -class Resource; -class Ticket; - -/** - @short Address Book - - This class provides access to a collection of address book entries. - */ -class KABC_EXPORT AddressBook : public TQObject -{ - Q_OBJECT - - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); - friend class StdAddressBook; - - public: - /** - @short Address Book Iterator - - This class provides an iterator for address book entries. - */ - class KABC_EXPORT Iterator - { - public: - Iterator(); - Iterator( const Iterator & ); - ~Iterator(); - - Iterator &operator=( const Iterator & ); - const Addressee &operator*() const; - Addressee &operator*(); - Addressee* operator->(); - Iterator &operator++(); - Iterator &operator++(int); - Iterator &operator--(); - Iterator &operator--(int); - bool operator==( const Iterator &it ); - bool operator!=( const Iterator &it ); - - struct IteratorData; - IteratorData *d; - }; - - /** - @short Address Book Const Iterator - - This class provides a const iterator for address book entries. - */ - class KABC_EXPORT ConstIterator - { - public: - ConstIterator(); - ConstIterator( const ConstIterator & ); - ConstIterator( const Iterator & ); - ~ConstIterator(); - - ConstIterator &operator=( const ConstIterator & ); - const Addressee &operator*() const; - const Addressee* operator->() const; - ConstIterator &operator++(); - ConstIterator &operator++(int); - ConstIterator &operator--(); - ConstIterator &operator--(int); - bool operator==( const ConstIterator &it ); - bool operator!=( const ConstIterator &it ); - - struct ConstIteratorData; - ConstIteratorData *d; - }; - - /** - Constructs an address book object. - You have to add the resources manually before calling load(). - */ - AddressBook(); - - /** - Constructs an address book object. - The resources are loaded automatically. - - @param config The config file which contains the resource settings. - */ - AddressBook( const TQString &config ); - - /** - Destructor. - */ - virtual ~AddressBook(); - - /** - Requests a ticket for saving the addressbook. Calling this function locks - the addressbook for all other processes. You need the returned ticket - object for calling the save() function. - - @param resource A pointer to the resource which shall be locked. If 0, - the default resource is locked. - @return 0 if the resource is already locked or a valid save ticket - otherwise. - @see save() - */ - Ticket *requestSaveTicket( Resource *resource = 0 ); - - /** - Releases the ticket requested previously with requestSaveTicket(). - Call this function, if you want to release a ticket without saving. - */ - void releaseSaveTicket( Ticket *ticket ); - - /** - Loads all addressees synchronously. - - @return Whether the loading was successfully. - */ - bool load(); - - /** - Loads all addressees asynchronously. This function returns immediately - and emits the addressBookChanged() signal as soon as the loading has - finished. - - @return Whether the synchronous part of loading was successfully. - */ - bool asyncLoad(); - - /** - Saves all addressees of one resource synchronously. If the save is - successfull the ticket is deleted. - - @param ticket The ticket returned by requestSaveTicket(). - @return Whether the saving was successfully. - */ - bool save( Ticket *ticket ); - - /** - Saves all addressees of one resource asynchronously. If the save is - successfull the ticket is deleted. - - @param ticket The ticket returned by requestSaveTicket(). - @return Whether the synchronous part of saving was successfully. - */ - bool asyncSave( Ticket *ticket ); - - /** - Returns an iterator pointing to the first addressee of address book. - This iterator equals end() if the address book is empty. - */ - ConstIterator begin() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - Iterator begin(); - - /** - Returns an iterator pointing to the last addressee of address book. - This iterator equals begin() if the address book is empty. - */ - ConstIterator end() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - Iterator end(); - - - /** - Removes all addressees from the address book. - */ - void clear(); - - /** - Insert an addressee into the address book. If an addressee with the same - unique id already exists, it is replaced by the new one, otherwise it is - appended. - - @param addr The addressee which shall be insert. - */ - void insertAddressee( const Addressee &addr ); - - /** - Removes an addressee from the address book. - - @param addr The addressee which shall be removed. - */ - void removeAddressee( const Addressee &addr ); - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - - @param it An iterator pointing to the addressee which shall be removed. - */ - void removeAddressee( const Iterator &it ); - - /** - Returns an iterator pointing to the specified addressee. It will return - end() if no addressee matched. - - @param addr The addresee you are looking for. - */ - Iterator find( const Addressee &addr ); // KDE4: const - - /** - Searches an addressee with the specified unique identifier. - - @param uid The unique identifier you are looking for. - @return The addressee with the specified unique identifier or an - empty addressee. - */ - Addressee findByUid( const TQString &uid ); // KDE4: const - - /** - Returns a list of all addressees in the address book. - */ - Addressee::List allAddressees(); // KDE4: const - - /** - Searches all addressees which match the specified name. - - @param name The name you are looking for. - @return A list of all matching addressees. - */ - Addressee::List findByName( const TQString &name ); // KDE4: const - - /** - Searches all addressees which match the specified email address. - - @param email The email address you are looking for. - @return A list of all matching addressees. - */ - Addressee::List findByEmail( const TQString &email ); // KDE4: const - - /** - Searches all addressees which belongs to the specified category. - - @param category The category you are looking for. - @return A list of all matching addressees. - */ - Addressee::List findByCategory( const TQString &category ); // KDE4: const - - /** - Returns a string identifying this addressbook. The identifier is - created by concatenation of the resource identifiers. - */ - virtual TQString identifier(); // KDE4: const - - /** - Returns a list of all Fields known to the address book which are associated - with the given field category. - */ - Field::List fields( int category = Field::All ); // KDE4: const - - /** - Add custom field to address book. - - @param label User visible label of the field. - @param category Ored list of field categories. - @param key Identifier used as key for reading and writing the field. - @param app String used as application key for reading and writing - the field. - */ - bool addCustomField( const TQString &label, int category = Field::All, - const TQString &key = TQString::null, - const TQString &app = TQString::null ); - - /** - Adds a resource to the address book. - - @param resource The resource you want to add. - @return Whether opening the resource was successfully. - */ - bool addResource( Resource *resource ); - - /** - Removes a resource from the address book. - - @param resource The resource you want to remove. - @return Whether closing the resource was successfully. - */ - bool removeResource( Resource *resource ); - - /** - Returns a list of all resources. - */ - TQPtrList resources(); // KDE4: const - - /** - Sets the @p ErrorHandler, that is used by error() to - provide GUI independent error messages. - - @param errorHandler The error handler you want to use. - */ - void setErrorHandler( ErrorHandler *errorHandler ); - - /** - Shows GUI independent error messages. - - @param msg The error message that shall be displayed. - */ - void error( const TQString &msg ); - - /** - @deprecated There is no need to call this function anymore. - */ - void cleanUp() KDE_DEPRECATED; - - /** - Used for debug output. This function prints out the list - of all addressees to kdDebug(5700). - */ - void dump() const; - - /** - */ - void emitAddressBookLocked() { emit addressBookLocked( this ); } - void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } - void emitAddressBookChanged() { emit addressBookChanged( this ); } - - /** - Returns true when the loading of the addressbook has finished, - otherwise false. - - @since 3.5 - */ - bool loadingHasFinished() const; - - signals: - /** - Emitted when one of the resources discovered a change in its backend - or the asynchronous loading of all resources has finished. - You should connect to this signal to update the presentation of - the contact data in your application. - - @param addressBook The address book which emitted this signal. - */ - void addressBookChanged( AddressBook *addressBook ); - - /** - Emitted when one of the resources has been locked for writing. - - @param addressBook The address book which emitted this signal. - */ - void addressBookLocked( AddressBook *addressBook ); - - /** - Emitted when one of the resources has been unlocked. - You should connect to this signal if you want to save your changes - to a resource which is currently locked, and want to get notified when - saving is possible again. - - @param addressBook The address book which emitted this signal. - */ - void addressBookUnlocked( AddressBook *addressBook ); - - /** - Emitted when the asynchronous loading of one resource has finished - after calling asyncLoad(). - - @param resource The resource which emitted this signal. - */ - void loadingFinished( Resource *resource ); - - /** - Emitted when the asynchronous saving of one resource has finished - after calling asyncSave(). - - @param resource The resource which emitted this signal. - */ - void savingFinished( Resource *resource ); - - protected slots: - void resourceLoadingFinished( Resource* ); - void resourceSavingFinished( Resource* ); - void resourceLoadingError( Resource*, const TQString& ); - void resourceSavingError( Resource*, const TQString& ); - - protected: - void deleteRemovedAddressees(); - void setStandardResource( Resource* ); - Resource *standardResource(); - KRES::Manager *resourceManager(); - - private: - TQPtrList mDummy; // Remove in KDE 4 - struct AddressBookData; - AddressBookData *d; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); - -} - -#endif diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp deleted file mode 100644 index c8a1bf51e..000000000 --- a/kabc/addresseedialog.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "stdaddressbook.h" - -#include "addresseedialog.h" -#include "addresseedialog.moc" - -using namespace KABC; - -AddresseeItem::AddresseeItem( TQListView *parent, const Addressee &addressee ) : - TQListViewItem( parent ), - mAddressee( addressee ) -{ - setText( Name, addressee.realName() ); - setText( Email, addressee.preferredEmail() ); -} - -TQString AddresseeItem::key( int column, bool ) const -{ - if (column == Email) { - TQString value = text(Email); - TQRegExp emailRe("<\\S*>"); - int match = emailRe.search(value); - if (match > -1) - value = value.mid(match + 1, emailRe.matchedLength() - 2); - - return value.lower(); - } - - return text(column).lower(); -} - -AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : - KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), - Ok|Cancel, Ok, parent ), mMultiple( multiple ) -{ - TQWidget *topWidget = plainPage(); - - TQBoxLayout *topLayout = new TQHBoxLayout( topWidget ); - TQBoxLayout *listLayout = new TQVBoxLayout; - topLayout->addLayout( listLayout ); - - mAddresseeList = new TDEListView( topWidget ); - mAddresseeList->addColumn( i18n("Name") ); - mAddresseeList->addColumn( i18n("Email") ); - mAddresseeList->setAllColumnsShowFocus( true ); - mAddresseeList->setFullWidth( true ); - listLayout->addWidget( mAddresseeList ); - connect( mAddresseeList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - TQT_SLOT( slotOk() ) ); - connect( mAddresseeList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), - TQT_SLOT( updateEdit( TQListViewItem * ) ) ); - - mAddresseeEdit = new KLineEdit( topWidget ); - mAddresseeEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto ); - connect( mAddresseeEdit->completionObject(), TQT_SIGNAL( match( const TQString & ) ), - TQT_SLOT( selectItem( const TQString & ) ) ); - mAddresseeEdit->setFocus(); - mAddresseeEdit->completionObject()->setIgnoreCase( true ); - listLayout->addWidget( mAddresseeEdit ); - - setInitialSize( TQSize( 450, 300 ) ); - - if ( mMultiple ) { - TQBoxLayout *selectedLayout = new TQVBoxLayout; - topLayout->addLayout( selectedLayout ); - topLayout->setSpacing( spacingHint() ); - - TQGroupBox *selectedGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("Selected"), - topWidget ); - selectedLayout->addWidget( selectedGroup ); - - mSelectedList = new TDEListView( selectedGroup ); - mSelectedList->addColumn( i18n("Name") ); - mSelectedList->addColumn( i18n("Email") ); - mSelectedList->setAllColumnsShowFocus( true ); - mSelectedList->setFullWidth( true ); - connect( mSelectedList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - TQT_SLOT( removeSelected() ) ); - - TQPushButton *unselectButton = new TQPushButton( i18n("Unselect"), selectedGroup ); - connect ( unselectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelected() ) ); - - connect( mAddresseeList, TQT_SIGNAL( clicked( TQListViewItem * ) ), - TQT_SLOT( addSelected( TQListViewItem * ) ) ); - - setInitialSize( TQSize( 650, 350 ) ); - } - - mAddressBook = StdAddressBook::self( true ); - connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), - TQT_SLOT( addressBookChanged() ) ); - connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ), - TQT_SLOT( addressBookChanged() ) ); - - loadAddressBook(); -} - -AddresseeDialog::~AddresseeDialog() -{ -} - -void AddresseeDialog::loadAddressBook() -{ - mAddresseeList->clear(); - mItemDict.clear(); - mAddresseeEdit->completionObject()->clear(); - - AddressBook::Iterator it; - for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); - addCompletionItem( (*it).realName(), item ); - addCompletionItem( (*it).preferredEmail(), item ); - } -} - -void AddresseeDialog::addCompletionItem( const TQString &str, TQListViewItem *item ) -{ - if ( str.isEmpty() ) return; - - mItemDict.insert( str, item ); - mAddresseeEdit->completionObject()->addItem( str ); -} - -void AddresseeDialog::selectItem( const TQString &str ) -{ - if ( str.isEmpty() ) return; - - TQListViewItem *item = mItemDict.find( str ); - if ( item ) { - mAddresseeList->blockSignals( true ); - mAddresseeList->setSelected( item, true ); - mAddresseeList->ensureItemVisible( item ); - mAddresseeList->blockSignals( false ); - } -} - -void AddresseeDialog::updateEdit( TQListViewItem *item ) -{ - mAddresseeEdit->setText( item->text( 0 ) ); - mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); -} - -void AddresseeDialog::addSelected( TQListViewItem *item ) -{ - AddresseeItem *addrItem = dynamic_cast( item ); - if ( !addrItem ) return; - - Addressee a = addrItem->addressee(); - - TQListViewItem *selectedItem = mSelectedDict.find( a.uid() ); - if ( !selectedItem ) { - selectedItem = new AddresseeItem( mSelectedList, a ); - mSelectedDict.insert( a.uid(), selectedItem ); - } -} - -void AddresseeDialog::removeSelected() -{ - TQListViewItem *item = mSelectedList->selectedItem(); - AddresseeItem *addrItem = dynamic_cast( item ); - if ( !addrItem ) return; - - mSelectedDict.remove( addrItem->addressee().uid() ); - delete addrItem; -} - -Addressee AddresseeDialog::addressee() -{ - AddresseeItem *aItem = 0; - - if ( mMultiple ) - aItem = dynamic_cast( mSelectedList->firstChild() ); - else - aItem = dynamic_cast( mAddresseeList->selectedItem() ); - - if (aItem) return aItem->addressee(); - return Addressee(); -} - -Addressee::List AddresseeDialog::addressees() -{ - Addressee::List al; - AddresseeItem *aItem = 0; - - if ( mMultiple ) { - TQListViewItem *item = mSelectedList->firstChild(); - while( item ) { - aItem = dynamic_cast( item ); - if ( aItem ) al.append( aItem->addressee() ); - item = item->nextSibling(); - } - } - else - { - aItem = dynamic_cast( mAddresseeList->selectedItem() ); - if (aItem) al.append( aItem->addressee() ); - } - - return al; -} - -Addressee AddresseeDialog::getAddressee( TQWidget *parent ) -{ - AddresseeDialog *dlg = new AddresseeDialog( parent ); - Addressee addressee; - int result = dlg->exec(); - - if ( result == TQDialog::Accepted ) { - addressee = dlg->addressee(); - } - - delete dlg; - return addressee; -} - -Addressee::List AddresseeDialog::getAddressees( TQWidget *parent ) -{ - AddresseeDialog *dlg = new AddresseeDialog( parent, true ); - Addressee::List addressees; - int result = dlg->exec(); - if ( result == TQDialog::Accepted ) { - addressees = dlg->addressees(); - } - - delete dlg; - return addressees; -} - -void AddresseeDialog::addressBookChanged() -{ - loadAddressBook(); -} diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h deleted file mode 100644 index 74470d1b4..000000000 --- a/kabc/addresseedialog.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEEDIALOG_H -#define KABC_ADDRESSEEDIALOG_H - -#include - -#include -#include -#include - -#include "addressbook.h" - -namespace KABC { - -/** - @short Special ListViewItem, that is used by the AddresseeDialog. -*/ -class KABC_EXPORT AddresseeItem : public TQListViewItem -{ - public: - - /** - Type of column - @li @p Name - Name in Addressee - @li @p Email - Email in Addressee - */ - enum columns { Name = 0, Email = 1 }; - - /** - Constructor. - - @param parent The parent listview. - @param addressee The associated addressee. - */ - AddresseeItem( TQListView *parent, const Addressee &addressee ); - - /** - Returns the addressee. - */ - Addressee addressee() const { return mAddressee; } - - /** - Method used by TQListView to sort the items. - */ - virtual TQString key( int column, bool ascending ) const; - - private: - Addressee mAddressee; -}; - -/** - @short Dialog for selecting address book entries. - - This class provides a dialog for selecting entries from the standard KDE - address book. Use the getAddressee() function to open a modal dialog, - returning an address book entry. - - In the dialog you can select an entry from the list with the mouse or type in - the first letters of the name or email address you are searching for. The - entry matching best is automatically selected. Use double click, pressing - return or pressing the ok button to return the selected addressee to the - application. -*/ -class KABC_EXPORT AddresseeDialog : public KDialogBase -{ - Q_OBJECT - - public: - /** - Construct addressbook entry select dialog. - - @param parent parent widget - @param multiple if true, indicates a multiple selection. - */ - AddresseeDialog( TQWidget *parent=0, bool multiple=false ); - - /** - Destructor. - */ - virtual ~AddresseeDialog(); - - /** - Return the address chosen. - - If it is a multiple select, this will return only the first address chosen - */ - Addressee addressee(); - - /** - Return the list of addresses chosen - */ - Addressee::List addressees(); - - /** - Select a single address book entry. - - Open addressee select dialog and return the entry selected by the user. - If the user doesn't select an entry or presses cancel, the returned - addressee is empty. - */ - static Addressee getAddressee( TQWidget *parent ); - - /** - Select multiple address book entries. - - Open addressee select dialog and return the entries selected by the user. - If the user doesn't select an entry or presses cancel, the returned - addressee list is empty. - */ - static Addressee::List getAddressees( TQWidget *parent ); - - private slots: - void selectItem( const TQString & ); - void updateEdit( TQListViewItem *item ); - void addSelected( TQListViewItem *item ); - void removeSelected(); - - protected slots: - void addressBookChanged(); - - private: - void loadAddressBook(); - void addCompletionItem( const TQString &str, TQListViewItem *item ); - - bool mMultiple; - - TDEListView *mAddresseeList; - KLineEdit *mAddresseeEdit; - - TDEListView *mSelectedList; - - AddressBook *mAddressBook; - - TQDict mItemDict; - TQDict mSelectedDict; - - class AddresseeDialogPrivate; - AddresseeDialogPrivate *d; -}; - -} -#endif diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp deleted file mode 100644 index 5b8998852..000000000 --- a/kabc/addresseehelper.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (C) 2003 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include - -#include "addresseehelper.h" - -using namespace KABC; - -AddresseeHelper * AddresseeHelper::s_self; - -// static -AddresseeHelper *AddresseeHelper::self() -{ - if ( !s_self ) - s_self = new AddresseeHelper(); - - return s_self; -} - -AddresseeHelper::AddresseeHelper() - : TQObject( tqApp ), - DCOPObject( "KABC::AddresseeHelper" ) -{ - initSettings(); - - connectDCOPSignal( "kaddressbook", "KABC::AddressBookConfig", - "changed()", "initSettings()", false ); -} - -// static -void AddresseeHelper::addToSet( const TQStringList& list, - std::set& container ) -{ - TQStringList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( !(*it).isEmpty() ) - container.insert( *it ); - } -} - -void AddresseeHelper::initSettings() -{ - mTitles.clear(); - mSuffixes.clear(); - mPrefixes.clear(); - - mTitles.insert( i18n( "Dr." ) ); - mTitles.insert( i18n( "Miss" ) ); - mTitles.insert( i18n( "Mr." ) ); - mTitles.insert( i18n( "Mrs." ) ); - mTitles.insert( i18n( "Ms." ) ); - mTitles.insert( i18n( "Prof." ) ); - - mSuffixes.insert( i18n( "I" ) ); - mSuffixes.insert( i18n( "II" ) ); - mSuffixes.insert( i18n( "III" ) ); - mSuffixes.insert( i18n( "Jr." ) ); - mSuffixes.insert( i18n( "Sr." ) ); - - mPrefixes.insert( "van" ); - mPrefixes.insert( "von" ); - mPrefixes.insert( "de" ); - - TDEConfig config( "kabcrc", true, false ); // readonly, no kdeglobals - config.setGroup( "General" ); - - addToSet( config.readListEntry( "Prefixes" ), mTitles ); - addToSet( config.readListEntry( "Inclusions" ), mPrefixes ); - addToSet( config.readListEntry( "Suffixes" ), mSuffixes ); - mTradeAsFamilyName = config.readBoolEntry( "TradeAsFamilyName", true ); -} - -bool AddresseeHelper::containsTitle( const TQString& title ) const -{ - return mTitles.find( title ) != mTitles.end(); -} - -bool AddresseeHelper::containsPrefix( const TQString& prefix ) const -{ - return mPrefixes.find( prefix ) != mPrefixes.end(); -} - -bool AddresseeHelper::containsSuffix( const TQString& suffix ) const -{ - return mSuffixes.find( suffix ) != mSuffixes.end(); -} - -bool AddresseeHelper::tradeAsFamilyName() const -{ - return mTradeAsFamilyName; -} diff --git a/kabc/addresseehelper.h b/kabc/addresseehelper.h deleted file mode 100644 index 5280e6b2d..000000000 --- a/kabc/addresseehelper.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (C) 2003 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEEHELPER_H -#define KABC_ADDRESSEEHELPER_H - -#include -#include - -#include - -#include - -/** - static data, shared by ALL addressee objects -*/ - -namespace KABC { - -class KABC_EXPORT AddresseeHelper : public TQObject, public DCOPObject -{ - K_DCOP - - public: - static AddresseeHelper *self(); - - bool containsTitle( const TQString& title ) const; - bool containsPrefix( const TQString& prefix ) const; - bool containsSuffix( const TQString& suffix ) const; - bool tradeAsFamilyName() const; - - k_dcop: - ASYNC initSettings(); - - private: - AddresseeHelper(); - - static void addToSet( const TQStringList& list, - std::set& container ); - std::set mTitles; - std::set mPrefixes; - std::set mSuffixes; - bool mTradeAsFamilyName; - - static AddresseeHelper *s_self; -}; - -} - -#endif diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp deleted file mode 100644 index 47324001c..000000000 --- a/kabc/addresseelist.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Jost Schenck - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "addresseelist.h" - -#include "field.h" -#include "sortmode.h" - -using namespace KABC; - -// -// -// Traits -// -// - -bool SortingTraits::Uid::eq( const Addressee &a1, const Addressee &a2 ) -{ - // locale awareness doesn't make sense sorting ids - return ( TQString::compare( a1.uid(), a2.uid() ) == 0 ); -} - -bool SortingTraits::Uid::lt( const Addressee &a1, const Addressee &a2 ) -{ - // locale awareness doesn't make sense sorting ids - return ( TQString::compare( a1.uid(), a2.uid() ) < 0 ); -} - -bool SortingTraits::Name::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.name(), a2.name() ) == 0 ); -} - -bool SortingTraits::Name::lt( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.name(), a2.name() ) < 0 ); -} - -bool SortingTraits::FormattedName::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) == 0 ); -} - -bool SortingTraits::FormattedName::lt( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) < 0 ); -} - -bool SortingTraits::FamilyName::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 - && TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 ); -} - -bool SortingTraits::FamilyName::lt( const Addressee &a1, const Addressee &a2 ) -{ - int family = TQString::localeAwareCompare( a1.familyName(), a2.familyName() ); - if ( 0 == family ) { - return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) < 0 ); - } else { - return family < 0; - } -} - -bool SortingTraits::GivenName::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 - && TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 ); -} - -bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 ) -{ - int given = TQString::localeAwareCompare( a1.givenName(), a2.givenName() ); - if ( 0 == given ) { - return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) < 0 ); - } else { - return given < 0; - } -} - -// -// -// AddresseeList -// -// - -static Field *sActiveField=0; - -AddresseeList::AddresseeList() - : TQValueList() -{ - mReverseSorting = false; - mActiveSortingCriterion = FormattedName; -} - -AddresseeList::~AddresseeList() -{ -} - -AddresseeList::AddresseeList( const AddresseeList &l ) - : TQValueList( l ) -{ - mReverseSorting = l.reverseSorting(); - mActiveSortingCriterion = l.sortingCriterion(); -} - -AddresseeList::AddresseeList( const TQValueList &l ) - : TQValueList( l ) -{ - mReverseSorting = false; -} - -void AddresseeList::dump() const -{ - kdDebug(5700) << "AddresseeList {" << endl; - kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl; - - TQString crit; - if ( Uid == mActiveSortingCriterion ) { - crit = "Uid"; - } else if ( Name == mActiveSortingCriterion ) { - crit = "Name"; - } else if ( FormattedName == mActiveSortingCriterion ) { - crit = "FormattedName"; - } else if ( FamilyName == mActiveSortingCriterion ) { - crit = "FamilyName"; - } else if ( GivenName == mActiveSortingCriterion ) { - crit = "GivenName"; - } else { - crit = "unknown -- update dump method"; - } - - kdDebug(5700) << "sorting criterion: " << crit << endl; - - for ( const_iterator it = begin(); it != end(); ++it ) { - (*it).dump(); - } - - kdDebug(5700) << "}" << endl; -} - -void AddresseeList::sortBy( SortingCriterion c ) -{ - mActiveSortingCriterion = c; - if ( Uid == c ) { - sortByTrait(); - } else if ( Name == c ) { - sortByTrait(); - } else if ( FormattedName == c ) { - sortByTrait(); - } else if ( FamilyName == c ) { - sortByTrait(); - } else if ( GivenName==c ) { - sortByTrait(); - } else { - kdError(5700) << "AddresseeList sorting criterion passed for which a trait is not known. No sorting done." << endl; - } -} - -void AddresseeList::sort() -{ - sortBy( mActiveSortingCriterion ); -} - -template -void AddresseeList::sortByTrait() -{ - // FIXME: better sorting algorithm, bubblesort is not acceptable for larger lists. - // - // for i := 1 to n - 1 - // do for j := 1 to n - i - // do if A[j] > A[j+1] - // then temp := A[j] - // A[j] := A[j + 1] - // A[j + 1 ] := temp - - iterator i1 = begin(); - iterator endIt = end(); - --endIt; - if ( i1 == endIt ) // don't need sorting - return; - - iterator i2 = endIt; - while( i1 != endIt ) { - iterator j1 = begin(); - iterator j2 = j1; - ++j2; - while( j1 != i2 ) { - if ( !mReverseSorting && Trait::lt( *j2, *j1 ) - || mReverseSorting && Trait::lt( *j1, *j2 ) ) { - tqSwap( *j1, *j2 ); - } - ++j1; - ++j2; - } - ++i1; - --i2; - } -} - -void AddresseeList::sortByField( Field *field ) -{ - if ( !field ) { - kdWarning(5700) << "sortByField called with no active sort field" << endl; - return; - } - - sActiveField = field; - - if ( count() == 0 ) - return; - - KABC::FieldSortMode *mode = new KABC::FieldSortMode( sActiveField, !mReverseSorting ); - - KABC::Addressee::setSortMode( mode ); - qHeapSort( *this ); - KABC::Addressee::setSortMode( 0 ); - - delete mode; -} - -void AddresseeList::sortByMode( SortMode *mode ) -{ - if ( count() == 0 ) - return; - - KABC::Addressee::setSortMode( mode ); - qHeapSort( *this ); - KABC::Addressee::setSortMode( 0 ); -} - -Field* -AddresseeList::sortingField() const -{ - return sActiveField; -} diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h deleted file mode 100644 index 7c9df0275..000000000 --- a/kabc/addresseelist.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Jost Schenck - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEELIST_H -#define KABC_ADDRESSEELIST_H - -#include - -#include "addressee.h" - -namespace KABC { - -class Field; -class SortField; -class SortMode; - -/** - * Each trait must implement one static function for equality, one for "less - * than". Class name should be the field name. A trait does not necessarily - * have to stick to just one field: a trait sorting by family name can e.g. - * sort addressees with equal family name by given name. - * - * If you want to implement reverse sorting, you do not have to write another - * trait, as AddresseeList takes care of that. - */ -namespace SortingTraits -{ - -class KABC_EXPORT Uid -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT Name -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT FormattedName -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT FamilyName // fallback to given name -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT GivenName // fallback to family name -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -} - -/** - * Addressee attribute used for sorting. - */ -typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterion; - -/** - * @short a TQValueList of Addressee, with sorting functionality - * - * This class extends the functionality of TQValueList with - * sorting methods specific to the Addressee class. It can be used - * just like any other TQValueList but is no template class. - * - * An AddresseeList does not automatically keep sorted when addressees - * are added or removed or the sorting order is changed, as this would - * slow down larger operations by sorting after every step. So after - * such operations you have to call {@link #sort} or {@link #sortBy} to - * create a defined order again. - * - * Iterator usage is inherited by TQValueList and extensively documented - * there. Please remember that the state of an iterator is undefined - * after any sorting operation. - * - * For the enumeration Type SortingCriterion, which specifies the - * field by the collection will be sorted, the following values exist: - * Uid, Name, FormattedName, FamilyName, GivenName. - * - * @author Jost Schenck jost@schenck.de - */ -class KABC_EXPORT AddresseeList : public TQValueList -{ - public: - AddresseeList(); - ~AddresseeList(); - AddresseeList( const AddresseeList & ); - AddresseeList( const TQValueList & ); - - /** - * Debug output. - */ - void dump() const; - - /** - * Determines the direction of sorting. On change, the list - * will not automatically be resorted. - * @param r true if sorting should be done reverse, false otherwise - */ - void setReverseSorting( bool r = true ) { mReverseSorting = r; } - - /** - * Returns the direction of sorting. - * @return true if sorting is done reverse, false otherwise - */ - bool reverseSorting() const { return mReverseSorting; } - - /** - * Sorts this list by a specific criterion. - * @param c the criterion by which should be sorted - */ - void sortBy( SortingCriterion c ); - - /** - * Sorts this list by a specific field. If no parameter is given, the - * last used Field object will be used. - * @param field pointer to the Field object to be sorted by - */ - void sortByField( Field *field = 0 ); - - /** - * Sorts this list by a specific sorting mode. - * @param mode pointer to the sorting mode object to be sorted by - * @since 3.4 - */ - void sortByMode( SortMode *mode = 0 ); - - /** - * Sorts this list by its active sorting criterion. This normally is the - * criterion of the last sortBy operation or FormattedName if up - * to now there has been no sortBy operation. - * - * Please note that the sorting trait of the last {@link #sortByTrait} - * method call is not remembered and thus the action can not be repeated - * by this method. - */ - void sort(); - - /** - * Templated sort function. You normally will not want to use this but - * {@link #sortBy} and {@link #sort} instead as the existing sorting - * criteria completely suffice for most cases. - * - * However, if you do want to use some special sorting criterion, you can - * write a trait class that will be provided to this templated method. - * This trait class has to have a class declaration like the following: - * \code - * class MySortingTrait { - * public: - * // eq returns true if a1 and a2 are equal - * static bool eq(KABC::Addressee a1, KABC::Addressee a2); - * // lt returns true is a1 is "less than" a2 - * static bool lt(KABC::Addressee a1, KABC::Addressee a2); - * }; - * \endcode - * You can then pass this class to the sortByTrait method like this: - * \code - * myAddresseelist.sortByTrait<MySortingTrait>(); - * \endcode - * Please note that the {@link #sort} method can not be used to repeat the - * sorting of the last sortByTrait action. - * - * Right now this method uses the bubble sort algorithm. This should be - * replaced for a better one when I have time. - */ - template void sortByTrait(); - - /** - * Returns the active sorting criterion, ie the sorting criterion that - * will be used by a {@link #sort} call. - */ - SortingCriterion sortingCriterion() const { return mActiveSortingCriterion; } - - /** - * Returns the active sorting field, ie a pointer to the Field object - * which was used for the last {@link #sortByField} operation. - * This function returns the last GLOBAL sorting field, not - * the class specific one. - * You're a lot better off by keeping track of this locally. - */ - Field* sortingField() const; - - private: - bool mReverseSorting; - SortingCriterion mActiveSortingCriterion; - //KDE 4.0 - add a d-pointer here! -}; - -} - -#endif diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp deleted file mode 100644 index a61e7a5c9..000000000 --- a/kabc/addresslineedit.cpp +++ /dev/null @@ -1,610 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Helge Deller - 2002 Lubos Lunak - 2001,2003 Carsten Pfeiffer - 2001 Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -// $Id$ - -#include "addresslineedit.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "ldapclient.h" - -#include - -//============================================================================= -// -// Class AddressLineEdit -// -//============================================================================= - - -using namespace KABC; - -TDECompletion * AddressLineEdit::s_completion = 0L; -bool AddressLineEdit::s_addressesDirty = false; -TQTimer* AddressLineEdit::s_LDAPTimer = 0L; -LdapSearch* AddressLineEdit::s_LDAPSearch = 0L; -TQString* AddressLineEdit::s_LDAPText = 0L; -AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L; -TDEConfig *AddressLineEdit::s_config = 0L; - -static KStaticDeleter completionDeleter; -static KStaticDeleter ldapTimerDeleter; -static KStaticDeleter ldapSearchDeleter; -static KStaticDeleter ldapTextDeleter; -static KStaticDeleter configDeleter; - -AddressLineEdit::AddressLineEdit(TQWidget* parent, - bool useCompletion, - const char *name) - : KLineEdit(parent,name) -{ - m_useCompletion = useCompletion; - m_completionInitialized = false; - m_smartPaste = false; - - init(); - - // Whenever a new AddressLineEdit is created (== a new composer is created), - // we set a dirty flag to reload the addresses upon the first completion. - // The address completions are shared between all AddressLineEdits. - // Is there a signal that tells us about addressbook updates? - if (m_useCompletion) - s_addressesDirty = true; -} - - -//----------------------------------------------------------------------------- -void AddressLineEdit::init() -{ - if ( !s_completion ) { - completionDeleter.setObject( s_completion, new TDECompletion() ); - s_completion->setOrder( TDECompletion::Sorted ); - s_completion->setIgnoreCase( true ); - } - - if( m_useCompletion ) { - if( !s_LDAPTimer ) { - ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer ); - ldapSearchDeleter.setObject( s_LDAPSearch, new LdapSearch ); - ldapTextDeleter.setObject( s_LDAPText, new TQString ); - } - connect( s_LDAPTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotStartLDAPLookup())); - connect( s_LDAPSearch, TQT_SIGNAL( searchData( const TQStringList& )), - TQT_SLOT( slotLDAPSearchData( const TQStringList& ))); - } - - if ( m_useCompletion && !m_completionInitialized ) - { - setCompletionObject( s_completion, false ); // we handle it ourself - connect( this, TQT_SIGNAL( completion(const TQString&)), - this, TQT_SLOT(slotCompletion() )); - - TDECompletionBox *box = completionBox(); - connect( box, TQT_SIGNAL( highlighted( const TQString& )), - this, TQT_SLOT( slotPopupCompletion( const TQString& ) )); - connect( box, TQT_SIGNAL( userCancelled( const TQString& )), - TQT_SLOT( userCancelled( const TQString& ))); - - m_completionInitialized = true; // don't connect muliple times. That's - // ugly, tho, better have completionBox() - // virtual in KDE 4 - // Why? This is only called once. Why should this be called more - // than once? And why was this protected? - } -} - -//----------------------------------------------------------------------------- -AddressLineEdit::~AddressLineEdit() -{ -} - -//----------------------------------------------------------------------------- - -TDEConfig* AddressLineEdit::config() -{ - if ( !s_config ) - configDeleter.setObject( s_config, new TDEConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals - - return s_config; -} - -void AddressLineEdit::setFont( const TQFont& font ) -{ - KLineEdit::setFont( font ); - if ( m_useCompletion ) - completionBox()->setFont( font ); -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::keyPressEvent(TQKeyEvent *e) -{ - bool accept = false; - - if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e))) - { - doCompletion(true); - accept = true; - } - else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e))) - { - int len = text().length(); - - if (len == cursorPosition()) // at End? - { - doCompletion(true); - accept = true; - } - } - - if( !accept ) - KLineEdit::keyPressEvent( e ); - - if( e->isAccepted()) - { - if( m_useCompletion && s_LDAPTimer != NULL ) - { - if( *s_LDAPText != text()) - stopLDAPLookup(); - *s_LDAPText = text(); - s_LDAPLineEdit = this; - s_LDAPTimer->start( 500, true ); - } - } -} - -void AddressLineEdit::mouseReleaseEvent( TQMouseEvent * e ) -{ - if (m_useCompletion && (e->button() == Qt::MidButton)) - { - m_smartPaste = true; - KLineEdit::mouseReleaseEvent(e); - m_smartPaste = false; - return; - } - KLineEdit::mouseReleaseEvent(e); -} - -void AddressLineEdit::insert(const TQString &t) -{ - if (!m_smartPaste) - { - KLineEdit::insert(t); - return; - } - TQString newText = t.stripWhiteSpace(); - if (newText.isEmpty()) - return; - - // remove newlines in the to-be-pasted string as well as an eventual - // mailto: protocol - newText.replace( TQRegExp("\r?\n"), ", " ); - if ( newText.startsWith( "mailto:" ) ) - { - KURL u(newText); - newText = u.path(); - } - else if (newText.find(" at ") != -1) - { - // Anti-spam stuff - newText.replace( " at ", "@" ); - newText.replace( " dot ", "." ); - } - else if (newText.find("(at)") != -1) - { - newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); - } - - TQString contents = text(); - int start_sel = 0; - int end_sel = 0; - int pos = cursorPosition(); - if (getSelection(&start_sel, &end_sel)) - { - // Cut away the selection. - if (pos > end_sel) - pos -= (end_sel - start_sel); - else if (pos > start_sel) - pos = start_sel; - contents = contents.left(start_sel) + contents.right(end_sel+1); - } - - int eot = contents.length(); - while ((eot > 0) && contents[eot-1].isSpace()) eot--; - if (eot == 0) - { - contents = TQString::null; - } - else if (pos >= eot) - { - if (contents[eot-1] == ',') - eot--; - contents.truncate(eot); - contents += ", "; - pos = eot+2; - } - - contents = contents.left(pos)+newText+contents.mid(pos); - setText(contents); - setCursorPosition(pos+newText.length()); -} - -void AddressLineEdit::paste() -{ - if (m_useCompletion) - m_smartPaste = true; - KLineEdit::paste(); - m_smartPaste = false; -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::cursorAtEnd() -{ - setCursorPosition( text().length() ); -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::enableCompletion(bool enable) -{ - m_useCompletion = enable; -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::doCompletion(bool ctrlT) -{ - if ( !m_useCompletion ) - return; - - TQString prevAddr; - - TQString s(text()); - int n = s.findRev(','); - - if (n >= 0) - { - n++; // Go past the "," - - int len = s.length(); - - // Increment past any whitespace... - while( n < len && s[n].isSpace() ) - n++; - - prevAddr = s.left(n); - s = s.mid(n,255).stripWhiteSpace(); - } - - if ( s_addressesDirty ) - loadAddresses(); - - if ( ctrlT ) - { - TQStringList completions = s_completion->substringCompletion( s ); - if (completions.count() > 1) { - m_previousAddresses = prevAddr; - setCompletedItems( completions ); - } - else if (completions.count() == 1) - setText(prevAddr + completions.first()); - - cursorAtEnd(); - return; - } - - TDEGlobalSettings::Completion mode = completionMode(); - - switch ( mode ) - { - case TDEGlobalSettings::CompletionPopupAuto: - { - if (s.isEmpty()) - break; - } - case TDEGlobalSettings::CompletionPopup: - { - m_previousAddresses = prevAddr; - TQStringList items = s_completion->allMatches( s ); - items += s_completion->allMatches( "\"" + s ); - items += s_completion->substringCompletion( '<' + s ); - uint beforeDollarCompletionCount = items.count(); - - if( s.find( ' ' ) == -1 ) // one word, possibly given name - items += s_completion->allMatches( "$$" + s ); - - if ( !items.isEmpty() ) - { - if ( items.count() > beforeDollarCompletionCount ) - { - // remove the '$$whatever$' part - for( TQStringList::Iterator it = items.begin(); - it != items.end(); - ++it ) - { - int pos = (*it).find( '$', 2 ); - if( pos < 0 ) // ??? - continue; - (*it)=(*it).mid( pos + 1 ); - } - } - - items = removeMailDupes( items ); - - // We do not want KLineEdit::setCompletedItems to perform text - // completion (suggestion) since it does not know how to deal - // with providing proper completions for different items on the - // same line, e.g. comma-separated list of email addresses. - bool autoSuggest = (mode != TDEGlobalSettings::CompletionPopupAuto); - setCompletedItems( items, autoSuggest ); - - if (!autoSuggest) - { - int index = items.first().find( s ); - TQString newText = prevAddr + items.first().mid( index ); - //kdDebug() << "OLD TEXT: " << text() << endl; - //kdDebug() << "NEW TEXT: " << newText << endl; - setUserSelection(false); - setCompletedText(newText,true); - } - } - - break; - } - - case TDEGlobalSettings::CompletionShell: - { - TQString match = s_completion->makeCompletion( s ); - if ( !match.isNull() && match != s ) - { - setText( prevAddr + match ); - cursorAtEnd(); - } - break; - } - - case TDEGlobalSettings::CompletionMan: // Short-Auto in fact - case TDEGlobalSettings::CompletionAuto: - { - if (!s.isEmpty()) - { - TQString match = s_completion->makeCompletion( s ); - if ( !match.isNull() && match != s ) - { - TQString adds = prevAddr + match; - setCompletedText( adds ); - } - break; - } - } - case TDEGlobalSettings::CompletionNone: - default: // fall through - break; - } -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::slotPopupCompletion( const TQString& completion ) -{ - setText( m_previousAddresses + completion ); - cursorAtEnd(); -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::loadAddresses() -{ - s_completion->clear(); - s_addressesDirty = false; - - TQStringList adrs = addresses(); - for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it) - addAddress( *it ); -} - -void AddressLineEdit::addAddress( const TQString& adr ) -{ - s_completion->addItem( adr ); - int pos = adr.find( '<' ); - if( pos >= 0 ) - { - ++pos; - int pos2 = adr.find( pos, '>' ); - if( pos2 >= 0 ) - s_completion->addItem( adr.mid( pos, pos2 - pos )); - } -} - -void AddressLineEdit::slotStartLDAPLookup() -{ - if( !s_LDAPSearch->isAvailable() || s_LDAPLineEdit != this ) - return; - startLoadingLDAPEntries(); -} - -void AddressLineEdit::stopLDAPLookup() -{ - s_LDAPSearch->cancelSearch(); - s_LDAPLineEdit = NULL; -} - -void AddressLineEdit::startLoadingLDAPEntries() -{ - TQString s( *s_LDAPText ); - // TODO cache last? - TQString prevAddr; - int n = s.findRev(','); - if (n>= 0) - { - prevAddr = s.left(n+1) + ' '; - s = s.mid(n+1,255).stripWhiteSpace(); - } - if( s.length() == 0 ) - return; - - loadAddresses(); // TODO reuse these? - s_LDAPSearch->startSearch( s ); -} - -void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs ) -{ - if( s_LDAPLineEdit != this ) - return; - for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) { - TQString name(*it); - int pos = name.find( " <" ); - int pos_comma = name.find( ',' ); - // put name in quotes, if we have a comma in the name - if (pos>0 && pos_comma>0 && pos_commahasFocus()) - { - if( completionMode() != TDEGlobalSettings::CompletionNone ) - { - doCompletion( false ); - } - } -} - -TQStringList AddressLineEdit::removeMailDupes( const TQStringList& adrs ) -{ - TQStringList src = adrs; - qHeapSort( src ); - TQString last; - for( TQStringList::Iterator it = src.begin(); it != src.end(); ) { - if( *it == last ) - { - it = src.remove( it ); - continue; // dupe - } - last = *it; - ++it; - } - return src; -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::dropEvent(TQDropEvent *e) -{ - KURL::List uriList; - if(KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList )) - { - TQString ct = text(); - KURL::List::Iterator it = uriList.begin(); - for (; it != uriList.end(); ++it) - { - if (!ct.isEmpty()) ct.append(", "); - KURL u(*it); - if ((*it).protocol() == "mailto") - ct.append( (*it).path() ); - else - ct.append( (*it).url() ); - } - setText(ct); - setEdited( true ); - } - else { - if (m_useCompletion) - m_smartPaste = true; - TQLineEdit::dropEvent(e); - m_smartPaste = false; - } -} - - -TQStringList AddressLineEdit::addresses() -{ - TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while - - TQStringList result; - TQString space(" "); - TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]"); - TQString endQuote("\" "); - TQString addr, email; - - KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); - KABC::AddressBook::Iterator it; - for( it = addressBook->begin(); it != addressBook->end(); ++it ) { - TQStringList emails = (*it).emails(); - - TQString n = (*it).prefix() + space + - (*it).givenName() + space + - (*it).additionalName() + space + - (*it).familyName() + space + - (*it).suffix(); - - n = n.simplifyWhiteSpace(); - - TQStringList::ConstIterator mit; - - for ( mit = emails.begin(); mit != emails.end(); ++mit ) { - email = *mit; - if (!email.isEmpty()) { - if (n.isEmpty() || (email.find( '<' ) != -1)) - addr = TQString::null; - else { /* do we really need quotes around this name ? */ - if (n.find(needQuotes) != -1) - addr = '"' + n + endQuote; - else - addr = n + space; - } - - if (!addr.isEmpty() && (email.find( '<' ) == -1) - && (email.find( '>' ) == -1) - && (email.find( ',' ) == -1)) - addr += '<' + email + '>'; - else - addr += email; - addr = addr.stripWhiteSpace(); - result.append( addr ); - } - } - } - - KABC::DistributionListManager manager( addressBook ); - manager.load(); - result += manager.listNames(); - - TQApplication::restoreOverrideCursor(); - - return result; -} - -#include "addresslineedit.moc" diff --git a/kabc/addresslineedit.h b/kabc/addresslineedit.h deleted file mode 100644 index f81ffbfe4..000000000 --- a/kabc/addresslineedit.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Helge Deller - 2002 Lubos Lunak - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSLINEEDIT_H -#define KABC_ADDRESSLINEEDIT_H -// $Id$ - -#include -#include -#include - -#include "klineedit.h" -#include "kcompletion.h" - -class TDEConfig; - -namespace KABC { - -class LdapSearch; - -/** - * A lineedit with LDAP and kabc completion - * - * This lineedit is supposed to be used wherever the user types email addresses - * and might want a completion. You can simply use it as a replacement for - * KLineEdit or TQLineEdit. - * - * You can enable or disable the lineedit at any time. - * - * @see AddressLineEdit::enableCompletion() - */ -class KABC_EXPORT AddressLineEdit : public KLineEdit -{ - Q_OBJECT -public: - AddressLineEdit(TQWidget* parent, bool useCompletion = true, - const char *name = 0L); - virtual ~AddressLineEdit(); - - /** - * Reimplented for internal reasons. - * @ see KLineEdit::setFont() - */ - virtual void setFont( const TQFont& ); - - static TDEConfig *config(); - -public slots: - /** - * Set cursor to end of line. - */ - void cursorAtEnd(); - /** - * Toggle completion. - */ - void enableCompletion( bool enable ); - -protected: - /** - * Always call AddressLineEdit::loadAddresses() as the first thing. - * Use addAddress() to add addresses. - */ - virtual void loadAddresses(); - void addAddress( const TQString& ); - virtual void keyPressEvent(TQKeyEvent*); - virtual void dropEvent(TQDropEvent *e); - virtual void paste(); - virtual void insert(const TQString &t); - virtual void mouseReleaseEvent( TQMouseEvent * e ); - void doCompletion(bool ctrlT); - -private slots: - void slotCompletion() { doCompletion(false); } - void slotPopupCompletion( const TQString& ); - void slotStartLDAPLookup(); - void slotLDAPSearchData( const TQStringList& ); - -private: - void init(); - void startLoadingLDAPEntries(); - void stopLDAPLookup(); - TQStringList addresses(); - TQStringList removeMailDupes( const TQStringList& adrs ); - - TQString m_previousAddresses; - bool m_useCompletion; - bool m_completionInitialized; - bool m_smartPaste; - TQString m_typedText; // unused - - static bool s_addressesDirty; - static TDECompletion *s_completion; - static TQTimer *s_LDAPTimer; - static LdapSearch *s_LDAPSearch; - static TQString *s_LDAPText; - static AddressLineEdit *s_LDAPLineEdit; - static TDEConfig *s_config; - -private: - class AddressLineEditPrivate* d; -}; - -} - -#endif /* KABC_ADDRESSLINEEDIT_H */ diff --git a/kabc/agent.cpp b/kabc/agent.cpp deleted file mode 100644 index 571b7803e..000000000 --- a/kabc/agent.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "addressee.h" - -#include "agent.h" - -using namespace KABC; - -Agent::Agent() - : mAddressee( 0 ), mIntern( false ) -{ -} - -Agent::Agent( const TQString &url ) - : mAddressee( 0 ),mUrl( url ), mIntern( false ) -{ -} - -Agent::Agent( Addressee *addressee ) - : mAddressee( addressee ), mIntern( true ) -{ -} - -Agent::~Agent() -{ - delete mAddressee; - mAddressee = 0; -} - -bool Agent::operator==( const Agent &a ) const -{ - if ( mIntern != a.mIntern ) - return false; - - if ( !mIntern ) { - if ( mUrl != a.mUrl ) - return false; - } else { - if ( mAddressee && !a.mAddressee ) return false; - if ( !mAddressee && a.mAddressee ) return false; - if ( !mAddressee && !a.mAddressee ) return false; - if ( (*mAddressee) != (*a.mAddressee) ) return false; - } - - return true; -} - -bool Agent::operator!=( const Agent &a ) const -{ - return !( a == *this ); -} - -Agent &Agent::operator=( const Agent &addr ) -{ - if ( this == &addr ) - return *this; - - if ( addr.mIntern && addr.mAddressee ) { - if ( mAddressee ) - delete mAddressee; - - mAddressee = new Addressee; - *mAddressee = *(addr.mAddressee); - } - - mUrl = addr.mUrl; - mIntern = addr.mIntern; - - return *this; -} - -void Agent::setUrl( const TQString &url ) -{ - mUrl = url; - mIntern = false; -} - -void Agent::setAddressee( Addressee *addressee ) -{ - mAddressee = addressee; - mIntern = true; -} - -bool Agent::isIntern() const -{ - return mIntern; -} - -TQString Agent::url() const -{ - return mUrl; -} - -Addressee *Agent::addressee() const -{ - return mAddressee; -} - -TQString Agent::asString() const -{ - if ( mIntern ) - return "intern agent"; - else - return mUrl; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent ) -{ - TQ_UINT32 hasAddressee = ( agent.mAddressee != 0 ); - - s << agent.mIntern << agent.mUrl << hasAddressee; - if ( hasAddressee ) - s << (*agent.mAddressee); - - return s; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Agent &agent ) -{ - TQ_UINT32 hasAddressee; - - s >> agent.mIntern >> agent.mUrl >> hasAddressee; - - if ( hasAddressee ) { - agent.mAddressee = new Addressee; - s >> (*agent.mAddressee); - } - - return s; -} diff --git a/kabc/agent.h b/kabc/agent.h deleted file mode 100644 index dbe048f08..000000000 --- a/kabc/agent.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_AGENT_H -#define KABC_AGENT_H - -class TQDataStream; - -#include - -#include - -namespace KABC { - -class Addressee; - -/** - * Important!!! - * - * At the moment the vcard format does not support saving and loading - * this entity. - */ -class KABC_EXPORT Agent -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); - -public: - - /** - * Consturctor. Creates an empty object. - */ - Agent(); - - /** - * Consturctor. - * - * @param url A URL that describes the position of the agent file. - */ - Agent( const TQString &url ); - - /** - * Consturctor. - * - * @param addressee The addressee object of the agent. - */ - Agent( Addressee *addressee ); - - /** - * Destructor. - */ - ~Agent(); - - - bool operator==( const Agent & ) const; - bool operator!=( const Agent & ) const; - Agent &operator=( const Agent & ); - - /** - * Sets a URL for the location of the agent file. When using this - * function, isIntern() will return 'false' until you use - * setAddressee(). - * - * @param url The location URL of the agent file. - */ - void setUrl( const TQString &url ); - - /** - * Sets the addressee of the agent. When using this function, - * isIntern() will return 'true' until you use setUrl(). - * - * @param addressee The addressee object of the agent. - */ - void setAddressee( Addressee *addressee ); - - /** - * Returns whether the agent is described by a URL (extern) or - * by a addressee (intern). - * When this method returns 'true' you can use addressee() to - * get a Addressee object. Otherwise you can request the URL - * of this agent by url() and load the data from that location. - */ - bool isIntern() const; - - /** - * Returns the location URL of this agent. - */ - TQString url() const; - - /** - * Returns the addressee object of this agent. - */ - Addressee* addressee() const; - - /** - * Returns string representation of the agent. - */ - TQString asString() const; - -private: - Addressee *mAddressee; - TQString mUrl; - - int mIntern; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); - -} -#endif diff --git a/kabc/countrytransl.map b/kabc/countrytransl.map deleted file mode 100644 index 1459f0942..000000000 --- a/kabc/countrytransl.map +++ /dev/null @@ -1,12381 +0,0 @@ -Andorra ad -Andorra ad -أندورا ad -Ðндора ad -Ðндора ad -অà§à¦¯à¦¾à¦¨à¦¡à§‹à¦°à¦¾ ad -Andora ad -Andora ad -ΑνδόÏα ad -Andoro ad -آندورا ad -Andorre ad -Andóra ad -×נדורה ad -अंडोरा ad -アンドラ ad -អង់ដូរ៉ា ad -안ë„ë¼ ad -ອີນເດີຠad -Andora ad -Ðндора ad -Ðндорра ad -à¨à¨‚ਡੋਰਾ ad -Andora ad -Ðндорра ad -Andora ad -Ðндора ad -Andora ad -அனà¯à®Ÿà¯‹à®°à®¾ ad -Ðндора ad -à¹à¸­à¸™à¹‚ดรา ad -Ðндорра ad -Ðндорра ad -Andore ad -安é“å°” ad -安é“爾 ad -United Arab Emirates ae -Vereenigde Arabiese Emirate ae -الإمارات العربية المتحدة ae -Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ ÐрабÑÐºÑ–Ñ Ð­Ð¼Ñ–Ñ€Ð°Ñ‚Ñ‹ ae -ОÐЕ ae -সংযà§à¦•à§à¦¤ আরব আমিরশাহি ae -Stadoù-Unanet Arabeg ae -Ujedinjeni arapski emirati ae -Emirats Àrabs Units ae -Spojené arabské emiráty ae -Emiraethau Arabaidd Unedig ae -Forenende Arabiske Emirater ae -Vereinigte Arabische Emirate ae -Ενωμένα ΑÏαβικά ΕμιÏάτα ae -UniÄintaj Arabaj Emirlandoj ae -Emiratos árabes unidos ae -Araabia Ühendemiraadid ae -Arabiar Emirato Batuak ae -امارات متحده عربی ae -Yhdistyneet Arabiemiraatit ae -Émirats Arabes Unis ae -Ferienigde Arabyske Emiraten ae -Aontas na nÉimíríochtaí Arabacha ae -Emiratos Ãrabes Unidos ae -×יחוד ×”×מירויות הערביות ae -संयà¥à¤•à¥à¤¤ अरब अमीरात ae -Ujedinjeni arapski emirati ae -Egyesült Arab Emirátusok ae -Sameinuðu arabísku furstadæmin ae -Emirati Arabi Uniti ae -アラブ首長国連邦 ae -អារ៉ាប់​រួម ae -ì•„ëž ì—미레ì´íЏ ì—°í•© ae -ສະຫະລັດ ae -Jungtiniai Arabų Emiratai ae -Apvienotie ArÄbu EmerÄti ae -Обединети ÐрапÑки Емирати ae -ÐÑгдÑÑн арабын имрат ae -Emirati Għarab Magħquda ae -De forente arabiske emirater ae -Vereenigte Araabsche Emiraten ae -Verenigde Arabische Emiraten ae -Dei sameinte arabiske emirata ae -Di-Emirate tseo di Kopanego tsa Arab ae -ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ ae -Zjednoczone Emiraty Arabskie ae -Emiratos Ãrabes Unidos ae -Emirados Ãrabes Unidos ae -Emiratele Arabe Unite ae -Объединенные ÐрабÑкие Эмираты ae -Leta Zunze Ubumwe z'Abarabu ae -Ovttastuvvon arábalaÅ¡ emiráhtat ae -Spojené arabské emiráty ae -Združeni arabski Emirati ae -Уједињени арапÑки емирати ae -Ujedinjeni arapski emirati ae -Förenade arabemiraten ae -யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ அரபி எமிரேடà¯à®¸à¯ ae -Ðморати муттаҳидаи Ðраб ae -สหรัà¸à¸­à¸²à¸«à¸£à¸±à¸šà¸­à¸µà¸¡à¸´à¹€à¸£à¸•ส์ ae -BirleÅŸik Arap Emirlikleri ae -Berläşkän Ğäräp Ämirlekläre ae -Об'єднані ÐрабÑькі Емірати ae -Бирлашган Ðраб Ðмирликлари ae -Mashango o tangananaho a Emirates ae -Emirat Arabes Unis ae -阿è”é…‹ ae -阿拉伯è¯åˆå¤§å…¬åœ‹ ae -Izindawo zezinduna zase-United Arab ae -Afghanistan af -Ø£ÙØºØ§Ù†Ø³ØªØ§Ù† af -ÐфганіÑтан af -ÐфганиÑтан af -আফগানিসà§à¦¤à¦¾à¦¨ af -Afganistan af -Afganistan af -Afganistan af -Afghanistán af -Affganistan af -Αφγανιστάν af -Afganio af -Afghanistán af -Afganistan af -Ø§ÙØºØ§Ù†Ø³ØªØ§Ù† af -Afganistan af -An Afganastáin af -Afganistan af -×פגניסטן af -अफगानिसà¥à¤¤à¤¾à¤¨ af -Afganistan af -Afganisztán af -Afganistan af -Afganistan af -アフガニスタン af -អាហ្វកានីស្ážáž¶áž“ af -아프가니스탄 af -ລີທົ່ວເນີຠaf -AfganistÄna af -ÐвганиÑтан af -ÐфганÑтан af -Afganistan af -ਅਫਗਾਨਿਸਤਾਨ af -Afganistan af -Afeganistão af -Afeganistão af -Afganistan af -ÐфганиÑтан af -Afuganisitani af -Afganistan af -Afganistan af -ÐвганиÑтан af -Avganistan af -Afganistan af -ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯ af -ÐфғониÑтон af -อาฟà¸à¸²à¸™à¸´à¸ªà¸–าน af -Afganistan af -Äfğänstan af -ÐфганіÑтан af -ÐфғониÑтон af -Afganistan af -阿富汗 af -阿富汗 af -Antigua and Barbuda ag -Antigue en Barbuda ag -أنتيغوا Ùˆ باربودا ag -Antigua vÉ™ Barbuda ag -Ðнтыгуа Ñ– Барбуда ag -Ðнтигуа и Барбуда ag -অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦—à§à§Ÿà¦¾ à¦à¦¬à¦‚ বারà§à¦¬à§à¦¡à¦¾ ag -Antigua ha Barbuda ag -Antigua i Barbuda ag -Antigua i Barbuda ag -Antigua a Barbuda ag -Antigwa a Barbwda ag -Antigua og Barbuda ag -Antigua und Barbuda ag -Αντίγκουα και ΜπαÏμποÏντα ag -Antigvo-Barbudo ag -Antigua y Barbuda ag -Antigua ja Barbuda ag -Antigua eta Barbuda ag -آنتیگوا Ùˆ باربودا ag -Antigua ja Barbados ag -Antigua og Barbuda ag -Antigua et Barbuda ag -Antigua en Barbuda ag -Antigua agus Barbúda ag -Antiga e Barbuda ag -×נטיגו××” ובריבודה ag -à¤à¤¨à¥à¤Ÿà¤¿à¤—à¥à¤† और बारबूडा ag -Antigua i Barbuda ag -Antigua és Barbuda ag -Antigua dan Barbuda ag -Antígva og Barbúda ag -Antigua e Barbuda ag -アンティグアãƒãƒ¼ãƒ–ーダ ag -Antigua និង Barbuda ag -앤티가 바부다 ag -Antikva ir Barbuda ag -Antigva un Barbuda ag -Ðнтигва и Барбуда ag -Ðнтигуа ба Барбуда ag -Antigwa u Barbuda ag -Antigua og Barbuda ag -Antigua un Barbuda ag -Antigua en Barbuda ag -Antigua og Barbuda ag -Antigua le Barbuda ag -Antigua e Barbuda ag -à¨à¨‚ਟੀਗà©à¨† ਤੇ ਬਾਰਬà©à¨¡à¨¾ ag -Antigua i Barbuda ag -Antígua e Barbuda ag -Antigua e Barbuda ag -Antigua ÅŸi Barbuda ag -Ðнтигуа и Барбуда ag -Antigwa na Barubida ag -Antigua ja Barbuda ag -Antigua a Barbuda ag -Antigva in Barbuda ag -Ðнтигва и Барбуда ag -Antigva i Barbuda ag -I-Antigua kanye ne Barbuda ag -Antigua och Barbuda ag -ஆனà¯à®Ÿà®¿à®•ா மறà¯à®±à¯à®®à¯ பெரà¯à®®à¯à®Ÿà®¾ ag -Ðнтигуо ва Барбудо ag -อันทิà¸à¸±à¸§ à¹à¸¥à¸° บาร์บูดา ag -Antigua ve Barbuda ag -Antigua wä Barbuda ag -Трінідад Ñ– Тобаго ag -Ðнтигуа ва Барбуда ag -Antigua và Barbuda ag -Antigua eyet Barbuda ag -Antigua ne Barbuda ag -安æç“œå’Œå·´å¸ƒè¾¾ ag -安地瓜島和巴布é”å³¶ ag -Antigua kanye ne-Barbuda ag -Anguilla ai -أنغويلا ai -ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai -Ðнгила ai -অà§à¦¯à¦¾à¦™à§à¦—à§à¦‡à¦²à¦¾ ai -Angilla ai -Angwila ai -Ανγκουίλα ai -Angvilo ai -آنگوییلا ai -×נגווילה ai -à¤à¤‚गà¥à¤à¤²à¤¾ ai -Angvilla ai -イギリス属領アンギラ ai -អង់ហ្ស៊ីឡា ai -ì•™ê¸¸ë¼ ai -à»àºžàº™àº§àº´àº™ ai -Ðнгилја ai -Ðнгуаилла ai -Angwilla ai -à¨à¨‚ਨਗà©à¨ˆà¨²à¨¾ ai -Anghila ai -Ðнгилла ai -Angwiya ai -Angvila ai -Ðнгвила ai -Angvila ai -ஆனà¯à®•ிலà¯à®²à®¾ ai -Ðнгуилло ai -à¹à¸­à¸‡à¸à¸µà¸¥à¸² ai -ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai -Ðнгвилла ai -Anguila ai -安圭拉 ai -阿爾åŠåˆ©äºž ai -Albania al -Albanië al -ألبانيا al -ÐÐ»ÑŒÐ±Ð°Ð½Ñ–Ñ al -ÐÐ»Ð±Ð°Ð½Ð¸Ñ al -অলবেনিয়া al -Albani al -Albanija al -Albània al -Albánie al -Albanien al -Albanien al -Αλβανία al -Albanio al -Albaania al -آلبانی al -Albanie al -Albanië al -An Albáin al -Albánia al -×לבניה al -अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾ al -Albánia al -Albanía al -アルãƒãƒ‹ã‚¢ al -អាល់បានី al -알바니아 al -à»àº­àº”à»àº¥àº™àº•ິຠal -Albanija al -AlbÄnija al -Ðлбанија al -Ðлбани al -Albanija al -Albanien al -Albanië al -ਅਲਬਾਨੀਆ al -Albânia al -Albânia al -ÐÐ»Ð±Ð°Ð½Ð¸Ñ al -Alubaniya al -Albánia al -Albánsko al -Albanija al -Ðлбанија al -Albanija al -Albanien al -ஆலà¯à®ªà®©à®¿à®¯à®¾ al -Олбанӣ al -อัลเบเนีย al -Arnavutluk al -ÐÐ»Ð±Ð°Ð½Ñ–Ñ al -ÐÐ»Ð±Ð°Ð½Ð¸Ñ al -Albaneye al -阿尔巴尼亚 al -阿亞巴尼亞 al -Armenia am -Armenië am -أرمينيا am -ÐрмÑÐ½Ñ–Ñ am -ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am -আরà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ am -Armeni am -Armenija am -Armènia am -Arménie am -Armenien am -Armenien am -ΑÏμενία am -Armenio am -Armeenia am -ارمنستان am -Arménie am -Armenië am -An Airméin am -Arménia am -×רמניה am -आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾ am -Örményország am -Armenía am -アルメニア am -អារមáŸáž“ី am -아르메니아 am -ອາເຈນຕິນາ am -ArmÄ—nija am -ArmÄ“nija am -Ерменија am -Ðрмен am -Armenien am -Armenië am -ਅਰਮੀਨੀਆ am -Arménia am -Armênia am -ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am -Arumeniya am -Arménsko am -Armenija am -Јерменија am -Jermenija am -Armenien am -ஆரà¯à®®à¯‡à®©à®¿à®¯à®¾ am -ÐрманиÑтон am -อาร์เมเนีย am -Ermenistan am -Ärmänstan am -Ð’Ñ–Ñ€Ð¼ÐµÐ½Ñ–Ñ am -ÐрманиÑтон am -Ã…rmeneye am -亚美尼亚 am -亞美尼亞 am -Netherlands Antilles an -Nederlandse Antilles an -أنتيل هولندا an -ÐідÑрлÑндÑÐºÑ–Ñ Ðнтылы an -ХоландÑки Ðнтили an -নেদারলà§à¦¯à¦¾à¦£à§à¦¡à¦¸ অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦²à§‡à¦¸ an -Antilh an Izelvroioù an -Nizozemski Antili an -Antilles del Països Baixos an -Nizozemské Antily an -Ynysoedd Iseldiraidd Y Carib? an -Nederlandske antiller an -Niederländische Antillen an -Ολλανδικές Αντίλλες an -Nederlandaj Antiloj an -Antillas holandesas an -Hollandi Antillid an -Antilla Holandarrak an -آنتیلس هلند an -Alankomaiden Antillit an -Antilles néerlandaises an -Nederlânske Antillen an -Aintillí na hÃsiltíre an -Antillas Holandesas an -नीदरलैंड à¤à¤¨à¥à¤Ÿà¥€à¤²à¥€à¤¸ an -Nizozemski Antili an -Holland-Antillák an -Hollensku Antillur an -Antille Olandesi an -オランダ領アンãƒãƒ« an -អង់ទីយáŸâ€‹áž áž¼áž›áŸ’លង់ an -네ëœëž€ë“œë ¹ 안틸레스 an -ເນເທີà»àº¥àº™ an -Nyderlandų Antilai an -NÄ«derlandes Antiļas an -ХоландÑки Ðнтили an -Ðедерландын ÐнтиллÑÑ an -De nederlandske Antillene an -Nedderlandsche Antillen an -Nederlandse Antillen an -Dei nederlandske Antillane an -ਨੀਂਦਰਲੈਂਡ à¨à¨‚ਟੀਲੀਸ an -Antyle Holenderskie an -Antilhas Holandês an -Antilhas Holandesas an -Antilele Olandeze an -ÐидерландÑкие ÐнтильÑкие оÑтрова an -Antiye z'Ubuholande an -HollándalaÅ¡ Antillat an -Holandské Antily an -Nizozemski Antili an -ХоландÑки антили an -Holandski antili an -Nederländska Antillerna an -நெதரà¯à®²à®¾à®¨à¯à®¤à¯ அனà¯à®Ÿà®¿à®²à¯à®¸à¯ an -ÐнтилиÑи Ҳолланд an -เนเธอร์à¹à¸¥à¸™à¸”์ à¹à¸­à¸™à¸—ิลีส an -Hollanda Antilleri an -Niderland Antilläre an -ÐнтільÑькі оÑтрови (Ðідерланди) an -Ðидерландлар Ðнтил Ороллари an -Hà Lan Antilles an -Antiyes Neyerlandesses an -è·å±žå®‰çš„列斯群岛 an -è·å±¬å®‰åœ°åˆ—斯群島 an -Angola ao -أنغولا ao -Ðнгола ao -Ðнгола ao -অà§à¦¯à¦¾à¦™à§à¦—োলা ao -Ανγκόλα ao -Angolo ao -آنگولا ao -Angóla ao -×נגולה ao -अंगोला ao -Angóla ao -アンゴラ ao -អង់ហ្គោឡា ao -ì•™ê³¨ë¼ ao -ບັນà»àºà»€àº¥àºµàº ao -Ðнгола ao -Ðнгол ao -ਅੰਗੋਲਾ ao -Ðнгола ao -Ðнгола ao -ஆஙà¯à®•ோலா ao -Ðнгуло ao -à¹à¸­à¸‡à¹‚à¸à¸¥à¸² ao -Ðнгола ao -Ðнгола ao -安哥拉 ao -安哥拉 ao -Argentina ar -Argentinië ar -الأرجنتين ar -Ðргентына ar -Ðржентина ar -আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ ar -Arc'hantina ar -Ariannin ar -Argentinien ar -ΑÏγεντινή ar -Argentino ar -آرژانتین ar -Agentiina ar -Argentine ar -Argentinië ar -An Airgintín ar -Arxentina ar -×רגנטינה ar -अरà¥à¤œà¥‡à¤‚टीना ar -Argentína ar -Argentína ar -アルゼンãƒãƒ³ ar -អាហ្សង់ទីន ar -아르헨티나 ar -ອາເຈນຕິນາ ar -ArgentÄ«na ar -Ðргентина ar -Ðргентин ar -ArÄ¡entina ar -Argentinien ar -Argentinië ar -ਅਰਜ਼ਨਟੀਨਾ ar -Argentyna ar -Ðргентина ar -Arijantina ar -Argentína ar -Ðргентина ar -I-Argentina ar -ஆரà¯à®šà¯†à®©à¯à®Ÿà®¿à®©à®¾ ar -Оржонтина ar -อาร์เจนตินา ar -Arjantin ar -Ðргентина ar -Ðргентина ar -Agenthina ar -Ã…rdjintene ar -阿根廷 ar -阿根廷 ar -American Samoa as -Amerikanse Samoa as -ساموا الأمريكية as -ÐмÑрыканÑкае Самоа as -ÐмериканÑки Самоа as -মারà§à¦•িন সামোয়া as -Samoa amerikanek as -AmeriÄka Samoa as -Samoa Americana as -Americká Samoa as -Samoa Americanaidd as -Samoa (USA) as -Amerikanisches Samoa as -ΑμεÏικανική Σαμόα as -Amerika Samoo as -Samoa americana as -Ameerika Samoa as -Amerikar Samoa as -ساموای آمریکا as -Amerikan Samoa as -Samoa américaines as -Amerikaansk Samoa as -Samó Meiriceánach as -Samoa Americana as -סמו××” ×”×מריקנית as -अमेरिकी सामोआ as -AmeriÄka Samoa as -Amerikai Szamoa as -Bandaríska Samóa as -Samoa Americane as -アメリカンサモア as -សាមូអា អាមáŸážšáž·áž€ as -미국령 사모아 as -ອາເມລິàºàº²à»€àº«àº™àº·àº­ as -Amerikos Samoa as -Amerikas Samoa as -ÐмериканÑка Самоа as -Ðмерик, Самоа as -Samoa Amerikana as -Amerikansk Samoa as -Amerikaansch Samoa as -Amerikaans Samoa as -Amerikansk Samoa as -ਅਮਰੀਕੀ ਸਾਮੋਆ as -Samoa AmerykaÅ„skie as -Samoa Americana as -Samoa Americana as -Samoa americană as -ÐмериканÑкое Самоа as -Samowa Nyamerika as -AmerihkálaÅ¡ Samoa as -Americká Samoa as -AmeriÅ¡ka Samoa as -Ðмеричка Самоа as -AmeriÄka Samoa as -Amerikanska Samoa as -அமெரிகà¯à®•ா சமோயா as -Самоаи Ðмрикоӣ as -อเมริà¸à¸±à¸™ ซามัว as -Amerika Samoası as -Amerikalı Samoa as -ÐмериканÑьке Самоа as -Ðмерика СамоаÑи as -Samowa Amerikinne as -ç¾Žå±žè¨æ‘©äºš as -美屬薩摩亞 as -Austria at -Oostenryk at -النمسا at -Avstriya at -ÐÑžÑÑ‚Ñ€Ñ‹Ñ at -ÐвÑÑ‚Ñ€Ð¸Ñ at -অসà§à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ at -Aostria at -Austrija at -Àustria at -Rakousko at -Awstria at -Østrig at -Österreich at -ΑυστÏία at -AÅ­strio at -اتریش at -Itävalta at -Eysturríki at -Autriche at -Eastenryk at -An Ostair at -×וסטריה at -आसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾ at -Austrija at -Ausztria at -Austurríki at -オーストリア at -អូទ្រីស at -오스트리아 at -ອອດສະເຕເລີຠat -Austrija at -Austrija at -ÐвÑтрија at -ÐвÑтри at -Awtrija at -Østerrike at -Österriek at -Oostenrijk at -Austerrike at -ਆਸਟਰੀਆ at -Ãustria at -Ãustria at -ÐвÑÑ‚Ñ€Ð¸Ñ at -Ositiriya at -Nuortariika at -Rakúsko at -Avstrija at -ÐуÑтрија at -Austrija at -I-Austria at -Österrike at -ஆஸà¯à®¤à¯à®¤à®¿à®°à®¿à®¯à®¾ at -ÐвÑÑ‚Ñ€Ð¸Ñ at -ออสเตรีย at -Avusturya at -ÐвÑÑ‚Ñ€Ñ–Ñ at -ÐвÑÑ‚Ñ€Ð¸Ñ at -Ositiria at -Ão at -Otriche at -奥地利 at -奧地利 at -Australia au -Australië au -أستراليا au -Avustralya au -ÐÑžÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au -ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au -অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à§Ÿà¦¾ au -Aostralia au -Australija au -Austràlia au -Austrálie au -Awstralia au -Australien au -Australien au -ΑυστÏαλία au -AÅ­stralio au -Austraalia au -استرالیا au -Australie au -Australië au -An Astráil au -Austrália au -×וסטרליה au -आसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾ au -Australija au -Ausztrália au -Ãstralía au -オーストラリア au -អូស្ážáŸ’រាលី au -오스트레ì¼ë¦¬ì•„ au -ອອດສະເຕເລີຠau -Australija au -AustrÄlija au -ÐвÑтралија au -ÐвÑтрали au -Awstralja au -Australien au -Australië au -ਅਸਟਰੇਲੀਆ au -Austrália au -Austrália au -ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au -Ositaraliya au -Austrália au -Austrália au -Avstralija au -ÐуÑтралија au -Australija au -I-Australia au -Australien au -ஆஸà¯à®¤à¯à®¤à®¿à®°à¯‡à®²à®¿à®¯à®¾ au -ОÑтролиё au -ออสเตรเลีย au -Avusturalya au -ÐвÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au -ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au -Ositiralia au -Úc au -Ostraleye au -澳大利亚 au -澳大利亞 au -Aruba aw -أروبا aw -Ðруба aw -আরà§à¦¬à¦¾ aw -Arwba aw -ΑÏοÏμπα aw -Arubo aw -آروبا aw -×רובה aw -अरूबा aw -Arúba aw -オランダ自治領アルムaw -អារូបា aw -아루바 aw -ເàºàº¡à»„ັພ່ aw -Ðруба aw -Ðрува aw -ਅਰੂਬੀ aw -Ðруба aw -Ãruba aw -Ðруба aw -à®…à®°à¯à®ªà®¾ aw -Ðрубо aw -อรูบา aw -Ðруба aw -Ðруба aw -Arouba aw -阿é²å·´ aw -阿魯巴 aw -Ã…land Islands ax -Ã…land Eilande ax -ОÑтрови Ðланд ax -Illes Ã…land ax -Ã…landské ostrovy ax -Ã…land-øerne ax -Aland ax -Îησιά Ã…land ax -Islas Aland ax -Ahvenamaa ax -Ã…land irlak ax -Ahvenanmaan saaret ax -ÃŽles Ã…land ax -Ã…land-eilannen ax -Na hOileáin Ã…land ax -Illas Ã…land ax -Ã…land-szigetek ax -Ãlandseyjar ax -Isole Ã…land ax -オーランド諸島 ax -កោះ Ã…land ax -Ã…land salos ax -ОÑтрови Оланд ax -Ã…land-øyene ax -Ã…land-Inseln ax -Ã…land-eilanden ax -Ã…land-øyane ax -ਅਮਾਨ ਟਾਪੂ ax -Wyspy Ã…land ax -Ilhas Ã…land ax -Ilhas Ã…land ax -ÐландÑкие оÑтрова ax -Ibirwa by'Ã…land ax -Ã…land sullot ax -Ã…landski otoki ax -ÐландÑка оÑтрва ax -Alandska ostrva ax -Ã…land ax -หมู่เà¸à¸²à¸°à¸­à¸²à¸¥à¸±à¸™à¸”์ ax -Cayman Adaları ax -Aland Utrawları ax -ÐландÑькі оÑтрови ax -Ðланд Ороллари ax -阿兰群岛 ax -奧蘭群島 ax -Azerbaijan az -أذربيجان az -AzÉ™rbaycan az -ÐзÑрбайджан az -Ðзербайджан az -আজেরবাইজান az -Azerbeidjan az -Azerbejdžan az -Azerbaitjan az -Ãzerbajdžánský az -Aserbaijan az -Azerbajdjan az -Aserbaidschan az -ΑζεÏμπαϊτζάν az -AzerbajÄano az -Azerbaiján az -Aserbaidžaan az -آذربایجان az -Azerbaidäani az -Aserbadsjan az -Azerbeidjan az -An Asarbaiseáin az -×זרביג'ן az -अजरबैजान az -Azerbejdžan az -Azerbajdzsán az -Aserbaídsjan az -Azerbaigian az -アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³ az -អាហ្ស៊ែរបែហ្សង់ az -아제르바ì´ìž” az -ອາເຊີໄບຈັນ az -Azerbaidžanas az -AzerbaidžÄna az -Ðзербејџан az -Ðзарбайжан az -AżerbajÄ¡an az -Aserbajdsjan az -Aserbaidschan az -Azerbeidjan az -Aserbajdsjan az -ਅਜ਼ਰਬਾਈਜਾਨ az -Azerbejdżan az -Azerbaijão az -Azerbaijão az -Ðзербайджан az -Azeribayijani az -Aserbaižan az -Ãzerbajdžánsky az -Azerbajdžan az -Ðзербејџан az -Azerbejdžan az -I-Azerbaijan az -அசரà¯à®ªà¯ˆà®šà®¾à®©à¯ az -Озарбойҷон az -อาร์เซอร์ไบจัน az -Azerice az -Äzärbaycan az -Ðзербайджан az -Озарбайжон az -Azerbaydjan az -阿塞拜疆 az -亞塞拜然 az -Bosnia and Herzegovina ba -Bosnië en Herzegovina ba -البوسنا Ùˆ الهرسك ba -БоÑÑŒÐ½Ñ–Ñ Ñ– Герцагавіна ba -БоÑна и Херцеговина ba -বসনিয়া à¦à¦¬à¦‚ হারজিগোভিনা ba -Bosni hag Herzigovi ba -Bosna i Hercegovina ba -Bòsnia i Hercegovina ba -Bosna a Herzegovina ba -Bosnia a Hertsegofina ba -Bosnien-Herzegovina ba -Bosnien und Herzegowina ba -Βοσνία και ΕÏζεγοβίνη ba -Bosnio kaj Hercegovino ba -Bosnia y Herzegovina ba -Bosnia ja Hertsegovina ba -Bosnia eta Herzegovina ba -بوسنی Ùˆ هرزگوین ba -Bosnia ja Herzegovina ba -Bosnia-Herzegovina ba -Bosnie herzégovine ba -Bosnië en Herzegovina ba -An Bhoisnia agus Heirseagóivéin ba -Bosnia e Herzegovina ba -בוסניה הרצגובינה ba -बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¥‡à¤—ोविना ba -Bosna i Hercegovina ba -Bosznia-Hercegovina ba -Bosnía og Hersegóvína ba -Bosnia e Erzegovina ba -ボスニアヘルツェゴビナ ba -បូស្ន៊ី និង​ហឺហ្ស៊áŸáž áŸ’គោវីណា ba -보스니아어와 헤르체고비나 ba -ບອສເນີຠà»àº¥àº° ເຫີເຊີໂàºàº§àº´àº™àº² ba -Bosnija ir Hercegovina ba -Bosnija un Hercogovina ba -БоÑна и Херцеговина ba -БоÑни ба Херцеговина ba -Bożnia u Ħerżegovina ba -Bosnia-Hercegovina ba -Bosnien-Herzegowina ba -Bosnië en Herzegovina ba -Bosnia-Hercegovina ba -Bosnia le Herzegovina ba -ਬੋਸਨੀਆ ਤੇ ਹਰਜ਼ੀਗੋਵਿਨਾ ba -BoÅ›nia i Hercegowina ba -Bósnia e Herzegovina ba -Bósnia Herzegovina ba -Bosnia ÅŸi HerÅ£egovina ba -БоÑÐ½Ð¸Ñ Ð¸ Герцеговина ba -Bosiniya na Herizegovina ba -Bosnia ja Hercegovina ba -Bosna a Hercegovina ba -Bosna in Hercegovina ba -БоÑна и Херцеговина ba -Bosna i Hercegovina ba -I-Bosnia kanye ne Herzegovina ba -Bosnien och Herzegovina ba -பொசà¯à®©à®¿à®¯à®¾ மறà¯à®±à¯à®®à¯ ஹரà¯à®œà®¿à®•ோவினா ba -БоÑÐ½Ð¸Ñ Ð²Ð° ГерÑогавина ba -บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸´à¸™à¸² ba -Bosna Hersek ba -Bosnia wä Herzegovina ba -БоÑÐ½Ñ–Ñ Ñ– Герцеговина ba -БоÑÐ½Ð¸Ñ Ð²Ð° Герцоговина ba -Mubosinia na Muhezegovina ba -Bosnia và Herzegovina ba -Bosneye ba -Bosnia ne Herzegovina ba -波斯尼亚和黑塞哥维那 ba -æ³¢å£«å°¼äºžèˆ‡èµ«å¡žå“¥ç¶­ç´ ba -Bosnia kanye ne-Herzegovina ba -Barbados bb -بربادوس bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Ð‘Ð°Ñ€Ð±ÐµÐ¹Ð´Ð¾Ñ bb -বারবাডোস bb -ΜπαÏμπάντος bb -Barbado bb -باربادوس bb -Barbade bb -Barbadós bb -ברבדוס bb -बारबाडोस bb -ãƒãƒ«ãƒãƒ‰ã‚¹ bb -បារបាដូស bb -바르바ë„스 bb -ບາລບາດອດສ bb -Barbadosas bb -Barbadosa bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Ð‘Ð°Ñ€Ð±Ð¾Ð´Ð°Ñ bb -ਬਾਰਬਾਡੋਸ bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Barubadosi bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -I-Barbados bb -பாரà¯à®ªà¯‡à®Ÿà®¾à®šà¯ bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -บาร์บาดอส bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -BÃ¥rbades bb -巴巴多斯 bb -å·´è²å¤š bb -Bangladesh bd -بنغلاديش bd -BanqladeÅŸ bd -БанглÑдÑш bd -Бангладеш bd -বাংলাদেশ bd -Bangladaech bd -BangladeÅ¡ bd -Bangladéš bd -Bangladesch bd -Μπαγκλαντές bd -BangladeÅo bd -بنگلادش bd -An Bhanglaidéis bd -בנגלדש bd -बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶ bd -BangladeÅ¡ bd -Banglades bd -Bangladess bd -ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥ bd -បង់ក្លាដáŸážŸáŸ’áž  bd -방글ë¼ë°ì‹œ bd -ບັງຄະລາເທດ bd -BangladeÅ¡as bd -BangladeÅ¡a bd -Бангладеш bd -Бангладеш bd -Bangladexx bd -Bangladesch bd -ਬੰਗਲਾਦੇਸ਼ bd -Bangladesz bd -BangladeÅŸ bd -Бангладеш bd -Bangaladeshi bd -Bangladéš bd -BangladeÅ¡ bd -Бангладеш bd -BangladeÅ¡ bd -I-Bangladesh bd -பஙà¯à®•ளாதேச௠bd -Банглодеш bd -บังคลาเทศ bd -BangladeÅŸ bd -BangladeÅŸ bd -Бангладеш bd -Бангладеш bd -孟加拉国 bd -孟加拉 bd -Belgium be -België be -بلجيكا be -Belçika be -БÑÐ»ÑŒÐ³Ñ–Ñ be -Ð‘ÐµÐ»Ð³Ð¸Ñ be -বেলজিয়াম be -Belgia be -Belgija be -Bèlgica be -Belgie be -Gwlad Belg be -Belgien be -Belgien be -Βέλγιο be -Belgio be -Bélgica be -Belgia be -Belgika be -بلژیک be -Belgia be -Belgia be -Belgique be -België be -An Bheilg be -Bélxica be -בלגיה be -बेलà¥à¤œà¤¿à¤¯à¤® be -Belgija be -Belgia be -Belgía be -Belgio be -ベルギー be -បែលហ្ស៊ិក be -ë²¨ê¸°ì— be -ເບລຢ່ງມ be -Belgija be -Beļģija be -Белгија be -Белги be -BelÄ¡ju be -Belgia be -Belgien be -België be -Belgia be -Bèlgica be -ਬੈਲਜੀਅਮ be -Belgia be -Bélgica be -Bélgica be -Belgia be -Ð‘ÐµÐ»ÑŒÐ³Ð¸Ñ be -Ububiligi be -Belgia be -Belgicko be -Belgija be -Белгија be -Belgija be -I-Belgium be -Belgien be -பெலà¯à®šà®¿à®¯à®®à¯ be -Ð‘ÐµÐ»Ð³Ð¸Ñ be -เบลเยียม be -Belçika be -Belgia be -Ð‘ÐµÐ»ÑŒÐ³Ñ–Ñ be -Ð‘ÐµÐ»Ð³Ð¸Ñ be -Bỉ be -Beldjike be -比利时 be -比利時 be -Burkina Faso bf -بوركينا ÙØ§Ø³Ùˆ bf -Буркіна ФаÑо bf -Буркина ФаÑо bf -বারকিনা ফাসো bf -Bwrcina Ffaso bf -ΜπουÏκίνα Φάσο bf -Burkino bf -Ø¨ÙˆØ±Ú©ÛŒÙ†Ø§ÙØ§Ø³Ùˆ bf -Buircíne Fasó bf -בורניקה פ×סו bf -बà¥à¤°à¥à¤•िना फासो bf -Burkina faso bf -Búrkína Fasó bf -ブルキナファソ bf -ប៊ូរគីណាហ្វាសូ bf -부르키나 파소 bf -ຕຸລະàºàºµ bf -Буркина ФаÑо bf -Буркина ФаÑо bf -ਬà©à¨°à¨•ਿਨਾ ਫਾਸੋ bf -Буркина-ФаÑо bf -Burukina Faso bf -Буркина ФаÑо bf -பரà¯à®•ினா ஃபசோ bf -Буркина ФаÑу bf -เบอร์à¸à¸´à¸™à¸²à¸Ÿà¸²à¹‚ซ bf -Буркіна-ФаÑо bf -Буркина-ФаÑÑо bf -Bourkina Fasso bf -布基纳法索 bf -布å‰ç´æ³•ç´¢ bf -Bulgaria bg -Bulgarye bg -بلغاريا bg -Bolgarıstan bg -Ð‘Ð°ÑžÐ³Ð°Ñ€Ñ‹Ñ bg -Ð‘ÑŠÐ»Ð³Ð°Ñ€Ð¸Ñ bg -বà§à¦²à¦—েরিয়া bg -Bulgari bg -Bugarska bg -Bulgària bg -Bulharsko bg -Bwlgaria bg -Bulgarien bg -Bulgarien bg -ΒουλγαÏία bg -Bulgario bg -Bulgaaria bg -بلغارستان bg -Bulgarie bg -Bulgarije bg -An Bhulgáir bg -Bulgária bg -בולגריה bg -बà¥à¤²à¥à¤—ारिया bg -Bugarska bg -Bulgária bg -Búlgaría bg -ブルガリア bg -ប៊ុលហ្ការី bg -불가리아 bg -ບັນà»àºà»€àº¥àºµàº bg -Bulgarija bg -BulgÄrija bg -Бугарија bg -Болгари bg -Bulgarija bg -Bulgarien bg -Bulgarije bg -ਬà©à¨²à¨—ਾਰੀਆ bg -BuÅ‚garia bg -Bulgária bg -Bulgária bg -Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg -Buligariya bg -Bulgária bg -Bulharsko bg -Bolgarija bg -БугарÑка bg -Bugarska bg -I-Bulgaria bg -Bulgarien bg -பலà¯à®•ேரியா bg -БулғориÑтон bg -บัลà¹à¸à¹€à¸£à¸µà¸¢ bg -Bulgaristan bg -Ð‘Ð¾Ð»Ð³Ð°Ñ€Ñ–Ñ bg -Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg -Baligaria bg -BulgÃ¥reye bg -ä¿åŠ åˆ©äºš bg -ä¿åŠ åˆ©äºž bg -Bahrain bh -البحرين bh -БахрÑйн bh -Бахрейн bh -বাহরেন bh -Barein bh -Bahrein bh -Bahrajn bh -ΜπαχÏέιν bh -Barejno bh -Bahrein bh -Bahrein bh -بحرین bh -Baghrein bh -Bairéin bh -Barein bh -בחריין bh -बहारीन bh -Barein bh -ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³ bh -បារ៉ែន bh -ë°”ë ˆì¸ bh -ຖັàºàºà»ˆàº‡àº§ bh -Bahreinas bh -Bahreina bh -Бахреин bh -Бахрайн bh -Baħrain bh -Baghrein bh -ਬਹਿਰੀਨ bh -Bahrajn bh -Bahrein bh -Бахрейн bh -Bahirayini bh -Bahrajn bh -Bahrajn bh -Бахреин bh -Bahrein bh -I-Bahrain bh -Bahrein bh -பஹà¯à®°à¯ˆà®©à¯ bh -Баҳрайн bh -บาห์เรียน bh -Bahreyn bh -Bahreyn bh -Бахрейн bh -Баҳрайн bh -Bareyn bh -å·´æž— bh -å·´æž— bh -Burundi bi -بوروندي bi -Бурундзі bi -Бурунди bi -বà§à¦°à§à¦¨à§à¦¡à¦¿ bi -Bwrwndi bi -ΜπουÏουντί bi -Burundo bi -بروندی bi -An Bhurúin bi -בורונדי bi -बà¥à¤°à¥‚ंडी bi -Búrúndí bi -ブルンジ bi -ប៊ូរុនឌី bi -부룬디 bi -ເຄອຣດ bi -Burundija bi -Бурунди bi -Бурунди bi -ਬà©à¨°à©à¨¨à¨¡à©€ bi -Бурунди bi -Бурунди bi -பà¯à®°à¯à®©à¯à®Ÿà®¿ bi -Бурундӣ bi -บูรันดิ bi -Бурунді bi -Бурунди bi -Bouroundi bi -布隆迪 bi -浦隆地 bi -Benin bj -Denin bj -بينين bj -БÑнін bj -Бенин bj -বেনিন bj -Μπενίν bj -Benino bj -بنین bj -Bénin bj -Beinin bj -בנין bj -बेनिन bj -Benín bj -ベナン bj -áž”áŸážŽáž¶áŸ†áž„ bj -베냉 bj -ບອສເນີຠbj -Benina bj -Бенин bj -Бенин bj -ਬੀਨਿਨ bj -Benim bj -Бенин bj -Bene bj -Бенин bj -பெனின௠bj -Бенини bj -เบนิน bj -Бенін bj -Бенин bj -è´å® bj -è²å— bj -Bermuda bm -برمودا bm -БÑрмуды bm -Бермуда bm -বারà§à¦®à§à¦¡à¦¾ bm -Bermud bm -Bermudy bm -Bermwda bm -Bermudas bm -ΒεÏμοÏδες bm -Bermudoj bm -برمودا bm -Bermudes bm -Beirmiúda bm -ברמודה bm -बरमूडा bm -Bermúdaeyjar bm -英領ãƒãƒ¼ãƒŸãƒ¥ãƒ¼ãƒ€ bm -ប៊áŸážšáž˜áž¼ážŠáž¶ bm -버뮤다 bm -ເàºàº¥àº¥àº°àº¡àº±àº™ bm -Bermudų bm -Bermudas bm -Бермуди bm -Бермуда bm -ਬੀਰਮà©à¨¡à¨¾ bm -Bermudy bm -Bermude bm -БермудÑкие ОÑтрова bm -Berimuda bm -Bermudy bm -Bermudi bm -Бермуда bm -பெரà¯à®®à¯à®Ÿà®¾ bm -Бермудо bm -เบอร์มิวดา bm -Бермуди bm -Бермуда Ороллари bm -Bermudes bm -百慕大 bm -ç™¾æ…•é” bm -Brunei Darussalam bn -بروناي دار السلام bn -БрунÑй bn -Бруней bn -বà§à¦°à§à¦¨à§‡à¦‡ দারà¦à¦¸à¦¸à¦²à¦¾à¦® bn -Darussalam Brunei bn -Brunej bn -Brwnei Darwsalam bn -Brunei bn -ΜπÏουνέι ÎταÏουσαλάμ bn -Brunejo bn -Brunei bn -برونویی بیت‌المقدس bn -Brunei bn -Brúiné bn -בורניי ×“×¨×•×¡×œ× bn -बà¥à¤°à¥‚नेई दारेसà¥à¤¸à¤²à¤¾à¤® bn -Brunei Szultánság bn -Brúnei Darussalam bn -Brunei bn -ブルãƒã‚¤ bn -ប្រ៊ុយណ០bn -ë¸Œë£¨ë‚˜ì´ bn -ເບລາລັສເຊີຠbn -Bruneja Darusalama bn -Брунеи Дар ÐµÑ Ð¡Ð°Ð»Ð°Ð¼ bn -Бруней ДаруÑÑалам bn -Brunei bn -Brunei bn -Brunei bn -ਬਰੂਨੀ ਡਾਰੂਸਲਾਮ bn -Brunei Dar-es-Salam bn -Brunei bn -Бруней bn -Buruneyi Darusalamu bn -Brunei bn -Brunei Darusalam bn -Брунеј ДаруÑалам bn -Brunej Darusalam bn -பà¯à®°à¯‚னை டரà¯à®šà®²à®¾à®®à¯ bn -Брунеи Ð‘Ð°Ð¹Ñ‚ÑƒÐ»Ð¼ÑƒÒ›Ð°Ð´Ð´Ð°Ñ bn -บรูไนดูรัสซาลาม bn -Brunei bn -Бруней ДаруÑÑалам bn -Бруней ДоруÑÑалом bn -Bruney Darussalam bn -文莱达é²è¨å…° bn -æ–‡èŠé”魯薩蘭 bn -Bolivia bo -Bolivië bo -بوليÙيا bo -Boliviya bo -Ð‘Ð°Ð»Ñ–Ð²Ñ–Ñ bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -বলিভিয়া bo -Bolivija bo -Bolívia bo -Bolívie bo -Bolifia bo -Bolivien bo -Βολιβία bo -Bolivio bo -Boliivia bo -بولیوی bo -Bolivie bo -An Bholaiv bo -Bolívia bo -בוליביה bo -बोलिविया bo -Bolivija bo -Bolívia bo -Bólivía bo -ボリビア bo -បូលីវី bo -볼리비아 bo -ໂບລີເວີຠbo -Bolivija bo -BolÄ«vija bo -Боливија bo -Боливи bo -Bolivja bo -Bolivien bo -ਬੋਲਵੀਆ bo -Boliwia bo -Bolívia bo -Bolívia bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -Boliviya bo -Bolívia bo -Bolivija bo -Боливија bo -Bolivija bo -I-Bolivia bo -பொலிவியா bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -โบลิเวีย bo -Bolivya bo -Ð‘Ð¾Ð»Ñ–Ð²Ñ–Ñ bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -Boliveye bo -玻利维亚 bo -玻利維亞 bo -Brazil br -Brazilië br -البرازيل br -Braziliya br -Ð‘Ñ€Ð°Ð·Ñ‹Ð»Ñ–Ñ br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br -বà§à¦°à¦¾à¦œà¦¿à¦² br -Brasil br -Brazílie br -Brasil br -Brasilien br -Brasilien br -Î’Ïαζιλία br -Brazilo br -Brasil br -Brasiilia br -Brasil br -برزیل br -Brasilia br -Brésil br -Brazilië br -An Bhrasaíl br -Brasil br -ברזיל br -बà¥à¤°à¤¾à¤œà¥€à¤² br -Brazília br -Brasilía br -Brasile br -ブラジル br -ប្រáŸáž áŸ’ស៊ីល br -브ë¼ì§ˆ br -ບາຊີລ br -Brazilija br -BrazÄ«lija br -Бразил br -Бразил br -Brażil br -Brasil br -Brasilien br -Brazilië br -Brasil br -Brasil br -ਬਰਾਜ਼ੀਲ br -Brazylia br -Brasil br -Brasil br -Brazilia br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br -Burezile br -Brasil br -Brazília br -Brazilija br -Бразил br -I-Brazil br -Brasilien br -பிரேசில௠br -Бразил br -บราซิล br -Brezilya br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ñ–Ñ br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br -Burazili br -Braezi br -巴西 br -巴西 br -Bahamas bs -جزر الباهاما bs -Багамы bs -БахамÑки оÑтрови bs -বাহামাস bs -Bahami bs -Bahames bs -Bahamy bs -Ynysoedd Bahama bs -Μπαχάμες bs -Bahamoj bs -Bahama bs -باهاماس bs -Bahaman saaret bs -Na Bahámaí bs -Baamas bs -בהמס bs -बहामा bs -Bahamák bs -Bahamaeyjar bs -ãƒãƒãƒž bs -បាហាម៉ា bs -바하마 bs -ປານາມາ bs -Bahamų bs -Бахами bs -Ð‘Ð°Ñ…Ð°Ð¼Ð°Ñ bs -Baħamas bs -ਬਾਹਾਮਾਸ bs -Bahamy bs -БагамÑкие оÑтрова bs -Bahamasi bs -Bahamy bs -Bahami bs -Бахами bs -Bahami bs -பனாமா bs -Ð‘Ð¾Ò³Ð¾Ð¼Ð¾Ñ bs -บาฮามา bs -Bahamalar bs -Багами bs -Багама Ороллари bs -巴哈马 bs -巴拿馬 bs -Bhutan bt -بوتان bt -Бутан bt -Бутан bt -ভূটান bt -Butañ bt -Butan bt -Bhútán bt -Bhwtan bt -Μπουτάν bt -Butano bt -Bhután bt -بوتان bt -Bhoutan bt -An Bhútáin bt -Bután bt -בהוטן bt -भूटान bt -Bhután bt -Bútan bt -ブータン bt -ប៊ូážáž¶áž“ bt -부탄 bt -ຖັàºàºà»ˆàº‡àº§ bt -Bhutano bt -ButÄna bt -Бутан bt -Бутан bt -Butan bt -ਭà©à¨Ÿà¨¾à¨¨ bt -Butão bt -Butão bt -Butan bt -Бутан bt -Butani bt -Butan bt -Бутан bt -Butan bt -பூடான௠bt -Бутон bt -ภูà¸à¸²à¸™ bt -Butan bt -Бутан bt -Бутан bt -Boutan bt -ä¸ä¸¹ bt -ä¸ä¸¹ bt -Botswana bw -بوتسوانا bw -БатÑвана bw -БотÑуана bw -বটসওয়ানা bw -Bocvana bw -Μποτσουάνα bw -Bocvano bw -بوتسووانا bw -An Bhotsuáin bw -Botsuana bw -בוצ×ונה bw -बोतà¥à¤¸à¤µà¤¾à¤¨à¤¾ bw -Botsvana bw -Botsvana bw -ボツワナ bw -បុážážŸáŸ’វាណា bw -보츠와나 bw -ບອດສເນີຠbw -Botsvanos bw -BotsvÄna bw -Боцвана bw -БотÑвана bw -ਬੋਟਸਵਾਨਾ bw -Botsuana bw -БотÑвана bw -Botsvana bw -Боцвана bw -Bocvana bw -பாடà¯à®¸à¯à®µà®©à®¾ bw -БотÑвана bw -บอทสวานา bw -Botsvana bw -БотÑвана bw -Боцвана bw -Boswana bw -åšèŒ¨ç“¦çº³ bw -波札那 bw -Belarus by -روسيا البيضاء by -БеларуÑÑŒ by -Ð‘ÐµÐ»Ð°Ñ€ÑƒÑ by -বেলারà§à¦¸ by -Belarusi by -Bjelorusija by -Bielorússia by -BÄ›lorusko by -Belarws by -Hviderusland by -Weißrussland by -ΛευκοÏωσία by -Belorusio by -Valgevene by -بلاروس by -Valkovenäjä by -Hvítarusland by -Bélarus by -Wyt-Rusland by -An Bhealarúis by -Bielorúsia by -בלרוס by -बेलारूस by -Bjelorusija by -Fehéroroszország by -Hvíta-Rússland by -Bielorussia by -ベラルーシ by -áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស by -벨ë¼ë£¨ìФ by -ເບລາລັສ by -Baltarusija by -Baltkrievija by -БелоруÑија by -Цагаан Ð¾Ñ€Ð¾Ñ by -Hviterussland by -Wittrussland by -Wit-Rusland by -Kviterussland by -ਬੇਲਾਰੂਸ by -BiaÅ‚oruÅ› by -Bielorrússia by -БеларуÑÑŒ by -Belarusi by -Vilges-Ruošša by -Bielorusko by -Belorusija by -БелоруÑија by -Belorusija by -I-Belarus by -Vitryssland by -பெலாரூச௠by -БелоруÑиё by -เบลารุส by -БілоруÑÑ–Ñ by -Ð‘ÐµÐ»Ð¾Ñ€ÑƒÑ by -Belaruss by -白俄罗斯 by -白俄羅斯 by -Belize bz -بيليز bz -БÑлізе bz -Белийз bz -বেলিজ bz -Beliz bz -Bel?s bz -Μπελίζε bz -Belizo bz -بلیز bz -An Bheilís bz -בליז bz -बेलिज bz -Belís bz -ベリーズ bz -áž”áŸáž›áž¸áž áŸ’ស bz -벨리즈 bz -ເບລàºà»ˆàº‡àº¡ bz -Belizo bz -Beliza bz -Белизе bz -Ð‘ÐµÐ»Ð¸Ð·Ñ bz -Beliż bz -ਬੀਲੀਜ਼ਿ bz -Белиз bz -Белиз bz -Beliz bz -பெலà¯à®šà®¿à®¯à®®à¯ bz -Белиз bz -เบลไลซ์ bz -Beliz bz -Беліз bz -Белиз bz -伯利兹 bz -比利時 bz -Default C -Standaard C -Ø§ÙØªØ±Ø§Ø¶ÙŠ C -Ön QurÄŸulu C -Па ўмаўчаньні C -По подразбиране C -ডিফলà§à¦Ÿ C -Dre ziouer C -Omissió C -Výchozí C -Rhagosodedig C -Standard C -Standard C -ΠÏοκαθοÏισμένο C -Apriora C -Predeterminado C -Vaikimisi C -Lehenetsia C -Ù¾ÛŒØ´â€ŒÙØ±Ø¶ C -Oletus C -Forsettur C -Par défaut C -Standert C -Réamhshocrú C -Por Omisión C -ברירת מחדל C -डिफ़ॉलà¥à¤Ÿ C -UobiÄajeno C -Standard C -Alapértelmezett C -Standar C -Sjálfgefið C -Predefinito C -標準 C -លំនាំដើម C -기본 C -ຄ່າປະລິàºàº²àº C -Numatyta C -NoklusÄ“tais C -Почетно C -Стандарт C -Normali C -Standard C -Standard C -Standaard C -Standard C -Thuso ya Tshoganetso C -Omission C -ਮੂਲ C -DomyÅ›lnie C -Por Omissão C -Padrão C -Implicit C -По умолчанию C -Mburabuzi C -Standárda C -Å tandardný C -Privzeto C -Подразумевано C -Podrazumevano C -Förval C -à®®à¯à®©à¯à®©à®¿à®°à¯à®ªà¯à®ªà¯ C -Пешфарзӣ C -ค่าปริยาย C -Öntanımlı C -Ğädäti C -Типовий C -Ðндоза C -Mặc định C -Prémetou C -Okwendalo C -默认 C -é è¨­ C -Okwendalo C -Canada ca -Kanada ca -كندا ca -Kanada ca -Канада ca -Канада ca -কানাডা ca -Kanada ca -Kanada ca -Canadà ca -Kanada ca -Kanada ca -Καναδάς ca -Kanado ca -Canadá ca -Kanada ca -Kanada ca -کانادا ca -Kanada ca -Kanada ca -Kanada ca -Ceanada ca -Canadá ca -קנדה ca -कनाडा ca -Kanada ca -Kanada ca -Kanada ca -Kanada ca -カナダ ca -កាណាដា ca -ìºë‚˜ë‹¤ ca -à»àº„ນາດາ ca -Kanada ca -KanÄda ca -Канада ca -Канад ca -Kanada ca -Kanada ca -ਕੈਨੇਡਾ ca -Kanada ca -Canadá ca -Canadá ca -Канада ca -Kanada ca -Kanada ca -Kanada ca -Канада ca -Kanada ca -I-Canada ca -Kanada ca -கனடா ca -Канада ca -à¹à¸„นาดา ca -Kanada ca -Kanada ca -Канада ca -Канада ca -加拿大 ca -加拿大 ca -Cocos (Keeling) Islands cc -Kokos Eilande cc -جزر كوكوس (كيلينغ) cc -КокоÑови оÑтрови cc -কোকোস (কীলিং) দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ cc -Inizi Koko (Keeling) cc -Kokosovo (Keeling) ostrvo cc -Illes Cocos (Keeling) cc -Kokosové ostrovy (Keeling) cc -Ynysoedd y Cocos (Keeling) cc -Cocos/Keeling-Inseln cc -Îήσοι Κόκος (Κήλινγκ) cc -Kokosinsuloj cc -Islas Cocos (Keeling) cc -Kookossaared cc -Cocos Irlak cc -جزایر کوکوس کیلینگ cc -Cookinsaaret cc -ÃŽles Cocos cc -Oileán na gCócónna (Keeling) cc -Illas Cocos (Keeling) cc -××™×™ קוקוס cc -कोकोस (कीलिंग) आइलैंडà¥à¤¸ cc -Cocos (Keeling) Otoci cc -Kókusz-szigetek (Keeling) cc -Kókoseyjar cc -Isole Cocos (Keeling) cc -オーストラリア領ココス島 cc -កោះ Cocos (Keeling) cc -코코스 ì œë„ cc -Kokosu salas cc -ОÑтрови ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc -Cocos (Keeling) арлууд cc -Gżejjer Cocos (Keeling) cc -Kokosøyene cc -Cocos- (Keeling-) Inseln cc -Kokosøyane cc -ਕੋਕੋਸ(ਕਿਨਿੰਗ) ਟਾਪੂ cc -Wyspy Kokosowe (Keelinga) cc -Ilhas Cocos (Keeling) cc -Ilhas Cocos cc -Insulele Cocos (Keeling) cc -КокоÑовые (Килинг) оÑтрова cc -Ibirwa Kokosi cc -Kokosullut cc -Kokosove Ostrovy cc -Kokosovi (Keelingovi) otoki cc -КокоÑова (Килингова) оÑтрва cc -Kokosova (Kilingova) ostrva cc -Kokosöarna cc -கோகோஸ௠(கீலிஙà¯) தீவà¯à®•ள௠cc -Ҷазираи ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc -หมู่เà¸à¸²à¸°à¹‚คคอส (Keeling) cc -Keeling Adaları cc -Kokos (Keeling) Utrawları cc -КокоÑові оÑтрови cc -ÐšÐ¾ÐºÐ¾Ñ (Килинг) Ороллари cc -Iyes Cocos cc -科科斯群岛 cc -å¯å¯æ–¯ç¾¤å³¶ cc -Congo, The Democratic Republic of the cd -Kongo, Demokratiese republiek van die cd -ДÑÐ¼Ð°ÐºÑ€Ð°Ñ‚Ñ‹Ñ‡Ð½Ð°Ñ Ð ÑÑпубліка Конга cd -ДР Конго cd -কঙà§à¦—োর গণতানà§à¦¤à§à¦°à¦¿à¦• পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦° cd -Kongo, Demokratska republika cd -Congo, República Democràtica del cd -Kongo cd -Congo, Gweriniaeth Democrataidd y cd -Congo, den demokratiske republik cd -Kongo, Republik cd -Κονγκό, ΔημοκÏατία του cd -Kongo, la Demokratia Respubliko de la cd -Congo, República democrática del cd -Kongo (DV) cd -Kongoko Errepublika Demokratikoa cd -Kongon demokraattinen tasavalta cd -République Démocratique du Congo cd -Kongo, de democratische republyk van de cd -Poblacht Dhaonlathach an Chongó cd -Congo, República Democrática do cd -קונגו, הרפובליקה הדמוקרטית של cd -डेमोकà¥à¤°à¥‡à¤Ÿà¤¿à¤• रिपबà¥à¤²à¤¿à¤• ऑफ कॉगो cd -Kongói Demokratikus Köztársaság cd -Kongó, Austur cd -Congo, Repubblica Democratica del cd -コンゴ,民主共和国 cd -សាធារណរដ្ឋ​ប្រជាធិបážáŸáž™áŸ’យ​កុងហ្គោ cd -Kongo demokratinÄ— respublika cd -Kongo demokrÄtiskÄ republika cd -Конго, ДемократÑка Република на cd -Kongo (RD) cd -Kongo cd -Kongo (De demokraatsche Republiek) cd -Congo, Democratische republiek cd -Kongo cd -ਕਾਂਗੋ, ਲੋਕਤੰਤਰੀ ਗਣਰਾਜ cd -Republika Demokratyczna Kongo cd -Congo, República Democrática do cd -República Democrática do Congo cd -Congo, Republica Democrată cd -ДемократичеÑÐºÐ°Ñ Ð ÐµÑпублика Конго cd -Kongo, Repubulika Iharanira Demokarasi ya cd -Kongo cd -Demokratická Republika Kongo cd -Kongo, demokratiÄna republika cd -Конго, ДемократÑка Република cd -Kongo, Demokratska Republika cd -Demokratiska republiken Kongo cd -கானà¯à®•ோ, கà¯à®Ÿà®¿à®¯à®°à®šà¯ cd -Ҷумҳурии демократии Ҳонконг cd -สาธารณรัà¸à¸›à¸£à¸°à¸Šà¸²à¸˜à¸´à¸›à¹„ตยคองโภcd -Demokratik Kongo Cumhuriyeti cd -Kongo, Demokrat Cömhüriäte cd -Конго, демократична реÑпубліка cd -Конго Демократик РеÑпубликаÑи cd -Congo, republike democratike cd -刚果民主共和国 cd -剛果民主共和國 cd -Central African Republic cf -Sentrale Afrika Republiek cf -جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى cf -ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка cf -ЦÐР cf -মধà§à¦¯ আফà§à¦°à¦¿à¦•ান রিপাবলিক cf -Republik centrafricaine cf -CentralnoafriÄka Republika cf -República Centro Africana cf -StÅ™edoafrická republika cf -Gweriniaeth Canolig Affrica cf -Central-afrikanske Republik cf -Zentralafrikanische Republik cf -ΔημοκÏατία ΚεντÏικής ΑφÏικής cf -Mezafrika Respubliko cf -República Centroafricana cf -Kesk-Aafrika Vabariik cf -Afrika Erdiko Errepublika cf -جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی cf -Keski-Afrikan tasavalta cf -République centrafricaine cf -Sintraal Afrikaanse Republyk cf -Poblacht na hAfraice Láir cf -República Centro Africana cf -הרפובליקה ×”×פריקנית התיכונה cf -सेंटà¥à¤°à¤² अफà¥à¤°à¥€à¤•न रिपबà¥à¤²à¤¿à¤• cf -Centralna AfriÄka Republika cf -Közép-Afrikai Köztársaság cf -Mið-Afríkulýðveldið cf -Repubblica Centrafricana cf -中央アフリカ共和国 cf -សាធារណរដ្ឋ​អាហ្វ្រិក​កណ្ដាល cf -중앙 아프리카 공화국 cf -ໂດມິນິàºàº±àº™ cf -CentrinÄ—s Afrikos Respublika cf -CentrÄlÄfrikas republika cf -ЦентралноафриканÑка Република cf -Төв африкын ард ÑƒÐ»Ñ cf -Repubblika ÄŠentrali Afrikana cf -Den sentralafrikanske republikk cf -Zentraalafrikaansche Republiek cf -Centraal Afrikaanse Republiek cf -Den sentralafrikanske republikken cf -ਕੇਂਦਰੀ ਅਫਰੀਕੀ ਗਣਰਾਜ cf -Republika Åšrodkowej Afryki cf -República Central Africana cf -República da Ãfrica Central cf -Republica Centrafricană cf -Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика cf -Repubulika ya Santara Afurika cf -GuovddášafrihkálaÅ¡ republihkka cf -Stredoafrická Republika cf -CentralnoafriÅ¡ka republika cf -Централноафричка Република cf -CentralnoafriÄka Republika cf -Centralafrikanska Republiken cf -மைய ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®• கà¯à®Ÿà®¿à®¯à®°à®šà¯ cf -Ҷумҳурии Ðфриқои Марказӣ cf -สาธารณรัà¸à¸­à¸±à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡ cf -Orta Afrika Cumhuriyeti cf -Üzäk Afrika Cömhüriäte cf -Центральна африканÑька реÑпубліка cf -Марказий Ðфрика РеÑпубликаÑи cf -Cá»™ng hoà Trung Phi cf -Cintrafrike cf -中éžå…±å’Œå›½ cf -多明尼加共和國 cf -Congo cg -Konsole cg -الكونغو cg -Конга cg -Конго cg -কঙà§à¦—à§‹ cg -Kongo cg -Kongo cg -Kongo cg -Kongo cg -Κονγκό cg -Kongo (Brazavila) cg -Kongo cg -Kongo cg -Ú©Ù†Ú¯Ùˆ cg -Kongo cg -Kongo cg -Congó cg -קונגו cg -कोंगो cg -Kongo cg -Kongó cg -Kongó, Vestur cg -コンゴ cg -កុងហ្គោ cg -콩고 cg -ຄອນໂà»àºŠàº¥ cg -Kongo cg -Kongo cg -Конго cg -Конго cg -Kongo cg -Kongo-Brazaville cg -Kongo cg -Kongo-Brazaville cg -ਕਾਂਗੋ cg -Kongo cg -Конго cg -Kongo cg -Kongo cg -Kongo cg -Kongo cg -Конго cg -Kongo cg -Kongo cg -கானà¯à®•ோ cg -Конго cg -คองโภcg -Kongo cg -Kongo cg -Конго cg -Конго cg -刚果 cg -剛果 cg -Switzerland ch -Switserland ch -سويسرا ch -İsveçrÉ™ ch -ШвÑÐ¹Ñ†Ð°Ñ€Ñ‹Ñ ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch -সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦£à§à¦¡ ch -Suis ch -Å vicarska ch -Suïssa ch -Å výcarsko ch -Y Swistir ch -Schweiz ch -Schweiz ch -Ελβετία ch -Svislando ch -Suiza ch -Å veits ch -Suitza ch -سوییس ch -Sveitsi ch -Suisse ch -Switserlân ch -An Eilvéis ch -Suíza ch -שוייץ ch -सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤°à¤²à¥ˆà¤‚ड ch -Å vicarska ch -Svájc ch -Swiss ch -Sviss ch -Svizzera ch -スイス ch -ស្វ៊ីស ch -스위스 ch -ສະວິສເຊີà»àº¥àº™ ch -Å veicarija ch -Å veice ch -Швајцарија ch -Швецарь ch -Svizzera ch -Sveits ch -Swiez ch -Zwitserland ch -Sveits ch -Suissa ch -ਸਵਿਟਜ਼ਰਲੈਂਡ ch -Szwajcaria ch -Suíça ch -Suíça ch -ElveÅ£ia ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch -Swazilande ch -Å veica ch -Å vajÄiarsko ch -Å vica ch -ШвајцарÑка ch -Å vajcarska ch -I-Switzerland ch -Schweiz ch -சà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯ ch -Свитзерланд ch -สวิสเซอร์à¹à¸¥à¸™à¸”์ ch -İsviçre ch -İswiçrä ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ñ–Ñ ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch -Thuỵ SÄ© ch -Swisse ch -瑞士 ch -瑞士 ch -Cote d'ivoire ci -ساحل العاج ci -Бераг Слановай КоÑьці ci -Кот Дивоар ci -Aod an Olifant ci -Obala SlonovaÄe ci -Costa d'ivori ci -PobÅ™eží slonoviny ci -Y Traeth Ifori ci -Elfenbenskysten ci -Ακτή Î•Î»ÎµÏ†Î±Î½Ï„Î¿ÏƒÏ„Î¿Ï ci -Eburio ci -Costa de Marfil ci -Cote d'Ivoire ci -Boli kosta ci -Ú©ÙØªÙ دیوÙیر ci -Côte d'Ivoire ci -Ivoorkust ci -An Cósta Eabhair ci -कोट डि'वॉरे ci -Baci kocke ci -Elefántcsontpart ci -Fílabeinsströndin ci -Costa d'Avorio ci -コートジボアール ci -កូដឌីវáŸážš ci -코트디부아르 ci -ປ່ອàºàº«àº¡àº²àºàºàº°àº¥àº­àº ci -KotdivuÄra ci -Брегот на Слоновата КоÑка ci -Kosta tal-Avorju ci -Elfenbenskysten ci -Elfenbeenküst ci -Ivoorkust ci -Elfenbeinskysten ci -ਕਾਂਟੋ ਡੀਵੋਇਰੀ ci -Wybrzeże KoÅ›ci SÅ‚oniowej ci -Costa do Marfim ci -Coasta de Azur ci -Кот Д'Ивуар ci -Kote divuware ci -ElfenÄalánriddu ci -SlonokoÅ¡Äena obala ci -Обала Ñлоноваче ci -Obala slonovaÄe ci -Elfenbenskusten ci -Соҳили Оҷ ci -อ่าวไอวอรี ci -Кот Д'Івуар ci -Кот д'Ивуар ci -Bá» biển ngà ci -Coisse d' Ivwere ci -科特迪瓦 ci -象牙海岸 ci -Cook islands ck -Cook Eilande ck -جزر كوك ck -ÐÑтравы Кука ck -ОÑтрови Кук ck -কà§à¦• দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ck -Inizi Kook ck -Kukova ostrva ck -Illes Cook ck -Cookovy ostrovy ck -Ynysoedd Cook ck -Cook-øerne ck -Cook-Inseln ck -Îησιά Κουκ ck -Kukinsuloj ck -Islas Cook ck -Cooki saared ck -Cook Irlak ck -جزایر Ú©ÙˆÚ© ck -Cooksaaret ck -ÃŽles Cook ck -Oileáin Chook ck -Illas Cook ck -××™×™ קוק ck -कà¥à¤• आइलैंड ck -Cook otoci ck -Cook-szigetek ck -Cooks-eyjar ck -Isole Cook ck -ニュージーランド自治領クック諸島 ck -កោះ Cook ck -ì¿¡ ì œë„ ck -ຄຸàºàºàºµà»‰ ck -Kuko salų ck -Kuka salas ck -Кукови оÑтрови ck -Cook арлууд ck -Gżejjer Cook ck -Cookøyene ck -Cookinseln ck -Cook Eilanden ck -Cookøyane ck -ਕà©à©±à¨• ਟਾਪੂ ck -Wyspy Cooka ck -Ilhas Cook ck -Ilhas Cook ck -Insulele Cook ck -ОÑтрова Кука ck -Ibirwa bya Kuke ck -Cooksullut ck -Cookove ostrovy ck -Cookovi otoki ck -Кукова оÑтрва ck -Kukova ostrva ck -Cooköarna ck -கà¯à®•௠தீவ௠ck -Ҷазираи Кук ck -หมู่เà¸à¸²à¸°à¸„ุภck -Cook Adaları ck -Kok Utrawları ck -ОÑтрови Кука ck -Кук Ороллари ck -Iyes Cook ck -库克群岛 ck -庫克群島 ck -Chile cl -Chilië cl -تشيلي cl -Åžili cl -Чылі cl -Чили cl -চিলি cl -ÄŒile cl -Xile cl -Tsile cl -Χιλή cl -Ĉilio cl -TÅ¡iili cl -Txile cl -شیلی cl -Chili cl -Chili cl -An tSile cl -צ'ילה cl -चिली cl -ÄŒile cl -Chili cl -Cile cl -ãƒãƒª cl -ឈីលី cl -ì¹ ë ˆ cl -ຊີລີ cl -ÄŒilÄ— cl -Čīle cl -Чиле cl -Чили cl -ÄŠile cl -Chili cl -ਚਿੱਲੀ cl -Cile cl -Чили cl -Shili cl -ÄŒile cl -ÄŒile cl -Чиле cl -ÄŒile cl -I-Chile cl -சிலி cl -Чилли cl -ชิลี cl -Åžili cl -Çili cl -Чилі cl -Чили cl -Chi lê cl -Tchili cl -智利 cl -智利 cl -Cameroon cm -Kameroon cm -الكاميرون cm -КамÑрун cm -Камерун cm -কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨ cm -Kameroun cm -Kamerun cm -Camerun cm -Kamerun cm -Y Camer?n cm -Cameroun cm -Kamerun cm -ΚαμεÏοÏν cm -Kameruno cm -Camerún cm -Kamerun cm -Kamerun cm -کامرون cm -Kamerun cm -Cameroun cm -Kameroen cm -Camarún cm -Camerún cm -קמרון cm -कैमरून cm -Kamerun cm -Kamerun cm -Kamerún cm -Camerun cm -カメルーン cm -កាមáŸážšáž¼áž“ cm -카메룬 cm -ຕາລາງງານ - K cm -KamerÅ«no cm -KamerÅ«na cm -Камерун cm -Камерун cm -Kamerun cm -Kamerun cm -Kamerun cm -Cameroen cm -Kamerun cm -ਕੈਮਰੂਨ cm -Kamerun cm -Camarões cm -Camarões cm -Camerun cm -Камерун cm -Kameruni cm -Kamerun cm -Komerun cm -Kamerun cm -Камерун cm -Kamerun cm -Kamerun cm -கமீரூன௠cm -Камерун cm -คาเมรูน cm -Kamerun cm -Kameroon cm -Камерун cm -Камерун cm -Camrone cm -喀麦隆 cm -喀麥隆 cm -China cn -الصين cn -Çin cn -Кітай cn -Китай cn -চীন cn -Sina cn -Kina cn -Xina cn -Čína cn -Tseina cn -Kina cn -Κίνα cn -Ĉinujo cn -Hiina cn -Txina cn -چین cn -Kiina cn -Kina cn -Chine cn -An tSín cn -סין cn -चीन cn -Kina cn -Kína cn -Cina cn -Kína cn -Cina cn -中国 cn -áž…áž·áž“ cn -중국 cn -ຈີນ cn -Kinija cn -Ķīna cn -Кина cn -Ð¥Ñтад cn -ÄŠina cn -Kina cn -Kina cn -Xina cn -ਚੀਨ cn -Chiny cn -Китай cn -Ubushinwa cn -Kiinná cn -Čína cn -Kitajska cn -Кина cn -Kina cn -I-China cn -Kina cn -சீனா cn -Хитой cn -จีน cn -Çin cn -Çin cn -Китай cn -Хитой cn -Trung Quốc cn -Chine cn -中国 cn -中國 cn -Colombia co -Colombië co -كولمبيا co -ÐšÐ°Ð»ÑŽÐ¼Ð±Ñ–Ñ co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -কলোমà§à¦¬à¦¿à§Ÿà¦¾ co -Kolumbi co -Kolumbija co -Colòmbia co -Kolumbie co -Kolumbien co -Κολομβία co -Kolumbio co -Kolumbia co -Kolonbia co -کلمبیا co -Kolumbia co -Colombie co -Columbia co -An Cholóim co -Colómbia co -קולומביה co -कोलमà¥à¤¬à¤¿à¤¯à¤¾ co -Kolumbija co -Kolumbia co -Kólumbía co -コロンビア co -កូឡុំប៊ី co -콜롬비아 co -ໂຄລຳເບີຠco -Kolumbija co -Kolumbija co -Колумбија co -Колумб co -Kolumbja co -Kolumbien co -Columbia co -ਕੋਲੰਬੀਆ co -Kolumbia co -Colômbia co -Colômbia co -Columbia co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -Kolombiya co -Kolombia co -Kolumbia co -Kolumbija co -Колумбија co -Kolumbija co -I-Colombia co -கொலமà¯à®ªà®¿à®¯à®¾ co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -โคลัมเบีย co -Kolombiya co -Kolombia co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ñ–Ñ co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -Colombeye co -Columbia co -哥伦比亚 co -哥倫比亞 co -Costa Rica cr -كوستاريكا cr -КоÑта Рыка cr -КоÑта Рика cr -কোসà§à¦Ÿà¦¾ রিকা cr -Kosta Rika cr -Kostarika cr -Kostarika cr -Κόστα Ρίκα cr -Kostariko cr -کاستاریکا cr -Kosta Rika cr -Cósta Ríce cr -קוסטה ריקה cr -कोसà¥à¤Ÿà¤¾ रिका cr -Kosta rika cr -Kostaríka cr -コスタリカ cr -កូស្ážáž¶ážšáž¸áž€áž¶ cr -코스타 리카 cr -ໂຄເອເທີຠcr -Kosta Rika cr -Kostarika cr -КоÑта Рика cr -КоÑта Рика cr -ਕੋਸਟਾ ਰੀਕਾ cr -Kostaryka cr -КоÑта-Рика cr -Kosita Rika cr -Kostarika cr -Kostarika cr -КоÑтарика cr -Kostarika cr -I-Costa Rica cr -கோஸà¯à®Ÿà®¾ ரிகா cr -КоÑта Рика cr -คอสตาริà¸à¸² cr -Kosta Rika cr -Kosta Rika cr -КоÑта-Ріка cr -КоÑта Рика cr -哥斯达黎加 cr -哥斯大黎加 cr -Cuba cu -Kuba cu -كوبا cu -Куба cu -Куба cu -কিউবা cu -Kuba cu -Kuba cu -Kuba cu -Ciwba cu -Kuba cu -ΚοÏβα cu -Kubo cu -Kuuba cu -Kuba cu -کوبا cu -Kuuba cu -Kuba cu -Cúba cu -קובה cu -कà¥à¤¯à¥‚बा cu -Kuba cu -Kuba cu -Kúba cu -キュームcu -គុយបា cu -ì¿ ë°” cu -ເàºàº¡à»„ພ່ cu -Kuba cu -Kuba cu -Куба cu -Куба cu -Kuba cu -Kuba cu -ਕਿਊਬਾ cu -Kuba cu -Куба cu -Kuba cu -Kuba cu -Kuba cu -Куба cu -Kuba cu -I-Cuba cu -Kuba cu -கியà¯à®ªà®¾ cu -Куба cu -คิวบา cu -Küba cu -Kuba cu -Куба cu -Куба cu -å¤å·´ cu -å¤å·´ cu -Cape Verde cv -Kaap Verde cv -كاب Ùيردي cv -Кабо Верде cv -কেপ ভারডি cv -Penn Verde cv -Zelenortska ostrva cv -Cap Verd cv -Kapverdy cv -Cape Ferde cv -Kapverdiske øer cv -Cap Verdische Inseln cv -ΠÏάσινο ΑκÏωτήÏιο cv -Kapo-Verdo cv -Cabo Verde cv -Roheneeme saared cv -Cabo Verde cv -کیپ‌ورده cv -Kap Verde cv -Cap vert cv -Kaap Verdië cv -Rinn Verde cv -Cabo Verde cv -×›×£ וורדה cv -कैप वरà¥à¤¡à¥‡ cv -Zöldfoki-szigetek cv -Grænhöfðaeyjar cv -Capo Verde cv -カーãƒãƒ™ãƒ«ãƒ‡ cv -កាបវែរ cv -ì¹´ë³´ë² ë¥´ë° cv -ເàºàº¡à»„ພ່ cv -Kabaverde cv -Кејп Верде cv -Капе Ð’ÑÑ€Ð´Ñ cv -Kapp Verde cv -Kap Verde cv -Kaap Verdië cv -Kapp Verde cv -ਕੇਪ ਵੀਰਡੀ cv -Cabo Verde cv -Cabo Verde cv -Capul Verde cv -Кабо-Верде cv -Kapu Veri cv -Кејп Верд cv -Kejp Verd cv -Kap Verde cv -கேப௠வெரà¯à®Ÿà¯ cv -Димоғи Верде cv -à¹à¸«à¸¥à¸¡à¹€à¸§à¸­à¸£à¹Œà¸”ี cv -Kape Verde cv -Кабо-Верде cv -Кейп Верде cv -Cap Vert cv -佛得角 cv -ç¶­å¾·è§’ cv -Christmas Island cx -Kersfees Eiland cx -جزر الكريسماس cx -ОÑтров РождеÑтво cx -কà§à¦°à¦¿à¦¸à§à¦Ÿà¦®à¦¾à¦¸ দà§à¦¬à§€à¦ª cx -Inizi Nedeleg cx -BožiÄno ostrvo cx -Illa de Pascua cx -VánoÄní ostrovy cx -Ynys y Nadolig cx -Juleøen cx -Weihnachtsinsel cx -Îήσος των ΧÏιστουγέννων cx -Kristnaskinsulo cx -Islas Christmas cx -Jõulusaar cx -Eguberri Irla cx -جزایر کریسمس cx -Joulusaari cx -ÃŽle de Noël cx -Christmas Eilân cx -Oileán na Nollag cx -Illas Christmas cx -××™×™ כריסטמס cx -कà¥à¤°à¤¿à¤¸à¤®à¤¸ आइलैंड cx -UskrÅ¡nji otoci cx -Karácsony-szigetek cx -Jólaey cx -Isola Christmas cx -クリスマス諸島 cx -កោះ Christmas cx -í¬ë¦¬ìŠ¤ë§ˆìŠ¤ 섬 cx -ຄິດສະຕອລ cx -KalÄ—dų salos cx -ZiemassvÄ“tku salas cx -ВелигденÑки ОÑтрови cx -КриÑÑ‚Ð¼Ð°Ñ Ð°Ñ€Ð»ÑƒÑƒÐ´ cx -Christmasøya cx -Wiehnachtsinsel cx -Christmasøya cx -ਕà©à¨°à¨¿à¨¸à¨®à¨¿à¨¸ ਟਾਪੂ cx -Wyspy Bożego Narodzenia cx -Ilhas Natal cx -Ilhas do Natal cx -Insulele Christmas cx -ОÑтров РождеÑтва cx -Ikirwa cya Noheli cx -Christmassuollu cx -VianoÄné Ostrovy cx -BožiÄni otok cx -Божићно оÑтрво cx -Božićno ostrvo cx -Julön cx -கிரà¯à®¸à¯à®¤à¯à®®à®¸à¯ தீவ௠cx -Ҷазираи КриÑÑ‚Ð¼Ð°Ñ cx -เà¸à¸²à¸°à¸„ริสต์มาส cx -Yılbaşı Adaları cx -Christmas Utrawları cx -ОÑтрів Різдва cx -КриÑÐ¼Ð°Ñ ÐžÑ€Ð¾Ð»Ð¸ cx -Äảo giáng sinh cx -圣诞岛 cx -è–誕島 cx -Cyprus cy -Siprus cy -قبرص cy -Кіпр cy -Кипър cy -সাইপà§à¦°à¦¾à¦¸ cy -Chipr cy -Kipar cy -Xipre cy -Kypr cy -Cypern cy -Zypern cy -ΚÏÏ€Ïος cy -Cipro cy -Chipre cy -Küpros cy -Txipre cy -قبرس cy -Kypros cy -Chypre cy -An Chipir cy -Chipre cy -קפריסין cy -साइपà¥à¤°à¤¸ cy -Cipar cy -Ciprus cy -Kýpur cy -Cipro cy -キプロス cy -ស៊ីពរ០cy -키프로스 cy -ບີບອັດ cy -Kipro cy -Kipra cy -Кипар cy -Ð¡Ð¸Ð¿Ñ€ÑƒÑ cy -ÄŠipru cy -Kypros cy -Zypern cy -Kypros cy -ਕਿਉਪਰਸ cy -Cypr cy -Chipre cy -Chipre cy -Cipru cy -Кипр cy -Shipure cy -Kypros cy -Ciper cy -Кипар cy -Kipar cy -Cypern cy -சிபà¯à®°à®¸à¯ cy -Кипр cy -ไซปรัส cy -Kıbrıs cy -Kiper cy -Кіпр cy -Кипр cy -Síp cy -Chîpe cy -塞浦路斯 cy -賽普勒斯 cy -Czechia cz -Czechië cz -التشيك cz -Çex Respublikası cz -ЧÑÑ…Ñ–Ñ cz -Чешка република cz -চেকিয়া cz -Tchekia cz -ÄŒeÅ¡ka cz -Txèquia cz -ÄŒesko cz -Y Weriniaeth Siec cz -Tjekkiet cz -Tschechien cz -Τσεχία cz -ĈeÄ¥io cz -República Checa cz -TÅ¡ehhi cz -Txekia cz -Ú†Ú© cz -Tsekki cz -République tchèque cz -Tsjechië cz -Poblacht na Seice cz -Chéquia cz -צ'×›×™×” cz -चेक cz -ÄŒeÅ¡ka cz -Csehország cz -Tékkland cz -Repubblica Ceca cz -ãƒã‚§ã‚³ cz -ឆáŸáž€ cz -ì²´ì½” cz -ÄŒekija cz -ÄŒehija cz -Чешка cz -Чехиа cz -Cżekia cz -Tsjekkia cz -Tschechien cz -Tsjechië cz -Tsjekkia cz -Chèquia cz -ਚੈੱਚੀਆ cz -Czechy cz -República Checa cz -República Tcheca cz -Cehia cz -Ð§ÐµÑ…Ð¸Ñ cz -Ceke cz -ÄŒeahkka cz -ÄŒesko cz -ÄŒeÅ¡ka cz -Чешка cz -ÄŒeÅ¡ka cz -I-Czechia cz -Tjeckien cz -செகà¯à®¯à®¾ cz -Ð§ÐµÑ…Ð¸Ñ cz -เชค cz -Çek Cumhuriyeti cz -Çexiä cz -Ð§ÐµÑ…Ñ–Ñ cz -Ð§ÐµÑ…Ð¸Ñ cz -Séc cz -Tchekeye cz -æ·å…‹ cz -æ·å…‹ cz -Germany de -Duitsland de -ألمانيا de -Almaniya de -ÐÑмеччына de -Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de -জারà§à¦®à¦¾à¦¨à¦¿ de -Alamagn de -NjemaÄka de -Alemanya de -NÄ›mecko de -Yr Almaen de -Tyskland de -Deutschland de -ΓεÏμανία de -Germanio de -Alemania de -Saksamaa de -Alemania de -آلمان de -Saksa de -Týskland de -Allemagne de -Dûtslân de -An Ghearmáin de -Alemaña de -גרמניה de -जरà¥à¤®à¤¨à¥€ de -NjemaÄka de -Németország de -Jerman de -Þýskaland de -Germania de -ドイツ de -អាល្លឺម៉ង់ de -ë…ì¼ de -ເàºàº¥àº¥àº°àº¡àº±àº™àº™àºµ de -Vokietija de -VÄcija de -Германија de -Герман de -Jerman de -Ä ermanja de -Tyskland de -Düütschland de -Duitsland de -Tyskland de -Alemanya de -ਜਰਮਨੀ de -Niemcy de -Alemanha de -Alemanha de -Germania de -Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de -Ubudage de -Duiska de -Nemecko de -NemÄija de -Ðемачка de -NemaÄka de -I-Germany de -Tyskland de -ஜெரà¯à®®à®©à®¿ de -Олмон de -เยอรมันนี de -Almanya de -Almania de -Ðімеччина de -ÐžÐ»Ð¼Ð¾Ð½Ð¸Ñ de -Äức de -Almagne de -德国 de -德國 de -IJalimani de -Djibouti dj -جيبوتي dj -Джыбуці dj -Джибути dj -জিবৌতি dj -Äibuti dj -Džibuti dj -Jib?ti dj -Dschibuti dj -Τζιμπουτί dj -Äœibutio dj -جیبوتی dj -Xibuti dj -×’'יבוטי dj -डिबौती dj -Džibuti dj -Dzsibuti dj -Djíbútí dj -Gibuti dj -ジブムdj -ហ្ស៊ីបូទី dj -지부티 dj -ພັດພາ dj -Džibutis dj -Džibutija dj -Ðибути dj -Жибут dj -DÄ¡ibuti dj -Dschibouti dj -ਡਜੀਬà©à¨‰à¨Ÿà©€ dj -Dżibuti dj -Djibuti dj -Djibuti dj -Джибути dj -Jibuti dj -Djibuhti dj -Džibuty dj -Džibuti dj -Ðибути dj -Džibuti dj -I-Djibouti dj -டிஜிபொடி dj -Ҷибойти dj -จิบูติ dj -Cibuti dj -Djibuti dj -Джібуті dj -Жибути dj -å‰å¸ƒæ dj -å‰å¸ƒåœ° dj -Denmark dk -Denemarke dk -الدنمارك dk -Danimarka dk -Ð”Ð°Ð½Ñ–Ñ dk -Ð”Ð°Ð½Ð¸Ñ dk -ডেনমারà§à¦• dk -Danmark dk -Danska dk -Dinamarca dk -Dánsko dk -Denmarc dk -Danmark dk -Dänemark dk -Δανία dk -Danlando dk -Dinamarca dk -Taani dk -Danimarka dk -دانمارک dk -Tanska dk -Danmark dk -Danemark dk -Denemarken dk -An Danmhairg dk -Dinamarca dk -דנמרק dk -डेनमारà¥à¤• dk -Danska dk -Dánia dk -Danmörk dk -Danimarca dk -デンマーク dk -ដាណឺម៉ាក dk -ë´ë§ˆí¬ dk -ເດນມາຠdk -Danija dk -DÄnija dk -ДанÑка dk -Дани dk -Danimarka dk -Danmark dk -Dänmark dk -Denemarken dk -Danmark dk -Dinamarca dk -ਡੈੱਨਮਾਰਕ dk -Dania dk -Dinamarca dk -Dinamarca dk -Danemarca dk -Ð”Ð°Ð½Ð¸Ñ dk -Danimarike dk -Dánmárku dk -Dánsko dk -Danska dk -ДанÑка dk -Danska dk -I-Denmark dk -Danmark dk -டெனà¯à®®à®¾à®°à¯à®•௠dk -Денмарк dk -เดนมาร์ภdk -Danimarka dk -Dania dk -Ð”Ð°Ð½Ñ–Ñ dk -Ð”Ð°Ð½Ð¸Ñ dk -Äan Mạch dk -DaenmÃ¥tche dk -丹麦 dk -丹麥 dk -Dominica dm -Dominisië dm -دومينيكا dm -Дамініка dm -Доминика dm -ডমিনিকা dm -Dominik dm -Dominika dm -Dominika dm -Dominikanische Republik dm -Îτομίνικα dm -Dominiko dm -دومینیکا dm -Dominique dm -Doiminice dm -דומינקה dm -डोमिनिका dm -Dominika dm -Dóminíka dm -ドミニカ dm -ដូមីនីកា dm -ë„미니카 dm -ໂລມາເນີຠdm -Dominika dm -Dominika dm -Доминика dm -Доминика dm -Dominika dm -ਡੋਮਾਨੀਕਾ dm -Dominika dm -Dominicana dm -Доминика dm -Dominikani dm -Dominikánsko dm -Dominikanska republika dm -Доминика dm -Dominika dm -டொமினிகா dm -Доминика dm -โดมินาà¸à¸±à¸™ dm -Dominik dm -Dominika dm -Домініка dm -Доминика dm -Dominike dm -多米尼加 dm -多明尼加 dm -Dominican Republic do -Dominikaanse Republiek do -جمهورية الدومينيكان do -Dominik Respublikası do -ДамініканÑÐºÐ°Ñ Ð ÑÑпубліка do -ДоминиканÑка република do -ডমিনিকান রিপাবলিক do -Republik Dominikan do -Dominikanska Republika do -República Dominicana do -Dominikánská republika do -Gweriniaeth Dominica do -Dominikanske Republik do -Dominikanische Republik do -Δομινικανή ΔημοκÏατία do -Dominika Respubliko do -República Dominicana do -Dominikaani Vabariik do -Dominikar Errepublika do -جمهوری دامینیکن do -Dominikaaninen tasavalta do -République dominicaine do -Dominicaanse Republyk do -An Phoblacht Dhoiminiceach do -República Dominicana do -הרפובליקה הדומיניקנית do -डोमिनिकन रिपबà¥à¤²à¤¿à¤• do -Dominikanska Republika do -Dominikai Köztársaság do -Republik Dominika do -Dóminíska lýðveldið do -Repubblica Dominicana do -ドミニカ共和国 do -សាធារណរដ្ឋ​ដូមីនីកែន do -ë„미니카 공화국 do -ໂດມິນີàºàº±àº™ do -Dominikos Respublika do -Dominikas Republika do -ДоминиканÑка Република do -Домникан ард ÑƒÐ»Ñ do -Repubblika Dominikana do -Den dominikanske republikk do -Dominikaansche Republiek do -Dominicaanse Republiek do -Den dominikanske republikken do -Republica Dominicana do -ਡੋਮਾਨੀਕਾ ਗਣਰਾਜ do -Dominikana do -República Dominicana do -República Dominicana do -Republica Dominicană do -ДоминиканÑÐºÐ°Ñ Ñ€ÐµÑпублика do -Repubulika Dominikani do -DominihkalaÅ¡ republihkka do -Dominikánska republika do -Dominikanska republika do -ДоминиканÑка Република do -Dominikanska Republika do -I-Dominican Republic do -Dominikanska republiken do -டொமினிகà¯à®•ன௠கà¯à®Ÿà®¿à®¯à®°à®šà¯ do -Ҷумҳурии Доминика do -สาธารณรัà¸à¹‚ดมินิà¸à¸±à¸™ do -Dominik Cumhuriyeti do -Dominika Cömhüriäte do -ДомініканÑька реÑпубліка do -Доминикана РеÑпубликаÑи do -Muvhuso wa Dominican do -Cá»™ng hoà Dominican do -Republike Dominikinne do -IRepublic yeDominican do -多米尼加共和国 do -多明尼加共和國 do -Algeria dz -Algerië dz -الجزائر dz -Ðльжыр dz -Ðлжир dz -অà§à¦¯à¦¾à¦²à¦œà§‡à¦°à¦¿à§Ÿà¦¾ dz -Aljeri dz -Alžir dz -Algèria dz -Alžírsko dz -Algeriet dz -Algerien dz -ΑλγεÏία dz -Algerio dz -Argelia dz -Alžeeria dz -الجزیره dz -Algérie dz -Algerije dz -An Ailgéir dz -Alxéria dz -×לג'יריה dz -अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾ dz -Alžir dz -Algéria dz -Alsír dz -アルジェリア dz -អាល់ហ្សáŸážšáž¸ dz -알제리 dz -ບັນàºàº²à»€àº¥àºµàº dz -Alžyras dz -Alžīrija dz -Ðлжир dz -Ðлжер dz -AlÄ¡erija dz -Algerie dz -Algerien dz -Algerije dz -Algerie dz -ਅਲਜੀਰੀਆ dz -Algieria dz -Argélia dz -Argélia dz -Ðлжир dz -Aligeriya dz -Alžírsko dz -Alžirija dz -Ðлжир dz -Alžir dz -I-Algeria dz -Algeriet dz -அலà¯à®œà®¿à®°à®¿à®¯à®¾ dz -Ðлҷазоир dz -อัลจีเรีย dz -Aljır dz -Ðлжир dz -Жазоир dz -Aldjereye dz -阿尔åŠåˆ©äºš dz -阿爾åŠåˆ©äºž dz -Equador ec -Ewenaar ec -الإكوادور ec -Ekvator ec -Эквадор ec -Еквадор ec -ইকà§à§Ÿà§‡à¦¡à¦° ec -Ecuador ec -Ekvador ec -Ekvádor ec -Ecwador ec -Ecuador ec -ΙσημεÏινός ec -Ekvadoro ec -Ecuador ec -Ekuador ec -اکوادور ec -Équateur ec -Eacuadór ec -Ecuador ec -×קוודור ec -इकà¥à¤µà¥‡à¤¡à¥‰à¤° ec -Ekvador ec -Ecuador ec -Ekvador ec -Ecuador ec -エクアドル ec -អáŸáž€áŸ’វាឌáŸážš ec -ì—ì½°ë„르 ec -ເອàºà»àº”à» ec -Ekvadoras ec -Ekvadora ec -Еквадор ec -Эквадор ec -Ekwador ec -Ecuador ec -Ecuador ec -Ecuador ec -à¨à¨•ਾਵੇਡਰ ec -Ekwador ec -Ecuador ec -Эквадор ec -Ekwateri ec -Ekvador ec -Ekvádor ec -Ekvador ec -Еквадор ec -Ekvador ec -I-Equador ec -ஈகà¯à®µà¯†à®Ÿà®¾à®°à¯ ec -Эквадор ec -เอà¸à¸§à¸²à¸”อร์ ec -Ekvator ec -Еквадор ec -Эквадор ec -EcwÃ¥teur ec -厄瓜多尔 ec -厄瓜多 ec -Estonia ee -Estlandies ee -استونيا ee -Estoniya ee -ЭÑÑ‚Ð¾Ð½Ñ–Ñ ee -ЕÑÑ‚Ð¾Ð½Ð¸Ñ ee -à¦à¦¸à§à¦Ÿà§‹à¦¨à¦¿à§Ÿà¦¾ ee -Estonija ee -Estònia ee -Estonsko ee -Estland ee -Estland ee -Εσθονία ee -Estlando ee -Eesti ee -استونی ee -Eesti ee -Estonie ee -Estland ee -An Eastóin ee -×סטוניה ee -à¤à¤¸à¥à¤¤à¥‹à¤¨à¤¿à¤¯à¤¾ ee -Estonija ee -Észtország ee -Eistland ee -エストニア ee -អáŸážŸáŸ’ážáž¼áž“ី ee -ì—스토니아 ee -ເອໂທເນີຠee -Estija ee -Igaunija ee -ЕÑтонија ee -ЭÑтони ee -Estonja ee -Estland ee -Estland ee -Estland ee -Estland ee -Estònia ee -ਈਸਟੋਨੀਆ ee -Estónia ee -Estônia ee -ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee -Esitoniya ee -Estteeana ee -Estónsko ee -Estonija ee -ЕÑтонија ee -Estonija ee -I-Estonia ee -Estland ee -எசà¯à®Ÿà¯‹à®©à®¿à®¯à®¾ ee -ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee -เอสโทเนีย ee -Estonya ee -ЕÑÑ‚Ð¾Ð½Ñ–Ñ ee -ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee -Estoneye ee -爱沙尼亚 ee -愛沙尼亞 ee -Egypt eg -Egipte eg -مصر eg -Misir eg -ЭгіпÑÑ‚ eg -Египет eg -মিশর eg -Ejipt eg -Egipat eg -Egipte eg -Yr Aifft eg -Egypten eg -Ägypten eg -Αίγυπτος eg -Egiptujo eg -Egipto eg -Egiptus eg -Egipto eg -مصر eg -Egypti eg -Egyptaland eg -Égypte eg -Egypte eg -An Éigipt eg -Exipto eg -×ž×¦×¨×™× eg -इजिपà¥à¤¤ eg -Egipat eg -Egyiptom eg -Egyptaland eg -Egitto eg -エジプト eg -អáŸáž áŸ’ស៊ីប eg -ì´ì§‘트 eg -ອີຢີບ eg -Egiptas eg -Ä’Ä£ipte eg -Египет eg -Египт eg -Mesir eg -EÄ¡ittu eg -Ägypten eg -Egypte eg -Egepeta eg -ਮਿਸਰ eg -Egipt eg -Egipto eg -Egito eg -Egipt eg -Египет eg -Misiri eg -Egypta eg -Egipt eg -Египат eg -Egipat eg -I-Egypt eg -Egypten eg -எகிபà¯à®¤à¯ eg -МиÑÑ€ eg -อียิปต์ eg -Mısır eg -Mısır eg -Єгипет eg -МиÑÑ€ eg -Ai Cập eg -Edjipe eg -åŸƒåŠ eg -åŸƒåŠ eg -Igibhithe eg -Western Sahara eh -Westelike Sahara eh -الصحراء الغربية eh -ЗаходнÑÑ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh -Западна Сахара eh -পশà§à¦šà¦¿à¦® সাহারা eh -Sahara occidental eh -Zapadna Sahara eh -Sàhara Occidental eh -Západní Sahara eh -Gorllewin Sahara eh -Vestsahara eh -Westsahara eh -Δυτική ΣαχάÏα eh -Okcidenta Saharo eh -Sahara occidental eh -Lääne-Sahara eh -Mendebaldeko Sahara eh -صحرای غربی eh -Länsi-Sahara eh -Sahara occidental eh -West Sahara eh -An Sahára Thiar eh -Saara Ocidental eh -מערב סהרה eh -पशà¥à¤šà¤¿à¤®à¥€ सहारा eh -Westerm Sahara eh -Nyugat-Szahara eh -Vestur-Sahara eh -Sahara Occidentale eh -西サãƒãƒ© eh -សាហារ៉ា​ážáž¶áž„​លិច eh -ì„œì‚¬í•˜ë¼ eh -ພື້ນທີ່ທຳງານ eh -Vakarų Sahara eh -RietumsahÄra eh -Западна Сахара eh -Барууг Ñахар eh -Saħara tal-Punent eh -Vest-Sahara eh -Westsahara eh -West Sahara eh -Vest-Sahara eh -ਦੱਖਣੀ ਸਹਾਰਾ eh -Zachodnia Sahara eh -Sara Ocidental eh -Sahara Ocidental eh -Sahara de Vest eh -Ð—Ð°Ð¿Ð°Ð´Ð½Ð°Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh -Sahara y'Iburengerazuba eh -Oarje-Sahara eh -Západna Sahara eh -Zahodna Sahara eh -Западна Сахара eh -Zapadna Sahara eh -Västsahara eh -மேறà¯à®•தà¯à®¤à®¿à®¯ சஹாரா eh -Саҳрои Ғарбӣ eh -ซาฮาร่าตะวันตภeh -Batı Sahara eh -Batış Sahara eh -Західна Сахара eh -Ғарбий Сахара eh -Tây Sahara eh -Sara Coûtchantrece eh -西撒哈拉 eh -西盛哈拉 eh -Eritrea er -اريتريا er -ЭрытрÑÑ er -Ð•Ñ€Ð¸Ñ‚Ñ€ÐµÑ er -à¦à¦°à¦¿à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ er -Eritre er -Eritreja er -ΕÏυθÏαία er -Eritreo er -اریتره er -Érythrée er -Eiritré er -×ריתרי××” er -à¤à¤°à¤¿à¤Ÿà¥à¤°à¥€à¤¯à¤¾ er -Eritreja er -Erítrea er -エリトリア er -អáŸážšáž¸áž‘្រា er -ì—리트레아 er -à»àºà»‰à»„ຂà»àºŸà»‰àº¡àº—ຳງານ er -EritrÄ—ja er -Eritreja er -Еритреја er -Эритреа er -ਈਰੀਟਰੀਆ er -Erytrea er -Eritreia er -Eritréia er -Ð­Ñ€Ð¸Ñ‚Ñ€ÐµÑ er -Eritereya er -Eritreja er -Еритреја er -Eritreja er -ரிடà¯à®°à®¿à®¯à®¾ er -Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er -เอริเทรีย er -Eritre er -Ð•Ñ€Ñ–Ñ‚Ñ€ÐµÑ er -Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er -Eritrêye er -厄立特里亚 er -厄利垂亞 er -Spain es -Spanje es -أسبانيا es -İspaniya es -Ð“Ñ–ÑˆÐ¿Ð°Ð½Ñ–Ñ es -ИÑÐ¿Ð°Ð½Ð¸Ñ es -সà§à¦ªà§‡à¦¨ es -Spagn es -Å panija es -Espanya es -Å panÄ›lsko es -Sbaen es -Spanien es -Spanien es -Ισπανία es -Hispanio es -España es -Hispaania es -Espainia es -اسپانیا es -Espanja es -Spania es -Espagne es -Spanje es -An Spáinn es -España es -ספרד es -सà¥à¤ªà¥‡à¤¨ es -Å panjolska es -Spanyolország es -Spanyol es -Spánn es -Spagna es -スペイン es -អáŸážŸáŸ’ប៉ាញ es -ìŠ¤íŽ˜ì¸ es -ສະເປັນ es -Ispanija es -SpÄnija es -Шпанија es -ИÑпани es -Sepanyol es -Spanja es -Spania es -Spanien es -Spanje es -Spania es -Espanha es -ਸਪੇਨ es -Hiszpania es -Espanha es -Espanha es -Spania es -ИÑÐ¿Ð°Ð½Ð¸Ñ es -Esipanye es -Spánia es -Å panielsko es -Å panija es -Шпанија es -Å panija es -I-Spain es -Spanien es -சà¯à®ªà¯†à®¯à®¿à®©à¯ es -ИÑпаниё es -สเปน es -İspanya es -İspania es -ІÑÐ¿Ð°Ð½Ñ–Ñ es -ИÑÐ¿Ð°Ð½Ð¸Ñ es -Tây Ban Nha es -Sipagne es -西ç­ç‰™ es -西ç­ç‰™ es -Ethiopia et -Ethiopië et -اثيوبيا et -Ð­Ñ‚Ñ‹Ñ‘Ð¿Ñ–Ñ et -Ð•Ñ‚Ð¸Ð¾Ð¿Ð¸Ñ et -ইথিওপিয়া et -Etiopi et -Etiopija et -Etiòpia et -Etiopie et -Ethiopien et -Äthiopien et -Αιθιοπία et -Etiopio et -Etiopía et -Etioopia et -Etiopia et -اتیوپی et -Etiopia et -Éthiopie et -Ethiopië et -An Aetóip et -Etiopia et -×תיופיה et -इथियोपिया et -Etiopija et -Etiópia et -Eþíópía et -Etiopia et -エãƒã‚ªãƒ”ã‚¢ et -អáŸážáŸ’យូពី et -ì—티오피아 et -ເອໂທເນີຠet -Etiopija et -Etiopija et -Етиопија et -Этопи et -Etjopia et -Etiopia et -Äthiopien et -Ethiopië et -Etiopia et -ਈਥੋਪੀਆ et -Etiopia et -Etiópia et -Etiópia et -Etiopia et -Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et -Etiyopiya et -Etiopia et -Etiópia et -Etiopija et -Етиопија et -Etiopija et -Etiopien et -எதியோபியா et -ҲабашиÑтон et -เอธิโอเปีย et -Etiyopya et -Efiopia et -Ð•Ñ„Ñ–Ð¾Ð¿Ñ–Ñ et -Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et -Etiopeye et -埃塞俄比亚 et -衣索比亞 et -Finland fi -Ùنلندا fi -Finlandiya fi -ФінлÑÐ½Ð´Ñ‹Ñ fi -Ð¤Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ fi -ফিনলà§à¦¯à¦¾à¦£à§à¦¡ fi -Finska fi -Finlàndia fi -Finsko fi -Y Ffindir fi -Finnland fi -Φινλανδία fi -Finnlando fi -Finlandia fi -Soome fi -Finlandia fi -Ùنلاند fi -Suomi fi -Finnland fi -Finlande fi -Finlân fi -An Fhionlainn fi -Finlándia fi -פינלנד fi -फिनलैंड fi -Finska fi -Finnország fi -Finlandia fi -Finnland fi -Finlandia fi -フィンランド fi -ហ្វាំងឡង់ fi -핀란드 fi -ຟີນà»àº¥àº™ fi -Suomija fi -Somija fi -ФинÑка fi -Финнланд fi -Finlandja fi -Finnland fi -Finlandia fi -ਫਿਨਲੈਂਡ fi -Finlandia fi -Finlândia fi -Finlândia fi -Finlanda fi -ФинлÑÐ½Ð´Ð¸Ñ fi -Finilande fi -Suopma fi -Fínsko fi -Finska fi -ФинÑка fi -Finska fi -I-Finland fi -பினà¯à®²à®¾à®¨à¯à®¤à¯ fi -Финлонд fi -ฟินà¹à¸¥à¸™à¸”์ fi -Finlandiya fi -Finland (Suomi) fi -ФінлÑÐ½Ð´Ñ–Ñ fi -ФинлÑÐ½Ð´Ð¸Ñ fi -Phần Lan fi -Finlande fi -芬兰 fi -芬蘭 fi -Fiji fj -Ùيجي fj -Фіджы fj -ОÑтрови Фиджи fj -ফিজি fj -Fidji fj -Fidži fj -Fidži fj -Ffiji fj -Fidschi fj -Φίτζι fj -FiÄioj fj -Fidži fj -Ùیجی fj -Fidji fj -Fidsí fj -פיג'×™ fj -फिजी fj -Fidzsi fj -Fídjieyjar fj -Figi fj -フィジー fj -ហ្វ៊ីហ្ស៊ី fj -피지 fj -ມີດີ fj -Fidži fj -Фиџи fj -Фижи fj -FiÄ¡i fj -Fidschi fj -ਫਿੱਜੀ fj -Fidżi fj -Ilhas Fiji fj -Фиджи fj -Fidži fj -Fidži fj -Фиџи fj -Fidži fj -பிஜி fj -Фиҷи fj -ฟิจิ fj -Фіджі fj -Фижи fj -Fidji fj -æ–æµŽ fj -è²æ¿Ÿ fj -Falkland Islands (Malvinas) fk -Falkland Eilande (Malvinas) fk -جزر الÙوكلاند (المالÙيناس) fk -ФалклендÑÐºÑ–Ñ Ð°Ñтравы (Мальвіны) fk -ФолклендÑки оÑтрови fk -ফকলà§à¦¯à¦¾à¦£à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ (মলভিনাস) fk -Inizi Falklandi (Malvinas) fk -Foklandska ostrva (Malvini) fk -Illes Falkland (Malvines) fk -Falklandy (Malvíny) fk -Ynysoedd Y Ffalcland (Malfinas) fk -Falkland-øerne fk -Falkland-Inseln (Malvinen) fk -Îησιά Φώκλαντ (Malvinas) fk -Falklandoj fk -Islas Falkland (Malvinas) fk -Falklandi saared (Malviinid) fk -Falkland Irlak (Malvinak) fk -جزایر ÙØ§Ù„کلند مالویناس fk -Falklandin saaret (Malvinassaaret) fk -ÃŽles Falkland (Malvinas) fk -Falkland Eilannen (Malvinas) fk -Na hOileáin Fháclainne (Malvinas) fk -Illas Falkland (Malvinas) fk -××™×™ פולקלנד fk -फाकलैंड आइलैंड (मालविनास) fk -Folklandska otoÄja (Malvini) fk -Falkland-szigetek fk -Falklandseyjar fk -Isole Falkland (Malvine) fk -フォークランド諸島 fk -កោះ Falkland (Malvinas) fk -í¬í´ëžœë“œ êµ°ë„ (ë§ë¹„나스) fk -Folklendu salas fk -ФокландÑки ОÑтрови (Малвини) fk -Фалкланд арлууд (МалвинаÑ) fk -Gżejjer Falkland (Malvinas) fk -Falklandsøyene fk -Falklandinseln (Malvinas) fk -Falkland Eilanden (Malvinas) fk -Falklandsøyane fk -ਫਾਕਲੈਂਡ ਟਾਪੂ fk -Wyspy Falklandzkie (Malwiny) fk -Ilhas Falkland (Malvinas) fk -Ilhas Malvinas fk -Insulele Falkland (Malvine) fk -ФолклендÑкие (МальвинÑкие) оÑтрова fk -Ibirwa bya Falikilande (Maluvinasi) fk -Falklánddasullot fk -Falklandské Ostrovy (Malviny) fk -Falklandski otoki (Malvini) fk -ФолкландÑка оÑтрва (Малвини) fk -Folklandska ostrva (Malvini) fk -Falklandsöarna fk -ஃபாலà¯à®•௠தீவà¯(மாலà¯à®µà®¿à®©à®¾à®¸à¯) fk -Ҷазираи фолкланд (Малвина) fk -หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸„à¹à¸¥à¸™à¸”์ (Malvinas) fk -Falkland Adaları fk -Falkland Utrawları (Malvinnar) fk -ФолклендÑькі оÑтрови (БританіÑ) fk -Фолкленд (Малвин) Ороллари fk -Iyes Malouwines fk -ç¦å…‹å…°ç¾¤å²›(马尔维纳斯) fk -ç¦å…‹è˜­ç¾¤å³¶ (é¦¬çˆ¾ç¶­ç´æ–¯) fk -Micronesia, Federated States of fm -Micronesië, Vereenigde State van fm -ФедÑÑ€Ð°Ñ†Ñ‹Ñ ÐœiкранÑзіі fm -ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm -মাইকà§à¦°à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾, ফেডারেটেড সà§à¦Ÿà§‡à¦Ÿà¦¸ অব fm -Mikronezija, Federalne države fm -Micronesia, Estats Federats de fm -Mikronésie fm -Micronesia, Taleithau Cyfunol fm -Mikronesien, de forenede stater af fm -Mikronesien, Föderation von fm -ΜικÏονησίας, Ομόσπονδες πολιτείες της fm -Mikronezio, Respubliko de fm -Micronesia, Estados federados de fm -Mikroneesia fm -Mikronesiako Estatu Federatuak fm -Mikronesian liittovaltio fm -Etats Fédérés de Micronésie fm -Micronesië, Federale staten Fan fm -Stáit Cónascacha na Micrinéise fm -Micronésia, Estados Federados de fm -מיקרונזיה, מדינות הפדרציה של fm -फेडरेटेड सà¥à¤Ÿà¥‡à¤Ÿ ऑफ माइकà¥à¤°à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾ fm -Mikronézia fm -Míkrónesía, Sambandsríki fm -Micronesia, stati federati di fm -ミクロãƒã‚·ã‚¢,米自由連邦 fm -រដ្ឋ​សហពáŸáž“្ធ​មិក្រូនáŸážŸáŸŠáž¸ fm -Mikronezija fm -MikronÄ“zija fm -Микронезија, Федеративни Држави на fm -Mikronesja (Stati Federati ta') fm -Mikronesiaføderasjonen fm -Mikronesien, Vereenigte Staten vun fm -Micronesië, Federale staten van fm -Mikronesiaføderasjonen fm -ਮਾਇਕਰੋਨੀਸੀਆ, ਸੰਘੀ ਪà©à¨°à¨¾à¨‚ਤ fm -Federacja Stanów Mikronezji fm -Micronésia, Estados Federados da fm -Estados Federados da Micronésia fm -Micronezia, Statele Federative fm -ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm -Mikoronesiya, Leta Zishyizwehamwe fm -MikronesiafederaÅ¡uvdna fm -Spojené Å¡táty Mikronézie fm -Mikronezija, Združene države fm -Микронезија, Федерација држава fm -Mikronezija, Federacija država fm -Mikronesiska federationen fm -மைகà¯à®°à¯‹à®©à®¿à®šà®¾, à®’à®°à¯à®™à¯à®•ிணைநà¯à®¤ மாநிலம௠fm -สหพันธรัà¸à¸¡à¸´à¹‚ครนีเซีย fm -Mikronezya Federasyonu fm -Mikronesia, Berläşkän İlläre fm -МікронезіÑ, федеративні штати fm -ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm -Micronezeye fm -密克罗尼西亚è”邦 fm -密克羅尼西亞è¯é‚¦ fm -Faroe Islands fo -Faroe Eilande fo -جزر الÙيرو fo -ОÑтрови Фаро fo -ফারো দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ fo -Enez Faroe fo -Farska ostrva fo -Illes Faroe fo -Faerské ostrovy fo -Ynysoedd Ffar?e fo -Færøerne fo -Färöer-Inseln fo -Îήσοι ΦεÏόε fo -Ferooj fo -islas Faroe fo -Fääri saared fo -Faroe Irlak fo -جزایر ÙØ§Ø±Ùˆ fo -Färsaaret fo -ÃŽles Féroé fo -Faroe Eilannen fo -Na Scigirí (Oileáin Fharó) fo -Illas Feroe fo -××™×™ פ×רו fo -फारोठआइलैंड fo -Faroe Otoci fo -Faroe-szigetek fo -Færeyjar fo -Isole Fær Øer fo -フェロー諸島 fo -កោះ​ហ្វ៉ារ៉ូ fo -페로 ì œë„ fo -ໄອà»àº¥àº™ fo -Faroe salos fo -FÄ“ru salas fo -ФарÑки ОÑтрови fo -Фарое арлууд fo -Gżejjer Faroe fo -Færøyene fo -Färöerinseln fo -Faroe Eilanden fo -Færøyane fo -ਫਾਰੋਈ ਟਾਪੂ fo -Wyspy Faroe fo -Ilhas Faroe fo -Ilhas Faroe fo -Insulele Feroe fo -ФарерÑкие оÑтрова fo -Ibirwa bya Farowe fo -Fearsuolu fo -Ostrovy Faroe fo -Otoki Faroe fo -ФарÑка оÑтрва fo -Farska ostrva fo -Färöarna fo -ஃபரோ தீவà¯à®•ள௠fo -Ҷазираи Фару fo -หมู่เà¸à¸²à¸°à¸Ÿà¸²à¹‚ร fo -Faroe Adaları fo -Faroe Utrawları fo -ФарерÑькі оÑтрови fo -Фарер Ороллари fo -Äảo Faroe fo -Iye Faeroyé fo -法罗群岛 fo -法羅群島 fo -France fr -Frankryk fr -ÙØ±Ù†Ø³Ø§ fr -Fransa fr -Ð¤Ñ€Ð°Ð½Ñ†Ñ‹Ñ fr -Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr -ফà§à¦°à¦¾à¦¨à§à¦¸ fr -Frañs fr -Francuska fr -França fr -Francie fr -Ffrainc fr -Frankrig fr -Frankreich fr -Γαλλία fr -Francio fr -Francia fr -Prantsusmaa fr -Frantzia fr -ÙØ±Ø§Ù†Ø³Ù‡ fr -Ranska fr -Frakland fr -Frankryk fr -An Fhrainc fr -Franza fr -צרפת fr -फà¥à¤°à¤¾à¤‚स fr -Francuska fr -Franciaország fr -Prancis fr -Frakkland fr -Francia fr -フランス fr -បារាំង fr -프랑스 fr -àºàº£àº±à»ˆàº‡ fr -PrancÅ«zija fr -Francija fr -Франција fr -Франц fr -Perancis fr -Franza fr -Frankrike fr -Frankriek fr -Frankrijk fr -Frankrike fr -Fora fr -França fr -ਫਰਾਂਸ fr -Francja fr -França fr -França fr -FranÅ£a fr -Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr -Ubufaransa fr -Fránkriika fr -Francúzsko fr -Francija fr -ФранцуÑка fr -Francuska fr -I-France fr -Frankrike fr -பிரானà¯à®šà¯ fr -ФаронÑа fr -à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª fr -Fransa fr -Fransia fr -Ð¤Ñ€Ð°Ð½Ñ†Ñ–Ñ fr -Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr -Fura fr -Pháp fr -Fransi fr -法国 fr -法國 fr -Gabon ga -الغابون ga -Габон ga -Габон ga -গà§à¦¯à¦¾à¦¬à¦¨ ga -Gabun ga -Γκαμπόν ga -Gabono ga -Gabón ga -گابون ga -An Ghabúin ga -Gabón ga -גבון ga -गेबॉन ga -ガボン ga -ហ្គាបុង ga -가봉 ga -à»àºàº¥à»ˆàº‡àº™ ga -Gabonas ga -Gabona ga -Габон ga -Габон ga -Gabun ga -ਗਾਬੋਨ ga -Gabão ga -Gabão ga -Габон ga -Gabo ga -Габон ga -காபான௠ga -Габон ga -à¸à¸²à¸šà¸­à¸™ ga -Габон ga -Габон ga -加蓬 ga -加彭 ga -United Kingdom gb -Vereenigde Koninkryk gb -المملكة المتحدة gb -BirləşmiÅŸ Krallıq gb -Злучанае КаралеўÑтва gb -Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb -ইউনাইটেড কিংডম gb -Rouantelezh Unanet gb -Velika Britanija gb -Regne Unit gb -Spojené království gb -Y Deyrnas Unedig gb -Storbritannien gb -Großbritannien gb -Ηνωμένο Βασίλειο gb -Britio gb -Reino Unido gb -Suurbritannia gb -Erresuma Batua gb -بریتانیا gb -Iso-Britannia gb -Stórabretland gb -Royaume Uni gb -Ferienigd Keninkryk gb -An Ríocht Aontaithe gb -Reino Unido gb -בריטניה gb -यूनाइटेड किंगडम gb -Ujedinjeno Kraljevstvo gb -Egyesült Királyság gb -Inggris gb -Bretland gb -Regno Unito gb -イギリス gb -ចក្រភព​អង់គ្លáŸážŸ gb -ì˜êµ­ gb -ສະຫະລາດສະອານາຈັຠgb -JungtinÄ— KaralystÄ— gb -ApvienotÄ Karaliste gb -Обединето КралÑтво gb -Их британ gb -Renju Unit gb -Storbritannia gb -Grootbritannien gb -Verenigd Koninkrijk gb -Storbritannia gb -Regne Unit gb -ਬਰਤਾਨੀਆ gb -Wielka Brytania gb -Reino Unido gb -Reino Unido gb -Anglia gb -Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb -Ubwongereza gb -Stuorrabrittania gb -Anglicko gb -Združeno kraljestvo gb -Уједињено КраљевÑтво gb -Ujedinjeno Kraljevstvo gb -I-United Kingdom gb -Storbritannien gb -à®à®•à¯à®•ிய ராஜà¯à®œà®¿à®¯à®®à¯ gb -Подшоҳии Муттаҳида gb -สหราชอาณาจัà¸à¸£ gb -BirleÅŸik Krallık gb -Berläşkän PadÅŸahlıq gb -Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ gb -Буюк Ð‘Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb -Anh gb -RweyÃ¥me Uni gb -United Kingdom gb -英国 gb -è¯åˆçŽ‹åœ‹ gb -United Kingdom gb -Grenada gd -غرينادا gd -Qrenada gd -ГрÑнада gd -Гренада gd -গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¾ gd -Granada gd -ΓÏενάδα gd -Grenado gd -Granada gd -گرانادا gd -Grenade gd -Granada gd -גרנדה gd -गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾ gd -Granada gd -グレナダ gd -ហ្គ្រីណាដា gd -그러네ì´ë‹¤ gd -ເàºàº™àº²àº”າ gd -GrenÄda gd -Гренада gd -Гренада gd -Granada gd -ਗਰੀਨਾਡਾ gd -Granada gd -Granada gd -Гренада gd -Gerenada gd -I-Grenada gd -கிரெனடா gd -Гронодо gd -เà¸à¸£à¸™à¸²à¸”า gd -Гренада gd -Гренада gd -GrenÃ¥de gd -格林纳达 gd -æ ¼ç‘žé‚£é” gd -Georgia ge -Georgië ge -جورجيا ge -Ð“Ñ€ÑƒÐ·Ñ–Ñ ge -Ð“Ñ€ÑƒÐ·Ð¸Ñ ge -জরà§à¦œà¦¿à§Ÿà¦¾ ge -Jeorji ge -Gruzija ge -Geòrgia ge -Gruzie ge -Georgien ge -Georgien ge -ΓεωÏγία ge -Georgino ge -Gruusia ge -گرجستان ge -Géorgie ge -Georgië ge -An tSeoirsia ge -Xeórxia ge -×’'ורג'×™×” ge -जà¥à¤¯à¤¾à¤°à¥à¤œà¤¿à¤¯à¤¾ ge -Grúzia ge -Georgía ge -ジョージア島 ge -ហ្សកហ្ស៊ី ge -그루지아 ge -ເຊີເບີຠge -Gruzija ge -Gruzija ge -Грузија ge -Георги ge -Ä orÄ¡ia ge -Georgien ge -Georgië ge -ਜਾਰਜੀਆ ge -Gruzja ge -Geórgia ge -Geórgia ge -Ð“Ñ€ÑƒÐ·Ð¸Ñ ge -Jeworugiya ge -Gruzija ge -Грузија ge -Gruzija ge -Georgien ge -ஜியோரà¯à®œà®¿à®¯à®¾ ge -ГурҷиÑтон ge -จอร์เจีย ge -Gürcistan ge -Görcestan ge -Ð“Ñ€ÑƒÐ·Ñ–Ñ ge -ГуржиÑтон ge -Djeyordjeye ge -æ ¼é²å‰äºš ge -喬治亞 ge -Ghana gh -غانا gh -Гана gh -Гана gh -ঘানা gh -Gwana gh -Gana gh -Γκάνα gh -Ganao gh -غنا gh -Gána gh -Gana gh -×’×× ×” gh -घाना gh -Gana gh -ガーナ gh -ហ្កាណា gh -가나 gh -ຈີນ gh -Gana gh -Gana gh -Гана gh -Гана gh -Gana gh -ਘਾਨਾ gh -Gana gh -Gana gh -Gana gh -Гана gh -Gana gh -Gana gh -Гана gh -Gana gh -I-Ghana gh -கானா gh -Ғано gh -à¸à¸²à¸™à¸² gh -Гана gh -Гана gh -Gana gh -加纳 gh -è¿¦ç´ gh -Gibraltar gi -جبل طارق gi -Гібралтар gi -Гибралтар gi -জিবà§à¦°à¦²à§à¦Ÿà¦¾à¦° gi -Jibraltar gi -ΓιβÏÎ±Î»Ï„Î¬Ï gi -Gibraltaro gi -گیبرالتار gi -Giobráltar gi -Xibraltar gi -גיברלטר gi -जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° gi -Gibraltár gi -Gíbraltar gi -Gibilterra gi -ジブラルタル gi -지브롤터 gi -ມອລຕາ gi -Gibraltaras gi -GibraltÄrs gi -Гибралтар gi -Гибралтар gi -Ä ibiltar gi -ਗੀਬਰਾਲਟਾਰ gi -Гибралтар gi -Jiburalitari gi -Гибралтар gi -ஜிபà¯à®°à®²à¯à®Ÿà®¾à®°à¯ gi -Ҷабалуттариқ gi -ยิบรอลตา gi -Cebelitarık gi -Гібралтар gi -Гибралтар gi -Djibraltar gi -直布罗陀 gi -直布羅陀 gi -Greenland gl -Groenland gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl -গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦£à§à¦¡ gl -Griñland gl -Groenlàndia gl -Grónsko gl -Y Lasynys gl -Grønland gl -Grönland gl -Ισλανδία gl -Groenlandia gl -Gröönimaa gl -Gröönlanti gl -Groenland gl -Grienlân gl -An Ghraonlainn gl -Groenlándia gl -Grönland gl -Grænland gl -Groenlandia gl -グリーンランド gl -Grenlandija gl -Гренланд gl -Grønland gl -Gröönland gl -Groenland gl -Grønland gl -ਗਰੀਨਲੈਂਡ gl -Grenlandia gl -Gronelândia gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl -Goronilande gl -Ruonáeatnan gl -Grenlandija gl -Гренланд gl -Grenland gl -Grönland gl -Ð“Ñ€Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ gl -à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์ gl -Grönland gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ñ–Ñ gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl -格陵兰 gl -格陵蘭 gl -Gambia gm -Gambië gm -غامبيا gm -Ð“Ð°Ð¼Ð±Ñ–Ñ gm -Ð“Ð°Ð¼Ð±Ð¸Ñ gm -গামবিয়া gm -Gambi gm -Gambija gm -Gàmbia gm -Gambie gm -Γκάμπια gm -Gambio gm -گامبیا gm -Gambie gm -An Ghaimbia gm -Gámbia gm -גמביה gm -जामà¥à¤¬à¤¿à¤¯à¤¾ gm -Gambija gm -Gambía gm -ガンビア gm -ហ្កាំប៊ី gm -ê°ë¹„ì•„ gm -à»àºàº¡àº¡àº² gm -Gambija gm -Gambija gm -Гамбија gm -Гамби gm -Gambja gm -ਗੈਂਬੀਆ gm -Gâmbia gm -Gâmbia gm -Ð“Ð°Ð¼Ð±Ð¸Ñ gm -Gambiya gm -Gambija gm -Гамбија gm -Gambija gm -காமà¯à®ªà®¿à®¯à®¾ gm -Гомбиё gm -à¹à¸à¸¡à¹€à¸šà¸µà¸¢ gm -Ð“Ð°Ð¼Ð±Ñ–Ñ gm -Ð“Ð°Ð¼Ð±Ð¸Ñ gm -Gambeye gm -冈比亚 gm -甘比亞 gm -Guinea gn -غينيا gn -ГвінÑÑ gn -Ð“Ð²Ð¸Ð½ÐµÑ gn -গিনি gn -Gine gn -Gvineja gn -Gini gn -Γουινέα gn -Gvineo gn -Ginea gn -گینه gn -Guinée gn -An Ghuine gn -Guiné gn -×’×™× ××” gn -गà¥à¤ˆà¤¨à¤¾ gn -Gvineja gn -Gínea gn -ギニア gn -ហ្គីណ០gn -기니 gn -ເຖາວັນ gn -GvinÄ—ja gn -Gvineja gn -Гвинеја gn -Гуйнеа gn -Ginea gn -ਗà©à¨‡à¨¨à©€à¨† gn -Gwinea gn -Guiné gn -Guiné gn -Ð“Ð²Ð¸Ð½ÐµÑ gn -Gineya gn -Gvineja gn -Гвинеја gn -Gvineja gn -கà¯à®¯à¯à®©à®¿à®¯à®¾ gn -Гине gn -à¸à¸´à¸™à¸µ gn -Gine gn -Ð“Ð²Ñ–Ð½ÐµÑ gn -Ð“Ð²Ð¸Ð½ÐµÑ gn -Guinêye gn -几内亚 gn -幾內亞 gn -Guadeloupe gp -غواديلوب gp -ГвадÑлупа gp -Гваделупа gp -গাডেলà§à¦ª gp -Gwadeloup gp -Gvadalupe gp -Guadalupe gp -Gwadel?p gp -ΓουαδελοÏπη gp -Gvadelupo gp -Guadalupe gp -Guadalupe gp -گوادلوپ gp -Guadalúip gp -Guadalupe gp -×’×ודלופה gp -गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‹à¤ª gp -Gvadelúpeyjar gp -Guadalupa gp -ä»é ˜ã‚°ã‚¢ãƒ‰ãƒ«ãƒ¼ãƒ— gp -ហ្គាដឺលុប gp -과들루프 gp -ເດີລຸຠgp -Gvandelupa gp -Гваделупе gp -Gwadelup gp -ਗà©à¨†à¨¡à©€à¨“ਪੀ gp -Gwadelupa gp -Guadalupe gp -Guadalupe gp -Guadelupa gp -Гваделупа gp -Gwaderupe gp -Гвадалупе gp -Gvadalupe gp -கà¯à®µà®¾à®Ÿà¯†à®²à¯à®ªà¯‹à®ªà¯ gp -Гвадалуппо gp -เà¸à¸²à¸°à¸à¸±à¸§à¹€à¸”อลูป gp -Guadelupa gp -Гваделупа gp -Гваделупа gp -瓜德罗普 gp -瓜德魯普 gp -Equatorial Guinea gq -Ekwatoriaal Guinea gq -غينيا الاستوائية gq -ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ gq -Екваториална Ð“Ð²Ð¸Ð½ÐµÑ gq -ইকà§à§Ÿà§‡à¦Ÿà§‹à¦°à¦¿à§Ÿà¦¾à¦² গিনি gq -Guine équatoriale gq -Ekvatorijalna Gvineja gq -Guinea Equatorial gq -Rovníková Guinea gq -Gini Gyhydeddol gq -Ækvatorial Guinea gq -Äquatorial-Guinea gq -ΙσημεÏινή Γουινέα gq -Ekvatora Gvineo gq -Guinea equatorial gq -Ekvatoriaal-Guinea gq -Ginea Ekuatoriala gq -گینه اکوادور gq -Päiväntasaajan Guinea gq -Guinée équatoriale gq -Guine Mheánchiorclach gq -Guinea Ecuatorial gq -×’×™× ××” המשוונית gq -इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गà¥à¤à¤¨à¤¾ gq -Ekvatorijalna Gvineja gq -EgyenlítÅ‘i Guinea gq -Miðbaugs-Gínea gq -Guinea Equatoriale gq -赤é“ギニア gq -ហ្គីណáŸâ€‹áž¢áŸáž€áŸ’វាទáŸážš gq -ì ë„ 기니 gq -àºàº²àº™àºªàº­àº™ gq -Ekvatoriaus GvinÄ—ja gq -EkvatoriÄlÄ Gvineja gq -Екваторијална Гвинеја gq -Equatorial Гуйнеа gq -Ginea Ekwatorjali gq -Ekvatorial-Guinea gq -Äquatoriaal-Guinea gq -Equatoriaal Guinea gq -Ekvatorial-Guinea gq -à¨à¨•ੂਲੇਟਰਲ ਗà©à¨ˆà¨¨à¨¿à¨† gq -Gwinea Równikowa gq -Guiné Equatorial gq -Guiné Equatorial gq -Guinea Ecuatorială gq -Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ gq -Gineya Ekwatoriyale gq -EkvatorialalaÅ¡-Guinea gq -Rovníkova Guinea gq -Ekvatorialna Gvineja gq -Екваторијална Гвинеја gq -Ekvatorijalna Gvineja gq -Ekvatorialguinea gq -ஈகோடோரியல௠கà¯à®¯à¯à®©à®¿à®¯à®¾ gq -Гинеи Экваторӣ gq -à¸à¸´à¸™à¸µ ตรงเส้นศูนย์สูตร gq -Ekvatoral Gine gq -Equatorlı Guinea gq -Екваторіальна Ð“Ð²Ñ–Ð½ÐµÑ gq -Экваториал Ð“Ð²Ð¸Ð½ÐµÑ gq -Guinêye EcwÃ¥toriÃ¥le gq -赤é“几内亚 gq -赤é“幾內亞 gq -Greece gr -Griekeland gr -اليونان gr -Yunanıstan gr -ГрÑÑ†Ñ‹Ñ gr -Ð“ÑŠÑ€Ñ†Ð¸Ñ gr -গà§à¦°à§€à¦¸ gr -Gres gr -GrÄka gr -Grècia gr -Řecko gr -Gwlad Groeg gr -Grækenland gr -Griechenland gr -Ελλάδα gr -Grekujo gr -Grecia gr -Kreeka gr -Grezia gr -یونان gr -Kreikka gr -Grikkaland gr -Grèce gr -Grikelân gr -An Ghréig gr -Grécia gr -יוון gr -गà¥à¤°à¥€à¤¸ gr -GrÄka gr -Görögország gr -Grikkland gr -Grecia gr -ギリシャ gr -ក្រិក gr -그리스 gr -àºàºµàºŠ gr -Graikija gr -GrieÄ·ija gr -Грција gr -Грек gr -GreÄ‹ja gr -Hellas gr -Grekenland gr -Griekenland gr -Hellas gr -Grèça gr -ਗਰੀਸ gr -Grecja gr -Grécia gr -Grécia gr -Grecia gr -Ð“Ñ€ÐµÑ†Ð¸Ñ gr -Ubugereki gr -Greika gr -Grécko gr -GrÄija gr -Грчка gr -GrÄka gr -I-Greece gr -Grekland gr -கிரீச௠gr -Юнон gr -à¸à¸£à¸µà¸‹ gr -Yunanistan gr -Yunanstan gr -Ð“Ñ€ÐµÑ†Ñ–Ñ gr -ЮнониÑтон gr -Hy Lạp gr -Grece gr -希腊 gr -希臘 gr -Guatemala gt -Gautemala gt -غواتيمالا gt -Quatemala gt -ГватÑмала gt -Гватемала gt -গà§à§Ÿà¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾ gt -Gvatemala gt -Gwatemala gt -Γουατεμάλα gt -Gvatemalo gt -گواتمالا gt -Guatamala gt -גו×טמלה gt -गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾ gt -Gvatemala gt -Gvatemala gt -グァテマラ gt -ហ្គាážáŸáž˜áŸ‰áž¶áž¡áž¶ gt -과테ë§ë¼ gt -àºàº±àº§à»€àº•ມາລາ gt -Gvatemala gt -Gvatemala gt -Гватемала gt -ГуÑтемала gt -Gwatemala gt -ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾ gt -Gwatemala gt -Гватемала gt -Gwatemala gt -Gvatemala gt -Гватемала gt -Gvatemala gt -I-Guatemala gt -கà¯à®µà®¾à®¤à¯à®¤à®®à®¾à®²à®¾ gt -Гватемоло gt -à¸à¸±à¸§à¹€à¸•มาลา gt -Гватемала gt -Гватемала gt -Gwatemala gt -å±åœ°é©¬æ‹‰ gt -瓜地馬拉 gt -Guam gu -غوام gu -Гуам gu -Гуам gu -গà§à§Ÿà¦¾à¦® gu -Gwam gu -Gw?m gu -Γκουάμ gu -Gvamo gu -گوام gu -גו×× gu -गà¥à¤µà¤¾à¤® gu -Gvam gu -グァム gu -ហ្គាំម gu -ê´Œ gu -à»àºàº¡àº¡àº² gu -Guama gu -Гвам gu -Гуам gu -Gwam gu -ਗà©à¨†à¨® gu -Гуам gu -Gwamu gu -Гуам gu -காம௠gu -Гуамма gu -à¸à¸§à¸¡ gu -Гуам gu -Гуам gu -Gwam gu -关岛 gu -關島 gu -Guinea-Bissau gw -غينيا-بيساو gw -ГвінÑÑ-БіÑаў gw -Ð“Ð²Ð¸Ð½ÐµÑ Ð‘Ð¸Ñау gw -গিনি-বিসো gw -Gine-Biso gw -Gvineja-Bisau gw -Gini-Bisaw gw -Γουινέα-Μπισσάου gw -Gvineo BisaÅ­a gw -Ginea-Bissau gw -گینه بیسائو gw -Guinée-Bissau gw -Guine-Bhissau gw -×’×™× ××” ביס×ו gw -गà¥à¤à¤¨à¤¾-बिसाऊ gw -Bissau-Guinea gw -Gínea-Bissá gw -ギニアビサオ gw -ហ្គីណáŸáž”៊ីសៅ gw -기니비사 gw -ລັດເຊີຠgw -Gvineja-Bisava gw -Гвинеја БиÑао gw -Гуйнеа-БиÑÑау gw -Ginea-Bissaw gw -ਗà©à¨‡à¨¨à¨¿à¨†-ਬਿਸ਼ਾਉ gw -Gwinea-Bissau gw -Guiné Bissau gw -Guiné-Bissau gw -ГвинеÑ-БиÑау gw -Gineya-Bisawu gw -Гвинеја БиÑао gw -Gvineja Bisao gw -கà¯à®¯à¯à®©à®¿à®¯à®¾-பிஸà¯à®¸à®¾ gw -Гвинеи БиÑÑои gw -à¸à¸´à¸™à¸µ - บิสซอ gw -Gine-Bissau gw -ГвінеÑ-БіÑау gw -ГвинеÑ-БиÑÑау gw -Guinêye-Bissaw gw -å‡ å†…äºšæ¯”ç» gw -幾內亞比紹 gw -Guyana gy -غيانا gy -ГвіÑна gy -Гуайана gy -গায়ানা gy -Gwiana gy -Gvajana gy -Giana gy -Γουιάνα gy -Gujano gy -گویان gy -Guyane gy -An Ghuáin gy -Guiana gy -גוי×× ×” gy -गà¥à¤¯à¤¾à¤¨à¤¾ gy -Gvæjana gy -ガイアナ gy -ហ្គីយ៉ាណា gy -ê°€ì´ì•„나 gy -ຈີນ gy -Gviana gy -Gajana gy -Гвајана gy -ГуÑна gy -Gujana gy -ਗà©à¨†à¨¨à¨¾ gy -Gujana gy -Guiana gy -Guiana gy -Guiana gy -Гайана gy -Giyana gy -Gvajana gy -Гвајана gy -Gvajana gy -கானா gy -Гуана gy -à¸à¸¹à¸¢à¸²à¸™à¹ˆà¸² gy -Guana gy -ГайÑна gy -Гвиана gy -圭亚那 gy -è“‹äºžç´ gy -Hong Kong SAR(China) hk -Hong Kong SAR (China) hk -Хонг Конг (Китай) hk -হং কং SAR(চীন) hk -Hong Kong SAR(Sina) hk -Hong Kong SAR(Xina) hk -Hong Kong SAR (Čína) hk -Hongkong SAR(Kina) hk -Χονγκ Κονγκ SAR (Κίνα) hk -Hongkong hk -Hong Kong SAR(Txina) hk -Hong Kong SAR (Kiina) hk -Hong Kong SAR (Chine) hk -Hong Cong SAR(An tSín) hk -Hong Kong hk -הונג קונג SAR (סין) hk -Hongkong (Kína) hk -Hong Kong (sjálfstjórnarhérað í Kína) hk -Hong Kong SAR(Cina) hk -香港(中国) hk -ហុងចិន (áž…áž·áž“) hk -Hong Kongas SAR(Kinija) hk -Хонг Конг СÐР(Кина) hk -Hongkong SAR(Kina) hk -Hong Kong hk -Hongkong SAR(Kina) hk -ਹਾਂਗ-ਕਾਂਗ SAR(ਚੀਨ) hk -Hong Kong SAR (Chiny) hk -Hong Kong SAR (China) hk -Гонконг hk -Hong Kong SAR (Ubushinwa) hk -Hongkong SAR(Kiinná) hk -Hong Kong SAR (Kitajska) hk -SAR Hong Kong (Кина) hk -SAR Hong Kong (Kina) hk -Hong Kong (Kina) hk -ஹாஙà¯à®•ாங௠SAR(சீனா) hk -ฮ่องà¸à¸‡ hk -Hong Kong (Çin) hk -Гонконг SAR (Китай) hk -Гонконг (Хитой) hk -中国香港特别行政区 hk -香港 SAR(中國) hk -Honduras hn -هندوراس hn -Ð“Ð°Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -হণà§à¦¡à§à¦°à¦¾à¦¸ hn -Hondures hn -Hondwras hn -ΟνδοÏÏα hn -Honduro hn -هندوراس hn -Hondúras hn -הונדורס hn -होंडà¥à¤°à¤¾à¤¸ hn -Hondúras hn -ホンジュラス hn -ហុងឌូរ៉ាស់ hn -온ë‘ë¼ìФ hn -ຫອນດູລັດ hn -HondÅ«ras hn -Hondurasa hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ħonduras hn -Hondures hn -ਹੰਨਡੂਰਸ hn -Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Hondirasi hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -I-Honduras hn -ஆணà¯à®Ÿà¯à®°à®¾à®¸à¯ hn -Ò²Ð¸Ð½Ð´ÑƒÑ€Ð¾Ñ hn -ฮอนดูรัส hn -Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -洪都拉斯 hn -å®éƒ½æ‹‰æ–¯ hn -Croatia hr -Kroasië hr -كرواتيا hr -Xırvatıstan hr -Ð¥Ð°Ñ€Ð²Ð°Ñ‚Ñ‹Ñ hr -ХърватÑка hr -কà§à¦°à§‹à§Ÿà¦¾à¦¶à¦¿à§Ÿà¦¾ hr -Kroatia hr -Hrvatska hr -Croàcia hr -Chorvatsko hr -Kroatien hr -Kroatien hr -ΚÏοατία hr -Kroatio hr -Croacia hr -Horvaatia hr -Kroazia hr -کرواسی hr -Kroatia hr -Kroatia hr -Croatie hr -Kroatië hr -An Chróit hr -Croácia hr -קרו×טיה hr -कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾ hr -Hrvatska hr -Horvátország hr -Kroasia hr -Króatía hr -Croazia hr -クロアãƒã‚¢ hr -ក្រូអាហhr -í¬ë¡œì•„í‹°ì•„ hr -ໂຄເອເທີຠhr -Kroatija hr -HorvÄtija hr -ХрватÑка hr -Кроати hr -Kroazja hr -Kroatia hr -Kroatien hr -Kroatië hr -Kroatia hr -Croacia hr -ਕਰੋਆਟਿਆ hr -Chorwacja hr -Croácia hr -Croácia hr -CroaÅ£ia hr -Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr -Korowasiya hr -Kroátia hr -Chorvátsko hr -HrvaÅ¡ka hr -ХрватÑка hr -Hrvatska hr -I-Croatia hr -Kroatien hr -கà¯à®°à¯‹à®Ÿà®¿à®¯à®¾ hr -Хорватӣ hr -โครเอเธีย hr -Hırvatistan hr -Kroatia hr -Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ñ–Ñ hr -Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr -CrowÃ¥ceye hr -克罗地亚 hr -克羅埃西亞 hr -Haiti ht -Haïti ht -هايتي ht -Гаіці ht -Хаити ht -হাইতি ht -Haití ht -Αϊτή ht -Haitio ht -Haití ht -هاییتی ht -Haïti ht -Háítí ht -×”×יטי ht -हैती ht -Haítí ht -ãƒã‚¤ãƒ ht -ហែទី ht -ì•„ì´í‹° ht -ວາດຮູບ - K ht -Haitis ht -Хаити ht -Хайти ht -Ħaiti ht -ਹਾਇਟੀ ht -Гаити ht -Hayiti ht -Хаити ht -ஹைதி ht -Ҳаити ht -ไฮติ ht -Гаїті ht -Гаити ht -Hayiti ht -海地 ht -海地 ht -Hungary hu -Hongarye hu -هنغاريا hu -Macarıstan hu -Вугоршчына hu -Ð£Ð½Ð³Ð°Ñ€Ð¸Ñ hu -হাঙà§à¦—েরী hu -Hungaria hu -MaÄ‘arska hu -Hongria hu -MaÄarsko hu -Hwngari hu -Ungarn hu -Ungarn hu -ΟυγγαÏία hu -Hungario hu -Hungría hu -Ungari hu -Hungaria hu -مجارستان hu -Unkari hu -Ungarn hu -Hongrie hu -Hongarije hu -An Ungáir hu -Hungria hu -הונגריה hu -हंगरी hu -MaÄ‘jarska hu -Magyarország hu -Hungaria hu -Ungverjaland hu -Ungheria hu -ãƒãƒ³ã‚¬ãƒªãƒ¼ hu -ហុងគ្រី hu -í—가리 hu -ຫັງàºàº²àº¥àºµ hu -Vengrija hu -UngÄrija hu -Унгарија hu -Унгар hu -Ungerija hu -Ungarn hu -Ungarn hu -Hongarije hu -Ungarn hu -Hongria hu -ਹੰਗਰੀ hu -WÄ™gry hu -Hungria hu -Hungria hu -Ungaria hu -Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu -Hongiriya hu -Ungár hu -MaÄarsko hu -Madžarska hu -МађарÑка hu -MaÄ‘arska hu -I-Hungary hu -Ungern hu -ஹஙà¯à®•ேரி hu -МаҷориÑтон hu -ฮังà¸à¸²à¸£à¸µ hu -Macaristan hu -Macarstan hu -Угорщина hu -Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu -Hongreye hu -匈牙利 hu -匈牙利 hu -Indonesia id -Indonesië id -إندونيسيا id -İndoneziya id -ІнданÑÐ·Ñ–Ñ id -Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id -ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾ id -Indonezi id -Indonezija id -Indonèsia id -Indonésie id -Indonesien id -Indonesien id -Ινδονησία id -Indonezio id -Indoneesia id -اندونزی id -Indonésie id -Indonesië id -An Indinéis id -Indonésia id -×ינדונזיה id -इंडोनेशिया id -Indonezija id -Indonézia id -Indónesía id -インドãƒã‚·ã‚¢ id -ឥណ្ឌូនáŸážŸáŸŠáž¸ id -ì¸ë„네시아 id -ອີàºà»‚ດນີເຊີຠid -Indonezija id -IndonÄ“zija id -Индонезија id -Индонез id -Indoneżja id -Indonesien id -Indonesië id -ਇੰਡੋਨੇਸ਼ੀਆ id -Indonezja id -Indonésia id -Indonésia id -Indonezia id -Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id -Indonesiya id -Indonézia id -Indonezija id -Индонезија id -Indonezija id -I-Indonesia id -Indonesien id -இநà¯à®¤à¯‹à®©à¯€à®šà®¿à®¯à®¾ id -Индонезӣ id -อินโดนีเซีย id -İndonezya id -İndonesia id -Ð†Ð½Ð´Ð¾Ð½ÐµÐ·Ñ–Ñ id -Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id -Indonezeye id -å°åº¦å°¼è¥¿äºš id -å°å°¼ id -Ireland ie -Ierland ie -أيرلندا ie -İrlandiya ie -ІрлÑÐ½Ð´Ñ‹Ñ ie -Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie -আয়ারলà§à¦¯à¦¾à¦£à§à¦¡ ie -Iwerzhon ie -Irska ie -Irlanda ie -Irsko ie -Iwerddon ie -Irland ie -Irland ie -ΙÏλανδία ie -Islando ie -Irlanda ie -Iirimaa ie -Irlanda ie -ایرلند ie -Irlanti ie -Ãrland ie -Irlande ie -Ierlân ie -Éire ie -Irlanda ie -×ירלנד ie -आयरलैंड ie -Irska ie -Ãrország ie -Irlandia ie -Ãrland ie -Irlanda ie -アイルランド ie -អៀរឡង់ ie -ì•„ì¼ëžœë“œ ie -ໄອà»àº¥àº™ ie -Airija ie -Īrija ie -ИрÑка ie -Ирланд ie -Irlanda ie -Irland ie -Irland ie -Ierland ie -Irland ie -Irlanda ie -ਆਇਰਲੈਂਡ ie -Irlandia ie -Irlanda ie -Irlanda ie -Irlanda ie -Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie -Irilande ie -Irlánda ie -Ãrsko ie -Irska ie -ИрÑка ie -Irska ie -I-Ireland ie -Irland ie -அயரà¯à®²à®¾à®¨à¯à®¤à¯ ie -Ирлонд ie -ไอร์à¹à¸¥à¸™à¸”์ ie -İrlanda ie -İreland, İrlandia ie -Ð†Ñ€Ð»Ð°Ð½Ð´Ñ–Ñ ie -Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie -Irlande ie -伊朗 ie -愛爾蘭 ie -Israel il -اسرائيل il -İzrail il -Ізраіль il -Израел il -ইসরাইল il -Izrael il -Izrael il -ΙσÏαήλ il -Israelo il -Iisrael il -اسراییل il -Ãsrael il -Israël il -Iosrael il -ישר×ל il -इज़राइल il -Izrael il -Izrael il -Ãsrael il -Israele il -イスラエル il -អ៊ីស្រាអែល il -ì´ìФë¼ì—˜ il -ອິດສະລະເອລ il -Izraelis il -IzraÄ“la il -Израел il -Изриал il -Iżrael il -ਇਜ਼ਰਾਈਲ il -Izrael il -Израиль il -Isirayeli il -Izrael il -Izrael il -Израел il -Izrael il -I-Israel il -இசà¯à®°à¯‡à®²à¯ il -ИÑроил il -อิสราเอล il -İsrail il -İsrael il -Ізраїль il -ИÑроил il -Israyel il -USirayeli il -以色列 il -以色列 il -India in -Indië in -الهند in -Hindistan in -Ð†Ð½Ð´Ñ‹Ñ in -Ð˜Ð½Ð´Ð¸Ñ in -ভারত in -Indez in -Indija in -Ãndia in -Indie in -Indien in -Indien in -Ινδία in -Hindujo in -هندوستان in -Intia in -Inde in -An India in -Ãndia in -הודו in -भारत in -Indija in -Indland in -インド in -ឥណ្ឌា in -ì¸ë„ in -ອິນເດີຠin -Indija in -Indija in -Индија in -ЭнÑтхÑг in -Indja in -Indien in -ਭਾਰਤ in -Indie in -Ãndia in -Ãndia in -Ð˜Ð½Ð´Ð¸Ñ in -Ubuhinde in -Indija in -Индија in -Indija in -I-India in -Indien in -இநà¯à®¤à®¿à®¯à®¾ in -ҲиндуÑтон in -อินเดีย in -Hindistan in -Hindstan in -Ð†Ð½Ð´Ñ–Ñ in -ҲиндиÑтон in -Ấn Äá»™ in -Inde in -å°åº¦ in -å°åº¦ in -Endiya in -Iraq iq -Irak iq -العراق iq -İraq iq -Ірак iq -Ирак iq -ইরাক iq -Irak iq -Irak iq -Irák iq -Irac iq -Irak iq -Irak iq -ΙÏάκ iq -Irako iq -Irak iq -Iraak iq -Irak iq -عراق iq -Irak iq -Irak iq -Irak iq -Irak iq -An Iaráic iq -עיר××§ iq -इराक iq -Irak iq -Irak iq -Ãrak iq -イラク iq -អ៊ីរ៉ាក់ iq -ì´ë¼í¬ iq -ອີລັຠiq -Irakas iq -IrÄka iq -Ирак iq -Ирак iq -Irak iq -Irak iq -Irak iq -Irak iq -ਇਰਾਕ iq -Irak iq -Iraque iq -Iraque iq -Irak iq -Ирак iq -Iraki iq -Iráka iq -Irák iq -Irak iq -Ирак iq -Irak iq -I-Iraq iq -Irak iq -ஈராக௠iq -Ироқ iq -อิรัภiq -Irak iq -Ğíraq iq -Ірак iq -Ироқ iq -Irak iq -伊拉克 iq -伊拉克 iq -Iran ir -أيران ir -Іран ir -Иран ir -ইরান ir -Ãrán ir -ΙÏάν ir -Irano ir -Iraan ir -ایران ir -An Iaráin ir -Irán ir -×יר×ן ir -इरान ir -Irán ir -Ãran ir -イラン ir -អ៊ីរ៉ង់ ir -ì´ëž€ ir -ອີລັຠir -Iranas ir -IrÄna ir -Иран ir -Иран ir -ਈਰਾਨ ir -Irão ir -Irã ir -Иран ir -Irani ir -Irána ir -Irán ir -Иран ir -I-Iran ir -ஈரான௠ir -Эрон ir -อิหร่าน ir -İran ir -İran ir -Іран ir -Эрон ir -伊朗 ir -伊朗 ir -Iceland is -Ysland is -أيسلندا is -İslandiya is -ІÑьлÑÐ½Ð´Ñ‹Ñ is -ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is -আইসলà§à¦¯à¦¾à¦£à§à¦¡ is -Island is -Island is -Islàndia is -Island is -Ynys yr I? is -Island is -Island is -Ισλανδία is -Islando is -Islandia is -Island is -Islandia is -ایسلند is -Islanti is -Ãsland is -Islande is -Yslân is -An Ãoslainn is -Islándia is -×יסלנד is -आयरलैंड is -Island is -Izland is -Islandia is -Ãsland is -Islanda is -アイスランド is -អ៊ីស្លង់ is -ì•„ì´ìŠ¬ëž€ë“œ is -ໄອຊà»àº¥àº™ is -Islandija is -Islande is -ИÑланд is -ИÑланд is -Islandja is -Island is -Island is -IJsland is -Island is -Islandia is -ਆਈਸਲੈਂਡ is -Islandia is -Islândia is -Islândia is -Islanda is -ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is -Isilande is -Islánda is -Island is -Islandija is -ИÑланд is -Island is -I-Iceland is -Island is -தீவ௠is -ИÑлонд is -ไอซ์à¹à¸¥à¸™à¸”์ is -İzlanda is -İsland is -ІÑÐ»Ð°Ð½Ð´Ñ–Ñ is -ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is -Izlande is -冰岛 is -冰島 is -Icelandi is -Italy it -Italië it -ايطاليا it -İtalyia it -Ð†Ñ‚Ð°Ð»Ñ–Ñ it -Ð˜Ñ‚Ð°Ð»Ð¸Ñ it -ইতালী it -Italia it -Italija it -Itàlia it -Itálie it -Yr Eidal it -Italien it -Italien it -Ιταλία it -Italio it -Italia it -Itaalia it -Italia it -ایتالیا it -Italia it -Italia it -Italie it -Italië it -An Iodáil it -Itália it -×יטליה it -इटली it -Italija it -Olaszország it -Italia it -Ãtalía it -Italia it -イタリア it -អ៊ីážáž¶áž›áž¸ it -ì´íƒˆë¦¬ì•„ it -ອີຕາລີ it -Italija it -ItÄlija it -Италија it -Итали it -Itali it -Italja it -Italia it -Italien it -Italië it -Italia it -Italia it -ਇਟਲੀ it -WÅ‚ochy it -Itália it -Itália it -Italia it -Ð˜Ñ‚Ð°Ð»Ð¸Ñ it -Ubutaliyani it -Itália it -Taliansko it -Italija it -Италија it -Italija it -I-Italy it -Italien it -இதà¯à®¤à®¾à®²à®¿ it -Итолиё it -อิตาลี it -İtalya it -İtalia it -Ð†Ñ‚Ð°Ð»Ñ–Ñ it -Ð˜Ñ‚Ð°Ð»Ð¸Ñ it -à it -ItÃ¥leye it -Ithali it -æ„大利 it -義大利 it -Jamaica jm -Jamaika jm -جامايكا jm -Yamayka jm -Ямайка jm -Ямайка jm -জামাইকা jm -Jamaika jm -Jamajka jm -Jamajka jm -Jamaika jm -Τζαμάικα jm -Jamajko jm -Jamaika jm -جاماییکا jm -Jamaika jm -Jamaïque jm -An Iamáice jm -Xamaica jm -×’'מייקה jm -जमैका jm -Jamajka jm -Jamaika jm -Jamaika jm -Jamaíka jm -Giamaica jm -ジャマイカ jm -ហ្សាម៉ាអ៊ិគ jm -ìžë©”ì´ì¹´ jm -ຈາໄມàºàº² jm -Jamaika jm -Jamaika jm -Јамајка jm -Ямайк jm -Ä amajka jm -Jamaika jm -ਜੈਮੇਕਾ jm -Jamajka jm -Ямайка jm -Jamayika jm -Jamajka jm -Jamajka jm -Јамајка jm -Jamajka jm -I-Jamaica jm -சமெயà¯à®•à¯à®•ா jm -Ҷомойко jm -จาไมà¸à¹‰à¸² jm -Jamaika jm -Jamayka jm -Ямайка jm -Ямайка jm -Djamayike jm -牙买加 jm -牙買加 jm -Jordan jo -Jordaan jo -الأردن jo -İordaniya jo -Ð¯Ñ€Ð´Ð°Ð½Ñ–Ñ jo -Ð™Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo -জরà§à¦¡à¦¾à¦¨ jo -Jordani jo -Jordània jo -Jordán jo -Gwlad Iorddonen jo -Jordanien jo -ΙοÏδανία jo -Jordanio jo -Jordania jo -Jordaania jo -Jordania jo -اردن jo -Jordania jo -Jordanie jo -Jordanië jo -An Iordáin jo -Xordánia jo -ירדן jo -जॉरà¥à¤¡à¤¨ jo -Jordánia jo -Jórdanía jo -Giordania jo -ヨルダン jo -ហ្ស៊កដានី jo -요르단 jo -ຈà»à»àº”ນ jo -Jordanija jo -JordÄnija jo -Јордан jo -Ðрдан jo -Ä ordan jo -Jordanien jo -Jordanië jo -ਜਾਰਡਨ jo -Jordania jo -Jordânia jo -Jordânia jo -Iordania jo -Ð˜Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo -Yorudani jo -Jordánia jo -Jordánsko jo -Jordanija jo -Јордан jo -I-Jordan jo -Jordanien jo -ஜோரà¯à®Ÿà®¾à®©à¯ jo -Урдон jo -จอร์à¹à¸”น jo -Ürdün jo -Ð™Ð¾Ñ€Ð´Ð°Ð½Ñ–Ñ jo -Иордан jo -Djordaneye jo -约旦 jo -ç´„æ—¦ jo -Ijolidani jo -Japan jp -اليابان jp -Yaponiya jp -Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp -Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp -জাপান jp -Japon jp -Japó jp -Japonsko jp -Siapan jp -Ιαπωνία jp -Japanio jp -Japón jp -Jaapan jp -Japonia jp -ژاپن jp -Japani jp -Japon jp -An tSeapáin jp -Xapón jp -יפן jp -जापान jp -Japán jp -Jepang jp -Giappone jp -日本 jp -ជប៉ុន jp -ì¼ë³¸ jp -àºàºµà»ˆàº›àº¸à»ˆàº™ jp -Japonija jp -JapÄna jp -Јапонија jp -Япон jp -Jepun jp -Ä appun jp -Japon jp -ਜਾਪਾਨ jp -Japonia jp -Japão jp -Japão jp -Japonia jp -Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp -Ubuyapani jp -Japána jp -Japonsko jp -Japonska jp -Јапан jp -I-Japan jp -சபà¯à®ªà®¾à®©à¯ jp -Ҷопон jp -à¸à¸µà¹ˆà¸›à¹ˆà¸¸à¸™ jp -Japonya jp -Japan, Yaponia jp -Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp -Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp -Nhật bản jp -Djapon jp -日本 jp -日本 jp -Kenya ke -Kenië ke -كينيا ke -ÐšÐµÐ½Ñ–Ñ ke -ÐšÐµÐ½Ð¸Ñ ke -কেনিয়া ke -Kenija ke -Keňa ke -Cenia ke -Kenia ke -Κένυα ke -Kenjo ke -Kenia ke -کنیا ke -Kenia ke -An Chéinia ke -Kenia ke -×§× ×™×” ke -केनà¥à¤¯à¤¾ ke -Kenija ke -Kenía ke -ケニア ke -កáŸáž“យ៉ា ke -ì¼€ëƒ ke -ເວນດາ ke -Kenija ke -Kenija ke -Кенија ke -ÐšÐµÐ½Ð¸Ñ ke -Kenja ke -Kenia ke -ਕੀਨੀਆ ke -Kenia ke -Quénia ke -Quênia ke -Kenia ke -ÐšÐµÐ½Ð¸Ñ ke -Keňa ke -Kenija ke -Кенија ke -Kenija ke -கெனà¯à®¯à®¾ ke -Куниё ke -เคนยา ke -Kenia ke -ÐšÐµÐ½Ñ–Ñ ke -ÐšÐµÐ½Ð¸Ñ ke -Kenia ke -肯尼亚 ke -肯亞 ke -Kyrgyzstan kg -قيرغيزستان kg -КыргызÑтан kg -КиргизÑтан kg -কিরà§à¦—িজসà§à¦¤à¦¾à¦¨ kg -Kirgistan kg -Kirgistan kg -Kyrgigstan kg -Kyrgyzstán kg -Cyrgystan kg -Kirgizistan kg -Kirgisien kg -ΚιÏγιζιστάν kg -Kirgizujo kg -Kyrgyzstán kg -Kõrgõzstan kg -قرقیزستان kg -Kirghizstan kg -An Chirgeastáin kg -Kirguizistán kg -קירגיסטן kg -किरà¥à¤—िजिसà¥à¤¤à¤¾à¤¨ kg -Kirgizisztán kg -Kirgisistan kg -Kirghizistan kg -キルギスタン kg -គៀរហ្គីស្ážáž„់ kg -키르기스스탄 kg -ຄສິຕັລ kg -Kirgistanas kg -KirgizstÄna kg -КиргиÑтан kg -КиргизÑтан kg -Kirgiżstan kg -Kirgisistan kg -Kirgisien kg -Kirgizië kg -Kirgisistan kg -ਕਿਰਗਸਤਾਨ kg -Kigistan kg -Quirguistão kg -Quirguistão kg -Kirgiztan kg -КиргизÑтан kg -Kirigizisitani kg -Kirgisistan kg -Kirgizstan kg -КиргиÑтан kg -Kirgistan kg -Kirgizistan kg -கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯ kg -ҚирғизиÑтон kg -คีจิสถาน kg -Kırgızistan kg -Qırğızstan kg -КиргизÑтан kg -ҚирғизиÑтон kg -Kirguiztan kg -å‰å°”剿–¯æ–¯å¦ kg -å‰çˆ¾å‰æ–¯ kg -Cambodia kh -Kambodië kh -كمبوديا kh -Камбоджа kh -Камбоджа kh -কামবোডিয়া kh -Kambodj kh -KamboÄ‘a kh -Cambodja kh -Kambodža kh -Kambodscha kh -Καμπότζη kh -KamboÄo kh -Kambodža kh -Canbodia kh -کامبوج kh -Kambodza kh -Cambodge kh -Cambodja kh -An Chambóid kh -Camboia kh -קמבודיה kh -कमà¥à¤¬à¥‹à¤¡à¤¿à¤¯à¤¾ kh -KamboÄ‘a kh -Kambodzsa kh -Kambódía kh -Cambogia kh -カンボジア kh -កម្ពុជា kh -캄보디아 kh -ໂຄລຳເບີຠkh -Kambodža kh -Kambodža kh -Камбоџа kh -Камбодиа kh -Kemboja kh -Kambodja kh -Kambodsja kh -Kambodscha kh -Cambodja kh -Kambodsja kh -ਕੰਬੋਡੀਆ kh -Kambodża kh -Cambodja kh -Cambodja kh -Cambogia kh -Камбоджа kh -Kamboji kh -Kamboža kh -Kambodža kh -Kambodža kh -Камбоџа kh -Kambodža kh -Kambodja kh -கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®¾ kh -Камбуҷа kh -à¸à¸±à¸¡à¸žà¸¹à¸Šà¸² kh -Kamboçya kh -Kambodia kh -Камбоджа kh -Камбоджа kh -Cam pu chia kh -Cambodje kh -柬埔寨 kh -柬埔寨 kh -Kiribati ki -كيريباتي ki -Кiрыбацi ki -Кирибати ki -কিরিবাটি ki -Ciribati ki -ΚιÏιμπάτι ki -Kiribato ki -کیریباتی ki -Ciribeas ki -קיריב×טי ki -किरीबाती ki -Kíribatí ki -キリãƒã‚¹ ki -គិរិបាទី ki -키리바시 ki -à»àºŸàº„ທັລ - K ki -Кирибати ki -Крибати ki -ਕਿਰਿਬਟੀ ki -Кирибати ki -Кирибати ki -கிரிபடி ki -Карибот ki -คิริบาติ ki -Кірібаті ki -Кирибати ki -基里巴斯 ki -å‰é‡Œå·´æ–¯ ki -Comoros km -جزر القمر km -Каморы km -КоморÑки оÑтрови km -কমোরস km -Komoros km -Komori km -Komory km -Ynysoedd Y Comoros km -Comorerne km -Komoren km -ΚομόÏες km -Komoroj km -Komoorid km -کوموروس km -Komorit km -Comores km -Na Comóir km -קומורוס km -कोमोरो km -Kómoreyjar km -Comore km -コモロ km -កុំម៉ូរ៉ូស km -코모로 km -ສີ km -Komoru salas km -КоморÑки оÑтрови km -Ð¡Ð¾Ð¼Ð¾Ñ€Ð¾Ñ km -Komoros km -Komorene km -Komoren km -Komorane km -ਕੋਮੋਰੋਸ km -Komory km -КоморÑкие оÑтрова km -Komore km -Komorot km -Komori km -Комора km -Komora km -Komorerna km -காமாரோஸ௠km -ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km -โคโมรอส km -Komoros km -Komorlar km -КоморÑькі оÑтрови km -ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km -Comores km -ç§‘æ‘©ç½— km -葛摩 km -St. Kitts and Nevis kn -St. Kitts en Nevis kn -سانت كيتس Ùˆ نيÙيس kn -St. Kitts vÉ™ Nevis kn -СÑнт-КрыÑтофер Ñ– ÐÑÐ²Ñ–Ñ kn -Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -সেনà§à¦Ÿ কিটস à¦à¦¬à¦‚ নেভিস kn -S. Kitts ha Nevis kn -St. Kitts i Nevis kn -Sv. Kitts a Nevis kn -Ynysoedd St. Kitts a Nevis kn -St. Kitts-Nevis kn -St. Kitts und Nevis kn -Άγιος ΧÏιστόφοÏος (Σαιντ Κιτς) και Îέβις kn -Sent-Kristofo kaj Neviso kn -St. Kitts y Nevis kn -St. Kitts ja Nevis kn -St. Kitts eta Nevis kn -سن کیتس Ùˆ نویس kn -St. Kitts ja Nevis kn -St Kitts et Nevis kn -St. Kitts en Nevis kn -San Críostóir Nimheas kn -Saint Kitts e Nevis kn -סנט קיטס ונביס kn -सेंट किटà¥à¤¸ तथा नेविस kn -St. Kitts és Nevis kn -St. Kitts dan Nevis kn -Sankti Kristófer og Nevis kn -Saint Kitts e Nevis kn -セントクリストファーãƒã‚¤ãƒ“ス kn -សង់ឃីហនិង áž“áŸážœáž¸ážŸ kn -세ì¸íЏ 키츠 네비스 kn -Å v. Kitts ir Nevis kn -Senkitsa un Nevisa kn -Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -St. ÐšÐ¸Ñ‚Ñ‚Ñ Ð±Ð° ÐÐµÐ²Ð¸Ñ kn -St. Kitts u Nevis kn -St. Kitts og Nevis kn -St. Kitts un Nevis kn -St. Kitts en Nevis kn -St. Kitts og Nevis kn -St. Kitts le Nevis kn -St. Kitts e Nevis kn -ਸੇਂਟ ਕਿਟਸ ਤੇ ਨਿਵੀਸ kn -St. Kitts e Nevis kn -St Kitts e Nevis kn -Sf. Kitts ÅŸi Nevis kn -Сент-ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -Mutagatifu Kitsi na Nevisi kn -St. Kitts ja Nevis kn -St. Kitts a Nevis kn -St. Kitts in Nevis kn -Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -Sv. Kits i Nevis kn -I-St. Kitts and Nevis kn -St. Kitts och Nevis kn -செயினà¯à®Ÿà¯ கிடà¯à®šà¯ & நெவிச௠kn -Синт ÐšÐ¸Ñ‚Ñ‚Ñ Ð²Ð° ÐÐµÐ²Ð¸Ñ kn -เซนต์à¸à¸´à¸•ส์à¹à¸¥à¸°à¹€à¸™à¸§à¸´à¸ª kn -St. Kitts ve Nevis kn -Santa Kitts wä Nevis kn -Ð¤ÐµÐ´ÐµÑ€Ð°Ñ†Ñ–Ñ Ð¡ÐµÐ½Ñ‚-ÐšÑ–Ñ‚Ñ Ñ– ÐÐµÐ²Ñ–Ñ kn -Сент-КриÑтофер ва ÐÐµÐ²Ð¸Ñ kn -St. Kitts na Nevis kn -St. Kitts và Nevis kn -St. Kitts neNevis kn -圣基茨和尼维斯 kn -è–å…‹ç†æ–¯å¤šç¦åŠå°¼ç¶­æ–¯ kn -St. Kitts kanye no-Nevis kn -North Korea kp -Noord Korea kp -كوريا الشمالية kp -Åžimali Koreya kp -ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ ÐšÐ°Ñ€ÑÑ kp -Северна ÐšÐ¾Ñ€ÐµÑ kp -উতà§à¦¤à¦° কোরিয়া kp -Norzh-Korea kp -Sjeverna Koreja kp -Corea del Nord kp -Severní Korea kp -Gogledd Corea kp -Nordkorea kp -Nord-Korea kp -Î’ÏŒÏεια ΚοÏέα kp -Nordkoreo kp -Corea del Norte kp -Põhja-Korea kp -Ipar Korea kp -کره شمالی kp -Pohjois-Korea kp -Norðurkorea kp -Corée du nord kp -Noard-Korea kp -An Chóiré Thuaidh kp -Corea do Norte kp -צפון קורי××” kp -उतà¥à¤¤à¤°à¥€ कोरिया kp -Sjeverna Koreja kp -Észak-Korea kp -Korea Utara kp -Norður-Kórea kp -Corea del Nord kp -æœé®®æ°‘主主義人民共和国 kp -កូរ៉áŸâ€‹ážáž¶áž„​ជើង kp -ì¡°ì„ ë¯¼ì£¼ì£¼ì˜ ì¸ë¯¼ê³µí™”êµ­ kp -ເàºàº»àº²àº¥àºµà»€àº«àº™àº·àº­ kp -Å iaurÄ—s KorÄ—ja kp -ZiemeļKoreja kp -Северна Кореја kp -Хойд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kp -Korea ta' Fuq kp -Nord-Korea kp -Noordkorea kp -Noord-Korea kp -Nord-Korea kp -Lebowa la Korea kp -Corea dèu Nord kp -ਉੱਤਰੀ ਕੋਰੀਆ kp -Korea Północna kp -Coreia do Norte kp -Coréia do Norte kp -Coreea de Nord kp -Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kp -Koreya y'Amajyaruguru kp -Davvi-Korea kp -severná Kórea kp -Severna Koreja kp -Северна Кореја kp -Severna Koreja kp -I-North Korea kp -Nordkorea kp -வட கொரியா kp -КореÑи Шимолӣ kp -เà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­ kp -Kuzey Kore kp -Tönyaq Korea kp -Північна ÐšÐ¾Ñ€ÐµÑ kp -Шимолий ÐšÐ¾Ñ€ÐµÑ kp -Devhula ha Korea kp -Bắc Triá»u Tiên kp -Bijhe Corêye kp -Umntla Korea kp -æœé²œ kp -北韓 kp -Enyakatho ne-Korea kp -South Korea kr -Suid Korea kr -كوريا الجنوبية kr -CÉ™nubi Koreya kr -ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ ÐšÐ°Ñ€ÑÑ kr -Южна ÐšÐ¾Ñ€ÐµÑ kr -দকà§à¦·à¦¿à¦£ কোরিয়া kr -Su-Korea kr -Južna Koreja kr -Corea del Sud kr -Jižní Korea kr -De Corea kr -Sydkorea kr -Süd-Korea kr -Îότια ΚοÏέα kr -Sudkoreo kr -Corea del Sur kr -Lõuna-Korea kr -Hego Korea kr -کره جنوبی kr -Etelä-Korea kr -Suðurkorea kr -Corée du sud kr -Sûd-Korea kr -An Chóiré Theas kr -Corea do Sur kr -×“×¨×•× ×§×•×¨×™××” kr -दकà¥à¤·à¤¿à¤£à¥€ कोरिया kr -Južna Koreja kr -Dél-Korea kr -Korea Selatan kr -Suður-Kórea kr -Corea del Sud kr -大韓民国 kr -កូរ៉áŸâ€‹ážáž¶áž„​ážáŸ’បូង kr -대한민국 kr -ເàºàº»àº²àº¥àºµà»ƒàº•້ kr -Pietų KorÄ—ja kr -DievidKoreja kr -Јужна Кореја kr -Өмнөд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kr -Korea t'Isfel kr -Sør-Korea kr -Söödkorea kr -Zuid-Korea kr -Sør-Korea kr -Borwa bja Korea kr -Corea dèu Sud kr -ਦੱਖਣੀ ਕੋਰੀਆ kr -Korea PoÅ‚udniowa kr -Coreia do Sul kr -Coréia do Sul kr -Coreea de Sud kr -Ð®Ð¶Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kr -Koreya y'Amajyepfo kr -Lulli-Korea kr -Južná Kórea kr -Južna Koreja kr -Јужна Кореја kr -Južna Koreja kr -I-South Korea kr -Sydkorea kr -தென௠கொரியா kr -КореÑи Ҷанубӣ kr -เà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้ kr -Güney Kore kr -Könyaq Korea kr -Південна ÐšÐ¾Ñ€ÐµÑ kr -Жанубий ÐšÐ¾Ñ€ÐµÑ kr -Korea tshipembe kr -Hàn Quốc kr -Nonne Corêye kr -Umzantsi Korea kr -韩国 kr -å—韓 kr -Emzansi Korea kr -Kuwait kw -Kuwaït kw -الكويت kw -КувÑйт kw -Кувейт kw -কà§à§Ÿà§‡à¦¤ kw -Kowaet kw -Kuvajt kw -Kuvajt kw -Coweit kw -Κουβέιτ kw -Kuvajto kw -Kuveit kw -کویت kw -Kuvait kw -Kowait kw -Koeweit kw -Cuáit kw -כווית kw -कà¥à¤µà¥ˆà¤¤ kw -Kuvajt kw -Kuvait kw -Kúveit kw -クェート kw -គុយវ៉ែហkw -쿠웨ì´íЏ kw -à»àº•້ມຮູບ- K kw -Kuveitas kw -Kuveita kw -Кувајт kw -Кувейт kw -Koeweit kw -ਕà©à¨µà©ˆà¨¤ kw -Koweit kw -Kuveit kw -Кувейт kw -Koweti kw -Kuvajt kw -Kuvajt kw -Кувајт kw -Kuvajt kw -I-Kuwait kw -கà¯à®µà¯ˆà®¤à¯ kw -Қувейт kw -คูเวต kw -Küwäyt kw -KКувейт kw -Кувайт kw -Kuweyt kw -ç§‘å¨ç‰¹ kw -ç§‘å¨ç‰¹ kw -Cayman Islands ky -Cayman Eilande ky -جزر الكايمان ky -Кайманови оÑтрови ky -কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ky -Inizi Kaeman ky -Kajmanska ostrva ky -Illes Caimà ky -Kajmanské ostrovy ky -Ynysoedd Caiman ky -Cayman-øerne ky -Kaiman-Inseln ky -Îησιά Κάυμαν ky -Kejmanoj ky -Islas Caimán ky -Kaimanisaared ky -Kaiman Irlak ky -جزایر Ú©Ùیمن ky -Cayman-saaret ky -ÃŽles Caïman ky -Kaaiman Eilannen ky -Oileáin na gCadhman ky -Illas Caimán ky -××™×™ קיימן ky -केमन आइलैंड ky -Kajmanski Otoci ky -Kajmán-szigetek ky -Cayman-eyjar ky -Isole Cayman ky -英領ケイマン諸島 ky -កោះ​កៃម៉ាន ky -ì¼€ì´ë§¨ ì œë„ ky -ຄາຕາລັນ ky -Kaimanų salos ky -Kaimanu salas ky -КајманÑки ОÑтрови ky -Cayman арлууд ky -Gżejjer Cayman ky -Caymanøyene ky -Kayman-Inseln ky -Kaaiman Eilanden ky -Caymanøyane ky -ਕਾਅਮਾਨ ਟਾਪੂ ky -Kajmany ky -Ilhas Caimão ky -Ilhas Cayman ky -Insulele Cayman ky -Каймановы оÑтрова ky -Ibirwa bya Kayimani ky -Caymansullot ky -Kajmanske Ostrovy ky -Kajmanski otoki ky -КајманÑка оÑтрва ky -Kajmanska ostrva ky -Caymanöarna ky -கேமான௠தீவà¯à®•ள௠ky -Ҷазираи Кайман ky -หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™ ky -Cayman Adaları ky -Kayman Utrawları ky -Кайман оÑтрів ky -Кайман Ороллари ky -Iyes Cayman ky -开曼群岛 ky -開曼群島 ky -Kazakhstan kz -كازاخستان kz -КазахÑтан kz -КазахÑтан kz -কাজাকসà§à¦¤à¦¾à¦¨ kz -Kazakstan kz -Kazahstan kz -Kazachstán kz -Casacstan kz -Kasachstan kz -Καζακστάν kz -KazaÄ¥ujo kz -Kazakhstán kz -Kasahstan kz -قزاقستان kz -Kazakstan kz -Kazachstan kz -An Chasacstáin kz -Kazaxistán kz -קזחסט×ן kz -कज़ाखिसà¥à¤¤à¤¾à¤¨ kz -Kazahstan kz -Kazahsztán kz -Kasakstan kz -Kazakistan kz -カザフスタン kz -កាហ្សាក់ស្ážáž„់ kz -ì¹´ìží스탄 kz -à»àºà»àº¥àºàº•ິຠ- K kz -Kazachstanas kz -KazahstÄna kz -КазакÑтан kz -Казак kz -Każakstan kz -Kasakhstan kz -Kasachstan kz -Kazachstan kz -Kasakhstan kz -ਕਾਜ਼ਾਕਸਤਾਨ kz -Kazachstan kz -Cazaquistão kz -Cazaquistão kz -Cazahstan kz -КазахÑтан kz -Kazakisitani kz -Kasakhstan kz -Kazachstan kz -Kazahstan kz -КазахÑтан kz -Kazahstan kz -Kazakstan kz -கஜஸà¯à®¤à®¾à®©à¯` kz -ҚазоқиÑтон kz -คาซัคสถาน kz -Kazakistan kz -Qazaqstan kz -КазахÑтан kz -ҚозоғиÑтон kz -Kazaxhtan kz -哈è¨å…‹æ–¯å¦ kz -哈薩克 kz -Laos la -لاوس la -Ð›Ð°Ð¾Ñ la -Ð›Ð°Ð¾Ñ la -লাওস la -Λάος la -Laoso la -لائوس la -Láós la -ל×וס la -लाओस la -Laosz la -ラオス la -ឡាវ la -ë¼ì˜¤ìФ la -ລາວ la -Laosas la -Laosa la -Ð›Ð°Ð¾Ñ la -Ð›Ð°Ð¾Ñ la -ਲਿਉਸ la -Ð›Ð°Ð¾Ñ la -Lawosi la -Ð›Ð°Ð¾Ñ la -லாஸ௠la -Ð›Ð°Ð¾Ñ la -ลาว la -Ð›Ð°Ð¾Ñ la -Ð›Ð°Ð¾Ñ la -Lào la -Lawosse la -è€æŒ la -寮國 la -Lebanon lb -Libanon lb -لبنان lb -Ліван lb -Ливан lb -লেবানন lb -Liban lb -Liban lb -Líban lb -Libanon lb -Libanus lb -Libanon lb -Libanon lb -Λίβανος lb -Libano lb -Líbano lb -Liibanon lb -Libano lb -لبنان lb -Libanon lb -Libanon lb -Liban lb -Libanon lb -An Liobáin lb -Líbano lb -לבנון lb -लेबनान lb -Libanon lb -Libanon lb -Líbanon lb -Libano lb -レãƒãƒŽãƒ³ lb -លីបង់ lb -레바논 lb -ເດນ່ງນ lb -Libanas lb -LibÄna lb -Либан lb -Либанон lb -Lubnan lb -Libanu lb -Libanon lb -Libanon lb -Libanon lb -Libanon lb -ਲਿਬਨਾਨ lb -Liban lb -Líbano lb -Líbano lb -Liban lb -Ливан lb -Libani lb -Libanon lb -Libanon lb -Libanon lb -Либан lb -Liban lb -I-Lebanon lb -Libanon lb -லெபனான௠lb -Лубнон lb -เลบานอน lb -Ліван lb -Лебанон lb -Li Băng lb -Liban lb -黎巴嫩 lb -黎巴嫩 lb -St. Lucia lc -سانت لوسيا lc -СÑнт-ЛюÑÑ–Ñ lc -Св. Ð›ÑƒÑ‡Ð¸Ñ lc -সেনà§à¦Ÿ লà§à¦¸à¦¿à§Ÿà¦¾ lc -S. Lucia lc -Svatá Lucie lc -St. Lwsia lc -Σάντα Λουτσία lc -Sent-Lucio lc -Santa Lucía lc -سن لوسیا lc -Sankta Lusia lc -Sainte Lucie lc -San Lúisia lc -Santa Lucia lc -סנטה לוסיה lc -सेंट लूसिया lc -Sankti Lúsía lc -Santa Lucia lc -セントルシア lc -សង់លូស៊ីយ៉ា lc -세ì¸íЏ 루시아 lc -ເຊັນລູເຊີຠlc -Å v Liucija lc -Sv. LÅ«cija lc -Св. Луција lc -St. ЛуÑиа lc -St. LuÄ‹ija lc -ਸੇਂਟ ਲੂਉਸ lc -Santa Lúcia lc -Santa Lúcia lc -Sf. Lucia lc -Сент-ЛюÑÐ¸Ñ lc -Mutagatifu Lusiya lc -Sv. Júlia lc -Sv. Lucija lc -Св. Луција lc -Sv. Lucija lc -I-St. Lucia lc -செனà¯à®Ÿà¯ லூசியா lc -Синт ЛуÑиё lc -เซนต์ลูเซีย lc -Santa Lüçiä lc -Сент-ЛюÑÑ–Ñ lc -Сент-ЛюÑÐ¸Ñ lc -Ste Luceye lc -圣å¢è¥¿äºš lc -è–露西亞 lc -Liechtenstein li -ليشتنشتاين li -ЛіхтÑнштÑйн li -Лихтенщайн li -লিখটেনসà§à¦Ÿà¦¾à¦‡à¦¨ li -LihtenÅ¡tajn li -LichtenÅ¡tejnsko li -Λίχτενσταϊν li -LiÄ¥tenÅtejno li -Liechtestein li -لیختن اشتاین li -An Lichtinstéin li -ליכטנשטין li -लिचटेनसà¥à¤Ÿà¥€à¤¨ li -LihtenÅ¡tajn li -リヒテンシュタイン li -លិចទáŸáž“ស្ážáŸ‚áž“ li -리히í…ìŠˆíƒ€ì¸ li -ຟ້າà»àº¡àºš li -LichtenÅ¡teinas li -LihtenÅ¡teina li -Лихтенштајн li -ЛихтÑнштайн li -Liechtensteen li -ਲੀਚਟੀਨਸਟੀਨ li -Lichtensztajn li -Лихтенштейн li -Liyeshitensiteyini li -Лихтенштајн li -LihtenÅ¡tajn li -லசà¯à®šà¯†à®©à¯à®¸à¯à®Ÿà¯†à®©à¯ li -Лихтанштоин li -ลิชเทนสไตน์ li -LihtenÅŸtayn li -Lihtenstein li -Ліхтенштейн li -Лихтенштейн li -Lîchtensteyn li -列支敦士登 li -列支敦斯登 li -Sri Lanka lk -سريلانكا lk -Шры-Ланка lk -Шри Ланка lk -শà§à¦°à§€à¦²à¦™à§à¦•া lk -Å ri Lanka lk -Srí Lanka lk -Sri Lanca lk -ΣÏι Λάνκα lk -Sri-Lanko lk -سریلانکا lk -Srí Lanca lk -סרי לנקה lk -शà¥à¤°à¥€ लंका lk -Å ri Lanka lk -Srí Lanka lk -スリランカ lk -ស្រីលង្កា lk -스리랑카 lk -ເຊີເບີຠlk -Å ri Lanka lk -Å rilanka lk -Шри Ланка lk -Шириланк lk -ਸà©à¨°à©€à¨²à©°à¨•ਾ lk -Шри-Ланка lk -Siri Lanka lk -Å ri Lanka lk -Шри Ланка lk -Å ri Lanka lk -இலஙà¯à®•ை lk -Сри Лонко lk -ศรีลังà¸à¸² lk -Åžri Lanka lk -Шрі-Ланка lk -Шри Ланка lk -æ–¯é‡Œå…°å¡ lk -æ–¯é‡Œè˜­å¡ lk -Liberia lr -Liberië lr -ليبيريا lr -ЛібÑÑ€Ñ‹Ñ lr -Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr -লাইবেরিয়া lr -Liberija lr -Libèria lr -Libérie lr -ΛιβεÏία lr -Liberio lr -Libeeria lr -لیبریا lr -Libéria lr -An Libéir lr -Libéria lr -לוב lr -लाइबेरिया lr -Liberija lr -Libéria lr -Líbería lr -リベリア lr -លីបáŸážšáž¸áž™áŸ‰áž¶ lr -ë¼ì´ë² ë¦¬ì•„ lr -ລິຊາ lr -LibÄ“rija lr -Либерија lr -Либери lr -Liberja lr -ਲੀਬਿਰੀਆ lr -Libéria lr -Libéria lr -Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr -Liberiya lr -Lýbia lr -Liberija lr -Либерија lr -Liberija lr -லிபிரியா lr -Либериё lr -ไลบีเรีย lr -Liberya lr -Ð›Ñ–Ð±ÐµÑ€Ñ–Ñ lr -Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr -利比里亚 lr -賴比瑞亞 lr -Lesotho ls -ليسوتو ls -ЛеÑота ls -ЛеÑото ls -লেসোথো ls -Lesoto ls -Lesoto ls -Λεσόθο ls -Lesoto ls -Lesoto ls -لسوتو ls -Leosóta ls -Lesoto ls -לסוטו ls -लेसोथो ls -Lesótó ls -レソト ls -áž¡áŸážŸáž¼ážáž¼ ls -레소토 ls -ທົດສອບ ls -Lesoto ls -ЛеÑото ls -ЛиÑото ls -Leżoto ls -ਲਿਉਥੂ ls -Lesoto ls -Lesoto ls -Lesoto ls -ЛеÑото ls -Lesoto ls -Lesoto ls -ЛеÑото ls -Lesoto ls -லஸொதோ ls -ЛиÑуту ls -เลโซโต ls -Lesoto ls -Lesoto ls -ЛеÑото ls -ЛеÑото ls -Lessoto ls -莱索托 ls -賴索扥 ls -Lithuania lt -Lithuanië lt -ليتوانيا lt -Litvaniya lt -Літва lt -Литва lt -লিথà§à§Ÿà§‡à¦¨à¦¿à§Ÿà¦¾ lt -Lituani lt -Litvanija lt -Lituània lt -Litva lt -Lithwania lt -Litauen lt -Litauen lt -Λιθουανία lt -Litovio lt -Lituania lt -Leedu lt -Lituania lt -لیتوانی lt -Liettua lt -Lituanie lt -Litouwen lt -An Liotuáin lt -Lituánia lt -×œ×™×˜× lt -लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾ lt -Litva lt -Litvánia lt -Litháen lt -Lituania lt -リトアニア lt -លីទុយអានី lt -리투아니아 lt -ລິທົ່ວເນີຠlt -Lietuva lt -Lietuva lt -Литванија lt -Литва lt -Litwanja lt -Litauen lt -Litauen lt -Litouwen lt -Litauen lt -ਲੀਥੂਨੀਆ lt -Litwa lt -Lituânia lt -Lituânia lt -Lituania lt -Литва lt -Litwaniya lt -Lietuva lt -Litva lt -Litva lt -Литванија lt -Litvanija lt -I-Lithuania lt -Litauen lt -லிதà¯à®¤à¯à®µà¯‡à®©à®¿à®¯à®¾ lt -Литвониё lt -ลิธัวเนีย lt -Litvanya lt -Lituania lt -Литва lt -Литва lt -Litwaneye lt -ç«‹é™¶å®› lt -ç«‹é™¶å®› lt -Luxembourg lu -Luxenburg lu -لوكسمبورغ lu -Lüksemburq lu -ЛюкÑÑмбург lu -ЛюкÑембург lu -লাকà§à¦¸à§‡à¦®à¦¬à§à¦°à§à¦— lu -Luksembourg lu -Luksemburg lu -Luxemburg lu -Lucembursko lu -Lwcsembwrg lu -Luxemburg lu -ΛουξεμβοÏÏγο lu -Luksemburgo lu -Luxemburgo lu -Luksemburg lu -Luxenburgo lu -لوگزامبورگ lu -Luxemburg lu -Luksemborg lu -Luxemburg lu -Lucsamburg lu -Luxemburgo lu -לוקסמבורג lu -लकà¥à¤¸à¤®à¤¬à¤°à¥à¤— lu -Luksemburg lu -Luxemburg lu -Lúxemborg lu -Lussemburgo lu -ルクセンブルグ lu -លុចហ្សំបួរ lu -ë£©ì…ˆë¶€ë¥´í¬ lu -ລັàºà»àºŠàº¡à»€àºšàºµàº lu -Liuksemburgas lu -Luksemburga lu -ЛукÑембург lu -ЛюкÑембүрг lu -Lussemburgu lu -Luxemborg lu -Luxemburg lu -ਲਕਸ਼ਮਬਰਗ lu -Luksemburg lu -Luxemburgo lu -Luxemburgo lu -Luxemburg lu -ЛюкÑембург lu -Lugizamburu lu -Luxemburg lu -Luxemburg lu -Luksemburg lu -ЛукÑембург lu -Luksemburg lu -I-Luxembourg lu -Luxemburg lu -லகà¯à®šà®®à¯à®ªà¯‹à®°à¯à®•௠lu -Лукзамбург lu -ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸­à¸£à¹Œà¸ lu -Lüksemburg lu -Lüksemburg lu -ЛюкÑембург lu -ЛюкÑембург lu -Lussimbork lu -墿£®å ¡ lu -盧森堡 lu -Latvia lv -لاتÙيا lv -Latviya lv -Ð›Ð°Ñ‚Ð²Ñ–Ñ lv -Ð›Ð°Ñ‚Ð²Ð¸Ñ lv -লাতভিয়া lv -Latvija lv -Letònia lv -LotyÅ¡sko lv -Latfia lv -Letland lv -Lettland lv -Λεττονία lv -Latvio lv -Letonia lv -Läti lv -لاتویا lv -Lettonie lv -Letland lv -An Laitvia lv -Letónia lv -לטביה lv -लाटविया lv -Latvija lv -Lettország lv -Lettland lv -Lettonia lv -ラトビア lv -ឡាážážœáž¸áž™áŸ‰áž¶ lv -ë¼íŠ¸ë¹„ì•„ lv -ລັດເວີຠlv -Latvija lv -Latvija lv -Латвија lv -Латви lv -Latvja lv -Lettland lv -Letland lv -ਲਾਟਵੀਆ lv -Åotwa lv -Letónia lv -Ð›Ð°Ñ‚Ð²Ð¸Ñ lv -Lativiya lv -Látvia lv -LotyÅ¡sko lv -Latvija lv -Латвија lv -Latvija lv -I-Latvia lv -Lettland lv -லடà¯à®µà®¿à®¯à®¾ lv -Латвонӣ lv -ลัธเวีย lv -Litvanya lv -Ð›Ð°Ñ‚Ð²Ñ–Ñ lv -Ð›Ð°Ñ‚Ð²Ð¸Ñ lv -Lativia lv -Letoneye lv -拉脱维亚 lv -拉脫維亞 lv -Libya ly -Libië ly -ليبيا ly -Ð›Ñ–Ð²Ñ–Ñ ly -Ð›Ð¸Ð±Ð¸Ñ ly -লিবিয়া ly -Julia ly -Libija ly -Líbia ly -Lýbie ly -Libia ly -Libyen ly -Libyen ly -ΛιβÏη ly -Libio ly -Libia ly -Liibüa ly -Libia ly -لیبی ly -Lybie ly -Libië ly -An Libia ly -Líbia ly -לוב ly -लीबिया ly -Libija ly -Líbia ly -Líbía ly -Libia ly -リビア ly -លីប៊ី ly -리비아 ly -ລິຊາ ly -Libija ly -LÄ«bija ly -Либија ly -Ð›Ð¸Ð±Ñ ly -Libja ly -Libyen ly -Libië ly -ਲੀਬੀਆ ly -Libia ly -Líbia ly -Líbia ly -Libia ly -Ð›Ð¸Ð²Ð¸Ñ ly -Libiya ly -Lýbia ly -Libija ly -Либија ly -Libija ly -I-Libya ly -Libyen ly -லிபியா ly -Ð›Ð¸Ð±Ð¸Ñ ly -ลิเบีย ly -Libia ly -Ð›Ñ–Ð²Ñ–Ñ ly -Ð›Ð¸Ð±Ð¸Ñ ly -Libeye ly -利比亚 ly -利比亞 ly -Morocco ma -Morokko ma -المغرب ma -Марока ma -Мароко ma -মরকà§à¦•à§‹ ma -Marok ma -Maroko ma -Marroc ma -Maroko ma -Moroco ma -Marokko ma -Marokko ma -ΜαÏόκο ma -Maroko ma -Marruecos ma -Maroko ma -Maroko ma -مراکش ma -Marokko ma -Marokko ma -Maroc ma -Marokko ma -Maracó ma -Marrocos ma -מרוקו ma -मोरकà¥à¤•ो ma -Maroko ma -Marokkó ma -Marokkó ma -Marocco ma -モロッコ ma -ម៉ារ៉ុក ma -모로코 ma -ເມົາລິ ma -Marokas ma -Maroka ma -Мароко ma -Морокко ma -Marokk ma -Marokko ma -Marokko ma -Marokko ma -Marokko ma -ਮੋਰਕੋ ma -Maroko ma -Marrocos ma -Marrocos ma -Maroc ma -Марокко ma -Maroke ma -Marokko ma -Maroko ma -Maroko ma -Мароко ma -Maroko ma -I-Morocco ma -Marocko ma -மோராகோ ma -Марокко ma -โมร็อคโค ma -Morokko ma -Марокко ma -Марокаш ma -Ma rốc ma -Marok ma -摩洛哥 ma -摩洛哥 ma -Monaco mc -Monako mc -موناكو mc -Манака mc -Монако mc -মোনাকো mc -Monako mc -Monako mc -Mònaco mc -Monako mc -Μονακό mc -Monako mc -Mónaco mc -موناکو mc -Monacó mc -Mónaco mc -מונקו mc -मोनेको mc -Monako mc -Mónakó mc -モナコ mc -ម៉ូណាកូ mc -모나코 mc -ເມົາລິ mc -Monakas mc -Monako mc -Монако mc -Монако mc -Monako mc -ਮੋਨਕੋ mc -Monako mc -Mónaco mc -Mônaco mc -Монако mc -Monako mc -Monako mc -Monako mc -Монако mc -Monako mc -மனாகோ mc -Монако mc -โมนาโค mc -Monako mc -Manako mc -Монако mc -Монако mc -摩纳哥 mc -æ‘©ç´å“¥ mc -Moldova md -Ù…ÙˆÙ„Ø¯ÙˆÙØ§ md -Малдова md -ÐœÐ¾Ð»Ð´Ð°Ð²Ð¸Ñ md -মলডোভা md -Moldavi md -Moldàvia md -Moldávie md -Moldofa md -Moldawien md -Μολδαβία md -Moldavujo md -Moldavia md -Moldavia md -مولداوی md -Moldavie md -An Mholdóiv md -Moldávia md -מולדובה md -मॉलà¥à¤¦à¥‹à¤µà¤¾ md -Moldóva md -Moldavia md -モルドムmd -ម៉ុលដូវ៉ា md -몰ë„ë°” md -ສະໂລວັຠmd -MoldÄvija md -Молдавија md -Молдав md -Moldavja md -Moldawien md -Moldavië md -ਮੋਡੋਵਾ md -MoÅ‚dawia md -Moldávia md -Молдова md -Molidova md -Moldávsko md -Молдавија md -Moldavija md -Moldavien md -மாலà¯à®Ÿà¯‹à®µà®¾ md -Молдавӣ md -มอลโดวา md -Молдова md -Молдова md -摩尔多瓦 md -摩爾多瓦 md -Madagascar mg -Madagaskar mg -مدغشقر mg -МадагаÑкар mg -МадагаÑкар mg -মাদাগাসà§à¦•ার mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -ΜαδαγασκάÏη mg -Madagaskaro mg -Madagaskar mg -ماداگاسکار mg -Madagaskar mg -מדגסקר mg -मेडागासà¥à¤•र mg -Madagaskar mg -Madagaszkár mg -Madagaskar mg -マダガスカル mg -ម៉ាដាហ្កាស្ការ mg -마다카스카르 mg -ຄາສະບາລ - K mg -Madagaskaras mg -Madagaskara mg -МадаÑкар mg -МадагаÑкар mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -ਮੈਡਾਗਾਸਕਰ mg -Madagaskar mg -Madagáscar mg -МадагаÑкар mg -Madagasikari mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -МадагаÑкар mg -Madagaskar mg -Madagaskar mg -மடகஸà¯à®•ார௠mg -МадогоÑкор mg -มาดาà¸à¸±à¸ªà¸à¸² mg -Madagaskar mg -Madagaskar mg -МадагаÑкар mg -МадагаÑкар mg -马达加斯加 mg -馬é”加斯加 mg -Marshall Islands mh -Marshall EIlande mh -جزر مارشال mh -Маршалавы аÑтравы mh -МаршалÑки оÑтрови mh -মারশাল দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ mh -Inizi Marshall mh -MarÅ¡alova ostrva mh -Illes Marshall mh -Marshallovy ostrovy mh -Ynysoedd Marshall mh -Marshall-øerne mh -Marshall-Inseln mh -Îησιά ΜάÏσαλ mh -MarÅaloj mh -Islas Marshall mh -Marshalli saared mh -Marshall Irlak mh -جزایر مارشال mh -Marshallinsaaret mh -ÃŽles Marshall mh -Marshall Eilânen mh -Oileáin Mharshall mh -Illas Marshall mh -××™×™ מרשל mh -मारà¥à¤¶à¤² आइलैंड mh -Marshall Otoci mh -Marshall-szigetek mh -Marshall-eyjar mh -Isole Marshall mh -米自由連åˆãƒžãƒ¼ã‚·ãƒ£ãƒ«è«¸å³¶ mh -កោះ Marshall mh -마샬 ì œë„ mh -ລາດສະອານາຈັàºà»„ທຠmh -Marshalo salos mh -MÄrÅ¡alu salas mh -Маршалови ОÑтрови mh -Маршаллын арлууд mh -Gżejjer Marshall mh -Marshalløyene mh -Marshallinseln mh -Marshall Eilanden mh -Marshalløyane mh -ਮਾਰਸ਼ਲ ਟਾਪੂ mh -Wyspy Marshalla mh -Ilhas Marshall mh -Ilhas Marshall mh -Insulele Marshall mh -Маршалловы оÑтрова mh -Ibirwa bya Marishali mh -Marshallsullot mh -Maršálove ostrovy mh -Marshallovi otoki mh -Маршалова оÑтрва mh -MarÅ¡alova ostrva mh -Marshallöarna mh -மாரà¯à®·à®²à¯ தீவà¯à®•ள௠mh -Ҷазираи Маршал mh -หมู่เà¸à¸²à¸°à¸¡à¸²à¹à¸Šà¸¥ mh -MarÅŸal Adaları mh -MarÅŸal Utrawları mh -МаршальÑькі оÑтрови mh -Маршалл Ороллари mh -Iyes Marshall mh -马ç»ç¾¤å²› mh -馬紹爾群島 mh -Macedonia mk -Makedoniese mk -مقدونيا mk -Makedonya mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk -মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ mk -Makedonia mk -Makedonija mk -Macedònia mk -Makedonie mk -Makedonien mk -Makedonien mk -Σλαβομακεδονία mk -Makedonujo mk -Makedoonia mk -Mazedonia mk -مقدونیه mk -Makedonia mk -Macédoine mk -Macedonië mk -An Mhacadóin (IPIM) mk -Macedónia mk -מקדוניה mk -मकदूनिया mk -Makedonija mk -Macedónia mk -Masedonia mk -Makedónía mk -マケドニア mk -ម៉ាសáŸážŠáž“ mk -마케ë„니아 mk -ມາເຊໂດເນີຠmk -Makedonija mk -MaÄ·edonija mk -Македонија mk -Макидон mk -MaÄ‹edonja mk -Makedonia mk -Makedonien mk -Macedonië mk -Makedonia mk -Macedònian mk -ਮੈਕਡੋਨੀਆ mk -Macedónia mk -Macedônia mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk -Masedoniya mk -Makedonia mk -Macedónsky mk -Makedonija mk -Македонија mk -Makedonija mk -I-Macedonia mk -Makedonien mk -மாசிடோ னியா mk -Мақдуниё mk -มาเซโดเนีย mk -Makedonya mk -Makedonia mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk -Masedonia mk -Macedoneye mk -马其顿 mk -馬其頓 mk -Mali ml -مالي ml -Малі ml -Мали ml -মালি ml -Μαλί ml -Malio ml -مالی ml -Mailí ml -מ×לי ml -माली ml -Malí ml -マリ ml -ម៉ាលី ml -ë§ë¦¬ ml -ຈົດຫມາຠml -Мали ml -Мали ml -ਮਾਲੀ ml -Мали ml -Мали ml -மாலி ml -Молӣ ml -มาลี ml -Малі ml -Мали ml -马里 ml -馬利 ml -Myanmar mm -ميانمار mm -М'Ñнма mm -Мианмар mm -মিয়ানমার mm -Mjanmar mm -Mianmar mm -Burma mm -Burma (Myanmar) mm -ÎœÎ¹Î±Î½Î¼Î¬Ï mm -Mjanmao mm -Birmania mm -میانمار mm -Maenmar mm -מינמר mm -मà¥à¤¯à¤¨à¤®à¤¾à¤° mm -Mianmar mm -Mjanmar mm -ミャンマー mm -មីយ៉ាន់ម៉ា mm -미얀마 mm -ຕົວຮງàºàºžàºµàº·à»‰àº™àº—ີ່ທຳງານ - K mm -Mjanma mm -Мијанмар mm -МÑнмар mm -Mjanmar mm -Myanmar (Birma) mm -ਮਿਆਂਮਾਰ mm -Mianmar mm -МьÑнма (Бирма) mm -Mjanmar mm -Мијанмар mm -Mijanmar mm -மயனà¯à®®à®¾à®°à¯ mm -Миёнмор mm -เมียนมาร์ mm -Mianmar mm -М'Ñнма mm -МÑнмар mm -Miến Äiện mm -Birmaneye mm -缅甸 mm -緬甸 mm -Mongolia mn -Mongolië mn -منغوليا mn -ÐœÐ°Ð½Ð³Ð¾Ð»Ñ–Ñ mn -ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn -মোঙà§à¦—োলিয়া mn -Mongoli mn -Mongolija mn -Mongòlia mn -Mongolsko mn -Mongoliet mn -Mongolei mn -Μογγολία mn -Mongolio mn -Mongoolia mn -مغولستان mn -Mongolie mn -Mongolië mn -An Mhongóil mn -Mongólia mn -מונגוליה mn -मंगोलिया mn -Mongolija mn -Mongólia mn -Mongólía mn -モンゴル mn -ម៉ុងហ្គោលី mn -몽골 mn -ລອàºàº­àº´àº™ mn -Mongolija mn -Mongolija mn -Монголија mn -МОÐГОЛ mn -Mongolja mn -Mongolei mn -Mongolië mn -ਮੰਗੋਲੀਆ mn -Mongólia mn -Mongólia mn -ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn -Mongoliya mn -Mongolsko mn -Mongolija mn -Монголија mn -Mongolija mn -Mongoliet mn -மாஙà¯à®•ோலியா mn -МуғулиÑтон mn -มองโà¸à¹€à¸¥à¸µà¸¢ mn -MoÄŸolistan mn -MoÄŸolstan mn -ÐœÐ¾Ð½Ð³Ð¾Ð»Ñ–Ñ mn -МуғилиÑтон mn -Mông cổ mn -Mongoleye mn -è’™å¤ mn -è’™å¤ mn -Macau SAR(China) mo -Macau SAR (China) mo -Макао (Китай) mo -মাকাউ SAR(চীন) mo -Makav SAR(Sina) mo -Macau SAR(Xina) mo -Macau SAR (Čína) mo -Macau SAR(Kina) mo -Macao SAR (China) mo -Μακάο SAR (Κίνα) mo -Macau mo -Macau SAR(Txina) mo -Makao SAR(Kiina) mo -Macao SAR (Chine) mo -Macao SAR(An tSín) mo -מק×ו SAR (סין) mo -Makaó (Kína) mo -Makaó (sjálfstjórnarhérað í Kína) mo -Macau SAR(Cina) mo -マカオ(中国) mo -ម៉ាកាវ (áž…áž·áž“) mo -Macau SAR(Kinija) mo -Макао СÐР(Кина) mo -Macao SAR (Kina) mo -Macao mo -Macao SAR (Kina) mo -ਮੈਕਿਉ SAR(ਚੀਨ) mo -Makao SAR (Chiny) mo -Macau (China) mo -Macao SAR(China) mo -Макао mo -Makawu SAR (Ubushinwa) mo -Macau SAR (Kiinná) mo -Macau SAR (Kitajska) mo -SAR Macau (Кина) mo -SAR Macau (Kina) mo -Macao (Kina) mo -Macau SAR(சீனா) mo -มาเà¸à¹Šà¸² mo -Makau (Çin) mo -Macau SAR(Китай) mo -Макау (Хитой) mo -中国澳门特别行政区 mo -澳門 SAR(中國) mo -Martinique mq -مارتينيك mq -Мартыніка mq -Мартиника mq -মারà§à¦Ÿà¦¿à¦¨à¦¿à¦•à§ mq -Martinik mq -Martinik mq -Martinica mq -Martinik mq -Martin?c mq -ΜαÏτινίκα mq -Martiniko mq -Martinica mq -Martinika mq -مارتینیک mq -Martainíc mq -Martinica mq -מרטיניק mq -मारà¥à¤Ÿà¥€à¤¨à¥€à¤• mq -Martiník mq -Martinica mq -フランス海外県マルãƒãƒ‹ãƒ¼ã‚¯ mq -ម៉ារទីនីគ mq -ë§ˆë¥´í‹°ë‹ˆí¬ mq -ເມົາລິ mq -Martinika mq -Martinika mq -Мартиник mq -Мартиники mq -Martinik mq -ਮਾਰਟੀਨਿਕਿਉ mq -Martynika mq -Martinica mq -Martinica mq -Martinica mq -Мартиника mq -Maritinike mq -Martinik mq -Мартиник mq -Martinik mq -மாரà¯à®¤à®¿à®©à®¿à®•à¯à®¯à¯ mq -Мартиник mq -มาทินิค mq -Martinik mq -Martinik mq -Мартініка mq -Мартиника mq -Martinike mq -马æå°¼å…‹ mq -馬æå°¼å…‹ mq -Mauritania mr -Mauritanië mr -موريتانيا mr -ÐœÐ°ÑžÑ€Ñ‹Ñ‚Ð°Ð½Ñ–Ñ mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr -মরিটানিয়া mr -Maouritani mr -Mauritanija mr -Mauritània mr -Mauretánie mr -Mawritania mr -Mauretanien mr -Mauretanien mr -ΜαυÏιτανία mr -MaÅ­ritanujo mr -Mauritaania mr -موراتانی mr -Mauritanie mr -Mauritanië mr -An Mháratáin mr -Mauritánia mr -מ×וריטניה mr -मारीतानिया mr -Mauritanija mr -Mauritánia mr -Máritanía mr -モーリタニア mr -ម៉ូរីážáž¶áž“ី mr -모리타니 mr -ລິທົວເນີຠmr -Mauritanija mr -MauritÄnija mr -Мавританија mr -Мауритани mr -Mawritanja mr -Mauretanien mr -Mauritanië mr -ਮਾਉਰੀਟਨਿਆ mr -Mauretania mr -Mauritânia mr -Mauritânia mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr -Moritaniya mr -Mavretanija mr -Мауританија mr -Mauritanija mr -Mauretanien mr -மௌரிடானியா mr -Мавритонӣ mr -มอริทาเนีย mr -Mauritanya mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr -Moritanreye mr -毛里塔尼亚 mr -茅利塔尼亞 mr -Montserrat ms -مونتسيرات ms -МонÑерат ms -মনà§à¦Ÿà¦¸à§‡à¦°à¦¾à¦Ÿ ms -Monsera ms -ΜοντσεÏάτ ms -Moncerato ms -مون‌سرات ms -Montsarat ms -מונטסרט ms -मॉटसेरट ms -Monserrat ms -英領モントセラト ms -ម៉ុងសáŸážšáŸ‰áž¶ ms -몬트세ë¼íЏ ms -ຈà»àºžàº²àºš ms -Monserata ms -МонÑерат ms -МонтÑеррат ms -ਮੋਨਟਸੀਰਾਟ ms -МонтÑеррат ms -Monserati ms -МонÑерат ms -Monserat ms -மானà¯à®Ÿà¯à®šà¯†à®°à¯à®°à®Ÿà¯ ms -МунтеÑирот ms -มอนต์เซอร์รัท ms -МонтÑеррат ms -Монцеррат ms -蒙特塞拉特 ms -蒙的塞拉特 ms -Malta mt -مالطة mt -Мальта mt -Малта mt -মলটা mt -Malt mt -Μάλτα mt -Malto mt -مالت mt -Malte mt -Málta mt -מלטה mt -मालà¥à¤Ÿà¤¾ mt -Málta mt -マルタ mt -ម៉ាល់ážáž¶ mt -몰타 mt -ມອລຕາ mt -Малта mt -Малта mt -ਮਾਲਟਾ mt -Мальта mt -Malita mt -Малта mt -I-Malta mt -மாலà¯à®Ÿà®¾ mt -Молет mt -มอลตา mt -Мальта mt -Малта mt -Male mt -马耳他 mt -馬爾他 mt -Mauritius mu -موريشيوس mu -Маўрыцы mu -ОÑтров Мавриций mu -মরিশাস mu -Mauris mu -Mauricijus mu -Maurici mu -Mauricius mu -Mawrisiws mu -ΜαυÏίκιος mu -MaÅ­ricio mu -Mauricio mu -Maurizio mu -موریتیس mu -ÃŽle Maurice mu -Oileán Mhuirís mu -Maurício mu -מ×וריציוס mu -मॉरीशस mu -Mauricijus mu -Máritíus mu -モーリシャス mu -ម៉ូរីទុស mu -모리셔스 mu -ພາທິຊັ້ນ mu -MaurÄ«cija mu -ÐœÐ°Ð²Ñ€Ð¸Ñ†Ð¸ÑƒÑ mu -ÐœÐ°Ð²Ñ€Ð¸Ñ‚ÑƒÑ mu -Mawriju mu -ਮਾਉਰੀਟਿਸ mu -Mauritânia mu -Ilhas Maurício mu -MauriÅ£ius mu -Маврикий mu -Ibirwa bya Morise mu -Maurícius mu -Mavricij mu -ÐœÐ°ÑƒÑ€Ð¸Ñ†Ð¸Ñ˜ÑƒÑ mu -Mauricijus mu -மௌரிடியஸ௠mu -Мавритӣ mu -มอริเชียส mu -Mauritus mu -Маврікій mu -Маврикий mu -Iye Môrice mu -毛里求斯 mu -毛里求斯 mu -Maldives mv -جزر المالدي٠mv -Мальдывы mv -МалдивÑки оÑтрови mv -মালদà§à¦¬à§€à¦ª mv -Inizi Maldiv mv -Maldivi mv -Maledivy mv -Ynysoedd y Mald?f mv -Maldiverne mv -Malediven mv -Μαλδίβες mv -Maldivoj mv -Maldivas mv -Maldiivid mv -Maldibak mv -مالدیو mv -Malediivit mv -Malediven mv -Na Maildiví mv -Maldivas mv -מולדבה mv -मालदीव mv -Maldivi mv -Maldív-szigetek mv -Maldíveyjar mv -Maldive mv -モルジブ mv -ម៉ាល់ឌីវ mv -몰디브 mv -ມັລດິສ mv -Maldyvai mv -Maldivu salas mv -Малдиви mv -Малдив mv -Maldivene mv -Malediven mv -Malediven mv -Maldivane mv -ਮਾਲਦੀਵ mv -Malediwy mv -Maldivas mv -Maldivas mv -Maldive mv -МальдивÑкие оÑтрова mv -Malidive mv -Maldiivat mv -Maldiv mv -Малдиви mv -Maldivi mv -Maldiverna mv -மாலà¯à®¤à¯€à®µà¯à®•ள௠mv -Молдивӣ mv -มัลดิฟ mv -Maldivler mv -Maldivlar mv -Мальдіви mv -Малдив Ороллари mv -马尔代夫 mv -馬爾地夫 mv -Malawi mw -مالاوي mw -Малаві mw -Малави mw -মালাওয়ি mw -Malavi mw -Μαλάουι mw -Malavio mw -مالاوی mw -An Mhaláiv mw -Malavi mw -מל×ווי mw -मलावी mw -Malavi mw -Malaví mw -マラウイ mw -ម៉ាឡាវី mw -ë§ë¼ìœ„ mw -ມອລຕາ mw -Malavi mw -Малави mw -Малави mw -ਮਾਲਾਵੀ mw -Малави mw -Малави mw -Malavi mw -மலவி mw -Моловӣ mw -มาลาวี mw -Malavi mw -Малаві mw -Малави mw -马拉维 mw -é¦¬æ‹‰å¨ mw -Mexico mx -Meksiko mx -المكسيك mx -Meksika mx -МÑкÑыка mx -МекÑико mx -মেকà§à¦¸à¦¿à¦•à§‹ mx -Mec'hiko mx -Meksiko mx -Mèxic mx -Mexiko mx -Mecsico mx -Mexiko mx -Μεξικό mx -Meksiko mx -México mx -Mehhiko mx -Mexiko mx -مکزیک mx -Meksiko mx -Meksiko mx -Mexique mx -Meicsiceo mx -México mx -מקסיקו mx -मेकà¥à¤¸à¤¿à¤•ो mx -Meksiko mx -Mexikó mx -Meksiko mx -Mexíkó mx -Messico mx -メキシコ mx -ម៉ិចស៊ិក mx -멕시코 mx -ເມັàºàºŠàºµà»‚ຠmx -Meksika mx -Meksika mx -МекÑико mx -МекÑико mx -Messiku mx -Mexiko mx -Mèxic mx -ਮੈਕਸਿਕੋ mx -Meksyk mx -México mx -México mx -Mexic mx -МекÑика mx -Megizike mx -Mexiko mx -Mehika mx -МекÑико mx -Meksiko mx -I-Mexico mx -மெகà¯à®šà®¿à®•ோ mx -МекÑико mx -เม็à¸à¸‹à¸´à¹‚ภmx -Meksika mx -Meksiko mx -МекÑика mx -МекÑика mx -Mê hi cô mx -Mecsike mx -墨西哥 mx -墨西哥 mx -Malaysia my -Malysië my -ماليزيا my -ÐœÐ°Ð»Ð°Ð¹Ð·Ñ‹Ñ my -ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my -মালয়েশিয়া my -Malezia my -Malezija my -Malàsia my -Malajsie my -Maleisia my -Μαλαισία my -Malajzio my -Malasia my -Malaisia my -Malasia my -مالزی my -Malesia my -Malaisie my -Maleisië my -An Mhalaeisia my -Malásia my -מלזיה my -मलेशिया my -Malezija my -Malajzia my -Malasía my -マレーシア my -ម៉ាឡáŸážŸáŸŠáž¸ my -ë§ë ˆì´ì‹œì•„ my -ມອລຕາ my -Malaizija my -Malaizija my -Малезија my -Малайз my -Malażja my -Maleisië my -ਮਲੇਸ਼ੀਆ my -Malezja my -Malásia my -Malásia my -Malaezia my -ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my -Maleziya my -Malajzia my -Malezija my -Малезија my -Malezija my -மலேசியா my -Малайзӣ my -มาเลเซีย my -Malezya my -ÐœÐ°Ð»Ð°Ð¹Ð·Ñ–Ñ my -ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my -Malaizeye my -马æ¥è¥¿äºš my -馬來西亞 my -Mozambique mz -Mosambiek mz -موزمبيق mz -Мазамбік mz -Мозамбик mz -মোজামবিক mz -Mozambik mz -Mozambik mz -Moçambic mz -Mozambik mz -Mosamb?c mz -Μοζαμβίκη mz -Mozambiko mz -Mosambiik mz -Mozanbike mz -موزامبیک mz -Mosambik mz -Mósaimbíc mz -מוזמביק mz -मोज़ामà¥à¤¬à¥€à¤• mz -Mozambik mz -Mozambik mz -Mósambík mz -Mozambico mz -モザンビーク mz -ម៉ូហ្សាំប៊ិក mz -ëª¨ìž ë¹„í¬ mz -ຫນ່ວàºàº„ວາມຈຳ mz -Mozambikas mz -Mozambika mz -Мозамбик mz -Мозамбайк mz -Możambik mz -Mosambik mz -Mosambik mz -Mosambik mz -ਮੋਜ਼ਾਨਬਿਕਿਉ mz -Mozambik mz -Moçambique mz -Moçambique mz -Mozambic mz -Мозамбик mz -Mosambik mz -Mozambik mz -Mozambik mz -Мозамбик mz -Mozambik mz -Moçambique mz -மோசாமà¯à®ªà®¿à®•௠mz -Мозамбик mz -โมà¹à¸‹à¸¡à¸šà¸´à¸ mz -Mozambik mz -Mozambik mz -Мозамбік mz -Мозамбик mz -Mozambike mz -莫桑比克 mz -莫三比克 mz -Namibia na -Namibië na -ناميبيا na -ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na -ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na -নামিবিয়া na -Namibi na -Namibija na -Namíbia na -Namíbie na -Îαμίμπια na -Namibio na -Namiibia na -نامیبیا na -Namibie na -Namibië na -An Namaib na -Namíbia na -נמיביה na -नामीबिया na -Namibija na -Namíbia na -Namibía na -ナミビア na -ណាមីប៊ី na -나미비아 na -ຈາໄມàºàº² na -Namibija na -NamÄ«bija na -Ðамибија na -Ðамиби na -Namibja na -Namibië na -ਨਾਮੀਬੀਆ na -Namíbia na -Namíbia na -ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na -Namibiya na -Namíbia na -Namibija na -Ðамибија na -Namibija na -நாமிபியா na -Ðамибиё na -นามิเบีย na -Namibya na -ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na -ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na -Namibeye na -纳米比亚 na -那米比亞 na -New Caledonia nc -Nuwe Caledonië nc -كاليدونيا الجديدة nc -ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc -Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc -নিউ কà§à¦¯à¦¾à¦²à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ nc -Kaledoni-nevez nc -Nova Kaledonija nc -Nova Caledònia nc -Nová Kaledonie nc -Caledonia Newydd nc -Ny Caledonien nc -Neukaledonien nc -Îέα Καληδονία nc -Nov-Kaledonio nc -Nueva Caledonia nc -Uus-Kaledoonia nc -Kaledonia Berria nc -کالدونیا نو nc -Uusi-Kaledonia nc -Nouvelle Calédonie nc -Nij Caledonië nc -An Nua-Chaladóin nc -Nova Caledónia nc -קלדוניה החדשה nc -नà¥à¤¯à¥‚ केलेदूनिया nc -Nova Kaledonija nc -Új-Kaledónia nc -Nýja-Kaledónía nc -Nuova Caledonia nc -ニューカレドニア nc -នូវែលកាលáŸážŠáž¼áž“ី nc -뉴 칼레ë„니아 nc -ມາເຊໂດເນີຠnc -Naujoji Kaledonija nc -Jaunkaledonija nc -Ðова Каледонија nc -Ð¨Ð¸Ð½Ñ ÐºÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸ nc -Kaledonja Ä dida nc -Ny-Caledonia nc -Nieg Kaledonien nc -Nieuw Caledonië nc -Ny-Caledonia nc -ਨਵਾਂ ਕਾਲੀਡੋਨਾ nc -Nowa Kaledonia nc -Nova Caledónia nc -Nova Caledônia nc -Noua Caledonie nc -ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc -Kaledoniya nc -Ođđa Kaledonia nc -Nová Kaledónia nc -Nova Kaledonija nc -Ðова Каледонија nc -Nova Kaledonija nc -Nya Caledonien nc -நியூ கலடோனியா nc -КаледониÑи Ðав nc -นิวคาเลโดเนีย nc -Yeni Kaledonya nc -Yaña Kaledonia nc -Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc -Янги ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc -Nouve Caledonreye nc -新喀里多尼亚 nc -新喀里多尼亞 nc -Niger ne -النيجر ne -Ðігер ne -Ðигер ne -নাইজের ne -Nijer ne -Níger ne -ÎίγηÏας ne -NiÄero ne -نیجر ne -Nigeria ne -An Nígir ne -Níxer ne -× ×™×’'ר ne -निगर ne -Níger ne -ニジェール ne -នីហ្សáŸážš ne -니제르 ne -ຕົວຮງàºàºžàº·à»‰àº™àº—ີ່ທຳງານ ne -NigÄ“ra ne -Ðигер ne -Ðигер ne -NiÄ¡er ne -ਨਿਜੀਰ ne -Nigéria ne -Nigéria ne -Ðигер ne -Nijeri ne -Nigéria ne -Ðигер ne -நிஜர௠ne -Ðигерӣ ne -ไนเจอร์ ne -Nijerya ne -Ðігер ne -Ðигер ne -Nidjer ne -尼日尔 ne -尼日 ne -Norfolk Island nf -Norfolk Eiland nf -جزيرة نورÙولك nf -Ðорфалк nf -ОÑтров Ðорфолк nf -নরফোক দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ nf -Enez Norfolk nf -Norfolk ostrvo nf -Illa Norfolk nf -Ynys Norffolc nf -Norfolk-øerne (Australien) nf -Norfolk-Insel nf -Îήσος ÎÏŒÏφοκ nf -Norfolkinsulo nf -Isla Norfolk nf -Norfolki saar nf -Norfok Irla nf -جزایر نورÙولک nf -Norfolkinsaari nf -ÃŽle Norfolk nf -Norfolk Eilân nf -Oileán Norfolc nf -Illa Norfolk nf -××™×™ נורפולק nf -नॉरफाक आइलैंड nf -Otok Norfolk nf -Norfolk-szigetek nf -Norfolkeyja nf -Isola Norfolk nf -オーストラリア領ノーフォーク諸島 nf -កោះ Norfolk nf -ë…¸í¬í¬ ì œë„ nf -ໂປà»àº¥àº™ nf -Norfolko sala nf -Norfolka nf -Ðорфолшки ОÑтров nf -Norfolk арлууд nf -Gżira ta' Norfolk nf -Norfolkøya nf -Norfolkinsel nf -Norfolk Eiland nf -Norfolkøya nf -ਨੋਰਫੋਲਕ ਟਾਪੂ nf -Wyspy Norfolk nf -Ilha Norfolk nf -Ilhas Norfolk nf -Insulele Norfolk nf -ОÑтров Ðорфолк nf -Ikirwa cya Norufolika nf -Norfolksuolu nf -Ostrov Norfolk nf -Otok Norfolk nf -Ðорфолкшко оÑтрво nf -NorfolkÅ¡ko ostrvo nf -Norfolkön nf -நாரà¯à®ªà¯‹à®•௠தீவ௠nf -Ҷазираи Ðурфолк nf -เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¸Ÿà¸­à¸¥à¹Œà¸„ nf -Norfolk Adaları nf -Norfolk Utrawları nf -ОÑтрів Ðорфолк nf -Ðорфолк Ороли nf -Iye di Norfolk nf -诺ç¦å…‹å²› nf -諾ç¦å…‹å³¶ nf -Nigeria ng -Nigerië ng -نيجيريا ng -ÐÑ–Ð³ÐµÑ€Ñ‹Ñ ng -ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng -নাইজেরিয়া ng -Nijeria ng -Nigerija ng -Nigèria ng -Nigérie ng -ÎιγηÏία ng -NiÄerio ng -Nigeeria ng -نیجریه ng -Nigéria ng -An Nigéir ng -Nixéria ng -ניגריה ng -नाइजीरिया ng -Nigerija ng -Nigéria ng -Nígería ng -ナイジェリア ng -នីហ្សáŸážšáž¸áž™áŸ‰áž¶ ng -나ì´ì§€ë¦¬ì•„ ng -ບັນà»àºà»€àº¥àºµàº ng -Nigerija ng -NigÄ“rija ng -Ðигерија ng -Ðигери ng -NiÄ¡erja ng -ਨੀਜੀਰਿਆ ng -Nigéria ng -Nigéria ng -ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng -Nigeriya ng -Nigéria ng -Nigerija ng -Ðигерија ng -Nigerija ng -நிஜேரியா ng -Ðигерӣ ng -ไนจีเรีย ng -Nijerya ng -ÐÑ–Ð³ÐµÑ€Ñ–Ñ ng -ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng -Nidjeria ng -尼日利亚 ng -奈åŠåˆ©äºž ng -Nicaragua ni -Nikaragua ni -نيكاراغوا ni -Ðікарагуа ni -Ðикарагуа ni -নিকারাগà§à§Ÿà¦¾ ni -Nikwaraga ni -Nikaragva ni -Nikaragua ni -Nicaragwa ni -ÎικαÏάγουα ni -Nikaragvo ni -Nikaraagua ni -Nikaragua ni -نیکاراگویه ni -Nikaragua ni -Nikaragua ni -Nicearagua ni -ניקרגווה ni -निकारागà¥à¤† ni -Nikaragva ni -Níkaragva ni -ニカラグア ni -នីការ៉ាហ្គáŸážš ni -니카ë¼ê³¼ ni -ປາລາàºàºàº§àº ni -Nikaragva ni -Nikaragva ni -Ðикарагва ni -Ðикрагуа ni -Nikaragwa ni -ਨਿਕਾਰਗà©à¨† ni -Nikaragua ni -Nicarágua ni -Nicarágua ni -Ðикарагуа ni -Nikaragwa ni -Nikaragua ni -Nikaragva ni -Ðикарагва ni -Nikaragva ni -I-Nicaragua ni -நிகராகà¯à®µà¯‡ ni -Ðикарагуа ni -นิคาราà¸à¸±à¸§ ni -Nikaragua ni -Nikaragua ni -Ðікарагуа ni -Ðикарагуа ni -Nicaragwa ni -尼加拉瓜 ni -尼加拉瓜 ni -Netherlands nl -Nederland nl -هولندا nl -Hollandiya nl -ГалÑÐ½Ð´Ñ‹Ñ nl -Ð¥Ð¾Ð»Ð°Ð½Ð´Ð¸Ñ nl -হলà§à¦¯à¦¾à¦£à§à¦¡ nl -Izelvroioù nl -Nizozemska nl -Holanda nl -Nizozemí nl -Yr Iseldiroedd nl -Holland nl -Niederlande nl -Κάτω ΧώÏες nl -Nederlando nl -Países Bajos nl -Holland nl -Holanda nl -هلند nl -Alankomaat nl -Háland nl -Pays bas nl -Nederlân nl -An Ãsiltír nl -Países Baixos nl -הולנד nl -नीदरलैंडà¥à¤¸ nl -Nizozemska nl -Hollandia nl -Belanda nl -Holland nl -Paesi Bassi nl -オランダ nl -ហុល្លង់ nl -네ëœëž€ë“œ nl -ເນເທີà»àº¥àº™à¹Œ nl -Olandija nl -NÄ«derlande nl -Холандија nl -Ðедерланд nl -Nederland nl -Nedderlanne nl -Nederland nl -Nederland nl -Holanda nl -ਨੀਂਦਰਲੈਂਡ nl -Holandia nl -Holanda nl -Holanda nl -Olanda nl -Ðидерланды nl -Ubuholandi nl -Hollánda nl -Holandsko nl -Nizozemska nl -Холандија nl -Holandija nl -I-Netherlands nl -Nederländerna nl -நெதரà¯à®²à®¾à®¨à¯à®¤à¯ nl -Ҳуланд nl -เนเธอร์à¹à¸¥à¸™à¸”์ nl -Hollanda nl -Niderlandlar nl -Ð“Ð¾Ð»Ð»Ð°Ð½Ð´Ñ–Ñ nl -Ðидерландлар nl -Hà Lan nl -Bas Payis nl -è·å…° nl -è·è˜­ nl -Norway no -Noorweë no -النرويج no -Norveç no -ÐарвÑÐ³Ñ–Ñ no -ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no -নরওয়ে no -Norvegia no -NorveÅ¡ka no -Noruega no -Norsko no -Norwy no -Norge no -Norwegen no -ÎοÏβηγία no -Norvegio no -Noruega no -Norra no -Norvegia no -نروژ no -Norja no -Norra no -Norvège no -Noorwegen no -An Iorua no -Noruega no -נורבגיה no -नारà¥à¤µà¥‡ no -NorveÅ¡ka no -Norvégia no -Norwegia no -Noregur no -Norvegia no -ノルウェー no -áž“áŸážšážœáŸ‚ស no -ë…¸ë¥´ì›¨ì´ no -ນà»à»€àº§ no -Norvegija no -Norvēģija no -Ðорвешка no -Ðорвеги no -NorveÄ¡ja no -Norge no -Norwegen no -Noorwegen no -Noreg no -Noruega no -ਨਾਰਵੇ no -Norwegia no -Noruega no -Noruega no -Norvegia no -ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no -Noruveje no -Norga no -Nórsko no -NorveÅ¡ka no -Ðорвешка no -NorveÅ¡ka no -I-Norway no -Norge no -நாரà¯à®µà¯‡ no -Ðорвегӣ no -นอร์เวย์ no -Norveç no -ÐÐ¾Ñ€Ð²ÐµÐ³Ñ–Ñ no -ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no -Na uy no -Norvedje no -æŒªå¨ no -æŒªå¨ no -Nepal np -نيبال np -ÐÑпал np -Ðепал np -নেপাল np -Nepál np -Îεπάλ np -Nepalo np -نپال np -Népal np -Neipeal np -נפ×ל np -नेपाल np -Nepál np -ãƒãƒ‘ール np -áž“áŸáž”៉ាល់ np -네팔 np -ເວນດາ np -Nepalas np -NepÄla np -Ðепал np -Ðепал np -ਨੇਪਾਲ np -Ðепал np -Nepali np -Ðепал np -நேபாளம௠np -Ðипол np -เนปาล np -Ðепал np -Ðепал np -尼泊尔 np -尼泊爾 np -Nauru nr -ناورو nr -Ðауру nr -Ðауру nr -নাউরৠnr -Naurueg nr -Nawrw nr -ÎαουÏÎ¿Ï nr -NaÅ­ro nr -Naurú nr -نائورو nr -Naurusaaret nr -Nárúis nr -× ×ורו nr -नौरू nr -Naurski nr -Nárú nr -ナウル nr -ណូរូ nr -나우루 nr -ປາລາàºàºàº§àº nr -Ðауру nr -Ðауру nr -Nawru nr -ਨਾਉਰੂ nr -Ðауру nr -Ikinawuru nr -Ðауру nr -நௌர௠nr -Ðауру nr -นาวรู nr -Ðауру nr -Ðауру nr -Nawouro nr -ç‘™é² nr -諾魯 nr -Niue nu -Nieu nu -نيوي nu -ÐÑ–ÑžÑ nu -Ðиуе nu -নিউই nu -Niwe nu -ÎιοÏε nu -Niuo nu -نیئو nu -ניווה nu -नियू nu -ニュージーランド自治領ニウエ nu -នីវ nu -ë‹ˆìš°ì— nu -ເນ໊ຕ nu -Ðије nu -Ðиуе nu -Niwe nu -ਨੀਉਈ nu -Ðиуе nu -Ðиуе nu -நீய௠nu -Ðиу nu -นิอุเอ nu -Nive nu -Niu nu -Ðіуе nu -Ðиуе nu -Niuwé nu -纽埃 nu -ç´é„‚å³¶ nu -New Zealand nz -Nuwe Seeland nz -نيوزيلاندا nz -Yeni Zellandiya nz -ÐÐ¾Ð²Ð°Ñ Ð—ÑлÑÐ½Ð´Ñ‹Ñ nz -Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz -নিউজিলà§à¦¯à¦¾à¦£à§à¦¡ nz -Zeland nevez nz -Novi Zeland nz -Nova Zelanda nz -Nový Zéland nz -Seland Newydd nz -Neuseeland nz -Îέα Ζηλανδία nz -Nov-Zelando nz -Nueva Zelanda nz -Uus-Meremaa nz -Zelanda Berria nz -زلاندنو nz -Uusi-Seelanti nz -Nýsæland nz -Nouvelle Zélande nz -Nij Seelân nz -An Nua-Shéalainn nz -Nova Celándia nz -ניו זילנד nz -नà¥à¤¯à¥‚जीलैंड nz -Novi Zeland nz -Új-Zéland nz -Selandia Baru nz -Nýja-Sjáland nz -Nuova Zelanda nz -ニュージーランド nz -នូវែលហ្សáŸáž¡áž„់ nz -뉴질랜드 nz -ນີວຊີà»àº¥àº™ nz -Naujoji Zelandija nz -JaunZÄ“lande nz -Ðов Зеланд nz -Ð¨Ð¸Ð½Ñ Ð·ÐµÐ°Ð»Ð°Ð½Ð´ nz -Nieg Seeland nz -Nieuw Zeeland nz -Navera Zelanda nz -ਨਿਊਜ਼ੀਲੈਂਡ nz -Nowa Zelandia nz -Nova Zelândia nz -Nova Zelândia nz -Noua Zeelandă nz -ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz -Nuveli Zelande nz -Ođđa Zealánda nz -Nový Zéland nz -Nova Zelandija nz -Ðови Зеланд nz -Novi Zeland nz -I-New Zealand nz -Nya Zeeland nz -நியூசிலாநà¯à®¤à¯ nz -Зилонди Ðав nz -นิวซีà¹à¸¥à¸™à¸”์ nz -Yeni Zelanda nz -Yaña Zealand nz -Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ñ–Ñ nz -Янги Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz -Nouve Zelande nz -新西兰 nz -ç´è¥¿è˜­ nz -Oman om -عÙمان om -Ðман om -Оман om -ওমান om -Omán om -Ομάν om -Omano om -Omán om -Omaan om -عمان om -Omán om -עומן om -ओमन om -Omán om -Óman om -オマーン om -អូម៉ង់ om -오만 om -ເàºàºµàºàº¥àº°àº¡àº±àº™ om -Omanas om -OmÄna om -Оман om -Оман om -ਓਮਾਨ om -Omã om -Omã om -Оман om -Omani om -Omán om -Оман om -I-Oman om -ஓமன௠om -Оман om -โอมาน om -Umman om -Оман om -Уммон om - Oman om -阿曼 om -阿曼 om -Panama pa -بنما pa -Панама pa -Панама pa -পানামা pa -Panamà pa -Παναμάς pa -Panamo pa -Panamá pa -پاناما pa -Panamá pa -פנמה pa -पनामा pa -パナマ pa -ប៉ាណាម៉ា pa -파나마 pa -ປານາມາ pa -Панама pa -Панама pa -ਪੈਨਾਮਾ pa -Panamá pa -Panamá pa -Панама pa -Панама pa -I-Panama pa -பனாமா pa -Панама pa -ปานามา pa -Панама pa -Панама pa -巴拿马 pa -巴拿馬 pa -Peru pe -البيرو pe -ПÑру pe -Перу pe -পেরৠpe -Perou pe -Perú pe -Periw pe -ΠεÏÎ¿Ï pe -Peruo pe -Perú pe -Peruu pe -پرو pe -Pérou pe -Peiriú pe -Perú pe -פרו pe -पेरू pe -Perú pe -Perù pe -ペルー pe -ប៉áŸážšáž¼ pe -페루 pe -ເປລູ pe -Перу pe -Перу pe -Pero pe -ਪੇਰੂ pe -Перу pe -Перу pe -I-Peru pe -பெர௠pe -Перу pe -เปรู pe -Перу pe -Перу pe -Perou pe -ç§˜é² pe -秘魯 pe -French Polynesia pf -Fraans Polynesië pf -بولينيزيا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© pf -ФранцуÑÐºÐ°Ñ ÐŸÐ°Ð»Ñ–Ð½ÑÐ·Ñ–Ñ pf -ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf -ফরাসী পলিনেশিয়া pf -Polinezi galleg pf -Francuska Polinezija pf -Polinèsia francessa pf -Francouzská Polynésie pf -Polynesia Ffrengig pf -Fransk Polynesien pf -Französisch Polynesien pf -Γαλλική Πολυνησία pf -Franca Polinezio pf -Polinesia francesa pf -Prantsuse Polüneesia pf -Polinesia Frantziarra pf -پولونزی ÙØ±Ø§Ù†Ø³Ù‡ pf -Ranskan Polynesia pf -Polynésie française pf -Frânsk Polinesië pf -Polainéis na Fraince pf -Polinésia Francesa pf -פולינזיה הצרפתית pf -फà¥à¤°à¥‡à¤‚च पॉलीनेसिया pf -Francuska Polinezija pf -Francia-Polinézia pf -Franska Pólýnesía pf -Polinesia Francese pf -フランス領ãƒãƒªãƒã‚·ã‚¢ pf -ប៉ូលីនáŸážŸáŸŠáž¸â€‹áž”ារាំង pf -프랑스령 í´ë¦¬ë„¤ì‹œì•„ pf -àºàº£àº±à»ˆàº‡à»€àºªàº” pf -PrancÅ«zų Polinezija pf -FranÄu PolinÄ“zija pf -ФранцуÑка Полинезија pf -Франц полинеÑи pf -Polineżja FranÄ‹iża pf -Fransk Polynesia pf -Franzöösch Polynesien pf -Frans Polinesië pf -Fransk Polynesia pf -ਫਰੈਂਚ ਪੋਲੀਂਸੀਆ pf -Polinezja Francuska pf -Polinésia Francesa pf -Polinésia Francesa pf -Polinezia Franceză pf -ФранцузÑÐºÐ°Ñ ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf -Polinesiya Mfaransa pf -FránskkalaÅ¡ Polynesia pf -Francúzska Polynézia pf -Francoska Polinezija pf -ФранцуÑка Полинезија pf -Francuska Polinezija pf -Franska Polynesien pf -பிரனà¯à®šà¯ போலினேசியா pf -ПулинезиÑи ФаронÑа pf -à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¹‚พลีนีเซีย pf -Fransız Polinezyası pf -Frans Polinesia pf -Французька ÐŸÐ¾Ð»Ñ–Ð½ÐµÐ·Ñ–Ñ pf -Француз ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf -Polynesia thuá»™c Pháp pf -Polinezeye francesse pf -法属波利尼西亚 pf -法屬波利尼西亞 pf -Papua New Guinea pg -بابوا غينيا الجديدة pg -Papua Yeni Gvineya pg -Папуа–ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ pg -Папуа Ðова Ð“Ð²Ð¸Ð½ÐµÑ pg -পাপà§à§Ÿà¦¾ নিউ গিনি pg -Papouazi Gine Nevez pg -Papua Nova Gvineja pg -Papua Nova Guinea pg -Papua - Nová Guinea pg -Papwa Gini Newydd pg -Papua Neu-Guinea pg -ΠαποÏα Îέα Γουινέα pg -Papuo-Nov-Gvineo pg -Papua Nueva Guinea pg -Paapua Uus-Guinea pg -Papua Ginea Berria pg -پاپوا گینه نو pg -Papua-Uusi-Guinea pg -Papouasie-Nouvelle-Guinée pg -Papua Nij Guinea pg -Nua-Ghuine Phapua pg -Papúa Nova Guiné pg -פפו××” ניו ×’×™× ×™ pg -पापà¥à¤† नà¥à¤¯à¥‚ गियाना pg -Papua Nova Gvineja pg -Pápua Új-Guinea pg -Papúa Nýja-Gínea pg -Papua Nuova Guinea pg -パプアニューギニア pg -ប៉ាពូញូវហ្គីណ០pg -파푸아뉴기니 pg -ເທົາອ່ອນ pg -Papua Naujoji GvinÄ—ja pg -Papua Jaungvineja pg -Папуа Ðова Гвинеја pg -Папуа ÑˆÐ¸Ð½Ñ Ð“ÑƒÐ¹Ð½ÐµÐ° pg -Papwa Ginea pg -Papua Ny-Guinea pg -Papua-Niegguinea pg -Papua Ny-Guinea pg -ਪਾਪੂਆ ਨਵਾਂ ਗੂਈਆ pg -Papua Nowa Gwinea pg -Papua Nova Guiné pg -Papua Nova Guiné pg -Papua Noua Guinee pg -Папуа-ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ pg -Papuwa Gineya Nshya pg -Papua Ođđa-Guinea pg -Papua Nová Guinea pg -Papua Nova Gvineja pg -Папуа Ðова Гвинеја pg -Papua Nova Gvineja pg -Papua Nya Guinea pg -பாபà¯à®ªà®¾ நியூ ஜினியா pg -Папуа ГвинеиÑи Ðав pg -ปาปัวนิวà¸à¸´à¸™à¸µ pg -Papua Yeni Gine pg -Papua Yaña Guinea pg -Папуа Ðова Ð“Ð²Ñ–Ð½ÐµÑ pg -Папуа Янги Ð“Ð²Ð¸Ð½ÐµÑ pg -Papouwazeye Nouve Guinêye pg -巴布亚新几内亚 pg -巴布ç´å¹¾å…§äºž pg -Philippines ph -Fillipyne ph -الÙلبين ph -FillipinlÉ™r ph -Філіпіны ph -Филипини ph -ফিলিপিনস ph -Filipin ph -Filipini ph -Filipines ph -Filipíny ph -Ynysoedd Y Philipinau ph -Filippinerne ph -Philippinen ph -Φιλιππίνες ph -Filipinoj ph -Filipinas ph -Filipiinid ph -Filipinak ph -Ùیلیپین ph -Filippiinit ph -Filippijnen ph -Na hOileáin Fhilipíneacha ph -Filipinas ph -×¤×™×œ×™×¤×™× ×™× ph -फिलिपà¥à¤ªà¥€à¤¨à¥à¤¸ ph -Filipini ph -Fülöp-szigetek ph -Filippseyjar ph -Filippine ph -フィリピン ph -ហ្វ៊ីលីពីន ph -필리핀 ph -ອາລະປະໂຫàºàº” ph -Filipinai ph -FilipÄ«nas ph -Филипини ph -Плиппин ph -Filippini ph -Filippinene ph -Philippinen ph -Filippijnen ph -Filippinane ph -ਫਿਲੀਪੀਨਜ਼ ph -Filipiny ph -Filipinas ph -Filipinas ph -Filipine ph -Филиппины ph -Filipine ph -Filippiinat ph -Filipíny ph -Filipini ph -Филипини ph -Filipini ph -Filippinerna ph -பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯ ph -Филипин ph -ฟิลิปปินส์ ph -Filipinler ph -Filippinnär ph -Філіппіни ph -Филиппин ph -Filipenes ph -è²å¾‹å®¾ ph -è²å¾‹è³“ ph -Pakistan pk -باكستان pk -ПакіÑтан pk -ПакиÑтан pk -পাকিসà§à¦¤à¦¾à¦¨ pk -Paquistà pk -Pákistán pk -Pacistan pk -Πακιστάν pk -Pakistano pk -پاکستان pk -An Phacastáin pk -Paquistán pk -פ×קיסטן pk -पाकिसà¥à¤¤à¤¾à¤¨ pk -Pakisztán pk -パキスタン pk -ប៉ាគីស្ážáž¶áž“ pk -파키스탄 pk -ລງບ pk -Pakistanas pk -PakistÄna pk -ПакиÑтан pk -ПакиÑтан pk -ਪਾਕਿਸਤਾਨ pk -Paquistão pk -Paquistão pk -ПакиÑтан pk -Pakisitani pk -ПакиÑтан pk -பாகிஸà¯à®¤à®¾à®©à¯ pk -ПокиÑтон pk -ปาà¸à¸µà¸ªà¸–าน pk -Päqstan pk -ПакиÑтан pk -ПокиÑтон pk -å·´åŸºæ–¯å¦ pk -å·´åŸºæ–¯å¦ pk -Poland pl -بولندا pl -PolÅŸa pl -Польшча pl -Полша pl -পোলà§à¦¯à¦¾à¦£à§à¦¡ pl -Polonia pl -Poljska pl -Polònia pl -Polsko pl -Gwlad Pwyl pl -Polen pl -Polen pl -Πολωνία pl -Pollando pl -Polonia pl -Poola pl -Polonia pl -لهستان pl -Puola pl -Pólland pl -Pologne pl -Polen pl -An Pholainn pl -Polónia pl -פולין pl -पोलैंड pl -Poljska pl -Lengyelország pl -Polandia pl -Pólland pl -Polonia pl -ãƒãƒ¼ãƒ©ãƒ³ãƒ‰ pl -ប៉ូឡូញ pl -í´ëž€ë“œ pl -ໂປà»àº¥àº™ pl -Lenkija pl -Polija pl -ПолÑка pl -Польш pl -Polonja pl -Polen pl -Polen pl -Polen pl -Polen pl -Polònia pl -ਪੋਲੈਂਡ pl -Polska pl -Polónia pl -Polônia pl -Polonia pl -Польша pl -Polonye pl -Polska pl -Poľsko pl -Poljska pl -ПољÑка pl -Poljska pl -I-Poland pl -Polen pl -போலாநà¯à®¤à¯ pl -ÐŸÐ¾Ð»Ð°Ð½Ð´Ð¸Ñ pl -โปà¹à¸¥à¸™à¸”์ pl -Polonya pl -Polonia, PolÅŸa pl -Польща pl -Полша pl -Pholandi pl -Ba Lan pl -Pologne pl -波兰 pl -波蘭 pl -Saint Pierre and Miquelon pm -St Pierre en Miquelon pm -سانت بيير Ùˆ ميكيلون pm -Saint Pierre vÉ™ Miquelon pm -СÑн-П'ер Ñ– Мікелон pm -Св. Пиер и Магелан pm -সেনà§à¦Ÿ পিয়ের à¦à¦¬à¦‚ মিকেলন pm -Sant Per ha Mikelon pm -Sveti Pjer i Migelon pm -Saint Pierre i Miquelon pm -Saint Pierre a Miquelon pm -Ynysoedd Sant Pierre a Micwelon pm -Saint Pierre og Miquelon pm -Saint Pierre und Miquelon pm -Σαιν Î Î¹Î­Ï (Άγιος ΠέτÏος) και Μικελόν pm -Sent-Piero kaj Mikelono pm -Saint Pierre y Miquelon pm -Saint Pierre ja Miquelon pm -Saint Pierre eta Miquelon pm -سنت Ù¾ÛŒÙØ± Ùˆ میکولئون pm -Saint-Pierre ja Miquelon pm -Saint-Pierre-et-Miquelon pm -Saint Pierre en Miquelon pm -Peadar Naofa agus Micilín pm -Saint Pierre e Miquelon pm -ס×ן פייר ומיקלון pm -सेंट पियरे तथा मिकà¥à¤µà¥‡à¤²à¤¨ pm -Saint Pierre i Miquelon pm -Saint Pierre és Miquelon pm -Sankti Pierre og Miquelon pm -Saint Pierre e Miquelon pm -フランス海外領土サンピエールミクロン諸島 pm -세ì¸íЏ 피ì—르 미쿠엘론 pm -SenpjÄ“ra un Mikelona pm -Свети Пјер и Микелон pm -Сайнт пиерре ба микуелон pm -Saint Pierre u Miquelon pm -Saint-Pierre-et-Miquelon pm -Sankt Pierre un Miquelon pm -Saint Pierre en Miquelon pm -Saint-Pierre-et-Miquelon pm -ਸੇਂਟ ਪੀਈਰੀ ਤੇ ਮਾਕਿਉਲੋਨ pm -Saint Pierre i Miquelon pm -S. Pedro e Miquelão pm -Saint Pierre e Miquelon pm -Saint Pierre ÅŸi Miquelon pm -Сен-Пьер и Микелон pm -Mutagatifu Petero na Mikelo pm -Saint-Pierre-et-Miquelon pm -Saint Pierre a Miquelon pm -Sveti Pierre in Miquelon pm -Св. Пјер и Микелон pm -Sv. Pjer i Mikelon pm -Saint Pierre och Miquelon pm -செயினà¯à®Ÿà¯ பியரி மறà¯à®±à¯à®®à¯ மிகà¯à®¯à¯à®²à®©à¯ pm -Синт Пир Миколеюн pm -เซนต์ปิà¹à¸­à¸£à¹Œ à¹à¸¥à¸°à¸¡à¸´à¹€à¸„อลอน pm -Saint Pierre ve Miquelon pm -Saint Pierre wä Miquelon pm -Сент-П'єр Ñ– Мікелон pm -Сент-Пер ва Микелон pm -Sint Pire et Miquelon pm -圣皮埃尔和密克隆 pm -è–皮埃爾島åŠå¯†å…‹éš†å³¶ pm -Pitcairn pn -بيتكايرن pn -ПіткÑрн pn -ОÑтрови Питкерн pn -পিটকেম pn -Pitkern pn -Ynys Pitcairn pn -ΠίτκαιÏν pn -Pitkarna Insulo pn -پیت Ú©ÙØ±Ù† pn -פיטקרן pn -पिटकैरà¥à¤¨ pn -英領ピトケアン諸島 pn -í•케언 pn -ລງບ pn -PitkÄ“rna pn -Питкерн pn -Питкайрн pn -ਪੀਟਕਾਰਨ pn -Питкаирн pn -பிடà¯à®•ாயà¯à®©à¯ pn -Питкорин pn -เà¸à¸²à¸°à¸žà¸´à¸•à¹à¸„ร์น pn -Pitkairn pn -Питкерн pn -çš®ç‰¹å¼€æ© pn -匹特開æ©å³¶ pn -Puerto Rico pr -بورتوريكو pr -Puerto Riko pr -ПуÑрта Рыка pr -Порто Рико pr -পà§à§Ÿà§‡à¦°à§à¦¤à§‹ রিকো pr -Porto Rico pr -Portoriko pr -Portoriko pr -Pwerto Rico pr -ΠουέÏτο Ρίκο pr -Puerto-Riko pr -پورتوریکو pr -Porto Rico pr -Portó Ríce pr -Porto Rico pr -פורטו ריקו pr -पà¥à¤¯à¥‚रà¥à¤Ÿà¥‹ रिको pr -Portoriko pr -Púertó Ríkó pr -Portorico pr -プエルトリコ pr -áž–áŸážšážáž¼ážšáž¸áž€áž¼ pr -푸ì—르토리코 pr -ໂປຣໂຕຄອນ pr -Puerto Rikas pr -Puertoriko pr -Порто Рико pr -Пуерто Рико pr -ਰੂਇਰਟੂ ਰੀਕੋ pr -Porto Rico pr -Porto Rico pr -ПуÑрто-Рико pr -Porito Riko pr -Portoriko pr -Порторико pr -Portoriko pr -பà¯à®¯à¯à®°à¯à®Ÿà¯‹ ரிகோ pr -Пурто Рико pr -เปอร์โตริโภpr -Porta Riko pr -Puerto Riko pr -Пуерто-Ріко pr -ПуÑрто-Рико pr -Porto Rico pr -æ³¢å¤šé»Žå„ pr -æ³¢å¤šé»Žå„ pr -Palestinian Territory ps -Palesteinse Gebied ps -السلطة الÙلسطينية ps -FÉ™lÉ™stin SahÉ™si ps -ПалеÑтынÑÐºÐ°Ñ Ñ‚ÑÑ€Ñ‹Ñ‚Ð¾Ñ€Ñ‹Ñ ps -ПалеÑтина ps -পà§à¦¯à¦¾à¦²à§‡à¦¸à§à¦Ÿà¦¿à¦¨à¦¿à§Ÿà¦¾à¦¨ টেরিটরি ps -Palestinska teritorija ps -Territori Palestí ps -Palestinské území ps -Tiriogaeth Palesteina ps -Palæstinensiske selvstyreomrÃ¥der ps -Palästinensisches Gebiet ps -Παλαιστίνη ps -Palestina Teritorio ps -Territorio palestino ps -Palestiina ps -Palestina ps -Ùلسطین ps -Palestiinalaisalue ps -Palestinensiska økið ps -Territoire palestinien ps -Palestijnsk territorium ps -Críoch na bPalaistíneach ps -Território Palestino ps -×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™× ps -फिलीसà¥à¤¤à¥€à¤¨à¥€ टेरिटरी ps -Palestinski teritorij ps -Palesztin területek ps -Palestína ps -Palestina ps -パレスãƒãƒŠè‡ªæ²»åŒº ps -ប៉ាលáŸážŸáŸ’ទីន ps -íŒ”ë ˆìŠ¤íƒ€ì¸ ìžì¹˜êµ¬ ps -àºàº²àº™àºžàº´àº¡àºœàº´àº”ພາດ ps -Palestinos teritorija ps -PalestÄ«nieÅ¡u treitorija ps -ПалеÑтинÑки територии ps -ПалеÑтины газар нутаг ps -Palestina ps -Palestinske territorier ps -De palästinensche sülvenregeerte Regioon ps -Palestijns territorium ps -Palestinske territorium ps -Bohwa bja Palestina ps -ਫਲਾਸਤੀਨ ਖੇਤਰ ps -Palestyna ps -Território Palestiniano ps -Território Palestino ps -Teritoriul Palestinian ps -ПалеÑтинÑкие территории ps -Igihugu cya Palesitina ps -PalestiinnalaÅ¡ territoria ps -Palestínske územia ps -Palestinski teritorij ps -ПалеÑтина ps -Palestina ps -I-Palestinian Territory ps -Palestina ps -பாலஸà¯à®¤à¯€à®© ஆணையம௠ps -ФалаÑтин ps -เขตปà¸à¸„รองปาเลสไตน์ ps -Filistin Bölgesi ps -Fälestin ps -ПалеÑтинÑька Ñ‚ÐµÑ€Ð¸Ñ‚Ð¾Ñ€Ñ–Ñ ps -ФалаÑтин Ерлари ps -Mukano wa maphalesitina ps -Lãnh thổ cá»§a Palestine ps -Palestene ps -Umhlaba wePalestina ps -å·´å‹’æ–¯å¦åœ°åŒº ps -å·´å‹’æ–¯å¦é ˜åœ° ps -Indawo yama-Phalesitina ps -Portugal pt -البرتغال pt -Portuqaliya pt -ÐŸÐ°Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt -পোরà§à¦¤à§à¦—াল pt -Portugalsko pt -Portiwgal pt -ΠοÏτογαλία pt -Portugalo pt -پرتغال pt -Portugali pt -An Phortaingéil pt -פורטוגל pt -पà¥à¤°à¥à¤¤à¤—ाल pt -Portugália pt -Portúgal pt -Portogallo pt -ãƒãƒ«ãƒˆã‚¬ãƒ« pt -áž–áŸážšáž‘ុយហ្គាល់ pt -í¬ë¥´íˆ¬ê°ˆ pt -ໂປຣຕຸເàºàºª pt -Portugalija pt -PortugÄle pt -Португалија pt -Португал pt -Portugall pt -ਪà©à¨°à¨¤à¨—ਾਲ pt -Portugalia pt -Portugalia pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt -Poritigali pt -Portugalsko pt -Portugalska pt -Португал pt -I-Portugal pt -போரà¯à®¤à¯à®¤à¯à®•ல௠pt -Пуртуқол pt -โปรตุเà¸à¸ª pt -Portekiz pt -Portugalia pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt -Bồ Äào Nha pt -è‘¡è„牙 pt -è‘¡è„牙 pt -Palau pw -بالاو pw -Палау pw -Палау pw -পালাউ pw -Palaw pw -Παλάου pw -Palao pw -پالائو pw -פל×ו pw -पलाऊ pw -Palá pw -パラオ pw -ប៉ាឡូ pw -팔ë¼ìš° pw -ມອລຕາ pw -Палау pw -Палау pw -ਪਾਲਾਉ pw -Палау pw -Palawu pw -Палау pw -பலாவ௠pw -Палау pw -เà¸à¸²à¸°à¸žà¸²à¹€à¸¥à¸² pw -Палау pw -Палау pw -Palawou pw -帕劳 pw -å¸›ç‰ pw -Paraguay py -Paraguaai py -باراغواي py -Paraqvay py -Парагвай py -Парагвай py -পà§à¦¯à¦¾à¦°à¦¾à¦—à§à§Ÿà§‡ py -Paragwae py -Paragvaj py -Paraguai py -Paragw?i py -ΠαÏαγουάη py -Paragvajo py -Paraguai py -پاراگویه py -Paragua py -Paraguai py -פרגו××™ py -पैरागà¥à¤ py -Paragvaj py -Paragvæ py -パラグアイ py -ប៉ារ៉ាហ្គាយ py -파ë¼ê³¼ì´ py -ປາລາàºàºàº§àº py -Paragvajus py -Paragvaja py -Парагвај py -Парагвай py -Paragwaj py -Paraguai py -ਪਾਰਾਗà©à¨† py -Paragwaj py -Paraguai py -Paraguai py -Paraguai py -Парагвай py -Paragwe py -Portugalsko py -Paragvaj py -Парагвај py -Paragvaj py -I-Paraguay py -பராகà¯à®µà¯‡ py -Порогвие py -ปาราà¸à¸§à¸±à¸¢ py -Парагвай py -Парагвай py -Paragway py -巴拉圭 py -巴拉圭 py -Qatar qa -قطر qa -Катар qa -Катар qa -কাতার qa -Kwatar qa -Katar qa -Katar qa -Catar qa -Katar qa -ÎšÎ±Ï„Î¬Ï qa -Kataro qa -Katar qa -قطر qa -Katar qa -Catar qa -קטר qa -क़तर qa -Katar qa -Katar qa -Katar qa -カタール qa -កាážáž¶ážš qa -카타르 qa -ມອລຕາ qa -Kataras qa -Katara qa -Катар qa -Катар qa -Katar qa -ਕਤਰ qa -Katar qa -Катар qa -Katari qa -Katar qa -Katar qa -Катар qa -Katar qa -I-Qatar qa -கதார௠qa -Қатар qa -ควาตาร์ qa -Katar qa -Катар qa -Қатар qa -Katar qa -å¡å¡”å°” qa -å¡é” qa -Romania ro -Romenië ro -رومانيا ro -Rumıniya ro -Ð ÑƒÐ¼Ñ‹Ð½Ñ–Ñ ro -Ð ÑƒÐ¼ÑŠÐ½Ð¸Ñ ro -রà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ ro -Roumani ro -Rumunija ro -Rumunsko ro -Rumænien ro -Rumänien ro -Ρουμανία ro -Rumanio ro -Rumanía ro -Rumeenia ro -Errumania ro -رومانی ro -Rumenia ro -Roumanie ro -Roemenië ro -An Rómáin ro -Románia ro -רומניה ro -रोमानिया ro -Rumunjska ro -Románia ro -Rumania ro -Rúmenía ro -ルーマニア ro -រូម៉ានី ro -루마니아 ro -ໂລມາເນີຠro -Rumunija ro -RumÄnija ro -Романија ro -Румын ro -Rumanija ro -Rumänien ro -Roemenië ro -ਰੋਮਾਨੀਆ ro -Rumunia ro -Roménia ro -Romênia ro -România ro -Ð ÑƒÐ¼Ñ‹Ð½Ð¸Ñ ro -Romaniya ro -Románia ro -Rumunsko ro -Romunija ro -Румунија ro -Rumunija ro -I-Romania ro -Rumänien ro -à®°à¯à®®à¯‡à®©à®¿à®¯à®¾ ro -Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro -โรมาเนีย ro -Romanya ro -Ð ÑƒÐ¼ÑƒÐ½Ñ–Ñ ro -Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro -Roumaneye ro -罗马尼亚 ro -羅馬尼亞 ro -Russia ru -Rusland ru -روسيا ru -Rusiya ru -РаÑÐµÑ ru -РуÑÐ¸Ñ ru -রাশিয়া ru -Rusia ru -Rusija ru -Rússia ru -Rusko ru -Rwsia ru -Rusland ru -Russland ru -Ρωσία ru -Ruslando ru -Rusia ru -Venemaa ru -Errusia ru -روسیه ru -Venäjä ru -Russland ru -Russie ru -Rusland ru -An Rúis ru -Rúsia ru -רוסיה ru -रà¥à¤¸ ru -Rusija ru -Oroszország ru -Rusia ru -Rússland ru -ロシア ru -រូស្ស៊ី ru -러시아 ru -ລັດເຊີຠru -Rusija ru -Krievija ru -РуÑија ru -ÐžÑ€Ð¾Ñ ru -Russja ru -Russland ru -Russland ru -Rusland ru -Russland ru -ਰੂਸ ru -Rosja ru -Rússia ru -Rússia ru -Rusia ru -РоÑÑÐ¸Ñ ru -Uburusiya ru -Ruošša ru -Rusko ru -Rusija ru -РуÑија ru -Rusija ru -I-Russia ru -Ryssland ru -ரசியா ru -РуÑÑÐ¸Ñ ru -รัสเซีย ru -Rusya ru -Urısia, Räsäy ru -РоÑÑ–Ñ ru -РоÑÑÐ¸Ñ ru -Rashia ru -Nga ru -Rûsseye ru -Rashiya ru -ä¿„ç½—æ–¯ ru -ä¿„ç¾…æ–¯ ru -Rwanda rw -رواندا rw -Ruanda rw -Руанда rw -Руанда rw -রোয়ানà§à¦¡à¦¾ rw -Ruanda rw -Ruanda rw -Ruanda rw -Ρουάντα rw -Ruando rw -Ruanda rw -رواندا rw -Ruanda rw -Ruanda rw -Ruanda rw -רו×נדה rw -रवांडा rw -Ruanda rw -Ruanda rw -Rúanda rw -Ruanda rw -ルワンダ rw -រវ៉ាន់ដា rw -르완다 rw -à»àºžàº™àº”້າ rw -Ruanda rw -Ruanda rw -Руанда rw -Рванда rw -Ruanda rw -ਰਵਾਂਡਾ rw -Ruanda rw -Ruanda rw -Ruanda rw -Ruanda rw -Руанда rw -Ruanda rw -Руанда rw -Ruanda rw -வானà¯à®Ÿà®¾ rw -Руондо rw -รวันด้า rw -Ruanda rw -Руанда rw -Рванда rw -墿—ºè¾¾ rw -ç›§å®‰é” rw -Saudi Arabia sa -Saudi Arabië sa -السعودية sa -SÉ™udi ÆrÉ™bistan sa -СаудаўÑÐºÐ°Ñ ÐÑ€Ð°Ð±Ñ–Ñ sa -СаудитÑка ÐÑ€Ð°Ð±Ð¸Ñ sa -সৌদি আরব sa -Arabi Saudiet sa -Saudijska Arabija sa -Aràbia Saurí sa -Saúdská Arábie sa -Sawdi Arabia sa -Saudi Arabien sa -Saudi-Arabien sa -Σαουδική ΑÏαβία sa -SaÅ­da Arabio sa -Arabia Saudí sa -Saudi Araabia sa -عربستان سعودی sa -Saudi-Arabia sa -Arabie Saoudite sa -Saudi-Arabië sa -An Araib Shádach sa -Arabia Saudita sa -ערב הסעודית sa -सऊदी अरब sa -Saudijska Arabija sa -Szaúd-Arábia sa -Sádi-Arabía sa -Arabia Saudita sa -サウジアラビア sa -អារ៉ាប៊ីសាអ៊ូឌីហsa -사우디 ì•„ë¼ë¹„ì•„ sa -ອາລະບິຠsa -Saudo Arabija sa -SaÅ«da ArÄbija sa -СаудиÑка Ðрабија sa -Саудын араб sa -Għarabja Sawdita sa -Saudi-Arabia sa -Saudi Arabien sa -Saudi-Arabië sa -Saudi-Arabia sa -ਸਾਊਦੀ ਅਰਬ sa -Arabia Saudyjska sa -Arábia Saudita sa -Arábia Saudita sa -Arabia Saudită sa -СаудовÑÐºÐ°Ñ ÐÑ€Ð°Ð²Ð¸Ñ sa -Arabiya Sawudite sa -Saudi Arábia sa -Saudská arábia sa -Saudova Arabija sa -СаудијÑка Ðрабија sa -Saudijska Arabija sa -I-Saudi Arabia sa -Saudiarabien sa -சவà¯à®¤à®¿ அரேபியா sa -ÐрабиÑтони Саудӣ sa -ซาอุดิอาระเบีย sa -Suudi Arabistan sa -Söğüd Ğäräbstan sa -СаудівÑька ÐÑ€Ð°Ð²Ñ–Ñ sa -Ð¡Ð°ÑƒÐ´Ð¸Ñ ÐрабиÑтони sa -Ẩrập Saudi sa -Arabeye Sawoudite sa -沙特阿拉伯 sa -æ²™çƒåœ°é˜¿æ‹‰ä¼¯ sa -Solomon Islands sb -Solomon Eilande sb -جزر سليمان sb -Solomon Adaları sb -Саламонавы аÑтравы sb -Соломонови оÑтрови sb -সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ sb -Inizi Salaun sb -Solomonska ostrva sb -Illes Solomon sb -Å alamounovy ostrovy sb -Ynysoedd Solomon sb -Salomon-øerne sb -Salomon-Inseln sb -Îήσοι Σολομώντος sb -Salomonoj sb -Islas Salomón sb -Saalomoni saared sb -Solomon Irlak sb -جزایر سلیمان sb -Solomon-saaret sb -ÃŽles Salomon sb -Solomon Eilannen sb -Oileáin Sholamón sb -Illas Salomón sb -××™×™ שלמה sb -सोलोमन आइलैंड sb -Solomonova otoÄja sb -Salamon-szigetek sb -Salómonseyjar sb -Isole Salomone sb -ソロモン諸島 sb -កោះ​សូឡូម៉ូន sb -솔로몬 ì œë„ sb -ສະໂລວະເນີຠsb -Saliamono salos sb -Solomonu salas sb -СоломонÑки ОÑтрови sb -Соломоны арлууд sb -Gżejjer Solomon sb -Salomonøyene sb -Salomonen sb -Solomon Eilanden sb -Salomonøyane sb -ਸੋਲੋਮੋਨ ਆਈਸਲੈਂਡ sb -Wyspy Salomona sb -Ilhas Salomão sb -Ilhas Salomão sb -Insulele Solomon sb -Соломоновы оÑтрова sb -Ibirwa bya Salomo sb -Salomonsullot sb -Å alamúnove ostrovy sb -Solomonovi otoki sb -Соломонова оÑтрва sb -Solomonova ostrva sb -Salomonöarna sb -சாலமன௠தீவà¯à®•ள௠sb -Ҷазираи Сулаймон sb -หมู่เà¸à¸²à¸°à¹‚ซโลมอน sb -Solomon Adaları sb -Solomon Utrawları sb -Соломонові оÑтрови sb -Соломон Ороллари sb -Quần đảo Solomon sb -Iyes Salomon sb -所罗门群岛 sb -索羅門群島 sb -Seychelles sc -سيشل sc -СÑйшÑлы sc -СейшелÑки оÑтрови sc -সীচিলিস sc -Sechell sc -SejÅ¡eli sc -Ynysoedd y Seisi?l sc -Seychellerne sc -Seychellen sc -Σεϋχέλλες sc -SejÅeloj sc -SeiÅ¡ellid sc -سیشل sc -Seychellit sc -Seychellen sc -Na Séiséil sc -Seicheles sc -××™×™ סיישל sc -शेसेलà¥à¤¸ sc -SejÅ¡eli sc -Seychelles-eyjar sc -セイシェル sc -សីស្ហែល sc -세ì´ì…¸ sc -ເຊລ sc -SeiÅ¡eļu salas sc -Сејшели sc -Ð¡ÐµÐ¹Ñ‡ÐµÐ»Ð»Ð¸Ñ sc -Seychellene sc -Seychellen sc -Seychellen sc -Seychellane sc -ਸੀਲਚੀਲੀਸ sc -Seszele sc -Ilhas Seychelles sc -СейшельÑкие оÑтрова sc -Seyishele sc -SeyÅ¡ellat sc -SejÅ¡eli sc -Сејшели sc -SejÅ¡eli sc -Seychellerna sc -சேசெலà¯à®²à®¸à¯ sc -Сейшелӣ sc -ซีเชลล์ sc -SeyÅŸeller sc -SeyÅŸellär sc -СейшельÑькі оÑтрови sc -Сейшел Ороллари sc -Seycheles sc -塞舌尔 sc -塞席爾 sc -Sudan sd -السودان sd -Судан sd -Судан sd -সà§à¦¦à¦¾à¦¨ sd -Sondan sd -Sudán sd -Swdan sd -Σουδάν sd -Sudano sd -Sudán sd -Sudaan sd -سودان sd -Sudania sd -Soudan sd -An tSúdáin sd -Sudán sd -סודן sd -सूडान sd -Szudán sd -Súdan sd -スーダン sd -ស៊ូដង់ sd -수단 sd -ຊູດານ sd -Sudanas sd -SudÄna sd -Судан sd -Судан sd -ਸੂਡਾਨ sd -Sudão sd -Sudão sd -Судан sd -Sudani sd -Sudán sd -Судан sd -I-Sudan sd -சூடான௠sd -Судон sd -ซูดาน sd -Судан sd -Судан sd -Sudani sd -Soudan sd -è‹ä¸¹ sd -蘇丹 sd -Sweden se -Swede se -السويد se -İsveç se -ШвÑÑ†Ñ‹Ñ se -Ð¨Ð²ÐµÑ†Ð¸Ñ se -সà§à¦‡à¦¡à§‡à¦¨ se -Å vedska se -Suècia se -Å védsko se -Sverige se -Schweden se -Σουηδία se -Svedio se -Suecia se -Rootsi se -Suedia se -سوئد se -Ruotsi se -Svøriki se -Suède se -Zweden se -An tSualainn se -Suécia se -שבדיה se -सà¥à¤µà¥€à¤¡à¤¨ se -Å vedska se -Svédország se -Swedia se -Svíþjóð se -Svezia se -スウェーデン se -ស៊ុយអែដ se -ìŠ¤ì›¨ë´ se -ສະວີເດນ se -Å vedija se -Zviedrija se -ШведÑка se -Швед se -Svezja se -Sverige se -Zweden se -Sverige se -Suècia se -ਸਵੀਡਨ se -Szwecja se -Suécia se -Suécia se -Suedia se -Ð¨Ð²ÐµÑ†Ð¸Ñ se -Suwede se -Ruoŧŧa se -Å védsko se -Å vedska se -ШведÑка se -Å vedska se -I-Sweden se -Sverige se -சà¯à®µà¯€à®Ÿà®©à¯ se -Шведӣ se -สวีเดน se -İsveç se -İswäc, Åžwedsia se -Ð¨Ð²ÐµÑ†Ñ–Ñ se -Ð¨Ð²ÐµÑ†Ð¸Ñ se -Swidene se -Thuỵ Äiển se -Suwede se -瑞典 se -瑞典 se -Singapore sg -سنغاÙورة sg -Sinqapur sg -Сынгапур sg -Сингапур sg -সিঙà§à¦—াপà§à¦° sg -Singapour sg -Singapur sg -Singapur sg -Singapur sg -Singap?r sg -Singapur sg -ΣινγκαποÏÏη sg -Singapuro sg -Singapur sg -Singapur sg -سنگاپور sg -Singapour sg -Singeapór sg -Singapur sg -סינגפור sg -सिंगापोर sg -Singapur sg -Szingapúr sg -Singapúr sg -シンガãƒãƒ¼ãƒ« sg -សិង្ហបុរី sg -싱가í¬ë¥´ sg -ໂຊນາ sg -SingapÅ«ras sg -SingapÅ«ra sg -Сингапур sg -Сингафур sg -Singapura sg -Singapor sg -Singapur sg -ਸਿੰਘਾਪà©à¨° sg -Singapur sg -Singapura sg -Singapura sg -Сингапур sg -Singapur sg -Singapur sg -Сингапур sg -Singapur sg -சிஙà¯à®•பà¯à®ªà¯‚ர௠sg -Сингопур sg -สิงคโปร์ sg -Singapur sg -Singapur sg -Сінгапур sg -Сингапур sg -Singapour sg -æ–°åŠ å¡ sg -æ–°åŠ å¡ sg -Saint Helena sh -St Helena sh -سانت هيلانة sh -ВоÑтраў СьвÑтой Ðлены sh -Св. Елена sh -সেনà§à¦Ÿ হেলেনা sh -Sant Lena sh -Sveta Helena sh -Santa Helena sh -Svatá Helena sh -Ynys Santes Helena sh -St. Helena sh -St. Helena sh -Αγία Ελένη sh -Sent-Heleno sh -Santa Helena sh -سنت هلن sh -Sainte-Hélène sh -Sint Helena sh -San Héilin sh -Santa Helena sh -סט. הלנה sh -सेंट हेलेना sh -Sveta Helena sh -Szent Heléna sh -Sankti Helena sh -Sant'Elena sh -英領セントヘレナ島 sh -សង់ហáŸáž¡áŸážŽáž¶ sh -세ì¸íŠ¸í—¬ë ˆë‚˜ sh -ຫົວເລື່ອງ sh -Å v. Elenos sala sh -Sv. HelÄ“nas sala sh -Света Елена sh -Сайнт Хелена sh -St. Helena sh -Sankt Helena sh -St. Helena sh -ਸੇਂਟ ਹੀਲੀਨਆ sh -ÅšwiÄ™ta Helena sh -Santa Helena sh -Santa Helena sh -Sfînta Elena sh -оÑтров СвÑтой Елены sh -Mutagatifu Helena sh -St. Helena sh -Svätá Helena sh -Sveta Helena sh -Света Јелена sh -Sveta Jelena sh -செயினà¯à®Ÿà¯ ஹேலேனா sh -Синт Ҳилин sh -เซนต์เฮเลน่า sh -ОÑтрів СвÑтої Єлени sh -Ðвлиё Елена Ороли sh -Sint Elene sh -圣赫勒拿 sh -è–赫勒拿島 sh -Slovenia si -Slovenië si -سلوÙينيا si -Sloveniya si -Ð¡Ð»Ð°Ð²ÐµÐ½Ñ–Ñ si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si -সà§à¦²à§‹à¦­à§‡à¦¨à¦¿à§Ÿà¦¾ si -Sloveni si -Slovenija si -Eslovènia si -Slovinsko si -Slofenia si -Slovenien si -Slowenien si -Σλοβενία si -Slovenio si -Eslovenia si -Sloveenia si -Eslovenia si -اسلوانی si -Slovénie si -Slowenië si -An tSlóivéin si -Eslovénia si -סלובניה si -सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾ si -Slovenija si -Szlovénia si -Slóvenía si -スロベニア si -ស្លូវ៉ានី si -슬로베니아 si -ສະໂລວະເນີຠsi -SlovÄ—nija si -SlovÄ“nija si -Словенија si -Слован si -Slovenja si -Slowenien si -Slowenië si -Eslovenia si -ਸਲੋਵੀਨੀਆ si -SÅ‚owenia si -Eslovénia si -Eslovênia si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si -Siloveniya si -Slovinsko si -Slovenija si -Словенија si -Slovenija si -I-Slovenia si -Slovenien si -சà¯à®²à¯‹à®µà®¿à®©à®¿à®¯à®¾ si -УÑлувонӣ si -สโลเวเนีย si -Slovenya si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ñ–Ñ si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si -Esloveneye si -斯洛文尼亚 si -斯洛維尼亞 si -Slovakia sk -Slovakië sk -Ø³Ù„ÙˆÙØ§ÙƒÙŠØ§ sk -Slovakiya sk -Ð¡Ð»Ð°Ð²Ð°ÐºÑ–Ñ sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk -সà§à¦²à§‹à¦­à¦¾à¦•িয়া sk -Slovaki sk -SlovaÄka sk -Eslovàquia sk -Slovensko sk -Slofacia sk -Slovakiet sk -Slowakien sk -Σλοβακία sk -Slovakujo sk -Eslovaquia sk -Slovakkia sk -Eslovakia sk -اسلواکی sk -Slovaquie sk -Slowakije sk -An tSlóvaic sk -Eslováquia sk -סלובקיה sk -सà¥à¤²à¥‹à¤µà¤¾à¤•िया sk -SlovaÄka sk -Szlovákia sk -Slóvakía sk -Slovacchia sk -スロãƒã‚­ã‚¢ sk -ស្លូវ៉ាគី sk -슬로바키아 sk -ສະໂລວັຠsk -Slovakija sk -SlovÄkija sk -Словачка sk -Словак sk -Slovakja sk -Slowakei sk -Slowakije sk -ਸਲੋਵਾਕਿਆ sk -SÅ‚owacja sk -Eslováquia sk -Eslováquia sk -Slovacia sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk -Silovakiya sk -Slovákia sk -Slovensko sk -SlovaÅ¡ka sk -Словачка sk -SlovaÄka sk -I-Slovakia sk -Slovakien sk -சà¯à®²à¯‹à®µà®¾à®•à¯à®•ிய sk -УÑлувок sk -สโลวาเà¸à¸µà¸¢ sk -Slovakya sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÑ–Ñ sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk -Eslovakeye sk -斯洛ä¼å…‹ sk -斯洛ä¼å…‹ sk -San Marino sm -سان مارينو sm -Сан-Марына sm -Сан Марино sm -সান মারিনো sm -Σαν ΜαÏίνο sm -San-Marino sm -سن‌مارینو sm -Saint-Marin sm -San Mairíne sm -סן מרינו sm -सेन मेरिनो sm -San Marínó sm -サンマリノ sm -សាន់ម៉ារីណូ sm -산마리노 sm -ໂຊນາ sm -San Marinas sm -SanmarÄ«no sm -Сан Марино sm -Сан Марино sm -ਸਨ ਮਰੀਨੋ sm -São Marino sm -Сан-Марино sm -Mutagatifu Marini sm -Сан Марино sm -சான௠மரினோ sm -Сан Морину sm -ซานมาริโน sm -Сан-Маріно sm -Сан-Марино sm -Sint Marin sm -圣马力诺 sm -è–馬力諾 sm -Senegal sn -السنغال sn -Seneqal sn -СÑнÑгал sn -Сенегал sn -সেনেগল sn -Σενεγάλη sn -Senegalo sn -سنگال sn -Senegali sn -Sénégal sn -An tSeineagáil sn -סנגל sn -सेनेगल sn -Szenegál sn -ã‚»ãƒã‚¬ãƒ« sn -សáŸáž“áŸáž áŸ’គាល់ sn -세네갈 sn -ທົ່ວໄປ sn -Senegalas sn -SenegÄla sn -Сенегал sn -Сенегал sn -Senegall sn -ਸੈਨੇਗਾਲ sn -Сенегал sn -Senegali sn -Сенегал sn -சீனேகல௠sn -Синегол sn -เซนีà¸à¸±à¸¥ sn -Сенегал sn -Сенегал sn -SenegÃ¥l sn -塞内加尔 sn -塞內加爾 sn -Somalia so -Somalië so -صومال so -Somali so -Самалі so -Ð¡Ð¾Ð¼Ð°Ð»Ð¸Ñ so -সোমালিয়া so -Somali so -Somalija so -Somàlia so -Somálsko so -Σομαλία so -Somalio so -Somaalia so -سومالی so -Somalie so -Somalie so -An tSomáil so -Somália so -סומליה so -सोमालिया so -Somalija so -Szomália so -Sómalía so -ソマリア so -សូម៉ាលី so -소ë§ë¦¬ì•„ so -ໂລມາເນີຠso -Somalis so -SomÄlija so -Сомалија so -Сомали so -Somalija so -Somalien so -Somalie so -ਸੋਮਾਲੀਆ so -Somália so -Somália so -Сомали so -Somaliya so -Somália so -Somálsko so -Somalija so -Сомалија so -Somalija so -I-Somalia so -சோமாலியா so -Сумалӣ so -โซมาเลีย so -Somali so -Сомалі so -Сомали so -Somaleye so -索马里 so -索馬利亞 so -Suriname sr -سورينام sr -Surinam sr -Сурынам sr -Суринам sr -সà§à¦°à¦¿à¦¨à¦¾à¦® sr -Surinam sr -Surinam sr -Surinam sr -Swrinam sr -Surinam sr -ΣουÏινάμ sr -Surinamo sr -Surinam sr -Surinam sr -سورینام sr -Surinam sr -Suranam sr -סורינ×× sr -सूरीनाम sr -Surinam sr -Súrínam sr -スリナム sr -ស៊ូរីណាមី sr -수리남 sr -ເຊີເບີຠsr -Surinamas sr -Surinama sr -Суринам sr -Суринам sr -Surinam sr -Surinam sr -Surinam sr -Surinam sr -ਸੂਰੀਨਾਮੀ sr -Surinam sr -Surinam sr -Суринам sr -Surinamu sr -Surinam sr -Surinam sr -Surinam sr -Суринам sr -Surinam sr -Surinam sr -சà¯à®°à®¿à®¨à¯‡à®®à¯ sr -Суринам sr -ซูรีนามิ sr -Surinam sr -Surinam sr -Сурінам sr -Суринам sr -è‹é‡Œå— sr -è˜‡åˆ©å— sr -Sao Tome and Principe st -Sao Tome en Principe st -ساو تومي Ùˆ البرنسيب st -Sao Tome vÉ™ Principe st -Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі st -Сао Томе и ПринÑипи st -সাও টোম à¦à¦¬à¦‚ পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ª st -Sao Tome ha Principe st -Sao Tome i Principe st -Sao Tome i Principe st -Sao Tome a Principe st -Ynysoedd Sao Tome a Principe st -Sao Tomé og Principe st -Sao Tome und Principe st -Σάο Τομέ και ΠÏίνσιπε st -Sao-Tomeo kaj Principeo st -Sao Tome y Príncipe st -Sao Tome ja Principe st -Sao Tome eta Principe st -سائوتومه Ùˆ پرینسیپه st -São Tomé ja Príncipe st -Sao Tomé et Principe st -Sao Tome en Principe st -São Tomé agus Príncipe st -Santo Tomé e Príncipe st -साओ टोम तथा पà¥à¤°à¤¿à¤‚सिपी st -Sv. Toma i Princip st -Sao Tome és Principe st -Saó Tóme og Prinsípe st -São Tomé e Príncipe st -サントメプリンシペ st -ìƒíˆ¬ë©” 프린시페 st -ບà»àº¥àº´àºàº²àº™ st -Santome un Prinsipi st -Сао Томе и ПринÑипе st -Сао Ð¢Ð¾Ð¼Ñ Ð±Ð° Принцип st -Sao Tome u Principe st -São Tomé og Príncipe st -São Tomé un Príncipe st -Sao Tome en Principe st -São Tomé og Príncipe st -ਸਾਓ ਟੋਮੀ ਤੇ ਪਰੀਸਿਪੀ st -Sao Tome i Principe st -São Tomé and Príncipe st -São Tome e Príncipe st -Sao Tome ÅŸi Principe st -Сан-Томе и ПринÑипи st -Sawo Tome na Purencipe st -São Tomé ja Príncipe st -Sao Tome a Principe st -Sao Tome in Principe st -Св. Тома и Принцип st -Sv. Toma i Princip st -São Tomé och Príncipe st -சயோ டோம௠மறà¯à®±à¯à®®à¯ பிரினà¯à®¸à®¿à®ªà®¿ st -Синт Том ва ПринÑип st -ซาวโทม à¹à¸¥à¸° พรินซิป st -Sao Tome ve Principe st -Sao Tome wä Principe st -Сан-Томе Ñ– ПрінÑіпі st -Сан-Томе ва ПринÑипи st -São Tomé et Prince st -圣多美和普林西比 st -è–å¤šç¾ŽåŠæ™®æž—西比 st -El Salvador sv -Ø§Ù„Ø³Ù„ÙØ§Ø¯ÙˆØ± sv -Сальвадор sv -Салвадор sv -à¦à¦² সালভাডোর sv -Ar Salvador sv -Salvador sv -El Salfador sv -Ελ Î£Î±Î»Î²Î±Î½Ï„ÏŒÏ sv -Salvadoro sv -Salvador sv -السالوادور sv -Salvador sv -An tSalvadóir sv -O Salvador sv -×ל סלבדור sv -अल सलà¥à¤µà¤¾à¤¡à¥‹à¤° sv -Salvador sv -エルサルãƒãƒ‰ãƒ« sv -អែលសាល់វ៉ាឌáŸážš sv -엘살바ë„르 sv -ເອລຊັນວາດດ໠sv -Salvadoras sv -Salvadora sv -Ел Салвадор sv -Эл Салвадор sv -ਈਲ ਸਾਲਵੇਡੋਰ sv -Salwador sv -Salvador sv -Сальвадор sv -Eli Salivadoro sv -Salvádor sv -Salvador sv -Ел Салвадор sv -I-El Salvador sv -எல௠சாலà¯à®µà®Ÿà¯‹ ர௠sv -Ðл Салвадур sv -เอลซัลวาดอร์ sv -Ель-Сальвадор sv -Салвадор sv -è¨å°”瓦多 sv -薩爾瓦多 sv -Syria sy -Sirië sy -سوريا sy -SuriyÉ™ sy -Ð¡Ñ‹Ñ€Ñ‹Ñ sy -Ð¡Ð¸Ñ€Ð¸Ñ sy -সিরিয়া sy -Siri sy -Sirija sy -Síria sy -Sýrie sy -Syrien sy -Syrien sy -ΣυÏία sy -Sirio sy -Siria sy -Süüria sy -Siria sy -سوریه sy -Syyria sy -Syrie sy -Syrië sy -An tSiria sy -Síria sy -סוריה sy -सीरिया sy -Sirija sy -Szíria sy -Sýrland sy -Siria sy -シリア sy -ស៊ីរី sy -시리아 sy -ເຊີເບີຠsy -Sirija sy -SÄ«rija sy -Сирија sy -Сири sy -Siria sy -Syrien sy -Syrië sy -ਸੀਰੀਆ sy -Síria sy -Síria sy -Siria sy -Ð¡Ð¸Ñ€Ð¸Ñ sy -Siriya sy -Sýria sy -Sirija sy -Сирија sy -Sirija sy -I-Syria sy -Syrien sy -சிரியா sy -Ð¡ÑƒÑ€Ð¸Ñ sy -ซีเรีย sy -Suriye sy -Süriä sy -Ð¡Ð¸Ñ€Ñ–Ñ sy -Ð¡ÑƒÑ€Ð¸Ñ sy -Sireye sy -å™åˆ©äºš sy -敘利亞 sy -Swaziland sz -Swasiland sz -سوازيلاند sz -Svaziland sz -СвазылÑнд sz -Свазиленд sz -সোয়াজিলà§à¦¯à¦¾à¦£à§à¦¡ sz -Svazilend sz -Neozelàndia sz -Gwlad y Swasi sz -Swasiland sz -Σουαζιλάνδη sz -Svazilando sz -Swazilandia sz -Svaasimaa sz -Swazilandia sz -سووازیلند sz -Swazimaa sz -An tSuasalainn sz -Suacilándia sz -סוו×זילנד sz -सà¥à¤µà¤¾à¤œà¥€à¤²à¥ˆà¤‚ड sz -Svazilend sz -Szváziföld sz -Svasíland sz -スワジランド sz -ស្វាហ្ស៊ីឡង់ sz -스와질란드 sz -ລາດສະນາຈັàºà»„ທຠsz -Svazilenda sz -Свазиленд sz -Свациланд sz -Sważilandja sz -Swasiland sz -ਸਵਾਜ਼ੀਲੈਂਡ sz -Suazi sz -Suazilândia sz -Suazilândia sz -Suaziland sz -Свазиленд sz -Swazilande sz -Swazijsko sz -Svazi sz -Свазиленд sz -Svazilend sz -ஸà¯à®µà®¾à®šà®¿à®²à®¾à®©à¯à®Ÿà¯ sz -Свозиланд sz -สวาซิà¹à¸¥à¸™à¸”์ sz -Свазіленд sz -Свазиленд sz -Suwazilande sz -æ–¯å¨å£«å…° sz -å²ç“¦æ¿Ÿè˜­ sz -Turks and Caicos Islands tc -Turks en Caicos Eilande tc -جزر الترك Ùˆ الكايكوس tc -Türk vÉ™ Caicos Adaları tc -ÐÑтравы ТÑÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ°Ñ tc -ОÑтрови Ð¢ÑŠÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc -টারà§à¦•স à¦à¦¬à¦‚ কাইকোস দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ tc -Inizi Turks ha Kaikos tc -Turks i Kaikos ostrva tc -Illes Turks i Caicos tc -Turks a Caicos ostrovy tc -Ynysoedd Twrc a Chaicos tc -Turks- og Caicosøerne tc -Turks- und Caicos-Inseln tc -Îήσοι ΤεÏκς και Κάικος tc -Turkoj kaj Kajkoj tc -Islas Turcos y Caicos tc -Turks ja Caicos tc -Turks eta Caicos Irlak tc -جزایر تورکس Ùˆ کایکوس tc -Turks- ja Caicos-saaret tc -ÃŽles Turks et Caicos tc -Turks en Caicos Eilânen tc -Na hOileáin Turks agus Caicos tc -Illas Caicos e Turks tc -××™×™ ×§×יקוס וטורקס tc -तà¥à¤°à¥à¤• तथा कैकोस आइलैंड tc -Turks i Caicos otoÄje tc -Turks- és Caicos-szigetek tc -Turks- og Caicos-eyjar tc -Isole Turks e Caicos tc -英領タークス諸島 カイコス諸島 tc -កោះ​ទួក និង​ កៃកូស tc -í„°í¬ìФ ì¼€ì´ì»¤ìФ ì œë„ tc -TÄ“rksa un Kaikosa tc -ОÑтрови Турк и ÐšÐ°Ð¸ÐºÐ¾Ñ tc -Турк ба Кайкогийн арлууд tc -Gżejjer Turks u Caicos tc -Turks- og Caicosøyene tc -Turks- un Caicosinseln tc -Turks en Caicos Eilanden tc -Turks- og Caicosøyane tc -ਤà©à¨°à¨•ਸ ਤੇ ਕਾਇਕੋਸ ਟਾਪੂ tc -Wyspy Turks i Caicos tc -Ilhas Turks e Caicos tc -Ilhas Caicos e Turca tc -Insulele Turks ÅŸi Caicos tc -ОÑтрова Ð¢ÐµÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc -Ibirwa bya Turike na Kayikosi tc -Turks- ja Kaikossullot tc -Turks a Caicos ostrovy tc -Otoka Turks in Caicos tc -Турка и Кајкошка оÑтрва tc -Turka i KajkoÅ¡ka ostrva tc -Turks- och Caicosöarna tc -தà¯à®°à¯à®•à¯à®•ிகள௠மறà¯à®±à¯à®®à¯ காயà¯à®•ோஸ௠தீவà¯à®•ள௠tc -Ҷазираи Турк ва ÐšÐ¾Ð¹ÐºÑƒÑ tc -เà¸à¸²à¸°à¸”ติร์à¸à¹à¸¥à¸°à¹€à¸„คอส tc -Turks ve Caicos Adaları tc -Türks wä Caicos Utrawları tc -ОÑтрови Ð¢ÐµÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ¾Ñ tc -Ð¢ÑƒÑ€ÐºÑ Ð²Ð° ÐšÐ°Ð¸ÐºÐ¾Ñ ÐžÑ€Ð¾Ð»Ð»Ð°Ñ€Ð¸ tc -Quần đảo Turks và Caicos tc -Iyes Turks et Caicos tc -特克斯和凯科斯群岛 tc -åœŸå…‹æ–¯å’Œé–‹å¡æ–¯ç¾¤å³¶ tc -Chad td -تشاد td -Çad td -Чад td -Чад td -চà§à¦¯à¦¾à¦¡ td -Tchad td -ÄŒad td -Txad td -ÄŒad td -Tsiad td -Tchad td -Tschad td -Τσαντ td -Ĉado td -TÅ¡aad td -Txad td -چاد td -Tchad td -Tsjaad td -Sead td -Chade td -צ'×ד td -चाड td -Äad td -Csád td -Tsjad td -Ciad td -ãƒãƒ£ãƒ‰ td -ឆាដ td -차드 td -ເàºàº¡à»„ພ່ td -ÄŒada td -Чад td -Чад td -ÄŠad td -Tsjad td -Tschad td -Tsjaad td -Tsjad td -ਚਾਂਦ td -Czad td -Chade td -Chade td -Ciad td -Чад td -Cade td -ÄŒad td -ÄŒad td -ÄŒad td -Чад td -ÄŒad td -Tchad td -சாட௠td -Чод td -ชาด td -Çad td -Çad td -Чад td -Чад td -Tchad td -ä¹å¾— td -查德 td -Togo tg -توغو tg -Тога tg -Того tg -টোগো tg -Τόγκο tg -توگو tg -Tógó tg -טוגו tg -टोगो tg -Tógó tg -トーゴ tg -ážáž¼áž áŸ’គោ tg -토고 tg -ຂອງເລ່ນສະນຸຠtg -Того tg -Того tg -ਤੋਗੋ tg -Того tg -Того tg -டோகோ tg -Того tg -โตโภtg -Того tg -Того tg -多哥 tg -多哥 tg -Thailand th -تايلاند th -Tayland th -ТайлÑнд th -Тайланд th -থাইলà§à¦¯à¦¾à¦£à§à¦¡ th -Tajland th -Tailàndia th -Thajsko th -Gwlad y Tai th -Ταϊλάνδη th -Tajlando th -Tailandia th -Tai th -Thailandia th -تایلند th -Thaimaa th -Tailand th -Thaïlande th -Thailân th -An Téalainn th -Tailándia th -ת×ילנד th -थाइलैंड th -Tajland th -Thaiföld th -Taíland th -Tailandia th -タイ th -ážáŸƒ th -태국 th -ລາດສະນາຈັàºà»„ທຠth -Tailandas th -Taizeme th -Тајланд th -Тайланд th -Tajlandja th -Tailandia th -ਥਾਈਲੈਂਡ th -Tajlandia th -Tailândia th -Tailândia th -Tailanda th -Таиланд th -Tayilande th -Thajsko th -Tajska th -Тајланд th -Tajland th -I-Thailand th -தாயà¯à®²à®¾à®¨à¯à®¤à¯ th -Тойлонд th -ราชอาณาจัà¸à¸£à¹„ทย th -Tayland th -Tayland th -Таїланд th -Таиланд th -Thái Lan th -Taylande th -泰国 th -泰國 th -Tajikistan tj -طاجيكستان tj -Tacikistan tj -ТаджыкіÑтан tj -ТаджикиÑтан tj -তাজিকিসà§à¦¤à¦¾à¦¨ tj -Tadjikistan tj -Tadžikistan tj -Tadjikistan tj -Tádžikistán tj -Tajicistan tj -Tadschikistan tj -Τατζικιστάν tj -TaÄikujo tj -Tajikistán tj -Tadžikistan tj -تاجیکستان tj -Tadjikistan tj -An Táidsíceastáin tj -Taxiquistán tj -טג'קיסטן tj -ताजिकिसà¥à¤¤à¤¾à¤¨ tj -Tadžikistan tj -Tadzsikisztán tj -Tadsjikistan tj -Tagikistan tj -タジキスタン tj -ážáž¶áž áŸ’ស៊ីគីស្ážáž„់ tj -타지키스탄 tj -ໃຕ້ຫວັນ tj -Tadžikistanas tj -TadžikistÄna tj -ТаџикиÑтан tj -ТажикÑтан tj -TaÄ¡ikistan tj -Tadsjikistan tj -Tadschikistan tj -Tadjikistan tj -Tadsjikistan tj -ਤਜ਼ਾਕਸਤਾਨ tj -Tadżykistan tj -Tajiquistão tj -Tajiquistão tj -ТаджикиÑтан tj -Tajikisitani tj -Tažikistan tj -Tadžikistan tj -Tadžikistan tj -ТаџикиÑтан tj -Tadžikistan tj -Tadzjikistan tj -தஜிகிஸà¯à®¤à®¾à®©à¯ tj -ТоҷикиÑтон tj -ธาจีà¸à¸´à¸ªà¸–าน tj -Tacikistan tj -Tajıqstan tj -ТаджикиÑтан tj -ТожикиÑтон tj -Tadjikistan tj -å¡”å‰å…‹æ–¯å¦ tj -å¡”å‰å…‹ tj -Tokelau tk -توكيلاو tk -Такелау tk -Токело tk -টোকেলো tk -Tokelo tk -Tocelaw tk -Τοκελάου tk -Tokelao tk -توکلائو tk -Na hOileáin Tócala tk -טוקל×ו tk -तोकेलाऊ tk -Tókelá tk -ニュージーランド自治領トケラウ tk -ážáž¼áž€áŸáž¡áž¼ tk -토켈로 tk -ເບລາລັສ tk -Токелау tk -Токелау tk -Tokelaw tk -ਤੋਕੀਲਾਉ tk -Токелау tk -Tokelawu tk -Токелау tk -டோகேலா tk -Токилау tk -โทเคเลา tk -Tokelauça tk -Токелау tk -Токелау tk -托克劳 tk -托克勞 tk -Turkmenistan tm -تركمانستان tm -TürkmÉ™nistan tm -ТуркмÑніÑтан tm -ТуркмениÑтан tm -তà§à¦°à§à¦•মেনিসà§à¦¤à¦¾à¦¨ tm -Turcmenistan tm -Turkmenistán tm -Twrcmenistan tm -ΤουÏκμενιστάν tm -Turkmenujo tm -Turkmenistán tm -Türkmenistan tm -ترکمنستان tm -Turkménistan tm -An Tuircméanastáin tm -Turkmenistán tm -טורקמניסטן tm -तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨ tm -Türkmenisztán tm -Túrkmenistan tm -トルクメニスタン tm -ទួគមáŸáž“ីស្ážáž„់ tm -투르í¬ë©”니스탄 tm -ຕຸລະàºàºµ tm -TurkmenistÄna tm -ТуркмениÑтан tm -ТуркменÑтан tm -ਤà©à¨°à¨•ੇਮਸਤਾਨ tm -Turquemenistão tm -Turcomenistão tm -Turcmenistan tm -ТуркмениÑтан tm -Turikimenisitani tm -ТуркмениÑтан tm -தà¯à®°à¯à®•à¯à®®à¯†à®©à®¿à®¸à¯à®¤à®¾à®©à¯ tm -ТуркманиÑтон tm -เตอร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน tm -Türkmenistan tm -ТуркменіÑтан tm -ТуркманиÑтон tm -Turcmenistan tm -åœŸåº“æ›¼æ–¯å¦ tm -土庫曼 tm -Tunisia tn -Tunisië tn -تونس tn -Tunis tn -Ð¢ÑƒÐ½Ñ–Ñ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -টিউনিসিয়া tn -Tunizi tn -Tunis tn -Tunísia tn -Tunisko tn -Tiwnisia tn -Tunesien tn -Tunesien tn -Τυνησία tn -Tunizio tn -Túnez tn -Tuneesia tn -تونس tn -Tunesia tn -Tunisie tn -Tunisie tn -An Túinéis tn -Túnez tn -תוניסיה tn -टà¥à¤¯à¥‚नीशिया tn -Tunis tn -Tunézia tn -Túnis tn -ãƒãƒ¥ãƒ‹ã‚¸ã‚¢ tn -ទុយនáŸážŸáŸŠáž¸ tn -튀니지 tn -ລັດເຊີຠtn -Tunisas tn -Tunisija tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tuneżija tn -Tunesien tn -Tunisie tn -ਟà©à¨¨à©€à¨¶à©€à¨† tn -Tunezja tn -Tunísia tn -Tunísia tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tuniziya tn -Tunisko tn -Tunizija tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tunis tn -I-Tunisia tn -Tunisien tn -தà¯à®©à®¿à®šà®¿à®¯à®¾ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -ตูนีเซีย tn -Tunus tn -Ð¢ÑƒÐ½Ñ–Ñ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tunizeye tn -çªå°¼æ–¯ tn -çªå°¼è¥¿äºž tn -Tonga to -تونغا to -Tonqa to -Тонга to -Тонга to -টোংগা to -Inizi Tonga to -Τόνγκα to -Tongo to -تونگو to -טונגה to -टोंगा to -トンガ to -ážáž»áž„ហ្គោ to -통가 to -ໂຊນາ to -Тонга to -Тонга to -ਟਾਂਗਾ to -Тонга to -Тонга to -டோஙà¯à®•ா to -Тонго to -ตองà¸à¹‰à¸² to -Тонга to -Тонга to -汤加 to -æ±åŠ  to -East Timor tp -Oos Timor tp -تيمور الشرقية tp -Şərqi Timor tp -УÑходні Тымор tp -Източен Тимор tp -পূরà§à¦¬ টিমর tp -Timor reter tp -IstoÄni Timor tp -Timor Est tp -Východní Timor tp -Dwyrain Timor tp -Østtimor tp -Ost-Timor tp -Ανατολικό Î¤Î¹Î¼ÏŒÏ tp -Orienta Timoro tp -Timor oriental tp -Ida-Timor tp -Ekialdeko Timor tp -تیمور شرقی tp -Itä-Timor tp -Timor oriental tp -Oost Timor tp -Tíomór Thoir tp -Timor do Leste tp -מזרח טימור tp -पूरà¥à¤µà¥€ तिमोर tp -IstoÄni Timor tp -Kelet-Timor tp -Austur-Tímor tp -Timor Est tp -æ±ãƒ†ã‚£ãƒ¢ãƒ¼ãƒ« tp -ទីមáŸážšâ€‹ážáž¶áž„​កើហtp -ë™í‹°ëª¨ë¥´ tp -ວັນà»àº¥àº°à»€àº§àº¥àº² tp -Rytų Timoras tp -Austrumtimora tp -ИÑточен Тимор tp -Зүүн тимор tp -Timor Timur tp -Timor tal-Lvant tp -Øst-Timor tp -Oosttimor tp -Oost Timor tp -Aust-Timor tp -ਪੂਰਬੀ ਤਾਮੋਰ tp -Timor Wschodni tp -Timor Leste tp -Timor Leste tp -Timorul de Est tp -ВоÑточный Тимор tp -Timoro y'Uburasirazuba tp -Nuorta-Timor tp -Východný Timor tp -Vzhodni Timor tp -ИÑточни Тимор tp -IstoÄni Timor tp -Östtimor tp -கிழகà¯à®•௠திமார௠tp -Тимури Шарқ tp -ติมอร์ตะวันออภtp -DoÄŸu Timur tp -Çığış Timor tp -Східний Тімор tp -Шарқий Тимур tp -Äông Timo tp -Timor Ess tp -ä¸œå¸æ±¶ tp -æ±å¸æ±¶ tp -Turkey tr -Turkeye tr -تركيا tr -TürkiyÉ™ tr -Ð¢ÑƒÑ€Ñ†Ñ‹Ñ tr -Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr -তà§à¦°à§à¦•à§€ tr -Turkia tr -Turska tr -Turquia tr -Turecko tr -Twrci tr -Tyrkiet tr -Türkei tr -ΤουÏκία tr -Turkujo tr -Turquía tr -Türgi tr -Turkia tr -ترکیه tr -Turkki tr -Turkaland tr -Turquie tr -Turkije tr -An Tuirc tr -Turquia tr -טורקיה tr -तà¥à¤°à¥à¤•ी tr -Turska tr -Törökország tr -Turki tr -Tyrkland tr -Turchia tr -トルコ tr -ទួរគី tr -터키 tr -ຕຸລະàºàºµ tr -Turkija tr -Turcija tr -Турција tr -Турк tr -Turki tr -Turkija tr -Tyrkia tr -Törkei tr -Turkije tr -Tyrkia tr -Turquia tr -ਤà©à¨°à¨•à©€ tr -Turcja tr -Turquia tr -Turquia tr -Turcia tr -Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr -Turukiya tr -Durka tr -Turecko tr -TurÄija tr -ТурÑка tr -Turska tr -I-Turkey tr -Turkiet tr -தà¯à®°à¯à®•à¯à®•ி tr -Туркиё tr -ตุรà¸à¸µ tr -Türkiye tr -Törkiä tr -Туреччина tr -Ð¢ÑƒÑ€ÐºÐ¸Ñ tr -Thổ NhÄ© Kì tr -Turkeye tr -土耳其 tr -土耳其 tr -Trinidad and Tobago tt -Trinidad en Tobago tt -ترينيداد Ùˆ توباغو tt -Trinidad vÉ™ Tabaqo tt -Трынідад Ñ– Табага tt -Тринидад и Тобаго tt -তà§à¦°à¦¿à¦¨à¦¿à¦¦à¦¾à¦¦ à¦à¦¬à¦‚ টোবাগো tt -Trinidad ha Tobago tt -Trinidad i Tobago tt -Trinidad i Tobago tt -Trinidad a Tobago tt -Ynysoedd Trinidad a Thobago tt -Trinidad og Tobago tt -Trinidad und Tobago tt -ΤÏίνινταντ και Τομπάγκο tt -Trinidado kaj Tobago tt -Trinidad y Tobago tt -Trinidad ja Tobago tt -Trinidad eta Tobago tt -ترینیداد Ùˆ ØªÙØ¨Ø§Ú¯Ùˆ tt -Trinidad ja Tobago tt -Trinidad og Tobago tt -Trinidad et Tobago tt -Trinidad en Tobago tt -Oileán na Tríonóide agus Tobága tt -Trinidade e Tobago tt -טרינידד וטובגו tt -टà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ और टोबैगो tt -Trinidad i Tobago tt -Trinidad és Tobago tt -Trinidad dan Tobago tt -Trínidad og Tóbagó tt -Trinidad e Tobago tt -トリニダードトãƒã‚³ tt -ទ្រីនីដាដ និង​​ ážáž¼áž”ាហ្គោ tt -트리니다드 토바고 tt -ຕີນິà»àº”ດà»àº¥àº°à»‚ທບາໂຠtt -Trinidadas ir Tobagas tt -Trinidada un Tobago tt -Тринидад и Тобаго tt -Тринида ба Тобаго tt -Trinidad dan Tobago tt -Trinidad u Tobago tt -Trinidad og Tobago tt -Trinidad un Tobago tt -Trinidad en Tobago tt -Trinidad og Tobago tt -Trinidad le Tobago tt -Trinidad e Tobago tt -ਤਰੀਨੀਡਾਡ ਤੇ ਤੋਬਾਗੋ tt -Trinidad i Tobago tt -Trindade e Tobago tt -Trinidad e Tobago tt -Trinidad ÅŸi Tobago tt -Тринидад и Тобаго tt -Tirinida na Tobago tt -Trinidad ja Tobago tt -Trinidad a Tobago tt -Trinidad in Tabago tt -Тринидад и Тобаго tt -Trinidad i Tobago tt -I-Trinidad kanye neTobago tt -Trinidad och Tobago tt -டà¯à®°à®¿à®©à®¿à®Ÿà®¾à®Ÿà¯ & டொபாகோ tt -Туриндод ва Тубогу tt -ตรีนิà¹à¸”ดà¹à¸¥à¸°à¹‚ทบาโภtt -Trinidad veTabago tt -Trinidad wä Tobago tt -РеÑпубліка Трінідад та Тобаго tt -Тринидад ва Тобаго tt -Trinidad na Tobago tt -Trinidad và Tobago tt -Trinité et Tobago tt -Trinidad ne Tobago tt -特立尼达和多巴哥 tt -åƒé‡Œé”åŠæ‰˜è²å“¥ tt -Trinidad knaye ne-Tobago tt -Tuvalu tv -ØªÙˆÙØ§Ù„Ùˆ tv -Тувалу tv -Тувалу tv -টà§à¦­à¦¾à¦²à§ tv -Twfalw tv -Î¤Î¿Ï…Î²Î±Î»Î¿Ï tv -Tuvalo tv -توالو tv -טוב×לו tv -तà¥à¤µà¤¾à¤²à¥‚ tv -Túvalú tv -ツãƒãƒ« tv -ទុយវ៉ាលុយ tv -투발루 tv -ຊູລູ tv -Тувалу tv -Тувалу tv -ਤà©à¨µà¨¾à¨²à©‚ tv -Тувалу tv -Тувалу tv -தà¯à®µà®²à¯ tv -Тувалу tv -ตูวาลู tv -Tuvaluça tv -Тувалу tv -Тувалу tv -Touvalou tv -å›¾ç“¦å¢ tv -å瓦魯 tv -Taiwan tw -تايوان tw -Tayvan tw -Тайвань tw -Тайван tw -তাইওয়ান tw -Tajvan tw -Ταϊβάν tw -Tajvano tw -Taiwán tw -تایوان tw -Taivan tw -Taïwan tw -An Téaváin tw -Taiwán tw -טיוו×ן tw -ताईवान tw -Tajvan tw -Tajvan tw -Taívan tw -å°æ¹¾ tw -ážáŸƒážœáŸ‰áž¶áž“់ tw -대만 tw -ໃຕ້ຫວັນ tw -Taivanis tw -TaivÄna tw -Тајван tw -Тайван tw -Tajwan tw -ਤਾਈਵਾਨ tw -Tajwan tw -Formosa tw -Taivan tw -Тайвань tw -Tayiwani tw -Tajvan tw -Тајван tw -Tajvan tw -I-Taiwan tw -தாயà¯à®µà®¾à®©à¯ tw -Тойвон tw -ไต้หวัน tw -Tayvan tw -Taywan tw -Тайвань tw -Тайван tw -Äài Loan tw -䏭国尿¹¾ tw -å°ç£ tw -Tanzania, United Republic of tz -Tanzanië, Vereenigde Republiek van tz -جمهورية تنزانيا المتحدة tz -Tanzaniya tz -Ð—Ð»ÑƒÑ‡Ð°Ð½Ð°Ñ Ð ÑÑпубліка Ð¢Ð°Ð½Ð·Ð°Ð½Ñ–Ñ tz -Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz -তানজানিয়া tz -Tanzanija, Ujedinjena Republika tz -Tanzània, República Unida de tz -Tanzánie tz -Tansania, Gweriniaeth Unedig tz -Tanzania tz -Tansania, vereinigte Republik tz -Τανζανία, Ενωμένη δημοκÏατία της tz -Tanzanio, UnuiÄinta Respubliko de tz -Tanzania, Republica de tz -Tansaania tz -Tanaziar Errepublika Batua tz -جمهوری متحده تانزانیا tz -Tansanian yhdistäytynyt tasavalta tz -Tanzanie, République unie de tz -Tanzanië, Ferienigd republyk fan tz -An Tansáin tz -República Unida de Tanzánia tz -טנזניה, הרפובליקה המ×וחדת של tz -तंजानिया यूनाइटेड रिपबà¥à¤²à¤¿à¤• tz -Ujedinjena Republika Tanzanija tz -Tanzánia tz -Tansanía tz -Tanzania tz -タンザニア,共和国連邦 tz -ážáž„់ហ្សានី tz -탄ìžë‹ˆì•„ 합중국 tz -ໂດມິນິàºàº±àº™ tz -Tanzanijos Respublika tz -TanzÄnija tz -Танзанија, Обединета Република tz -Танканы нÑгдÑÑн ÑƒÐ»Ñ tz -Republik Bersatu Tanzania tz -Tanżania tz -Tanzania tz -Tansania tz -Tanzania, Verenigde republiek van tz -Tanzania tz -ਤਾਨਜ਼ੂਈਆ, ਸੰਯà©à¨•ਤ ਗਣਰਾਜ tz -Zjednoczna Republika Tanzanii tz -República da União da Tanzânia tz -República da Tanzânia tz -Tanzania, Republica Unită tz -Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz -Tanzaniya, Repubulika Yunze Ubumwe ya tz -Tanzania tz -Tanzánia, Spojená republika tz -Tanzanija, Združena republika tz -Танзанија, Уједињена Република tz -Tanzanija, Ujedinjena Republika tz -Förenade republiken Tanzania tz -டானà¯à®œà®¾à®¨à®¿à®¯à®¾, à®à®•à¯à®•ிய கà¯à®Ÿà®¿à®¯à®°à®šà¯ tz -Ҷумҳурии Муттаҳидаи Тонзониё tz -สาธารณรัà¸à¹à¸—นซาเนีย tz -Tanzanya tz -Tanzania, Berläşkän Cömhüriätläre tz -ТанзаніÑ, об'єднана реÑпубліка tz -Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ Ð‘Ð¸Ñ€Ð»Ð°ÑˆÐ³Ð°Ð½ РеÑпубликаÑи tz -Tanzania, Cá»™ng hoà thống nhât tz -Tanzaneye tz -妿¡‘尼亚è”åˆå…±å’Œå›½ tz -å¦å°šå°¼äºž tz -Ukraine ua -Ukraïne ua -أوكرانيا ua -Ukrayna ua -Украіна ua -Украйна ua -ইউকà§à¦°à§‡à¦¨ ua -Ukraina ua -Ukrajina ua -Ucraïna ua -Ukrajina ua -Wcr?in ua -ΟυκÏανία ua -Ukrainio ua -Ucrania ua -Ukraina ua -Ukrania ua -اکراین ua -Ukraina ua -Ukraina ua -Oekraïne ua -An Úcráin ua -Ucrania ua -×וקר××™× ×” ua -उकà¥à¤°à¥‡à¤¨ ua -Ukrajina ua -Ukrajna ua -Ukraina ua -Úkraína ua -Ucraina ua -ウクライナ ua -អ៊ុយក្រែន ua -ìš°í¬ë¼ì´ë‚˜ ua -àºàº¹à»€àº„ຣນ ua -Ukraina ua -Ukraina ua -Украина ua -Украйн ua -Ukranja ua -Ukraina ua -Oekraïne ua -Ukraina ua -Ucraina ua -ਯੂਕਰੇਨ ua -Ukraina ua -Ucrânia ua -Ucrânia ua -Ucraina ua -Украина ua -Ukerene ua -Ukraina ua -Ukrajina ua -Ukrajina ua -Украјина ua -Ukrajina ua -I-Ukraine ua -Ukraina ua -உகà¯à®°à¯†à®¯à¯à®©à¯ ua -Украина ua -ยูเครน ua -Ukrayna ua -Ukrain ua -Україна ua -Украина ua -Ukraina ua -Oucrinne ua -乌克兰 ua -çƒå…‹è˜­ ua -Uganda ug -أوغندا ug -Uqanda ug -Уганда ug -Уганда ug -ইউগাণà§à¦¡à¦¾ ug -Ouganda ug -Wganda ug -Ουγκάντα ug -Ugando ug -اوگاندا ug -Ouganda ug -×וגנדה ug -उगांडा ug -Úganda ug -ウガンダ ug -អ៊ូហ្គង់ដា ug -우간다 ug -à»àºžàº™àº”້າ ug -Уганда ug -Уганда ug -ਯੂਗਾਂਡਾ ug -Уганда ug -Уганда ug -உகானà¯à®Ÿà®¾ ug -Угондо ug -ยูà¸à¸±à¸™à¸”า ug -Уганда ug -Уганда ug -Ouganda ug -乌干达 ug -çƒå¹²é” ug -United States of America us -Vereenigde State van Amerika us -الولايات المتحدة الأمريكية us -Amerika BirləşmiÅŸ Åžtatları us -Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ ÐмÑрыкі us -СÐЩ us -মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° us -Stadoù-Unanet Amerika us -Sjedinjene AmeriÄke Države us -Estats Units d'Amèrica us -Spojené státy americké us -Unol Daleithau America us -USA us -USA us -Ηνωμένες Πολιτείες της ΑμεÏικής us -Usono us -Estados Unidos de América us -Ameerika Ühendriigid us -Ameriketako Estatu Batuak us -ایالات متحده‌ی آمریکا us -Yhdysvallat us -Sambandsríki Amerika (USA) us -États Unis d'Amérique us -Ferienigde Staten fan Amerika us -Stáit Aontaithe Mheiriceá us -Estados Unidos de América us -×רצות הברית us -संयà¥à¤•à¥à¤¤ राजà¥à¤¯ अमेरिका us -Sjedinjene AmeriÄke Države us -Amerikai Egyesült Ãllamok us -Amerika Serikat us -Bandaríkin us -Stati Uniti d'America us -アメリカåˆè¡†å›½ us -សហរដ្ឋអាមáŸážšáž·áž€ us -미 합중국 us -ສະຫະລັດອາເມລິàºàº² us -JungtinÄ—s Amerikos Valstijos us -Amerikas SavienotÄs Valstis us -Соединети ÐмериканÑки Држави us -ÐÐУ us -Amerika Syarikat us -Stati Uniti us -USA us -Vereenigte Staten vun Amerika us -Verenigde Staten van Amerika us -USA us -Estats Units d'Amèrica us -ਸੰਯà©à¨•ਤ ਰਾਜ ਅਮਰੀਕਾ us -Stany Zjednoczone Ameryki us -Estados Unidos da América us -Estados Unidos da América us -Statele Unite ale Americii us -Соединённые Штаты Ðмерики us -Leta Zunze Ubumwe z'Amerika us -Amerihká ovttastuvvan stáhtat us -USA us -Združene države Amerike us -Сједињене америчке државе us -Sjedinjene ameriÄke države us -I-United States of America us -Amerikas förenta stater us -à®à®•à¯à®•ிய அமெரிகà¯à®•ா us -Иёлоти Муттаҳидаи Ðмрико us -สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² us -Amerika BirleÅŸik Devletleri us -Amerika QuÅŸma Åžtatları us -СШРus -Ðмерика Қўшма Штатлари us -mashango o tangananaho a America us -Hợp chá»§ng quốc Hoa Kỳ us -Estats Unis us -United States ye Melika us -美国 us -美利堅åˆçœ¾åœ‹ us -Uruguay uy -الأوروغواي uy -Uruqvay uy -Уругвай uy -Уругвай uy -উরà§à¦—à§à§Ÿà§‡ uy -Urugvaj uy -Uruguai uy -Wrwgw?i uy -ΟυÏουγουάη uy -Urugvajo uy -Uruguai uy -اروگویه uy -Uragua uy -Uruguai uy -×ורוגו××™ uy -उरूगà¥à¤µà¥‡ uy -Urugvaj uy -Úrúgvæ uy -ウルグアイ uy -អ៊ុយរុយហ្គាយ uy -ìš°ë£¨ê³¼ì´ uy -ອຸລຸàºàºàº§àº uy -Urugvajus uy -Urugvaja uy -Уругвај uy -Уругвай uy -Urugwaj uy -Uruguai uy -ਉਰੂਗਵੇ uy -Urugwaj uy -Uruguai uy -Uruguai uy -Uruguai uy -Уругвай uy -Irigwe uy -Uruguaj uy -Urugvaj uy -Уругвај uy -Urugvaj uy -I-Uruguay uy -உரà¯à®•à¯à®µà¯‡ uy -Уругвай uy -อุรุà¸à¸§à¸±à¸¢ uy -Уругвай uy -Уругвай uy -Ourougway uy -乌拉圭 uy -çƒæ‹‰åœ­ uy -Uzbekistan uz -أوزبكستان uz -ÖzbÉ™kistan uz -УзбÑкіÑтан uz -УзбекиÑтан uz -উজবেকিসà§à¦¤à¦¾à¦¨ uz -Ouzbekistan uz -Uzbekistán uz -Wsbecist?n uz -Usbekistan uz -Ουζμπεκιστάν uz -Uzbekujo uz -Uzbekistán uz -Usbekistan uz -ازبکستان uz -Ouzbékistan uz -Úisbéiceastáin uz -Uzbekistán uz -×וזבקיסטן uz -उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨ uz -Üzbegisztán uz -Úsbekistan uz -ウズベキスタン uz -អ៊ូហ្សបáŸáž‚ីស្ážáž„់ uz -우즈베키스탄 uz -ເດນ່ງນ uz -UzbekistÄna uz -УзбекиÑтан uz -УзбекÑтан uz -Użbekistan uz -Usbekistan uz -Usbekistan uz -Usbekistan uz -ਉਜ਼ੇਬਕਸਤਾਨ uz -Uzbequistão uz -Uzbequistão uz -УзбекиÑтан uz -Uzibekisitani uz -Usbekistan uz -УзбекиÑтан uz -உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯ uz -ӮзбекиÑтон uz -อุซเบà¸à¸´à¸ªà¸–าน uz -Özbekistan uz -Özbäkstan uz -УзбекиÑтан uz -ЎзбекиÑтон uz -Ouzbekistan uz -ä¹Œå…¹åˆ«å…‹æ–¯å¦ uz -çƒèŒ²åˆ¥å…‹ uz -Vatican City va -Vatikaan Stad va -مدينة Ø§Ù„ÙØ§ØªÙŠÙƒØ§Ù† va -Vatican ŞəhÉ™ri va -Ватыкан va -Ватикана va -ভà§à¦¯à¦¾à¦Ÿà¦¿à¦•ান সিটি va -Ker Vatikan va -Vatikan va -Ciutat del Vaticà va -Vatikán va -Dinas y Fatican va -Vatikanstaten va -Vatikanstadt va -Βατικανό va -Vatikano va -Vaticano va -Vatikan va -Batikano Hiria va -شهر واتیکان va -Vatikaani va -Vatican va -Vaticaanstad va -An Chathaoir Naofa va -Cidade do Vaticano va -הוותיקן va -वेटिकन सिटी va -Vatikan va -Vatikán va -Vatíkanið va -Città del Vaticano va -ãƒãƒã‚«ãƒ³å¸‚国 va -ក្រុង​វ៉ាទីកង់ va -바티칸 시티 va -ລັດເວີຠva -VatikÄns va -Ватикан va -Ватикан Ñити va -Vatikan va -Vatikanstaten va -Vatikaan va -Vaticaanstad va -Vatikanstaten va -ਵਾਟੀਕੇਨ ਸਿਟੀ va -Watykan va -Cidade do Vaticano va -Cidade do Vaticano va -Vatican, OraÅŸul va -Ватикан va -Umujyi wa Vatikani va -Vatikanstáhta va -Vatikán va -Vatikan va -Ватикан va -Vatikan va -Vatikanstaten va -வாடிகன௠நகரம௠va -Шаҳри Ватикан va -นครรัà¸à¸§à¸²à¸•ิà¸à¸±à¸™ va -Vatikan va -Vatikan va -Ватікан va -Ватикан Шаҳри va -Thành phố Vatican va -Vatican va -梵蒂冈 va -梵諦岡城 va -St. Vincent and the Grenadines vc -St. Vincent en die Grenadene vc -سانت Ùينسنت Ùˆ الغرينادين vc -St. Vincent vÉ™ Grenadines vc -СÑнт-ВінÑÑнт Ñ– ГрÑнадыны vc -Св. ВинÑет и Гренадините vc -সেনà§à¦Ÿ ভিনসেনà§à¦Ÿ ও গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¿à¦¨ vc -S. Visant hag ar Grenadinez vc -Sveti Vincent i Grenadini vc -St. Vincent i les Granadines vc -St. Vincent a Grenadiny vc -Ynysoedd St. Finsent a'r Grenadinau vc -St. Vincent og Grenadinerne vc -St. Vincent und Grenadinen vc -Άγιος Βικέντιος και ΓÏεναδίνες vc -Sent-Vincento kaj la Grenadinoj vc -San Vicente y las Granadinas vc -St. Vincent ja Grenadiinid vc -St. Vincent eta Grenadines vc -سن وینسن Ùˆ گرادینس vc -St. Vincent ja Grenadiinit vc -Sankta Vinsent og Grenadinoyggjar vc -St Vincent et les Grenadines vc -St. Vincent en de Grenadines vc -St. Vincent agus Grenadines vc -Santo Vicente e as Granadinas vc -סנט וינסנט ×•×”×’×¨× ×“×™× ×™× vc -सेंट विंसेंट तथा गà¥à¤°à¥‡à¤¨à¥‡à¤¡à¤¾à¤‡à¤¨à¥à¤¸ vc -St. Vincent és Grenadines vc -St. Vincent dan the Grenadines vc -Sankti Vinsent og Grenadíneyjar vc -Saint Vincent e Grenadines vc -セントヴィンセントグレナディン vc -សង់វាំងសង់ និង ​ហ្គ្រីណាឌីន vc -세ì¸íЏ 빈센트 그레나딘 vc -ເຊີນວິນà»àºŠàº™ à»àº¥àº°à»€àºàº™àº²àº”ີນ vc -Å v. Vincentas ir Grenadinai vc -Sentvinsenta un GrenadÄ«nes vc -Св. ВинÑент и Гренадите vc -St. ВинÑент ба Гренадин vc -St. Vincent dan Grenadines vc -St. VinÄ‹enz u l-Grenadini vc -St. Vincent og Grenadinene vc -St. Vincent un de Grenadinen vc -St. Vincent en de Grenadines vc -St. Vincent og Grenadinane vc -St. Vincent le Grenadines vc -St. Vincent e les Granadines vc -ਸੇਂਟ ਵੀਨਸੈਂਟ ਤੇ ਗਰੀਨਾਜੀਨਸ vc -St. Vincent i Grenadyny vc -São Vicente e Granadinas vc -São Vicente e Grenadines vc -Sf. Vincent ÅŸi Grenadines vc -Сент-ВинÑент и Гренадины vc -Mutagatifu Visenti na Gerenadine vc -St. Vincent ja the Grenadiinnat vc -St. Vincent a Grenadines vc -Sv. Vincent in Grenadini vc -Св. ВинÑент и Гренадини vc -Sv. Vinsent i Grenadini vc -I-St. Vincent and the Grenadines vc -St. Vincent och Grenadinerna vc -செயினà¯à®Ÿà¯ வினà¯à®šà¯†à®©à¯à®Ÿà¯ மறà¯à®±à¯à®®à¯ கà¯à®°à¯€à®©à®¾à®Ÿà¯ˆà®©à¯à®¸à¯ vc -Синт ВинÑент ва Гренадина vc -เà¸à¸²à¸°à¹€à¸‹à¸™à¸•์วินเซนต์ vc -St. Vincent ve Grenadines vc -Sain Vinsent wä Grenadinnär vc -Сент-ВінÑент Ñ– Гренадіни vc -Сент-ВинÑент ва Гренадина vc -St. Vincent na Grenadines vc -St. Vincent và Grenadines vc -St. Vincint et les Grenadines vc -St. Vincent ne Grenadines vc -åœ£æ–‡æ£®ç‰¹å’Œæ ¼æž—çº³ä¸æ–¯ vc -è–æ–‡æ£®åŠæ ¼ç´é‚£ä¸ vc -I-St. Vincent kanye ne-Grenadines vc -Venezuela ve -Ùنزويلا ve -Venesuella ve -Ð’ÑнÑÑуÑла ve -ВенеÑуела ve -ভেনেজà§à§Ÿà§‡à¦²à¦¾ ve -Venecuela ve -Veneçuela ve -Feneswela ve -Βενεζουέλα ve -Venezuelo ve -Venetsueela ve -ونزویلا ve -Venesuela ve -Vénézuela ve -Veiniséala ve -ונצו×לה ve -वेनेजà¥à¤à¤²à¤¾ ve -Venecuela ve -Venesúela ve -ベãƒã‚ºã‚§ãƒ© ve -ážœáŸážŽáŸáž áŸ’សុ៊យអáŸáž¡áž¶ ve -ë² ë„¤ìˆ˜ì—˜ë¼ ve -ເວເນຊຸເອລາ ve -Venesuela ve -VenecuÄ“la ve -Венецуела ve -ВинеÑÑуел ve -Veneżwela ve -ਵੈਂਨਜ਼ੂà¨à¨²à¨¾ ve -Wenezuela ve -ВенеÑуÑла ve -Venezuwela ve -Венецуела ve -Venecuela ve -I-Venezuela ve -வெனிசà¯à®²à®¾ ve -ВинизуÑлло ve -เวเนซุเอลา ve -ВенеÑуела ve -ВенеÑуÑла ve -Venezwela ve -委内瑞拉 ve -委內瑞拉 ve -Virgin Islands, British vg -Virgin Eilande, Brits vg -الجزر العذراء, بريطانيا vg -Virgin Adaları, Britanya vg -БрытанÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vg -БританÑки ВирджинÑки оÑтрови vg -ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ vg -DjeviÄanska ostrva, Britanska vg -Illes Verges, Angleses vg -Ynysoedd yr Wyryf, Prydeinig vg -Britiske jomfruøer vg -Virgin-Inseln, britisch vg -ΠαÏθένοι Îήσοι, Î’Ïετανικές vg -Virgininsuloj, Britaj vg -Islas Vírgenes Británicas vg -Briti Neitsisaared vg -Britaniar Irla Birjinak vg -جزایر ویرجین انگلیسی vg -Brittien Neitsytsaaret vg -ÃŽles Vierges britanniques vg -Virgin Eilannen, Britse vg -Oileáin Bhriotanacha na Maighdean vg -Illas Virxes, Británicas vg -××™×™ הבתולה, בריטי vg -वरà¥à¤œà¤¿à¤¨ आइलैंड, बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ vg -DjeviÄansko otoÄje, Britanski vg -Virgin-szigetek (brit) vg -Bresku Jómfrúareyjar vg -Isole Vergini Britanniche vg -英領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vg -កោះ​ស្មោង អង់គ្លáŸážŸ vg -ì˜êµ­ë ¹ 버진 ì œë„ vg -Britu Virdžinu salas vg -ДевÑтвени ОÑтрови, БританÑки vg -Виржин арлууд, британи vg -Kepulauan Virgin, British vg -Jomfruøyene (Storbritannia) vg -Britsche Jumferninseln vg -Virgin Eilanden, Britse vg -Jomfruøyane (Storbritannia) vg -ਵੀਰਗੀਨ ਟਾਪੂ, ਬਰਤਾਨੀਆ vg -Wyspy Dziewicze (Brytyjskie) vg -Ilhas Virgens, Inglaterra vg -Ilhas Virgens, Inglaterra vg -Insulele Virgine, Anglia vg -ВиргинÑкие БританÑкие оÑтрова vg -Ibirwa by'Isugi, Nyongereza vg -Panenské Ostrovy, Britské vg -DeviÅ¡ki otoki, Britanski vg -ДевичанÑка оÑтрва, БританÑка vg -DeviÄanska ostrva, Britanska vg -Brittiska Jungfruöarna vg -விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, பிரிடà¯à®Ÿà®¿à®·à¯ vg -Ҷазираи ВирҷиниÑ, Бритониё vg -หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, อังà¸à¸¤à¸© vg -Virgin Adaları (İngiltere) vg -Virgin Utrawları, Britan vg -ВіргінÑькі оÑтрови (БританіÑ) vg -ÐÐ½Ð³Ð»Ð¸Ñ Ð’Ð¸Ñ€Ð¶Ð¸Ð½ Ороллари vg -Quần đảo Trinh nữ, Vưong quốc Anh vg -Iyes Viedjes, britanikes vg -英属维京群岛 vg -英屬維爾京群島 vg -Virgin Islands, U.S. vi -Virgin Eilande, VSA vi -الجزر العذراء, الولايات المتحدة vi -Virgin Adaları, ABÅž vi -ÐмÑрыканÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vi -ÐмериканÑки ВирджинÑки оÑтрови vi -ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° vi -DjeviÄanska ostrva, AmeriÄka vi -Illes Verges, Americanes vi -Panenské ostrovy, U.S. vi -Ynysoedd yr Wyryf, Americanaidd vi -Jomfruøerne vi -Virgin-Inseln, amerikanisch vi -ΠαÏθένοι Îήσοι, Η.Π.A. vi -Virgininsuloj, Usonaj vi -Islas Vírgenes Americanas vi -USA Neitsisaared vi -Estatu Batuar Irla Birjinak vi -جزایر ویرجین امریکا. vi -USA:n Neitsytsaaret vi -ÃŽles Vierges américaines vi -Virgin Eilannen, U.S. vi -Oileáin na Maighdean S.A.M. vi -Illas Virxes, U.S. vi -××™×™ הבתולה, ×רצות־הברית vi -वरà¥à¤œà¤¿à¤¨ आइलैंड, यू.à¤à¤¸. vi -DjeviÄansko otoÄje, SAD vi -Virgin-szigetek (USA) vi -Bandarísku Jómfrúareyjar vi -Isole Vergini Americane vi -米領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vi -កោះ​ស្មោង អាមáŸážšáž·áž€ vi -미국령 버진 ì œë„ vi -Virdžinu salas, ASV. vi -ДевÑтвени ОÑтрови, СÐД vi -Виржин арлууд, ÐÐУ vi -Kepulauan Virgin, U.S. vi -Jomfruøyene (USA) vi -Jumferninseln, U.S. vi -Virgin Eilanden, U.S. vi -Jomfruøyane (USA) vi -ਵੀਰਗੀਨ ਟਾਪੂ, ਅਮਰੀਕਾ vi -Wyspy Dziewicze (USA) vi -Ilhas Virgens, E.U.A. vi -Ilhas Virgens, EUA vi -Insulele Virgine, S.U.A. vi -ВиргинÑкие оÑтрова (СШÐ) vi -Ibirwa by'Isugi, U.S. vi -Panenské Ostrovy, Americké vi -DeviÅ¡ki otoki, ZDA vi -ДевичанÑка оÑтрва, СÐД vi -DeviÄanska ostrva, SAD vi -Amerikanska Jungfruöarna vi -விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, U.S. vi -Ҷазираи ВирҷиниÑ, Ш.М.Ð vi -หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² vi -Virgin Adaları (ABD) vi -Virgin Utrawları, AQÅž vi -ВіргінÑькі оÑтрови (СШÐ) vi -ÐҚШ Виржин Ороллари vi -Quần đảo Trinh nữ, Hoa Kỳ vi -Iyes Viedjes, etazunyinnes vi -美属维京群岛 vi -美屬維爾京群島 vi -Vietnam vn -Viëtnam vn -Ùييتنام vn -Vyetnam vn -Віетнам vn -Виетнам vn -ভিয়েতনাম vn -Vijetnam vn -Panenské ostrovy, U.K. vn -Fiet-nam vn -Βιετνάμ vn -Vjetnamio vn -ویتنام vn -Viëtnam vn -Vítneam vn -וייטנ×× vn -विà¤à¤¤à¤¨à¤¾à¤® vn -Vijetnam vn -Víetnam vn -ベトナム vn -វៀážážŽáž¶áž˜ vn -베트남 vn -ຫວງດນາມ vn -Vietnamas vn -Vjetnama vn -Виетнам vn -Витнам vn -Vjetnam vn -Viëtnam vn -ਵੀਅਤਨਾਮ vn -Wietnam vn -Vietname vn -Vietnã vn -Вьетнам vn -Viyetinamu vn -Вијетнам vn -Vijetnam vn -I-Vietnam vn -வியடà¯à®¨à®¾à®®à¯ vn -Ветнам vn -เวียตนาม vn -Ð’'єтнам vn -Ветнам vn -Việt Nam vn -è¶Šå— vn -è¶Šå— vn -Vanuatu vu -ÙØ§Ù†ÙˆØ§ØªÙˆ vu -Вануату vu -Вануату vu -ভানà§à§Ÿà¦¾à¦Ÿà§ vu -Fanwatw vu -Βανουάτου vu -Vanuatuo vu -وانواتو vu -Vanuatú vu -ונו×טו vu -वनौतू vu -Vanúatú vu -ãƒãƒŒã‚¢ãƒ„ vu -វ៉ានុយអាទុយ vu -바누아투 vu -ຈີນ vu -Вануату vu -Вануату vu -ਵਾਨà©à¨†à¨Ÿà©‚ vu -Vanatu vu -Вануату vu -Vanuwatu vu -Вануату vu -வனட௠vu -Вануату vu -à¹à¸§à¸™à¸±à¸§à¸•ู vu -Вануату vu -Вануату vu -瓦努阿图 vu -è¬é‚£æœ vu -Wallis and Futuna wf -Wallis en Futuna wf -واليس Ùˆ Ùوتونا wf -Vallis vÉ™ Futuna wf -ÐŽÐ¾Ð»Ñ–Ñ Ñ– Футуна wf -ОÑтрови Ð£Ð¾Ð»Ð¸Ñ Ð¸ Футина wf -ওয়ালিস à¦à¦¬à¦‚ ফà§à¦Ÿà§à¦¨à¦¾ wf -Wallis ha Futuna wf -Valis i Futuna wf -Wallis i Futuna wf -Wallis a Futuna wf -Ynysoedd Walis a Ffwtwna wf -Wallis- og Futuna-øerne wf -Wallis und Futuna wf -Βαλίς και ΦουτοÏνα wf -Valiso kaj Futuno wf -Wallis y Futuna wf -Wallis ja Futuna wf -Wallis eta Futuna wf -والیس Ùˆ Ùوتونا wf -Wallis ja Futuna wf -Wallis et Futuna wf -Wallis en Futuna wf -Bhailís agus Futúna wf -Wallis e Futuna wf -ו×ליס ופוטונה wf -वालिस तथा फà¥à¤¤à¥à¤¨à¤¾ wf -Wallis i Futuna wf -Wallis és Futuna wf -Wallis- og Fútúnaeyjar wf -Wallis e Futuna wf -ä»é ˜ãƒ¯ãƒªã‚¹ãƒ•ツナ諸島 wf -월리스 후투나 ì œë„ wf -ປັàºàº­àº´àº™àºžàº²àºš wf -Volisa salas un Futuna wf -Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf -ВилÑÐ¼Ñ Ð±Ð° футуна wf -Wallis dan Futuna wf -Wallis u Futuna wf -Wallis og Futuna wf -Wallis un Futuna wf -Wallis en Futuna wf -Wallis og Futuna wf -ਵਾਲਿਸ਼ ਤੇ ਫੂਟੂਨਾ wf -Wallis i Futuna wf -Wallis e Futuna wf -Wallis e Futuna wf -Wallis ÅŸi Futuna wf -ОÑтрова Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¸ Футуна wf -Walisi na Futuna wf -Wallis ja Futuna wf -Wallis a Futuna wf -Wallis in Futuna wf -Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf -Valis i Futuna wf -Wallis och Futuna wf -வாலிஸ௠மறà¯à®±à¯à®®à¯ பà¯à®¯à¯à®Ÿà®©à®¾ wf -УÑÐ»Ñ Ð²Ð° Футуна wf -วอลลิสà¹à¸¥à¸°à¸Ÿà¸¹à¸—ูนา wf -Wallis ve Futuna wf -Wallis wä Futuna wf -Ð£Ð¾Ð»Ð»Ð¸Ñ Ñ– Футуна wf -Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ð° Футуна Ороллари wf -Wallis và Futuna wf -Wallis et Futuna wf -瓦利斯和富图纳群岛 wf -瓦利斯群島和富圖ç´ç¾¤å³¶ wf -Samoa ws -ساموا ws -Самоа ws -Самоа ws -সামোয়া ws -Inizi Samoe ws -Σαμόα ws -Samoo ws -ساموآ ws -Samó ws -סמו××” ws -सामोआ ws -Szamoa ws -Samóa ws -サモア ws -សាមូអា ws -사모아 ì œë„ ws -ໂຊນາ ws -Самоа ws -Самолоа ws -ਸਾਮੋਆ ws -Самоа ws -Samowa ws -Самоа ws -சாமோயா ws -Самоа ws -ซามัว ws -Самоа ws -Самоа ws -Samowa ws -è¨æ‘©äºšç¾¤å²› ws -薩摩亞 ws -Yemen ye -اليمن ye -YÉ™mÉ™n ye -Емен ye -Йемен ye -ইয়েমেন ye -Ihlemeñ ye -Jemen ye -Iemen ye -Jemen ye -Yr Iemen ye -Jemen ye -Υεμένη ye -Jemeno ye -Jeemen ye -یمن ye -Jemen ye -Jemen ye -Jemen ye -Éimin ye -Iemen ye -תימן ye -यमन ye -Jemen ye -Jemen ye -Jemen ye -イエメン ye -áž™áŸáž˜áŸ‚áž“ ye -예멘 ye -ເດມອນ ye -Jemenas ye -Jemena ye -Јемен ye -Емен ye -Yaman ye -Jemen ye -Jemen ye -Jemen ye -Jemen ye -Jemen ye -ਯਮਨ ye -Jemen ye -Iémen ye -Йемен ye -Yemeni ye -Jemen ye -Jemen ye -Jemen ye -Јемен ye -Jemen ye -I-Yemen ye -Jemen ye -யேமன௠ye -Яман ye -เยเมน ye -Ємен ye -Яман ye -也门 ye -葉門 ye -Serbia and Montenegro yu -Serbië en Montenegro yu -Ð¡ÑŠÑ€Ð±Ð¸Ñ Ð¸ Черна гора yu -সারà§à¦¬à¦¿à§Ÿà¦¾ à¦à¦¬à¦‚ মনà§à¦Ÿà§‡à¦¨à¦¿à¦—à§à¦°à§‹ yu -Serbi ha Montenegro yu -Sèrbia i Montenegro yu -Srbsko a ÄŒerná hora yu -Serbien og Montenegro yu -Serbien und Montenegro yu -ΣεÏβία - ΜαυÏοβοÏνιο yu -Serbia y Montenegro yu -Serbia ja TÅ¡ernogooria yu -Serbia eta Montenegro yu -Serbia ja Montenegro yu -Serbie and Monténégro yu -Servië en Montenegro yu -Sérbia e Montenegro yu -Szerbia és Montenegró yu -Serbía og Svartfjallaland yu -Serbia e Montenegro yu -セルビアモンテãƒã‚°ãƒ­ yu -សែប៊ី និង ម៉ុងážáŸážŽáŸáž áŸ’ក្រូ yu -Serbija ir Juodkalnija yu -Србија и Црна Гора yu -Serbia og Montenegro yu -Serbien un Montenegro yu -Servië en Montenegro yu -Serbia og Montenegro yu -ਸਰਬੀਆ ਅਤੇ ਮਾਂਤਾਂਗਰੋ yu -Serbia i Czarnogóra yu -Sérvia e Montenegro yu -Sérvia e Montenegro yu -Ð¡ÐµÑ€Ð±Ð¸Ñ Ð¸ Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾Ñ€Ð¸Ñ yu -Seribiya na Montenegoro yu -Serbia ja Montenegro yu -Srbija in ÄŒrna gora yu -Србија и Црна Гора yu -Srbija i Crna Gora yu -Serbien och Montenegro yu -เซอร์เบีย à¹à¸¥à¸°à¸¡à¸­à¸™à¸•ิเนโà¸à¸£ yu -Sırbistan KaradaÄŸ yu -Serbia wä Montenegro yu -Ð¡ÐµÑ€Ð±Ñ–Ñ Ñ– Ð§Ð¾Ñ€Ð½Ð¾Ð³Ð¾Ñ€Ñ–Ñ yu -Ð¡ÐµÑ€Ð±Ð¸Ñ Ð²Ð° Монтенегро yu -塞尔维亚和黑山 yu -塞爾維亞和黑山 yu -South Africa za -Suid-Afrika za -جنوب Ø£ÙØ±ÙŠÙ‚يا za -CÉ™nubi Afrika za -ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ðфрыка za -Южна Ðфрика za -দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া za -Suafrika za -Južna Afrika za -Sudàfrica za -Jižní Afrika za -De Affrica za -Sydafrikanske republik za -Südafrika za -Îότια ΑφÏική za -Sudafriko za -Sudáfrica za -Lõuna-Aafrika za -Hego Afrika za -Ø¢ÙØ±ÛŒÙ‚ای جنوبی za -Etelä-Afrikka za -Suðurafrika za -Afrique du sud za -Sûd-Afrika za -An Afraic Theas za -Ãfrica do Sur za -×“×¨×•× ×פריקה za -दकà¥à¤·à¤¿à¤£à¥€ अफà¥à¤°à¥€à¤•ा za -Južna Afrika za -Dél-Afrika za -Afrika Selatan za -Suður-Afríka za -Sud Africa za -å—アフリカ za -អាហ្វ្រិក​ážáž¶áž„​ážáŸ’បូង za -남 아프리카 공화국 za -à»àº­àºšàºžàº´àºàº²à»ƒàº•້ za -Afrika, Pietų za -DienvidÄfrika za -Јужна Ðфрика za -Өмнөд африк za -Afrika Selatan za -Afrika t'Isfel za -Sør-Afrika za -Söödafrika za -Zuid-Afrika za -Sør-Afrika za -Afrika Borwa za -Sudafrica za -ਦੱਖਣੀ ਅਫਰੀਕਾ za -Afryka PoÅ‚udniowa za -Ãfrica do Sul za -Ãfrica do Sul za -Africa de Sud za -Ð®Ð¶Ð½Ð°Ñ Ðфрика za -Afurika Yepfo za -Lulli-Afrihká za -Južná Afrika za -Južna Afrika za -Јужна Ðфрика za -Južna Afrika za -I-South Africa za -Sydafrika za -தென௠ஆபà¯à®°à®¿à®•à¯à®•ா za -Ðфриқои Ҷанубӣ za -à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้ za -Güney Afrika za -Könyaq Afrika za -Південна Ðфрика za -Жанубий Ðфрика za -Afurika tshipembe za -Nam Phi za -Nonne Afrike za -Mzantsi Afrika za -å—éž za -å—éž za -Emzantsi Afrika za -Zambia zm -Zambië zm -زامبيا zm -Zambiya zm -Ð—Ð°Ð¼Ð±Ñ–Ñ zm -Ð—Ð°Ð¼Ð±Ð¸Ñ zm -জামবিয়া zm -Zambi zm -Zàmbia zm -Zambie zm -Sambia zm -Sambia zm -Ζάμπια zm -Zambio zm -Sambia zm -زامبیا zm -Sambia zm -Zambie zm -An tSaimbia zm -Zámbia zm -זמביה zm -ज़ामà¥à¤¬à¤¿à¤¯à¤¾ zm -Zambija zm -Sambía zm -ザンビア zm -ហ្សាំប៊ី zm -잠비아 zm -ຈາໄມàºàº²à»‰ zm -Zambija zm -Замбија zm -Замби zm -Å»ambia zm -Sambia zm -ਜੈਂਬੀਆ zm -Zâmbia zm -Zâmbia zm -Ð—Ð°Ð¼Ð±Ð¸Ñ zm -Zambiya zm -Zambija zm -Замбија zm -Zambija zm -ஜாமà¯à®ªà®¿à®¯à®¾ zm -Зомбиё zm -à¹à¸‹à¸¡à¹€à¸šà¸µà¸¢ zm -Ð—Ð°Ð¼Ð±Ñ–Ñ zm -Ð—Ð°Ð¼Ð±Ð¸Ñ zm -Zambeye zm -赞比亚 zm -尚比亞 zm -Zimbabwe zw -زيمبابوي zw -Zimbabve zw -Ð—Ñ‹Ð¼Ð±Ð°Ð±Ð²Ñ zw -Зимбабве zw -জিমà§à¦¬à¦¾à¦¬à§‹à§Ÿà§‡ zw -Zimbabve zw -Simbabwe zw -Simbabwe zw -Ζιμπάμπουε zw -Zimbabvo zw -زیمبابوه zw -An tSiombáib zw -Zimbabué zw -זימבבווה zw -जिमà¥à¤¬à¤¾à¤¬à¤µà¥‡ zw -Zimbabve zw -Simbabve zw -ジンãƒãƒ–エ zw -ហ្ស៊ីមបាបវ៉០zw -ì§ë°”브웨 zw -ລິຊາ zw -Zimbabve zw -Зимбабве zw -Замбабив zw -Å»imbabwe zw -Simbabwe zw -ਜਿੰਬਾਬਵੇਂ zw -Zimbabue zw -Зимбабве zw -Zimbabve zw -Зимбабве zw -Zimbabve zw -ஜிமà¯à®ªà®¾à®ªà¯‡ zw -Зимбобве zw -ซิมบับเว zw -Зімбабве zw -Зимбабве zw -Zimbabwè zw -津巴布韦 zw -è¾›å·´å¨ zw -Czech Republic cz diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp deleted file mode 100644 index bb89b6d00..000000000 --- a/kabc/distributionlist.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include -#include -#include - -#include "distributionlist.h" - -using namespace KABC; - -DistributionList::DistributionList( DistributionListManager *manager, - const TQString &name ) : - mManager( manager ), mName( name ) -{ - mManager->insert( this ); -} - -DistributionList::~DistributionList() -{ - mManager->remove( this ); -} - -void DistributionList::setName( const TQString &name ) -{ - mName = name; -} - -TQString DistributionList::name() const -{ - return mName; -} - -void DistributionList::insertEntry( const Addressee &a, const TQString &email ) -{ - Entry e( a, email ); - - TQValueList::Iterator it; - for( it = mEntries.begin(); it != mEntries.end(); ++it ) { - if ( (*it).addressee.uid() == a.uid() ) { - /** - We have to check if both email addresses contains no data, - a simple 'email1 == email2' wont work here - */ - if ( ( (*it).email.isNull() && email.isEmpty() ) || - ( (*it).email.isEmpty() && email.isNull() ) || - ( (*it).email == email ) ) { - *it = e; - return; - } - } - } - mEntries.append( e ); -} - -void DistributionList::removeEntry( const Addressee &a, const TQString &email ) -{ - TQValueList::Iterator it; - for( it = mEntries.begin(); it != mEntries.end(); ++it ) { - if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { - mEntries.remove( it ); - return; - } - } -} - -TQStringList DistributionList::emails() const -{ - TQStringList emails; - - Entry::List::ConstIterator it; - for( it = mEntries.begin(); it != mEntries.end(); ++it ) { - Addressee a = (*it).addressee; - TQString email = (*it).email.isEmpty() ? a.fullEmail() : - a.fullEmail( (*it).email ); - - if ( !email.isEmpty() ) { - emails.append( email ); - } - } - - return emails; -} - -DistributionList::Entry::List DistributionList::entries() const -{ - return mEntries; -} - -typedef TQValueList< QPair > MissingEntryList; - -class DistributionListManager::DistributionListManagerPrivate -{ - public: - AddressBook *mAddressBook; - TQMap< TQString, MissingEntryList > mMissingEntries; -}; - -DistributionListManager::DistributionListManager( AddressBook *ab ) - : d( new DistributionListManagerPrivate ) -{ - d->mAddressBook = ab; - mLists.setAutoDelete( true ); -} - -DistributionListManager::~DistributionListManager() -{ - mLists.clear(); - - delete d; - d = 0; -} - -DistributionList *DistributionListManager::list( const TQString &name ) -{ - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - if ( list->name() == name ) return list; - } - - return 0; -} - -void DistributionListManager::insert( DistributionList *l ) -{ - if ( !l ) - return; - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - if ( list->name() == l->name() ) { - mLists.remove( list ); - break; - } - } - mLists.append( l ); -} - -void DistributionListManager::remove( DistributionList *l ) -{ - if ( !l ) - return; - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - if ( list->name() == l->name() ) { - mLists.remove( list ); - return; - } - } -} - -TQStringList DistributionListManager::listNames() -{ - TQStringList names; - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - names.append( list->name() ); - } - - return names; -} - -bool DistributionListManager::load() -{ - KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); - - TQMap entryMap = cfg.entryMap( "DistributionLists" ); - cfg.setGroup( "DistributionLists" ); - - // clear old lists - mLists.clear(); - d->mMissingEntries.clear(); - - TQMap::ConstIterator it; - for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it ) { - TQString name = it.key(); - TQStringList value = cfg.readListEntry( name ); - - kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; - - DistributionList *list = new DistributionList( this, name ); - - MissingEntryList missingEntries; - TQStringList::ConstIterator entryIt = value.constBegin(); - while( entryIt != value.constEnd() ) { - TQString id = *entryIt++; - TQString email = *entryIt; - - kdDebug(5700) << "----- Entry " << id << endl; - - Addressee a = d->mAddressBook->findByUid( id ); - if ( !a.isEmpty() ) { - list->insertEntry( a, email ); - } else { - missingEntries.append( qMakePair( id, email ) ); - } - - if ( entryIt == value.end() ) - break; - ++entryIt; - } - - d->mMissingEntries.insert( name, missingEntries ); - } - - return true; -} - -bool DistributionListManager::save() -{ - kdDebug(5700) << "DistListManager::save()" << endl; - - KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); - - cfg.deleteGroup( "DistributionLists" ); - cfg.setGroup( "DistributionLists" ); - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - kdDebug(5700) << " Saving '" << list->name() << "'" << endl; - - TQStringList value; - const DistributionList::Entry::List entries = list->entries(); - DistributionList::Entry::List::ConstIterator it; - for( it = entries.begin(); it != entries.end(); ++it ) { - value.append( (*it).addressee.uid() ); - value.append( (*it).email ); - } - - if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) { - const MissingEntryList missList = d->mMissingEntries[ list->name() ]; - MissingEntryList::ConstIterator missIt; - for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) { - value.append( (*missIt).first ); - value.append( (*missIt).second ); - } - } - - cfg.writeEntry( list->name(), value ); - } - - cfg.sync(); - - return true; -} - -DistributionListWatcher* DistributionListWatcher::mSelf = 0; - -DistributionListWatcher::DistributionListWatcher() - : TQObject( tqApp, "DistributionListWatcher" ) -{ - mDirWatch = new KDirWatch; - mDirWatch->addFile( locateLocal( "data", "kabc/distlists" ) ); - - connect( mDirWatch, TQT_SIGNAL( dirty( const TQString& ) ), TQT_SIGNAL( changed() ) ); - mDirWatch->startScan(); -} - -DistributionListWatcher::~DistributionListWatcher() -{ - delete mDirWatch; - mDirWatch = 0; -} - -DistributionListWatcher *DistributionListWatcher::self() -{ - kdWarning( !tqApp ) << "No TQApplication object available, you'll get a memleak!" << endl; - - if ( !mSelf ) - mSelf = new DistributionListWatcher(); - - return mSelf; -} - -#include "distributionlist.moc" diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h deleted file mode 100644 index 78d182467..000000000 --- a/kabc/distributionlist.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_DISTRIBUTIONLIST_H -#define KABC_DISTRIBUTIONLIST_H - -#include - -#include "addressbook.h" - -namespace KABC { - -class DistributionListManager; - -/** - @short Distribution list of email addresses - - This class represents a list of email addresses. Each email address is - associated with an address book entry. If the address book entry changes, the - entry in the distribution list is automatically updated. -*/ -class KABC_EXPORT DistributionList -{ - public: - /** - @short Distribution List Entry - - This class represents an entry of a distribution list. It consists of an - addressee and an email address. If the email address is null, the - preferred email address of the addressee is used. - */ - struct Entry - { - typedef TQValueList List; - - Entry() {} - Entry( const Addressee &_addressee, const TQString &_email ) : - addressee( _addressee ), email( _email ) {} - - Addressee addressee; - TQString email; - }; - - /** - Create distribution list object. - - @param manager Managing object of this list. - @param name Name of this list. - */ - DistributionList( DistributionListManager *manager, const TQString &name ); - - /** - Destructor. - */ - ~DistributionList(); - - /** - Set name of this list. The name is used as key by the - DistributinListManager. - */ - void setName( const TQString & ); - - /** - Get name of this list. - */ - TQString name() const; - - /** - Insert an entry into this distribution list. If the entry already exists - nothing happens. - */ - void insertEntry( const Addressee &, const TQString &email=TQString::null ); - - /** - Remove an entry from this distribution list. If the entry doesn't exist - nothing happens. - */ - void removeEntry( const Addressee &, const TQString &email=TQString::null ); - - /** - Return list of email addresses, which belong to this distributon list. - These addresses can be directly used by e.g. a mail client. - */ - TQStringList emails() const; - - /** - Return list of entries belonging to this distribution list. This function - is mainly useful for a distribution list editor. - */ - Entry::List entries() const; - - private: - DistributionListManager *mManager; - TQString mName; - - Entry::List mEntries; -}; - -/** - @short Manager of distribution lists - - This class represents a collection of distribution lists, which are associated - with a given address book. -*/ -class KABC_EXPORT DistributionListManager -{ - public: - /** - Create manager for given address book. - */ - DistributionListManager( AddressBook * ); - - /** - Destructor. - */ - ~DistributionListManager(); - - /** - Return distribution list with given name. - */ - DistributionList *list( const TQString &name ); // KDE4: add bool caseSensitive = true - - /** - Insert distribution list. If a list with this name already exists, nothing - happens. The passed object is deleted by the manager. - */ - void insert( DistributionList * ); - - /** - Remove distribution list. If a list with this name doesn't exist, nothing - happens. - */ - void remove( DistributionList * ); - - /** - Return names of all distribution lists managed by this manager. - */ - TQStringList listNames(); - - /** - Load distribution lists form disk. - */ - bool load(); - - /** - Save distribution lists to disk. - */ - bool save(); - - private: - class DistributionListManagerPrivate; - DistributionListManagerPrivate *d; - - TQPtrList mLists; -}; - -/** - @short Watchdog for distribution lists - - This class provides a changed() signal that i emitted when the - distribution lists has changed in some way. - - Exapmle: - - \code - KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() - - connect( watchdog, TQT_SIGNAL( changed() ), TQT_SLOT( doSomething() ) ); - \endcode -*/ - -class KABC_EXPORT DistributionListWatcher : public TQObject -{ - Q_OBJECT - - public: - /** - * Returns the watcher object. - */ - static DistributionListWatcher *self(); - - signals: - /** - * This signal is emmitted whenever the distribution lists has - * changed (if a list was added or removed, when a list was - * renamed or the entries of the list changed). - */ - void changed(); - - protected: - DistributionListWatcher(); - ~DistributionListWatcher(); - - private: - static DistributionListWatcher* mSelf; - KDirWatch *mDirWatch; -}; - -} -#endif diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp deleted file mode 100644 index b00b14d42..000000000 --- a/kabc/distributionlistdialog.cpp +++ /dev/null @@ -1,399 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "addressbook.h" -#include "addresseedialog.h" -#include "distributionlist.h" - -#include "distributionlistdialog.h" -#include "distributionlistdialog.moc" - -using namespace KABC; - -DistributionListDialog::DistributionListDialog( AddressBook *addressBook, TQWidget *parent) - : KDialogBase( parent, "", true, i18n("Configure Distribution Lists"), Ok, Ok, true) -{ - mEditor = new DistributionListEditorWidget( addressBook, this ); - setMainWidget( mEditor ); - - connect( this, TQT_SIGNAL( okClicked() ), mEditor, TQT_SLOT( save() ) ); -} - -DistributionListDialog::~DistributionListDialog() -{ -} - -// TODO KDE4: Add d-pointer to EmailSelector, make sEmailMap a member variable -static TQMap *sEmailMap = 0; - -EmailSelector::EmailSelector( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) : - KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, - parent ) -{ - if (!sEmailMap) - sEmailMap = new TQMap(); - TQFrame *topFrame = plainPage(); - TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - - mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), - topFrame ); - topLayout->addWidget( mButtonGroup ); - - TQStringList::ConstIterator it; - for( it = emails.begin(); it != emails.end(); ++it ) { - TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); - sEmailMap->insert( button, *it ); - if ( (*it) == current ) { - mButtonGroup->setButton(mButtonGroup->id(button)); - } - } -} - -TQString EmailSelector::selected() -{ - TQButton *button = mButtonGroup->selected(); - if ( button ) return (*sEmailMap)[button]; - return TQString::null; -} - -TQString EmailSelector::getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) -{ - EmailSelector *dlg = new EmailSelector( emails, current, parent ); - dlg->exec(); - - TQString result = dlg->selected(); - - delete dlg; - - return result; -} - -class EntryItem : public TQListViewItem -{ - public: - EntryItem( TQListView *parent, const Addressee &addressee, - const TQString &email=TQString::null ) : - TQListViewItem( parent ), - mAddressee( addressee ), - mEmail( email ) - { - setText( 0, addressee.realName() ); - if( email.isEmpty() ) { - setText( 1, addressee.preferredEmail() ); - setText( 2, i18n("Yes") ); - } else { - setText( 1, email ); - setText( 2, i18n("No") ); - } - } - - Addressee addressee() const - { - return mAddressee; - } - - TQString email() const - { - return mEmail; - } - - private: - Addressee mAddressee; - TQString mEmail; -}; - -DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, TQWidget *parent) : - TQWidget( parent ), - mAddressBook( addressBook ) -{ - kdDebug(5700) << "DistributionListEditor()" << endl; - - TQBoxLayout *topLayout = new TQVBoxLayout( this ); - topLayout->setSpacing( KDialog::spacingHint() ); - - TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; - - mNameCombo = new TQComboBox( this ); - nameLayout->addWidget( mNameCombo ); - connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); - - mNewButton = new TQPushButton( i18n("New List..."), this ); - nameLayout->addWidget( mNewButton ); - connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); - - mEditButton = new TQPushButton( i18n("Rename List..."), this ); - nameLayout->addWidget( mEditButton ); - connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) ); - - mRemoveButton = new TQPushButton( i18n("Remove List"), this ); - nameLayout->addWidget( mRemoveButton ); - connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); - - TQGridLayout *gridLayout = new TQGridLayout( topLayout, 3, 3 ); - gridLayout->setColStretch(1, 1); - - TQLabel *listLabel = new TQLabel( i18n("Available addresses:"), this ); - gridLayout->addWidget( listLabel, 0, 0 ); - - mListLabel = new TQLabel( this ); - gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); - - mAddresseeView = new TQListView( this ); - mAddresseeView->addColumn( i18n("Name") ); - mAddresseeView->addColumn( i18n("Preferred Email") ); - mAddresseeView->setAllColumnsShowFocus( true ); - gridLayout->addWidget( mAddresseeView, 1, 0 ); - connect( mAddresseeView, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionAddresseeViewChanged() ) ); - connect( mAddresseeView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - TQT_SLOT( addEntry() ) ); - - mAddEntryButton = new TQPushButton( i18n("Add Entry"), this ); - mAddEntryButton->setEnabled(false); - gridLayout->addWidget( mAddEntryButton, 2, 0 ); - connect( mAddEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); - - mEntryView = new TQListView( this ); - mEntryView->addColumn( i18n("Name") ); - mEntryView->addColumn( i18n("Email") ); - mEntryView->addColumn( i18n("Use Preferred") ); - mEntryView->setEnabled(false); - mEntryView->setAllColumnsShowFocus( true ); - gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 ); - connect( mEntryView, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionEntryViewChanged() ) ); - - mChangeEmailButton = new TQPushButton( i18n("Change Email..."), this ); - gridLayout->addWidget( mChangeEmailButton, 2, 1 ); - connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); - - mRemoveEntryButton = new TQPushButton( i18n("Remove Entry"), this ); - gridLayout->addWidget( mRemoveEntryButton, 2, 2 ); - connect( mRemoveEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); - - mManager = new DistributionListManager( mAddressBook ); - mManager->load(); - - updateAddresseeView(); - updateNameCombo(); -} - -DistributionListEditorWidget::~DistributionListEditorWidget() -{ - kdDebug(5700) << "~DistributionListEditor()" << endl; - - delete mManager; -} - -void DistributionListEditorWidget::save() -{ - mManager->save(); -} - -void DistributionListEditorWidget::slotSelectionEntryViewChanged() -{ - EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); - bool state=entryItem; - - mChangeEmailButton->setEnabled(state); - mRemoveEntryButton->setEnabled(state); -} - -void DistributionListEditorWidget::newList() -{ - bool ok; - TQString name = KInputDialog::getText( i18n( "New Distribution List" ), - i18n( "Please enter &name:" ), TQString::null, &ok ); - if (!ok) return; - - new DistributionList( mManager, name ); - - mNameCombo->clear(); - mNameCombo->insertStringList( mManager->listNames() ); - mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); - - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::editList() -{ - TQString oldName = mNameCombo->currentText(); - bool ok; - TQString name = KInputDialog::getText( i18n( "Distribution List" ), - i18n( "Please change &name:" ), oldName, &ok ); - if (!ok) return; - - DistributionList *list = mManager->list( oldName ); - list->setName( name ); - - mNameCombo->clear(); - mNameCombo->insertStringList( mManager->listNames() ); - mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); - - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::removeList() -{ - int result = KMessageBox::warningContinueCancel( this, - i18n("Delete distribution list '%1'?") .arg( mNameCombo->currentText() ), - TQString::null, KStdGuiItem::del() ); - - if ( result != KMessageBox::Continue ) return; - - mManager->remove( mManager->list( mNameCombo->currentText() ) ); - mNameCombo->removeItem( mNameCombo->currentItem() ); - - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::addEntry() -{ - AddresseeItem *addresseeItem = - static_cast( mAddresseeView->selectedItem() ); - - if( !addresseeItem ) { - kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; - return; - } - - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) { - kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; - return; - } - - list->insertEntry( addresseeItem->addressee() ); - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::removeEntry() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EntryItem *entryItem = - static_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - list->removeEntry( entryItem->addressee(), entryItem->email() ); - delete entryItem; -} - -void DistributionListEditorWidget::changeEmail() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EntryItem *entryItem = - static_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - TQString email = EmailSelector::getEmail( entryItem->addressee().emails(), - entryItem->email(), this ); - list->removeEntry( entryItem->addressee(), entryItem->email() ); - list->insertEntry( entryItem->addressee(), email ); - - updateEntryView(); -} - -void DistributionListEditorWidget::updateEntryView() -{ - if ( mNameCombo->currentText().isEmpty() ) { - mListLabel->setText( i18n("Selected addressees:") ); - } else { - mListLabel->setText( i18n("Selected addresses in '%1':") - .arg( mNameCombo->currentText() ) ); - } - - mEntryView->clear(); - - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) { - mEditButton->setEnabled(false); - mRemoveButton->setEnabled(false); - mChangeEmailButton->setEnabled(false); - mRemoveEntryButton->setEnabled(false); - mAddresseeView->setEnabled(false); - mEntryView->setEnabled(false); - return; - } else { - mEditButton->setEnabled(true); - mRemoveButton->setEnabled(true); - mAddresseeView->setEnabled(true); - mEntryView->setEnabled(true); - } - - DistributionList::Entry::List entries = list->entries(); - DistributionList::Entry::List::ConstIterator it; - for( it = entries.begin(); it != entries.end(); ++it ) { - new EntryItem( mEntryView, (*it).addressee, (*it).email ); - } - - EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); - bool state=entryItem; - - mChangeEmailButton->setEnabled(state); - mRemoveEntryButton->setEnabled(state); -} - -void DistributionListEditorWidget::updateAddresseeView() -{ - mAddresseeView->clear(); - - AddressBook::Iterator it; - for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - new AddresseeItem( mAddresseeView, *it ); - } -} - -void DistributionListEditorWidget::updateNameCombo() -{ - mNameCombo->insertStringList( mManager->listNames() ); - - updateEntryView(); -} - -void DistributionListEditorWidget::slotSelectionAddresseeViewChanged() -{ - AddresseeItem *addresseeItem = - static_cast( mAddresseeView->selectedItem() ); - bool state=addresseeItem; - mAddEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); -} diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h deleted file mode 100644 index 1bd6fc788..000000000 --- a/kabc/distributionlistdialog.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_DISTRIBUTIONLISTDIALOG_H -#define KABC_DISTRIBUTIONLISTDIALOG_H - -#include - -#include - -class TQListView; -class TQComboBox; -class TQButtonGroup; - -namespace KABC { - -class AddressBook; -class DistributionListEditorWidget; -class DistributionListManager; - -/** - @short Frontend to create distribution lists - - Creating a new DistributionListDialog does automatically - load all addressees and distribution lists from the config - files. The changes will be saved when clicking the 'OK' - button. - - Example: - - \code - KABC::DistributionListDialog *dlg = new - KABC::DistributionListDialog( KABC::StdAddressBook::self(), this ); - - dlg->exec(); - \endcode -*/ -class KABC_EXPORT DistributionListDialog : public KDialogBase -{ - Q_OBJECT - - public: - /** - Constructor. - - @param ab The addressbook, the addressees should be used from - @param parent The parent widget - */ - DistributionListDialog( AddressBook *ab, TQWidget *parent ); - - /** - Destructor. - */ - virtual ~DistributionListDialog(); - - private: - DistributionListEditorWidget *mEditor; - - struct Data; - Data *d; -}; - -/** - @short Helper class -*/ -class KABC_EXPORT EmailSelector : public KDialogBase -{ - public: - EmailSelector( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - TQString selected(); - - static TQString getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - private: - TQButtonGroup *mButtonGroup; -}; - -/** - @short Helper class -*/ -class KABC_EXPORT DistributionListEditorWidget : public TQWidget -{ - Q_OBJECT - - public: - DistributionListEditorWidget( AddressBook *, TQWidget *parent ); - virtual ~DistributionListEditorWidget(); - - private slots: - void newList(); - void editList(); - void removeList(); - void addEntry(); - void removeEntry(); - void changeEmail(); - void updateEntryView(); - void updateAddresseeView(); - void updateNameCombo(); - void slotSelectionEntryViewChanged(); - void slotSelectionAddresseeViewChanged(); - void save(); - - private: - TQComboBox *mNameCombo; - TQLabel *mListLabel; - TQListView *mEntryView; - TQListView *mAddresseeView; - - AddressBook *mAddressBook; - DistributionListManager *mManager; - TQPushButton *mNewButton, *mEditButton, *mRemoveButton; - TQPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; - - struct Data; - Data *d; -}; - -} -#endif diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp deleted file mode 100644 index 573f0970a..000000000 --- a/kabc/distributionlisteditor.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "addressbook.h" -#include "addresseedialog.h" -#include "distributionlist.h" - -#include "distributionlisteditor.h" -#include "distributionlisteditor.moc" - -using namespace KABC; - -EmailSelectDialog::EmailSelectDialog( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) : - KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, - parent ) -{ - TQFrame *topFrame = plainPage(); - TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - - mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), - topFrame ); - mButtonGroup->setRadioButtonExclusive( true ); - topLayout->addWidget( mButtonGroup ); - - TQStringList::ConstIterator it; - for( it = emails.begin(); it != emails.end(); ++it ) { - TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); - if ( (*it) == current ) { - button->setDown( true ); - } - } -} - -TQString EmailSelectDialog::selected() -{ - TQButton *button = mButtonGroup->selected(); - if ( button ) return button->text(); - return TQString::null; -} - -TQString EmailSelectDialog::getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) -{ - EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); - dlg->exec(); - - TQString result = dlg->selected(); - - delete dlg; - - return result; -} - -class EditEntryItem : public TQListViewItem -{ - public: - EditEntryItem( TQListView *parent, const Addressee &addressee, - const TQString &email=TQString::null ) : - TQListViewItem( parent ), - mAddressee( addressee ), - mEmail( email ) - { - setText( 0, addressee.realName() ); - if( email.isEmpty() ) { - setText( 1, addressee.preferredEmail() ); - setText( 2, i18n("Yes") ); - } else { - setText( 1, email ); - setText( 2, i18n("No") ); - } - } - - Addressee addressee() const - { - return mAddressee; - } - - TQString email() const - { - return mEmail; - } - - private: - Addressee mAddressee; - TQString mEmail; -}; - -DistributionListEditor::DistributionListEditor( AddressBook *addressBook, TQWidget *parent) : - TQWidget( parent ), - mAddressBook( addressBook ) -{ - kdDebug(5700) << "DistributionListEditor()" << endl; - - TQBoxLayout *topLayout = new TQVBoxLayout( this ); - topLayout->setMargin( KDialog::marginHint() ); - topLayout->setSpacing( KDialog::spacingHint() ); - - TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; - - mNameCombo = new TQComboBox( this ); - nameLayout->addWidget( mNameCombo ); - connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); - - newButton = new TQPushButton( i18n("New List"), this ); - nameLayout->addWidget( newButton ); - connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); - - removeButton = new TQPushButton( i18n("Remove List"), this ); - nameLayout->addWidget( removeButton ); - connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); - - mEntryView = new TQListView( this ); - mEntryView->addColumn( i18n("Name") ); - mEntryView->addColumn( i18n("Email") ); - mEntryView->addColumn( i18n("Use Preferred") ); - topLayout->addWidget( mEntryView ); - connect(mEntryView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionEntryViewChanged())); - - changeEmailButton = new TQPushButton( i18n("Change Email"), this ); - topLayout->addWidget( changeEmailButton ); - connect( changeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); - - removeEntryButton = new TQPushButton( i18n("Remove Entry"), this ); - topLayout->addWidget( removeEntryButton ); - connect( removeEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); - - addEntryButton = new TQPushButton( i18n("Add Entry"), this ); - topLayout->addWidget( addEntryButton ); - connect( addEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); - - mAddresseeView = new TQListView( this ); - mAddresseeView->addColumn( i18n("Name") ); - mAddresseeView->addColumn( i18n("Preferred Email") ); - topLayout->addWidget( mAddresseeView ); - - - connect(mAddresseeView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionAddresseeViewChanged())); - - mManager = new DistributionListManager( mAddressBook ); - mManager->load(); - - updateAddresseeView(); - updateNameCombo(); - removeButton->setEnabled(!mManager->listNames().isEmpty()); -} - -DistributionListEditor::~DistributionListEditor() -{ - kdDebug(5700) << "~DistributionListEditor()" << endl; - - mManager->save(); - delete mManager; -} - -void DistributionListEditor::slotSelectionEntryViewChanged() -{ - EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); - bool state = (entryItem != 0L); - - changeEmailButton->setEnabled(state); - removeEntryButton->setEnabled(state); -} - -void DistributionListEditor::newList() -{ - bool ok = false; - TQString name = KInputDialog::getText( i18n("New Distribution List"), - i18n("Please enter name:"), - TQString::null, &ok, this ); - if ( !ok ) - return; - - new DistributionList( mManager, name ); - - mNameCombo->insertItem( name ); - removeButton->setEnabled(true); - updateEntryView(); -} - -void DistributionListEditor::removeList() -{ - mManager->remove( mManager->list( mNameCombo->currentText() ) ); - mNameCombo->removeItem( mNameCombo->currentItem() ); - removeButton->setEnabled(!mManager->listNames().isEmpty()); - addEntryButton->setEnabled( !mNameCombo->currentText().isEmpty()); - updateEntryView(); -} - -void DistributionListEditor::addEntry() -{ - AddresseeItem *addresseeItem = - dynamic_cast( mAddresseeView->selectedItem() ); - - if( !addresseeItem ) { - kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; - return; - } - - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) { - kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; - return; - } - - list->insertEntry( addresseeItem->addressee() ); - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditor::removeEntry() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EditEntryItem *entryItem = - dynamic_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - list->removeEntry( entryItem->addressee(), entryItem->email() ); - delete entryItem; -} - -void DistributionListEditor::changeEmail() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EditEntryItem *entryItem = - dynamic_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - TQString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(), - entryItem->email(), this ); - list->removeEntry( entryItem->addressee(), entryItem->email() ); - list->insertEntry( entryItem->addressee(), email ); - - updateEntryView(); -} - -void DistributionListEditor::updateEntryView() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - mEntryView->clear(); - DistributionList::Entry::List entries = list->entries(); - DistributionList::Entry::List::ConstIterator it; - for( it = entries.begin(); it != entries.end(); ++it ) { - new EditEntryItem( mEntryView, (*it).addressee, (*it).email ); - } - EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); - bool state = (entryItem != 0L); - - changeEmailButton->setEnabled(state); - removeEntryButton->setEnabled(state); -} - -void DistributionListEditor::updateAddresseeView() -{ - mAddresseeView->clear(); - - AddressBook::Iterator it; - for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - new AddresseeItem( mAddresseeView, *it ); - } -} - -void DistributionListEditor::updateNameCombo() -{ - mNameCombo->insertStringList( mManager->listNames() ); - - updateEntryView(); -} - -void DistributionListEditor::slotSelectionAddresseeViewChanged() -{ - AddresseeItem *addresseeItem = - dynamic_cast( mAddresseeView->selectedItem() ); - bool state = (addresseeItem != 0L); - addEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); -} diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h deleted file mode 100644 index faec280e6..000000000 --- a/kabc/distributionlisteditor.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_DISTRIBUTIONLISTEDITOR_H -#define KABC_DISTRIBUTIONLISTEDITOR_H - -#include - -#include - -class TQListView; -class TQComboBox; -class TQButtonGroup; - -namespace KABC { - -class AddressBook; -class DistributionListManager; - -class KABC_EXPORT EmailSelectDialog : public KDialogBase -{ - public: - EmailSelectDialog( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - TQString selected(); - - static TQString getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - private: - TQButtonGroup *mButtonGroup; -}; - -/** - @obsolete -*/ -class DistributionListEditor : public TQWidget -{ - Q_OBJECT - public: - DistributionListEditor( AddressBook *, TQWidget *parent ); - virtual ~DistributionListEditor(); - - private slots: - void newList(); - void removeList(); - void addEntry(); - void removeEntry(); - void changeEmail(); - void updateEntryView(); - void updateAddresseeView(); - void updateNameCombo(); - void slotSelectionEntryViewChanged(); - void slotSelectionAddresseeViewChanged(); - - private: - TQComboBox *mNameCombo; - TQListView *mEntryView; - TQListView *mAddresseeView; - - AddressBook *mAddressBook; - DistributionListManager *mManager; - TQPushButton *newButton, *removeButton; - TQPushButton *changeEmailButton,*removeEntryButton,*addEntryButton; -}; - -} - -#endif diff --git a/kabc/errorhandler.cpp b/kabc/errorhandler.cpp deleted file mode 100644 index d8ab650c7..000000000 --- a/kabc/errorhandler.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2002 Tobias Koenig - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include - -#include "errorhandler.h" - -using namespace KABC; - -void ConsoleErrorHandler::error( const TQString &msg ) -{ - // no debug area is ok here - kdError() << msg << endl; -} - - -void GUIErrorHandler::error( const TQString &msg ) -{ - KMessageBox::error( 0, msg, i18n( "Error in libkabc" ) ); -} - - -GuiErrorHandler::GuiErrorHandler( TQWidget *parent ) - : mParent( parent ) -{ -} - -void GuiErrorHandler::error( const TQString &msg ) -{ - if (tqApp) - KMessageBox::error( mParent, msg ); -} diff --git a/kabc/errorhandler.h b/kabc/errorhandler.h deleted file mode 100644 index 9a316541d..000000000 --- a/kabc/errorhandler.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2002 Tobias Koenig - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_ERRORHANDLER_H -#define KABC_ERRORHANDLER_H - -#include - -#include - -class TQWidget; - -namespace KABC { - -/** - Abstract class that provides displaying of error messages. - We need this to make libkabc gui independent on the one side - and provide user friendly error messages on the other side. - Use @p ConsoleErrorHandler or @p GuiErrorHandler in your - application or provide your own ErrorHandler. -*/ -class KABC_EXPORT ErrorHandler -{ - public: - /** - Show error message. - */ - virtual void error( const TQString &msg ) = 0; -}; - -/** - This class prints the error messages to stderr via kdError(). -*/ -class KABC_EXPORT ConsoleErrorHandler : public ErrorHandler -{ - public: - virtual void error( const TQString &msg ); -}; - -/** - This class shows messages boxes for every - error message. - - \deprecated Use GuiErrorHandler instead. -*/ -class KABC_EXPORT GUIErrorHandler : public ErrorHandler -{ - public: - virtual void error( const TQString &msg ); -}; - -/** - This class shows messages boxes for every - error message. -*/ -class KABC_EXPORT GuiErrorHandler : public ErrorHandler -{ - public: - /** - Create error handler. - - \param parent Widget which is used as parent for the error dialogs. - */ - GuiErrorHandler( TQWidget *parent ); - - virtual void error( const TQString &msg ); - - private: - TQWidget *mParent; - - class Private; - Private *d; -}; - -} - -#endif diff --git a/kabc/field.h b/kabc/field.h deleted file mode 100644 index 118ce2d51..000000000 --- a/kabc/field.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_FIELD_H -#define KABC_FIELD_H - -#include -#include - -#include "addressee.h" - -class TDEConfig; - -namespace KABC { - -class KABC_EXPORT Field -{ - class FieldImpl; - friend class FieldImpl; - -public: - typedef TQValueList List; - - /** - * @li @p All - - * @li @p Frequent - - * @li @p Address - - * @li @p Email - - * @li @p Personal - - * @li @p Organization - - * @li @p CustomCategory - - */ - enum FieldCategory - { - All = 0x0, - Frequent = 0x01, - Address = 0x02, - Email = 0x04, - Personal = 0x08, - Organization = 0x10, - CustomCategory = 0x20 - }; - - /** - * Returns the translated label for this field. - */ - virtual TQString label(); - - /** - * Returns the ored categories the field belongs to. - */ - virtual int category(); - - /** - * Returns the translated label for field category. - */ - static TQString categoryLabel( int category ); - - /** - * Returns a string representation of the value the field has in the given - * Addressee. Returns TQString::null, if it is not possible to convert the - * value to a string. - */ - virtual TQString value( const KABC::Addressee & ); - - /** - * Sets the value of the field in the given Addressee. Returns true on success - * or false, if the given string couldn't be converted to a valid value. - */ - virtual bool setValue( KABC::Addressee &, const TQString & ); - - /** - * Returns a string, that can be used for sorting. - */ - TQString sortKey( const KABC::Addressee & ); - - /** - * Returns, if the field is a user-defined field. - */ - virtual bool isCustom(); - - /** - * Returns, if the field is equal with @a field. - */ - virtual bool equals( Field *field ); - - /** - * Returns a list of all fields. - */ - static Field::List allFields(); - - /** - * Returns a list of the default fields. - */ - static Field::List defaultFields(); - - /** - * Creates a custom field. - * - * @param label The label for this field - * @param category The category of this field - * @param key Unique key for this field - * @param app Unique app name for this field - */ - static Field *createCustomField( const TQString &label, int category, - const TQString &key, const TQString &app ); - - /** - * Delete all fields from list. - */ - static void deleteFields(); - - /** - * Save the field settings to a config file. - * - * @param cfg The config file object - * @param identifier The unique identifier - * @param fields The list of the fields - */ - static void saveFields( TDEConfig *cfg, const TQString &identifier, - const Field::List &fields ); - /** - * This is the same as above, with the difference, that - * the list is stored in TDEGlobal::config() in group "KABCFields". - */ - static void saveFields( const TQString &identifier, - const Field::List &fields ); - - /** - * Load the field settings from a config file. - * - * @param cfg The config file object - * @param identifier The unique identifier - */ - static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier ); - - /** - * This is the same as above, with the difference, that - * the list is loaded from TDEGlobal::config() from group "KABCFields". - */ - static Field::List restoreFields( const TQString &identifier ); - -protected: - static void createField( int id, int category = 0 ); - static void createDefaultField( int id, int category = 0 ); - -private: - Field( FieldImpl * ); - virtual ~Field(); - - FieldImpl *mImpl; - - static Field::List mAllFields; - static Field::List mDefaultFields; - static Field::List mCustomFields; -}; - -} -#endif diff --git a/kabc/format.h b/kabc/format.h deleted file mode 100644 index ed036673c..000000000 --- a/kabc/format.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_FORMAT_H -#define KABC_FORMAT_H - -#include - -#include - -namespace KABC { - -class AddressBook; - -/** - @deprecated use FormatPlugin instead -*/ -class KABC_EXPORT_DEPRECATED Format -{ - public: - /** - Load addressbook from file. - */ - virtual bool load( AddressBook *, const TQString &fileName ) = 0; - /** - Save addressbook to file. - */ - virtual bool save( AddressBook *, const TQString &fileName ) = 0; -}; - -} - -#endif diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp deleted file mode 100644 index 17e7b0f33..000000000 --- a/kabc/formatfactory.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include - -#include "vcardformatplugin.h" - -#include "formatfactory.h" - -using namespace KABC; - -FormatFactory *FormatFactory::mSelf = 0; -static KStaticDeleter factoryDeleter; - -FormatFactory *FormatFactory::self() -{ - kdDebug(5700) << "FormatFactory::self()" << endl; - - if ( !mSelf ) - factoryDeleter.setObject( mSelf, new FormatFactory ); - - return mSelf; -} - -FormatFactory::FormatFactory() -{ - mFormatList.setAutoDelete( true ); - - // dummy entry for default format - FormatInfo *info = new FormatInfo; - info->library = ""; - info->nameLabel = i18n( "vCard" ); - info->descriptionLabel = i18n( "vCard Format" ); - mFormatList.insert( "vcard", info ); - - const TQStringList list = TDEGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true ); - for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) - { - KSimpleConfig config( *it, true ); - - if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) - continue; - - info = new FormatInfo; - - config.setGroup( "Plugin" ); - TQString type = config.readEntry( "Type" ); - info->library = config.readEntry( "X-TDE-Library" ); - - config.setGroup( "Misc" ); - info->nameLabel = config.readEntry( "Name" ); - info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) ); - - mFormatList.insert( type, info ); - } -} - -FormatFactory::~FormatFactory() -{ - mFormatList.clear(); -} - -TQStringList FormatFactory::formats() -{ - TQStringList retval; - - // make sure 'vcard' is the first entry - retval << "vcard"; - - TQDictIterator it( mFormatList ); - for ( ; it.current(); ++it ) - if ( it.currentKey() != "vcard" ) - retval << it.currentKey(); - - return retval; -} - -FormatInfo *FormatFactory::info( const TQString &type ) -{ - if ( type.isEmpty() ) - return 0; - else - return mFormatList[ type ]; -} - -FormatPlugin *FormatFactory::format( const TQString& type ) -{ - FormatPlugin *format = 0; - - if ( type.isEmpty() ) - return 0; - - if ( type == "vcard" ) { - format = new VCardFormatPlugin; - format->setType( type ); - format->setNameLabel( i18n( "vCard" ) ); - format->setDescriptionLabel( i18n( "vCard Format" ) ); - return format; - } - - FormatInfo *fi = mFormatList[ type ]; - if (!fi) - return 0; - TQString libName = fi->library; - - KLibrary *library = openLibrary( libName ); - if ( !library ) - return 0; - - void *format_func = library->symbol( "format" ); - - if ( format_func ) { - format = ((FormatPlugin* (*)())format_func)(); - format->setType( type ); - format->setNameLabel( fi->nameLabel ); - format->setDescriptionLabel( fi->descriptionLabel ); - } else { - kdDebug( 5700 ) << "'" << libName << "' is not a format plugin." << endl; - return 0; - } - - return format; -} - - -KLibrary *FormatFactory::openLibrary( const TQString& libName ) -{ - KLibrary *library = 0; - - TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) ); - - if ( path.isEmpty() ) { - kdDebug( 5700 ) << "No format plugin library was found!" << endl; - return 0; - } - - library = KLibLoader::self()->library( TQFile::encodeName( path ) ); - - if ( !library ) { - kdDebug( 5700 ) << "Could not load library '" << libName << "'" << endl; - return 0; - } - - return library; -} diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h deleted file mode 100644 index ff9da5504..000000000 --- a/kabc/formatfactory.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_FORMATFACTORY_H -#define KABC_FORMATFACTORY_H - -#include -#include - -#include -#include - -#include "formatplugin.h" - -namespace KABC { - -struct FormatInfo -{ - TQString library; - TQString nameLabel; - TQString descriptionLabel; -}; - -/** - * Class for loading format plugins. - * - * Example: - * - * \code - * KABC::FormatFactory *factory = KABC::FormatFactory::self(); - * - * TQStringList list = factory->formats(); - * TQStringList::Iterator it; - * for ( it = list.begin(); it != list.end(); ++it ) { - * KABC::FormatPlugin *format = factory->format( (*it) ); - * // do something with format - * } - * \endcode - */ -class KABC_EXPORT FormatFactory -{ - public: - - /** - Destructor. - */ - ~FormatFactory(); - - /** - * Returns the global format factory. - */ - static FormatFactory *self(); - - /** - * Returns a pointer to a format object or a null pointer - * if format type doesn't exist. - * - * @param type The type of the format, returned by formats() - */ - FormatPlugin *format( const TQString &type ); - - /** - * Returns a list of all available format types. - */ - TQStringList formats(); - - /** - * Returns the info structure for a special type. - */ - FormatInfo *info( const TQString &type ); - - protected: - FormatFactory(); - - private: - KLibrary *openLibrary( const TQString& libName ); - - static FormatFactory *mSelf; - - TQDict mFormatList; -}; - -} -#endif diff --git a/kabc/formatplugin.h b/kabc/formatplugin.h deleted file mode 100644 index 33f4beea0..000000000 --- a/kabc/formatplugin.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_FORMATPLUGIN_H -#define KABC_FORMATPLUGIN_H - -#include - -#include "plugin.h" -#include "resource.h" - -namespace KABC { - -class AddressBook; -class Addressee; - -/** - * @short Base class for address book formats. - * - * This class provides an abstract interface for ResourceFile and - * ResourceDir formats. - * - * @internal - */ -class KABC_EXPORT FormatPlugin : public Plugin -{ -public: - - /** - * Load single addressee from file. - */ - virtual bool load( Addressee &, TQFile *file ) = 0; - - /** - * Load whole addressbook from file. - */ - virtual bool loadAll( AddressBook *, Resource *, TQFile *file ) = 0; - - /** - * Save a single Addressee to file. - */ - virtual void save( const Addressee &, TQFile *file ) = 0; - - /** - * Save whole addressbook to file. - */ - virtual void saveAll( AddressBook *, Resource *, TQFile *file ) = 0; - - /** - * Checks if given file contains the right format - */ - virtual bool checkFormat( TQFile *file ) const = 0; -}; - -} -#endif diff --git a/kabc/formats/CMakeLists.txt b/kabc/formats/CMakeLists.txt deleted file mode 100644 index 60ea1c3fd..000000000 --- a/kabc/formats/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES binary.desktop DESTINATION ${DATA_INSTALL_DIR}/kabc/formats ) - - -##### kabcformat_binary ######################### - -set( target kabcformat_binary ) - -set( ${target}_SRCS - binaryformat.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kabc-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/formats/Makefile.am b/kabc/formats/Makefile.am deleted file mode 100644 index 57c2caaa3..000000000 --- a/kabc/formats/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -kde_module_LTLIBRARIES = kabcformat_binary.la - -kabcformat_binary_la_SOURCES = binaryformat.cpp -kabcformat_binary_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) \ - -no-undefined -kabcformat_binary_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(LIB_TDECORE) -kabcformat_binary_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -# these are the headers for your project -noinst_HEADERS = binaryformat.h - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabcformat_binary.pot - -linkdir = $(kde_datadir)/kabc/formats -link_DATA = binary.desktop -EXTRA_DIST = $(link_DATA) diff --git a/kabc/formats/binary.desktop b/kabc/formats/binary.desktop deleted file mode 100644 index 993286ad5..000000000 --- a/kabc/formats/binary.desktop +++ /dev/null @@ -1,89 +0,0 @@ -[Misc] -Name=Binary -Name[af]=Binêre -Name[ar]=ثنائي -Name[az]=İcraçı -Name[be]=Двайковы -Name[bg]=Двоичен -Name[bn]=বাইনারি -Name[br]=Binarel -Name[bs]=Binarno -Name[ca]=Binari -Name[cs]=Binární -Name[csb]=Binarny -Name[cy]=Deuaidd -Name[da]=Binær -Name[de]=Binär -Name[el]=Δυαδικό -Name[eo]=Duuma -Name[es]=Binario -Name[et]=Binaar -Name[eu]=Bitarra -Name[fa]=دوگانی -Name[fi]=Binääri -Name[fr]=Binaire -Name[fy]=Binêr -Name[ga]=Dénártha -Name[gl]=Binário -Name[he]=בינרית -Name[hi]=दà¥à¤µà¤¿à¤šà¤° -Name[hr]=Binarno -Name[hsb]=Binarny -Name[hu]=Bináris -Name[id]=Biner -Name[is]=Tvíunda -Name[it]=Binario -Name[ja]=ãƒã‚¤ãƒŠãƒª -Name[ka]=áƒáƒ áƒáƒ‘ითი -Name[kk]=Бинарлық -Name[km]=គោលពីរ -Name[ko]=ë°”ì´ë„ˆë¦¬ -Name[lb]=Binär -Name[lt]=Dvejetainis -Name[lv]=BinÄrs -Name[mk]=Бинарен -Name[mn]=Бинар -Name[ms]=Binari -Name[mt]=Binarju -Name[nb]=Binær -Name[nds]=Bineer -Name[ne]=बाइनरी -Name[nl]=Binair -Name[nn]=Binær -Name[nso]=Tselapedi -Name[pa]=ਬਾਈਨਰੀ -Name[pl]=Binarny -Name[pt]=Binário -Name[pt_BR]=Binário -Name[ro]=Binar -Name[ru]=Двоичный -Name[rw]=Nyabibiri -Name[se]=Binára -Name[sk]=Binárny -Name[sl]=DvojiÅ¡ko -Name[sq]=Binarë -Name[sr]=Бинарни -Name[sr@Latn]=Binarni -Name[ss]=Lokuhamab ngakubili -Name[sv]=Binär -Name[ta]=இரà¯à®®à®®à¯ -Name[te]=à°¦à±à°µà°¿à°¯à°¾à°¶à°‚ -Name[tg]=Дутартиба -Name[th]=ไบนารี -Name[tr]=İkili -Name[tt]=Binar -Name[uk]=Двійковий -Name[uz]=Binar -Name[uz@cyrillic]=Бинар -Name[ven]=Zwivhili -Name[vi]=Nhị phân -Name[wa]=Binaire -Name[xh]=Ephindwe kabini -Name[zh_CN]=二进制 -Name[zh_HK]=äºŒé€²ä½ -Name[zh_TW]=äºŒé€²ä½ -Name[zu]=Okuhambisana ngambili - -[Plugin] -Type=binary -X-TDE-Library=kabcformat_binary diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp deleted file mode 100644 index a82a017a3..000000000 --- a/kabc/formats/binaryformat.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include - -#include "addressbook.h" -#include "addressee.h" -#include "picture.h" -#include "sound.h" - -#include "binaryformat.h" - -#define BINARY_FORMAT_VERSION 1 - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT FormatPlugin *format() - { - return new BinaryFormat; - } -} - -bool BinaryFormat::load( Addressee &addressee, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::load()" << endl; - TQDataStream stream( file ); - - if ( !checkHeader( stream ) ) - return false; - - loadAddressee( addressee, stream ); - - return true; -} - -bool BinaryFormat::loadAll( AddressBook*, Resource *resource, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::loadAll()" << endl; - - TQDataStream stream( file ); - - if ( !checkHeader( stream ) ) - return false; - - TQ_UINT32 entries; - - stream >> entries; - - for ( uint i = 0; i < entries; ++i ) { - Addressee addressee; - loadAddressee( addressee, stream ); - addressee.setResource( resource ); - addressee.setChanged( false ); - resource->insertAddressee( addressee ); - } - - return true; -} - -void BinaryFormat::save( const Addressee &addressee, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::save()" << endl; - - TQDataStream stream( file ); - - writeHeader( stream ); - - TQ_UINT32 entries = 1; - stream << entries; - saveAddressee( addressee, stream ); -} - -void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::saveAll()" << endl; - - TQ_UINT32 counter = 0; - TQDataStream stream( file ); - - writeHeader( stream ); - // set dummy number of entries - stream << counter; - - Resource::Iterator it; - for ( it = resource->begin(); it != resource->end(); ++it ) { - saveAddressee( (*it), stream ); - counter++; - (*it).setChanged( false ); - } - - // set real number of entries - stream.device()->at( 2 * sizeof( TQ_UINT32 ) ); - stream << counter; -} - -bool BinaryFormat::checkFormat( TQFile *file ) const -{ - kdDebug(5700) << "BinaryFormat::checkFormat()" << endl; - - TQDataStream stream( file ); - - return checkHeader( stream ); -} - -bool BinaryFormat::checkHeader( TQDataStream &stream ) const -{ - TQ_UINT32 magic, version; - - stream >> magic >> version; - - TQFile *file = dynamic_cast( stream.device() ); - - if ( !file ) { - kdError() << i18n("Not a file?") << endl; - return false; - } - - if ( magic != 0x2e93e ) { - kdError() << TQString(i18n("File '%1' is not binary format.").arg( file->name() )) << endl; - return false; - } - - if ( version != BINARY_FORMAT_VERSION ) { - kdError() << TQString(i18n("File '%1' is the wrong version.").arg( file->name() )) << endl; - return false; - } - - return true; -} - -void BinaryFormat::writeHeader( TQDataStream &stream ) -{ - TQ_UINT32 magic, version; - - magic = 0x2e93e; - version = BINARY_FORMAT_VERSION; - - stream << magic << version; -} - -void BinaryFormat::loadAddressee( Addressee &addressee, TQDataStream &stream ) -{ - stream >> addressee; -/* - // load pictures - Picture photo = addressee.photo(); - Picture logo = addressee.logo(); - - if ( photo.isIntern() ) { - TQImage img; - if ( !img.load( locateLocal( "data", "kabc/photos/" ) + addressee.uid() ) ) - kdDebug(5700) << "No photo available for '" << addressee.uid() << "'." << endl; - - addressee.setPhoto( img ); - } - - if ( logo.isIntern() ) { - TQImage img; - if ( !img.load( locateLocal( "data", "kabc/logos/" ) + addressee.uid() ) ) - kdDebug(5700) << "No logo available for '" << addressee.uid() << "'." << endl; - - addressee.setLogo( img ); - } - - // load sound - // TODO: load sound data from file -*/ -} - -void BinaryFormat::saveAddressee( const Addressee &addressee, TQDataStream &stream ) -{ - stream << addressee; -/* - // load pictures - Picture photo = addressee.photo(); - Picture logo = addressee.logo(); - - if ( photo.isIntern() ) { - TQImage img = photo.data(); - TQString fileName = locateLocal( "data", "kabc/photos/" ) + addressee.uid(); - - if ( !img.save( fileName, "PNG" ) ) - kdDebug(5700) << "Unable to save photo for '" << addressee.uid() << "'." << endl; - } - - if ( logo.isIntern() ) { - TQImage img = logo.data(); - TQString fileName = locateLocal( "data", "kabc/logos/" ) + addressee.uid(); - - if ( !img.save( fileName, "PNG" ) ) - kdDebug(5700) << "Unable to save logo for '" << addressee.uid() << "'." << endl; - } - - // save sound - // TODO: save the sound data to file -*/ -} diff --git a/kabc/formats/binaryformat.h b/kabc/formats/binaryformat.h deleted file mode 100644 index 09efde41a..000000000 --- a/kabc/formats/binaryformat.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_BINARYFORMAT_H -#define KABC_BINARYFORMAT_H - -#include "formatplugin.h" - -namespace KABC { - -class AddressBook; -class Addressee; - -/** - @short binary file format for addressbook entries. -*/ -class BinaryFormat : public FormatPlugin -{ -public: - /** - * Load single addressee from file. - */ - bool load( Addressee &, TQFile *file ); - - /** - * Load whole addressee from file. - */ - bool loadAll( AddressBook *, Resource *, TQFile *file ); - - /** - * Save single addressee to file. - */ - void save( const Addressee &, TQFile *file ); - - /** - * Save all addressees to file. - */ - void saveAll( AddressBook *, Resource *, TQFile *file ); - - /** - * Check for valid format of a file. - */ - bool checkFormat( TQFile *file ) const; - -private: - void loadAddressee( Addressee &, TQDataStream & ); - void saveAddressee( const Addressee &, TQDataStream & ); - bool checkHeader( TQDataStream & ) const; - void writeHeader( TQDataStream & ); -}; - -} -#endif diff --git a/kabc/geo.cpp b/kabc/geo.cpp deleted file mode 100644 index 44f9851e4..000000000 --- a/kabc/geo.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "geo.h" - -using namespace KABC; - -Geo::Geo() - : mLatitude( 91 ), mLongitude( 181 ), mValidLat( false ), mValidLong( false ) -{ -} - -Geo::Geo( float latitude, float longitude ) -{ - setLatitude( latitude ); - setLongitude( longitude ); -} - -void Geo::setLatitude( float latitude ) -{ - if ( latitude >= -90 && latitude <= 90 ) { - mLatitude = latitude; - mValidLat = true; - } else { - mLatitude = 91; - mValidLat = false; - } -} - -float Geo::latitude() const -{ - return mLatitude; -} - -void Geo::setLongitude( float longitude) -{ - if ( longitude >= -180 && longitude <= 180 ) { - mLongitude = longitude; - mValidLong = true; - } else { - mLongitude = 181; - mValidLong = false; - } -} - -float Geo::longitude() const -{ - return mLongitude; -} - -bool Geo::isValid() const -{ - return mValidLat && mValidLong; -} - -bool Geo::operator==( const Geo &g ) const -{ - if ( !g.isValid() && !isValid() ) return true; - if ( !g.isValid() || !isValid() ) return false; - if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return true; - return false; -} - -bool Geo::operator!=( const Geo &g ) const -{ - if ( !g.isValid() && !isValid() ) return false; - if ( !g.isValid() || !isValid() ) return true; - if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return false; - return true; -} - -TQString Geo::asString() const -{ - return "(" + TQString::number(mLatitude) + "," + TQString::number(mLongitude) + ")"; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Geo &geo ) -{ - return s << (float)geo.mLatitude << (float)geo.mLongitude; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Geo &geo ) -{ - s >> geo.mLatitude >> geo.mLongitude; - - geo.mValidLat = true; - geo.mValidLong = true; - - return s; -} diff --git a/kabc/geo.h b/kabc/geo.h deleted file mode 100644 index cac6abaff..000000000 --- a/kabc/geo.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_GEO_H -#define KABC_GEO_H - -#include - -#include - -namespace KABC { - -/** - @short Geographic position - - This class represents a geographic position. -*/ -class KABC_EXPORT Geo -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); - - public: - /** - Construct invalid geographics position object. - */ - Geo(); - - /** - Construct geographics position object. - - @param latitude Geographical latitude - @param longitude Geographical longitude - */ - Geo( float latitude, float longitude ); - - /** - Sets the latitude. - */ - void setLatitude( float ); - - /** - Returns the latitude. - */ - float latitude() const; - - /** - Sets the longitude. - */ - void setLongitude( float ); - - /** - Returns the longitude. - */ - float longitude() const; - - /** - Returns, if this object contains a valid geographical position. - */ - bool isValid() const; - - bool operator==( const Geo & ) const; - bool operator!=( const Geo & ) const; - - /** - Returns string representation of geographical position. - */ - TQString asString() const; - - private: - float mLatitude; - float mLongitude; - - bool mValid; - bool mValidLat; - bool mValidLong; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); - -} - -#endif diff --git a/kabc/kabc_manager.desktop b/kabc/kabc_manager.desktop deleted file mode 100644 index 0af910f52..000000000 --- a/kabc/kabc_manager.desktop +++ /dev/null @@ -1,76 +0,0 @@ -[Desktop Entry] -Name=Contacts -Name[af]=Kontakte -Name[ar]=المراسلين -Name[be]=Кантакты -Name[br]=Darempredoù -Name[bs]=Kontakti -Name[ca]=Contactes -Name[cs]=Kontakty -Name[csb]=ÅÄ…czbë -Name[cy]=Cysylltau -Name[da]=Kontakter -Name[de]=Kontakte -Name[el]=Επαφές -Name[eo]=Kontaktoj -Name[es]=Contactos -Name[et]=Kontaktid -Name[eu]=Kontaktuak -Name[fa]=تماسها -Name[fi]=Yhteystiedot -Name[fy]=Kontakten -Name[ga]=Teagmhálacha -Name[gl]=Contactos -Name[he]=×נשי קשר -Name[hi]=समà¥à¤ªà¤°à¥à¤• -Name[hr]=Kontakti -Name[hsb]=Adresy -Name[hu]=Névjegyek -Name[id]=Kontak -Name[is]=Tengiliðir -Name[it]=Contatti -Name[ja]=コンタクト -Name[ka]=კáƒáƒœáƒ¢áƒáƒ¥áƒ¢áƒ”ბი -Name[kk]=Контакттар -Name[km]=ទំនាក់ទំនង -Name[ku]=Tekilî -Name[lb]=Kontakter -Name[lt]=Kontaktai -Name[lv]=Kontakti -Name[mk]=Контакти -Name[ms]=Hubungan -Name[nb]=Kontakter -Name[nds]=Kontakten -Name[ne]=समà¥à¤ªà¤°à¥à¤• -Name[nl]=Contactpersonen -Name[nn]=Kontaktar -Name[pa]=ਸੰਪਰਕ -Name[pl]=Kontakty -Name[pt]=Contactos -Name[pt_BR]=Contatos -Name[ro]=Contacte -Name[ru]=Контакты -Name[rw]=Amaderesi -Name[se]=OktavuoÄ‘at -Name[sk]=Kontakty -Name[sl]=Stiki -Name[sr]=Контакти -Name[sr@Latn]=Kontakti -Name[sv]=Kontakter -Name[ta]=தொடரà¯à®ªà¯à®•ள௠-Name[te]=సంపà±à°°à°¦à°¿à°‚à°ªà±à°²à± -Name[tg]=Ðлоқаҳо -Name[th]=รายชื่อติดต่อ -Name[tr]=BaÄŸlantılar -Name[tt]=Elemtälär -Name[uk]=Контакти -Name[uz]=Aloqalar -Name[uz@cyrillic]=Ðлоқалар -Name[vi]=Liên lạc -Name[zh_CN]=è”系人 -Name[zh_HK]=è¯çµ¡äºº -Name[zh_TW]=è¯çµ¡äºº -Type=Service -ServiceTypes=KResources/Manager - -X-TDE-ResourceFamily=contact diff --git a/kabc/key.cpp b/kabc/key.cpp deleted file mode 100644 index 7c66579b3..000000000 --- a/kabc/key.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "key.h" - -using namespace KABC; - -Key::Key( const TQString &text, int type ) - : mTextData( text ), mIsBinary( false ), mType( type ) -{ - mId = TDEApplication::randomString(8); -} - -Key::~Key() -{ -} - -bool Key::operator==( const Key &k ) const -{ - if ( mIsBinary != k.mIsBinary ) return false; - if ( mIsBinary ) - if ( mBinaryData != k.mBinaryData ) return false; - else - if ( mTextData != k.mTextData ) return false; - if ( mType != k.mType ) return false; - if ( mCustomTypeString != k.mCustomTypeString ) return false; - - return true; -} - -bool Key::operator!=( const Key &k ) const -{ - return !( k == *this ); -} - -void Key::setId( const TQString &id ) -{ - mId = id; -} - -TQString Key::id() const -{ - return mId; -} - -void Key::setBinaryData( const TQByteArray &binary ) -{ - mBinaryData = binary; - mIsBinary = true; -} - -TQByteArray Key::binaryData() const -{ - return mBinaryData; -} - -void Key::setTextData( const TQString &text ) -{ - mTextData = text; - mIsBinary = false; -} - -TQString Key::textData() const -{ - return mTextData; -} - -bool Key::isBinary() const -{ - return mIsBinary; -} - -void Key::setType( int type ) -{ - mType = type; -} - -void Key::setCustomTypeString( const TQString &custom ) -{ - mCustomTypeString = custom; -} - -int Key::type() const -{ - return mType; -} - -TQString Key::customTypeString() const -{ - return mCustomTypeString; -} - -Key::TypeList Key::typeList() -{ - TypeList list; - list << X509; - list << PGP; - list << Custom; - - return list; -} - -TQString Key::typeLabel( int type ) -{ - switch ( type ) { - case X509: - return i18n( "X509" ); - break; - case PGP: - return i18n( "PGP" ); - break; - case Custom: - return i18n( "Custom" ); - break; - default: - return i18n( "Unknown type" ); - break; - } -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Key &key ) -{ - return s << key.mId << key.mIsBinary << key.mTextData << key.mBinaryData << - key.mCustomTypeString << key.mType; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Key &key ) -{ - s >> key.mId >> key.mIsBinary >> key.mTextData >> key.mBinaryData >> - key.mCustomTypeString >> key.mType; - - return s; -} diff --git a/kabc/key.h b/kabc/key.h deleted file mode 100644 index 08df0264d..000000000 --- a/kabc/key.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_KEY_H -#define KABC_KEY_H - -#include - -#include - -namespace KABC { - -/** - * @short A class to store an encryption key. - */ -class KABC_EXPORT Key -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); - -public: - typedef TQValueList List; - typedef TQValueList TypeList; - - /** - * Key types - * - * @li X509 - X509 key - * @li PGP - Pretty Good Privacy key - * @li Custom - Custom or IANA conform key - */ - enum Types { - X509, - PGP, - Custom - }; - - /** - * Constructor. - * - * @param text The text data. - * @param type The key type, see Types. - */ - Key( const TQString &text = TQString::null, int type = PGP ); - - /** - * Destructor. - */ - ~Key(); - - bool operator==( const Key & ) const; - bool operator!=( const Key & ) const; - - /** - * Sets the unique identifier. - */ - void setId( const TQString &id ); - - /** - * Returns the unique identifier. - */ - TQString id() const; - - /** - * Sets binary data. - */ - void setBinaryData( const TQByteArray &binary ); - - /** - * Returns the binary data. - */ - TQByteArray binaryData() const; - - /** - * Sets text data. - */ - void setTextData( const TQString &text ); - - /** - * Returns the text data. - */ - TQString textData() const; - - /** - * Returns whether the key contains binary or text data. - */ - bool isBinary() const; - - /** - * Sets the type, see Type. - */ - void setType( int type ); - - /** - * Sets custom type string. - */ - void setCustomTypeString( const TQString &custom ); - - /** - * Returns the type, see Type. - */ - int type() const; - - /** - * Returns the custom type string. - */ - TQString customTypeString() const; - - /** - * Returns a list of all available key types. - */ - static TypeList typeList(); - - /** - * Returns a translated label for a given key type. - */ - static TQString typeLabel( int type ); - -private: - TQByteArray mBinaryData; - TQString mId; - TQString mTextData; - TQString mCustomTypeString; - - int mIsBinary; - int mType; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); - -} -#endif diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp deleted file mode 100644 index 1c2b2d833..000000000 --- a/kabc/ldapclient.cpp +++ /dev/null @@ -1,427 +0,0 @@ -/* kldapclient.cpp - LDAP access - * Copyright (C) 2002 Klarälvdalens Datakonsult AB - * - * Author: Steffen Hansen - * - * Ported to KABC by Daniel Molkentin - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ldapclient.h" -#include "ldif.h" -#include "ldapurl.h" - -using namespace KABC; - -class LdapClient::LdapClientPrivate{ -public: - TQString bindDN; - TQString pwdBindDN; - LDIF ldif; -}; - -TQString LdapObject::toString() const -{ - TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); - for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { - TQString attr = it.key(); - for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { - result += TQString::fromUtf8( LDIF::assembleLine( attr, *it2, 76 ) ) + "\n"; - } - } - - return result; -} - -void LdapObject::clear() -{ - dn = TQString::null; - attrs.clear(); -} - -void LdapObject::assign( const LdapObject& that ) -{ - if ( &that != this ) { - dn = that.dn; - attrs = that.attrs; - client = that.client; - } -} - -LdapClient::LdapClient( TQObject* parent, const char* name ) - : TQObject( parent, name ), mJob( 0 ), mActive( false ) -{ - d = new LdapClientPrivate; -} - -LdapClient::~LdapClient() -{ - cancelQuery(); - delete d; d = 0; -} - -void LdapClient::setHost( const TQString& host ) -{ - mHost = host; -} - -void LdapClient::setPort( const TQString& port ) -{ - mPort = port; -} - -void LdapClient::setBase( const TQString& base ) -{ - mBase = base; -} - -void LdapClient::setBindDN( const TQString& bindDN ) -{ - d->bindDN = bindDN; -} - -void LdapClient::setPwdBindDN( const TQString& pwdBindDN ) -{ - d->pwdBindDN = pwdBindDN; -} - -void LdapClient::setAttrs( const TQStringList& attrs ) -{ - mAttrs = attrs; -} - -void LdapClient::startQuery( const TQString& filter ) -{ - cancelQuery(); - LDAPUrl url; - - url.setProtocol( "ldap" ); - url.setUser( d->bindDN ); - url.setPass( d->pwdBindDN ); - url.setHost( mHost ); - url.setPort( mPort.toUInt() ); - url.setDn( mBase ); - url.setAttributes( mAttrs ); - url.setScope( mScope == "one" ? LDAPUrl::One : LDAPUrl::Sub ); - url.setFilter( "("+filter+")" ); - - kdDebug(5700) << "Doing query: " << url.prettyURL() << endl; - - startParseLDIF(); - mActive = true; - mJob = TDEIO::get( url, false, false ); - connect( mJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); - connect( mJob, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), - this, TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString& ) ) ); - connect( mJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( slotDone() ) ); -} - -void LdapClient::cancelQuery() -{ - if ( mJob ) { - mJob->kill(); - mJob = 0; - } - - mActive = false; -} - -void LdapClient::slotData( TDEIO::Job*, const TQByteArray& data ) -{ -#ifndef NDEBUG // don't create the QString -// TQString str( data ); -// kdDebug(5700) << "LdapClient: Got \"" << str << "\"\n"; -#endif - parseLDIF( data ); -} - -void LdapClient::slotInfoMessage( TDEIO::Job*, const TQString & ) -{ - //tqDebug("Job said \"%s\"", info.latin1()); -} - -void LdapClient::slotDone() -{ - endParseLDIF(); - mActive = false; -#if 0 - for ( TQValueList::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) { - tqDebug( (*it).toString().latin1() ); - } -#endif - int err = mJob->error(); - if ( err && err != TDEIO::ERR_USER_CANCELED ) { - emit error( TDEIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); - } - emit done(); -} - -void LdapClient::startParseLDIF() -{ - mCurrentObject.clear(); - mLastAttrName = 0; - mLastAttrValue = 0; - mIsBase64 = false; - d->ldif.startParsing(); -} - -void LdapClient::endParseLDIF() -{ -} - -void LdapClient::parseLDIF( const TQByteArray& data ) -{ - if ( data.size() ) { - d->ldif.setLDIF( data ); - } else { - d->ldif.endLDIF(); - } - - LDIF::ParseVal ret; - TQString name; - do { - ret = d->ldif.nextItem(); - switch ( ret ) { - case LDIF::Item: - { - name = d->ldif.attr(); - // Must make a copy! TQByteArray is explicitely shared - TQByteArray value = d->ldif.val().copy(); - mCurrentObject.attrs[ name ].append( value ); - break; - } - case LDIF::EndEntry: - mCurrentObject.dn = d->ldif.dn(); - mCurrentObject.client = this; - emit result( mCurrentObject ); - mCurrentObject.clear(); - break; - default: - break; - } - } while ( ret != LDIF::MoreData ); -} - -TQString LdapClient::bindDN() const -{ - return d->bindDN; -} - -TQString LdapClient::pwdBindDN() const -{ - return d->pwdBindDN; -} - -LdapSearch::LdapSearch() - : mActiveClients( 0 ), mNoLDAPLookup( false ) -{ - if ( !KProtocolInfo::isKnownProtocol( KURL("ldap://localhost") ) ) { - mNoLDAPLookup = true; - return; - } - - // stolen from KAddressBook - TDEConfig config( "kabldaprc", true ); - config.setGroup( "LDAP" ); - int numHosts = config.readUnsignedNumEntry( "NumSelectedHosts"); - if ( !numHosts ) { - mNoLDAPLookup = true; - return; - } else { - for ( int j = 0; j < numHosts; j++ ) { - LdapClient* ldapClient = new LdapClient( this ); - - TQString host = config.readEntry( TQString( "SelectedHost%1" ).arg( j ), "" ).stripWhiteSpace(); - if ( !host.isEmpty() ) - ldapClient->setHost( host ); - - TQString port = TQString::number( config.readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) ) ); - if ( !port.isEmpty() ) - ldapClient->setPort( port ); - - TQString base = config.readEntry( TQString( "SelectedBase%1" ).arg( j ), "" ).stripWhiteSpace(); - if ( !base.isEmpty() ) - ldapClient->setBase( base ); - - TQString bindDN = config.readEntry( TQString( "SelectedBind%1" ).arg( j ) ).stripWhiteSpace(); - if ( !bindDN.isEmpty() ) - ldapClient->setBindDN( bindDN ); - - TQString pwdBindDN = config.readEntry( TQString( "SelectedPwdBind%1" ).arg( j ) ); - if ( !pwdBindDN.isEmpty() ) - ldapClient->setPwdBindDN( pwdBindDN ); - - TQStringList attrs; - attrs << "cn" << "mail" << "givenname" << "sn"; - ldapClient->setAttrs( attrs ); - - connect( ldapClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), - this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); - connect( ldapClient, TQT_SIGNAL( done() ), - this, TQT_SLOT( slotLDAPDone() ) ); - connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ), - this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); - - mClients.append( ldapClient ); - } - } - - connect( &mDataTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDataTimer() ) ); -} - -void LdapSearch::startSearch( const TQString& txt ) -{ - if ( mNoLDAPLookup ) - return; - - cancelSearch(); - - int pos = txt.find( '\"' ); - if( pos >= 0 ) - { - ++pos; - int pos2 = txt.find( '\"', pos ); - if( pos2 >= 0 ) - mSearchText = txt.mid( pos , pos2 - pos ); - else - mSearchText = txt.mid( pos ); - } else - mSearchText = txt; - - TQString filter = TQString( "|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*)" ) - .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); - - TQValueList< LdapClient* >::Iterator it; - for ( it = mClients.begin(); it != mClients.end(); ++it ) { - (*it)->startQuery( filter ); - ++mActiveClients; - } -} - -void LdapSearch::cancelSearch() -{ - TQValueList< LdapClient* >::Iterator it; - for ( it = mClients.begin(); it != mClients.end(); ++it ) - (*it)->cancelQuery(); - - mActiveClients = 0; - mResults.clear(); -} - -void LdapSearch::slotLDAPResult( const KABC::LdapObject& obj ) -{ - mResults.append( obj ); - if ( !mDataTimer.isActive() ) - mDataTimer.start( 500, true ); -} - -void LdapSearch::slotLDAPError( const TQString& ) -{ - slotLDAPDone(); -} - -void LdapSearch::slotLDAPDone() -{ - if ( --mActiveClients > 0 ) - return; - - finish(); -} - -void LdapSearch::slotDataTimer() -{ - TQStringList lst; - LdapResultList reslist; - makeSearchData( lst, reslist ); - if ( !lst.isEmpty() ) - emit searchData( lst ); - if ( !reslist.isEmpty() ) - emit searchData( reslist ); -} - -void LdapSearch::finish() -{ - mDataTimer.stop(); - - slotDataTimer(); // emit final bunch of data - emit searchDone(); -} - -void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) -{ - TQString search_text_upper = mSearchText.upper(); - - TQValueList< KABC::LdapObject >::ConstIterator it1; - for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) { - TQString name, mail, givenname, sn; - - LdapAttrMap::ConstIterator it2; - for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) { - TQString tmp = TQString::fromUtf8( (*it2).first(), (*it2).first().size() ); - if ( it2.key() == "cn" ) - name = tmp; // TODO loop? - else if( it2.key() == "mail" ) - mail = tmp; - else if( it2.key() == "givenName" ) - givenname = tmp; - else if( it2.key() == "sn" ) - sn = tmp; - } - - if( mail.isEmpty()) - continue; // nothing, bad entry - else if ( name.isEmpty() ) - ret.append( mail ); - else { - kdDebug(5700) << "<" << name << "><" << mail << ">" << endl; - ret.append( TQString( "%1 <%2>" ).arg( name ).arg( mail ) ); - } - - LdapResult sr; - sr.clientNumber = mClients.findIndex( (*it1).client ); - sr.name = name; - sr.email = mail; - resList.append( sr ); - } - - mResults.clear(); -} - -bool LdapSearch::isAvailable() const -{ - return !mNoLDAPLookup; -} - - - -#include "ldapclient.moc" diff --git a/kabc/ldapclient.h b/kabc/ldapclient.h deleted file mode 100644 index f43a644ce..000000000 --- a/kabc/ldapclient.h +++ /dev/null @@ -1,248 +0,0 @@ -/* kldapclient.h - LDAP access - * Copyright (C) 2002 Klarälvdalens Datakonsult AB - * - * Author: Steffen Hansen - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#ifndef KABC_LDAPCLIENT_H -#define KABC_LDAPCLIENT_H - - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace KABC { - -class LdapClient; -typedef TQValueList LdapAttrValue; -typedef TQMap LdapAttrMap; - -/** - * This class is internal. Binary compatibiliy might be broken any time - * without notification. Do not use it. - * - * We mean it! - * - */ -class KABC_EXPORT LdapObject -{ - public: - LdapObject() - : dn( TQString::null ), client( 0 ) {} - explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {} - LdapObject( const LdapObject& that ) { assign( that ); } - - LdapObject& operator=( const LdapObject& that ) - { - assign( that ); - return *this; - } - - TQString toString() const; - - void clear(); - - TQString dn; - LdapAttrMap attrs; - LdapClient* client; - - protected: - void assign( const LdapObject& that ); - - private: - //class LdapObjectPrivate* d; -}; - -/** - * This class is internal. Binary compatibiliy might be broken any time - * without notification. Do not use it. - * - * We mean it! - * - */ -class KABC_EXPORT LdapClient : public TQObject -{ - Q_OBJECT - - public: - LdapClient( TQObject* parent = 0, const char* name = 0 ); - virtual ~LdapClient(); - - /*! returns true if there is a query running */ - bool isActive() const { return mActive; } - - signals: - /*! Emitted when the query is done */ - void done(); - - /*! Emitted in case of error */ - void error( const TQString& ); - - /*! Emitted once for each object returned - * from the query - */ - void result( const KABC::LdapObject& ); - - public slots: - /*! - * Set the name or IP of the LDAP server - */ - void setHost( const TQString& host ); - TQString host() const { return mHost; } - - /*! - * Set the port of the LDAP server - * if using a nonstandard port - */ - void setPort( const TQString& port ); - TQString port() const { return mPort; } - - /*! - * Set the base DN - */ - void setBase( const TQString& base ); - TQString base() const { return mBase; } - - /*! - * Set the bind DN - */ - void setBindDN( const TQString& bindDN ); - TQString bindDN() const; - - /*! - * Set the bind password DN - */ - void setPwdBindDN( const TQString& pwdBindDN ); - TQString pwdBindDN() const; - - /*! Set the attributes that should be - * returned, or an empty list if - * all attributes are wanted - */ - void setAttrs( const TQStringList& attrs ); - TQStringList attrs() const { return mAttrs; } - - void setScope( const TQString scope ) { mScope = scope; } - - /*! - * Start the query with filter filter - */ - void startQuery( const TQString& filter ); - - /*! - * Abort a running query - */ - void cancelQuery(); - - protected slots: - void slotData( TDEIO::Job*, const TQByteArray &data ); - void slotInfoMessage( TDEIO::Job*, const TQString &info ); - void slotDone(); - - protected: - void startParseLDIF(); - void parseLDIF( const TQByteArray& data ); - void endParseLDIF(); - - TQString mHost; - TQString mPort; - TQString mBase; - TQString mScope; - TQStringList mAttrs; - - TQGuardedPtr mJob; - bool mActive; - - LdapObject mCurrentObject; - TQCString mBuf; - TQCString mLastAttrName; - TQCString mLastAttrValue; - bool mIsBase64; - - private: - class LdapClientPrivate; - LdapClientPrivate* d; -}; - -/** - * Structure describing one result returned by a LDAP query - */ -struct LdapResult { - TQString name; ///< full name - TQString email; ///< email - int clientNumber; ///< for sorting -}; -typedef TQValueList LdapResultList; - - -/** - * This class is internal. Binary compatibiliy might be broken any time - * without notification. Do not use it. - * - * We mean it! - * - */ -class KABC_EXPORT LdapSearch : public TQObject -{ - Q_OBJECT - - public: - LdapSearch(); - - void startSearch( const TQString& txt ); - void cancelSearch(); - bool isAvailable() const; - - signals: - /// Results, assembled as "Full Name " - /// (This signal can be emitted many times) - void searchData( const TQStringList& ); - /// Another form for the results, with separate fields - /// (This signal can be emitted many times) - void searchData( const KABC::LdapResultList& ); - void searchDone(); - - private slots: - void slotLDAPResult( const KABC::LdapObject& ); - void slotLDAPError( const TQString& ); - void slotLDAPDone(); - void slotDataTimer(); - - private: - void finish(); - void makeSearchData( TQStringList& ret, LdapResultList& resList ); - TQValueList< LdapClient* > mClients; - TQString mSearchText; - TQTimer mDataTimer; - int mActiveClients; - bool mNoLDAPLookup; - TQValueList< LdapObject > mResults; - - private: - class LdapSearchPrivate* d; -}; - -} -#endif // KABC_LDAPCLIENT_H diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp deleted file mode 100644 index 5996477a0..000000000 --- a/kabc/ldapconfigwidget.cpp +++ /dev/null @@ -1,626 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ldapconfigwidget.h" -#include "ldapconfigwidget.moc" - -using namespace KABC; - -LdapConfigWidget::LdapConfigWidget( TQWidget* parent, - const char* name, WFlags fl ) : TQWidget( parent, name, fl ) -{ - mProg = 0; - mFlags = 0; - mainLayout = new TQGridLayout( this, 12, 4, 0, - KDialog::spacingHint() ); -} - -LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent, - const char* name, WFlags fl ) : TQWidget( parent, name, fl ) -{ - mFlags = flags; - mProg = 0; - mainLayout = new TQGridLayout( this, 12, 4, 0, - KDialog::spacingHint() ); - initWidget(); -} - -LdapConfigWidget::~LdapConfigWidget() -{ -} - -void LdapConfigWidget::initWidget() -{ - TQLabel *label; - - mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0; - mPort = mVer = mTimeLimit = mSizeLimit = 0; - mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = 0; - mEditButton = mQueryMech = 0; - mMech = 0; - int row = 0; - int col; - - if ( mFlags & W_USER ) { - label = new TQLabel( i18n( "User:" ), this ); - mUser = new KLineEdit( this, "kcfg_ldapuser" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mUser, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_BINDDN ) { - label = new TQLabel( i18n( "Bind DN:" ), this ); - mBindDN = new KLineEdit( this, "kcfg_ldapbinddn" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mBindDN, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_REALM ) { - label = new TQLabel( i18n( "Realm:" ), this ); - mRealm = new KLineEdit( this, "kcfg_ldaprealm" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mRealm, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_PASS ) { - label = new TQLabel( i18n( "Password:" ), this ); - mPassword = new KLineEdit( this, "kcfg_ldappassword" ); - mPassword->setEchoMode( KLineEdit::Password ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mPassword, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_HOST ) { - label = new TQLabel( i18n( "Host:" ), this ); - mHost = new KLineEdit( this, "kcfg_ldaphost" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mHost, row, row, 1, 3 ); - row++; - } - - col = 0; - if ( mFlags & W_PORT ) { - label = new TQLabel( i18n( "Port:" ), this ); - mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" ); - mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mPort->setValue( 389 ); - - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mPort, row, col+1 ); - col += 2; - } - - if ( mFlags & W_VER ) { - label = new TQLabel( i18n( "LDAP version:" ), this ); - mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" ); - mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mVer->setValue( 3 ); - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mVer, row, col+1 ); - } - if ( mFlags & ( W_PORT | W_VER ) ) row++; - - col = 0; - if ( mFlags & W_SIZELIMIT ) { - label = new TQLabel( i18n( "Size limit:" ), this ); - mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" ); - mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mSizeLimit->setValue( 0 ); - mSizeLimit->setSpecialValueText( i18n("Default") ); - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mSizeLimit, row, col+1 ); - col += 2; - } - - if ( mFlags & W_TIMELIMIT ) { - label = new TQLabel( i18n( "Time limit:" ), this ); - mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" ); - mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mTimeLimit->setValue( 0 ); - mTimeLimit->setSuffix( i18n(" sec") ); - mTimeLimit->setSpecialValueText( i18n("Default") ); - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mTimeLimit, row, col+1 ); - } - if ( mFlags & ( W_SIZELIMIT | W_TIMELIMIT ) ) row++; - - if ( mFlags & W_DN ) { - label = new TQLabel( i18n( "Distinguished Name", "DN:" ), this ); - mDn = new KLineEdit( this, "kcfg_ldapdn" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mDn, row, row, 1, 1 ); - //without host query doesn't make sense - if ( mHost ) { - TQPushButton *dnquery = new TQPushButton( i18n( "Query Server" ), this ); - connect( dnquery, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryDNClicked() ) ); - mainLayout->addMultiCellWidget( dnquery, row, row, 2, 3 ); - } - row++; - } - - if ( mFlags & W_FILTER ) { - label = new TQLabel( i18n( "Filter:" ), this ); - mFilter = new KLineEdit( this, "kcfg_ldapfilter" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mFilter, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_SECBOX ) { - TQHButtonGroup *btgroup = new TQHButtonGroup( i18n( "Security" ), this ); - mSecNO = new TQRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" ); - mSecTLS = new TQRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" ); - mSecSSL = new TQRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" ); - mainLayout->addMultiCellWidget( btgroup, row, row, 0, 3 ); - - connect( mSecNO, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); - connect( mSecTLS, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); - connect( mSecSSL, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPSPort( ) ) ); - - mSecNO->setChecked( true ); - row++; - } - - if ( mFlags & W_AUTHBOX ) { - - TQButtonGroup *authbox = - new TQButtonGroup( 3, Qt::Horizontal, i18n( "Authentication" ), this ); - - mAnonymous = new TQRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" ); - mSimple = new TQRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" ); - mSASL = new TQRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" ); - - label = new TQLabel( i18n( "SASL mechanism:" ), authbox ); - mMech = new KComboBox( false, authbox, "kcfg_ldapsaslmech" ); - mMech->setEditable( true ); - mMech->insertItem( "DIGEST-MD5" ); - mMech->insertItem( "GSSAPI" ); - mMech->insertItem( "PLAIN" ); - - //without host query doesn't make sense - if ( mHost ) { - mQueryMech = new TQPushButton( i18n( "Query Server" ), authbox ); - connect( mQueryMech, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryMechClicked() ) ); - } - - mainLayout->addMultiCellWidget( authbox, row, row+1, 0, 3 ); - - connect( mAnonymous, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setAnonymous(int) ) ); - connect( mSimple, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSimple(int) ) ); - connect( mSASL, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSASL(int) ) ); - - mAnonymous->setChecked( true ); - } - -} - -void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d ) -{ - LDIF::ParseVal ret; - - if ( d.size() ) { - mLdif.setLDIF( d ); - } else { - mLdif.endLDIF(); - } - do { - ret = mLdif.nextItem(); - if ( ret == LDIF::Item && mLdif.attr().lower() == mAttr ) { - mProg->progressBar()->advance( 1 ); - mQResult.push_back( TQString::fromUtf8( mLdif.val(), mLdif.val().size() ) ); - } - } while ( ret != LDIF::MoreData ); -} - -void LdapConfigWidget::loadResult( TDEIO::Job* job) -{ - int error = job->error(); - if ( error && error != TDEIO::ERR_USER_CANCELED ) - mErrorMsg = job->errorString(); - else - mErrorMsg = ""; - - mCancelled = false; - mProg->close(); -} - -void LdapConfigWidget::sendQuery() -{ - LDAPUrl _url; - - mQResult.clear(); - mCancelled = true; - - _url.setProtocol( ( mSecSSL && mSecSSL->isChecked() ) ? "ldaps" : "ldap" ); - if ( mHost ) _url.setHost( mHost->text() ); - if ( mPort ) _url.setPort( mPort->value() ); - _url.setDn( "" ); - _url.setAttributes( mAttr ); - _url.setScope( LDAPUrl::Base ); - if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); - if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls", "" ); - - kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl; - mLdif.startParsing(); - TDEIO::Job *job = TDEIO::get( _url, true, false ); - job->addMetaData("no-auth-prompt","true"); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( loadResult( TDEIO::Job* ) ) ); - - if ( mProg == NULL ) - mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); - else - mProg->setLabel( _url.prettyURL() ); - mProg->progressBar()->setValue( 0 ); - mProg->progressBar()->setTotalSteps( 1 ); - mProg->exec(); - if ( mCancelled ) { - kdDebug(5700) << "query cancelled!" << endl; - job->kill( true ); - } else { - if ( !mErrorMsg.isEmpty() ) KMessageBox::error( this, mErrorMsg ); - } -} - -void LdapConfigWidget::mQueryMechClicked() -{ - mAttr = "supportedsaslmechanisms"; - sendQuery(); - if ( !mQResult.isEmpty() ) { - mQResult.sort(); - mMech->clear(); - mMech->insertStringList( mQResult ); - } -} - -void LdapConfigWidget::mQueryDNClicked() -{ - mAttr = "namingcontexts"; - sendQuery(); - if ( !mQResult.isEmpty() ) mDn->setText( mQResult.first() ); -} - -void LdapConfigWidget::setAnonymous( int state ) -{ - if ( state == TQButton::Off ) return; - if ( mUser ) mUser->setEnabled(false); - if ( mPassword ) mPassword->setEnabled(false); - if ( mBindDN ) mBindDN->setEnabled(false); - if ( mRealm ) mRealm->setEnabled(false); - if ( mMech ) mMech->setEnabled(false); - if ( mQueryMech ) mQueryMech->setEnabled(false); -} - -void LdapConfigWidget::setSimple( int state ) -{ - if ( state == TQButton::Off ) return; - if ( mUser ) mUser->setEnabled(true); - if ( mPassword ) mPassword->setEnabled(true); - if ( mBindDN ) mBindDN->setEnabled(false); - if ( mRealm ) mRealm->setEnabled(false); - if ( mMech ) mMech->setEnabled(false); - if ( mQueryMech ) mQueryMech->setEnabled(false); -} - -void LdapConfigWidget::setSASL( int state ) -{ - if ( state == TQButton::Off ) return; - if ( mUser ) mUser->setEnabled(true); - if ( mPassword ) mPassword->setEnabled(true); - if ( mBindDN ) mBindDN->setEnabled(true); - if ( mRealm ) mRealm->setEnabled(true); - if ( mMech ) mMech->setEnabled(true); - if ( mQueryMech ) mQueryMech->setEnabled(true); -} - -void LdapConfigWidget::setLDAPPort() -{ - mPort->setValue( 389 ); -} - -void LdapConfigWidget::setLDAPSPort() -{ - mPort->setValue( 636 ); -} - - -LDAPUrl LdapConfigWidget::url() const -{ - LDAPUrl _url; - if ( mSecSSL && mSecSSL->isChecked() ) - _url.setProtocol( "ldaps" ); - else - _url.setProtocol( "ldap" ); - - if ( mUser ) _url.setUser( mUser->text() ); - if ( mPassword ) _url.setPass( mPassword->text() ); - if ( mHost ) _url.setHost( mHost->text() ); - if ( mPort ) _url.setPort( mPort->value() ); - if ( mDn ) _url.setDn( mDn->text() ); - if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); - if ( mSizeLimit && mSizeLimit->value() != 0 ) - _url.setExtension( "x-sizelimit", TQString::number( mSizeLimit->value() ) ); - if ( mTimeLimit && mTimeLimit->value() != 0 ) - _url.setExtension( "x-timelimit", TQString::number( mTimeLimit->value() ) ); - if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls","" ); - if ( mFilter && !mFilter->text().isEmpty() ) - _url.setFilter( mFilter->text() ); - if ( mSASL && mSASL->isChecked() ) { - _url.setExtension( "x-sasl", "" ); - _url.setExtension( "x-mech", mMech->currentText() ); - if ( mBindDN && !mBindDN->text().isEmpty() ) - _url.setExtension( "bindname", mBindDN->text() ); - if ( mRealm && !mRealm->text().isEmpty() ) - _url.setExtension( "x-realm", mRealm->text() ); - } - return ( _url ); -} - -void LdapConfigWidget::setUser( const TQString &user ) -{ - if ( mUser ) mUser->setText( user ); -} - -TQString LdapConfigWidget::user() const -{ - return ( mUser ? mUser->text() : TQString::null ); -} - -void LdapConfigWidget::setPassword( const TQString &password ) -{ - if ( mPassword ) mPassword->setText( password ); -} - -TQString LdapConfigWidget::password() const -{ - return ( mPassword ? mPassword->text() : TQString::null ); -} - -void LdapConfigWidget::setBindDN( const TQString &binddn ) -{ - if ( mBindDN ) mBindDN->setText( binddn ); -} - -TQString LdapConfigWidget::bindDN() const -{ - return ( mBindDN ? mBindDN->text() : TQString::null ); -} - -void LdapConfigWidget::setRealm( const TQString &realm ) -{ - if ( mRealm ) mRealm->setText( realm ); -} - -TQString LdapConfigWidget::realm() const -{ - return ( mRealm ? mRealm->text() : TQString::null ); -} - -void LdapConfigWidget::setHost( const TQString &host ) -{ - if ( mHost ) mHost->setText( host ); -} - -TQString LdapConfigWidget::host() const -{ - return ( mHost ? mHost->text() : TQString::null ); -} - -void LdapConfigWidget::setPort( int port ) -{ - if ( mPort ) mPort->setValue( port ); -} - -int LdapConfigWidget::port() const -{ - return ( mPort ? mPort->value() : 389 ); -} - -void LdapConfigWidget::setVer( int ver ) -{ - if ( mVer ) mVer->setValue( ver ); -} - -int LdapConfigWidget::ver() const -{ - return ( mVer ? mVer->value() : 3 ); -} - -void LdapConfigWidget::setDn( const TQString &dn ) -{ - if ( mDn ) mDn->setText( dn ); -} - -TQString LdapConfigWidget::dn() const -{ - return ( mDn ? mDn->text() : TQString::null ); -} - -void LdapConfigWidget::setFilter( const TQString &filter ) -{ - if ( mFilter ) mFilter->setText( filter ); -} - -TQString LdapConfigWidget::filter() const -{ - return ( mFilter ? mFilter->text() : TQString::null ); -} - -void LdapConfigWidget::setMech( const TQString &mech ) -{ - if ( mMech == 0 ) return; - if ( !mech.isEmpty() ) { - int i = 0; - while ( i < mMech->count() ) { - if ( mMech->text( i ) == mech ) break; - i++; - } - if ( i == mMech->count() ) mMech->insertItem( mech ); - mMech->setCurrentItem( i ); - } -} - -TQString LdapConfigWidget::mech() const -{ - return ( mMech ? mMech->currentText() : TQString::null ); -} - -void LdapConfigWidget::setSecNO( bool b ) -{ - if ( mSecNO ) mSecNO->setChecked( b ); -} - -bool LdapConfigWidget::isSecNO() const -{ - return ( mSecNO ? mSecNO->isChecked() : true ); -} - -void LdapConfigWidget::setSecTLS( bool b ) -{ - if ( mSecTLS ) mSecTLS->setChecked( b ); -} - -bool LdapConfigWidget::isSecTLS() const -{ - return ( mSecTLS ? mSecTLS->isChecked() : false ); -} - -void LdapConfigWidget::setSecSSL( bool b ) -{ - if ( mSecSSL ) mSecSSL->setChecked( b ); -} - -bool LdapConfigWidget::isSecSSL() const -{ - return ( mSecSSL ? mSecSSL->isChecked() : false ); -} - -void LdapConfigWidget::setAuthAnon( bool b ) -{ - if ( mAnonymous ) mAnonymous->setChecked( b ); -} - -bool LdapConfigWidget::isAuthAnon() const -{ - return ( mAnonymous ? mAnonymous->isChecked() : true ); -} - -void LdapConfigWidget::setAuthSimple( bool b ) -{ - if ( mSimple ) mSimple->setChecked( b ); -} - -bool LdapConfigWidget::isAuthSimple() const -{ - return ( mSimple ? mSimple->isChecked() : false ); -} - -void LdapConfigWidget::setAuthSASL( bool b ) -{ - if ( mSASL ) mSASL->setChecked( b ); -} - -bool LdapConfigWidget::isAuthSASL() const -{ - return ( mSASL ? mSASL->isChecked() : false ); -} - -void LdapConfigWidget::setSizeLimit( int sizelimit ) -{ - if ( mSizeLimit ) mSizeLimit->setValue( sizelimit ); -} - -int LdapConfigWidget::sizeLimit() const -{ - return ( mSizeLimit ? mSizeLimit->value() : 0 ); -} - -void LdapConfigWidget::setTimeLimit( int timelimit ) -{ - if ( mTimeLimit ) mTimeLimit->setValue( timelimit ); -} - -int LdapConfigWidget::timeLimit() const -{ - return ( mTimeLimit ? mTimeLimit->value() : 0 ); -} - -int LdapConfigWidget::flags() const -{ - return mFlags; -} - -void LdapConfigWidget::setFlags( int flags ) -{ - mFlags = flags; - - // First delete all the child widgets. - // FIXME: I hope it's correct - const TQObjectList ch = childrenListObject(); - TQObjectList ch2 = ch; - TQObject *obj; - TQWidget *widget; - - obj = ch2.first(); - while ( obj != 0 ) { - widget = dynamic_cast (obj); - if ( widget && TQT_BASE_OBJECT(widget->parent()) == TQT_BASE_OBJECT(this) ) { - mainLayout->remove( widget ); - delete ( widget ); - } - obj = ch2.next(); - } - // Re-create child widgets according to the new flags - initWidget(); -} diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h deleted file mode 100644 index 01074292e..000000000 --- a/kabc/ldapconfigwidget.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef LDAPCONFIGWIDGET_H -#define LDAPCONFIGWIDGET_H - -#include -#include -#include - -#include -#include -#include - -class TQGridLayout; -class TQSpinBox; -class TQPushButton; -class TQCheckBox; -class TQRadioButton; -class KComboBox; -class KLineEdit; -class KProgressDialog; - -namespace KABC { - - /** - @short LDAP Configuration widget - - This class can be used to query the user for LDAP connection parameters. - It's TDEConfigXT compatible, using widget names starting with kcfg_ - */ - - class KABC_EXPORT LdapConfigWidget : public TQWidget - { - Q_OBJECT - - TQ_PROPERTY( LCW_Flags flags READ flagsProp WRITE setFlagsProp ) - TQ_PROPERTY( TQString user READ user WRITE setUser ) - TQ_PROPERTY( TQString password READ password WRITE setPassword ) - TQ_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN ) - TQ_PROPERTY( TQString realm READ realm WRITE setRealm ) - TQ_PROPERTY( TQString host READ host WRITE setHost ) - TQ_PROPERTY( int port READ port WRITE setPort ) - TQ_PROPERTY( int ver READ ver WRITE setVer ) - TQ_PROPERTY( TQString dn READ dn WRITE setDn ) - TQ_PROPERTY( TQString filter READ filter WRITE setFilter ) - TQ_PROPERTY( TQString mech READ mech WRITE setMech ) - TQ_PROPERTY( bool secNO READ isSecNO WRITE setSecNO ) - TQ_PROPERTY( bool secSSL READ isSecSSL WRITE setSecSSL ) - TQ_PROPERTY( bool secTLS READ isSecSSL WRITE setSecTLS ) - TQ_PROPERTY( bool authAnon READ isAuthAnon WRITE setAuthAnon ) - TQ_PROPERTY( bool authSimple READ isAuthSimple WRITE setAuthSimple ) - TQ_PROPERTY( bool authSASL READ isAuthSASL WRITE setAuthSASL ) - TQ_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit ) - TQ_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit ) - TQ_SETS ( LCW_Flags ) - - public: - - enum LCW_Flags { - W_USER = 0x1, - W_PASS = 0x2, - W_BINDDN = 0x4, - W_REALM = 0x8, - W_HOST = 0x10, - W_PORT = 0x20, - W_VER = 0x40, - W_DN = 0x80, - W_FILTER = 0x100, - W_SECBOX = 0x400, - W_AUTHBOX = 0x800, - W_TIMELIMIT = 0x1000, - W_SIZELIMIT = 0x2000, - W_ALL = 0xFFFFFFF - }; - - /** Constructs an empty configuration widget. - * You need to call setFlags() after this. - */ - LdapConfigWidget( TQWidget* parent = 0, - const char* name = 0, WFlags fl = 0 ); - /** Constructs a configuration widget */ - LdapConfigWidget( int flags, TQWidget* parent = 0, - const char* name = 0, WFlags fl = 0 ); - /** Destructs a configuration widget */ - virtual ~LdapConfigWidget(); - - /** Sets the user name. Kconfig widget name: kcfg_ldapuser */ - void setUser( const TQString &user ); - /** Gets the user name. Kconfig widget name: kcfg_ldapuser */ - TQString user() const; - - /** Sets the password. Kconfig widget name: kcfg_ldappassword */ - void setPassword( const TQString &password ); - /** Gets the password. Kconfig widget name: kcfg_ldappassword */ - TQString password() const; - - /** - * Sets the bind dn. Useful for SASL proxy auth. - * Kconfig widget name: kcfg_ldapbinddn - */ - void setBindDN( const TQString &binddn ); - /** Gets the bind dn. Kconfig widget name: kcfg_ldapbinddn*/ - TQString bindDN() const; - - /** Sets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ - void setRealm( const TQString &realm ); - /** Gets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ - TQString realm() const; - - /** Sets the host name. Kconfig widget name: kcfg_ldaphost */ - void setHost( const TQString &host ); - /** Gets the host name. Kconfig widget name: kcfg_ldaphost */ - TQString host() const; - - /** Sets the LDAP port. Kconfig widget name: kcfg_ldapport */ - void setPort( int port ); - /** Gets the LDAP port. Kconfig widget name: kcfg_ldapport */ - int port() const; - - /** Sets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ - void setVer( int ver ); - /** Gets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ - int ver() const; - - /** Sets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ - void setDn( const TQString &dn ); - /** Gets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ - TQString dn() const; - - /** Sets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ - void setFilter( const TQString &filter ); - /** Gets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ - TQString filter() const; - - /** Sets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ - void setMech( const TQString &mech ); - /** Gets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ - TQString mech() const; - - /** - * Sets the configuration to no transport security. - * Kconfig widget name: kcfg_ldapnosec - */ - void setSecNO( bool b = true ); - /** - * Returns true if no transport security selected. - * Kconfig widget name: kcfg_ldapnosec - */ - bool isSecNO() const; - - /** - * Sets the configuration to TLS. - * Kconfig widget name: kcfg_ldaptls - */ - void setSecTLS( bool b = true ); - /** - * Returns true if TLS selected. - * Kconfig widget name: kcfg_ldaptls - */ - bool isSecTLS() const; - - /** - * Sets the configuration to SSL. - * Kconfig widget name: kcfg_ldapssl - */ - void setSecSSL( bool b = true ); - /** - * Returns true if SSL selected. - * Kconfig widget name: kcfg_ldapssl - */ - bool isSecSSL() const; - - /** - * Sets the authentication to anonymous. - * Kconfig widget name: kcfg_ldapanon - */ - void setAuthAnon( bool b = true ); - /** - * Returns true if Anonymous authentication selected. - * Kconfig widget name: kcfg_ldapanon - */ - bool isAuthAnon() const; - - /** - * Sets the authentication to simple. - * Kconfig widget name: kcfg_ldapsimple - */ - void setAuthSimple( bool b = true ); - /** - * Returns true if Simple authentication selected. - * Kconfig widget name: kcfg_ldapsimple - */ - bool isAuthSimple() const; - - /** - * Sets the authentication to SASL. - * Kconfig widget name: kcfg_ldapsasl - */ - void setAuthSASL( bool b = true ); - /** - * Returns true if SASL authentication selected. - * Kconfig widget name: kcfg_ldapsasl - */ - bool isAuthSASL() const; - - /** - * Sets the size limit. - * TDEConfig widget name: kcfg_ldapsizelimit - */ - void setSizeLimit( int sizelimit ); - /** - * Returns the size limit. - * TDEConfig widget name: kcfg_ldapsizelimit - */ - int sizeLimit() const; - - /** - * Sets the time limit. - * TDEConfig widget name: kcfg_ldaptimelimit - */ - void setTimeLimit( int timelimit ); - /** - * Returns the time limit. - * TDEConfig widget name: kcfg_ldaptimelimit - */ - int timeLimit() const; - - int flags() const; - void setFlags( int flags ); - inline LCW_Flags flagsProp() const { return (LCW_Flags)flags(); } - inline void setFlagsProp( LCW_Flags flags ) { setFlags((int)flags); } - - /** - * Returns a LDAP Url constructed from the settings given. - * Extensions are filled for use in the LDAP ioslave - */ - KABC::LDAPUrl url() const; - - private slots: - void setLDAPPort(); - void setLDAPSPort(); - void setAnonymous( int state ); - void setSimple( int state ); - void setSASL( int state ); - void mQueryDNClicked(); - void mQueryMechClicked(); - void loadData( TDEIO::Job*, const TQByteArray& ); - void loadResult( TDEIO::Job* ); - private: - - int mFlags; - LDIF mLdif; - TQStringList mQResult; - TQString mAttr; - - KLineEdit *mUser; - KLineEdit *mPassword; - KLineEdit *mHost; - TQSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit; - KLineEdit *mDn, *mBindDN, *mRealm; - KLineEdit *mFilter; - TQRadioButton *mAnonymous,*mSimple,*mSASL; - TQCheckBox *mSubTree; - TQPushButton *mEditButton; - TQPushButton *mQueryMech; - TQRadioButton *mSecNO,*mSecTLS,*mSecSSL; - KComboBox *mMech; - - TQString mErrorMsg; - bool mCancelled; - KProgressDialog *mProg; - - TQGridLayout *mainLayout; - class LDAPConfigWidgetPrivate; - LDAPConfigWidgetPrivate *d; - - void sendQuery(); - void initWidget(); - }; -} - -#endif diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp deleted file mode 100644 index 9032c16d3..000000000 --- a/kabc/ldapurl.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "ldapurl.h" - -using namespace KABC; - -LDAPUrl::LDAPUrl() -{ - m_scope = Base; -} - -LDAPUrl::LDAPUrl(const KURL &_url) - : KURL(_url), m_extensions() -{ - m_dn = path(); - if ( !TQDir::isRelativePath(m_dn) ) -#ifdef Q_WS_WIN - m_dn.remove(0,3); // e.g. "c:/" -#else - m_dn.remove(0,1); -#endif - parseQuery(); -} - -void LDAPUrl::setDn( const TQString &dn) -{ - m_dn = dn; - if ( !TQDir::isRelativePath(m_dn) ) -#ifdef Q_WS_WIN - m_dn.remove(0,3); // e.g. "c:/" -#else - m_dn.remove(0,1); -#endif - setPath(m_dn); -} - -bool LDAPUrl::hasExtension( const TQString &key ) const -{ - return m_extensions.contains( key ); -} - -LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const -{ - TQMap::const_iterator it; - - it = m_extensions.find( key ); - if ( it != m_extensions.constEnd() ) - return (*it); - else { - Extension ext; - ext.value = ""; - ext.critical = false; - return ext; - } -} - -TQString LDAPUrl::extension( const TQString &key, bool &critical ) const -{ - Extension ext; - - ext = extension( key ); - critical = ext.critical; - return ext.value; -} - -void LDAPUrl::setExtension( const TQString &key, const LDAPUrl::Extension &ext ) -{ - m_extensions[ key ] = ext; - updateQuery(); -} - -void LDAPUrl::setExtension( const TQString &key, const TQString &value, bool critical ) -{ - Extension ext; - ext.value = value; - ext.critical = critical; - setExtension( key, ext ); -} - -void LDAPUrl::removeExtension( const TQString &key ) -{ - m_extensions.remove( key ); - updateQuery(); -} - -void LDAPUrl::updateQuery() -{ - Extension ext; - TQMap::iterator it; - TQString q = "?"; - - // set the attributes to query - if ( m_attributes.count() > 0 ) q += m_attributes.join(","); - - // set the scope - q += "?"; - switch( m_scope ) { - case Sub: - q += "sub"; - break; - case One: - q += "one"; - break; - case Base: - q += "base"; - break; - } - - // set the filter - q += "?"; - if ( m_filter != "(objectClass=*)" && !m_filter.isEmpty() ) - q += m_filter; - - // set the extensions - q += "?"; - for ( it = m_extensions.begin(); it != m_extensions.end(); ++it ) { - if ( it.data().critical ) q += "!"; - q += it.key(); - if ( !it.data().value.isEmpty() ) - q += "=" + it.data().value; - q += ","; - } - while ( q.endsWith("?") || q.endsWith(",") ) - q.remove( q.length() - 1, 1 ); - - setQuery(q); - kdDebug(5700) << "LDAP URL updateQuery(): " << prettyURL() << endl; -} - -void LDAPUrl::parseQuery() -{ - Extension ext; - TQStringList extensions; - TQString q = query(); - // remove first ? - if (q.startsWith("?")) - q.remove(0,1); - - // split into a list - TQStringList url_items = TQStringList::split("?", q, true); - - m_attributes.clear(); - m_scope = Base; - m_filter = "(objectClass=*)"; - m_extensions.clear(); - - int i = 0; - for ( TQStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) { - switch (i) { - case 0: - m_attributes = TQStringList::split(",", (*it), false); - break; - case 1: - if ( (*it) == "sub" ) m_scope = Sub; else - if ( (*it) == "one") m_scope = One; - break; - case 2: - m_filter = decode_string( *it ); - break; - case 3: - extensions = TQStringList::split(",", (*it), false); - break; - } - } - - TQString name,value; - for ( TQStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) { - ext.critical = false; - name = decode_string( (*it).section('=',0,0) ).lower(); - value = decode_string( (*it).section('=',1) ); - if ( name.startsWith("!") ) { - ext.critical = true; - name.remove(0, 1); - } - kdDebug(5700) << "LDAPUrl extensions name= " << name << " value: " << value << endl; - ext.value = value.replace( "%2", "," ); - setExtension( name, ext ); - } -} diff --git a/kabc/ldapurl.h b/kabc/ldapurl.h deleted file mode 100644 index 0c2693758..000000000 --- a/kabc/ldapurl.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _K_LDAPURL_H_ -#define _K_LDAPURL_H_ - -#include -#include -#include - -#include - -namespace KABC { - -/** - * LDAPUrl - - * LDAPUrl implements an RFC 2255 compliant LDAP Url parser, with minimal - * differences. LDAP Urls implemented by this class has the following format: - * ldap[s]://[user[:password]@]hostname[:port]["/" [dn ["?" [attributes] - * ["?" [scope] ["?" [filter] ["?" extensions]]]]]] - */ - - - class KABC_EXPORT LDAPUrl : public KURL - { - public: - - struct Extension { - TQString value; - bool critical; - }; - - typedef enum Scope { Base, One, Sub }; - - /** Constructs an empty KLDAPUrl. */ - LDAPUrl(); - /** Constructs a KLDAPUrl from a KURL. */ - LDAPUrl( const KURL &url ); - - /** - * Returns the dn part of the LDAP Url (same as path(), but slash removed - * from the beginning). - */ - const TQString& dn() const { return m_dn; } - /** Sets the the dn part of the LDAP Url. */ - void setDn( const TQString &dn ); - - /** Returns the attributes part of the LDAP Url */ - const TQStringList &attributes() { return m_attributes; } - /** Sets the attributes part of the LDAP Url */ - void setAttributes( const TQStringList &attributes ) - { m_attributes=attributes; updateQuery(); } - - /** Returns the scope part of the LDAP Url */ - Scope scope() const { return m_scope; } - /** Sets the scope part of the LDAP Url */ - void setScope(Scope scope) { m_scope = scope; updateQuery(); } - - /** Returns the filter part of the LDAP Url */ - const TQString &filter() const { return m_filter; } - /** Sets the filter part of the LDAP Url */ - void setFilter( TQString filter ) { m_filter = filter; updateQuery(); } - - /** Returns if the specified extension exists in the LDAP Url */ - bool hasExtension( const TQString &key ) const; - /** Returns the specified extension */ - Extension extension( const TQString &key ) const; - /** Returns the specified extension */ - TQString extension( const TQString &key, bool &critical ) const; - /** Sets the specified extension key with the value and criticality in ext */ - void setExtension( const TQString &key, const Extension &ext ); - /** Sets the specified extension key with the value and criticality specified */ - void setExtension( const TQString &key, const TQString &value, bool critical = false ); - /** Removes the specified extension */ - void removeExtension( const TQString &key ); - /** Updates the query component from the attributes, scope, filter and extensions */ - void updateQuery(); - - protected: - void parseQuery(); - - private: - - TQMap m_extensions; - TQString m_dn; - TQStringList m_attributes; - Scope m_scope; - TQString m_filter; - }; -} - -#endif diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp deleted file mode 100644 index 408f5223f..000000000 --- a/kabc/ldif.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "ldif.h" - -using namespace KABC; - -LDIF::LDIF() -{ - startParsing(); -} - -LDIF::~LDIF() -{ -} - -TQCString LDIF::assembleLine( const TQString &fieldname, const TQByteArray &value, - uint linelen, bool url ) -{ - bool safe = false; - bool isDn; - TQCString result; - uint i; - - if ( url ) { - result = fieldname.utf8() + ":< " + TQCString( value.data(), value.size()+1 ); - } else { - isDn = fieldname.lower() == "dn"; - //SAFE-INIT-CHAR - if ( value.size() > 0 && value[0] > 0 && value[0] != '\n' && - value[0] != '\r' && value[0] != ':' && value[0] != '<' ) safe = true; - - //SAFE-CHAR - if ( safe ) { - for ( i=1; i < value.size(); i++ ) { - //allow utf-8 in Distinguished Names - if ( ( isDn && value[i] == 0 ) || - ( !isDn && value[i] <= 0 ) || - value[i] == '\r' || value[i] == '\n' ) { - safe = false; - break; - } - } - } - - if ( value.size() == 0 ) safe = true; - - if( safe ) { - result = fieldname.utf8() + ": " + TQCString( value.data(), value.size()+1 ); - } else { - result = fieldname.utf8() + ":: " + KCodecs::base64Encode( value, false ); - } - - if ( linelen > 0 ) { - i = (fieldname.length()+2) > linelen ? fieldname.length()+2 : linelen; - while ( i < result.length() ) { - result.insert( i, "\n " ); - i += linelen+2; - } - } - } - return result; -} - -TQCString LDIF::assembleLine( const TQString &fieldname, const TQCString &value, - uint linelen, bool url ) -{ - TQCString ret; - TQByteArray tmp; - uint valuelen = value.length(); - const char *data = value.data(); - - tmp.setRawData( data, valuelen ); - ret = assembleLine( fieldname, tmp, linelen, url ); - tmp.resetRawData( data, valuelen ); - return ret; - -} - -TQCString LDIF::assembleLine( const TQString &fieldname, const TQString &value, - uint linelen, bool url ) -{ - return assembleLine( fieldname, value.utf8(), linelen, url ); -} - -bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ) -{ - int position; - TQByteArray tmp; - int linelen; - const char *data; - -// kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl; - - position = line.find( ":" ); - if ( position == -1 ) { - // strange: we did not find a fieldname - fieldname = ""; - TQCString str; - str = line.stripWhiteSpace(); - linelen = str.length(); - data = str.data(); - tmp.setRawData( data, linelen ); - value = tmp.copy(); - tmp.resetRawData( data, linelen ); -// kdDebug(5700) << "value : " << value[0] << endl; - return false; - } - - linelen = line.length(); - - if ( linelen > ( position + 1 ) && line[ position + 1 ] == ':' ) { - // String is BASE64 encoded -> decode it now. - fieldname = TQString::fromUtf8( - line.left( position ).stripWhiteSpace() ); - if ( linelen <= ( position + 3 ) ) { - value.resize( 0 ); - return false; - } - data = &line.data()[ position + 3 ]; - tmp.setRawData( data, linelen - position - 3 ); - KCodecs::base64Decode( tmp, value ); - tmp.resetRawData( data, linelen - position - 3 ); - return false; - } - - if ( linelen > ( position + 1 ) && line[ position + 1 ] == '<' ) { - // String is an URL. - fieldname = TQString::fromUtf8( - line.left( position ).stripWhiteSpace() ); - if ( linelen <= ( position + 3 ) ) { - value.resize( 0 ); - return false; - } - data = &line.data()[ position + 3]; - tmp.setRawData( data, linelen - position - 3 ); - value = tmp.copy(); - tmp.resetRawData( data, linelen - position - 3 ); - return true; - } - - fieldname = TQString::fromUtf8(line.left( position ).stripWhiteSpace()); - if ( linelen <= ( position + 2 ) ) { - value.resize( 0 ); - return false; - } - data = &line.data()[ position + 2 ]; - tmp.setRawData( data, linelen - position - 2 ); - value = tmp.copy(); - tmp.resetRawData( data, linelen - position - 2 ); - return false; -} - -bool LDIF::splitControl( const TQCString &line, TQString &oid, bool &critical, - TQByteArray &value ) -{ - TQString tmp; - critical = false; - bool url = splitLine( line, tmp, value ); - - kdDebug(5700) << "splitControl: value: " << TQString(TQString::fromUtf8(value, value.size())) << endl; - if ( tmp.isEmpty() ) { - tmp = TQString::fromUtf8( value, value.size() ); - value.resize( 0 ); - } - if ( tmp.right( 4 ) == "true" ) { - critical = true; - tmp.truncate( tmp.length() - 5 ); - } else if ( tmp.right( 5 ) == "false" ) { - critical = false; - tmp.truncate( tmp.length() - 6 ); - } - oid = tmp; - return url; -} - -LDIF::ParseVal LDIF::processLine() -{ - - if ( mIsComment ) return None; - - ParseVal retval = None; - if ( mLastParseVal == EndEntry ) mEntryType = Entry_None; - - mUrl = splitLine( line, mAttr, mVal ); - - TQString attrLower = mAttr.lower(); - - switch ( mEntryType ) { - case Entry_None: - if ( attrLower == "version" ) { - if ( !mDn.isEmpty() ) retval = Err; - } else if ( attrLower == "dn" ) { - kdDebug(5700) << "ldapentry dn: " << TQString(TQString::fromUtf8( mVal, mVal.size() )) << endl; - mDn = TQString::fromUtf8( mVal, mVal.size() ); - mModType = Mod_None; - retval = NewEntry; - } else if ( attrLower == "changetype" ) { - if ( mDn.isEmpty() ) - retval = Err; - else { - TQString tmpval = TQString::fromUtf8( mVal, mVal.size() ); - kdDebug(5700) << "changetype: " << tmpval << endl; - if ( tmpval == "add" ) mEntryType = Entry_Add; - else if ( tmpval == "delete" ) mEntryType = Entry_Del; - else if ( tmpval == "modrdn" || tmpval == "moddn" ) { - mNewRdn = ""; - mNewSuperior = ""; - mDelOldRdn = true; - mEntryType = Entry_Modrdn; - } - else if ( tmpval == "modify" ) mEntryType = Entry_Mod; - else retval = Err; - } - } else if ( attrLower == "control" ) { - mUrl = splitControl( TQCString( mVal, mVal.size() + 1 ), mOid, mCritical, mVal ); - retval = Control; - } else if ( !mAttr.isEmpty() && mVal.size() > 0 ) { - mEntryType = Entry_Add; - retval = Item; - } - break; - case Entry_Add: - if ( mAttr.isEmpty() && mVal.size() == 0 ) - retval = EndEntry; - else - retval = Item; - break; - case Entry_Del: - if ( mAttr.isEmpty() && mVal.size() == 0 ) - retval = EndEntry; - else - retval = Err; - break; - case Entry_Mod: - if ( mModType == Mod_None ) { - kdDebug(5700) << "tdeio_ldap: new modtype " << mAttr << endl; - if ( mAttr.isEmpty() && mVal.size() == 0 ) { - retval = EndEntry; - } else if ( attrLower == "add" ) { - mModType = Mod_Add; - } else if ( attrLower == "replace" ) { - mModType = Mod_Replace; - mAttr = TQString::fromUtf8( mVal, mVal.size() ); - mVal.resize( 0 ); - retval = Item; - } else if ( attrLower == "delete" ) { - mModType = Mod_Del; - mAttr = TQString::fromUtf8( mVal, mVal.size() ); - mVal.resize( 0 ); - retval = Item; - } else { - retval = Err; - } - } else { - if ( mAttr.isEmpty() ) { - if ( TQString::fromUtf8( mVal, mVal.size() ) == "-" ) { - mModType = Mod_None; - } else if ( mVal.size() == 0 ) { - retval = EndEntry; - } else - retval = Err; - } else - retval = Item; - } - break; - case Entry_Modrdn: - if ( mAttr.isEmpty() && mVal.size() == 0 ) - retval = EndEntry; - else if ( attrLower == "newrdn" ) - mNewRdn = TQString::fromUtf8( mVal, mVal.size() ); - else if ( attrLower == "newsuperior" ) - mNewSuperior = TQString::fromUtf8( mVal, mVal.size() ); - else if ( attrLower == "deleteoldrdn" ) { - if ( mVal.size() > 0 && mVal[0] == '0' ) - mDelOldRdn = false; - else if ( mVal.size() > 0 && mVal[0] == '1' ) - mDelOldRdn = true; - else - retval = Err; - } else - retval = Err; - break; - } - return retval; -} - -LDIF::ParseVal LDIF::nextItem() -{ - ParseVal retval = None; - char c=0; - - while( retval == None ) { - if ( mPos < mLdif.size() ) { - c = mLdif[mPos]; - mPos++; - if ( mIsNewLine && c == '\r' ) continue; //handle \n\r line end - if ( mIsNewLine && ( c == ' ' || c == '\t' ) ) { //line folding - mIsNewLine = false; - continue; - } - if ( mIsNewLine ) { - mIsNewLine = false; - retval = processLine(); - mLastParseVal = retval; - line.resize( 0 ); - mIsComment = ( c == '#' ); - } - if ( c == '\n' || c == '\r' ) { - mLineNo++; - mIsNewLine = true; - continue; - } - } else { - retval = MoreData; - break; - } - - if ( !mIsComment ) line += c; - } - return retval; -} - -void LDIF::endLDIF() -{ - TQByteArray tmp( 3 ); - tmp[ 0 ] = '\n'; - tmp[ 1 ] = '\n'; - tmp[ 2 ] = '\n'; - mLdif = tmp; - mPos = 0; -} - -void LDIF::startParsing() -{ - mPos = mLineNo = 0; - mDelOldRdn = false; - mEntryType = Entry_None; - mModType = Mod_None; - mDn = mNewRdn = mNewSuperior = ""; - line = ""; - mIsNewLine = false; - mIsComment = false; - mLastParseVal = None; -} diff --git a/kabc/ldif.h b/kabc/ldif.h deleted file mode 100644 index f4da5f4f3..000000000 --- a/kabc/ldif.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi Gyorgy - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _K_LDIF_H_ -#define _K_LDIF_H_ - -#include -#include -#include - -#include - -namespace KABC { - - /** - * LDIF - - * LDIF implements an RFC 2849 compliant LDIF parser. LDIF files are used to - * represent directory information on LDAP-based servers, or to describe a set - * of changes which are to be applied to a directory. - */ - - class KABC_EXPORT LDIF - { - public: - - enum ParseVal{ None, NewEntry, EndEntry, Item, Control, Err, MoreData }; - enum EntryType{ Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn }; - enum ModType{ Mod_None, Mod_Add, Mod_Replace, Mod_Del }; - LDIF(); - virtual ~LDIF(); - - /** - * Assembles fieldname and value into a valid LDIF line, BASE64 encodes the - * value if neccessary and optionally splits into more lines. - * @param fieldname The name of the entry. - * @param value The value of the entry. - * @param linelen Maximum length of the lines in the result. - * @param url If true, encode value as url ( use :< ). - */ - static TQCString assembleLine( const TQString &fieldname, - const TQByteArray &value, uint linelen=0, bool url=false ); - /** - * This is the same as the above function, the only difference that - * this accepts TQCString as the value. - */ - static TQCString assembleLine( const TQString &fieldname, - const TQCString &value, uint linelen=0, bool url=false ); - /** - * This is the same as the above function, the only difference that - * this accepts TQString as the value. - */ - static TQCString assembleLine( const TQString &fieldname, - const TQString &value, uint linelen=0, bool url=false ); - - /** - * Splits one line from an LDIF file to attribute and value components. - * @returns true if value is an URL, false otherwise - */ - static bool splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ); - /** - * Splits a control specification (without the "control:" directive) - * @param line is the control directive - * @param oid will contain the OID - * @param critical will contain the criticality of control - * @param value is the control value - */ - static bool splitControl( const TQCString &line, TQString &oid, bool &critical, - TQByteArray &value ); - /** - * Starts the parsing of a new LDIF - */ - void startParsing(); - /** - * Process one LDIF line - */ - ParseVal processLine(); - /** - * Process the LDIF until a complete item can be returned - * @returns NewEntry if a new DN encountered, - * Item if a new item returned, - * Err if the LDIF contains error, - * EndEntry if the parser reached the end of the current entry - * and MoreData if the parser encountered the end of the current chunk of - * the LDIF. If you want to finish the parsing after receiving - * MoreData, then call endLDIF(), so the parser can safely flush - * the current entry. - */ - ParseVal nextItem(); - /** - * Sets a chunk of LDIF. Call before startParsing(), or if nextItem() returned - * MoreData. - */ - void setLDIF( const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; } - /** - * Indicates the end of the LDIF file/stream. Call if nextItem() returned - * MoreData, but actually you don't have more data. - */ - void endLDIF(); - /** - * Returns the requested LDAP operation extracted from the current entry. - */ - EntryType entryType() const { return mEntryType; } - /** - * Returns the LDAP modify request type if entryType() returned Entry_Mod. - */ - int modType() const { return mModType; } - /** - * Returns the Distinguished Name of the current entry. - */ - const TQString& dn() const { return mDn; } - /** - * Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn. - */ - const TQString& newRdn() const { return mNewRdn; } - /** - * Returns the new parent of the entry if modType() returned Entry_Modrdn. - */ - const TQString& newSuperior() const { return mNewSuperior; } - /** - * Returns if the delete of the old RDN is required. - */ - bool delOldRdn() const { return mDelOldRdn; } - /** - * Returns the attribute name. - */ - const TQString& attr() const { return mAttr; } - /** - * Returns the attribute value. - */ - const TQByteArray& val() const { return mVal; } - /** - * Returns if val() is an url - */ - bool isUrl() const { return mUrl; } - /** - * Returns the criticality level when modType() returned Control. - */ - bool critical() const { return mCritical; } - /** - * Returns the OID when modType() returned Control. - */ - const TQString& oid() const { return mOid; } - /** - * Returns the line number which the parser processes. - */ - uint lineNo() const { return mLineNo; } - private: - int mModType; - bool mDelOldRdn, mUrl; - TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid; - TQByteArray mLdif, mVal; - EntryType mEntryType; - - bool mIsNewLine, mIsComment,mCritical; - ParseVal mLastParseVal; - uint mPos,mLineNo; - TQCString line; - - class LDIFPrivate; - LDIFPrivate *d; - }; -} - -#endif diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp deleted file mode 100644 index 4bf989395..000000000 --- a/kabc/ldifconverter.cpp +++ /dev/null @@ -1,573 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Helge Deller - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -/* - Useful links: - - http://tldp.org/HOWTO/LDAP-Implementation-HOWTO/schemas.html - - http://www.faqs.org/rfcs/rfc2849.html - - Not yet handled items: - - objectclass microsoftaddressbook - - info, - - initials, - - otherfacsimiletelephonenumber, - - otherpager, - - physicaldeliveryofficename, -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include "addressee.h" -#include "address.h" - -#include "ldif.h" -#include "ldifconverter.h" -#include "vcardconverter.h" - -using namespace KABC; - -/* generate LDIF stream */ - -bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, TQString &str ) -{ - AddresseeList::ConstIterator it; - for ( it = addrList.begin(); it != addrList.end(); ++it ) { - addresseeToLDIF( *it, str ); - } - return true; -} - - - -static void ldif_out( TQTextStream &t, TQString formatStr, TQString value ) -{ - if ( value.isEmpty() ) - return; - - TQCString txt = LDIF::assembleLine( formatStr, value, 72 ); - - // write the string - t << TQString::fromUtf8(txt) << "\n"; -} - -bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str ) -{ - if ( addr.isEmpty() ) - return false; - - TQTextStream t( str, IO_WriteOnly|IO_Append ); - t.setEncoding( TQTextStream::UnicodeUTF8 ); - - const Address homeAddr = addr.address( Address::Home ); - const Address workAddr = addr.address( Address::Work ); - - ldif_out( t, "dn", TQString( "cn=%1,mail=%2" ) - .arg( TQString(addr.formattedName()).simplifyWhiteSpace() ) - .arg( addr.preferredEmail() ) ); - ldif_out( t, "givenname", addr.givenName() ); - ldif_out( t, "sn", addr.familyName() ); - ldif_out( t, "cn", TQString(addr.formattedName()).simplifyWhiteSpace() ); - ldif_out( t, "uid", addr.uid() ); - ldif_out( t, "nickname", addr.nickName() ); - ldif_out( t, "xmozillanickname", addr.nickName() ); - - ldif_out( t, "mail", addr.preferredEmail() ); - if ( addr.emails().count() > 1 ) - ldif_out( t, "mozillasecondemail", addr.emails()[ 1 ] ); -//ldif_out( t, "mozilla_AIMScreenName: %1\n", "screen_name" ); - - ldif_out( t, "telephonenumber", addr.phoneNumber( PhoneNumber::Work ).number() ); - ldif_out( t, "facsimiletelephonenumber", addr.phoneNumber( PhoneNumber::Fax ).number() ); - ldif_out( t, "homephone", addr.phoneNumber( PhoneNumber::Home ).number() ); - ldif_out( t, "mobile", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 7 - ldif_out( t, "cellphone", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 4.x - ldif_out( t, "pager", addr.phoneNumber( PhoneNumber::Pager ).number() ); - ldif_out( t, "pagerphone", addr.phoneNumber( PhoneNumber::Pager ).number() ); - - ldif_out( t, "streethomeaddress", homeAddr.street() ); - ldif_out( t, "postalcode", workAddr.postalCode() ); - ldif_out( t, "postofficebox", workAddr.postOfficeBox() ); - - TQStringList streets = TQStringList::split( '\n', homeAddr.street() ); - if ( streets.count() > 0 ) - ldif_out( t, "homepostaladdress", streets[ 0 ] ); // Netscape 7 - if ( streets.count() > 1 ) - ldif_out( t, "mozillahomepostaladdress2", streets[ 1 ] ); // Netscape 7 - ldif_out( t, "mozillahomelocalityname", homeAddr.locality() ); // Netscape 7 - ldif_out( t, "mozillahomestate", homeAddr.region() ); - ldif_out( t, "mozillahomepostalcode", homeAddr.postalCode() ); - ldif_out( t, "mozillahomecountryname", Address::ISOtoCountry(homeAddr.country()) ); - ldif_out( t, "locality", workAddr.locality() ); - ldif_out( t, "streetaddress", workAddr.street() ); // Netscape 4.x - - streets = TQStringList::split( '\n', workAddr.street() ); - if ( streets.count() > 0 ) - ldif_out( t, "postaladdress", streets[ 0 ] ); - if ( streets.count() > 1 ) - ldif_out( t, "mozillapostaladdress2", streets[ 1 ] ); - ldif_out( t, "countryname", Address::ISOtoCountry(workAddr.country()) ); - ldif_out( t, "l", workAddr.locality() ); - ldif_out( t, "c", Address::ISOtoCountry(workAddr.country()) ); - ldif_out( t, "st", workAddr.region() ); - - ldif_out( t, "title", addr.title() ); - ldif_out( t, "vocation", addr.prefix() ); - ldif_out( t, "ou", addr.role() ); - ldif_out( t, "o", addr.organization() ); - ldif_out( t, "organization", addr.organization() ); - ldif_out( t, "organizationname", addr.organization() ); - - // Compatibility with older kabc versions. - if ( !addr.department().isEmpty() ) - ldif_out( t, "department", addr.department() ); - else - ldif_out( t, "department", addr.custom("KADDRESSBOOK", "X-Department") ); - - ldif_out( t, "workurl", addr.url().prettyURL() ); - ldif_out( t, "homeurl", addr.url().prettyURL() ); - ldif_out( t, "description", addr.note() ); - if (addr.revision().isValid()) - ldif_out(t, "modifytimestamp", dateToVCardString( TQT_TQDATETIME_OBJECT(addr.revision())) ); - - t << "objectclass: top\n"; - t << "objectclass: person\n"; - t << "objectclass: organizationalPerson\n"; - - t << "\n"; - - return true; -} - - -/* convert from LDIF stream */ - -bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt ) -{ - if (str.isEmpty()) - return true; - - bool endldif = false, end = false; - LDIF ldif; - LDIF::ParseVal ret; - const char *latinstr = str.latin1(); - int latinstrlen = tqstrlen( latinstr ); - TQByteArray data; - Addressee a; - Address homeAddr, workAddr; - - data.setRawData( latinstr, latinstrlen ); - ldif.setLDIF( data ); - if (!dt.isValid()) - dt = TQDateTime::currentDateTime(); - a.setRevision(dt); - homeAddr = Address( Address::Home ); - workAddr = Address( Address::Work ); - - do { - ret = ldif.nextItem(); - switch ( ret ) { - case LDIF::Item: { - TQString fieldname = ldif.attr().lower(); - TQString value = TQString::fromUtf8( ldif.val(), ldif.val().size() ); - evaluatePair( a, homeAddr, workAddr, fieldname, value ); - break; - } - case LDIF::EndEntry: - // if the new address is not empty, append it - if ( !a.formattedName().isEmpty() || !a.name().isEmpty() || - !a.familyName().isEmpty() ) { - if ( !homeAddr.isEmpty() ) - a.insertAddress( homeAddr ); - if ( !workAddr.isEmpty() ) - a.insertAddress( workAddr ); - addrList.append( a ); - } - a = Addressee(); - a.setRevision(dt); - homeAddr = Address( Address::Home ); - workAddr = Address( Address::Work ); - break; - case LDIF::MoreData: { - if ( endldif ) - end = true; - else { - ldif.endLDIF(); - endldif = true; - break; - } - } - default: - break; - } - } while ( !end ); - - data.resetRawData( latinstr, latinstrlen ); - - return true; -} - -bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, - Address &workAddr, - TQString &fieldname, TQString &value ) -{ - if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! - return false; - - if ( fieldname.startsWith("#") ) { - return true; - } - - if ( fieldname.isEmpty() && !a.note().isEmpty() ) { - // some LDIF export filters are borken and add additional - // comments on stand-alone lines. Just add them to the notes for now. - a.setNote( a.note() + "\n" + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "givenname" ) ) { - a.setGivenName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "xmozillanickname") || - fieldname == TQString::fromLatin1( "nickname") ) { - a.setNickName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "sn" ) ) { - a.setFamilyName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "uid" ) ) { - a.setUid( value ); - return true; - } - if ( fieldname == TQString::fromLatin1( "mail" ) || - fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla - if ( a.emails().findIndex( value ) == -1 ) - a.insertEmail( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "title" ) ) { - a.setTitle( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "vocation" ) ) { - a.setPrefix( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "cn" ) ) { - a.setFormattedName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "o" ) || - fieldname == TQString::fromLatin1( "organization" ) || // Exchange - fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange - a.setOrganization( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "description" ) ) { -addComment: - if ( !a.note().isEmpty() ) - a.setNote( a.note() + "\n" ); - a.setNote( a.note() + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "custom1" ) || - fieldname == TQString::fromLatin1( "custom2" ) || - fieldname == TQString::fromLatin1( "custom3" ) || - fieldname == TQString::fromLatin1( "custom4" ) ) { - goto addComment; - } - - if ( fieldname == TQString::fromLatin1( "homeurl" ) || - fieldname == TQString::fromLatin1( "workurl" ) ) { - if (a.url().isEmpty()) { - a.setUrl( KURL( value ) ); - return true; - } - if ( a.url().prettyURL() == KURL(value).prettyURL() ) - return true; - // TODO: current version of kabc only supports one URL. - // TODO: change this with KDE 4 - } - - if ( fieldname == TQString::fromLatin1( "homephone" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla - fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "street" ) || - fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { - homeAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla - workAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla - workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { - workAddr.setPostalCode( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { - workAddr.setPostOfficeBox( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 - homeAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla - homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla - homeAddr.setLocality( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla - homeAddr.setRegion( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla - homeAddr.setPostalCode( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla - if ( value.length() <= 2 ) - value = Address::ISOtoCountry(value); - homeAddr.setCountry( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "locality" ) ) { - workAddr.setLocality( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x - workAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "countryname" ) || - fieldname == TQString::fromLatin1( "c" ) ) { // mozilla - if ( value.length() <= 2 ) - value = Address::ISOtoCountry(value); - workAddr.setCountry( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla - workAddr.setLocality( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "st" ) ) { - workAddr.setRegion( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "ou" ) ) { - a.setRole( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "department" ) ) { - a.setDepartment( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "member" ) ) { - // this is a mozilla list member (cn=xxx, mail=yyy) - TQStringList list( TQStringList::split( ',', value ) ); - TQString name, email; - - TQStringList::Iterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( (*it).startsWith( "cn=" ) ) - name = (*it).mid( 3 ).stripWhiteSpace(); - if ( (*it).startsWith( "mail=" ) ) - email = (*it).mid( 5 ).stripWhiteSpace(); - } - if ( !name.isEmpty() && !email.isEmpty() ) - email = " <" + email + ">"; - a.insertEmail( name + email ); - a.insertCategory( i18n( "List of Emails" ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { - if (value == TQString::fromLatin1("0Z")) // ignore - return true; - TQDateTime dt = VCardStringToDate( value ); - if ( dt.isValid() ) { - a.setRevision(dt); - return true; - } - } - - if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore - return true; - - kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") - .arg(a.formattedName()).arg(fieldname).arg(value)); - - return true; -} - -/* The following functions are obsoleted. Similar functionality can be found - * in the LDIF class */ - -bool LDIFConverter::parseSingleLine( Addressee &a, Address &homeAddr, - Address &workAddr, TQString &line ) -{ - if ( line.isEmpty() ) - return true; - - TQString fieldname, value; - TQByteArray val; - - LDIF::splitLine( line.latin1(), fieldname, val ); - value = TQString::fromUtf8( val.data(), val.size() ); - return evaluatePair( a, homeAddr, workAddr, fieldname, value); -} - - -bool LDIFConverter::splitLine( TQString &line, TQString &fieldname, TQString &value) -{ - TQByteArray val; - bool ret = LDIF::splitLine( line.latin1(), fieldname, val ); - value = TQString::fromUtf8( val.data(), val.size() ); - return ret; -} - - -TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, bool allowEncode ) -{ - if ( value.isEmpty() ) - return TQString(); - - // append format if not given - if (formatStr.find(':') == -1) - formatStr.append(": %1\n"); - - // check if base64-encoding is needed - bool printable = true; - unsigned int i, len; - len = value.length(); - for (i = 0; i=0) - formatStr.insert(p, ':'); - } - - // generate the new string and split it to 72 chars/line - TQCString txt = TQString(formatStr.arg(value)).utf8(); - - if (allowEncode) { - len = txt.length(); - if (len && txt[len-1] == '\n') - --len; - i = 72; - while (i < len) { - txt.insert(i, "\n "); - i += 72+1; - len += 2; - } - } - - return TQString::fromUtf8(txt); -} - diff --git a/kabc/ldifconverter.h b/kabc/ldifconverter.h deleted file mode 100644 index a8052a65f..000000000 --- a/kabc/ldifconverter.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Helge Deller - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 only as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_LDIFCONVERTER_H -#define KABC_LDIFCONVERTER_H - -#include -#include - -#include "addressee.h" -#include "addresseelist.h" - -namespace KABC { - - /** - * A set of functions to convert a string with LDIF information to addressees - * and vice versa. It is useful for addressbook import- and exportfilters - * and might be used to read and write Mozilla and Netscape addresssbooks. - */ - - namespace LDIFConverter { - - /** - * Converts a LDIF string to a list of addressees. - * - * @param str The vcard string. - * @param addrList The addresseelist. - * @param dt The date & time value of the last modification (e.g. file modification time). - * @since 3.2 - */ - KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); - - /** - * Converts a list of addressees to a LDIF string. - * - * @param addrList The addresseelist. - * @param str The LDIF string. - * @since 3.2 - */ - KABC_EXPORT bool addresseeToLDIF( const AddresseeList &addrList, TQString &str ); - - /** - * Converts an addressee to a LDIF string. - * - * @param addr The addressee. - * @param str The LDIF string. - * @since 3.2 - */ - KABC_EXPORT bool addresseeToLDIF( const Addressee &addr, TQString &str ); - - /** - * @deprecated - * Obsoleted - please use LDIF::assembleLine() - * Returns a LDIF compatible string representing a given field/value pair. - * If necessary, the value parameter will be base64encoded and split into multiple. - * This function will return an empty string if the given value is empty. - * - * @param field The LDAP field name or a complete LDIF field string (e.g. "cn" or "cn = %1\n"). - * @param value The value for this field. - * @param allowEncode Set to false if you wish no encoding of the value. - * @since 3.2 - */ - KABC_EXPORT TQString makeLDIFfieldString( TQString field, TQString value, bool allowEncode = true ) KDE_DEPRECATED; - - - - /* internal functions - do not use !! */ - - /** No need for this function anymore - use LDIF::splitLine() + evaluatePair() */ - KABC_EXPORT bool parseSingleLine( Addressee &a, - Address &homeAddr, Address &workAddr, TQString &line ); - - /** No need for this function anymore - use LDIF::splitLine() */ - KABC_EXPORT bool splitLine( TQString &line, TQString &fieldname, TQString &value); - - - KABC_EXPORT bool evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, - TQString &fieldname, TQString &value ); - - } - -} -#endif - diff --git a/kabc/lock.cpp b/kabc/lock.cpp deleted file mode 100644 index 8f64a3c23..000000000 --- a/kabc/lock.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001,2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "lock.h" - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -using namespace KABC; - -Lock::Lock( const TQString &identifier ) - : mIdentifier( identifier ) -{ - mIdentifier.replace( "/", "_" ); -} - -Lock::~Lock() -{ - unlock(); -} - -TQString Lock::locksDir() -{ - return locateLocal( "data", "kabc/lock/" ); -} - -bool Lock::readLockFile( const TQString &filename, int &pid, TQString &app ) -{ - TQFile file( filename ); - if ( !file.open( IO_ReadOnly ) ) return false; - - TQTextStream t( &file ); - pid = t.readLine().toInt(); - app = t.readLine(); - - return true; -} - -bool Lock::writeLockFile( const TQString &filename ) -{ - TQFile file( filename ); - if ( !file.open( IO_WriteOnly ) ) return false; - TQTextStream t( &file ); - t << ::getpid() << endl << TQString( TDEGlobal::instance()->instanceName() ); - - return true; -} - -TQString Lock::lockFileName() const -{ - return locksDir() + mIdentifier + ".lock"; -} - -bool Lock::lock() -{ - kdDebug(5700) << "Lock::lock()" << endl; - - TQString lockName = lockFileName(); - kdDebug(5700) << "-- lock name: " << lockName << endl; - - if ( TQFile::exists( lockName ) ) { // check if it is a stale lock file - int pid; - TQString app; - - if ( !readLockFile( lockFileName(), pid, app ) ) { - mError = i18n("Unable to open lock file."); - return false; - } - - int retval = ::kill( pid, 0 ); - if ( retval == -1 && errno == ESRCH ) { // process doesn't exists anymore - TQFile::remove( lockName ); - kdWarning(5700) << "Removed stale lock file from process '" << app << "'" - << endl; - } else { - TQString identifier( mIdentifier ); - identifier.replace( '_', '/' ); - - mError = i18n("The address book '%1' is locked by application '%2'.\nIf you believe this is incorrect, just remove the lock file from '%3'") - .arg( identifier ).arg( app ).arg( locateLocal( "data", "kabc/lock/*.lock" ) ); - return false; - } - } - - TQString lockUniqueName; - lockUniqueName = mIdentifier + kapp->randomString( 8 ); - mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); - kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; - - // Create unique file - writeLockFile( mLockUniqueName ); - - // Create lock file - int result = ::link( TQFile::encodeName( mLockUniqueName ), - TQFile::encodeName( lockName ) ); - - if ( result == 0 ) { - mError = ""; - emit locked(); - return true; - } - - // TODO: check stat - - mError = i18n("Error"); - return false; -} - -bool Lock::unlock() -{ - int pid; - TQString app; - if ( readLockFile( lockFileName(), pid, app ) ) { - if ( pid == getpid() ) { - TQFile::remove( lockFileName() ); - TQFile::remove( mLockUniqueName ); - emit unlocked(); - } else { - mError = i18n("Unlock failed. Lock file is owned by other process: %1 (%2)") - .arg( app ).arg( TQString::number( pid ) ); - kdDebug() << "Lock::unlock(): " << mError << endl; - return false; - } - } - - mError = ""; - return true; -} - -TQString Lock::error() const -{ - return mError; -} - -#include "lock.moc" diff --git a/kabc/lock.h b/kabc/lock.h deleted file mode 100644 index addc2032f..000000000 --- a/kabc/lock.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2001,2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_LOCK_H -#define KABC_LOCK_H - -#include -#include - -#include - -namespace KABC { - -/** - This class provides locking functionality for a file, directory or an - arbitrary string-represented resource. -*/ -class KABC_EXPORT Lock : public TQObject -{ - Q_OBJECT - public: - /** - Constructor. - - @param identifier An identifier for the resource to be locked, e.g. a file - name. - */ - Lock( const TQString &identifier ); - - /** - Destruct lock object. This also removes the lock on the resource. - */ - ~Lock(); - - /** - Lock resource. - */ - virtual bool lock(); - - /** - Unlock resource. - */ - virtual bool unlock(); - - virtual TQString error() const; - - TQString lockFileName() const; - - static bool readLockFile( const TQString &filename, int &pid, TQString &app ); - static bool writeLockFile( const TQString &filename ); - - static TQString locksDir(); - - signals: - void locked(); - void unlocked(); - - private: - TQString mIdentifier; - - TQString mLockUniqueName; - - TQString mError; - - class Private; - Private *d; -}; - -} - -#endif diff --git a/kabc/locknull.cpp b/kabc/locknull.cpp deleted file mode 100644 index 234c2c214..000000000 --- a/kabc/locknull.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "locknull.h" - -#include -#include - -using namespace KABC; - -LockNull::LockNull( bool allowAccess ) - : Lock( TQString::null ), mAllowAccess( allowAccess ) -{ -} - -LockNull::~LockNull() -{ - unlock(); -} - -bool LockNull::lock() -{ - if ( !mAllowAccess ) return false; - - kdWarning() << "LockNull::lock() force success. Doesn't actually lock." - << endl; - - emit locked(); - - return true; -} - -bool LockNull::unlock() -{ - emit unlocked(); - return true; -} - -TQString LockNull::error() const -{ - if ( mAllowAccess ) - return i18n("LockNull: All locks succeed but no actual locking is done."); - else - return i18n("LockNull: All locks fail."); -} diff --git a/kabc/locknull.h b/kabc/locknull.h deleted file mode 100644 index dfefe122a..000000000 --- a/kabc/locknull.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_LOCKNULL_H -#define KABC_LOCKNULL_H - -#include - -#include "lock.h" - -namespace KABC { - -/** - This class provides a lock without actually locking. It can be constructed in - two ways: One that let all locks succeed and one that let all locks fail. -*/ -class KABC_EXPORT LockNull : public Lock -{ - public: - LockNull( bool allowAccess ); - ~LockNull(); - - bool lock(); - bool unlock(); - - TQString error() const; - - private: - bool mAllowAccess; - - class Private; - Private *d; -}; - -} - -#endif diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp deleted file mode 100644 index adf8566f1..000000000 --- a/kabc/phonenumber.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "phonenumber.h" - -using namespace KABC; - -PhoneNumber::PhoneNumber() : - mType( Home ) -{ - init(); -} - -PhoneNumber::PhoneNumber( const TQString &number, int type ) : - mType( type ) -{ - init(); - - validateNumber( number ); -} - -PhoneNumber::~PhoneNumber() -{ -} - -void PhoneNumber::init() -{ - mId = TDEApplication::randomString( 8 ); -} - -void PhoneNumber::validateNumber( const TQString &number ) -{ - mNumber = number; - - // remove line breaks - mNumber = mNumber.replace( '\n', "" ); - mNumber = mNumber.replace( '\r', "" ); -} - -bool PhoneNumber::operator==( const PhoneNumber &p ) const -{ - if ( mNumber != p.mNumber ) return false; - if ( mType != p.mType ) return false; - - return true; -} - -bool PhoneNumber::operator!=( const PhoneNumber &p ) const -{ - return !( p == *this ); -} - -void PhoneNumber::setId( const TQString &id ) -{ - mId = id; -} - -TQString PhoneNumber::id() const -{ - return mId; -} - -void PhoneNumber::setNumber( const TQString &number ) -{ - validateNumber( number ); -} - -TQString PhoneNumber::number() const -{ - return mNumber; -} - -void PhoneNumber::setType( int type ) -{ - mType = type; -} - -int PhoneNumber::type() const -{ - return mType; -} - -TQString PhoneNumber::typeLabel() const -{ - TQString label; - bool first = true; - - const TypeList list = typeList(); - - TypeList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { - label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); - if ( first ) - first = false; - } - } - - return label; -} - -TQString PhoneNumber::label() const -{ - return typeLabel( type() ); -} - -PhoneNumber::TypeList PhoneNumber::typeList() -{ - static TypeList list; - - if ( list.isEmpty() ) { - list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video - << Bbs << Modem << Car << Isdn << Pcs << Pager; - } - - return list; -} - -TQString PhoneNumber::label( int type ) -{ - return typeLabel( type ); -} - -TQString PhoneNumber::typeLabel( int type ) -{ - if ( type & Pref ) - return i18n( "Preferred phone", "Preferred" ); - - switch ( type ) { - case Home: - return i18n("Home phone", "Home"); - break; - case Work: - return i18n("Work phone", "Work"); - break; - case Msg: - return i18n("Messenger"); - break; - case Pref: - return i18n("Preferred Number"); - break; - case Voice: - return i18n("Voice"); - break; - case Fax: - return i18n("Fax"); - break; - case Cell: - return i18n("Mobile Phone", "Mobile" ); - break; - case Video: - return i18n("Video"); - break; - case Bbs: - return i18n("Mailbox"); - break; - case Modem: - return i18n("Modem"); - break; - case Car: - return i18n("Car Phone", "Car" ); - break; - case Isdn: - return i18n("ISDN"); - break; - case Pcs: - return i18n("PCS"); - break; - case Pager: - return i18n("Pager"); - break; - case Home | Fax: - return i18n("Home Fax"); - break; - case Work | Fax: - return i18n("Work Fax"); - break; - default: - return i18n("Other"); - } -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const PhoneNumber &phone ) -{ - return s << phone.mId << phone.mType << phone.mNumber; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, PhoneNumber &phone ) -{ - s >> phone.mId >> phone.mType >> phone.mNumber; - - return s; -} diff --git a/kabc/phonenumber.h b/kabc/phonenumber.h deleted file mode 100644 index 3e6ae0941..000000000 --- a/kabc/phonenumber.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_PHONENUMBER_H -#define KABC_PHONENUMBER_H - -#include -#include - -#include - -namespace KABC { - -/** - @short Phonenumber information. - - This class provides phone number information. A phone number is classified by - a type. The following types are available, it's possible to use multiple types - Types for a number by combining them through a logical or. -*/ -class KABC_EXPORT PhoneNumber -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); - - public: - typedef TQValueList List; - typedef TQValueList TypeList; - - /** - @li @p Home - Home number - @li @p Work - Office number - @li @p Msg - Messaging - @li @p Pref - Preferred number - @li @p Voice - Voice - @li @p Fax - Fax machine - @li @p Cell - Cell phone - @li @p Video - Video phone - @li @p Bbs - Mailbox - @li @p Modem - Modem - @li @p Car - Car phone - @li @p Isdn - ISDN connection - @li @p Pcs - Personal Communication Service - @li @p Pager - Pager - */ - enum Types { Home = 1, Work = 2, Msg = 4, Pref = 8, Voice = 16, Fax = 32, - Cell = 64, Video = 128, Bbs = 256, Modem = 512, Car = 1024, - Isdn = 2048, Pcs = 4096, Pager = 8192 }; - - /** - Create an empty phone number object. - */ - PhoneNumber(); - - /** - Create a phonenumber object. - - @param number Number - @param type Type as defined in enum. Multiple types can be - specified by combining them by a logical or. - */ - PhoneNumber( const TQString &number, int type = Home ); - - /** - Destructor. - */ - ~PhoneNumber(); - - bool operator==( const PhoneNumber & ) const; - bool operator!=( const PhoneNumber & ) const; - - /** - Sets the unique identifier. - */ - void setId( const TQString &id ); - - /** - Returns the unique identifier. - */ - TQString id() const; - - /** - Sets the number. - */ - void setNumber( const TQString & ); - - /** - Returns the number. - */ - TQString number() const; - - /** - Sets the type. Multiple types can be specified by combining them by - a logical or. - */ - void setType( int ); - - /** - Returns the type. Can be a multiple types combined by a logical or. - */ - int type() const; - - /** - Returns a translated string of all types the address has. - */ - TQString typeLabel() const; - - /** - Returns the translated label for phone number depending on its type. - */ - TQString label() const; - - /** - Returns a list of all available types - */ - static TypeList typeList(); - - /** - Returns the translated label for phone number type. - */ - static TQString typeLabel( int type ); - - /** - Returns the translated label for phone number type. - @obsolete - */ - static TQString label( int type ); - - private: - void init(); - void validateNumber( const TQString& ); - - TQString mId; - - int mType; - TQString mNumber; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); - -} - -#endif diff --git a/kabc/picture.cpp b/kabc/picture.cpp deleted file mode 100644 index 4ddd3f537..000000000 --- a/kabc/picture.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "picture.h" - -using namespace KABC; - -Picture::Picture() - : mIntern( false ) -{ -} - -Picture::Picture( const TQString &url ) - : mUrl( url ), mIntern( false ) -{ -} - -Picture::Picture( const TQImage &data ) - : mData( data ), mIntern( true ) -{ -} - -Picture::~Picture() -{ -} - -bool Picture::operator==( const Picture &p ) const -{ - if ( mIntern != p.mIntern ) return false; - - if ( mIntern ) { - if ( mData != p.mData ) - return false; - } else { - if ( mUrl != p.mUrl ) - return false; - } - - return true; -} - -bool Picture::operator!=( const Picture &p ) const -{ - return !( p == *this ); -} - -void Picture::setUrl( const TQString &url ) -{ - mUrl = url; - mIntern = false; -} - -void Picture::setData( const TQImage &data ) -{ - mData = data; - mIntern = true; -} - -void Picture::setType( const TQString &type ) -{ - mType = type; -} - -bool Picture::isIntern() const -{ - return mIntern; -} - -TQString Picture::url() const -{ - return mUrl; -} - -TQImage Picture::data() const -{ - return mData; -} - -TQString Picture::type() const -{ - return mType; -} - -TQString Picture::asString() const -{ - if ( mIntern ) - return "intern picture"; - else - return mUrl; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Picture &picture ) -{ - return s << picture.mIntern << picture.mUrl << picture.mType; -// return s << picture.mIntern << picture.mUrl << picture.mType << picture.mData; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Picture &picture ) -{ - s >> picture.mIntern >> picture.mUrl >> picture.mType; -// s >> picture.mIntern >> picture.mUrl >> picture.mType >> picture.mData; - return s; -} diff --git a/kabc/picture.h b/kabc/picture.h deleted file mode 100644 index e6ed690c2..000000000 --- a/kabc/picture.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_PICTURE_H -#define KABC_PICTURE_H - -#include - -#include - -namespace KABC { - -class KABC_EXPORT Picture -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); - -public: - - /** - * Consturctor. Creates an empty object. - */ - Picture(); - - /** - * Consturctor. - * - * @param url A URL that describes the position of the picture file. - */ - Picture( const TQString &url ); - - /** - * Consturctor. - * - * @param data The raw data of the picture. - */ - Picture( const TQImage &data ); - - /** - * Destructor. - */ - ~Picture(); - - - bool operator==( const Picture & ) const; - bool operator!=( const Picture & ) const; - - /** - * Sets a URL for the location of the picture file. When using this - * function, isIntern() will return 'false' until you use - * setData(). - * - * @param url The location URL of the picture file. - */ - void setUrl( const TQString &url ); - - /** - * Sets the raw data of the picture. When using this function, - * isIntern() will return 'true' until you use setUrl(). - * - * @param data The raw data of the picture. - */ - void setData( const TQImage &data ); - - /** - * Sets the type of the picture. - */ - void setType( const TQString &type ); - - /** - * Returns whether the picture is described by a URL (extern) or - * by the raw data (intern). - * When this method returns 'true' you can use data() to - * get the raw data. Otherwise you can request the URL of this - * picture by url() and load the raw data from that location. - */ - bool isIntern() const; - - /** - * Returns the location URL of this picture. - */ - TQString url() const; - - /** - * Returns the raw data of this picture. - */ - TQImage data() const; - - /** - * Returns the type of this picture. - */ - TQString type() const; - - /** - * Returns string representation of the picture. - */ - TQString asString() const; - -private: - TQString mUrl; - TQString mType; - TQImage mData; - - int mIntern; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); - -} -#endif diff --git a/kabc/plugin.cpp b/kabc/plugin.cpp deleted file mode 100644 index a53192559..000000000 --- a/kabc/plugin.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "plugin.h" - -using namespace KABC; - -Plugin::Plugin() -{ -} - -Plugin::~Plugin() -{ -} - -void Plugin::setType( const TQString& type ) -{ - mType = type; -} - -TQString Plugin::type() const -{ - return mType; -} - -void Plugin::setNameLabel( const TQString& label ) -{ - mNameLabel = label; -} - -TQString Plugin::nameLabel() const -{ - return mNameLabel; -} - -void Plugin::setDescriptionLabel( const TQString& label ) -{ - mDescriptionLabel = label; -} - -TQString Plugin::descriptionLabel() const -{ - return mDescriptionLabel; -} diff --git a/kabc/plugin.h b/kabc/plugin.h deleted file mode 100644 index 0c8e3b338..000000000 --- a/kabc/plugin.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_PLUGIN_H -#define KABC_PLUGIN_H - -#include - -#include - -namespace KABC { - -class KABC_EXPORT Plugin -{ -public: - Plugin(); - virtual ~Plugin(); - - virtual void setType( const TQString& type ); - virtual TQString type() const; - - virtual void setNameLabel( const TQString& label ); - virtual TQString nameLabel() const; - - virtual void setDescriptionLabel( const TQString& label ); - virtual TQString descriptionLabel() const; - -private: - TQString mType; - TQString mNameLabel; - TQString mDescriptionLabel; -}; - -} -#endif diff --git a/kabc/plugins/CMakeLists.txt b/kabc/plugins/CMakeLists.txt deleted file mode 100644 index 597486816..000000000 --- a/kabc/plugins/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( file ) -add_subdirectory( dir ) -add_subdirectory( net ) -add_subdirectory( ldaptdeio ) diff --git a/kabc/plugins/Makefile.am b/kabc/plugins/Makefile.am deleted file mode 100644 index bdedbec0f..000000000 --- a/kabc/plugins/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = file dir net ldaptdeio diff --git a/kabc/plugins/dir/CMakeLists.txt b/kabc/plugins/dir/CMakeLists.txt deleted file mode 100644 index 737d1144e..000000000 --- a/kabc/plugins/dir/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourcedir.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES dir.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_dir (library) ######################## - -set( target kabc_dir ) - -set( ${target}_SRCS - resourcedir.cpp resourcedirconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_dir (module) ######################### - -set( target kabc_dir ) - -set( ${target}_SRCS - resourcedirplugin.cpp -) - -tde_add_kpart( ${target} - SOURCES ${${target}_SRCS} - LINK kabc_dir-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/dir/Makefile.am b/kabc/plugins/dir/Makefile.am deleted file mode 100644 index 4b61d2828..000000000 --- a/kabc/plugins/dir/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_builddir) $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcedirconfig.h - -lib_LTLIBRARIES = libkabc_dir.la -libkabc_dir_la_SOURCES = resourcedir.cpp resourcedirconfig.cpp -libkabc_dir_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_dir_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDECORE) $(LIB_TDEFILE) $(LIB_TDEUI) -libkabc_dir_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -kde_module_LTLIBRARIES = kabc_dir.la -kabc_dir_la_SOURCES = resourcedirplugin.cpp -kabc_dir_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -kabc_dir_la_LIBADD = libkabc_dir.la $(LIB_QT) $(LIB_TDECORE) - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_dir.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourcedir.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = dir.desktop - -resourcedirplugin.lo: ../../addressee.h diff --git a/kabc/plugins/dir/dir.desktop b/kabc/plugins/dir/dir.desktop deleted file mode 100644 index a841040f9..000000000 --- a/kabc/plugins/dir/dir.desktop +++ /dev/null @@ -1,92 +0,0 @@ -[Desktop Entry] -Name=Directory -Name[af]=Gids -Name[ar]=دليل -Name[az]=CÉ™rgÉ™ -Name[be]=ТÑчка -Name[bn]=ডিরেকà§à¦Ÿà¦°à¦¿ -Name[br]=Renkell -Name[bs]=Direktorij -Name[ca]=Directori -Name[cs]=Adresář -Name[csb]=Katalog -Name[cy]=Cyfeiriadur -Name[da]=Mappe -Name[de]=Verzeichnis -Name[el]=Κατάλογος -Name[eo]=Dosierujo -Name[es]=Directorio -Name[et]=Kataloog -Name[eu]=Direktorioa -Name[fa]=Ùهرست راهنما -Name[fi]=Hakemisto -Name[fo]=Fíluskrá -Name[fr]=Dossier -Name[fy]=Map -Name[ga]=Comhadlann -Name[gl]=Directório -Name[he]=ספריה -Name[hi]=डिरेकà¥à¤Ÿà¥à¤°à¥€ -Name[hr]=Mapa -Name[hsb]=Zapisk -Name[hu]=Könyvtár -Name[id]=Direktori -Name[is]=Mappa -Name[it]=Cartella -Name[ja]=ディレクトリ -Name[ka]=დáƒáƒ¡áƒ¢áƒ -Name[kk]=Каталог -Name[km]=ážáž -Name[ko]=ìžë£Œë°© -Name[ku]=Peldank -Name[lb]=Verzeechnis -Name[lt]=Aplankas -Name[lv]=Direktorija -Name[mk]=Именик -Name[mn]=Лавлах -Name[ms]=Direktori -Name[mt]=Direttorju -Name[nb]=Katalog -Name[nds]=Orner -Name[ne]=डाइरेकà¥à¤Ÿà¤°à¥€ -Name[nl]=Map -Name[nn]=Katalog -Name[nso]=Tshupetso -Name[oc]=Directori -Name[pa]=ਡਾਇਰੈਕਟਰੀ -Name[pl]=Katalog -Name[pt]=Directoria -Name[pt_BR]=Diretório -Name[ro]=Director -Name[ru]=Каталог -Name[rw]=ububiko -Name[se]=Ohcu -Name[sk]=PrieÄinok -Name[sl]=Imenik -Name[sq]=Fioka -Name[sr]=ФаÑцикла -Name[sr@Latn]=Fascikla -Name[ss]=I-directory -Name[sv]=Katalog -Name[ta]=அடைவ௠-Name[te]=డైరకà±à°Ÿà°°à°¿ -Name[tg]=ФеҳраÑÑ‚ -Name[th]=ไดเรà¸à¸—อรี -Name[tr]=Dizin -Name[tt]=Törgäk -Name[uk]=Каталог -Name[uz]=Jild -Name[uz@cyrillic]=Жилд -Name[ven]=Tsumbavhulwo -Name[vi]=Thư mục -Name[wa]=Ridant -Name[xh]=Ulawulo -Name[zh_CN]=目录 -Name[zh_HK]=目錄 -Name[zh_TW]=目錄 -Name[zu]=Uhlu lwamafayela -X-TDE-Library=kabc_dir -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=dir diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp deleted file mode 100644 index 936eea6e4..000000000 --- a/kabc/plugins/dir/resourcedir.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "formatfactory.h" -#include "resourcedirconfig.h" -#include "stdaddressbook.h" -#include "lock.h" - -#include "resourcedir.h" - -using namespace KABC; - -extern "C" -{ - void *init_kabc_dir() - { - return new KRES::PluginFactory(); - } -} - - -ResourceDir::ResourceDir( const TDEConfig *config ) - : Resource( config ), mAsynchronous( false ) -{ - if ( config ) { - init( config->readPathEntry( "FilePath", StdAddressBook::directoryName() ), - config->readEntry( "FileFormat", "vcard" ) ); - } else { - init( StdAddressBook::directoryName(), "vcard" ); - } -} - -ResourceDir::ResourceDir( const TQString &path, const TQString &format ) - : Resource( 0 ), mAsynchronous( false ) -{ - init( path, format ); -} - -void ResourceDir::init( const TQString &path, const TQString &format ) -{ - mFormatName = format; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); - - if ( !mFormat ) { - mFormatName = "vcard"; - mFormat = factory->format( mFormatName ); - } - - mLock = 0; - - connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) ); - - setPath( path ); -} - -ResourceDir::~ResourceDir() -{ - delete mFormat; - mFormat = 0; -} - -void ResourceDir::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - if ( mPath == StdAddressBook::directoryName() ) - config->deleteEntry( "FilePath" ); - else - config->writePathEntry( "FilePath", mPath ); - - config->writeEntry( "FileFormat", mFormatName ); -} - -Ticket *ResourceDir::requestSaveTicket() -{ - kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl; - - if ( !addressBook() ) return 0; - - delete mLock; - mLock = new Lock( mPath ); - - if ( mLock->lock() ) { - addressBook()->emitAddressBookLocked(); - } else { - addressBook()->error( mLock->error() ); - kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock path '" - << mPath << "': " << mLock->error() << endl; - return 0; - } - - return createTicket( this ); -} - -void ResourceDir::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; - - delete mLock; - mLock = 0; -} - -bool ResourceDir::doOpen() -{ - TQDir dir( mPath ); - if ( !dir.exists() ) { // no directory available - return dir.mkdir( dir.path() ); - } else { - TQString testName = dir.entryList( TQDir::Files )[0]; - if ( testName.isNull() || testName.isEmpty() ) // no file in directory - return true; - - TQFile file( mPath + "/" + testName ); - if ( file.open( IO_ReadOnly ) ) - return true; - - if ( file.size() == 0 ) - return true; - - bool ok = mFormat->checkFormat( &file ); - file.close(); - return ok; - } -} - -void ResourceDir::doClose() -{ -} - -bool ResourceDir::load() -{ - kdDebug(5700) << "ResourceDir::load(): '" << mPath << "'" << endl; - - mAsynchronous = false; - - TQDir dir( mPath ); - TQStringList files = dir.entryList( TQDir::Files ); - - TQStringList::Iterator it; - bool ok = true; - for ( it = files.begin(); it != files.end(); ++it ) { - TQFile file( mPath + "/" + (*it) ); - - if ( !file.open( IO_ReadOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); - ok = false; - continue; - } - - if ( !mFormat->loadAll( addressBook(), this, &file ) ) - ok = false; - - file.close(); - } - - return ok; -} - -bool ResourceDir::asyncLoad() -{ - mAsynchronous = true; - - bool ok = load(); - if ( !ok ) - emit loadingError( this, i18n( "Loading resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit loadingFinished( this ); - - return ok; -} - -bool ResourceDir::save( Ticket * ) -{ - kdDebug(5700) << "ResourceDir::save(): '" << mPath << "'" << endl; - - Addressee::Map::Iterator it; - bool ok = true; - - mDirWatch.stopScan(); - - for ( it = mAddrMap.begin(); it != mAddrMap.end(); ++it ) { - if ( !it.data().changed() ) - continue; - - TQFile file( mPath + "/" + (*it).uid() ); - if ( !file.open( IO_WriteOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); - continue; - } - - mFormat->save( *it, &file ); - - // mark as unchanged - (*it).setChanged( false ); - - file.close(); - } - - mDirWatch.startScan(); - - return ok; -} - -bool ResourceDir::asyncSave( Ticket *ticket ) -{ - bool ok = save( ticket ); - if ( !ok ) - emit savingError( this, i18n( "Saving resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit savingFinished( this ); - - return ok; -} - -void ResourceDir::setPath( const TQString &path ) -{ - mDirWatch.stopScan(); - if ( mDirWatch.contains( mPath ) ) - mDirWatch.removeDir( mPath ); - - mPath = path; - mDirWatch.addDir( mPath, true ); - mDirWatch.startScan(); -} - -TQString ResourceDir::path() const -{ - return mPath; -} - -void ResourceDir::setFormat( const TQString &format ) -{ - mFormatName = format; - - if ( mFormat ) - delete mFormat; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); -} - -TQString ResourceDir::format() const -{ - return mFormatName; -} - -void ResourceDir::pathChanged() -{ - if ( !addressBook() ) - return; - - clear(); - if ( mAsynchronous ) - asyncLoad(); - else { - load(); - addressBook()->emitAddressBookChanged(); - } -} - -void ResourceDir::removeAddressee( const Addressee& addr ) -{ - TQFile::remove( mPath + "/" + addr.uid() ); - mAddrMap.erase( addr.uid() ); -} - -#include "resourcedir.moc" diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h deleted file mode 100644 index f62ee91ba..000000000 --- a/kabc/plugins/dir/resourcedir.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCEDIR_H -#define KABC_RESOURCEDIR_H - -#include -#include - -#include - -#include - -class TQTimer; - -namespace KABC { - -class FormatPlugin; -class Lock; - -/** - @internal -*/ -class KABC_EXPORT ResourceDir : public Resource -{ - Q_OBJECT - - public: - ResourceDir( const TDEConfig* ); - ResourceDir( const TQString &path, const TQString &type = "vcard" ); - ~ResourceDir(); - - virtual void writeConfig( TDEConfig* ); - - virtual bool doOpen(); - virtual void doClose(); - - virtual Ticket *requestSaveTicket(); - virtual void releaseSaveTicket( Ticket* ); - - virtual bool load(); - virtual bool asyncLoad(); - virtual bool save( Ticket* ticket ); - virtual bool asyncSave( Ticket* ticket ); - - /** - Set path to be used for saving. - */ - void setPath( const TQString & ); - - /** - Return path used for loading and saving the address book. - */ - TQString path() const; - - /** - Set the format by name. - */ - void setFormat( const TQString &format ); - - /** - Returns the format name. - */ - TQString format() const; - - /** - Remove a addressee from its source. - This method is mainly called by KABC::AddressBook. - */ - virtual void removeAddressee( const Addressee& addr ); - - protected slots: - void pathChanged(); - - protected: - void init( const TQString &path, const TQString &format ); - - private: - FormatPlugin *mFormat; - - KDirWatch mDirWatch; - - TQString mPath; - TQString mFormatName; - - Lock *mLock; - - bool mAsynchronous; - - class ResourceDirPrivate; - ResourceDirPrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp deleted file mode 100644 index 819d75d96..000000000 --- a/kabc/plugins/dir/resourcedirconfig.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include "formatfactory.h" -#include "resourcedir.h" -#include "stdaddressbook.h" - -#include "resourcedirconfig.h" - -using namespace KABC; - -ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name ) - : KRES::ConfigWidget( parent, name ) -{ - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, - KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Format:" ), this ); - mFormatBox = new KComboBox( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mFormatBox, 0, 1 ); - - label = new TQLabel( i18n( "Location:" ), this ); - mFileNameEdit = new KURLRequester( this ); - mFileNameEdit->setMode( KFile::Directory ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mFileNameEdit, 1, 1 ); - - FormatFactory *factory = FormatFactory::self(); - TQStringList formats = factory->formats(); - TQStringList::Iterator it; - for ( it = formats.begin(); it != formats.end(); ++it ) { - FormatInfo *info = factory->info( *it ); - if ( info ) { - mFormatTypes << (*it); - mFormatBox->insertItem( info->nameLabel ); - } - } - - mInEditMode = false; -} - -void ResourceDirConfig::setEditMode( bool value ) -{ - mFormatBox->setEnabled( !value ); - mInEditMode = value; -} - -void ResourceDirConfig::loadSettings( KRES::Resource *res ) -{ - ResourceDir *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; - return; - } - - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); - - mFileNameEdit->setURL( resource->path() ); - if ( mFileNameEdit->url().isEmpty() ) - mFileNameEdit->setURL( KABC::StdAddressBook::directoryName() ); -} - -void ResourceDirConfig::saveSettings( KRES::Resource *res ) -{ - ResourceDir *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; - return; - } - - if ( mInEditMode ) - resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); - - resource->setPath( mFileNameEdit->url() ); -} - -#include "resourcedirconfig.moc" diff --git a/kabc/plugins/dir/resourcedirconfig.h b/kabc/plugins/dir/resourcedirconfig.h deleted file mode 100644 index 9df1778d3..000000000 --- a/kabc/plugins/dir/resourcedirconfig.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCEDIRCONFIG_H -#define RESOURCEDIRCONFIG_H - -#include -#include - -#include - -namespace KABC { - -class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget -{ - Q_OBJECT - -public: - ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 ); - - void setEditMode( bool value ); - -public slots: - void loadSettings( KRES::Resource* ); - void saveSettings( KRES::Resource* ); - -private: - KComboBox* mFormatBox; - KURLRequester* mFileNameEdit; - - TQStringList mFormatTypes; - - bool mInEditMode; -}; - -} -#endif diff --git a/kabc/plugins/dir/resourcedirplugin.cpp b/kabc/plugins/dir/resourcedirplugin.cpp deleted file mode 100644 index a2bd6d138..000000000 --- a/kabc/plugins/dir/resourcedirplugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourcedir.h" -#include "resourcedirconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_dir() - { - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/evolution/Makefile.am b/kabc/plugins/evolution/Makefile.am deleted file mode 100644 index fd7b9be3b..000000000 --- a/kabc/plugins/evolution/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourceevo.h dbwrapper.h - -kde_module_LTLIBRARIES = kabc_evo.la - -kabc_evo_la_SOURCES = dbwrapper.cpp resourceevo.cpp - -kabc_evo_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kabc_evo_la_LIBADD = ../../../kabc/libkabc.la ../../../tdeui/libtdeui.la -ldb ../../../kabc/vcardparser/libvcards.la - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_evolution.pot - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = evolution.desktop diff --git a/kabc/plugins/evolution/README b/kabc/plugins/evolution/README deleted file mode 100644 index 7dfefce00..000000000 --- a/kabc/plugins/evolution/README +++ /dev/null @@ -1,15 +0,0 @@ -A Resource using DB3 to access the evolution -addressbook make sure the wombat is not running -In future versions I may use bonobo to access it... - - -DESIGN: -The Format vs Resource idea is somehow not applyable to the -Evolution PAS - -Format would be vCard and Resource would be DB3.. -BUT -Format get's a QFile* pointer which is just not usable -with a DB3 -INSTEAD we will use the vCardImpl directly to convert -a string to Addressee \ No newline at end of file diff --git a/kabc/plugins/evolution/dbwrapper.cpp b/kabc/plugins/evolution/dbwrapper.cpp deleted file mode 100644 index fbdff165a..000000000 --- a/kabc/plugins/evolution/dbwrapper.cpp +++ /dev/null @@ -1,187 +0,0 @@ -#include - -#include - -#include "dbwrapper.h" - - -using namespace Evolution; - -struct DBIterator::Data { - DBWrapper *wrapper; - TQString key; - TQString data; - DBC* cursor; - bool atEnd; -}; - -DBIterator::DBIterator( DBWrapper* wra) { - data = new Data; - data->wrapper = wra; - data->atEnd = false; - data->cursor = 0l; -} -DBIterator::DBIterator( const DBIterator& copy ) { - data = new Data; - data->wrapper = copy.data->wrapper; - data->key = copy.data->key; - data->data = copy.data->data; - data->atEnd = copy.data->atEnd; - if (copy.data->cursor ) - copy.data->cursor->c_dup(copy.data->cursor, &data->cursor, 0 ); - else - data->cursor = 0l; -} -DBIterator::~DBIterator() { - if (data->cursor) - data->cursor->c_close(data->cursor); - delete data; -} -DBIterator& DBIterator::operator=( const DBIterator& rhs ) { - if ( *this == rhs ) - return *this; - if (data->cursor) - data->cursor->c_close(data->cursor); - delete data; - data = new Data; - data->wrapper = rhs.data->wrapper; - data->key = rhs.data->key; - data->data = rhs.data->data; - data->atEnd = rhs.data->atEnd; - if ( rhs.data->cursor ) - rhs.data->cursor->c_dup(rhs.data->cursor, &data->cursor, 0 ); - else - data->cursor = 0l; - - return *this; -} -TQString DBIterator::key()const{ - return data->key; -} -TQString DBIterator::value()const { - return data->data; -} -TQString DBIterator::operator*() { - return data->data; -} -DBIterator& DBIterator::operator++() { - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - if ( data->cursor ) - if ( data->cursor->c_get(data->cursor, &key, &val,DB_NEXT ) != 0 ) - data->atEnd = true; - data->key = TQString::fromUtf8( (char*)key.data, key.size ); - data->data = TQString::fromUtf8( (char*)val.data, val.size ); - return *this; -} -DBIterator& DBIterator::operator--() { - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - if ( data->cursor ) - if ( data->cursor->c_get(data->cursor, &key, &val,DB_PREV ) != 0 ) - data->atEnd = true; - data->key = TQString::fromUtf8( (char*)key.data, key.size ); - data->data = TQString::fromUtf8( (char*)val.data, val.size ); - return *this; -} -bool DBIterator::operator==( const DBIterator& rhs ) { - if ( data->atEnd && data->atEnd == rhs.data->atEnd ) return true; - - return false; -} -bool DBIterator::operator!=( const DBIterator& rhs ) { - return !this->operator==(rhs ); -} -struct DBWrapper::Data { - DB* db; - bool only; -}; -DBWrapper::DBWrapper() { - data = new Data; - (void)db_create(&data->db, NULL, 0 ); - data->only = false; -} -DBWrapper::~DBWrapper() { - data->db->close(data->db, 0 ); - delete data; -} -bool DBWrapper::open( const TQString& file, bool on) { - data->only = on; - return !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 ); -} -bool DBWrapper::save() { - return true; -} -DBIterator DBWrapper::begin() { - DBIterator it(this); - DBC* cursor; - DBT key, val; - int ret; - ret = data->db->cursor(data->db, NULL, &cursor, 0 ); - if (ret ) { - it.data->atEnd = true; - return it; - } - - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - ret = cursor->c_get(cursor, &key, &val, DB_FIRST ); - if (ret ) { - it.data->atEnd = true; - return it; - } - - it.data->cursor = cursor; - it.data->key = TQString::fromUtf8((char*)key.data, key.size ); - it.data->data = TQString::fromUtf8((char*)val.data, val.size ); - - return it; -} -DBIterator DBWrapper::end() { - DBIterator it(this); - it.data->atEnd = true; - - return it; -} -bool DBWrapper::find( const TQString& _key, TQString& _val ) { - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - - TQCString db_key = _key.local8Bit(); - key.data = db_key.data(); - key.size = db_key.size(); - - int ret = data->db->get(data->db, NULL, &key, &val, 0 ); - if (!ret) { - _val = TQString::fromUtf8( (char*)val.data, val.size ); - tqWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data ); - return true; - } - return false; -} -bool DBWrapper::add( const TQString& _key, const TQString& _val ) { - TQCString db_key = _key.local8Bit(); - TQCString db_val = _val.local8Bit(); - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - - key.data = db_key.data(); - key.size = db_key.size(); - val.data = db_val.data(); - val.size = db_val.size(); - - return !data->db->put(data->db, NULL, &key, &val, 0 ); -} -bool DBWrapper::remove( const TQString& _key ) { - TQCString db_key = _key.local8Bit(); - DBT key; - memset(&key, 0, sizeof(key) ); - key.data = db_key.data(); - key.size = db_key.size(); - - return !data->db->del(data->db, NULL, &key, 0 ); -} diff --git a/kabc/plugins/evolution/dbwrapper.h b/kabc/plugins/evolution/dbwrapper.h deleted file mode 100644 index e5e0a2c33..000000000 --- a/kabc/plugins/evolution/dbwrapper.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef KABC_EVOLUTION_DB_WRAPPER -#define KABC_EVOLUTION_DB_WRAPPER - -#include - -#include -#include - -namespace Evolution { - - class DBWrapper; - class DBIterator { - friend class DBWrapper; - public: - DBIterator( DBWrapper* = 0l ); - ~DBIterator(); - - DBIterator( const DBIterator& ); - DBIterator &operator=( const DBIterator& ); - - TQString key()const; - TQString value()const; - - TQString operator*(); - - DBIterator &operator++(); - DBIterator &operator--(); - - bool operator==( const DBIterator& ); - bool operator!=( const DBIterator& ); - private: - struct Data; - Data* data; - }; - class DBWrapper { - public: - DBWrapper(); - ~DBWrapper(); - - TQString lastError()const; - - bool open( const TQString& file, bool readOnly = false); - bool save(); - DBIterator begin(); - DBIterator end(); - - bool find( const TQString& key, TQString& value ); - bool add( const TQString& key, const TQString& val ); - bool remove( const TQString& key ); - private: - // DBT element( const TQString& ); - struct Data; - Data* data; - - }; - -} - - -#endif diff --git a/kabc/plugins/evolution/evolution.desktop b/kabc/plugins/evolution/evolution.desktop deleted file mode 100644 index 98030e906..000000000 --- a/kabc/plugins/evolution/evolution.desktop +++ /dev/null @@ -1,26 +0,0 @@ -[Desktop Entry] -Name=Evolution -Name[be]=Ð­Ð²Ð°Ð»ÑŽÑ†Ñ‹Ñ -Name[bn]=ইভোলিউশন -Name[eo]=Evoluo -Name[fa]=اوولوشن -Name[hi]=à¤à¤µà¥‰à¤²à¥à¤¯à¥‚शन -Name[ko]=ì—볼루션 -Name[mn]=Хөгжил -Name[ne]=इभोलà¥à¤¯à¥à¤¸à¤¨ -Name[pa]=à¨à¨µà©‚ਲੇਸ਼ਨ -Name[sr]=Еволуција -Name[sr@Latn]=Evolucija -Name[ta]=படிபà¯à®ªà®Ÿà®¿à®¯à®¾à®© வளரà¯à®šà¯à®šà®¿ -Name[te]=ఎవలà±à°¯à±à°·à°¨à± -Name[th]=เอฟโวลูชัน -Name[tt]=ÜseÅŸ -Name[ven]=Tsikoni -Name[wa]=Evolucion -Name[xh]=Utshintsho lwendawo ngokwenqanawa -Name[zu]=Evolushini -X-TDE-Library=kabc_evo -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=evolution diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp deleted file mode 100644 index 415e9928a..000000000 --- a/kabc/plugins/evolution/resourceevo.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include - -#include -#include -#include - -#include - -#include - -#include "dbwrapper.h" -#include "resourceevo.h" - -using namespace Evolution; -using namespace KABC; - -class EvolutionFactory : public KRES::PluginFactoryBase -{ - public: - KRES::Resource *resource( const TDEConfig *config ) - { - return new ResourceEvolution( config ); - } - - KRES::ConfigWidget *configWidget( TQWidget * ) - { - return 0; - } -}; - -extern "C" -{ - KDE_EXPORT void *init_kabc_evo() - { - return ( new EvolutionFactory() ); - } -} - -ResourceEvolution::ResourceEvolution( const TDEConfig* conf ) - : Resource( conf ), mWrap(0l) -{ - m_isOpen = false; -} -ResourceEvolution::~ResourceEvolution() { - delete mWrap; -} -bool ResourceEvolution::doOpen() { - mWrap = new DBWrapper; - if (!mWrap->open( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) { - return false; - } - - TQString val; - if (!mWrap->find( "PAS-DB-VERSION", val ) ) - return false; - - if (!val.startsWith("0.2") ) - return false; - - m_isOpen = true; - - return true; -} -void ResourceEvolution::doClose() { - delete mWrap; - mWrap = 0l; - m_isOpen = false; -} -Ticket* ResourceEvolution::requestSaveTicket() { - if ( !addressBook() ) return 0; - return createTicket( this ); -} -/* - * skip the first key - */ - -bool ResourceEvolution::load() { - /* doOpen never get's called :( */ - if (!doOpen()) return false; - if (!mWrap ) return false; // open first! - - DBIterator it = mWrap->begin(); - // skip the "PAS-DB-VERSION" - - for ( ; it != mWrap->end(); ++it ) { - if ( it.key().startsWith("PAS-DB-VERSION") ) - continue; - - tqWarning( "val:%s", it.value().latin1() ); - VCardTool tool; - TQString str = it.value().stripWhiteSpace(); - Addressee::List list = tool.parseVCards( str ); - if (!list.first().isEmpty() ) { - Addressee adr = list.first(); - adr.setResource(this); - addressBook()->insertAddressee( adr ); - } - } - return true; -} -bool ResourceEvolution::save( Ticket* ticket ) { - delete ticket; - if (!m_isOpen ) return false; - - // just delete the summary so evolution will regenerate it - // on next start up - (void)TQFile::remove( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" ); - - - AddressBook::Iterator it; - Addressee::List list; - for ( it = addressBook()->begin(); it !=addressBook()->end(); ++it ) { - if ( (*it).resource() != this || !(*it).changed() ) - continue; - - // remove, convert add set unchanged false - list.clear(); - mWrap->remove( (*it).uid() ); - VCardTool tool; - list.append( (*it) ); - mWrap->add( (*it).uid(), tool.createVCards( list, VCard::v2_1) ); - - (*it).setChanged( false ); - } - - return true; -} -void ResourceEvolution::removeAddressee( const Addressee& rem) { - if (!m_isOpen) return; - - mWrap->remove( rem.uid() ); -} diff --git a/kabc/plugins/evolution/resourceevo.h b/kabc/plugins/evolution/resourceevo.h deleted file mode 100644 index 29e163e1c..000000000 --- a/kabc/plugins/evolution/resourceevo.h +++ /dev/null @@ -1,23 +0,0 @@ -#include "resource.h" - -namespace Evolution { - class DBWrapper; -} - -namespace KABC { - class ResourceEvolution : public Resource { - public: - ResourceEvolution( const TDEConfig* config ); - ~ResourceEvolution(); - - bool doOpen(); - void doClose(); - Ticket* requestSaveTicket(); - bool load(); - bool save( Ticket* ticket ); - void removeAddressee( const Addressee& ); - private: - Evolution::DBWrapper *mWrap; - bool m_isOpen : 1; - }; -} diff --git a/kabc/plugins/file/CMakeLists.txt b/kabc/plugins/file/CMakeLists.txt deleted file mode 100644 index f8847d7e9..000000000 --- a/kabc/plugins/file/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourcefile.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES file.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_file (library) ####################### - -set( target kabc_file ) - -set( ${target}_SRCS - resourcefile.cpp resourcefileconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_file (module) ######################## - -set( target kabc_file ) - -set( ${target}_SRCS - resourcefileplugin.cpp -) - -tde_add_kpart( ${target} - SOURCES ${${target}_SRCS} - LINK kabc_file-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/file/Makefile.am b/kabc/plugins/file/Makefile.am deleted file mode 100644 index b1530d97d..000000000 --- a/kabc/plugins/file/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcefileconfig.h - -lib_LTLIBRARIES = libkabc_file.la -libkabc_file_la_SOURCES = resourcefile.cpp resourcefileconfig.cpp -libkabc_file_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_file_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEFILE) $(LIB_TDECORE) $(LIB_TDEUI) -libkabc_file_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - - -kde_module_LTLIBRARIES = kabc_file.la -kabc_file_la_SOURCES = resourcefileplugin.cpp -kabc_file_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -kabc_file_la_LIBADD = libkabc_file.la $(LIB_QT) $(LIB_TDECORE) -kabc_file_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_file.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourcefile.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = file.desktop diff --git a/kabc/plugins/file/file.desktop b/kabc/plugins/file/file.desktop deleted file mode 100644 index 1359dd1c6..000000000 --- a/kabc/plugins/file/file.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Name=File -Name[af]=Lêer -Name[ar]=ملÙÙ‘ -Name[az]=Fayl -Name[be]=Файл -Name[bn]=ফাইল -Name[br]=Restr -Name[bs]=Datoteka -Name[ca]=Fitxer -Name[cs]=Soubor -Name[csb]=Lopk -Name[cy]=Ffeil -Name[da]=Fil -Name[de]=Datei -Name[el]=ΑÏχείο -Name[eo]=Dosiero -Name[es]=Archivo -Name[et]=Fail -Name[eu]=Fitxategia -Name[fa]=پرونده -Name[fi]=Tiedosto -Name[fr]=Fichier -Name[fy]=Triem -Name[ga]=Comhad -Name[gl]=Ficheiro -Name[he]=קובץ -Name[hi]=फ़ाइल -Name[hr]=Datoteka -Name[hsb]=Dataja -Name[hu]=Fájl -Name[id]=Berkas -Name[is]=Skrá -Name[ja]=ファイル -Name[ka]=ფáƒáƒ˜áƒšáƒ˜ -Name[kk]=Файл -Name[km]=ឯកសារ -Name[ko]=íŒŒì¼ -Name[lb]=Datei -Name[lt]=Byla -Name[lv]=Fails -Name[mk]=Датотека -Name[mn]=Файл -Name[ms]=Fail -Name[nb]=Fil -Name[nds]=Datei -Name[ne]=फाइल -Name[nl]=Bestand -Name[nn]=Fil -Name[pa]=ਫਾਇਲ -Name[pl]=Plik -Name[pt]=Ficheiro -Name[pt_BR]=Arquivo -Name[ro]=FiÅŸier -Name[ru]=Файл -Name[rw]=Idosiye -Name[se]=Fiila -Name[sk]=Súbor -Name[sl]=Datoteka -Name[sq]=Skedë -Name[sr]=Фајл -Name[sr@Latn]=Fajl -Name[sv]=Fil -Name[ta]=கோபà¯à®ªà¯ -Name[te]=దసà±à°¤à±à°°à°‚ -Name[tg]=Файл -Name[th]=à¹à¸Ÿà¹‰à¸¡ -Name[tr]=Dosya -Name[tt]=Birem -Name[uk]=Файл -Name[uz]=Fayl -Name[uz@cyrillic]=Файл -Name[vi]=Tập tin -Name[wa]=Fitchî -Name[zh_CN]=文件 -Name[zh_HK]=檔案 -Name[zh_TW]=檔案 -X-TDE-Library=kabc_file -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=file diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp deleted file mode 100644 index 7c99782c3..000000000 --- a/kabc/plugins/file/resourcefile.cpp +++ /dev/null @@ -1,395 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2001,2003 Cornelius Schumacher - Copyright (c) 2006 Tom Abers - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "formatfactory.h" -#include "resourcefileconfig.h" -#include "stdaddressbook.h" -#include "lock.h" - -#include "resourcefile.h" - -using namespace KABC; - -ResourceFile::ResourceFile( const TDEConfig *config ) - : Resource( config ), mFormat( 0 ), - mAsynchronous( false ) -{ - TQString fileName, formatName; - - if ( config ) { - fileName = config->readPathEntry( "FileName", StdAddressBook::fileName() ); - formatName = config->readEntry( "FileFormat", "vcard" ); - } else { - fileName = StdAddressBook::fileName(); - formatName = "vcard"; - } - - init( fileName, formatName ); -} - -ResourceFile::ResourceFile( const TQString &fileName, - const TQString &formatName ) - : Resource( 0 ), mFormat( 0 ), - mAsynchronous( false ) -{ - init( fileName, formatName ); -} - -void ResourceFile::init( const TQString &fileName, const TQString &formatName ) -{ - mFormatName = formatName; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); - - if ( !mFormat ) { - mFormatName = "vcard"; - mFormat = factory->format( mFormatName ); - } - - connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( fileChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( fileChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( fileChanged() ) ); - - setFileName( fileName ); - - mLock = 0; -} - -ResourceFile::~ResourceFile() -{ - delete mFormat; - mFormat = 0; -} - -void ResourceFile::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - if ( mFileName == StdAddressBook::fileName() ) - config->deleteEntry( "FileName" ); - else - config->writePathEntry( "FileName", mFileName ); - - config->writeEntry( "FileFormat", mFormatName ); -} - -Ticket *ResourceFile::requestSaveTicket() -{ - kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; - - if ( !addressBook() ) return 0; - - delete mLock; - mLock = new Lock( mFileName ); - - if ( mLock->lock() ) { - addressBook()->emitAddressBookLocked(); - } else { - addressBook()->error( mLock->error() ); - kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock file '" - << mFileName << "': " << mLock->error() << endl; - return 0; - } - - return createTicket( this ); -} - -void ResourceFile::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; - - delete mLock; - mLock = 0; - - addressBook()->emitAddressBookUnlocked(); -} - -bool ResourceFile::doOpen() -{ - TQFile file( mFileName ); - - if ( !file.exists() ) { - // try to create the file - bool ok = file.open( IO_WriteOnly ); - if ( ok ) - file.close(); - - return ok; - } else { - TQFileInfo fileInfo( mFileName ); - if ( readOnly() || !fileInfo.isWritable() ) { - if ( !file.open( IO_ReadOnly ) ) - return false; - } else { - if ( !file.open( IO_ReadWrite ) ) - return false; - } - - if ( file.size() == 0 ) { - file.close(); - kdDebug() << "File size is zero. Evaluating backups" << endl; - for (int i=0; i!=20; i++) - { - TQFile backup( mFileName + "__" + TQString::number(i) ); - kdDebug() << "Evaluating" << backup.name() << " size: " << backup.size() << endl; - if ( backup.size() != 0 ) - { - kdDebug() << "Restoring backup " << i << endl; - const TQString src = mFileName + "__" + TQString::number(i); - const TQString dest = mFileName; - - // remove dest - TQFile::remove( dest ); - - // copy src to dest - if ( backup.open( IO_ReadOnly ) ) { - const TQByteArray data = backup.readAll(); - - TQFile out( dest ); - if ( out.open( IO_WriteOnly ) ) { - out.writeBlock( data ); - out.close(); - } - - backup.close(); - } - return true; - } - } - return true; - } - - bool ok = mFormat->checkFormat( &file ); - file.close(); - - return ok; - } -} - -void ResourceFile::doClose() -{ -} - -bool ResourceFile::load() -{ - kdDebug(5700) << "ResourceFile::load(): '" << mFileName << "'" << endl; - - mAsynchronous = false; - - TQFile file( mFileName ); - if ( !file.open( IO_ReadOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) ); - return false; - } - - clear(); - - return mFormat->loadAll( addressBook(), this, &file ); -} - -bool ResourceFile::asyncLoad() -{ - kdDebug(5700) << "ResourceFile::asyncLoad()" << endl; - - mAsynchronous = true; - - bool ok = load(); - - if ( !ok ) - emitLoadingError(); - else - emitLoadingFinished(); - - return true; -} - -bool ResourceFile::save( Ticket * ) -{ - kdDebug(5700) << "ResourceFile::save()" << endl; - - // Only do the logrotate dance when the __0 file is not 0 bytes. - TQFile file( mFileName + "__0" ); - if ( file.size() != 0 ) { - const TQString last = mFileName + "__20"; - kdDebug() << "deleting " << last << endl; - - TQFile::remove( last ); - - for (int i=19; i>=0; i--) - { - const TQString src = mFileName + "__" + TQString::number(i); - const TQString dest = mFileName + "__" + TQString::number(i+1); - kdDebug() << "moving " << src << " -> " << dest << endl; - - // copy src to dest - TQFile in( src ); - if ( in.open( IO_ReadOnly ) ) { - const TQByteArray data = in.readAll(); - - TQFile out( dest ); - if ( out.open( IO_WriteOnly ) ) { - out.writeBlock( data ); - out.close(); - } - - in.close(); - } - - // remove src - TQFile::remove( src ); - } - } else - kdDebug() << "Not starting logrotate __0 is 0 bytes." << endl; - - TQString extension = "__0"; - (void) KSaveFile::backupFile( mFileName, TQString::null /*directory*/, - extension ); - - mDirWatch.stopScan(); - - KSaveFile saveFile( mFileName ); - bool ok = false; - - if ( saveFile.status() == 0 && saveFile.file() ) { - mFormat->saveAll( addressBook(), this, saveFile.file() ); - ok = saveFile.close(); - } - - if ( !ok ) { - saveFile.abort(); - addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); - } - - mDirWatch.startScan(); - - return ok; -} - -bool ResourceFile::asyncSave( Ticket *ticket ) -{ - kdDebug(5700) << "ResourceFile::asyncSave()" << endl; - - bool ok = save( ticket ); - - if ( !ok ) - TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingError() ) ); - else - TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingFinished() ) ); - - return ok; -} - -void ResourceFile::setFileName( const TQString &fileName ) -{ - mDirWatch.stopScan(); - if ( mDirWatch.contains( mFileName ) ) - mDirWatch.removeFile( mFileName ); - - mFileName = fileName; - - mDirWatch.addFile( mFileName ); - mDirWatch.startScan(); -} - -TQString ResourceFile::fileName() const -{ - return mFileName; -} - -void ResourceFile::setFormat( const TQString &format ) -{ - mFormatName = format; - delete mFormat; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); -} - -TQString ResourceFile::format() const -{ - return mFormatName; -} - -void ResourceFile::fileChanged() -{ - kdDebug(5700) << "ResourceFile::fileChanged(): " << mFileName << endl; - - if ( !addressBook() ) - return; - - if ( mAsynchronous ) - asyncLoad(); - else { - load(); - kdDebug() << "addressBookChanged() " << endl; - addressBook()->emitAddressBookChanged(); - } -} - -void ResourceFile::removeAddressee( const Addressee &addr ) -{ - TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) ); - TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) ); - TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) ); - - mAddrMap.erase( addr.uid() ); -} - -void ResourceFile::emitSavingFinished() -{ - emit savingFinished( this ); -} - -void ResourceFile::emitSavingError() -{ - emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mFileName ) ); -} - -void ResourceFile::emitLoadingFinished() -{ - emit loadingFinished( this ); -} - -void ResourceFile::emitLoadingError() -{ - emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mFileName ) ); -} - -#include "resourcefile.moc" diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h deleted file mode 100644 index 3d2efe85f..000000000 --- a/kabc/plugins/file/resourcefile.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCEFILE_H -#define KABC_RESOURCEFILE_H - -#include -#include - -#include - -#include - -namespace KABC { - -class FormatPlugin; -class ResourceConfigWidget; -class Lock; - -/** - This resource allows access to a local file. -*/ -class KABC_EXPORT ResourceFile : public Resource -{ - Q_OBJECT - - public: - /** - Constructor. - - @param cfg The config object where custom resource settings are stored. - */ - ResourceFile( const TDEConfig *cfg ); - - /** - Construct file resource on file @arg fileName using format @arg formatName. - */ - ResourceFile( const TQString &fileName, const TQString &formatName = "vcard" ); - - /** - Destructor. - */ - ~ResourceFile(); - - /** - Writes the config back. - */ - virtual void writeConfig( TDEConfig *cfg ); - - /** - Tries to open the file and checks for the proper format. - This method should be called before load(). - */ - virtual bool doOpen(); - - /** - Closes the file again. - */ - virtual void doClose(); - - /** - Requests a save ticket, that is used by save() - */ - virtual Ticket *requestSaveTicket(); - - virtual void releaseSaveTicket( Ticket* ); - - /** - Loads all addressees from file to the address book. - Returns true if all addressees could be loaded otherwise false. - */ - virtual bool load(); - - virtual bool asyncLoad(); - - /** - Saves all addresses from address book to file. - Returns true if all addressees could be saved otherwise false. - - @param ticket The ticket returned by requestSaveTicket() - */ - virtual bool save( Ticket *ticket ); - - virtual bool asyncSave( Ticket *ticket ); - - /** - Set name of file to be used for saving. - */ - void setFileName( const TQString & ); - - /** - Return name of file used for loading and saving the address book. - */ - TQString fileName() const; - - /** - Sets a new format by name. - */ - void setFormat( const TQString &name ); - - /** - Returns the format name. - */ - TQString format() const; - - /** - Remove a addressee from its source. - This method is mainly called by KABC::AddressBook. - */ - virtual void removeAddressee( const Addressee& addr ); - - private slots: - void emitLoadingFinished(); - void emitLoadingError(); - void emitSavingFinished(); - void emitSavingError(); - - protected slots: - void fileChanged(); - - protected: - void init( const TQString &fileName, const TQString &format ); - - bool lock( const TQString &fileName ); - void unlock( const TQString &fileName ); - - private: - TQString mFileName; - TQString mFormatName; - - FormatPlugin *mFormat; - - Lock *mLock; - - KDirWatch mDirWatch; - - bool mAsynchronous; - - class ResourceFilePrivate; - ResourceFilePrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp deleted file mode 100644 index 92b07594f..000000000 --- a/kabc/plugins/file/resourcefileconfig.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include - -#include "formatfactory.h" -#include "resourcefile.h" -#include "stdaddressbook.h" - -#include "resourcefileconfig.h" - -using namespace KABC; - -ResourceFileConfig::ResourceFileConfig( TQWidget* parent, const char* name ) - : ConfigWidget( parent, name ) -{ - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, - KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Format:" ), this ); - mFormatBox = new KComboBox( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mFormatBox, 0, 1 ); - - label = new TQLabel( i18n( "Location:" ), this ); - mFileNameEdit = new KURLRequester( this ); - - connect( mFileNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( checkFilePermissions( const TQString & ) ) ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mFileNameEdit, 1, 1 ); - - FormatFactory *factory = FormatFactory::self(); - TQStringList formats = factory->formats(); - TQStringList::Iterator it; - for ( it = formats.begin(); it != formats.end(); ++it ) { - FormatInfo *info = factory->info( *it ); - if ( info ) { - mFormatTypes << (*it); - mFormatBox->insertItem( info->nameLabel ); - } - } - - mInEditMode = false; -} - -void ResourceFileConfig::setEditMode( bool value ) -{ - mFormatBox->setEnabled( !value ); - mInEditMode = value; -} - -void ResourceFileConfig::loadSettings( KRES::Resource *res ) -{ - ResourceFile *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceFileConfig::loadSettings(): cast failed" << endl; - return; - } - - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); - - mFileNameEdit->setURL( resource->fileName() ); - if ( mFileNameEdit->url().isEmpty() ) - mFileNameEdit->setURL( KABC::StdAddressBook::fileName() ); -} - -void ResourceFileConfig::saveSettings( KRES::Resource *res ) -{ - ResourceFile *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceFileConfig::saveSettings(): cast failed" << endl; - return; - } - - if ( !mInEditMode ) - resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); - - resource->setFileName( mFileNameEdit->url() ); -} - -void ResourceFileConfig::checkFilePermissions( const TQString& fileName ) -{ - // If file exist but is not writeable... - if ( access( TQFile::encodeName( fileName ), F_OK ) == 0 ) - emit setReadOnly( access( TQFile::encodeName( fileName ), W_OK ) < 0 ); -} - -#include "resourcefileconfig.moc" diff --git a/kabc/plugins/file/resourcefileconfig.h b/kabc/plugins/file/resourcefileconfig.h deleted file mode 100644 index 18c217eda..000000000 --- a/kabc/plugins/file/resourcefileconfig.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCEFILECONFIG_H -#define RESOURCEFILECONFIG_H - -#include -#include - -#include - -namespace KABC { - -class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget -{ - Q_OBJECT - -public: - ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 ); - - void setEditMode( bool value ); - -public slots: - void loadSettings( KRES::Resource *resource ); - void saveSettings( KRES::Resource *resource ); - -protected slots: - void checkFilePermissions( const TQString& fileName ); - -private: - KComboBox* mFormatBox; - KURLRequester* mFileNameEdit; - bool mInEditMode; - - TQStringList mFormatTypes; -}; - -} - -#endif diff --git a/kabc/plugins/file/resourcefileplugin.cpp b/kabc/plugins/file/resourcefileplugin.cpp deleted file mode 100644 index 4dce19bc0..000000000 --- a/kabc/plugins/file/resourcefileplugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourcefile.h" -#include "resourcefileconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_file() - { - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/ldaptdeio/CMakeLists.txt b/kabc/plugins/ldaptdeio/CMakeLists.txt deleted file mode 100644 index 75098cc9d..000000000 --- a/kabc/plugins/ldaptdeio/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefiles -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourceldaptdeio.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES ldaptdeio.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_ldaptdeio ############################## - -set( target kabc_ldaptdeio ) - -set( ${target}_SRCS - resourceldaptdeio.cpp resourceldaptdeioconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_ldaptdeio ############################## - -set( target kabc_ldaptdeio ) - -set( ${target}_SRCS - resourceldaptdeioplugin.cpp -) - -tde_add_kpart( ${target} - SOURCES ${${target}_SRCS} - LINK kabc_ldaptdeio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/ldaptdeio/Makefile.am b/kabc/plugins/ldaptdeio/Makefile.am deleted file mode 100644 index 9c2d31ad7..000000000 --- a/kabc/plugins/ldaptdeio/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourceldaptdeioconfig.h - -lib_LTLIBRARIES = libkabc_ldaptdeio.la -libkabc_ldaptdeio_la_SOURCES = resourceldaptdeio.cpp resourceldaptdeioconfig.cpp -libkabc_ldaptdeio_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_ldaptdeio_la_LIBADD = $(LIB_KABC) $(LIB_KIO) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEUI) $(LIB_TDECORE) -libkabc_ldaptdeio_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -kde_module_LTLIBRARIES = kabc_ldaptdeio.la -kabc_ldaptdeio_la_SOURCES = resourceldaptdeioplugin.cpp -kabc_ldaptdeio_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kabc_ldaptdeio_la_LIBADD = libkabc_ldaptdeio.la $(LIB_QT) $(LIB_TDECORE) - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_ldaptdeio.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourceldaptdeio.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = ldaptdeio.desktop - -resourceldaptdeioplugin.lo: ../../addressee.h diff --git a/kabc/plugins/ldaptdeio/ldaptdeio.desktop b/kabc/plugins/ldaptdeio/ldaptdeio.desktop deleted file mode 100644 index 9bcd13337..000000000 --- a/kabc/plugins/ldaptdeio/ldaptdeio.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=LDAP -Name[bn]=à¦à¦²-ডি-à¦-পি (LDAP) -Name[hi]=à¤à¤²à¤¡à¥€à¤à¤ªà¥€ (LDAP) -Name[te]=à°Žà°²à±à°¡à°¿à°à°ªà°¿ -X-TDE-Library=kabc_ldaptdeio -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=ldaptdeio diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeio.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeio.cpp deleted file mode 100644 index b28289ecb..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeio.cpp +++ /dev/null @@ -1,1041 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "resourceldaptdeio.h" -#include "resourceldaptdeioconfig.h" - -using namespace KABC; - -// Hack from Netaccess -void tqt_enter_modal( TQWidget *widget ); -void tqt_leave_modal( TQWidget *widget ); - -class ResourceLDAPTDEIO::ResourceLDAPTDEIOPrivate -{ - public: - LDIF mLdif; - bool mTLS,mSSL,mSubTree; - TQString mResultDn; - Addressee mAddr; - Address mAd; - Resource::Iterator mSaveIt; - bool mSASL; - TQString mMech; - TQString mRealm, mBindDN; - LDAPUrl mLDAPUrl; - int mVer, mSizeLimit, mTimeLimit, mRDNPrefix; - int mError; - int mCachePolicy; - bool mReadOnly; - bool mAutoCache; - TQString mCacheDst; - KTempFile *mTmp; -}; - -ResourceLDAPTDEIO::ResourceLDAPTDEIO( const TDEConfig *config ) - : Resource( config ) -{ - d = new ResourceLDAPTDEIOPrivate; - if ( config ) { - TQMap attrList; - TQStringList attributes = config->readListEntry( "LdapAttributes" ); - for ( uint pos = 0; pos < attributes.count(); pos += 2 ) - mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] ); - - mUser = config->readEntry( "LdapUser" ); - mPassword = KStringHandler::obscure( config->readEntry( "LdapPassword" ) ); - mDn = config->readEntry( "LdapDn" ); - mHost = config->readEntry( "LdapHost" ); - mPort = config->readNumEntry( "LdapPort", 389 ); - mFilter = config->readEntry( "LdapFilter" ); - mAnonymous = config->readBoolEntry( "LdapAnonymous" ); - d->mTLS = config->readBoolEntry( "LdapTLS" ); - d->mSSL = config->readBoolEntry( "LdapSSL" ); - d->mSubTree = config->readBoolEntry( "LdapSubTree" ); - d->mSASL = config->readBoolEntry( "LdapSASL" ); - d->mMech = config->readEntry( "LdapMech" ); - d->mRealm = config->readEntry( "LdapRealm" ); - d->mBindDN = config->readEntry( "LdapBindDN" ); - d->mVer = config->readNumEntry( "LdapVer", 3 ); - d->mTimeLimit = config->readNumEntry( "LdapTimeLimit", 0 ); - d->mSizeLimit = config->readNumEntry( "LdapSizeLimit", 0 ); - d->mRDNPrefix = config->readNumEntry( "LdapRDNPrefix", 0 ); - d->mCachePolicy = config->readNumEntry( "LdapCachePolicy", 0 ); - d->mAutoCache = config->readBoolEntry( "LdapAutoCache", true ); - } else { - mPort = 389; - mAnonymous = true; - mUser = mPassword = mHost = mFilter = mDn = ""; - d->mMech = d->mRealm = d->mBindDN = ""; - d->mTLS = d->mSSL = d->mSubTree = d->mSASL = false; - d->mVer = 3; d->mRDNPrefix = 0; - d->mTimeLimit = d->mSizeLimit = 0; - d->mCachePolicy = Cache_No; - d->mAutoCache = true; - } - d->mCacheDst = TDEGlobal::dirs()->saveLocation("cache", "ldaptdeio") + "/" + - type() + "_" + identifier(); - init(); -} - -ResourceLDAPTDEIO::~ResourceLDAPTDEIO() -{ - delete d; -} - -void ResourceLDAPTDEIO::enter_loop() -{ - TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); - dummy.setFocusPolicy( TQ_NoFocus ); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); -} - -void ResourceLDAPTDEIO::entries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) -{ - TDEIO::UDSEntryListConstIterator it = list.begin(); - TDEIO::UDSEntryListConstIterator end = list.end(); - for (; it != end; ++it) { - TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); - for( ; it2 != (*it).end(); it2++ ) { - if ( (*it2).m_uds == TDEIO::UDS_URL ) { - KURL tmpurl( (*it2).m_str ); - d->mResultDn = tmpurl.path(); - kdDebug(7125) << "findUid(): " << d->mResultDn << endl; - if ( d->mResultDn.startsWith("/") ) d->mResultDn.remove(0,1); - return; - } - } - } -} - -void ResourceLDAPTDEIO::listResult( TDEIO::Job *job) -{ - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) - mErrorMsg = job->errorString(); - else - mErrorMsg = ""; - tqApp->exit_loop(); -} - -TQString ResourceLDAPTDEIO::findUid( const TQString &uid ) -{ - LDAPUrl url( d->mLDAPUrl ); - TDEIO::UDSEntry entry; - - mErrorMsg = d->mResultDn = ""; - - url.setAttributes("dn"); - url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); - url.setExtension( "x-dir", "one" ); - - kdDebug(7125) << "ResourceLDAPTDEIO::findUid() uid: " << uid << " url " << - url.prettyURL() << endl; - - TDEIO::ListJob * listJob = TDEIO::listDir( url, false /* no GUI */ ); - connect( listJob, - TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList& ) ), - TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); - connect( listJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( listResult( TDEIO::Job* ) ) ); - - enter_loop(); - return d->mResultDn; -} - -TQCString ResourceLDAPTDEIO::addEntry( const TQString &attr, const TQString &value, bool mod ) -{ - TQCString tmp; - if ( !attr.isEmpty() ) { - if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n"; - tmp += LDIF::assembleLine( attr, value ) + "\n"; - if ( mod ) tmp += "-\n"; - } - return ( tmp ); -} - -bool ResourceLDAPTDEIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, - const TQString &olddn ) -{ - TQCString tmp; - TQString dn; - TQByteArray data; - bool mod = false; - - if ( olddn.isEmpty() ) { - //insert new entry - switch ( d->mRDNPrefix ) { - case 1: - dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," +mDn; - break; - case 0: - default: - dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," +mDn; - break; - } - } else { - //modify existing entry - mod = true; - if ( olddn.startsWith( mAttributes[ "uid" ] ) ) { - dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," + olddn.section( ',', 1 ); - } else if ( olddn.startsWith( mAttributes[ "commonName" ] ) ) { - dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," + - olddn.section( ',', 1 ); - } else { - dn = olddn; - } - - if ( olddn.lower() != dn.lower() ) { - tmp = LDIF::assembleLine( "dn", olddn ) + "\n"; - tmp += "changetype: modrdn\n"; - tmp += LDIF::assembleLine( "newrdn", dn.section( ',', 0, 0 ) ) + "\n"; - tmp += "deleteoldrdn: 1\n\n"; - } - } - - - tmp += LDIF::assembleLine( "dn", dn ) + "\n"; - if ( mod ) tmp += "changetype: modify\n"; - if ( !mod ) { - tmp += "objectClass: top\n"; - TQStringList obclass = TQStringList::split( ',', mAttributes[ "objectClass" ] ); - for ( TQStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) { - tmp += LDIF::assembleLine( "objectClass", *it ) + "\n"; - } - } - - tmp += addEntry( mAttributes[ "commonName" ], addr.assembledName(), mod ); - tmp += addEntry( mAttributes[ "formattedName" ], addr.formattedName(), mod ); - tmp += addEntry( mAttributes[ "givenName" ], addr.givenName(), mod ); - tmp += addEntry( mAttributes[ "familyName" ], addr.familyName(), mod ); - tmp += addEntry( mAttributes[ "uid" ], addr.uid(), mod ); - - PhoneNumber number; - number = addr.phoneNumber( PhoneNumber::Home ); - tmp += addEntry( mAttributes[ "phoneNumber" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Work ); - tmp += addEntry( mAttributes[ "telephoneNumber" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Fax ); - tmp += addEntry( mAttributes[ "facsimileTelephoneNumber" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Cell ); - tmp += addEntry( mAttributes[ "mobile" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Pager ); - tmp += addEntry( mAttributes[ "pager" ], number.number().utf8(), mod ); - - tmp += addEntry( mAttributes[ "description" ], addr.note(), mod ); - tmp += addEntry( mAttributes[ "title" ], addr.title(), mod ); - tmp += addEntry( mAttributes[ "organization" ], addr.organization(), mod ); - - Address ad = addr.address( Address::Home ); - if ( !ad.isEmpty() ) { - tmp += addEntry( mAttributes[ "street" ], ad.street(), mod ); - tmp += addEntry( mAttributes[ "state" ], ad.region(), mod ); - tmp += addEntry( mAttributes[ "city" ], ad.locality(), mod ); - tmp += addEntry( mAttributes[ "postalcode" ], ad.postalCode(), mod ); - } - - TQStringList emails = addr.emails(); - TQStringList::ConstIterator mailIt = emails.begin(); - - if ( !mAttributes[ "mail" ].isEmpty() ) { - if ( mod ) tmp += - LDIF::assembleLine( "replace", mAttributes[ "mail" ] ) + "\n"; - if ( mailIt != emails.end() ) { - tmp += LDIF::assembleLine( mAttributes[ "mail" ], *mailIt ) + "\n"; - mailIt ++; - } - if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += "-\n"; - } - - if ( !mAttributes[ "mailAlias" ].isEmpty() ) { - if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += - LDIF::assembleLine( "replace", mAttributes[ "mailAlias" ] ) + "\n"; - for ( ; mailIt != emails.end(); ++mailIt ) { - tmp += LDIF::assembleLine( mAttributes[ "mailAlias" ], *mailIt ) + "\n" ; - } - if ( mod ) tmp += "-\n"; - } - - if ( !mAttributes[ "jpegPhoto" ].isEmpty() ) { - TQByteArray pic; - TQBuffer buffer( pic ); - buffer.open( IO_WriteOnly ); - addr.photo().data().save( &buffer, "JPEG" ); - - if ( mod ) tmp += - LDIF::assembleLine( "replace", mAttributes[ "jpegPhoto" ] ) + "\n"; - tmp += LDIF::assembleLine( mAttributes[ "jpegPhoto" ], pic, 76 ) + "\n"; - if ( mod ) tmp += "-\n"; - } - - tmp += "\n"; - kdDebug(7125) << "ldif: " << TQString(TQString::fromUtf8(tmp)) << endl; - ldif = tmp; - return true; -} - -void ResourceLDAPTDEIO::setReadOnly( bool value ) -{ - //save the original readonly flag, because offline using disables writing - d->mReadOnly = true; - Resource::setReadOnly( value ); -} - -void ResourceLDAPTDEIO::init() -{ - if ( mPort == 0 ) mPort = 389; - - /** - If you want to add new attributes, append them here, add a - translation string in the ctor of AttributesDialog and - handle them in the load() method below. - These are the default values - */ - if ( !mAttributes.contains("objectClass") ) - mAttributes.insert( "objectClass", "inetOrgPerson" ); - if ( !mAttributes.contains("commonName") ) - mAttributes.insert( "commonName", "cn" ); - if ( !mAttributes.contains("formattedName") ) - mAttributes.insert( "formattedName", "displayName" ); - if ( !mAttributes.contains("familyName") ) - mAttributes.insert( "familyName", "sn" ); - if ( !mAttributes.contains("givenName") ) - mAttributes.insert( "givenName", "givenName" ); - if ( !mAttributes.contains("mail") ) - mAttributes.insert( "mail", "mail" ); - if ( !mAttributes.contains("mailAlias") ) - mAttributes.insert( "mailAlias", "" ); - if ( !mAttributes.contains("phoneNumber") ) - mAttributes.insert( "phoneNumber", "homePhone" ); - if ( !mAttributes.contains("telephoneNumber") ) - mAttributes.insert( "telephoneNumber", "telephoneNumber" ); - if ( !mAttributes.contains("facsimileTelephoneNumber") ) - mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); - if ( !mAttributes.contains("mobile") ) - mAttributes.insert( "mobile", "mobile" ); - if ( !mAttributes.contains("pager") ) - mAttributes.insert( "pager", "pager" ); - if ( !mAttributes.contains("description") ) - mAttributes.insert( "description", "description" ); - - if ( !mAttributes.contains("title") ) - mAttributes.insert( "title", "title" ); - if ( !mAttributes.contains("street") ) - mAttributes.insert( "street", "street" ); - if ( !mAttributes.contains("state") ) - mAttributes.insert( "state", "st" ); - if ( !mAttributes.contains("city") ) - mAttributes.insert( "city", "l" ); - if ( !mAttributes.contains("organization") ) - mAttributes.insert( "organization", "o" ); - if ( !mAttributes.contains("postalcode") ) - mAttributes.insert( "postalcode", "postalCode" ); - - if ( !mAttributes.contains("uid") ) - mAttributes.insert( "uid", "uid" ); - if ( !mAttributes.contains("jpegPhoto") ) - mAttributes.insert( "jpegPhoto", "jpegPhoto" ); - - d->mLDAPUrl = KURL(); - if ( !mAnonymous ) { - d->mLDAPUrl.setUser( mUser ); - d->mLDAPUrl.setPass( mPassword ); - } - d->mLDAPUrl.setProtocol( d->mSSL ? "ldaps" : "ldap"); - d->mLDAPUrl.setHost( mHost ); - d->mLDAPUrl.setPort( mPort ); - d->mLDAPUrl.setDn( mDn ); - - if (!mAttributes.empty()) { - TQMap::Iterator it; - TQStringList attr; - for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { - if ( !it.data().isEmpty() && it.key() != "objectClass" ) - attr.append( it.data() ); - } - d->mLDAPUrl.setAttributes( attr ); - } - - d->mLDAPUrl.setScope( d->mSubTree ? LDAPUrl::Sub : LDAPUrl::One ); - if ( !mFilter.isEmpty() && mFilter != "(objectClass=*)" ) - d->mLDAPUrl.setFilter( mFilter ); - d->mLDAPUrl.setExtension( "x-dir", "base" ); - if ( d->mTLS ) d->mLDAPUrl.setExtension( "x-tls", "" ); - d->mLDAPUrl.setExtension( "x-ver", TQString::number( d->mVer ) ); - if ( d->mSizeLimit ) - d->mLDAPUrl.setExtension( "x-sizelimit", TQString::number( d->mSizeLimit ) ); - if ( d->mTimeLimit ) - d->mLDAPUrl.setExtension( "x-timelimit", TQString::number( d->mTimeLimit ) ); - if ( d->mSASL ) { - d->mLDAPUrl.setExtension( "x-sasl", "" ); - if ( !d->mBindDN.isEmpty() ) d->mLDAPUrl.setExtension( "bindname", d->mBindDN ); - if ( !d->mMech.isEmpty() ) d->mLDAPUrl.setExtension( "x-mech", d->mMech ); - if ( !d->mRealm.isEmpty() ) d->mLDAPUrl.setExtension( "x-realm", d->mRealm ); - } - - d->mReadOnly = readOnly(); - - kdDebug(7125) << "resource_ldaptdeio url: " << d->mLDAPUrl.prettyURL() << endl; -} - -void ResourceLDAPTDEIO::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - config->writeEntry( "LdapUser", mUser ); - config->writeEntry( "LdapPassword", KStringHandler::obscure( mPassword ) ); - config->writeEntry( "LdapDn", mDn ); - config->writeEntry( "LdapHost", mHost ); - config->writeEntry( "LdapPort", mPort ); - config->writeEntry( "LdapFilter", mFilter ); - config->writeEntry( "LdapAnonymous", mAnonymous ); - config->writeEntry( "LdapTLS", d->mTLS ); - config->writeEntry( "LdapSSL", d->mSSL ); - config->writeEntry( "LdapSubTree", d->mSubTree ); - config->writeEntry( "LdapSASL", d->mSASL ); - config->writeEntry( "LdapMech", d->mMech ); - config->writeEntry( "LdapVer", d->mVer ); - config->writeEntry( "LdapTimeLimit", d->mTimeLimit ); - config->writeEntry( "LdapSizeLimit", d->mSizeLimit ); - config->writeEntry( "LdapRDNPrefix", d->mRDNPrefix ); - config->writeEntry( "LdapRealm", d->mRealm ); - config->writeEntry( "LdapBindDN", d->mBindDN ); - config->writeEntry( "LdapCachePolicy", d->mCachePolicy ); - config->writeEntry( "LdapAutoCache", d->mAutoCache ); - - TQStringList attributes; - TQMap::Iterator it; - for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) - attributes << it.key() << it.data(); - - config->writeEntry( "LdapAttributes", attributes ); -} - -Ticket *ResourceLDAPTDEIO::requestSaveTicket() -{ - if ( !addressBook() ) { - kdDebug(7125) << "no addressbook" << endl; - return 0; - } - - return createTicket( this ); -} - -void ResourceLDAPTDEIO::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; -} - -bool ResourceLDAPTDEIO::doOpen() -{ - return true; -} - -void ResourceLDAPTDEIO::doClose() -{ -} - -void ResourceLDAPTDEIO::createCache() -{ - d->mTmp = NULL; - if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) { - d->mTmp = new KTempFile( d->mCacheDst, "tmp" ); - d->mTmp->setAutoDelete( true ); - } -} - -void ResourceLDAPTDEIO::activateCache() -{ - if ( d->mTmp && d->mError == 0 ) { - d->mTmp->close(); - rename( TQFile::encodeName( d->mTmp->name() ), TQFile::encodeName( d->mCacheDst ) ); - } - if ( d->mTmp ) { - delete d->mTmp; - d->mTmp = 0; - } -} - -TDEIO::Job *ResourceLDAPTDEIO::loadFromCache() -{ - TDEIO::Job *job = NULL; - if ( d->mCachePolicy == Cache_Always || - ( d->mCachePolicy == Cache_NoConnection && - d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) { - - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - //initialize ldif parser - d->mLdif.startParsing(); - - Resource::setReadOnly( true ); - - KURL url( d->mCacheDst ); - job = TDEIO::get( url, true, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - } - return job; -} - -bool ResourceLDAPTDEIO::load() -{ - kdDebug(7125) << "ResourceLDAPTDEIO::load()" << endl; - TDEIO::Job *job; - - clear(); - //clear the addressee - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - //initialize ldif parser - d->mLdif.startParsing(); - - //set to original settings, offline use will disable writing - Resource::setReadOnly( d->mReadOnly ); - - createCache(); - if ( d->mCachePolicy != Cache_Always ) { - job = TDEIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); - enter_loop(); - } - - job = loadFromCache(); - if ( job ) { - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); - enter_loop(); - } - if ( mErrorMsg.isEmpty() ) { - kdDebug(7125) << "ResourceLDAPTDEIO load ok!" << endl; - return true; - } else { - kdDebug(7125) << "ResourceLDAPTDEIO load finished with error: " << mErrorMsg << endl; - addressBook()->error( mErrorMsg ); - return false; - } -} - -bool ResourceLDAPTDEIO::asyncLoad() -{ - clear(); - //clear the addressee - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - //initialize ldif parser - d->mLdif.startParsing(); - - Resource::setReadOnly( d->mReadOnly ); - - createCache(); - if ( d->mCachePolicy != Cache_Always ) { - TDEIO::Job *job = TDEIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( result( TDEIO::Job* ) ) ); - } else { - result( NULL ); - } - return true; -} - -void ResourceLDAPTDEIO::data( TDEIO::Job *, const TQByteArray &data ) -{ - if ( data.size() ) { - d->mLdif.setLDIF( data ); - if ( d->mTmp ) { - d->mTmp->file()->writeBlock( data ); - } - } else { - d->mLdif.endLDIF(); - } - - LDIF::ParseVal ret; - TQString name; - TQByteArray value; - do { - ret = d->mLdif.nextItem(); - switch ( ret ) { - case LDIF::NewEntry: - kdDebug(7125) << "new entry: " << d->mLdif.dn() << endl; - break; - case LDIF::Item: - name = d->mLdif.attr().lower(); - value = d->mLdif.val(); - if ( name == mAttributes[ "commonName" ].lower() ) { - if ( !d->mAddr.formattedName().isEmpty() ) { - TQString fn = d->mAddr.formattedName(); - d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); - d->mAddr.setFormattedName( fn ); - } else - d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "formattedName" ].lower() ) { - d->mAddr.setFormattedName( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "givenName" ].lower() ) { - d->mAddr.setGivenName( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "mail" ].lower() ) { - d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), true ); - } else if ( name == mAttributes[ "mailAlias" ].lower() ) { - d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), false ); - } else if ( name == mAttributes[ "phoneNumber" ].lower() ) { - PhoneNumber phone; - phone.setNumber( TQString::fromUtf8( value, value.size() ) ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "telephoneNumber" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Work ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "facsimileTelephoneNumber" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Fax ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "mobile" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Cell ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "pager" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Pager ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "description" ].lower() ) { - d->mAddr.setNote( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "title" ].lower() ) { - d->mAddr.setTitle( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "street" ].lower() ) { - d->mAd.setStreet( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "state" ].lower() ) { - d->mAd.setRegion( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "city" ].lower() ) { - d->mAd.setLocality( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "postalcode" ].lower() ) { - d->mAd.setPostalCode( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "organization" ].lower() ) { - d->mAddr.setOrganization( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "familyName" ].lower() ) { - d->mAddr.setFamilyName( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "uid" ].lower() ) { - d->mAddr.setUid( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "jpegPhoto" ].lower() ) { - KABC::Picture photo; - TQImage img( value ); - if ( !img.isNull() ) { - photo.setData( img ); - photo.setType( "image/jpeg" ); - d->mAddr.setPhoto( photo ); - } - } - - break; - case LDIF::EndEntry: { - d->mAddr.setResource( this ); - d->mAddr.insertAddress( d->mAd ); - d->mAddr.setChanged( false ); - insertAddressee( d->mAddr ); - //clear the addressee - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - } - break; - default: - break; - } - } while ( ret != LDIF::MoreData ); -} - -void ResourceLDAPTDEIO::loadCacheResult( TDEIO::Job *job ) -{ - mErrorMsg = ""; - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { - mErrorMsg = job->errorString(); - } - if ( !mErrorMsg.isEmpty() ) - emit loadingError( this, mErrorMsg ); - else - emit loadingFinished( this ); -} - -void ResourceLDAPTDEIO::result( TDEIO::Job *job ) -{ - mErrorMsg = ""; - if ( job ) { - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { - mErrorMsg = job->errorString(); - } - } else { - d->mError = 0; - } - activateCache(); - - TDEIO::Job *cjob; - cjob = loadFromCache(); - if ( cjob ) { - connect( cjob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( loadCacheResult( TDEIO::Job* ) ) ); - } else { - if ( !mErrorMsg.isEmpty() ) - emit loadingError( this, mErrorMsg ); - else - emit loadingFinished( this ); - } -} - -bool ResourceLDAPTDEIO::save( Ticket* ) -{ - kdDebug(7125) << "ResourceLDAPTDEIO save" << endl; - - d->mSaveIt = begin(); - TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); - enter_loop(); - if ( mErrorMsg.isEmpty() ) { - kdDebug(7125) << "ResourceLDAPTDEIO save ok!" << endl; - return true; - } else { - kdDebug(7125) << "ResourceLDAPTDEIO finished with error: " << mErrorMsg << endl; - addressBook()->error( mErrorMsg ); - return false; - } -} - -bool ResourceLDAPTDEIO::asyncSave( Ticket* ) -{ - kdDebug(7125) << "ResourceLDAPTDEIO asyncSave" << endl; - d->mSaveIt = begin(); - TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( saveResult( TDEIO::Job* ) ) ); - return true; -} - -void ResourceLDAPTDEIO::syncLoadSaveResult( TDEIO::Job *job ) -{ - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) - mErrorMsg = job->errorString(); - else - mErrorMsg = ""; - activateCache(); - - tqApp->exit_loop(); -} - -void ResourceLDAPTDEIO::saveResult( TDEIO::Job *job ) -{ - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) - emit savingError( this, job->errorString() ); - else - emit savingFinished( this ); -} - -void ResourceLDAPTDEIO::saveData( TDEIO::Job*, TQByteArray& data ) -{ - while ( d->mSaveIt != end() && - !(*d->mSaveIt).changed() ) d->mSaveIt++; - - if ( d->mSaveIt == end() ) { - kdDebug(7125) << "ResourceLDAPTDEIO endData" << endl; - data.resize(0); - return; - } - - kdDebug(7125) << "ResourceLDAPTDEIO saveData: " << (*d->mSaveIt).assembledName() << endl; - - AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) ); -// kdDebug(7125) << "ResourceLDAPTDEIO save LDIF: " << TQString::fromUtf8(data) << endl; - // mark as unchanged - (*d->mSaveIt).setChanged( false ); - - d->mSaveIt++; -} - -void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr ) -{ - TQString dn = findUid( addr.uid() ); - - kdDebug(7125) << "ResourceLDAPTDEIO: removeAddressee: " << dn << endl; - - if ( !mErrorMsg.isEmpty() ) { - addressBook()->error( mErrorMsg ); - return; - } - if ( !dn.isEmpty() ) { - kdDebug(7125) << "ResourceLDAPTDEIO: found uid: " << dn << endl; - LDAPUrl url( d->mLDAPUrl ); - url.setPath( "/" + dn ); - url.setExtension( "x-dir", "base" ); - url.setScope( LDAPUrl::Base ); - if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); - } else { - //maybe it's not saved yet - mAddrMap.erase( addr.uid() ); - } -} - - -void ResourceLDAPTDEIO::setUser( const TQString &user ) -{ - mUser = user; -} - -TQString ResourceLDAPTDEIO::user() const -{ - return mUser; -} - -void ResourceLDAPTDEIO::setPassword( const TQString &password ) -{ - mPassword = password; -} - -TQString ResourceLDAPTDEIO::password() const -{ - return mPassword; -} - -void ResourceLDAPTDEIO::setDn( const TQString &dn ) -{ - mDn = dn; -} - -TQString ResourceLDAPTDEIO::dn() const -{ - return mDn; -} - -void ResourceLDAPTDEIO::setHost( const TQString &host ) -{ - mHost = host; -} - -TQString ResourceLDAPTDEIO::host() const -{ - return mHost; -} - -void ResourceLDAPTDEIO::setPort( int port ) -{ - mPort = port; -} - -int ResourceLDAPTDEIO::port() const -{ - return mPort; -} - -void ResourceLDAPTDEIO::setVer( int ver ) -{ - d->mVer = ver; -} - -int ResourceLDAPTDEIO::ver() const -{ - return d->mVer; -} - -void ResourceLDAPTDEIO::setSizeLimit( int sizelimit ) -{ - d->mSizeLimit = sizelimit; -} - -int ResourceLDAPTDEIO::sizeLimit() -{ - return d->mSizeLimit; -} - -void ResourceLDAPTDEIO::setTimeLimit( int timelimit ) -{ - d->mTimeLimit = timelimit; -} - -int ResourceLDAPTDEIO::timeLimit() -{ - return d->mTimeLimit; -} - -void ResourceLDAPTDEIO::setFilter( const TQString &filter ) -{ - mFilter = filter; -} - -TQString ResourceLDAPTDEIO::filter() const -{ - return mFilter; -} - -void ResourceLDAPTDEIO::setIsAnonymous( bool value ) -{ - mAnonymous = value; -} - -bool ResourceLDAPTDEIO::isAnonymous() const -{ - return mAnonymous; -} - -void ResourceLDAPTDEIO::setIsTLS( bool value ) -{ - d->mTLS = value; -} - -bool ResourceLDAPTDEIO::isTLS() const -{ - return d->mTLS; -} -void ResourceLDAPTDEIO::setIsSSL( bool value ) -{ - d->mSSL = value; -} - -bool ResourceLDAPTDEIO::isSSL() const -{ - return d->mSSL; -} - -void ResourceLDAPTDEIO::setIsSubTree( bool value ) -{ - d->mSubTree = value; -} - -bool ResourceLDAPTDEIO::isSubTree() const -{ - return d->mSubTree; -} - -void ResourceLDAPTDEIO::setAttributes( const TQMap &attributes ) -{ - mAttributes = attributes; -} - -TQMap ResourceLDAPTDEIO::attributes() const -{ - return mAttributes; -} - -void ResourceLDAPTDEIO::setRDNPrefix( int value ) -{ - d->mRDNPrefix = value; -} - -int ResourceLDAPTDEIO::RDNPrefix() const -{ - return d->mRDNPrefix; -} - -void ResourceLDAPTDEIO::setIsSASL( bool value ) -{ - d->mSASL = value; -} - -bool ResourceLDAPTDEIO::isSASL() const -{ - return d->mSASL; -} - -void ResourceLDAPTDEIO::setMech( const TQString &mech ) -{ - d->mMech = mech; -} - -TQString ResourceLDAPTDEIO::mech() const -{ - return d->mMech; -} - -void ResourceLDAPTDEIO::setRealm( const TQString &realm ) -{ - d->mRealm = realm; -} - -TQString ResourceLDAPTDEIO::realm() const -{ - return d->mRealm; -} - -void ResourceLDAPTDEIO::setBindDN( const TQString &binddn ) -{ - d->mBindDN = binddn; -} - -TQString ResourceLDAPTDEIO::bindDN() const -{ - return d->mBindDN; -} - -void ResourceLDAPTDEIO::setCachePolicy( int pol ) -{ - d->mCachePolicy = pol; -} - -int ResourceLDAPTDEIO::cachePolicy() const -{ - return d->mCachePolicy; -} - -void ResourceLDAPTDEIO::setAutoCache( bool value ) -{ - d->mAutoCache = value; -} - -bool ResourceLDAPTDEIO::autoCache() -{ - return d->mAutoCache; -} - -TQString ResourceLDAPTDEIO::cacheDst() const -{ - return d->mCacheDst; -} - - -#include "resourceldaptdeio.moc" diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeio.h b/kabc/plugins/ldaptdeio/resourceldaptdeio.h deleted file mode 100644 index 5c9282b9c..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeio.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCELDAP_H -#define KABC_RESOURCELDAP_H - -#include -#include -#include - -class TDEConfig; - -namespace KABC { - -class KABC_EXPORT ResourceLDAPTDEIO : public Resource -{ - Q_OBJECT - - public: - enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always }; - - ResourceLDAPTDEIO( const TDEConfig* ); - virtual ~ResourceLDAPTDEIO(); - /** - * Call this after you used one of the set... methods - */ - virtual void init(); - - virtual void writeConfig( TDEConfig* ); - - virtual bool doOpen(); - virtual void doClose(); - - virtual Ticket *requestSaveTicket(); - virtual void releaseSaveTicket( Ticket* ); - - virtual bool readOnly() const { return Resource::readOnly(); } - virtual void setReadOnly( bool value ); - - virtual bool load(); - virtual bool asyncLoad(); - virtual bool save( Ticket * ticket ); - virtual bool asyncSave( Ticket * ticket ); - - virtual void removeAddressee( const Addressee& addr ); - - void setUser( const TQString &user ); - TQString user() const; - - void setPassword( const TQString &password ); - TQString password() const; - - void setRealm( const TQString &realm ); - TQString realm() const; - - void setBindDN( const TQString &binddn ); - TQString bindDN() const; - - void setDn( const TQString &dn ); - TQString dn() const; - - void setHost( const TQString &host ); - TQString host() const; - - void setPort( int port ); - int port() const; - - void setVer( int ver ); - int ver() const; - - void setSizeLimit( int sizelimit ); - int sizeLimit(); - - void setTimeLimit( int timelimit ); - int timeLimit(); - - void setFilter( const TQString &filter ); - TQString filter() const; - - void setIsAnonymous( bool value ); - bool isAnonymous() const; - - void setAttributes( const TQMap &attributes ); - TQMap attributes() const; - - void setRDNPrefix( int value ); - int RDNPrefix() const; - - void setIsTLS( bool value ); - bool isTLS() const ; - - void setIsSSL( bool value ); - bool isSSL() const; - - void setIsSubTree( bool value ); - bool isSubTree() const ; - - void setIsSASL( bool value ); - bool isSASL() const ; - - void setMech( const TQString &mech ); - TQString mech() const; - - void setCachePolicy( int pol ); - int cachePolicy() const; - - void setAutoCache( bool value ); - bool autoCache(); - - TQString cacheDst() const; - -protected slots: - void entries( TDEIO::Job*, const TDEIO::UDSEntryList& ); - void data( TDEIO::Job*, const TQByteArray& ); - void result( TDEIO::Job* ); - void listResult( TDEIO::Job* ); - void syncLoadSaveResult( TDEIO::Job* ); - void saveResult( TDEIO::Job* ); - void saveData( TDEIO::Job*, TQByteArray& ); - void loadCacheResult( TDEIO::Job* ); - - private: - TQString mUser; - TQString mPassword; - TQString mDn; - TQString mHost; - TQString mFilter; - int mPort; - bool mAnonymous; - TQMap mAttributes; - - KURL mLDAPUrl; - int mGetCounter; //KDE 4: remove - bool mErrorOccured; //KDE 4: remove - TQString mErrorMsg; - TQMap mJobMap; //KDE 4: remove - - TDEIO::Job *loadFromCache(); - void createCache(); - void activateCache(); - void enter_loop(); - TQCString addEntry( const TQString &attr, const TQString &value, bool mod ); - TQString findUid( const TQString &uid ); - bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, - const TQString &olddn ); - - class ResourceLDAPTDEIOPrivate; - ResourceLDAPTDEIOPrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp deleted file mode 100644 index f53ee7d30..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp +++ /dev/null @@ -1,388 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "resourceldaptdeio.h" - -#include "resourceldaptdeioconfig.h" -#include "resourceldaptdeioconfig.moc" - -using namespace KABC; - -ResourceLDAPTDEIOConfig::ResourceLDAPTDEIOConfig( TQWidget* parent, const char* name ) - : KRES::ConfigWidget( parent, name ) -{ - TQBoxLayout *mainLayout = new TQVBoxLayout( this ); - mainLayout->setAutoAdd( true ); - cfg = new LdapConfigWidget( LdapConfigWidget::W_ALL, this ); - - mSubTree = new TQCheckBox( i18n( "Sub-tree query" ), this ); - TQHBox *box = new TQHBox( this ); - box->setSpacing( KDialog::spacingHint() ); - mEditButton = new TQPushButton( i18n( "Edit Attributes..." ), box ); - mCacheButton = new TQPushButton( i18n( "Offline Use..." ), box ); - - connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editAttributes() ) ); - connect( mCacheButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCache() ) ); -} - -void ResourceLDAPTDEIOConfig::loadSettings( KRES::Resource *res ) -{ - ResourceLDAPTDEIO *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceLDAPTDEIOConfig::loadSettings(): cast failed" << endl; - return; - } - - cfg->setUser( resource->user() ); - cfg->setPassword( resource->password() ); - cfg->setRealm( resource->realm() ); - cfg->setBindDN( resource->bindDN() ); - cfg->setHost( resource->host() ); - cfg->setPort( resource->port() ); - cfg->setVer( resource->ver() ); - cfg->setTimeLimit( resource->timeLimit() ); - cfg->setSizeLimit( resource->sizeLimit() ); - cfg->setDn( resource->dn() ); - cfg->setFilter( resource->filter() ); - cfg->setMech( resource->mech() ); - if ( resource->isTLS() ) cfg->setSecTLS(); - else if ( resource->isSSL() ) cfg->setSecSSL(); - else cfg->setSecNO(); - if ( resource->isAnonymous() ) cfg->setAuthAnon(); - else if ( resource->isSASL() ) cfg->setAuthSASL(); - else cfg->setAuthSimple(); - - mSubTree->setChecked( resource->isSubTree() ); - mAttributes = resource->attributes(); - mRDNPrefix = resource->RDNPrefix(); - mCachePolicy = resource->cachePolicy(); - mCacheDst = resource->cacheDst(); - mAutoCache = resource->autoCache(); -} - -void ResourceLDAPTDEIOConfig::saveSettings( KRES::Resource *res ) -{ - ResourceLDAPTDEIO *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceLDAPTDEIOConfig::saveSettings(): cast failed" << endl; - return; - } - - resource->setUser( cfg->user() ); - resource->setPassword( cfg->password() ); - resource->setRealm( cfg->realm() ); - resource->setBindDN( cfg->bindDN() ); - resource->setHost( cfg->host() ); - resource->setPort( cfg->port() ); - resource->setVer( cfg->ver() ); - resource->setTimeLimit( cfg->timeLimit() ); - resource->setSizeLimit( cfg->sizeLimit() ); - resource->setDn( cfg->dn() ); - resource->setFilter( cfg->filter() ); - resource->setIsAnonymous( cfg->isAuthAnon() ); - resource->setIsSASL( cfg->isAuthSASL() ); - resource->setMech( cfg->mech() ); - resource->setIsTLS( cfg->isSecTLS() ); - resource->setIsSSL( cfg->isSecSSL() ); - resource->setIsSubTree( mSubTree->isChecked() ); - resource->setAttributes( mAttributes ); - resource->setRDNPrefix( mRDNPrefix ); - resource->setCachePolicy( mCachePolicy ); - resource->init(); - -} - -void ResourceLDAPTDEIOConfig::editAttributes() -{ - AttributesDialog dlg( mAttributes, mRDNPrefix, this ); - if ( dlg.exec() ) { - mAttributes = dlg.attributes(); - mRDNPrefix = dlg.rdnprefix(); - } -} - -void ResourceLDAPTDEIOConfig::editCache() -{ - LDAPUrl src; - TQStringList attr; - - src = cfg->url(); - src.setScope( mSubTree->isChecked() ? LDAPUrl::Sub : LDAPUrl::One ); - if (!mAttributes.empty()) { - TQMap::Iterator it; - TQStringList attr; - for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { - if ( !it.data().isEmpty() && it.key() != "objectClass" ) - attr.append( it.data() ); - } - src.setAttributes( attr ); - } - src.setExtension( "x-dir", "base" ); - OfflineDialog dlg( mAutoCache, mCachePolicy, src, mCacheDst, this ); - if ( dlg.exec() ) { - mCachePolicy = dlg.cachePolicy(); - mAutoCache = dlg.autoCache(); - } - -} - -AttributesDialog::AttributesDialog( const TQMap &attributes, - int rdnprefix, - TQWidget *parent, const char *name ) - : KDialogBase( Plain, i18n( "Attributes Configuration" ), Ok | Cancel, - Ok, parent, name, true, true ) -{ - mNameDict.setAutoDelete( true ); - mNameDict.insert( "objectClass", new TQString( i18n( "Object classes" ) ) ); - mNameDict.insert( "commonName", new TQString( i18n( "Common name" ) ) ); - mNameDict.insert( "formattedName", new TQString( i18n( "Formatted name" ) ) ); - mNameDict.insert( "familyName", new TQString( i18n( "Family name" ) ) ); - mNameDict.insert( "givenName", new TQString( i18n( "Given name" ) ) ); - mNameDict.insert( "organization", new TQString( i18n( "Organization" ) ) ); - mNameDict.insert( "title", new TQString( i18n( "Title" ) ) ); - mNameDict.insert( "street", new TQString( i18n( "Street" ) ) ); - mNameDict.insert( "state", new TQString( i18n( "State" ) ) ); - mNameDict.insert( "city", new TQString( i18n( "City" ) ) ); - mNameDict.insert( "postalcode", new TQString( i18n( "Postal code" ) ) ); - mNameDict.insert( "mail", new TQString( i18n( "Email" ) ) ); - mNameDict.insert( "mailAlias", new TQString( i18n( "Email alias" ) ) ); - mNameDict.insert( "phoneNumber", new TQString( i18n( "Telephone number" ) ) ); - mNameDict.insert( "telephoneNumber", new TQString( i18n( "Work telephone number" ) ) ); - mNameDict.insert( "facsimileTelephoneNumber", new TQString( i18n( "Fax number" ) ) ); - mNameDict.insert( "mobile", new TQString( i18n( "Cell phone number" ) ) ); - mNameDict.insert( "pager", new TQString( i18n( "Pager" ) ) ); - mNameDict.insert( "description", new TQString( i18n( "Note" ) ) ); - mNameDict.insert( "uid", new TQString( i18n( "UID" ) ) ); - mNameDict.insert( "jpegPhoto", new TQString( i18n( "Photo" ) ) ); - - // default map - mDefaultMap.insert( "objectClass", "inetOrgPerson" ); - mDefaultMap.insert( "commonName", "cn" ); - mDefaultMap.insert( "formattedName", "displayName" ); - mDefaultMap.insert( "familyName", "sn" ); - mDefaultMap.insert( "givenName", "givenName" ); - mDefaultMap.insert( "title", "title" ); - mDefaultMap.insert( "street", "street" ); - mDefaultMap.insert( "state", "st" ); - mDefaultMap.insert( "city", "l" ); - mDefaultMap.insert( "organization", "o" ); - mDefaultMap.insert( "postalcode", "postalCode" ); - mDefaultMap.insert( "mail", "mail" ); - mDefaultMap.insert( "mailAlias", "" ); - mDefaultMap.insert( "phoneNumber", "homePhone" ); - mDefaultMap.insert( "telephoneNumber", "telephoneNumber" ); - mDefaultMap.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); - mDefaultMap.insert( "mobile", "mobile" ); - mDefaultMap.insert( "pager", "pager" ); - mDefaultMap.insert( "description", "description" ); - mDefaultMap.insert( "uid", "uid" ); - mDefaultMap.insert( "jpegPhoto", "jpegPhoto" ); - - // overwrite the default values here - TQMap kolabMap, netscapeMap, evolutionMap, outlookMap; - - // kolab - kolabMap.insert( "formattedName", "display-name" ); - kolabMap.insert( "mailAlias", "mailalias" ); - - // evolution - evolutionMap.insert( "formattedName", "fileAs" ); - - mMapList.append( attributes ); - mMapList.append( kolabMap ); - mMapList.append( netscapeMap ); - mMapList.append( evolutionMap ); - mMapList.append( outlookMap ); - - TQFrame *page = plainPage(); - TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1, - 0, spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Template:" ), page ); - layout->addWidget( label, 0, 0 ); - mMapCombo = new KComboBox( page ); - layout->addWidget( mMapCombo, 0, 1 ); - - mMapCombo->insertItem( i18n( "User Defined" ) ); - mMapCombo->insertItem( i18n( "Kolab" ) ); - mMapCombo->insertItem( i18n( "Netscape" ) ); - mMapCombo->insertItem( i18n( "Evolution" ) ); - mMapCombo->insertItem( i18n( "Outlook" ) ); - connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) ); - - label = new TQLabel( i18n( "RDN prefix attribute:" ), page ); - layout->addWidget( label, 1, 0 ); - mRDNCombo = new KComboBox( page ); - layout->addWidget( mRDNCombo, 1, 1 ); - mRDNCombo->insertItem( i18n( "commonName" ) ); - mRDNCombo->insertItem( i18n( "UID" ) ); - mRDNCombo->setCurrentItem( rdnprefix ); - - TQMap::ConstIterator it; - int i, j = 0; - for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) { - if ( mNameDict[ it.key() ] == 0 ) { - i--; - continue; - } - if ( (uint)(i - 2) == ( mNameDict.count() >> 1 ) ) { - i = 0; - j = 2; - } - kdDebug(7125) << "itkey: " << it.key() << " i: " << i << endl; - label = new TQLabel( *mNameDict[ it.key() ] + ":", page ); - KLineEdit *lineedit = new KLineEdit( page ); - mLineEditDict.insert( it.key(), lineedit ); - lineedit->setText( it.data() ); - label->setBuddy( lineedit ); - layout->addWidget( label, i, j ); - layout->addWidget( lineedit, i, j+1 ); - } - - for ( i = 1; i < mMapCombo->count(); i++ ) { - TQDictIterator it2( mLineEditDict ); - for ( ; it2.current(); ++it2 ) { - if ( mMapList[ i ].contains( it2.currentKey() ) ) { - if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break; - } else { - if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break; - } - } - if ( !it2.current() ) { - mMapCombo->setCurrentItem( i ); - break; - } - } - - TDEAcceleratorManager::manage( this ); -} - -AttributesDialog::~AttributesDialog() -{ -} - -TQMap AttributesDialog::attributes() const -{ - TQMap map; - - TQDictIterator it( mLineEditDict ); - for ( ; it.current(); ++it ) - map.insert( it.currentKey(), it.current()->text() ); - - return map; -} - -int AttributesDialog::rdnprefix() const -{ - return mRDNCombo->currentItem(); -} - -void AttributesDialog::mapChanged( int pos ) -{ - - // apply first the default and than the spezific changes - TQMap::Iterator it; - for ( it = mDefaultMap.begin(); it != mDefaultMap.end(); ++it ) - mLineEditDict[ it.key() ]->setText( it.data() ); - - for ( it = mMapList[ pos ].begin(); it != mMapList[ pos ].end(); ++it ) { - if ( !it.data().isEmpty() ) { - KLineEdit *le = mLineEditDict[ it.key() ]; - if ( le ) le->setText( it.data() ); - } - } -} - -OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, - const TQString &dst, TQWidget *parent, const char *name ) - : KDialogBase( Plain, i18n( "Offline Configuration" ), Ok | Cancel, - Ok, parent, name, true, true ) -{ - TQFrame *page = plainPage(); - TQVBoxLayout *layout = new TQVBoxLayout( page ); - layout->setAutoAdd( true ); - - mSrc = src; mDst = dst; - mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal, - i18n("Offline Cache Policy"), page ); - - TQRadioButton *bt; - new TQRadioButton( i18n("Do not use offline cache"), mCacheGroup ); - bt = new TQRadioButton( i18n("Use local copy if no connection"), mCacheGroup ); - new TQRadioButton( i18n("Always use local copy"), mCacheGroup ); - mCacheGroup->setButton( cachePolicy ); - - mAutoCache = new TQCheckBox( i18n("Refresh offline cache automatically"), - page ); - mAutoCache->setChecked( autoCache ); - mAutoCache->setEnabled( bt->isChecked() ); - - connect( bt, TQT_SIGNAL(toggled(bool)), mAutoCache, TQT_SLOT(setEnabled(bool)) ); - - TQPushButton *lcache = new TQPushButton( i18n("Load into Cache"), page ); - connect( lcache, TQT_SIGNAL( clicked() ), TQT_SLOT( loadCache() ) ); -} - -OfflineDialog::~OfflineDialog() -{ -} - -bool OfflineDialog::autoCache() const -{ - return mAutoCache->isChecked(); -} - -int OfflineDialog::cachePolicy() const -{ - return mCacheGroup->selectedId(); -} - -void OfflineDialog::loadCache() -{ - if ( TDEIO::NetAccess::download( mSrc, mDst, this ) ) { - KMessageBox::information( this, - i18n("Successfully downloaded directory server contents!") ); - } else { - KMessageBox::error( this, - i18n("An error occurred downloading directory server contents into file %1.").arg(mDst) ); - } -} diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h deleted file mode 100644 index 0fde41d64..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCELDAPCONFIG_H -#define RESOURCELDAPCONFIG_H - -#include -#include -#include -#include - -#include -#include -#include -#include - - -class TQCheckBox; -class TQPushButton; -class TQSpinBox; -class TQString; - -class KComboBox; -class KLineEdit; - -namespace KABC { - -class KABC_EXPORT ResourceLDAPTDEIOConfig : public KRES::ConfigWidget -{ - Q_OBJECT - - public: - ResourceLDAPTDEIOConfig( TQWidget* parent = 0, const char* name = 0 ); - - public slots: - void loadSettings( KRES::Resource* ); - void saveSettings( KRES::Resource* ); - - private slots: - void editAttributes(); - void editCache(); - private: - TQPushButton *mEditButton, *mCacheButton; - LdapConfigWidget *cfg; - TQCheckBox *mSubTree; - TQMap mAttributes; - int mRDNPrefix, mCachePolicy; - bool mAutoCache; - TQString mCacheDst; -}; - -class AttributesDialog : public KDialogBase -{ - Q_OBJECT - - public: - AttributesDialog( const TQMap &attributes, int rdnprefix, - TQWidget *parent, const char *name = 0 ); - ~AttributesDialog(); - - TQMap attributes() const; - int rdnprefix() const; - - private slots: - void mapChanged( int pos ); - - private: - enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap }; - - KComboBox *mMapCombo, *mRDNCombo; - TQValueList< TQMap > mMapList; - TQMap mDefaultMap; - TQDict mLineEditDict; - TQDict mNameDict; -}; - -class OfflineDialog : public KDialogBase -{ - Q_OBJECT - - public: - OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, - const TQString &dst, TQWidget *parent, const char *name = 0 ); - ~OfflineDialog(); - - int cachePolicy() const; - bool autoCache() const; - - private slots: - void loadCache(); - - private: - KURL mSrc; - TQString mDst; - TQButtonGroup *mCacheGroup; - TQCheckBox *mAutoCache; -}; - -} - -#endif diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp deleted file mode 100644 index ac08e8e2b..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourceldaptdeio.h" -#include "resourceldaptdeioconfig.h" - -#include -#include - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_ldaptdeio() - { - TDEGlobal::locale()->insertCatalogue("kabc_ldaptdeio"); - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/net/CMakeLists.txt b/kabc/plugins/net/CMakeLists.txt deleted file mode 100644 index e92fbfc32..000000000 --- a/kabc/plugins/net/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourcenet.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES net.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_net (library) ######################## - -set( target kabc_net ) - -set( ${target}_SRCS - resourcenet.cpp resourcenetconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_net (module) ######################### - -set( target kabc_net ) - -set( ${target}_SRCS - resourcenetplugin.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kabc_net-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/net/Makefile.am b/kabc/plugins/net/Makefile.am deleted file mode 100644 index ca0ece015..000000000 --- a/kabc/plugins/net/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcenetconfig.h - -lib_LTLIBRARIES = libkabc_net.la -libkabc_net_la_SOURCES = resourcenet.cpp resourcenetconfig.cpp -libkabc_net_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_net_la_LIBADD = $(top_builddir)/kabc/libkabc.la $(LIB_KIO) -libkabc_net_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -kde_module_LTLIBRARIES = kabc_net.la -kabc_net_la_SOURCES = resourcenetplugin.cpp -kabc_net_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -L../../../tdecore/.libs/ -ltdecore -kabc_net_la_LIBADD = libkabc_net.la - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_net.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourcenet.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = net.desktop - -resourcenetplugin.lo: ../../addressee.h diff --git a/kabc/plugins/net/net.desktop b/kabc/plugins/net/net.desktop deleted file mode 100644 index 2c72c202d..000000000 --- a/kabc/plugins/net/net.desktop +++ /dev/null @@ -1,90 +0,0 @@ -[Desktop Entry] -Name=Network -Name[af]=Netwerk -Name[ar]=الشبكة -Name[az]=ŞəbÉ™kÉ™ -Name[be]=Сетка -Name[bn]=নেটওয়ারà§à¦• -Name[br]=Rouedad -Name[bs]=Mreža -Name[ca]=Xarxa -Name[cs]=Síť -Name[csb]=Sec -Name[cy]=Rhydwaith -Name[da]=Netværk -Name[de]=Netzwerk -Name[el]=Δίκτυο -Name[eo]=Reto -Name[es]=Red -Name[et]=Võrk -Name[eu]=Sarea -Name[fa]=شبکه -Name[fi]=Verkko -Name[fr]=Réseau -Name[fy]=Netwurk -Name[ga]=Líonra -Name[gl]=Rede -Name[he]=רשת -Name[hi]=नेटवरà¥à¤• -Name[hr]=Mreža -Name[hsb]=Syć -Name[hu]=Hálózat -Name[id]=Jaringan -Name[is]=Net -Name[it]=Rete -Name[ja]=ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ -Name[ka]=ქსელი -Name[kk]=Желі -Name[km]=បណ្ážáž¶áž‰ -Name[ko]=ë„¤íŠ¸ì›Œí¬ -Name[ku]=Tor -Name[lb]=Netzwierk -Name[lt]=Tinklas -Name[lv]=TÄ«kls -Name[mi]=Hao -Name[mk]=Мрежа -Name[mn]=СүлжÑÑ -Name[ms]=Jaringan -Name[nds]=Nettwark -Name[ne]=सञà¥à¤œà¤¾à¤² -Name[nl]=Netwerk -Name[nn]=Nettverk -Name[nso]=Kgokagano -Name[oc]=Resèu -Name[pa]=ਨੈੱਟਵਰਕ -Name[pl]=Sieć -Name[pt]=Rede -Name[pt_BR]=Rede -Name[ro]=ReÅ£ea -Name[ru]=Сеть -Name[rw]=Urusobe -Name[se]=Fierbmi -Name[sk]=SieÅ¥ -Name[sl]=Omrežje -Name[sq]=Rrjeta -Name[sr]=Мрежа -Name[sr@Latn]=Mreža -Name[ss]=Luchungechunge -Name[sv]=Nätverk -Name[ta]=பிணையம௠-Name[te]=కలన జాలం -Name[tg]=Шабака -Name[th]=ระบบเครือข่าย -Name[tr]=AÄŸ -Name[tt]=Çeltär -Name[uk]=Мережа -Name[uz]=Tarmoq -Name[uz@cyrillic]=Tarмоқ -Name[ven]=Vhukwamani -Name[vi]=mạng -Name[wa]=Rantoele -Name[xh]=Umsebenzi womnatha -Name[zh_CN]=网络 -Name[zh_HK]=網絡 -Name[zh_TW]=網路 -Name[zu]=Umsebenzi wokuxhumana okusakazekile -X-TDE-Library=kabc_net -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=net diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp deleted file mode 100644 index 9ef909904..000000000 --- a/kabc/plugins/net/resourcenet.cpp +++ /dev/null @@ -1,393 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "formatfactory.h" -#include "resourcenetconfig.h" -#include "stdaddressbook.h" - -#include "resourcenet.h" - -using namespace KABC; - -class ResourceNet::ResourceNetPrivate -{ - public: - TDEIO::Job *mLoadJob; - bool mIsLoading; - - TDEIO::Job *mSaveJob; - bool mIsSaving; - - TQString mLastErrorString; -}; - -ResourceNet::ResourceNet( const TDEConfig *config ) - : Resource( config ), mFormat( 0 ), - mTempFile( 0 ), - d( new ResourceNetPrivate ) -{ - if ( config ) { - init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) ); - } else { - init( KURL(), TQString("vcard").latin1() ); - } -} - -ResourceNet::ResourceNet( const KURL &url, const TQString &format ) - : Resource( 0 ), mFormat( 0 ), - mTempFile( 0 ), - d( new ResourceNetPrivate ) -{ - init( url, format ); -} - -void ResourceNet::init( const KURL &url, const TQString &format ) -{ - d->mLoadJob = 0; - d->mIsLoading = false; - d->mSaveJob = 0; - d->mIsSaving = false; - - mFormatName = format; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); - if ( !mFormat ) { - mFormatName = TQString("vcard").latin1(); - mFormat = factory->format( mFormatName ); - } - - setUrl( url ); -} - -ResourceNet::~ResourceNet() -{ - if ( d->mIsLoading ) - d->mLoadJob->kill(); - if ( d->mIsSaving ) - d->mSaveJob->kill(); - - delete d; - d = 0; - - delete mFormat; - mFormat = 0; - - deleteLocalTempFile(); -} - -void ResourceNet::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - config->writePathEntry( "NetUrl", mUrl.url() ); - config->writeEntry( "NetFormat", mFormatName ); -} - -Ticket *ResourceNet::requestSaveTicket() -{ - kdDebug(5700) << "ResourceNet::requestSaveTicket()" << endl; - - return createTicket( this ); -} - -void ResourceNet::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; -} - -bool ResourceNet::doOpen() -{ - return true; -} - -void ResourceNet::doClose() -{ -} - -bool ResourceNet::load() -{ - TQString tempFile; - - if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) { - addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); - return false; - } - - TQFile file( tempFile ); - if ( !file.open( IO_ReadOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); - TDEIO::NetAccess::removeTempFile( tempFile ); - return false; - } - - bool result = clearAndLoad( &file ); - if ( !result ) - addressBook()->error( i18n( "Problems during parsing file '%1'." ).arg( tempFile ) ); - - TDEIO::NetAccess::removeTempFile( tempFile ); - - return result; -} - -bool ResourceNet::clearAndLoad( TQFile *file ) -{ - clear(); - return mFormat->loadAll( addressBook(), this, file ); -} - -bool ResourceNet::asyncLoad() -{ - if ( d->mIsLoading ) { - abortAsyncLoading(); - } - - if (d->mIsSaving) { - kdWarning(5700) << "Aborted asyncLoad() because we're still asyncSave()ing!" << endl; - return false; - } - - bool ok = createLocalTempFile(); - if ( ok ) - mTempFile->sync(); - ok = mTempFile->close(); - - if ( !ok ) { - emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); - deleteLocalTempFile(); - return false; - } - - KURL dest; - dest.setPath( mTempFile->name() ); - - TDEIO::Scheduler::checkSlaveOnHold( true ); - d->mLoadJob = TDEIO::file_copy( mUrl, dest, -1, true, false, false ); - d->mIsLoading = true; - connect( d->mLoadJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( downloadFinished( TDEIO::Job* ) ) ); - - return true; -} - -void ResourceNet::abortAsyncLoading() -{ - kdDebug(5700) << "ResourceNet::abortAsyncLoading()" << endl; - - if ( d->mLoadJob ) { - d->mLoadJob->kill(); // result not emitted - d->mLoadJob = 0; - } - - deleteLocalTempFile(); - d->mIsLoading = false; -} - -void ResourceNet::abortAsyncSaving() -{ - kdDebug(5700) << "ResourceNet::abortAsyncSaving()" << endl; - - if ( d->mSaveJob ) { - d->mSaveJob->kill(); // result not emitted - d->mSaveJob = 0; - } - - deleteLocalTempFile(); - d->mIsSaving = false; -} - -bool ResourceNet::save( Ticket* ) -{ - kdDebug(5700) << "ResourceNet::save()" << endl; - - if (d->mIsSaving) { - abortAsyncSaving(); - } - - KTempFile tempFile; - tempFile.setAutoDelete( true ); - bool ok = false; - - if ( tempFile.status() == 0 && tempFile.file() ) { - saveToFile( tempFile.file() ); - tempFile.sync(); - ok = tempFile.close(); - } - - if ( !ok ) { - addressBook()->error( i18n( "Unable to save file '%1'." ).arg( tempFile.name() ) ); - return false; - } - - ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); - if ( !ok ) - addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) ); - - return ok; -} - -bool ResourceNet::asyncSave( Ticket* ) -{ - kdDebug(5700) << "ResourceNet::asyncSave()" << endl; - - if (d->mIsSaving) { - abortAsyncSaving(); - } - - if (d->mIsLoading) { - kdWarning(5700) << "Aborted asyncSave() because we're still asyncLoad()ing!" << endl; - return false; - } - - bool ok = createLocalTempFile(); - if ( ok ) { - saveToFile( mTempFile->file() ); - mTempFile->sync(); - ok = mTempFile->close(); - } - - if ( !ok ) { - emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mTempFile->name() ) ); - deleteLocalTempFile(); - return false; - } - - KURL src; - src.setPath( mTempFile->name() ); - - TDEIO::Scheduler::checkSlaveOnHold( true ); - d->mIsSaving = true; - d->mSaveJob = TDEIO::file_copy( src, mUrl, -1, true, false, false ); - connect( d->mSaveJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( uploadFinished( TDEIO::Job* ) ) ); - - return true; -} - -bool ResourceNet::createLocalTempFile() -{ - deleteStaleTempFile(); - mTempFile = new KTempFile(); - mTempFile->setAutoDelete( true ); - return mTempFile->status() == 0; -} - -void ResourceNet::deleteStaleTempFile() -{ - if ( hasTempFile() ) { - kdDebug(5700) << "stale temp file detected " << mTempFile->name() << endl; - deleteLocalTempFile(); - } -} - -void ResourceNet::deleteLocalTempFile() -{ - delete mTempFile; - mTempFile = 0; -} - -void ResourceNet::saveToFile( TQFile *file ) -{ - mFormat->saveAll( addressBook(), this, file ); -} - -void ResourceNet::setUrl( const KURL &url ) -{ - mUrl = url; -} - -KURL ResourceNet::url() const -{ - return mUrl; -} - -void ResourceNet::setFormat( const TQString &name ) -{ - mFormatName = name; - if ( mFormat ) - delete mFormat; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); -} - -TQString ResourceNet::format() const -{ - return mFormatName; -} - -void ResourceNet::downloadFinished( TDEIO::Job* ) -{ - kdDebug(5700) << "ResourceNet::downloadFinished()" << endl; - - d->mIsLoading = false; - - if ( !hasTempFile() || mTempFile->status() != 0 ) { - d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" ); - TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) ); - return; - } - - TQFile file( mTempFile->name() ); - if ( file.open( IO_ReadOnly ) ) { - if ( clearAndLoad( &file ) ) - emit loadingFinished( this ); - else - emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mTempFile->name() ) ); - } - else { - emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); - } - - deleteLocalTempFile(); -} - -void ResourceNet::uploadFinished( TDEIO::Job *job ) -{ - kdDebug(5700) << "ResourceFile::uploadFinished()" << endl; - - d->mIsSaving = false; - - if ( job->error() ) - emit savingError( this, job->errorString() ); - else - emit savingFinished( this ); - - deleteLocalTempFile(); -} - -void ResourceNet::signalError() -{ - emit loadingError( this, d->mLastErrorString ); - d->mLastErrorString.truncate( 0 ); -} - -#include "resourcenet.moc" diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h deleted file mode 100644 index 940627ecb..000000000 --- a/kabc/plugins/net/resourcenet.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCENET_H -#define KABC_RESOURCENET_H - -#include - -#include - -#include - -class TQFile; -class TQTimer; -class KTempFile; - -namespace TDEIO { -class Job; -} - -namespace KABC { - -class FormatPlugin; - -/** - @internal -*/ -class KABC_EXPORT ResourceNet : public Resource -{ - Q_OBJECT - - public: - ResourceNet( const TDEConfig* ); - ResourceNet( const KURL &url, const TQString &format ); - ~ResourceNet(); - - virtual void writeConfig( TDEConfig* ); - - virtual bool doOpen(); - virtual void doClose(); - - virtual Ticket *requestSaveTicket(); - virtual void releaseSaveTicket( Ticket* ); - - virtual bool load(); - virtual bool asyncLoad(); - virtual bool save( Ticket* ticket ); - virtual bool asyncSave( Ticket* ticket ); - - /** - Set url of directory to be used for saving. - */ - void setUrl( const KURL & ); - - /** - Return url of directory used for loading and saving the address book. - */ - KURL url() const; - - /** - Sets a new format by name. - */ - void setFormat( const TQString &name ); - - /** - Returns the format name. - */ - TQString format() const; - - protected: - void init( const KURL &url, const TQString &format ); - - private slots: - void downloadFinished( TDEIO::Job* ); - void uploadFinished( TDEIO::Job* ); - void signalError(); - - private: - bool clearAndLoad( TQFile *file ); - void saveToFile( TQFile *file ); - bool hasTempFile() const { return mTempFile != 0; } - void abortAsyncLoading(); - void abortAsyncSaving(); - bool createLocalTempFile(); - void deleteLocalTempFile(); - void deleteStaleTempFile(); - - FormatPlugin *mFormat; - TQString mFormatName; - - KURL mUrl; - KTempFile *mTempFile; - - class ResourceNetPrivate; - ResourceNetPrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp deleted file mode 100644 index b441fbd98..000000000 --- a/kabc/plugins/net/resourcenetconfig.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include - -#include "formatfactory.h" -#include "resourcenet.h" -#include "stdaddressbook.h" - -#include "resourcenetconfig.h" - -using namespace KABC; - -ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name ) - : ConfigWidget( parent, name ), mInEditMode( false ) -{ - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, - KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Format:" ), this ); - mFormatBox = new KComboBox( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mFormatBox, 0, 1 ); - - label = new TQLabel( i18n( "Location:" ), this ); - mUrlEdit = new KURLRequester( this ); - mUrlEdit->setMode( KFile::File ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mUrlEdit, 1, 1 ); - - FormatFactory *factory = FormatFactory::self(); - TQStringList formats = factory->formats(); - TQStringList::Iterator it; - for ( it = formats.begin(); it != formats.end(); ++it ) { - FormatInfo *info = factory->info( *it ); - if ( info ) { - mFormatTypes << (*it); - mFormatBox->insertItem( info->nameLabel ); - } - } -} - -void ResourceNetConfig::setEditMode( bool value ) -{ - mFormatBox->setEnabled( !value ); - mInEditMode = value; -} - -void ResourceNetConfig::loadSettings( KRES::Resource *res ) -{ - ResourceNet *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceNetConfig::loadSettings(): cast failed" << endl; - return; - } - - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); - - mUrlEdit->setURL( resource->url().url() ); -} - -void ResourceNetConfig::saveSettings( KRES::Resource *res ) -{ - ResourceNet *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceNetConfig::saveSettings(): cast failed" << endl; - return; - } - - if ( !mInEditMode ) - resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); - - resource->setUrl( KURL( mUrlEdit->url() ) ); -} - -#include "resourcenetconfig.moc" diff --git a/kabc/plugins/net/resourcenetconfig.h b/kabc/plugins/net/resourcenetconfig.h deleted file mode 100644 index 3c8986122..000000000 --- a/kabc/plugins/net/resourcenetconfig.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCENETCONFIG_H -#define RESOURCENETCONFIG_H - -#include -#include - -#include - -namespace KABC { - -class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget -{ - Q_OBJECT - - public: - ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 ); - - void setEditMode( bool value ); - - public slots: - void loadSettings( KRES::Resource *resource ); - void saveSettings( KRES::Resource *resource ); - - private: - KComboBox* mFormatBox; - KURLRequester* mUrlEdit; - - TQStringList mFormatTypes; - bool mInEditMode; -}; - -} -#endif diff --git a/kabc/plugins/net/resourcenetplugin.cpp b/kabc/plugins/net/resourcenetplugin.cpp deleted file mode 100644 index 189bab051..000000000 --- a/kabc/plugins/net/resourcenetplugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourcenet.h" -#include "resourcenetconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_net() - { - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/sql/Makefile.am b/kabc/plugins/sql/Makefile.am deleted file mode 100644 index 3fa3986ce..000000000 --- a/kabc/plugins/sql/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcesql.h resourcesqlconfig.h - -kde_module_LTLIBRARIES = kabc_sql.la - -kabc_sql_la_SOURCES = resourcesql.cpp resourcesqlconfig.cpp - -kabc_sql_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kabc_sql_la_LIBADD = ../../libkabc.la ../../../tdeui/libtdeui.la - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_sql.pot - -linkdir = $(kde_datadir)/tderesources/contact -link_DATA = sql.desktop -EXTRA_DIST = $(link_DATA) diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp deleted file mode 100644 index 150fe54eb..000000000 --- a/kabc/plugins/sql/resourcesql.cpp +++ /dev/null @@ -1,338 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include "resourcesql.h" -#include "resourcesqlconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_sql() - { - return new KRES::PluginFactory(); - } -} - -ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config ) - : Resource( ab ), mDb( 0 ) -{ - TQString user, password, db, host; - - user = config->readEntry( "SqlUser" ); - password = cryptStr( config->readEntry( "SqlPassword " ) ); - db = config->readEntry( "SqlName" ); - host = config->readEntry( "SqlHost" ); - - init( user, password, db, host ); -} - -ResourceSql::ResourceSql( AddressBook *ab, const TQString &user, - const TQString &password, const TQString &db, const TQString &host ) - : Resource( ab ), mDb( 0 ) -{ - init( user, password, db, host ); -} - -void ResourceSql::init( const TQString &user, const TQString &password, - const TQString &db, const TQString &host ) -{ - mUser = user; - mPassword = password; - mDbName = db; - mHost = host; -} - -Ticket *ResourceSql::requestSaveTicket() -{ - if ( !addressBook() ) { - kdDebug(5700) << "no addressbook" << endl; - return 0; - } - - return createTicket( this ); -} - -bool ResourceSql::open() -{ - TQStringList drivers = TQSqlDatabase::drivers(); - for ( TQStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) { - kdDebug(5700) << "Driver: " << (*it) << endl; - } - - mDb = TQSqlDatabase::addDatabase( "QMYSQL3" ); - - if ( !mDb ) { - kdDebug(5700) << "Error. Unable to connect to database." << endl; - return false; - } - - mDb->setDatabaseName( mDbName ); - mDb->setUserName( mUser ); - mDb->setPassword( mPassword ); - mDb->setHostName( mHost ); - - if ( !mDb->open() ) { - kdDebug(5700) << "Error. Unable to open database '" << mDbName << "'." << endl; - return false; - } - - return true; -} - -void ResourceSql::close() -{ - mDb->close(); -} - -bool ResourceSql::load() -{ - TQSqlQuery query( "select addressId, name, familyName, givenName, " - "additionalName, prefix, suffix, nickname, birthday, " - "mailer, timezone, geo_latitude, geo_longitude, title, " - "role, organization, note, productId, revision, " - "sortString, url from kaddressbook_main_" + mUser ); - - while ( query.next() ) { - TQString addrId = query.value(0).toString(); - - Addressee addr; - addr.setResource( this ); - addr.setUid( addrId ); - addr.setName( query.value(1).toString() ); - addr.setFamilyName( query.value(2).toString() ); - addr.setGivenName( query.value(3).toString() ); - addr.setAdditionalName( query.value(4).toString() ); - addr.setPrefix( query.value(5).toString() ); - addr.setSuffix( query.value(6).toString() ); - addr.setNickName( query.value(7).toString() ); - addr.setBirthday( query.value(8).toDateTime() ); - addr.setMailer( query.value(9).toString() ); - addr.setTimeZone( TimeZone( query.value(10).toInt() ) ); - addr.setGeo( Geo( query.value(11).toDouble(), query.value(12).toDouble() ) ); - addr.setTitle( query.value(13).toString() ); - addr.setRole( query.value(14).toString() ); - addr.setOrganization( query.value(15).toString() ); - addr.setNote( query.value(16).toString() ); - addr.setProductId( query.value(17).toString() ); - addr.setRevision( query.value(18).toDateTime() ); - addr.setSortString( query.value(19).toString() ); - addr.setUrl( query.value(20).toString() ); - - // emails - { - TQSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails " - "where addressId = '" + addrId + "'" ); - while ( emailsQuery.next() ) - addr.insertEmail( emailsQuery.value( 0 ).toString(), - emailsQuery.value( 1 ).toInt() ); - } - - // phones - { - TQSqlQuery phonesQuery( "select number, type from kaddressbook_phones " - "where addressId = '" + addrId + "'" ); - while ( phonesQuery.next() ) - addr.insertPhoneNumber( PhoneNumber( phonesQuery.value( 0 ).toString(), - phonesQuery.value( 1 ).toInt() ) ); - } - - // addresses - { - TQSqlQuery addressesQuery( "select postOfficeBox, extended, street, " - "locality, region, postalCode, country, label, type " - "from kaddressbook_addresses where addressId = '" + addrId + "'" ); - while ( addressesQuery.next() ) { - Address a; - a.setPostOfficeBox( addressesQuery.value(0).toString() ); - a.setExtended( addressesQuery.value(1).toString() ); - a.setStreet( addressesQuery.value(2).toString() ); - a.setLocality( addressesQuery.value(3).toString() ); - a.setRegion( addressesQuery.value(4).toString() ); - a.setPostalCode( addressesQuery.value(5).toString() ); - a.setCountry( addressesQuery.value(6).toString() ); - a.setLabel( addressesQuery.value(7).toString() ); - a.setType( addressesQuery.value(8).toInt() ); - - addr.insertAddress( a ); - } - } - - // categories - { - TQSqlQuery categoriesQuery( "select category from kaddressbook_categories " - "where addressId = '" + addrId + "'" ); - while ( categoriesQuery.next() ) - addr.insertCategory( categoriesQuery.value( 0 ).toString() ); - } - - // customs - { - TQSqlQuery customsQuery( "select app, name, value from kaddressbook_customs " - "where addressId = '" + addrId + "'" ); - while ( customsQuery.next() ) - addr.insertCustom( customsQuery.value( 0 ).toString(), - customsQuery.value( 1 ).toString(), - customsQuery.value( 2 ).toString()); - } - - addressBook()->insertAddressee( addr ); - } - - return true; -} - -bool ResourceSql::save( Ticket * ) -{ - // we have to delete all entries for this user and reinsert them - TQSqlQuery query( "select addressId from kaddressbook_main_" + mUser ); - - while ( query.next() ) { - TQString addrId = query.value( 0 ).toString(); - TQSqlQuery q; - - q.exec( "DELETE FROM kaddressbook_emails WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_phones WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_addresses WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_categories WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_customs WHERE addressId = '" + addrId + "'" ); - - q.exec( "DELETE FROM kaddressbook_main_" + mUser + " WHERE addressId = '" + addrId + "'" ); - } - - // let's start... - AddressBook::Iterator it; - for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { - if ( (*it).resource() != this && (*it).resource() != 0 ) // save only my and new entries - continue; - - TQString uid = (*it).uid(); - - query.exec( "INSERT INTO kaddressbook_main_" + mUser + " VALUES ('" + - (*it).uid() + "','" + - (*it).name() + "','" + - (*it).familyName() + "','" + - (*it).givenName() + "','" + - (*it).additionalName() + "','" + - (*it).prefix() + "','" + - (*it).suffix() + "','" + - (*it).nickName() + "','" + - (*it).birthday().toString( Qt::ISODate ) + "','" + - (*it).mailer() + "','" + - TQString::number( (*it).timeZone().offset() ) + "','" + - TQString::number( (*it).geo().latitude() ) + "','" + - TQString::number( (*it).geo().longitude() ) + "','" + - (*it).title() + "','" + - (*it).role() + "','" + - (*it).organization() + "','" + - (*it).note() + "','" + - (*it).productId() + "','" + - (*it).revision().toString( Qt::ISODate ) + "','" + - (*it).sortString() + "','" + - (*it).url().url() + "')" - ); - - // emails - { - TQStringList emails = (*it).emails(); - TQStringList::ConstIterator it; - bool preferred = true; - for( it = emails.begin(); it != emails.end(); ++it ) { - query.exec("INSERT INTO kaddressbook_emails VALUES ('" + - uid + "','" + - (*it) + "','" + - TQString::number(preferred) + "')"); - preferred = false; - } - } - - // phonenumbers - { - PhoneNumber::List phoneNumberList = (*it).phoneNumbers(); - PhoneNumber::List::ConstIterator it; - for( it = phoneNumberList.begin(); it != phoneNumberList.end(); ++it ) { - query.exec("INSERT INTO kaddressbook_phones VALUES ('" + - uid + "','" + - (*it).number() + "','" + - TQString::number( (*it).type() ) + "')"); - } - } - - // postal addresses - { - Address::List addressList = (*it).addresses(); - Address::List::ConstIterator it; - for( it = addressList.begin(); it != addressList.end(); ++it ) { - query.exec("INSERT INTO kaddressbook_addresses VALUES ('" + - uid + "','" + - (*it).postOfficeBox() + "','" + - (*it).extended() + "','" + - (*it).street() + "','" + - (*it).locality() + "','" + - (*it).region() + "','" + - (*it).postalCode() + "','" + - (*it).country() + "','" + - (*it).label() + "','" + - TQString::number( (*it).type() ) + "')"); - } - } - - // categories - { - TQStringList categories = (*it).categories(); - TQStringList::ConstIterator it; - for( it = categories.begin(); it != categories.end(); ++it ) - query.exec("INSERT INTO kaddressbook_categories VALUES ('" + - uid + "','" + - (*it) + "')"); - } - - // customs - { - TQStringList list = (*it).customs(); - TQStringList::ConstIterator it; - for( it = list.begin(); it != list.end(); ++it ) { - int dashPos = (*it).find( '-' ); - int colonPos = (*it).find( ':' ); - TQString app = (*it).left( dashPos ); - TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 ); - TQString value = (*it).right( (*it).length() - colonPos - 1 ); - - query.exec("INSERT INTO kaddressbook_categories VALUES ('" + - uid + "','" + app + "','" + name + "','" + value + "')"); - } - } - } - - return true; -} - -TQString ResourceSql::identifier() const -{ - return mHost + "_" + mDbName; -} diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h deleted file mode 100644 index 770e5b73b..000000000 --- a/kabc/plugins/sql/resourcesql.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCESQL_H -#define KABC_RESOURCESQL_H - -#include - -#include "addressbook.h" -#include "resource.h" - -class TQSqlDatabase; - -namespace KABC { - -class ResourceSql : public Resource -{ -public: - ResourceSql( AddressBook *ab, const TQString &user, const TQString &password, - const TQString &db, const TQString &host ); - ResourceSql( AddressBook *ab, const TDEConfig * ); - - bool open(); - void close(); - - Ticket *requestSaveTicket(); - - bool load(); - bool save( Ticket * ticket ); - - TQString identifier() const; - -private: - void init(const TQString &user, const TQString &password, - const TQString &db, const TQString &host ); - - TQString mUser; - TQString mPassword; - TQString mDbName; - TQString mHost; - - TQSqlDatabase *mDb; -}; - -} -#endif diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp deleted file mode 100644 index f62890c3d..000000000 --- a/kabc/plugins/sql/resourcesqlconfig.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "resource.h" -#include "resourcesqlconfig.h" - -using namespace KABC; - -ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) - : ResourceConfigWidget( parent, name ) -{ - resize( 290, 170 ); - - TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 ); - - TQLabel *label = new TQLabel( i18n( "Username:" ), this ); - mUser = new KLineEdit( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mUser, 0, 1 ); - - label = new TQLabel( i18n( "Password:" ), this ); - mPassword = new KLineEdit( this ); - mPassword->setEchoMode( KLineEdit::Password ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mPassword, 1, 1 ); - - label = new TQLabel( i18n( "Host:" ), this ); - mHost = new KLineEdit( this ); - - mainLayout->addWidget( label, 2, 0 ); - mainLayout->addWidget( mHost, 2, 1 ); - - label = new TQLabel( i18n( "Port:" ), this ); - TQVBox *box = new TQVBox(this); - mPort = new TQSpinBox(0, 65535, 1, box ); - mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); - mPort->setValue(389); - new TQWidget(box, "dummy"); - - mainLayout->addWidget( label, 3, 0 ); - mainLayout->addWidget( box, 3, 1 ); - - label = new TQLabel( i18n( "Database:" ), this ); - mDbName = new KLineEdit( this ); - - mainLayout->addWidget( label, 4, 0 ); - mainLayout->addWidget( mDbName, 4, 1 ); -} - -void ResourceSqlConfig::loadSettings( TDEConfig *config ) -{ - mUser->setText( config->readEntry( "SqlUser" ) ); - mPassword->setText( KABC::Resource::cryptStr( config->readEntry( "SqlPassword" ) ) ); - mDbName->setText( config->readEntry( "SqlName" ) ); - mHost->setText( config->readEntry( "SqlHost" ) ); - mPort->setValue( config->readNumEntry( "SqlPort" ) ); -} - -void ResourceSqlConfig::saveSettings( TDEConfig *config ) -{ - config->writeEntry( "SqlUser", mUser->text() ); - config->writeEntry( "SqlPassword", KABC::Resource::cryptStr( mPassword->text() ) ); - config->writeEntry( "SqlName", mDbName->text() ); - config->writeEntry( "SqlHost", mHost->text() ); - config->writeEntry( "SqlPort", mPort->value() ); -} - -#include "resourcesqlconfig.moc" diff --git a/kabc/plugins/sql/resourcesqlconfig.h b/kabc/plugins/sql/resourcesqlconfig.h deleted file mode 100644 index ae2de7d6d..000000000 --- a/kabc/plugins/sql/resourcesqlconfig.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCESQLCONFIG_H -#define RESOURCESQLCONFIG_H - -#include "resourceconfigwidget.h" - -class KLineEdit; -class TQSpinBox; - -namespace KABC { - -class ResourceSqlConfig : public ResourceConfigWidget -{ - Q_OBJECT - -public: - ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 ); - -public slots: - void loadSettings( TDEConfig *config ); - void saveSettings( TDEConfig *config ); - -private: - KLineEdit* mUser; - KLineEdit* mPassword; - KLineEdit* mDbName; - KLineEdit* mHost; - TQSpinBox* mPort; -}; - -} -#endif diff --git a/kabc/plugins/sql/sql.desktop b/kabc/plugins/sql/sql.desktop deleted file mode 100644 index 4ac553008..000000000 --- a/kabc/plugins/sql/sql.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Misc] -Name=SQL -Name[bn]=à¦à¦¸-কিউ-à¦à¦² (SQL) -Name[hi]=à¤à¤¸à¤•à¥à¤¯à¥‚à¤à¤² (SQL) -Name[ss]=I-SQL -Name[te]=à°à°¸à±à°•à±à°¯à±à°Žà°²à± - -[Plugin] -Type=sql -X-TDE-Library=kabc_sql diff --git a/kabc/resource.cpp b/kabc/resource.cpp deleted file mode 100644 index 57c8588e8..000000000 --- a/kabc/resource.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "resource.h" - -using namespace KABC; - -Ticket::Ticket( Resource *resource ) - : mResource( resource ) -{ -} - -Ticket::~Ticket() -{ -/* FIXME: avoid cycle deletion - if ( mResource ) - mResource->releaseSaveTicket( this ); -*/ -} - -Resource *Ticket::resource() -{ - return mResource; -} - -struct Resource::Iterator::IteratorData -{ - Addressee::Map::Iterator mIt; -}; - -struct Resource::ConstIterator::ConstIteratorData -{ - Addressee::Map::ConstIterator mIt; -}; - -Resource::Iterator::Iterator() -{ - d = new IteratorData; -} - -Resource::Iterator::Iterator( const Resource::Iterator &i ) -{ - d = new IteratorData; - d->mIt = i.d->mIt; -} - -Resource::Iterator &Resource::Iterator::operator=( const Resource::Iterator &i ) -{ - if ( this == &i ) - return *this; - delete d; - - d = new IteratorData; - d->mIt = i.d->mIt; - return *this; -} - -Resource::Iterator::~Iterator() -{ - delete d; -} - -const Addressee &Resource::Iterator::operator*() const -{ - return d->mIt.data(); -} - -Addressee &Resource::Iterator::operator*() -{ - return d->mIt.data(); -} - -Resource::Iterator &Resource::Iterator::operator++() -{ - (d->mIt)++; - return *this; -} - -Resource::Iterator &Resource::Iterator::operator++( int ) -{ - (d->mIt)++; - return *this; -} - -Resource::Iterator &Resource::Iterator::operator--() -{ - (d->mIt)--; - return *this; -} - -Resource::Iterator &Resource::Iterator::operator--( int ) -{ - (d->mIt)--; - return *this; -} - -bool Resource::Iterator::operator==( const Iterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool Resource::Iterator::operator!=( const Iterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - -Resource::ConstIterator::ConstIterator() -{ - d = new ConstIteratorData; -} - -Resource::ConstIterator::ConstIterator( const Resource::ConstIterator &i ) -{ - d = new ConstIteratorData; - d->mIt = i.d->mIt; -} - -Resource::ConstIterator::ConstIterator( const Resource::Iterator &i ) -{ - d = new ConstIteratorData; - d->mIt = i.d->mIt; -} - -Resource::ConstIterator &Resource::ConstIterator::operator=( const Resource::ConstIterator &i ) -{ - if ( this == &i ) - return *this; - delete d; - - d = new ConstIteratorData; - d->mIt = i.d->mIt; - return *this; -} - -Resource::ConstIterator::~ConstIterator() -{ - delete d; -} - -const Addressee &Resource::ConstIterator::operator*() const -{ - return *(d->mIt); -} - -Resource::ConstIterator &Resource::ConstIterator::operator++() -{ - (d->mIt)++; - return *this; -} - -Resource::ConstIterator &Resource::ConstIterator::operator++( int ) -{ - (d->mIt)++; - return *this; -} - -Resource::ConstIterator &Resource::ConstIterator::operator--() -{ - (d->mIt)--; - return *this; -} - -Resource::ConstIterator &Resource::ConstIterator::operator--( int ) -{ - (d->mIt)--; - return *this; -} - -bool Resource::ConstIterator::operator==( const ConstIterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool Resource::ConstIterator::operator!=( const ConstIterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - - -Resource::Resource( const TDEConfig *config ) - : KRES::Resource( config ), mAddressBook( 0 ) -{ -} - -Resource::~Resource() -{ -} - -Resource::Iterator Resource::begin() -{ - Iterator it; - it.d->mIt = mAddrMap.begin(); - - return it; -} - -Resource::ConstIterator Resource::begin() const -{ - ConstIterator it; - it.d->mIt = mAddrMap.constBegin(); - return it; -} - -Resource::Iterator Resource::end() -{ - Iterator it; - it.d->mIt = mAddrMap.end(); - - return it; -} - -Resource::ConstIterator Resource::end() const -{ - ConstIterator it; - it.d->mIt = mAddrMap.constEnd(); - return it; -} - -void Resource::writeConfig( TDEConfig *config ) -{ - KRES::Resource::writeConfig( config ); -} - -void Resource::setAddressBook( AddressBook *ab ) -{ - mAddressBook = ab; -} - -AddressBook *Resource::addressBook() -{ - return mAddressBook; -} - -Ticket *Resource::createTicket( Resource *resource ) -{ - return new Ticket( resource ); -} - -void Resource::insertAddressee( const Addressee &addr ) -{ - mAddrMap.insert( addr.uid(), addr ); -} - -void Resource::removeAddressee( const Addressee &addr ) -{ - mAddrMap.erase( addr.uid() ); -} - -Addressee Resource::findByUid( const TQString &uid ) -{ - Addressee::Map::ConstIterator it = mAddrMap.find( uid ); - - if ( it != mAddrMap.end() ) - return it.data(); - - return Addressee(); -} - -Addressee::List Resource::findByName( const TQString &name ) -{ - Addressee::List results; - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) { - if ( name == (*it).name() ) - results.append( *it ); - } - - return results; -} - -Addressee::List Resource::findByEmail( const TQString &email ) -{ - Addressee::List results; - const TQString lowerEmail = email.lower(); - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) { - const TQStringList mailList = (*it).emails(); - for ( TQStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) { - if ( lowerEmail == (*ite).lower() ) - results.append( *it ); - } - } - - return results; -} - -Addressee::List Resource::findByCategory( const TQString &category ) -{ - Addressee::List results; - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) { - if ( (*it).hasCategory( category) ) { - results.append( *it ); - } - } - - return results; -} - -void Resource::clear() -{ - mAddrMap.clear(); -} - -bool Resource::asyncLoad() -{ - bool ok = load(); - if ( !ok ) - emit loadingError( this, i18n( "Loading resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit loadingFinished( this ); - - return ok; -} - -bool Resource::asyncSave( Ticket *ticket ) { - bool ok = save( ticket ); - if ( !ok ) - emit savingError( this, i18n( "Saving resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit savingFinished( this ); - - return ok; -} - -#include "resource.moc" diff --git a/kabc/resource.h b/kabc/resource.h deleted file mode 100644 index 0f5167e7b..000000000 --- a/kabc/resource.h +++ /dev/null @@ -1,319 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCE_H -#define KABC_RESOURCE_H - -#include - -#include "addressbook.h" -#include "plugin.h" - -namespace KABC { - -/** - * @short Helper class for handling coordinated save of address books. - * - * This class is used as helper class for saving address book. - * @see requestSaveTicket(), save(). - */ -class KABC_EXPORT Ticket -{ - friend class Resource; - - public: - ~Ticket(); - - Resource *resource(); - - private: - Ticket( Resource *resource ); - - Resource *mResource; -}; - -/** - * @internal - */ -class KABC_EXPORT Resource : public KRES::Resource -{ - Q_OBJECT - - public: - - /** - @short Resource Iterator - - This class provides an iterator for resource entries. - By default it points to a TQValueList::Iterator, - but you can reimplement this class to fit your own needs. - */ - class KABC_EXPORT Iterator - { - public: - Iterator(); - Iterator( const Iterator & ); - virtual ~Iterator(); - - virtual Iterator &operator=( const Iterator & ); - virtual const Addressee &operator*() const; - virtual Addressee &operator*(); - virtual Iterator &operator++(); - virtual Iterator &operator++( int ); - virtual Iterator &operator--(); - virtual Iterator &operator--( int ); - virtual bool operator==( const Iterator &it ); - virtual bool operator!=( const Iterator &it ); - - struct IteratorData; - IteratorData *d; - }; - - /** - @short Resource Const Iterator - - This class provides a const iterator for resource entries. - */ - class KABC_EXPORT ConstIterator - { - public: - ConstIterator(); - ConstIterator( const ConstIterator & ); - ConstIterator( const Iterator & ); - virtual ~ConstIterator(); - - virtual ConstIterator &operator=( const ConstIterator & ); - virtual const Addressee &operator*() const ; - virtual ConstIterator &operator++(); - virtual ConstIterator &operator++( int ); - virtual ConstIterator &operator--(); - virtual ConstIterator &operator--( int ); - virtual bool operator==( const ConstIterator &it ); - virtual bool operator!=( const ConstIterator &it ); - - struct ConstIteratorData; - ConstIteratorData *d; - }; - - /** - Constructor. - - @param config The config object where the derived classes can - read out their settings. - */ - Resource( const TDEConfig *config ); - - /** - Destructor. - */ - virtual ~Resource(); - - /** - Returns an iterator pointing to the first addressee in the resource. - This iterator equals end() if the resource is empty. - */ - virtual ConstIterator begin() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - virtual Iterator begin(); - - /** - Returns an iterator pointing to the last addressee in the resource. - This iterator equals begin() if the resource is empty. - */ - virtual ConstIterator end() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - virtual Iterator end(); - - /** - Returns a pointer to the addressbook. - */ - AddressBook *addressBook(); - - /** - Writes the resource specific config to file. - */ - virtual void writeConfig( TDEConfig *config ); - - /** - Request a ticket, you have to pass through save() to - allow locking. The resource has to create its locks - in this function. - */ - virtual Ticket *requestSaveTicket() = 0; - - /** - Releases the ticket previousely requested with requestSaveTicket(). - The resource has to remove its locks in this function. - This function is also responsible for deleting the ticket. - */ - virtual void releaseSaveTicket( Ticket* ) = 0; - - /** - Loads all addressees synchronously. - - @returns Whether the loading was successfully. - */ - virtual bool load() = 0; - - /** - Loads all addressees asyncronously. You have to make sure that either - the loadingFinished() or loadingError() signal is emitted from within - this function. - - The default implementation simply calls the synchronous load. - - @return Whether the synchronous part of loading was successfully. - */ - virtual bool asyncLoad(); - - /** - Insert an addressee into the resource. - */ - virtual void insertAddressee( const Addressee& ); - - /** - Removes an addressee from resource. - */ - virtual void removeAddressee( const Addressee& addr ); - - /** - Saves all addressees synchronously. - - @param ticket You have to release the ticket later with - releaseSaveTicket() explicitely. - @return Whether the saving was successfully. - */ - virtual bool save( Ticket *ticket ) = 0; - - /** - Saves all addressees asynchronously. You have to make sure that either - the savingFinished() or savingError() signal is emitted from within - this function. - - The default implementation simply calls the synchronous save. - - @param ticket You have to release the ticket later with - releaseSaveTicket() explicitely. - @return Whether the saving was successfully. - */ - virtual bool asyncSave( Ticket *ticket ); - - /** - Searches an addressee with the specified unique identifier. - - @param uid The unique identifier you are looking for. - @return The addressee with the specified unique identifier or an - empty addressee. - */ - virtual Addressee findByUid( const TQString &uid ); - - /** - Searches all addressees which match the specified name. - - @param name The name you are looking for. - @return A list of all matching addressees. - */ - virtual Addressee::List findByName( const TQString &name ); - - /** - Searches all addressees which match the specified email address. - - @param email The email address you are looking for. - @return A list of all matching addressees. - */ - virtual Addressee::List findByEmail( const TQString &email ); - - /** - Searches all addressees which belongs to the specified category. - - @param category The category you are looking for. - @return A list of all matching addressees. - */ - virtual Addressee::List findByCategory( const TQString &category ); - - /** - Removes all addressees from the resource. - */ - virtual void clear(); - - /** - @internal - - Sets the address book of the resource. - */ - void setAddressBook( AddressBook* ); - - signals: - /** - This signal is emitted when the resource has finished the loading of all - addressees from the backend to the internal cache. - - @param resource The pointer to the resource which emitted this signal. - */ - void loadingFinished( Resource *resource ); - - /** - This signal is emitted when an error occured during loading the - addressees from the backend to the internal cache. - - @param resource The pointer to the resource which emitted this signal. - @param msg A translated error message. - */ - void loadingError( Resource *resource, const TQString &msg ); - - /** - This signal is emitted when the resource has finished the saving of all - addressees from the internal cache to the backend. - - @param resource The pointer to the resource which emitted this signal. - */ - void savingFinished( Resource *resource ); - - /** - This signal is emitted when an error occured during saving the - addressees from the internal cache to the backend. - - @param resource The pointer to the resource which emitted this signal. - @param msg A translated error message. - */ - void savingError( Resource *resource, const TQString &msg ); - - protected: - Ticket *createTicket( Resource * ); - Addressee::Map mAddrMap; - - private: - AddressBook *mAddressBook; - - class ResourcePrivate; - ResourcePrivate *d; -}; - -} - -#endif diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp deleted file mode 100644 index 3b6e25752..000000000 --- a/kabc/resourceselectdialog.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "resource.h" -#include "addressbook.h" - -#include "resourceselectdialog.h" - -using namespace KABC; - -ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, const char *name ) - : KDialog( parent, name, true ) -{ - setCaption( i18n( "Resource Selection" ) ); - resize( 300, 200 ); - - TQVBoxLayout *mainLayout = new TQVBoxLayout( this ); - mainLayout->setMargin( marginHint() ); - - TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); - groupBox->setTitle( i18n( "Resources" ) ); - - mResourceId = new TDEListBox( groupBox ); - - mainLayout->addWidget( groupBox ); - - mainLayout->addSpacing( 10 ); - - KButtonBox *buttonBox = new KButtonBox( this ); - - buttonBox->addStretch(); - buttonBox->addButton( KStdGuiItem::ok(), TQT_TQOBJECT(this), TQT_SLOT( accept() ) ); - buttonBox->addButton( KStdGuiItem::cancel(), TQT_TQOBJECT(this), TQT_SLOT( reject() ) ); - buttonBox->layout(); - - mainLayout->addWidget( buttonBox ); - - // setup listbox - uint counter = 0; - TQPtrList list = ab->resources(); - for ( uint i = 0; i < list.count(); ++i ) { - Resource *resource = list.at( i ); - if ( resource && !resource->readOnly() ) { - mResourceMap.insert( counter, resource ); - mResourceId->insertItem( resource->resourceName() ); - counter++; - } - } - - mResourceId->setCurrentItem( 0 ); -} - -Resource *ResourceSelectDialog::resource() -{ - if ( mResourceId->currentItem() != -1 ) - return mResourceMap[ mResourceId->currentItem() ]; - else - return 0; -} - -Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent ) -{ - TQPtrList resources = ab->resources(); - if ( resources.count() == 1 ) return resources.first(); - - Resource *found = 0; - Resource *r = resources.first(); - while( r ) { - if ( !r->readOnly() ) { - if ( found ) { - found = 0; - break; - } else { - found = r; - } - } - r = resources.next(); - } - if ( found ) return found; - - ResourceSelectDialog dlg( ab, parent ); - if ( dlg.exec() == KDialog::Accepted ) return dlg.resource(); - else return 0; -} - -#include "resourceselectdialog.moc" diff --git a/kabc/resourceselectdialog.h b/kabc/resourceselectdialog.h deleted file mode 100644 index f5f2d6984..000000000 --- a/kabc/resourceselectdialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCESELECTDIALOG_H -#define KABC_RESOURCESELECTDIALOG_H - -#include - -#include -#include - -class TDEListBox; - -namespace KABC { - -class AddressBook; -class Resource; - -/** - This class is @deprecated, use KRES::SelectDialog instead. - */ -class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog -{ - Q_OBJECT - - public: - ResourceSelectDialog( AddressBook *ab, TQWidget *parent = 0, - const char *name = 0); - Resource *resource(); - - static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 ); - - private: - TDEListBox *mResourceId; - TQMap mResourceMap; -}; - -} - -#endif diff --git a/kabc/scripts/Makefile.am b/kabc/scripts/Makefile.am deleted file mode 100644 index 7715fba5c..000000000 --- a/kabc/scripts/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_DIST = $(srcdir)/makeaddressee \ - $(srcdir)/addressee.src.cpp \ - $(srcdir)/addressee.src.h \ - $(srcdir)/entrylist \ - $(srcdir)/field.src.cpp - diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp deleted file mode 100644 index 9aff3a708..000000000 --- a/kabc/scripts/addressee.src.cpp +++ /dev/null @@ -1,1127 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - Copyright (c) 2003 Carsten Pfeiffer - Copyright (c) 2005 Ingo Kloecker - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include - -#include "addresseehelper.h" -#include "field.h" -#include "resource.h" -#include "sortmode.h" - -#include "addressee.h" - -using namespace KABC; - -static bool matchBinaryPattern( int value, int pattern ); - -template -static bool listEquals( const TQValueList&, const TQValueList& ); -static bool emailsEquals( const TQStringList&, const TQStringList& ); - -KABC::SortMode *Addressee::mSortMode = 0; - -struct Addressee::AddresseeData : public TDEShared -{ - TQString uid; - TQString uri; - --VARIABLES-- - - PhoneNumber::List phoneNumbers; - Address::List addresses; - Key::List keys; - TQStringList emails; - TQStringList categories; - TQStringList custom; - - Resource *resource; - - bool empty :1; - bool changed :1; -}; - -Addressee::AddresseeData* Addressee::shared_null = 0; - -Addressee::AddresseeData* Addressee::makeSharedNull() -{ - Addressee::shared_null = new AddresseeData; - shared_null->_TDEShared_ref(); //just in case (we should add KSD) - shared_null->empty = true; - shared_null->changed = false; - shared_null->resource = 0; - return shared_null; -} - -Addressee::Addressee() -{ - mData = shared_null ? shared_null : makeSharedNull(); -} - -Addressee::~Addressee() -{ -} - -Addressee::Addressee( const Addressee &a ) -{ - mData = a.mData; -} - -Addressee &Addressee::operator=( const Addressee &a ) -{ - if ( this == &a ) - return (*this); - - mData = a.mData; - return (*this); -} - -void Addressee::detach() -{ - if ( mData.data() == shared_null ) { - mData = new AddresseeData; - mData->empty = true; - mData->changed = false; - mData->resource = 0; - mData->uid = TDEApplication::randomString( 10 ); - return; - } else if ( mData.count() == 1 ) return; - - AddresseeData data = *mData; - mData = new AddresseeData( data ); -} - -bool Addressee::operator==( const Addressee &a ) const -{ - if ( uid() != a.uid() ) { - kdDebug(5700) << "uid differs" << endl; - return false; - } - --EQUALSTEST-- - if ( ( mData->url.isValid() || a.mData->url.isValid() ) && - ( mData->url != a.mData->url ) ) { - kdDebug(5700) << "url differs" << endl; - return false; - } - if ( !listEquals( mData->phoneNumbers, a.mData->phoneNumbers ) ) { - kdDebug(5700) << "phoneNumbers differs" << endl; - return false; - } - if ( !listEquals( mData->addresses, a.mData->addresses ) ) { - kdDebug(5700) << "addresses differs" << endl; - return false; - } - if ( !listEquals( mData->keys, a.mData->keys ) ) { - kdDebug(5700) << "keys differs" << endl; - return false; - } - if ( !emailsEquals( mData->emails, a.mData->emails ) ) { - kdDebug(5700) << "emails differs" << endl; - return false; - } - if ( !listEquals( mData->categories, a.mData->categories ) ) { - kdDebug(5700) << "categories differs" << endl; - return false; - } - if ( !listEquals( mData->custom, a.mData->custom ) ) { - kdDebug(5700) << "custom differs" << endl; - return false; - } - - return true; -} - -bool Addressee::operator!=( const Addressee &a ) const -{ - return !( a == *this ); -} - -bool Addressee::isEmpty() const -{ - return mData->empty; -} - -void Addressee::setUid( const TQString &id ) -{ - if ( id == mData->uid ) return; - detach(); - mData->empty = false; - mData->uid = id; -} - -TQString Addressee::uid() const -{ - return mData->uid; -} - -TQString Addressee::uidLabel() -{ - return i18n("Unique Identifier"); -} - -void Addressee::setUri( const TQString &id ) -{ - if ( id == mData->uri ) return; - detach(); - mData->empty = false; - mData->uri = id; -} - -TQString Addressee::uri() const -{ - return mData->uri; -} - -TQString Addressee::uriLabel() -{ - return i18n("Unique Resource Identifier"); -} - ---DEFINITIONS-- - -void Addressee::setNameFromString( const TQString &s ) -{ - TQString str = s; - //remove enclosing quotes from string - if ( str.length() > 1 && s[ 0 ] == '"' && s[ s.length() - 1 ] == '"' ) - str = s.mid( 1, s.length() - 2 ); - - setFormattedName( str ); - setName( str ); - - // clear all name parts - setPrefix( TQString() ); - setGivenName( TQString() ); - setAdditionalName( TQString() ); - setFamilyName( TQString() ); - setSuffix( TQString() ); - - if ( str.isEmpty() ) - return; - - TQString spaceStr = " "; - TQString emptyStr = ""; - AddresseeHelper *helper = AddresseeHelper::self(); - - int i = str.find( ',' ); - if( i < 0 ) { - TQStringList parts = TQStringList::split( spaceStr, str ); - int leftOffset = 0; - int rightOffset = parts.count() - 1; - - TQString suffix; - while ( rightOffset >= 0 ) { - if ( helper->containsSuffix( parts[ rightOffset ] ) ) { - suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); - rightOffset--; - } else - break; - } - setSuffix( suffix ); - - if ( rightOffset < 0 ) - return; - - TQStringList inclusionList; - for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) { - if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) { - inclusionList.prepend( parts[ rightOffset - n ] ); - } else - break; - } - - if ( !inclusionList.isEmpty() ) { - setFamilyName( inclusionList.join( " " ) + spaceStr + parts[ rightOffset ] ); - rightOffset -= inclusionList.count(); - } else { - if ( helper->tradeAsFamilyName() ) - setFamilyName( parts[ rightOffset ] ); - else - setGivenName( parts[ rightOffset ] ); - } - - TQString prefix; - while ( leftOffset < rightOffset ) { - if ( helper->containsTitle( parts[ leftOffset ] ) ) { - prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } else - break; - } - setPrefix( prefix ); - - if ( leftOffset < rightOffset ) { - setGivenName( parts[ leftOffset ] ); - leftOffset++; - } - - TQString additionalName; - while ( leftOffset < rightOffset ) { - additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } - setAdditionalName( additionalName ); - } else { - TQString part1 = str.left( i ); - TQString part2 = str.mid( i + 1 ); - - TQStringList parts = TQStringList::split( spaceStr, part1 ); - int leftOffset = 0; - int rightOffset = parts.count() - 1; - - if ( parts.count() > 0 ) { - - TQString suffix; - while ( rightOffset >= 0 ) { - if ( helper->containsSuffix( parts[ rightOffset ] ) ) { - suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); - rightOffset--; - } else - break; - } - setSuffix( suffix ); - - if ( rightOffset - 1 >= 0 && helper->containsPrefix( parts[ rightOffset - 1 ].lower() ) ) { - setFamilyName( parts[ rightOffset - 1 ] + spaceStr + parts[ rightOffset ] ); - rightOffset--; - } else - setFamilyName( parts[ rightOffset ] ); - - TQString prefix; - while ( leftOffset < rightOffset ) { - if ( helper->containsTitle( parts[ leftOffset ] ) ) { - prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } else - break; - } - } else { - setPrefix( "" ); - setFamilyName( "" ); - setSuffix( "" ); - } - - parts = TQStringList::split( spaceStr, part2 ); - - leftOffset = 0; - rightOffset = parts.count(); - - if ( parts.count() > 0 ) { - - TQString prefix; - while ( leftOffset < rightOffset ) { - if ( helper->containsTitle( parts[ leftOffset ] ) ) { - prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } else - break; - } - setPrefix( prefix ); - - if ( leftOffset < rightOffset ) { - setGivenName( parts[ leftOffset ] ); - leftOffset++; - } - - TQString additionalName; - while ( leftOffset < rightOffset ) { - additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } - setAdditionalName( additionalName ); - } else { - setGivenName( "" ); - setAdditionalName( "" ); - } - } -} - -TQString Addressee::realName() const -{ - TQString n( formattedName() ); - if ( !n.isEmpty() ) - return n; - - n = assembledName(); - if ( !n.isEmpty() ) - return n; - - n = name(); - if ( !n.isEmpty() ) - return n; - - return organization(); -} - -TQString Addressee::assembledName() const -{ - TQString name = prefix() + " " + givenName() + " " + additionalName() + " " + - familyName() + " " + suffix(); - - return name.simplifyWhiteSpace(); -} - -TQString Addressee::fullEmail( const TQString &email ) const -{ - TQString e; - if ( email.isNull() ) { - e = preferredEmail(); - } else { - e = email; - } - if ( e.isEmpty() ) return TQString(); - - TQString text; - if ( realName().isEmpty() ) - text = e; - else { - TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ); - if ( realName().find( needQuotes ) != -1 ) { - TQString name = realName(); - name.replace( "\"", "\\\"" ); - text = "\"" + name + "\" <" + e + ">"; - } else - text = realName() + " <" + e + ">"; - } - - return text; -} - -void Addressee::insertEmail( const TQString &email, bool preferred ) -{ - if ( email.simplifyWhiteSpace().isEmpty() ) - return; - - detach(); - mData->empty = false; - - TQStringList::Iterator it = mData->emails.find( email ); - - if ( it != mData->emails.end() ) { - if ( !preferred || it == mData->emails.begin() ) return; - mData->emails.remove( it ); - mData->emails.prepend( email ); - } else { - if ( preferred ) { - mData->emails.prepend( email ); - } else { - mData->emails.append( email ); - } - } -} - -void Addressee::removeEmail( const TQString &email ) -{ - detach(); - - TQStringList::Iterator it = mData->emails.find( email ); - if ( it == mData->emails.end() ) return; - - mData->emails.remove( it ); -} - -TQString Addressee::preferredEmail() const -{ - if ( mData->emails.count() == 0 ) return TQString(); - else return mData->emails.first(); -} - -TQStringList Addressee::emails() const -{ - return mData->emails; -} -void Addressee::setEmails( const TQStringList& emails ) { - detach(); - - mData->emails = emails; -} -void Addressee::insertPhoneNumber( const PhoneNumber &phoneNumber ) -{ - detach(); - mData->empty = false; - - PhoneNumber::List::Iterator it; - for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { - if ( (*it).id() == phoneNumber.id() ) { - *it = phoneNumber; - return; - } - } - if ( !phoneNumber.number().simplifyWhiteSpace().isEmpty() ) - mData->phoneNumbers.append( phoneNumber ); -} - -void Addressee::removePhoneNumber( const PhoneNumber &phoneNumber ) -{ - detach(); - - PhoneNumber::List::Iterator it; - for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { - if ( (*it).id() == phoneNumber.id() ) { - mData->phoneNumbers.remove( it ); - return; - } - } -} - -PhoneNumber Addressee::phoneNumber( int type ) const -{ - PhoneNumber phoneNumber( "", type ); - PhoneNumber::List::ConstIterator it; - for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - if ( (*it).type() & PhoneNumber::Pref ) - return (*it); - else if ( phoneNumber.number().isEmpty() ) - phoneNumber = (*it); - } - } - - return phoneNumber; -} - -PhoneNumber::List Addressee::phoneNumbers() const -{ - return mData->phoneNumbers; -} - -PhoneNumber::List Addressee::phoneNumbers( int type ) const -{ - PhoneNumber::List list; - - PhoneNumber::List::ConstIterator it; - for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - list.append( *it ); - } - } - return list; -} - -PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const -{ - PhoneNumber::List::ConstIterator it; - for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { - if ( (*it).id() == id ) { - return *it; - } - } - return PhoneNumber(); -} - -void Addressee::insertKey( const Key &key ) -{ - detach(); - mData->empty = false; - - Key::List::Iterator it; - for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { - if ( (*it).id() == key.id() ) { - *it = key; - return; - } - } - mData->keys.append( key ); -} - -void Addressee::removeKey( const Key &key ) -{ - detach(); - - Key::List::Iterator it; - for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { - if ( (*it).id() == key.id() ) { - mData->keys.remove( key ); - return; - } - } -} - -Key Addressee::key( int type, TQString customTypeString ) const -{ - Key::List::ConstIterator it; - for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { - if ( (*it).type() == type ) { - if ( type == Key::Custom ) { - if ( customTypeString.isEmpty() ) { - return *it; - } else { - if ( (*it).customTypeString() == customTypeString ) - return (*it); - } - } else { - return *it; - } - } - } - return Key( TQString(), type ); -} - -void Addressee::setKeys( const Key::List& list ) -{ - detach(); - mData->keys = list; -} - -Key::List Addressee::keys() const -{ - return mData->keys; -} - -Key::List Addressee::keys( int type, TQString customTypeString ) const -{ - Key::List list; - - Key::List::ConstIterator it; - for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { - if ( (*it).type() == type ) { - if ( type == Key::Custom ) { - if ( customTypeString.isEmpty() ) { - list.append( *it ); - } else { - if ( (*it).customTypeString() == customTypeString ) - list.append( *it ); - } - } else { - list.append( *it ); - } - } - } - return list; -} - -Key Addressee::findKey( const TQString &id ) const -{ - Key::List::ConstIterator it; - for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { - if ( (*it).id() == id ) { - return *it; - } - } - return Key(); -} - -TQString Addressee::asString() const -{ - return "Smith, agent Smith..."; -} - -void Addressee::dump() const -{ - kdDebug(5700) << "Addressee {" << endl; - - kdDebug(5700) << " Uid: '" << uid() << "'" << endl; - - --DEBUG-- - - kdDebug(5700) << " Emails {" << endl; - const TQStringList e = emails(); - TQStringList::ConstIterator it; - for( it = e.begin(); it != e.end(); ++it ) { - kdDebug(5700) << " " << (*it) << endl; - } - kdDebug(5700) << " }" << endl; - - kdDebug(5700) << " PhoneNumbers {" << endl; - const PhoneNumber::List p = phoneNumbers(); - PhoneNumber::List::ConstIterator it2; - for( it2 = p.begin(); it2 != p.end(); ++it2 ) { - kdDebug(5700) << " Type: " << int((*it2).type()) << " Number: " << (*it2).number() << endl; - } - kdDebug(5700) << " }" << endl; - - const Address::List a = addresses(); - Address::List::ConstIterator it3; - for( it3 = a.begin(); it3 != a.end(); ++it3 ) { - (*it3).dump(); - } - - kdDebug(5700) << " Keys {" << endl; - const Key::List k = keys(); - Key::List::ConstIterator it4; - for( it4 = k.begin(); it4 != k.end(); ++it4 ) { - kdDebug(5700) << " Type: " << int((*it4).type()) << - " Key: " << (*it4).textData() << - " CustomString: " << (*it4).customTypeString() << endl; - } - kdDebug(5700) << " }" << endl; - - kdDebug(5700) << "}" << endl; -} - - -void Addressee::insertAddress( const Address &address ) -{ - if ( address.isEmpty() ) - return; - - detach(); - mData->empty = false; - - Address::List::Iterator it; - for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { - if ( (*it).id() == address.id() ) { - *it = address; - return; - } - } - - mData->addresses.append( address ); -} - -void Addressee::removeAddress( const Address &address ) -{ - detach(); - - Address::List::Iterator it; - for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { - if ( (*it).id() == address.id() ) { - mData->addresses.remove( it ); - return; - } - } -} - -Address Addressee::address( int type ) const -{ - Address address( type ); - Address::List::ConstIterator it; - for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - if ( (*it).type() & Address::Pref ) - return (*it); - else if ( address.isEmpty() ) - address = (*it); - } - } - - return address; -} - -Address::List Addressee::addresses() const -{ - return mData->addresses; -} - -Address::List Addressee::addresses( int type ) const -{ - Address::List list; - - Address::List::ConstIterator it; - for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - list.append( *it ); - } - } - - return list; -} - -Address Addressee::findAddress( const TQString &id ) const -{ - Address::List::ConstIterator it; - for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { - if ( (*it).id() == id ) { - return *it; - } - } - return Address(); -} - -void Addressee::insertCategory( const TQString &c ) -{ - detach(); - mData->empty = false; - - if ( mData->categories.findIndex( c ) != -1 ) return; - - mData->categories.append( c ); -} - -void Addressee::removeCategory( const TQString &c ) -{ - detach(); - - TQStringList::Iterator it = mData->categories.find( c ); - if ( it == mData->categories.end() ) return; - - mData->categories.remove( it ); -} - -bool Addressee::hasCategory( const TQString &c ) const -{ - return ( mData->categories.findIndex( c ) != -1 ); -} - -void Addressee::setCategories( const TQStringList &c ) -{ - detach(); - mData->empty = false; - - mData->categories = c; -} - -TQStringList Addressee::categories() const -{ - return mData->categories; -} - -void Addressee::insertCustom( const TQString &app, const TQString &name, - const TQString &value ) -{ - if ( value.isEmpty() || name.isEmpty() || app.isEmpty() ) return; - - detach(); - mData->empty = false; - - TQString qualifiedName = app + "-" + name + ":"; - - TQStringList::Iterator it; - for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { - if ( (*it).startsWith( qualifiedName ) ) { - (*it) = qualifiedName + value; - return; - } - } - - mData->custom.append( qualifiedName + value ); -} - -void Addressee::removeCustom( const TQString &app, const TQString &name) -{ - detach(); - - TQString qualifiedName = app + "-" + name + ":"; - - TQStringList::Iterator it; - for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { - if ( (*it).startsWith( qualifiedName ) ) { - mData->custom.remove( it ); - return; - } - } -} - -TQString Addressee::custom( const TQString &app, const TQString &name ) const -{ - TQString qualifiedName = app + "-" + name + ":"; - TQString value; - - TQStringList::ConstIterator it; - for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) { - if ( (*it).startsWith( qualifiedName ) ) { - value = (*it).mid( (*it).find( ":" ) + 1 ); - break; - } - } - - return value; -} - -void Addressee::setCustoms( const TQStringList &l ) -{ - detach(); - mData->empty = false; - - mData->custom = l; -} - -TQStringList Addressee::customs() const -{ - return mData->custom; -} - -void Addressee::parseEmailAddress( const TQString &rawEmail, TQString &fullName, - TQString &email) -{ - // This is a simplified version of KPIM::splitAddress(). - - fullName = ""; - email = ""; - if ( rawEmail.isEmpty() ) - return; // KPIM::AddressEmpty; - - // The code works on 8-bit strings, so convert the input to UTF-8. - TQCString address = rawEmail.utf8(); - - TQCString displayName; - TQCString addrSpec; - TQCString comment; - - // The following is a primitive parser for a mailbox-list (cf. RFC 2822). - // The purpose is to extract a displayable string from the mailboxes. - // Comments in the addr-spec are not handled. No error checking is done. - - enum { TopLevel, InComment, InAngleAddress } context = TopLevel; - bool inQuotedString = false; - int commentLevel = 0; - bool stop = false; - - for ( char* p = address.data(); *p && !stop; ++p ) { - switch ( context ) { - case TopLevel : { - switch ( *p ) { - case '"' : inQuotedString = !inQuotedString; - displayName += *p; - break; - case '(' : if ( !inQuotedString ) { - context = InComment; - commentLevel = 1; - } - else - displayName += *p; - break; - case '<' : if ( !inQuotedString ) { - context = InAngleAddress; - } - else - displayName += *p; - break; - case '\\' : // quoted character - displayName += *p; - ++p; // skip the '\' - if ( *p ) - displayName += *p; - else - //return KPIM::UnexpectedEnd; - goto ABORT_PARSING; - break; - case ',' : if ( !inQuotedString ) { - //if ( allowMultipleAddresses ) - // stop = true; - //else - // return KPIM::UnexpectedComma; - goto ABORT_PARSING; - } - else - displayName += *p; - break; - default : displayName += *p; - } - break; - } - case InComment : { - switch ( *p ) { - case '(' : ++commentLevel; - comment += *p; - break; - case ')' : --commentLevel; - if ( commentLevel == 0 ) { - context = TopLevel; - comment += ' '; // separate the text of several comments - } - else - comment += *p; - break; - case '\\' : // quoted character - comment += *p; - ++p; // skip the '\' - if ( *p ) - comment += *p; - else - //return KPIM::UnexpectedEnd; - goto ABORT_PARSING; - break; - default : comment += *p; - } - break; - } - case InAngleAddress : { - switch ( *p ) { - case '"' : inQuotedString = !inQuotedString; - addrSpec += *p; - break; - case '>' : if ( !inQuotedString ) { - context = TopLevel; - } - else - addrSpec += *p; - break; - case '\\' : // quoted character - addrSpec += *p; - ++p; // skip the '\' - if ( *p ) - addrSpec += *p; - else - //return KPIM::UnexpectedEnd; - goto ABORT_PARSING; - break; - default : addrSpec += *p; - } - break; - } - } // switch ( context ) - } - -ABORT_PARSING: - displayName = displayName.stripWhiteSpace(); - comment = comment.stripWhiteSpace(); - addrSpec = addrSpec.stripWhiteSpace(); - - fullName = TQString::fromUtf8( displayName ); - email = TQString::fromUtf8( addrSpec ); - - // check for errors - if ( inQuotedString ) - return; // KPIM::UnbalancedQuote; - if ( context == InComment ) - return; // KPIM::UnbalancedParens; - if ( context == InAngleAddress ) - return; // KPIM::UnclosedAngleAddr; - - if ( addrSpec.isEmpty() ) { - if ( displayName.isEmpty() ) - return; // KPIM::NoAddressSpec; - else { - //addrSpec = displayName; - //displayName.truncate( 0 ); - // Address of the form "foo@bar" or "foo@bar (Name)". - email = fullName; - fullName = TQString::fromUtf8( comment ); - } - } - - // Check that we do not have any extra characters on the end of the - // strings - unsigned int len = fullName.length(); - if ( fullName[ 0 ] == '"' && fullName[ len - 1 ] == '"' ) - fullName = fullName.mid( 1, len - 2 ); -} - -void Addressee::setResource( Resource *resource ) -{ - detach(); - mData->resource = resource; -} - -Resource *Addressee::resource() const -{ - return mData->resource; -} - -void Addressee::setChanged( bool value ) -{ - detach(); - mData->changed = value; -} - -bool Addressee::changed() const -{ - return mData->changed; -} - -void Addressee::setSortMode( KABC::SortMode *mode ) -{ - mSortMode = mode; -} - -bool Addressee::operator< ( const Addressee &addr ) -{ - if ( !mSortMode ) - return false; - else - return mSortMode->lesser( *this, addr ); -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Addressee &a ) -{ - if (!a.mData) return s; - - s << a.uid(); - - --STREAMOUT-- - s << a.mData->phoneNumbers; - s << a.mData->addresses; - s << a.mData->emails; - s << a.mData->categories; - s << a.mData->custom; - s << a.mData->keys; - return s; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Addressee &a ) -{ - if (!a.mData) - return s; - - a.detach(); - - s >> a.mData->uid; - - --STREAMIN-- - s >> a.mData->phoneNumbers; - s >> a.mData->addresses; - s >> a.mData->emails; - s >> a.mData->categories; - s >> a.mData->custom; - s >> a.mData->keys; - - a.mData->empty = false; - - return s; -} - -bool matchBinaryPattern( int value, int pattern ) -{ - /** - We want to match all telephonnumbers/addresses which have the bits in the - pattern set. More are allowed. - if pattern == 0 we have a special handling, then we want only those with - exactly no bit set. - */ - if ( pattern == 0 ) - return ( value == 0 ); - else - return ( pattern == ( pattern & value ) ); -} - -template -bool listEquals( const TQValueList &list, const TQValueList &pattern ) -{ - if ( list.count() != pattern.count() ) - return false; - - for ( uint i = 0; i < list.count(); ++i ) - if ( pattern.find( list[ i ] ) == pattern.end() ) - return false; - - return true; -} - -bool emailsEquals( const TQStringList &list, const TQStringList &pattern ) -{ - if ( list.count() != pattern.count() ) - return false; - - if ( list.first() != pattern.first() ) - return false; - - TQStringList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) - if ( pattern.find( *it ) == pattern.end() ) - return false; - - return true; -} diff --git a/kabc/scripts/addressee.src.h b/kabc/scripts/addressee.src.h deleted file mode 100644 index 9cadfd41e..000000000 --- a/kabc/scripts/addressee.src.h +++ /dev/null @@ -1,407 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEE_H -#define KABC_ADDRESSEE_H - -#include -#include -#include -#include - -#include -#include - -#include "address.h" -#include "agent.h" -#include "geo.h" -#include "key.h" -#include "phonenumber.h" -#include "picture.h" -#include "secrecy.h" -#include "sound.h" -#include "timezone.h" - -namespace KABC { - -class Resource; -class Field; -class SortMode; - -/** - @short address book entry - - This class represents an entry in the address book. - - The data of this class is implicitly shared. You can pass this class by value. - - If you need the name of a field for presenting it to the user you should use - the functions ending in Label(). They return a translated string which can be - used as label for the corresponding field. - - About the name fields: - - givenName() is the first name and familyName() the last name. In some - countries the family name comes first, that's the reason for the - naming. formattedName() is the full name with the correct formatting. - It is used as an override, when the correct formatting can't be generated - from the other name fields automatically. - - realName() returns a fully formatted name(). It uses formattedName, if set, - otherwise it constucts the name from the name fields. As fallback, if - nothing else is set it uses name(). - - name() is the NAME type of RFC2426. It can be used as internal name for the - data enty, but shouldn't be used for displaying the data to the user. - */ -class KABC_EXPORT Addressee -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); - - public: - typedef TQValueList List; - typedef TQMap Map; - - /** - Construct an empty address book entry. - */ - Addressee(); - ~Addressee(); - - Addressee( const Addressee & ); - Addressee &operator=( const Addressee & ); - - bool operator==( const Addressee & ) const; - bool operator!=( const Addressee & ) const; - - /** - Return, if the address book entry is empty. - */ - bool isEmpty() const; - - /** - Set unique identifier. - */ - void setUid( const TQString &uid ); - /** - Return unique identifier. - */ - TQString uid() const; - /** - Return translated label for uid field. - */ - static TQString uidLabel(); - - /** - Set unique resource identifier. - */ - void setUri( const TQString &uid ); - /** - Return unique resource identifier. - */ - TQString uri() const; - /** - Return translated label for uri field. - */ - static TQString uriLabel(); - - --DECLARATIONS-- - /** - Set name fields by parsing the given string and trying to associate the - parts of the string with according fields. This function should probably - be a bit more clever. - */ - void setNameFromString( const TQString & ); - - /** - Return the name of the addressee. This is calculated from all the name - fields. - */ - TQString realName() const; - - /** - Return the name that consists of all name parts. - */ - TQString assembledName() const; - - /** - Return email address including real name. - - @param email Email address to be used to construct the full email string. - If this is TQString::null the preferred email address is used. - */ - TQString fullEmail( const TQString &email=TQString::null ) const; - - /** - Insert an email address. If the email address already exists in this - addressee it is not duplicated. - - @param email Email address - @param preferred Set to true, if this is the preferred email address of - the addressee. - */ - void insertEmail( const TQString &email, bool preferred=false ); - - /** - Remove email address. If the email address doesn't exist, nothing happens. - */ - void removeEmail( const TQString &email ); - - /** - Return preferred email address. This is the first email address or the - last one added with insertEmail() with a set preferred parameter. - */ - TQString preferredEmail() const; - - /** - Return list of all email addresses. - */ - TQStringList emails() const; - - /** - Set the emails to @p list. - The first email address gets the preferred one! - @param list The list of email addresses. - */ - void setEmails( const TQStringList& list); - - /** - Insert a phone number. If a phone number with the same id already exists - in this addressee it is not duplicated. - */ - void insertPhoneNumber( const PhoneNumber &phoneNumber ); - - /** - Remove phone number. If no phone number with the given id exists for this - addresse nothing happens. - */ - void removePhoneNumber( const PhoneNumber &phoneNumber ); - - /** - Return phone number, which matches the given type. - */ - PhoneNumber phoneNumber( int type ) const; - - /** - Return list of all phone numbers. - */ - PhoneNumber::List phoneNumbers() const; - - /** - Return list of phone numbers with a special type. - */ - PhoneNumber::List phoneNumbers( int type ) const; - - /** - Return phone number with the given id. - */ - PhoneNumber findPhoneNumber( const TQString &id ) const; - - /** - Insert a key. If a key with the same id already exists - in this addressee it is not duplicated. - */ - void insertKey( const Key &key ); - - /** - Remove a key. If no key with the given id exists for this - addresse nothing happens. - */ - void removeKey( const Key &key ); - - /** - Return key, which matches the given type. - If @p type == Key::Custom you can specify a string - that should match. If you leave the string empty, the first - key with a custom value is returned. - */ - Key key( int type, TQString customTypeString = TQString::null ) const; - - /** - Return list of all keys. - */ - Key::List keys() const; - - /** - Set the list of keys - @param keys The keys to be set. - */ - void setKeys( const Key::List& keys); - - /** - Return list of keys with a special type. - If @p type == Key::Custom you can specify a string - that should match. If you leave the string empty, all custom - keys will be returned. - */ - Key::List keys( int type, TQString customTypeString = TQString::null ) const; - - /** - Return key with the given id. - */ - Key findKey( const TQString &id ) const; - - /** - Insert an address. If an address with the same id already exists - in this addressee it is not duplicated. - */ - void insertAddress( const Address &address ); - - /** - Remove address. If no address with the given id exists for this - addresse nothing happens. - */ - void removeAddress( const Address &address ); - - /** - Return address, which matches the given type. - */ - Address address( int type ) const; - - /** - Return list of all addresses. - */ - Address::List addresses() const; - - /** - Return list of addresses with a special type. - */ - Address::List addresses( int type ) const; - - /** - Return address with the given id. - */ - Address findAddress( const TQString &id ) const; - - /** - Insert category. If the category already exists it is not duplicated. - */ - void insertCategory( const TQString & ); - - /** - Remove category. - */ - void removeCategory( const TQString & ); - - /** - Return, if addressee has the given category. - */ - bool hasCategory( const TQString & ) const; - - /** - Set categories to given value. - */ - void setCategories( const TQStringList & ); - - /** - Return list of all set categories. - */ - TQStringList categories() const; - - /** - Insert custom entry. The entry is identified by the name of the inserting - application and a unique name. If an entry with the given app and name - already exists its value is replaced with the new given value. - - An empty value isn't allowed (nothing happens if this is called with - any of the three arguments being empty) - */ - void insertCustom( const TQString &app, const TQString &name, - const TQString &value ); - - /** - Remove custom entry. - */ - void removeCustom( const TQString &app, const TQString &name ); - - /** - Return value of custom entry, identified by app and entry name. - */ - TQString custom( const TQString &app, const TQString &name ) const; - - /** - Set all custom entries. - */ - void setCustoms( const TQStringList & ); - - /** - Return list of all custom entries. - */ - TQStringList customs() const; - - /** - Parse full email address. The result is given back in fullName and email. - */ - static void parseEmailAddress( const TQString &rawEmail, TQString &fullName, - TQString &email ); - - /** - Debug output. - */ - void dump() const; - - /** - Returns string representation of the addressee. - */ - TQString asString() const; - - /** - Set resource where the addressee is from. - */ - void setResource( Resource *resource ); - - /** - Return pointer to resource. - */ - Resource *resource() const; - - /** - Mark addressee as changed. - */ - void setChanged( bool value ); - - /** - Return whether the addressee is changed. - */ - bool changed() const; - - static void setSortMode( KABC::SortMode *mode ); - - bool operator< ( const Addressee &addr ); - - private: - void detach(); - - struct AddresseeData; - mutable TDESharedPtr mData; - - private: - static AddresseeData* shared_null; - static AddresseeData* makeSharedNull(); - static KABC::SortMode *mSortMode; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); - -} - -#endif diff --git a/kabc/scripts/createisomap.pl b/kabc/scripts/createisomap.pl deleted file mode 100755 index 897cd4896..000000000 --- a/kabc/scripts/createisomap.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -# -# Create a translation table countryname->iso-code from the entry.desktop -# files in tdebase/l10n/*/ -# -# USAGE EXAMPLE: -# ./createisomap.pl $TDEDIR/share/locale/l10n > countrytransl.map -# -# Don't laugh at me. I put this together with an old perl book, perl -# being a language I've never used before. - -@entries = <$ARGV[0]/*/entry.desktop>; -chomp @entries; -foreach $entry (@entries) { - local ( $entryiso, @entryfile, @mappings ); - # print "--> $entry\n"; - $entryiso = $entry; - $entryiso =~ s/$ARGV[0]\///; - $entryiso =~ s/\/entry\.desktop//; - # print " $entryiso\n"; - open (IN, $entry); - @entryfile = ; - close IN; - chomp @entryfile; - foreach $entryfileline (@entryfile) { - if ( $entryfileline =~ /^Name.*=(.*)$/ ) { - # push (@mappings, $1 . "\t" . $entryiso ); - print "$1\t$entryiso\n"; - } - } -} - -# add some convenience entries which aren't part of the entry.desktop files - -print "Czech Republic\tcz\n"; diff --git a/kabc/scripts/entrylist b/kabc/scripts/entrylist deleted file mode 100644 index 87c342a06..000000000 --- a/kabc/scripts/entrylist +++ /dev/null @@ -1,82 +0,0 @@ -# This file describes the fields of an address book entry. -# -# The following comma-separated fields are used: -# -# Control: A generates accessor functions. -# L generates a static function for returning a tranlsated label -# F generates a Field id and object for generic field handling -# E generate an equality test in Addressee::operator==(). -# Field Name : A descriptive name which is shown to the user. -# Comment : A comment helping translators to understand the field name -# Type : C++ type of field. -# Identifier : A string used in code as variable name etc. -# Field Category : Categories the field belongs to (see Field::FieldCategory). -# Output function: Function used to convert type to string for debug output (optional) - -ALE,name,,TQString,name - -ALFE,formatted name,,TQString,formattedName,Frequent - -ALFE,family name,,TQString,familyName,Frequent -ALFE,given name,,TQString,givenName,Frequent -ALFE,additional names,,TQString,additionalName -ALFE,honorific prefixes,,TQString,prefix -ALFE,honorific suffixes,,TQString,suffix - -ALFE,nick name,,TQString,nickName,Personal - -ALFE,birthday,,TQDateTime,birthday,Personal,.toString() - -#Address address -LF,home address street,,TQString,homeAddressStreet,Address|Personal -LF,home address city,,TQString,homeAddressLocality,Address|Personal -LF,home address state,,TQString,homeAddressRegion,Address|Personal -LF,home address zip code,,TQString,homeAddressPostalCode,Address|Personal -LF,home address country,,TQString,homeAddressCountry,Address|Personal -LF,home address label,,TQString,homeAddressLabel,Address|Personal - -LF,business address street,,TQString,businessAddressStreet,Address|Organization -LF,business address city,,TQString,businessAddressLocality,Address|Organization -LF,business address state,,TQString,businessAddressRegion,Address|Organization -LF,business address zip code,,TQString,businessAddressPostalCode,Address|Organization -LF,business address country,,TQString,businessAddressCountry,Address|Organization -LF,business address label,,TQString,businessAddressLabel,Address|Organization - -#phoneNumbers -LF,home phone,,TQString,homePhone,Personal|Frequent -LF,business phone,,TQString,businessPhone,Organization|Frequent -LF,mobile phone,,TQString,mobilePhone,Frequent -LF,home fax,,TQString,homeFax -LF,business fax,,TQString,businessFax -LF,car phone,,TQString,carPhone -LF,ISDN,,TQString,isdn -LF,pager,,TQString,pager - -#emails -LF,email address,,TQString,email,Email|Frequent - -ALFE,mail client,,TQString,mailer,Email - -ALE,time zone,,TimeZone,timeZone,,.asString() -ALE,geographic position,,Geo,geo,,.asString() - -ALFE,title,person,TQString,title,Organization -ALFE,role,person in organization,TQString,role,Organization -ALFE,organization,,TQString,organization,Organization -ALFE,department,,TQString,department,Organization - -ALFE,note,,TQString,note - -ALE,product identifier,,TQString,productId -ALE,revision date,,TQDateTime,revision,,.toString() - -ALE,sort string,,TQString,sortString - -ALF,homepage,,KURL,url,,.url() - -ALE,security class,,Secrecy,secrecy,,.asString() - -ALE,logo,,Picture,logo,,.asString() -ALE,photo,,Picture,photo,,.asString() -ALE,sound,,Sound,sound,,.asString() -ALE,agent,,Agent,agent,,.asString() diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp deleted file mode 100644 index 2c80810b7..000000000 --- a/kabc/scripts/field.src.cpp +++ /dev/null @@ -1,512 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "field.h" -#include "address.h" - -using namespace KABC; - -class Field::FieldImpl -{ - public: - FieldImpl( int fieldId, int category = 0, - const TQString &label = TQString::null, - const TQString &key = TQString::null, - const TQString &app = TQString::null ) - : mFieldId( fieldId ), mCategory( category ), mLabel( label ), - mKey( key ), mApp( app ) {} - - enum FieldId - { - CustomField, - --ENUMS-- - }; - - int fieldId() { return mFieldId; } - int category() { return mCategory; } - - TQString label() { return mLabel; } - TQString key() { return mKey; } - TQString app() { return mApp; } - - private: - int mFieldId; - int mCategory; - - TQString mLabel; - TQString mKey; - TQString mApp; -}; - - -Field::List Field::mAllFields; -Field::List Field::mDefaultFields; -Field::List Field::mCustomFields; - - -Field::Field( FieldImpl *impl ) -{ - mImpl = impl; -} - -Field::~Field() -{ - delete mImpl; -} - -TQString Field::label() -{ - switch ( mImpl->fieldId() ) { - --CASELABEL-- - case FieldImpl::CustomField: - return mImpl->label(); - default: - return i18n("Unknown Field"); - } -} - -int Field::category() -{ - return mImpl->category(); -} - -TQString Field::categoryLabel( int category ) -{ - switch ( category ) { - case All: - return i18n("All"); - case Frequent: - return i18n("Frequent"); - case Address: - return i18n("street/postal","Address"); - case Email: - return i18n("Email"); - case Personal: - return i18n("Personal"); - case Organization: - return i18n("Organization"); - case CustomCategory: - return i18n("Custom"); - default: - return i18n("Undefined"); - } -} - -TQString Field::value( const KABC::Addressee &a ) -{ - switch ( mImpl->fieldId() ) { - --CASEVALUE-- - case FieldImpl::Email: - return a.preferredEmail(); - case FieldImpl::Birthday: - if ( a.birthday().isValid() ) - return a.birthday().date().toString( Qt::ISODate ); - else - return TQString::null; - case FieldImpl::Url: - return a.url().prettyURL(); - case FieldImpl::HomePhone: - { - PhoneNumber::List::ConstIterator it; - - { - // check for preferred number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home | PhoneNumber::Pref ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) - return (*it).number(); - } - - { - // check for normal home number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) - return (*it).number(); - } - - return TQString::null; - } - case FieldImpl::BusinessPhone: - { - PhoneNumber::List::ConstIterator it; - - { - // check for preferred number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work | PhoneNumber::Pref ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) - return (*it).number(); - } - - { - // check for normal work number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) - return (*it).number(); - } - - return TQString::null; - } - case FieldImpl::MobilePhone: - return a.phoneNumber( PhoneNumber::Cell ).number(); - case FieldImpl::HomeFax: - return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); - case FieldImpl::BusinessFax: - return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); - case FieldImpl::CarPhone: - return a.phoneNumber( PhoneNumber::Car ).number(); - case FieldImpl::Isdn: - return a.phoneNumber( PhoneNumber::Isdn ).number(); - case FieldImpl::Pager: - return a.phoneNumber( PhoneNumber::Pager ).number(); - case FieldImpl::HomeAddressStreet: - return a.address( Address::Home ).street(); - case FieldImpl::HomeAddressLocality: - return a.address( Address::Home ).locality(); - case FieldImpl::HomeAddressRegion: - return a.address( Address::Home ).region(); - case FieldImpl::HomeAddressPostalCode: - return a.address( Address::Home ).postalCode(); - case FieldImpl::HomeAddressCountry: - return a.address( Address::Home ).country(); - case FieldImpl::HomeAddressLabel: - return a.address( Address::Home ).label(); - case FieldImpl::BusinessAddressStreet: - return a.address( Address::Work ).street(); - case FieldImpl::BusinessAddressLocality: - return a.address( Address::Work ).locality(); - case FieldImpl::BusinessAddressRegion: - return a.address( Address::Work ).region(); - case FieldImpl::BusinessAddressPostalCode: - return a.address( Address::Work ).postalCode(); - case FieldImpl::BusinessAddressCountry: - return a.address( Address::Work ).country(); - case FieldImpl::BusinessAddressLabel: - return a.address( Address::Work ).label(); - case FieldImpl::CustomField: - return a.custom( mImpl->app(), mImpl->key() ); - default: - return TQString::null; - } -} - -bool Field::setValue( KABC::Addressee &a, const TQString &value ) -{ - switch ( mImpl->fieldId() ) { - --CASESETVALUE-- - case FieldImpl::MobilePhone: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Cell ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::HomeFax: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::BusinessFax: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::CarPhone: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Car ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::Isdn: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Isdn ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::Pager: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Pager ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::HomeAddressStreet: - { - KABC::Address address = a.address( Address::Home ); - address.setStreet( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressLocality: - { - KABC::Address address = a.address( Address::Home ); - address.setLocality( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressRegion: - { - KABC::Address address = a.address( Address::Home ); - address.setRegion( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressPostalCode: - { - KABC::Address address = a.address( Address::Home ); - address.setPostalCode( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressCountry: - { - KABC::Address address = a.address( Address::Home ); - address.setCountry( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressLabel: - { - KABC::Address address = a.address( Address::Home ); - address.setLabel( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressStreet: - { - KABC::Address address = a.address( Address::Work ); - address.setStreet( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressLocality: - { - KABC::Address address = a.address( Address::Work ); - address.setLocality( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressRegion: - { - KABC::Address address = a.address( Address::Work ); - address.setRegion( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressPostalCode: - { - KABC::Address address = a.address( Address::Work ); - address.setPostalCode( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressCountry: - { - KABC::Address address = a.address( Address::Work ); - address.setCountry( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressLabel: - { - KABC::Address address = a.address( Address::Work ); - address.setLabel( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::Birthday: - a.setBirthday( TQT_TQDATE_OBJECT(TQDate::fromString( value, Qt::ISODate )) ); - return true; - case FieldImpl::CustomField: - a.insertCustom( mImpl->app(), mImpl->key(), value ); - return true; - default: - return false; - } -} - -TQString Field::sortKey( const KABC::Addressee &a ) -{ - switch ( mImpl->fieldId() ) { - --CASEVALUE-- - case FieldImpl::Birthday: - if ( a.birthday().isValid() ) { - TQDate date = TQT_TQDATE_OBJECT(a.birthday().date()); - TQString key; - key.sprintf( "%02d-%02d", date.month(), date.day() ); - return key; - } else - return TQString( "00-00" ); - default: - return value( a ).lower(); - } -} - -bool Field::isCustom() -{ - return mImpl->fieldId() == FieldImpl::CustomField; -} - -Field::List Field::allFields() -{ - if ( mAllFields.isEmpty() ) { - --CREATEFIELDS-- - } - - return mAllFields; -} - -Field::List Field::defaultFields() -{ - if ( mDefaultFields.isEmpty() ) { - createDefaultField( FieldImpl::FormattedName ); - createDefaultField( FieldImpl::Email ); - } - - return mDefaultFields; -} - -void Field::createField( int id, int category ) -{ - mAllFields.append( new Field( new FieldImpl( id, category ) ) ); -} - -void Field::createDefaultField( int id, int category ) -{ - mDefaultFields.append( new Field( new FieldImpl( id, category ) ) ); -} - -void Field::deleteFields() -{ - Field::List::ConstIterator it; - - for ( it = mAllFields.constBegin(); it != mAllFields.constEnd(); ++it ) { - delete (*it); - } - mAllFields.clear(); - - for ( it = mDefaultFields.constBegin(); it != mDefaultFields.constEnd(); ++it ) { - delete (*it); - } - mDefaultFields.clear(); - - for ( it = mCustomFields.constBegin(); it != mCustomFields.constEnd(); ++it ) { - delete (*it); - } - mCustomFields.clear(); -} - -void Field::saveFields( const TQString &identifier, - const Field::List &fields ) -{ - TDEConfig *cfg = TDEGlobal::config(); - TDEConfigGroupSaver( cfg, "KABCFields" ); - - saveFields( cfg, identifier, fields ); -} - -void Field::saveFields( TDEConfig *cfg, const TQString &identifier, - const Field::List &fields ) -{ - TQValueList fieldIds; - - int custom = 0; - Field::List::ConstIterator it; - for( it = fields.begin(); it != fields.end(); ++it ) { - fieldIds.append( (*it)->mImpl->fieldId() ); - if( (*it)->isCustom() ) { - TQStringList customEntry; - customEntry << (*it)->mImpl->label(); - customEntry << (*it)->mImpl->key(); - customEntry << (*it)->mImpl->app(); - cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" + - TQString::number( custom++ ), customEntry ); - } - } - - cfg->writeEntry( identifier, fieldIds ); -} - -Field::List Field::restoreFields( const TQString &identifier ) -{ - TDEConfig *cfg = TDEGlobal::config(); - TDEConfigGroupSaver( cfg, "KABCFields" ); - - return restoreFields( cfg, identifier ); -} - -Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier ) -{ - const TQValueList fieldIds = cfg->readIntListEntry( identifier ); - - Field::List fields; - - int custom = 0; - TQValueList::ConstIterator it; - for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { - FieldImpl *f = 0; - if ( (*it) == FieldImpl::CustomField ) { - TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" + - identifier + "_" + - TQString::number( custom++ ) ); - f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ], - customEntry[ 1 ], customEntry[ 2 ] ); - } else { - f = new FieldImpl( *it ); - } - fields.append( new Field( f ) ); - } - - return fields; -} - -bool Field::equals( Field *field ) -{ - bool sameId = ( mImpl->fieldId() == field->mImpl->fieldId() ); - - if ( !sameId ) return false; - - if ( mImpl->fieldId() != FieldImpl::CustomField ) return true; - - return mImpl->key() == field->mImpl->key(); -} - -Field *Field::createCustomField( const TQString &label, int category, - const TQString &key, const TQString &app ) -{ - Field *field = new Field( new FieldImpl( FieldImpl::CustomField, - category | CustomCategory, - label, key, app ) ); - mCustomFields.append( field ); - - return field; -} diff --git a/kabc/scripts/makeaddressee b/kabc/scripts/makeaddressee deleted file mode 100755 index fa955b0bf..000000000 --- a/kabc/scripts/makeaddressee +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/perl - -my $srcdir; -$srcdir = `dirname $0` || die "Can't determine \$srcdir."; -chomp $srcdir; - -if (!open( ENTRIES, "$srcdir/entrylist" ) ) { - print "Can't open $srcdir/entrylist\n"; - exit 1; -} - - while() { - if (/^#/) { next; } - chop; - @entries = split /,/; - if (!/^.+,(\w+),(\w+)/) { next; } - push @entryCtrl, @entries[0]; - push @entryRealNames, @entries[1]; - push @entryComments, @entries[2]; - push @entryTypes, @entries[3]; - push @entryNames, @entries[4]; - push @entryCategory, @entries[5]; - push @entryDebug, @entries[6]; - } - -close ENTRIES; - -if (!open( H_IN, "$srcdir/addressee.src.h" ) ) { - print "Can't open $srcdir/addressee.src.h\n"; - exit 1; -} -if (!open( H_OUT, ">../addressee.h" ) ) { - print "Can't open addressee.h\n"; - exit 1; -} - print H_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; - - while( ) { - if (/--DECLARATIONS--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print H_OUT " /**\n"; - print H_OUT " Set $entryRealNames[$i].\n"; - print H_OUT " */\n"; - print H_OUT " void set" . ucfirst($entryNames[$i]); - print H_OUT "( const $entryTypes[$i] &$entryNames[$i] );\n"; - - print H_OUT " /**\n"; - print H_OUT " Return $entryRealNames[$i].\n"; - print H_OUT " */\n"; - print H_OUT " $entryTypes[$i] $entryNames[$i]() const;\n"; - } - - if ( $entryCtrl[$i] !~ /L/ ) { next; } - print H_OUT " /**\n"; - print H_OUT " Return translated label for $entryNames[$i] field.\n"; - print H_OUT " */\n"; - print H_OUT " static TQString $entryNames[$i]Label();\n\n"; - } - } else { - print H_OUT; - } - } - -close H_OUT; -close H_IN; - -if (!open( CPP_IN, "$srcdir/addressee.src.cpp" ) ) { - print "Can't open $srcdir/addressee.src.cpp\n"; - exit 1; -} -if (!open( CPP_OUT, ">../addressee.cpp" ) ) { - print "Can't open addressee.cpp\n"; - exit 1; -} - print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; - - while( ) { - if (/--VARIABLES--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - print CPP_OUT " $entryTypes[$i] $entryNames[$i];\n"; - } - } elsif (/--DEFINITIONS--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print CPP_OUT "void Addressee::set" . ucfirst($entryNames[$i]); - print CPP_OUT "( const $entryTypes[$i] &$entryNames[$i] )\n{\n"; - print CPP_OUT " if ( $entryNames[$i] == mData->$entryNames[$i] ) return;\n"; - print CPP_OUT " detach();\n mData->empty = false;\n"; - print CPP_OUT " mData->$entryNames[$i] = $entryNames[$i];\n}\n\n"; - - print CPP_OUT "$entryTypes[$i] Addressee::$entryNames[$i]() const\n{\n"; - print CPP_OUT " return mData->$entryNames[$i];\n}\n\n"; - } - - if ( $entryCtrl[$i] !~ /L/ ) { next; } - @labelwords = split ' ', $entryRealNames[$i]; - for( $j=0; $j < @labelwords; ++$j ) { - $labelwords[$j] = ucfirst $labelwords[$j]; - } - $label = join ' ', @labelwords; - print CPP_OUT "TQString Addressee::$entryNames[$i]Label()\n{\n"; - if ( $entryComments[$i] ) { - print CPP_OUT " return i18n(\"$entryComments[$i]\",\"$label\");\n"; - } else { - print CPP_OUT " return i18n(\"$label\");\n"; - } - print CPP_OUT "}\n\n\n"; - } - } elsif (/--EQUALSTEST--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /E/ ) { - if ( $entryNames[$i] !~ "revision" ) { - if ( $entryTypes[$i] =~ "TQString" ) { - print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] &&\n"; - print CPP_OUT " !( mData->$entryNames[$i].isEmpty() && a.mData->$entryNames[$i].isEmpty() ) ) {\n"; - print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; - print CPP_OUT " return false;\n"; - print CPP_OUT " }\n"; - } else { - print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] ) {\n"; - print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; - print CPP_OUT " return false;\n"; - print CPP_OUT " }\n"; - } - } - } - } - } elsif (/--STREAMOUT--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print CPP_OUT " s << a.mData->$entryNames[$i];\n"; - } - } - } elsif (/--STREAMIN--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print CPP_OUT " s >> a.mData->$entryNames[$i];\n"; - } - } - } elsif (/--DEBUG--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - print CPP_OUT " kdDebug(5700) << \" " . ucfirst($entryNames[$i]); - print CPP_OUT ": '\" << $entryNames[$i]()$entryDebug[$i] << \"'\" << endl;\n"; - } - } else { - print CPP_OUT; - } - } - -close CPP_OUT; -close CPP_IN; - -if (!open( CPP_IN, "$srcdir/field.src.cpp" ) ) { - print "Can't open $srcdir/field.src.cpp\n"; - exit 1; -} -if (!open( CPP_OUT, ">../field.cpp" ) ) { - print "Can't open field.cpp\n"; - exit 1; -} - print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; - - while( ) { - if (/--ENUMS--/) { - $first = 1; - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $first ) { $first = 0; } - else { print CPP_OUT ",\n"; } - print CPP_OUT " " . ucfirst($entryNames[$i]); - } - print CPP_OUT "\n"; - } elsif (/--CASELABEL--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryCtrl[$i] !~ /L/ ) { next; } - print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; - print CPP_OUT " return Addressee::$entryNames[$i]Label();\n"; - } - } elsif (/--CASEVALUE--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryTypes[$i] ne "TQString" ) { next; } - print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; - print CPP_OUT " return a.$entryNames[$i]();\n"; - } - } elsif (/--CASESETVALUE--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryTypes[$i] ne "TQString" ) { next; } - print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; - print CPP_OUT " a.set" . ucfirst($entryNames[$i]) . "( value );\n"; - print CPP_OUT " return true;\n"; - } - } elsif (/--CREATEFIELDS--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /F/ ) { next; } - print CPP_OUT " createField( FieldImpl::" . ucfirst($entryNames[$i]); - if ( $entryCategory[$i] ) { - print CPP_OUT ", $entryCategory[$i]"; - } - print CPP_OUT " );\n"; - } - } else { - print CPP_OUT; - } - } - -close CPP_OUT; -close CPP_IN; diff --git a/kabc/secrecy.cpp b/kabc/secrecy.cpp deleted file mode 100644 index 7ec439b0c..000000000 --- a/kabc/secrecy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "secrecy.h" - -using namespace KABC; - -Secrecy::Secrecy( int type ) - : mType( type ) -{ -} - -bool Secrecy::operator==( const Secrecy &s ) const -{ - return ( mType == s.mType ); -} - -bool Secrecy::operator!=( const Secrecy &s ) const -{ - return !( *this == s ); -} - -bool Secrecy::isValid() const -{ - return mType != Invalid; -} - -void Secrecy::setType( int type ) -{ - mType = type; -} - -int Secrecy::type() const -{ - return mType; -} - -Secrecy::TypeList Secrecy::typeList() -{ - static TypeList list; - - if ( list.isEmpty() ) - list << Public << Private << Confidential; - - return list; -} - -TQString Secrecy::typeLabel( int type ) -{ - switch ( type ) { - case Public: - return i18n( "Public" ); - break; - case Private: - return i18n( "Private" ); - break; - case Confidential: - return i18n( "Confidential" ); - break; - default: - return i18n( "Unknown type" ); - break; - } -} - -TQString Secrecy::asString() const -{ - return typeLabel( mType ); -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Secrecy &secrecy ) -{ - return s << secrecy.mType; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Secrecy &secrecy ) -{ - s >> secrecy.mType; - - return s; -} diff --git a/kabc/secrecy.h b/kabc/secrecy.h deleted file mode 100644 index 5cc60b11d..000000000 --- a/kabc/secrecy.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_SECRECY_H -#define KABC_SECRECY_H - -#include - -#include - -namespace KABC { - -class KABC_EXPORT Secrecy -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Secrecy & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Secrecy & ); - -public: - typedef TQValueList TypeList; - - /** - * Secrecy types - * - * @li Public - for public access - * @li Private - only private access - * @li Confidential - access for confidential persons - */ - enum Types { - Public, - Private, - Confidential, - Invalid - }; - - /** - * Constructor. - * - * @param type The secrecy type, see Types. - */ - Secrecy( int type = Invalid ); - - bool operator==( const Secrecy & ) const; - bool operator!=( const Secrecy & ) const; - - /** - Returns if the Secrecy object has a valid value. - */ - bool isValid() const; - - /** - * Sets the type, see Types. - */ - void setType( int type ); - - /** - * Returns the type, see Types. - */ - int type() const; - - /** - * Returns a list of all available secrecy types. - */ - static TypeList typeList(); - - /** - * Returns a translated label for a given secrecy type. - */ - static TQString typeLabel( int type ); - - /** - * For debug. - */ - TQString asString() const; - -private: - int mType; -}; - -KABC_EXPORT TQDataStream& operator<<( TQDataStream &s, const Secrecy &secrecy ); -KABC_EXPORT TQDataStream& operator>>( TQDataStream &s, Secrecy &secrecy ); - -} -#endif diff --git a/kabc/sortmode.cpp b/kabc/sortmode.cpp deleted file mode 100644 index ee9a6f82d..000000000 --- a/kabc/sortmode.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "sortmode.h" - -using namespace KABC; - -NameSortMode::NameSortMode() - : mNameType( FormattedName ), mAscendingOrder( true ), d( 0 ) -{ - mNameType = FormattedName; -} - -NameSortMode::NameSortMode( NameType type, bool ascending ) - : mNameType( type ), mAscendingOrder( ascending ), d( 0 ) -{ -} - -bool NameSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const -{ - bool lesser = false; - - switch ( mNameType ) { - case FormattedName: - lesser = TQString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0; - break; - case FamilyName: - lesser = TQString::localeAwareCompare( first.familyName(), second.familyName() ) < 0; - break; - case GivenName: - lesser = TQString::localeAwareCompare( first.givenName(), second.givenName() ) < 0; - break; - default: - lesser = false; - break; - } - - if ( !mAscendingOrder ) - lesser = !lesser; - - return lesser; -} - -FieldSortMode::FieldSortMode( KABC::Field *field, bool ascending ) - : mField( field ), mAscendingOrder( ascending ), d( 0 ) -{ -} - -bool FieldSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const -{ - if ( !mField ) - return false; - else { - bool lesser = TQString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0; - if ( !mAscendingOrder ) - lesser = !lesser; - - return lesser; - } -} diff --git a/kabc/sortmode.h b/kabc/sortmode.h deleted file mode 100644 index 9768fc8c5..000000000 --- a/kabc/sortmode.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_SORTMODE_H -#define KABC_SORTMODE_H - -#include - -#include - -namespace KABC { - -/** - @short Sort method for sorting an addressee list. - - This interface should be reimplemented by classes which shall act as - SortModes for KABC::AddresseeList. -*/ -class KABC_EXPORT SortMode -{ - public: - /** - Reimplement this method and return whether the first contact is 'smaller' - than the second. - */ - virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const = 0; -}; - -class KABC_EXPORT NameSortMode : public SortMode -{ - public: - enum NameType - { - FormattedName, - FamilyName, - GivenName - }; - - /** - Constructor. - - Creates a NameSortMethod with FormattedName as name type set. - */ - NameSortMode(); - - /** - Constructor. - - Creates a NameSortMethod with the specified name type. - - @param type The name type. - @param ascending true for ascending sort, false for descending. - */ - NameSortMode( NameType type, bool ascending = true ); - - /** - Returns whether the first contact is 'smaller' then the second. - */ - virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; - - private: - NameType mNameType; - bool mAscendingOrder; - - class NameSortModePrivate; - NameSortModePrivate *d; -}; - -class KABC_EXPORT FieldSortMode : public SortMode -{ - public: - /** - Constructor. - - Creates a FieldSortMethod with the specified field. - - @param field The field. - @param ascending true for ascending sort, false for descending. - */ - FieldSortMode( KABC::Field *field, bool ascending = true ); - - /** - Returns whether the first contact is 'smaller' then the second. - */ - virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; - - private: - KABC::Field *mField; - bool mAscendingOrder; - - class FieldSortModePrivate; - FieldSortModePrivate *d; -}; - -} - -#endif diff --git a/kabc/sound.cpp b/kabc/sound.cpp deleted file mode 100644 index cf645be83..000000000 --- a/kabc/sound.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "sound.h" - -#include - -using namespace KABC; - -Sound::Sound() - : mIntern( false ) -{ -} - -Sound::Sound( const TQString &url ) - : mUrl( url ), mIntern( false ) -{ -} - -Sound::Sound( const TQByteArray &data ) - : mData( data ), mIntern( true ) -{ -} - -Sound::~Sound() -{ -} - -bool Sound::operator==( const Sound &s ) const -{ - if ( mIntern != s.mIntern ) return false; - - if ( mIntern ) { - if ( mData != s.mData ) - return false; - } else { - if ( mUrl != s.mUrl ) - return false; - } - - return true; -} - -bool Sound::operator!=( const Sound &s ) const -{ - return !( s == *this ); -} - -void Sound::setUrl( const TQString &url ) -{ - mUrl = url; - mIntern = false; -} - -void Sound::setData( const TQByteArray &data ) -{ - mData = data; - mIntern = true; -} - -bool Sound::isIntern() const -{ - return mIntern; -} - -bool Sound::isEmpty() const -{ - return (!mIntern) && mUrl.isEmpty(); - -} - -TQString Sound::url() const -{ - return mUrl; -} - -TQByteArray Sound::data() const -{ - return mData; -} - -TQString Sound::asString() const -{ - if ( mIntern ) - return "intern sound"; - else - return mUrl; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Sound &sound ) -{ - return s << sound.mIntern << sound.mUrl; -// return s << sound.mIntern << sound.mUrl << sound.mData; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Sound &sound ) -{ - s >> sound.mIntern >> sound.mUrl; -// s >> sound.mIntern >> sound.mUrl >> sound.mData; - return s; -} diff --git a/kabc/sound.h b/kabc/sound.h deleted file mode 100644 index 98dcf320b..000000000 --- a/kabc/sound.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_SOUND_H -#define KABC_SOUND_H - -#include -#include - -#include - -namespace KABC { - -/** @short Class that holds a Sound clip for a contact. - * - * The sound can be played doing something like this: - * - * \code - * KTempFile tmp; - * if(sound.isIntern()) { - * tmp.file()->tqwriteBlock( sound.data() ); - * tmp.close(); - * KAudioPlayer::play( tmp.name() ); - * } else if(!sound.url().isEmpty()) { - * TQString tmpFile; - * if(!TDEIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) - * { - * KMessageBox::error(0L, - * TDEIO::NetAccess::lastErrorString(), - * i18n("Failed to download sound file"), - * KMessageBox::Notify - * ); - * return; - * } - * KAudioPlayer::play( tmpFile ); - * } - * \endcode - * - * Unfortunetly KAudioPlayer::play is ASync, so to delete the temporary file, the best you can really do is set a timer. - * - */ -class KABC_EXPORT Sound -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); - -public: - - /** - * Consturctor. Creates an empty object. - */ - Sound(); - - /** - * Consturctor. - * - * @param url A URL that describes the position of the sound file. - */ - Sound( const TQString &url ); - - /** - * Consturctor. - * - * @param data The raw data of the sound. - */ - Sound( const TQByteArray &data ); - - /** - * Destructor. - */ - ~Sound(); - - - bool operator==( const Sound & ) const; - bool operator!=( const Sound & ) const; - - /** - * Sets a URL for the location of the sound file. When using this - * function, isIntern() will return 'false' until you use - * setData(). - * - * @param url The location URL of the sound file. - */ - void setUrl( const TQString &url ); - - /** - * Test if this sound file has been set. - * Just does: !isIntern() && url.isEmpty() - * @since 3.4 - */ - bool isEmpty() const; - - /** - * Sets the raw data of the sound. When using this function, - * isIntern() will return 'true' until you use setUrl(). - * - * @param data The raw data of the sound. - */ - void setData( const TQByteArray &data ); - - /** - * Returns whether the sound is described by a URL (extern) or - * by the raw data (intern). - * When this method returns 'true' you can use data() to - * get the raw data. Otherwise you can request the URL of this - * sound by url() and load the raw data from that location. - */ - bool isIntern() const; - - /** - * Returns the location URL of this sound. - */ - TQString url() const; - - /** - * Returns the raw data of this sound. - */ - TQByteArray data() const; - - /** - * Returns string representation of the sound. - */ - TQString asString() const; - -private: - TQString mUrl; - TQByteArray mData; - - int mIntern; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); - -} -#endif diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp deleted file mode 100644 index c887fcb83..000000000 --- a/kabc/stdaddressbook.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "resource.h" - -#include "stdaddressbook.h" - -using namespace KABC; - -StdAddressBook *StdAddressBook::mSelf = 0; -bool StdAddressBook::mAutomaticSave = true; - -static KStaticDeleter addressBookDeleter; - -TQString StdAddressBook::fileName() -{ - return locateLocal( "data", "kabc/std.vcf" ); -} - -TQString StdAddressBook::directoryName() -{ - return locateLocal( "data", "kabc/stdvcf" ); -} - -void StdAddressBook::handleCrash() -{ -} - -StdAddressBook *StdAddressBook::self() -{ - if ( !mSelf ) - addressBookDeleter.setObject( mSelf, new StdAddressBook ); - - return mSelf; -} - -StdAddressBook *StdAddressBook::self( bool asynchronous ) -{ - if ( !mSelf ) - addressBookDeleter.setObject( mSelf, new StdAddressBook( asynchronous ) ); - - return mSelf; -} - -StdAddressBook::StdAddressBook() - : AddressBook( "" ) -{ - kdDebug(5700) << "StdAddressBook::StdAddressBook()" << endl; - - init( false ); -} - -StdAddressBook::StdAddressBook( bool asynchronous ) - : AddressBook( "" ) -{ - kdDebug(5700) << "StdAddressBook::StdAddressBook( bool )" << endl; - - init( asynchronous ); -} - -StdAddressBook::~StdAddressBook() -{ - if ( mAutomaticSave ) - saveAll(); -} - -void StdAddressBook::init( bool asynchronous ) -{ - KRES::Manager *manager = resourceManager(); - - KRES::Manager::ActiveIterator it; - for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { - (*it)->setAddressBook( this ); - if ( !(*it)->open() ) { - error( TQString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); - continue; - } - connect( *it, TQT_SIGNAL( loadingFinished( Resource* ) ), - this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); - connect( *it, TQT_SIGNAL( savingFinished( Resource* ) ), - this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); - - connect( *it, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - connect( *it, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); - } - - Resource *res = standardResource(); - if ( !res ) { - res = manager->createResource( "file" ); - if ( res ) - addResource( res ); - else - kdDebug(5700) << "No resource available!!!" << endl; - } - - setStandardResource( res ); - manager->writeConfig(); - - if ( asynchronous ) - asyncLoad(); - else - load(); -} - -bool StdAddressBook::saveAll() -{ - kdDebug(5700) << "StdAddressBook::saveAll()" << endl; - bool ok = true; - - deleteRemovedAddressees(); - - KRES::Manager::ActiveIterator it; - KRES::Manager *manager = resourceManager(); - for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { - if ( !(*it)->readOnly() && (*it)->isOpen() ) { - Ticket *ticket = requestSaveTicket( *it ); - if ( !ticket ) { - error( i18n( "Unable to save to resource '%1'. It is locked." ) - .arg( (*it)->resourceName() ) ); - return false; - } - - if ( !AddressBook::save( ticket ) ) { - ok = false; - releaseSaveTicket( ticket ); - } - } - } - - return ok; -} - -bool StdAddressBook::save() -{ - kdDebug(5700) << "StdAddressBook::save()" << endl; - - if ( mSelf ) - return mSelf->saveAll(); - else - return true; -} - -void StdAddressBook::close() -{ - addressBookDeleter.destructObject(); -} - -void StdAddressBook::setAutomaticSave( bool enable ) -{ - mAutomaticSave = enable; -} - -bool StdAddressBook::automaticSave() -{ - return mAutomaticSave; -} - -// should get const for 4.X -Addressee StdAddressBook::whoAmI() -{ - TDEConfig config( "kabcrc" ); - config.setGroup( "General" ); - - return findByUid( config.readEntry( "WhoAmI" ) ); -} - -void StdAddressBook::setWhoAmI( const Addressee &addr ) -{ - TDEConfig config( "kabcrc" ); - config.setGroup( "General" ); - - config.writeEntry( "WhoAmI", addr.uid() ); -} diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h deleted file mode 100644 index 935b2bad1..000000000 --- a/kabc/stdaddressbook.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_STDADDRESSBOOK_H -#define KABC_STDADDRESSBOOK_H - -#include "addressbook.h" - -namespace KABC { - -/** - Standard KDE address book - - This class provides access to the standard KDE address book shared by all - applications. - - It's implemented as a singleton. Use self() to get the address book - object. On the first self() call the address book also gets loaded. - - Example: - - \code - KABC::AddressBook *ab = KABC::StdAddressBook::self(); - - AddressBook::Ticket *ticket = ab->requestSaveTicket(); - - if ( ticket ) { - KABC::AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { - kdDebug() << "UID=" << (*it).uid() << endl; - - // do some other stuff - } - - KABC::StdAddressBook::save( ticket ); - } - \endcode -*/ -class KABC_EXPORT StdAddressBook : public AddressBook -{ - public: - - /** - Destructor. - */ - ~StdAddressBook(); - - /** - Returns the standard addressbook object. It also loads all resources of - the users standard address book synchronously. - */ - static StdAddressBook *self(); - - /** - This is the same as above, but with specified behaviour of resource loading. - - @param asynchronous When true, the resources are loaded asynchronous, that - means you have the data foremost the addressBookChanged() - signal has been emitted. So connect to this signal when - using this method! - */ - static StdAddressBook *self( bool asynchronous ); - - /** - Saves the standard address book to disk. - - @deprecated Use AddressBook::save( Ticket* ) instead - */ - static bool save() KDE_DEPRECATED; - - /** - @deprecated There is no need to call this function anymore. - */ - static void handleCrash() KDE_DEPRECATED; - - /** - Returns the default file name for vcard-based addressbook - */ - static TQString fileName(); - - /** - Returns the default directory name for vcard-based addressbook - */ - static TQString directoryName(); - - /** - Sets the automatic save property of the address book. - - @param state If true, the address book is saved automatically - at destruction time, otherwise you have to call - AddressBook::save( Ticket* ). - */ - static void setAutomaticSave( bool state ); - - /** - Closes the address book. Depending on automaticSave() it will - save the address book first. - */ - static void close(); - - /** - Returns whether the address book is saved at destruction time. - See also setAutomaticSave(). - */ - static bool automaticSave(); - - /** - Returns the contact, that is associated with the owner of the - address book. This contact should be used by other programs - to access user specific data. - */ - Addressee whoAmI(); - - /** - Sets the users contact. See whoAmI() for more information. - - @param addr The users contact. - */ - void setWhoAmI( const Addressee &addr ); - - protected: - StdAddressBook(); - StdAddressBook( bool asynchronous ); - - void init( bool asynchronous ); - bool saveAll(); - - private: - static StdAddressBook *mSelf; - static bool mAutomaticSave; -}; - -} - -#endif - diff --git a/kabc/tdeab2tdeabc.cpp b/kabc/tdeab2tdeabc.cpp deleted file mode 100644 index f03a80f45..000000000 --- a/kabc/tdeab2tdeabc.cpp +++ /dev/null @@ -1,476 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "stdaddressbook.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, - { "quiet", "", 0 }, - { "o", 0, 0 }, - { "override", I18N_NOOP( "Override existing entries" ), "1" }, - TDECmdLineLastOption -}; - -void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) -{ - kdDebug() << "KMAILENTRY: " << kmailEntry << endl; - - TQString entry = kmailEntry.simplifyWhiteSpace(); - if ( entry.isEmpty() ) return; - - TQString email; - TQString name; - TQString comment; - - if ( entry.at( entry.length() -1 ) == ')' ) { - int br = entry.findRev( '(' ); - if ( br >= 0 ) { - comment = entry.mid( br + 1, entry.length() - br - 2 ); - entry.truncate( br ); - if ( entry.at( entry.length() - 1 ).isSpace() ) { - entry.truncate( br - 1 ); - } - } - } - - int posSpace = entry.findRev( ' ' ); - if ( posSpace < 0 ) { - email = entry; - if ( !comment.isEmpty() ) { - name = comment; - comment = ""; - } - } else { - email = entry.mid( posSpace + 1 ); - name = entry.left( posSpace ); - } - - if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { - email = email.mid( 1, email.length() - 2 ); - } - if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { - name = name.mid( 1, name.length() - 2 ); - } - if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { - name = name.mid( 1, name.length() - 2 ); - } - - if ( name.at( name.length() -1 ) == ')' ) { - int br = name.findRev( '(' ); - if ( br >= 0 ) { - comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; - name.truncate( br ); - if ( name.at( name.length() - 1 ).isSpace() ) { - name.truncate( br - 1 ); - } - } - } - - kdDebug() << " EMAIL : " << email << endl; - kdDebug() << " NAME : " << name << endl; - kdDebug() << " COMMENT : " << comment << endl; - - KABC::Addressee::List al = ab->findByEmail( email ); - if ( al.isEmpty() ) { - KABC::Addressee a; - a.setNameFromString( name ); - a.insertEmail( email ); - a.setNote( comment ); - - ab->insertAddressee( a ); - - kdDebug() << "--INSERTED: " << a.realName() << endl; - } -} - -void importKMailAddressBook( KABC::AddressBook *ab ) -{ - TQString fileName = locateLocal( "data", "kmail/addressbook" ); - TQString kmailConfigName = locate( "config", "kmailrc" ); - if ( !kmailConfigName.isEmpty() ) { - TDEConfig cfg( kmailConfigName ); - cfg.setGroup( "Addressbook" ); - fileName = cfg.readPathEntry( "default", fileName ); - } - if ( !TDEStandardDirs::exists( fileName ) ) { - kdDebug(5700) << "Couldn't find KMail addressbook." << endl; - return; - } - - TQFile f( fileName ); - if ( !f.open(IO_ReadOnly) ) { - kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl; - return; - } - - TQStringList kmailEntries; - - TQTextStream t( &f ); - while ( !t.eof() ) { - kmailEntries.append( t.readLine() ); - } - f.close(); - - TQStringList::ConstIterator it; - for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { - if ( (*it).at( 0 ) == '#' ) continue; - bool insideQuote = false; - int end = (*it).length() - 1; - for ( int i = end; i; i-- ) { - if ( (*it).at( i ) == '"' ) { - if ( insideQuote ) - insideQuote = false; - else - insideQuote = true; - } else if ( (*it).at( i ) == ',' && !insideQuote ) { - readKMailEntry( (*it).mid( i + 1, end - i ), ab ); - end = i - 1; - } - } - - readKMailEntry( (*it).mid( 0, end + 1 ), ab ); - } -} - -void readKAddressBookEntries( const TQString &dataString, Addressee &a ) -{ - // Strip "KMail:1.0" prefix and "[EOS]" suffix. - TQString str = dataString.mid( 11, dataString.length() - 24 ); - - TQStringList entries = TQStringList::split( "\n[EOR]\n ", str ); - - Address homeAddress( Address::Home ); - Address businessAddress( Address::Work ); - Address otherAddress; - - TQStringList::ConstIterator it; - for ( it = entries.begin(); it != entries.end(); ++it ) { - int pos = (*it).find( "\n" ); - TQString fieldName = (*it).left( pos ); - TQString fieldValue = (*it).mid( pos + 2 ); - - if ( fieldName == "X-HomeFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home | - PhoneNumber::Fax ) ); - } else if ( fieldName == "X-OtherPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) ); - } else if ( fieldName == "X-PrimaryPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) ); - } else if ( fieldName == "X-BusinessFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work | - PhoneNumber::Fax ) ); - } else if ( fieldName == "X-CarPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) ); - } else if ( fieldName == "X-MobilePhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) ); - } else if ( fieldName == "X-ISDN" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) ); - } else if ( fieldName == "X-OtherFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) ); - } else if ( fieldName == "X-Pager" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) ); - } else if ( fieldName == "X-BusinessPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) ); - } else if ( fieldName == "X-HomePhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) ); - } else if ( fieldName == "X-HomeAddress" ) { - homeAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-HomeAddressStreet" ) { - homeAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-HomeAddressCity" ) { - homeAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-HomeAddressPostalCode" ) { - homeAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-HomeAddressState" ) { - homeAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-HomeAddressCountry" ) { - homeAddress.setCountry( fieldValue ); - } else if ( fieldName == "X-BusinessAddress" ) { - businessAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-BusinessAddressStreet" ) { - businessAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-BusinessAddressCity" ) { - businessAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-BusinessAddressPostalCode" ) { - businessAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-BusinessAddressState" ) { - businessAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-BusinessAddressCountry" ) { - businessAddress.setCountry( fieldValue ); - } else if ( fieldName == "X-OtherAddress" ) { - otherAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-OtherAddressStreet" ) { - otherAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-OtherAddressCity" ) { - otherAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-OtherAddressPostalCode" ) { - otherAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-OtherAddressState" ) { - otherAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-OtherAddressCountry" ) { - otherAddress.setCountry( fieldValue ); - } else if ( fieldName == "NICKNAME" ) { - a.setNickName( fieldValue ); - } else if ( fieldName == "ORG" ) { - a.setOrganization( fieldValue ); - } else if ( fieldName == "ROLE" ) { - a.setRole( fieldValue ); - } else if ( fieldName == "BDAY" ) { - a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) ); - } else if ( fieldName == "WEBPAGE" ) { - a.setUrl( KURL( fieldValue ) ); - } else if ( fieldName == "N" ) { - } else if ( fieldName == "X-FirstName" ) { - } else if ( fieldName == "X-MiddleName" ) { - } else if ( fieldName == "X-LastName" ) { - } else if ( fieldName == "X-Title" ) { - } else if ( fieldName == "X-Suffix" ) { - } else if ( fieldName == "X-FileAs" ) { - } else if ( fieldName == "EMAIL" ) { - a.insertEmail( fieldValue, true ); - } else if ( fieldName == "X-E-mail2" ) { - a.insertEmail( fieldValue ); - } else if ( fieldName == "X-E-mail3" ) { - a.insertEmail( fieldValue ); - } else if ( fieldName == "X-Notes" ) { - } else { - a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue ); - } - } - - if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress ); - if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress ); - if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress ); -} - -void importKab( KABC::AddressBook *ab, bool override, bool quiet ) -{ - TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" ); - fileName += "addressbook.kab"; - if ( !TQFile::exists( fileName ) ) { - if ( !quiet ) { - KMessageBox::error( 0, "" + i18n( "Address book file %1 not found! Make sure the old address book is located there and you have read permission for this file." ) - .arg( fileName ) + "" ); - } - kdDebug(5700) << "No KDE 2 addressbook found." << endl; - return; - } - - kdDebug(5700) << "Converting old-style kab addressbook to " - "new-style kabc addressbook." << endl; - - KabAPI kab( 0 ); - if ( kab.init() != ::AddressBook::NoError ) { - kdDebug(5700) << "Error initing kab" << endl; - exit( 1 ); - } - - KabKey key; - ::AddressBook::Entry entry; - - int num = kab.addressbook()->noOfEntries(); - - kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl; - - for ( int i = 0; i < num; ++i ) { - if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) { - kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl; - continue; - } - if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) { - kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl; - continue; - } - - Addressee a; - - // Convert custom entries - int count = 0; - bool idFound = false; - TQStringList::ConstIterator customIt; - for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { - if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { - a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); - idFound = true; - } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { - readKAddressBookEntries( *customIt, a ); - } else { - a.insertCustom( "tdeab2tdeabc", TQString::number( count++ ), *customIt ); - } - } - if ( idFound ) { - if ( !override ) continue; - } else { - entry.custom << "X-KABC-UID:" + a.uid(); - ::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry ); - if ( error != ::AddressBook::NoError ) { - kdDebug(5700) << "kab.change returned with error " << error << endl; - } else { - kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl; - } - } - - a.setTitle( entry.title ); - a.setFormattedName( entry.fn ); - a.setPrefix( entry.nameprefix ); - a.setGivenName( entry.firstname ); - a.setAdditionalName( entry.middlename ); - a.setFamilyName( entry.lastname ); - a.setBirthday( entry.birthday ); - - TQStringList::ConstIterator emailIt; - for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt ) - a.insertEmail( *emailIt ); - - TQStringList::ConstIterator phoneIt; - for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) { - int kabType = (*phoneIt++).toInt(); - if ( phoneIt == entry.telephone.end() ) break; - TQString number = *phoneIt; - int type = 0; - if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice; - else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice; - else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax; - else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem; - a.insertPhoneNumber( PhoneNumber( number, type ) ); - } - - if ( entry.URLs.count() > 0 ) { - a.setUrl( KURL( entry.URLs.first() ) ); - if ( entry.URLs.count() > 1 ) { - kdWarning() << "More than one URL. Ignoring all but the first." << endl; - } - } - - int noAdr = entry.noOfAddresses(); - for ( int j = 0; j < noAdr; ++j ) { - ::AddressBook::Entry::Address kabAddress; - entry.getAddress( j, kabAddress ); - - Address adr; - - adr.setStreet( kabAddress.address ); - adr.setPostalCode( kabAddress.zip ); - adr.setLocality( kabAddress.town ); - adr.setCountry( kabAddress.country ); - adr.setRegion( kabAddress.state ); - - TQString label; - if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n"; - if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n"; - if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n"; - if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n"; - if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n"; - if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n"; - adr.setLabel( label ); - - a.insertAddress( adr ); - } - - TQString note = entry.comment; - - if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1; - if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2; - if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3; - if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4; - - if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " ); - - TQStringList::ConstIterator talkIt; - for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) { - note += "\nTalk: " + (*talkIt); - } - - a.setNote( note ); - - a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix - - a.setCategories( entry.categories ); - - kdDebug(5700) << "Addressee: " << a.familyName() << endl; - - ab->insertAddressee( a ); - } - - kab.save( true ); -} - -int main( int argc, char **argv ) -{ - TDEAboutData aboutData( "tdeab2tdeabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" ); - aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - bool override = false; - - if ( args->isSet( "override" ) ) { - kdDebug() << "Override existing entries." << endl; - - override = true; - } - - bool quiet = false; - - if ( args->isSet( "quiet" ) ) - quiet = true; - - if ( args->isSet( "disable-autostart" ) ) { - kdDebug() << "Disable autostart." << endl; - - TDEConfig *config = app.config(); - config->setGroup( "Startup" ); - config->writeEntry( "EnableAutostart", false ); - } - - KABC::AddressBook *kabcBook = StdAddressBook::self(); - - importKMailAddressBook( kabcBook ); - - importKab( kabcBook, override, quiet ); - - StdAddressBook::save(); - - kdDebug(5700) << "Saved kabc addressbook to '" << kabcBook->identifier() << "'" << endl; -} - diff --git a/kabc/tdeab2tdeabc.desktop b/kabc/tdeab2tdeabc.desktop deleted file mode 100644 index 945f044d4..000000000 --- a/kabc/tdeab2tdeabc.desktop +++ /dev/null @@ -1,105 +0,0 @@ -[Desktop Entry] -Name=tdeab2tdeabc -Name[af]=kab-na-kabc -Name[csb]=Kònwersëjô adresowi knéżczi -Name[eo]=Konvertilo de "kab" al "kabc" -Name[fr]=KAB2KABC -Name[fy]=Kab2kabc -Name[hu]=Kab2kabc -Name[it]=Kab2Kabc -Name[nl]=Kab2kabc -Name[pl]=Konwersja książki adresowej -Name[pt_BR]=Conversão de kab para kabc -Name[ro]=Kab2kabc -Name[sv]=Kab2kabc -Name[te]=కెఎబి2కెఎబిసి -Name[zu]=i-tdeab2tdeabc -Exec=tdeab2tdeabc --disable-autostart --quiet -Icon=misc -Type=Application -Comment=libkab to libkabc conversion tool. -Comment[af]=libkab na libkabc omskakeling program. -Comment[ar]=أداة تحويل libkab إلى libkabc. -Comment[az]=libkab - libkabc dönüşdürmÉ™ vasitÉ™si. -Comment[be]=ІнÑтрумент пераўтварÑÐ½Ð½Ñ libkab у libkabc. -Comment[bg]=Програма за конвертиране на libkab до libkabc. -Comment[bn]=libkab থেকে libkabc-তে পরিবরà§à¦¤à¦¨ করার পà§à¦°à§‹à¦—à§à¦°à¦¾à¦®à¥¤ -Comment[bs]=alat za pretvaranje libkab u libkabc. -Comment[ca]=Eina de conversió de libkab a libkabc. -Comment[cs]=PÅ™evod dat z libkab do libkabc. -Comment[csb]=Nôrzãdze do kònwersëji z libkab do libkabc. -Comment[cy]=erfyn trosi libkab i libkabc -Comment[da]=libkab-til-libkabc-konverteringsværktøj. -Comment[de]=Konvertierung von libkab in libkabc -Comment[el]=ΕÏγαλείο μετατÏοπής από το libkab στο libkabc. -Comment[eo]=Konvertilo de "libkab" al "libkabc" -Comment[es]=Conversor libkab a libkabc. -Comment[et]=libkab -> libkabc teisendamine -Comment[eu]=libkab-etik libkabc-era bihurtzeko tresna. -Comment[fa]=ابزار تبدیل libkab به libcabc. -Comment[fi]=libkab-libkabc -muunnin -Comment[fr]=Outil de conversion de libkab vers libkabc. -Comment[fy]=Konversjeprogramma fan libkab nei libkabc. -Comment[ga]=Uirlis tiontaithe ó libkab go libkabc. -Comment[gl]=Ferramenta de conversión de libkab a libkabc. -Comment[he]=כלי המרה מ־libkab ל־libkabc -Comment[hi]=libkab से libkabc बदलने वाला औजार -Comment[hr]=Alat za pretvaranje iz libkab u libkabc -Comment[hsb]=libkab -> libkabc konwerter -Comment[hu]=libkab -> libkabc konvertáló. -Comment[id]=konverter libkab ke libkabc. -Comment[is]=libkab í libkabc breytingatól. -Comment[it]=Strumento di conversione da libkab a libkabc. -Comment[ja]=libkab ã‹ã‚‰ libkabc ã¸ã®å¤‰æ›ãƒ„ール -Comment[ka]=libkab => libkabc გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ხელსáƒáƒ¬áƒ§áƒ. -Comment[kk]=libkab дегеннен libkabc дегенге айналдыру құралы. -Comment[km]=ឧបករណáŸâ€‹áž”ម្លែង​ពី libkab ទៅ libkabc -Comment[ko]=libkabì„ libkabc로 바꿔주는 연장. -Comment[lb]=libkab op libkabc Konvertéierungs-Hëllefsmëttel. -Comment[lt]=libkab į libkabc konvertavimo įrankis. -Comment[lv]=libkab uz libkabc kovertēšanas rÄ«ks. -Comment[mk]=алатка за претворање од libkab во libkabc. -Comment[mn]=libkab-Ð°Ð°Ñ libkabc-руу хөрвүүлÑгч -Comment[ms]=perkakasan penukaran libkab to libkabc. -Comment[mt]=Għodda għall-konverżjoni libkab għal libkabc -Comment[nb]=libkab til libkabc konverteringsverktøy. -Comment[nds]=Warktüüch för't Ümwanneln vun libkab na libkabc. -Comment[ne]=libkab to libkabc रूपानà¥à¤¤à¤°à¤£ उपकरण । -Comment[nl]=Conversieprogramma van libkab naar libkabc. -Comment[nn]=Konverterer libkab til libkabc -Comment[nso]=Sebereka sa phetosetso ya libkab go libkabc -Comment[pa]=libkab ਤੋ libkabc ਤਬਦੀਲੀ ਸੰਦ। -Comment[pl]=NarzÄ™dzie do konwersji z libkab do libkabc. -Comment[pt]=Ferramenta de conversão de libkab para libkabc. -Comment[pt_BR]=Ferramenta de conversão de libkab para libkabc. -Comment[ro]=Utilitar de conversie de la "libkab" la "libkabc". -Comment[ru]=утилита Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ libkab в libkabc. -Comment[rw]=Igikoresho cy'ihindura libkab muri libkabc. -Comment[se]=konverterenreaidu libkab:as libkabc:ai -Comment[sk]=Prevod dát z libkab do libkabc. -Comment[sl]=Orodje za pretvorbo iz libkab v libkabc -Comment[sq]=Vegla për shëndrimin e libkab në libkabc. -Comment[sr]=Ðлат за конверзију из libkab-а у libkabc. -Comment[sr@Latn]=Alat za konverziju iz libkab-a u libkabc. -Comment[ss]=Lithulusi lekutjintja le-libkab kuya ku-libkabc. -Comment[sv]=Konverteringsverktyg frÃ¥n libkab till libkabc -Comment[ta]=libkab இலிரà¯à®¨à¯à®¤à¯ libkabc கà¯à®•௠மாறà¯à®±à¯à®®à¯ கரà¯à®µà®¿. -Comment[te]=libkab à°¨à±à°‚à°šà°¿ libkabc కౠమారà±à°šà± పనిమà±à°Ÿà±à°Ÿà± -Comment[tg]=аÑбоби дигаргунÑози libkab ба libkabc -Comment[th]=เครื่องมือเปลี่ยน libkab เป็น libkabc -Comment[tr]=libkab' tan libkabc' ye dönüştürme aracı -Comment[tt]=libkab-›libkabc äyländerü qoralı. -Comment[uk]=ЗаÑіб Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ libkab до libkabc. -Comment[uz]=libkab'ni libkabc'ga aylantiradigan vosita. -Comment[uz@cyrillic]=libkab'ни libkabc'га айлантирадиган воÑита. -Comment[ven]=Tshishumiswa tsha u shandukisa libkab itshi ya kha libkabc -Comment[vi]=Công cụ chuyển đổi libkab sang libkabc. -Comment[xh]=libkab kwi libkabc isixhobo sokuguqulela. -Comment[zh_CN]=libkab 到 libkabc 的转æ¢å·¥å…·ã€‚ -Comment[zh_HK]=libkab 至 libkabc 的轉æ›å·¥å…· -Comment[zh_TW]=libkab 至 libkabc 轉æ›å·¥å…· -Comment[zu]=Ithuluzi lokuguqula le-libkab kuyaku-libkabc -Terminal=false -NoDisplay=true -X-TDE-autostart-condition=tdeab2tdeabcrc:Startup:EnableAutostart:true -OnlyShowIn=TDE; diff --git a/kabc/tests/Makefile.am b/kabc/tests/Makefile.am deleted file mode 100644 index 961d12bd4..000000000 --- a/kabc/tests/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# Make sure $(all_includes) remains last! -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ - -I$(srcdir)/../vcardparser/ -I$(srcdir)/../vcard/include \ - -I$(srcdir)/../vcard/include/generated \ - -I$(srcdir)/../vcardparser $(all_includes) -LDADD = ../libkabc.la - -METASOURCES = AUTO - -check_PROGRAMS = testlock testldapclient - -testlock_LDFLAGS = $(all_libraries) -testlock_SOURCES = testlock.cpp - -testldapclient_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testldapclient_SOURCES = testldapclient.cpp - -EXTRA_PROGRAMS = testkabc testkabcdlg testdistlist bigread bigwrite testdb \ - testaddressee testaddresseelist testaddressfmt kabcargl testaddresslineedit - -testkabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testkabc_SOURCES = testkabc.cpp - -testaddressee_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddressee_SOURCES = testaddressee.cpp - -testaddresseelist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddresseelist_SOURCES = testaddresseelist.cpp - -testaddressfmt_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddressfmt_SOURCES = testaddressfmt.cpp - -testkabcdlg_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testkabcdlg_SOURCES = testkabcdlg.cpp - -testdistlist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testdistlist_SOURCES = testdistlist.cpp - -testaddresslineedit_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddresslineedit_SOURCES = testaddresslineedit.cpp - -bigread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -bigread_LDADD = ../libkabc.la $(top_builddir)/kabc/plugins/file/libkabc_file.la -bigread_SOURCES = bigread.cpp - -bigwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -bigwrite_LDADD = ../libkabc.la $(top_builddir)/kabc/plugins/file/libkabc_file.la -bigwrite_SOURCES = bigwrite.cpp - -testdb_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testdb_SOURCES = testdb.cpp - -kabcargl_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kabcargl_SOURCES = kabcargl.cpp - diff --git a/kabc/tests/bigread.cpp b/kabc/tests/bigread.cpp deleted file mode 100644 index 5ea2393dc..000000000 --- a/kabc/tests/bigread.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "vcardformat.h" -#include "plugins/file/resourcefile.h" -#if 0 -#include "resourcesql.h" -#endif - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("bigread","BigReadKabc","0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app( false, false ); - - AddressBook ab; - - ResourceFile r( "my.kabc", "vcard2" ); - ab.addResource( &r ); - -#if 0 - ResourceSql rsql( &ab, "root", "kde4ever", "localhost" ); - ab.addResource( &rsql ); -#endif - - struct tms start; - - times( &start ); - -#if 0 - kdDebug() << "utime : " << int( start.tms_utime ) << endl; - kdDebug() << "stime : " << int( start.tms_stime ) << endl; - kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; -#endif - - kdDebug() << "Start load" << endl; - ab.load(); - kdDebug() << "Finished load" << endl; - - struct tms end; - - times( &end ); - -#if 0 - kdDebug() << "utime : " << int( end.tms_utime ) << endl; - kdDebug() << "stime : " << int( end.tms_stime ) << endl; - kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; -#endif - - kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; - kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; - -// ab.dump(); -} diff --git a/kabc/tests/bigwrite.cpp b/kabc/tests/bigwrite.cpp deleted file mode 100644 index 167f5d44d..000000000 --- a/kabc/tests/bigwrite.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "vcardformat.h" -#include "plugins/file/resourcefile.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("bigwrite","BigWriteKabc","0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app( false, false ); - - AddressBook ab; - ResourceFile r( "my.kabc", "vcard" ); - ab.addResource( &r ); - - for( int i = 0; i < 5000; ++i ) { - Addressee a; - a.setGivenName( "number" + TQString::number( i ) ); - a.setFamilyName( "Name" ); - a.insertEmail( TQString::number( i ) + "@domain" ); - - ab.insertAddressee( a ); - } - printf( "\n" ); - - Ticket *t = ab.requestSaveTicket( &r ); - if ( t ) { - struct tms start; - - times( &start ); - -#if 0 - kdDebug() << "utime : " << int( start.tms_utime ) << endl; - kdDebug() << "stime : " << int( start.tms_stime ) << endl; - kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; -#endif - - if ( !ab.save( t ) ) { - kdDebug() << "Can't save." << endl; - } - - struct tms end; - - times( &end ); - -#if 0 - kdDebug() << "utime : " << int( end.tms_utime ) << endl; - kdDebug() << "stime : " << int( end.tms_stime ) << endl; - kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; -#endif - - kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; - kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; - - } else { - kdDebug() << "No ticket for save." << endl; - } -} diff --git a/kabc/tests/kabcargl.cpp b/kabc/tests/kabcargl.cpp deleted file mode 100644 index 589c973f2..000000000 --- a/kabc/tests/kabcargl.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "stdaddressbook.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("kabcargl","Fix broken pre3.0rc3 format","0.1"); - aboutData.addAuthor("Cornelius Schumacher", 0, "schumacher@kde.org"); - - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app; - - TQString filename = StdAddressBook::fileName(); - - TQFile f( filename ); - if ( !f.open( IO_ReadOnly ) ) { - kdDebug() << "Error opening file '" << filename << "' for reading." << endl; - return 1; - } - - TQTextStream t( &f ); - t.setEncoding(TQTextStream::UnicodeUTF8); - TQString text = t.read(); - f.close(); - - text = TQString::fromUtf8( text.local8Bit() ); - text.replace( "\n", "\r\n" ); - - if ( !f.open( IO_WriteOnly ) ) { - kdDebug() << "Error opening file '" << filename << "' for writing." << endl; - return 1; - } - - TQTextStream t2( &f ); - t2.setEncoding(TQTextStream::UnicodeUTF8); - t2 << text; - f.close(); -} diff --git a/kabc/tests/testaddressee.cpp b/kabc/tests/testaddressee.cpp deleted file mode 100644 index 09f95d29b..000000000 --- a/kabc/tests/testaddressee.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "plugins/file/resourcefile.h" -#include "formats/binaryformat.h" -#include "vcardformat.h" -#include "phonenumber.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "save", "", 0 }, - { "number", "", 0 }, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testaddressee","TestAddressee","0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); - - kdDebug() << "Creating a" << endl; - Addressee a; - - kdDebug() << "tick1" << endl; - a.setGivenName("Hans"); - kdDebug() << "tick2" << endl; - a.setPrefix("Dr."); - - kdDebug() << "Creating b" << endl; - Addressee b( a ); - - kdDebug() << "tack1" << endl; - a.setFamilyName("Wurst"); - kdDebug() << "tack2" << endl; - a.setNickName("hansi"); - - kdDebug() << "Creating c" << endl; - Addressee c = a; - - kdDebug() << "tock1" << endl; - c.setGivenName("Eberhard"); - - a.dump(); - b.dump(); - c.dump(); -} diff --git a/kabc/tests/testaddresseelist.cpp b/kabc/tests/testaddresseelist.cpp deleted file mode 100644 index 10fa4aaef..000000000 --- a/kabc/tests/testaddresseelist.cpp +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "addresseelist.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "save", "", 0 }, - { "number", "", 0 }, - TDECmdLineLastOption -}; - -int main(int /*argc*/,char /* **argv*/) -{ -/* TDEAboutData aboutData("testaddresseelist","TestAddresseeList","0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); */ - - kdDebug() << "Creating addressees" << endl; - Addressee a, b, c, d, e, f; - a.setGivenName ("Peter"); - a.setFamilyName("Pan"); - a.setFormattedName("Pan, Peter"); - a.setUid("Asdf"); - b.setGivenName ("Phileas"); - b.setFamilyName("Fogg"); - b.setFormattedName("Fogg, Phileas"); - b.setUid("Rsdf"); - c.setGivenName ("Jim"); - c.setFamilyName("Hawkins"); - c.setFormattedName("Hawkins, Jim"); - c.setUid("Fhwn"); - d.setGivenName ("John"); - d.setFamilyName("Silver"); - d.setPrefix ("Long"); - d.setFormattedName("Long John Silver"); - d.setUid("Z2hk"); - e.setGivenName ("Alice"); - e.setFamilyName("Liddel"); - e.setFormattedName("Liddel, Alice"); - e.setUid("kk45"); - f.setGivenName ("Edmond"); - f.setFamilyName("Dantes"); - f.setFormattedName("Dantes, Edmond"); - f.setUid("78ze"); - - kdDebug() << "Adding to list" << endl; - AddresseeList list; - list.append(a); - list.append(b); - list.append(c); - list.append(d); - list.append(e); - list.append(f); - - list.sortBy(FamilyName); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Rsdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="kk45" - && (*list.at(4)).uid()=="Asdf" - && (*list.at(5)).uid()=="Z2hk" - ) ) { - kdError() << "SORTING BY FAMILY NAME NOT CORRECT!" << endl; - kdDebug() << "list sorted by family name:" << endl; - list.dump(); - } else { - kdDebug() << "Sorting by family name correct." << endl; - } - list.setReverseSorting(true); - list.sort(); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Rsdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="kk45" - && (*list.at(1)).uid()=="Asdf" - && (*list.at(0)).uid()=="Z2hk" - ) ) { - kdError() << "REVERSE SORTING BY FAMILY NAME NOT CORRECT!" << endl; - kdDebug() << "list reverse sorted by family name:" << endl; - list.dump(); - } else { - kdDebug() << "Reverse sorting by family name correct." << endl; - } - - list.setReverseSorting(false); - list.sortBy(FormattedName); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Rsdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="kk45" - && (*list.at(4)).uid()=="Z2hk" - && (*list.at(5)).uid()=="Asdf" - ) ) { - kdError() << "SORTING BY FORMATTED NAME NOT CORRECT!" << endl; - kdDebug() << "list sorted by formatted name:" << endl; - list.dump(); - } else { - kdDebug() << "Sorting by formatted name correct." << endl; - } - list.setReverseSorting(true); - list.sort(); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Rsdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="kk45" - && (*list.at(1)).uid()=="Z2hk" - && (*list.at(0)).uid()=="Asdf" - ) ) { - kdError() << "REVERSE SORTING BY FORMATTED NAME NOT CORRECT!" << endl; - kdDebug() << "list reverse sorted by formatted name:" << endl; - list.dump(); - } else { - kdDebug() << "Reverse sorting by formatted name correct." << endl; - } - - - list.setReverseSorting(false); - list.sortBy(Uid); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Asdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="Rsdf" - && (*list.at(4)).uid()=="Z2hk" - && (*list.at(5)).uid()=="kk45" - ) ) { - kdError() << "SORTING BY UID NOT CORRECT!" << endl; - kdDebug() << "list sorted by Uid:" << endl; - list.dump(); - } else { - kdDebug() << "Sorting by Uid correct." << endl; - } - list.setReverseSorting(true); - list.sortBy(Uid); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Asdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="Rsdf" - && (*list.at(1)).uid()=="Z2hk" - && (*list.at(0)).uid()=="kk45" - ) ) { - kdError() << "REVERSE SORTING BY UID NOT CORRECT!" << endl; - kdDebug() << "list sorted by Uid:" << endl; - list.dump(); - } else { - kdDebug() << "Reverse sorting by Uid correct." << endl; - } - - // zero, one or two entries might give errors in a poor sorting - // implementation - kdDebug() << "sorting empty list" << endl; - AddresseeList list2; - list2.sort(); - - kdDebug() << "sorting one entry list" << endl; - list2.append(a); - list2.sort(); - - kdDebug() << "sorting two entry list" << endl; - list2.append(f); - list2.setReverseSorting(false); - list2.sort(); - if ( !( (*list2.at(0)).uid()=="78ze" - && (*list2.at(1)).uid()=="Asdf" - ) ) { - kdError() << "SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; - kdDebug() << "list sorted by formatted name, two entries:" << endl; - list2.dump(); - } else { - kdDebug() << "Sorting by FormattedName in a two entry list correct." << endl; - } - list2.setReverseSorting(true); - list2.sort(); - if ( !( (*list2.at(1)).uid()=="78ze" - && (*list2.at(0)).uid()=="Asdf" - ) ) { - kdError() << "REVERSE SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; - kdDebug() << "list reverse sorted by formatted name, two entries:" << endl; - list2.dump(); - } else { - kdDebug() << "Reverse sorting by FormattedName in a two entry list correct." << endl; - } - -} - - diff --git a/kabc/tests/testaddressfmt.cpp b/kabc/tests/testaddressfmt.cpp deleted file mode 100644 index ca13a116c..000000000 --- a/kabc/tests/testaddressfmt.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "address.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "save", "", 0 }, - { "number", "", 0 }, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testaddressfmt","TestAddressFormat","0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - - Address a; - a.setStreet("Lummerlandstr. 1"); - a.setPostalCode("12345"); - a.setLocality("Lummerstadt"); - a.setCountry ("Germany"); - - Address b; - b.setStreet("457 Foobar Ave"); - b.setPostalCode("1A2B3C"); - b.setLocality("Nervousbreaktown"); - b.setRegion("DC"); - b.setCountry("United States of America"); - - Address c; - c.setStreet("Lummerlandstr. 1"); - c.setPostalCode("12345"); - c.setLocality("Lummerstadt"); - c.setCountry ("Deutschland"); - - Address d; - d.setStreet("Lummerlandstr. 1"); - d.setPostalCode("12345"); - d.setLocality("Lummerstadt"); - d.setCountry (""); - - tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); - tqDebug( a.formattedAddress("Jim Knopf").latin1() ); - tqDebug( "-------------------------------------\nShould have US address formatting, local country formatting\n" ); - tqDebug( b.formattedAddress("Huck Finn").latin1() ); - tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); - tqDebug( c.formattedAddress("Jim Knopf").latin1() ); - tqDebug( "-------------------------------------\nShould have local address formatting, local country formatting\n" ); - tqDebug( d.formattedAddress("Jim Knopf").latin1() ); -} - - diff --git a/kabc/tests/testaddresslineedit.cpp b/kabc/tests/testaddresslineedit.cpp deleted file mode 100644 index 7315aef7e..000000000 --- a/kabc/tests/testaddresslineedit.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -#include - -#include "addresslineedit.h" - -using namespace KABC; - -int main( int argc,char **argv ) -{ - TDEAboutData aboutData( "testaddresslineedit", - I18N_NOOP( "Test Address LineEdit" ), "0.1" ); - TDECmdLineArgs::init( argc, argv, &aboutData ); - - TDEApplication app; - - AddressLineEdit *lineEdit = new AddressLineEdit( 0 ); - - lineEdit->show(); - app.setMainWidget( lineEdit ); - - TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); - - app.exec(); - - delete lineEdit; -} diff --git a/kabc/tests/testdb.cpp b/kabc/tests/testdb.cpp deleted file mode 100644 index fd4e4f6c1..000000000 --- a/kabc/tests/testdb.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "vcardformat.h" -#include "resourcesql.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testdb","TestKabcDB","0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - -// TDEApplication app( false, false ); - TDEApplication app; - - AddressBook ab; - - ResourceSql r( &ab, "root", "kde4ever", "localhost" ); - if ( ! r.open() ) { - kdDebug() << "Failed to open resource." << endl; - } - - r.load( &ab ); - - r.close(); - - ab.dump(); -} diff --git a/kabc/tests/testdistlist.cpp b/kabc/tests/testdistlist.cpp deleted file mode 100644 index 0f0e90f90..000000000 --- a/kabc/tests/testdistlist.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "stdaddressbook.h" - -#include "distributionlisteditor.h" -#include "distributionlist.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - {"list ", I18N_NOOP("Show distribution list with name "), 0}, - TDECmdLineLastOption -}; - - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testdistlist",I18N_NOOP("Test Distribution Lists"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->isSet("list")) { - TQString name = args->getOption("list"); - - DistributionListManager *manager = - new DistributionListManager( StdAddressBook::self() ); - manager->load(); - DistributionList *list = manager->list( name ); - if ( !list ) { - kdDebug() << "No list with name '" << name << "'" << endl; - return 1; - } else { - kdDebug() << "RESULT: " << list->emails().join(", ") << endl; - return 0; - } - } - - DistributionListEditor *editor = - new DistributionListEditor( StdAddressBook::self(), 0 ); - - editor->show(); - app.setMainWidget(editor); - - TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); - - app.exec(); - - delete editor; -} diff --git a/kabc/tests/testkabc.cpp b/kabc/tests/testkabc.cpp deleted file mode 100644 index 3caea88f1..000000000 --- a/kabc/tests/testkabc.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "geo.h" -#include "secrecy.h" -#include "stdaddressbook.h" -#include "timezone.h" -#include "key.h" -#include "agent.h" -#include "vcardconverter.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testkabc",I18N_NOOP("TestKabc"),"0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - - TDEApplication app( false, false ); - AddressBook *ab = StdAddressBook::self(); - -#define READ - -#ifdef READ - AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { - TQString vcard; - VCardConverter converter; - converter.addresseeToVCard( *it, vcard ); - kdDebug() << "card=" << vcard << endl; - } -#else - Addressee addr; - - addr.setGivenName("Tobias"); - addr.setFamilyName("Koenig"); - - - Picture pic; - TQImage img; - img.load("/home/tobias/test.png"); -/* - pic.setData(img); - pic.setType(TQImage::imageFormat("/home/tobias/test.png")); -*/ - pic.setUrl("http://www.mypict.de"); - addr.setLogo( pic ); - - ab->insertAddressee( addr ); - - StdAddressBook::save(); -#endif - - return 0; -} diff --git a/kabc/tests/testkabcdlg.cpp b/kabc/tests/testkabcdlg.cpp deleted file mode 100644 index 24225cc1b..000000000 --- a/kabc/tests/testkabcdlg.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "addresseedialog.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - {"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0}, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testkabcdlg",I18N_NOOP("TestKabc"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->isSet("multiple")) { - Addressee::List al = AddresseeDialog::getAddressees( 0 ); - Addressee::List::ConstIterator it; - kdDebug() << "Selected Addressees:" << endl; - for( it = al.begin(); it != al.end(); ++it ) { - kdDebug() << " " << (*it).fullEmail() << endl; - } - } else { - Addressee a = AddresseeDialog::getAddressee( 0 ); - - if ( !a.isEmpty() ) { - kdDebug() << "Selected Addressee:" << endl; - a.dump(); - } else { - kdDebug() << "No Addressee selected." << endl; - } - } -} diff --git a/kabc/tests/testldapclient.cpp b/kabc/tests/testldapclient.cpp deleted file mode 100644 index df9fd6226..000000000 --- a/kabc/tests/testldapclient.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "testldapclient.h" - -#include -#include -#include - -#include - -#include -#include - -int main(int argc, char *argv[]) -{ - TDEApplication::disableAutoDcopRegistration(); - TDECmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0); - TDEApplication app; - - TestLDAPClient test; - test.setup(); - test.runAll(); - test.cleanup(); - kdDebug() << "All tests OK." << endl; - return 0; -} - -void TestLDAPClient::setup() -{ -} - -void TestLDAPClient::runAll() -{ - testIntevation(); -} - -bool TestLDAPClient::check(const TQString& txt, TQString a, TQString b) -{ - if (a.isEmpty()) - a = TQString::null; - if (b.isEmpty()) - b = TQString::null; - if (a == b) { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; - } - else { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; - cleanup(); - exit(1); - } - return true; -} - -void TestLDAPClient::cleanup() -{ - mClient = 0; -} - -void TestLDAPClient::testIntevation() -{ - kdDebug() << k_funcinfo << endl; - mClient = new LdapClient( this ); - - mClient->setHost( "ca.intevation.de" ); - mClient->setPort( "389" ); - mClient->setBase( "o=Intevation GmbH,c=de" ); - - // Same list as in kaddressbook's ldapsearchdialog - TQStringList attrs; - attrs << "l" << "Company" << "co" << "department" << "description" << "mail" << "facsimileTelephoneNumber" << "cn" << "homePhone" << "mobile" << "o" << "pager" << "postalAddress" << "st" << "street" << "title" << "uid" << "telephoneNumber" << "postalCode" << "objectClass"; - // the list from ldapclient.cpp - //attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass"; - mClient->setAttrs( attrs ); - - // Taken from LdapSearch - //TQString mSearchText = TQString::fromUtf8( "Till" ); - //TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" ) - // .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); - - // For some reason a fromUtf8 broke the search for me (no results). - // But this certainly looks fishy, it might break on non-utf8 systems. - TQString filter = "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(|(cn=*Ägypten MDK*)(sn=*Ägypten MDK*))"; - - connect( mClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), - this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); - connect( mClient, TQT_SIGNAL( done() ), - this, TQT_SLOT( slotLDAPDone() ) ); - connect( mClient, TQT_SIGNAL( error( const TQString& ) ), - this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); - mClient->startQuery( filter ); - kapp->eventLoop()->enterLoop(); - delete mClient; mClient = 0; -} - -// from kaddressbook... ugly though... -static TQString asUtf8( const TQByteArray &val ) -{ - if ( val.isEmpty() ) - return TQString::null; - - const char *data = val.data(); - - //TQString::fromUtf8() bug workaround - if ( data[ val.size() - 1 ] == '\0' ) - return TQString::fromUtf8( data, val.size() - 1 ); - else - return TQString::fromUtf8( data, val.size() ); -} - -static TQString join( const KABC::LdapAttrValue& lst, const TQString& sep ) -{ - TQString res; - bool already = false; - for ( KABC::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - if ( already ) - res += sep; - already = TRUE; - res += asUtf8( *it ); - } - return res; -} - -void TestLDAPClient::slotLDAPResult( const KABC::LdapObject& obj ) -{ - TQString cn = join( obj.attrs[ "cn" ], ", " ); - kdDebug() << " cn:" << cn << endl; - assert( !obj.attrs[ "mail" ].isEmpty() ); - TQString mail = join( obj.attrs[ "mail" ], ", " ); - kdDebug() << " mail:" << mail << endl; - assert( mail.contains( '@' ) ); -} - -void TestLDAPClient::slotLDAPError( const TQString& err ) -{ - kdDebug() << k_funcinfo << err << endl; - ::exit( 1 ); -} - -void TestLDAPClient::slotLDAPDone() -{ - kdDebug() << k_funcinfo << endl; - kapp->eventLoop()->exitLoop(); -} - -#include "testldapclient.moc" diff --git a/kabc/tests/testldapclient.h b/kabc/tests/testldapclient.h deleted file mode 100644 index 1995914c3..000000000 --- a/kabc/tests/testldapclient.h +++ /dev/null @@ -1,51 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef TESTLDAPCLIENT_H -#define TESTLDAPCLIENT_H - -#include - -#include "../ldapclient.h" -typedef KABC::LdapClient LdapClient; - -class TestLDAPClient : public TQObject -{ - Q_OBJECT - -public: - TestLDAPClient() {} - void setup(); - void runAll(); - void cleanup(); - - // tests - void testIntevation(); - -private slots: - void slotLDAPResult( const KABC::LdapObject& ); - void slotLDAPError( const TQString& ); - void slotLDAPDone(); - -private: - bool check(const TQString& txt, TQString a, TQString b); - - LdapClient* mClient; -}; - -#endif diff --git a/kabc/tests/testlock.cpp b/kabc/tests/testlock.cpp deleted file mode 100644 index 632c690a6..000000000 --- a/kabc/tests/testlock.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "testlock.h" - -#include "stdaddressbook.h" - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -using namespace KABC; - -LockWidget::LockWidget( const TQString &identifier ) -{ - TQVBoxLayout *topLayout = new TQVBoxLayout( this ); - topLayout->setMargin( KDialog::marginHint() ); - topLayout->setSpacing( KDialog::spacingHint() ); - - if ( identifier.isEmpty() ) { - mLock = 0; - } else { - mLock = new Lock( identifier ); - - int pid = getpid(); - - TQLabel *pidLabel = new TQLabel( "Process ID: " + TQString::number( pid ), - this ); - topLayout->addWidget( pidLabel ); - - TQHBoxLayout *identifierLayout = new TQHBoxLayout( topLayout ); - - TQLabel *resourceLabel = new TQLabel( "Identifier:", this ); - identifierLayout->addWidget( resourceLabel ); - - TQLabel *resourceIdentifier = new TQLabel( identifier, this ); - identifierLayout->addWidget( resourceIdentifier ); - - mStatus = new TQLabel( "Status: Unlocked", this ); - topLayout->addWidget( mStatus ); - - TQPushButton *button = new TQPushButton( "Lock", this ); - topLayout->addWidget( button ); - connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( lock() ) ); - - button = new TQPushButton( "Unlock", this ); - topLayout->addWidget( button ); - connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( unlock() ) ); - } - - mLockView = new TQListView( this ); - topLayout->addWidget( mLockView ); - mLockView->addColumn( "Lock File" ); - mLockView->addColumn( "PID" ); - mLockView->addColumn( "Locking App" ); - - updateLockView(); - - TQPushButton *quitButton = new TQPushButton( "Quit", this ); - topLayout->addWidget( quitButton ); - connect( quitButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) ); - - KDirWatch *watch = KDirWatch::self(); - connect( watch, TQT_SIGNAL( dirty( const TQString & ) ), - TQT_SLOT( updateLockView() ) ); - connect( watch, TQT_SIGNAL( created( const TQString & ) ), - TQT_SLOT( updateLockView() ) ); - connect( watch, TQT_SIGNAL( deleted( const TQString & ) ), - TQT_SLOT( updateLockView() ) ); - watch->addDir( Lock::locksDir() ); - watch->startScan(); -} - -LockWidget::~LockWidget() -{ - delete mLock; -} - -void LockWidget::updateLockView() -{ - mLockView->clear(); - - TQDir dir( Lock::locksDir() ); - - TQStringList files = dir.entryList( "*.lock" ); - - TQStringList::ConstIterator it; - for( it = files.begin(); it != files.end(); ++it ) { - if ( *it == "." || *it == ".." ) continue; - - TQString app; - int pid; - if ( !Lock::readLockFile( dir.filePath( *it ), pid, app ) ) { - kdWarning() << "Unable to open lock file '" << *it << "'" << endl; - } else { - new TQListViewItem( mLockView, *it, TQString::number( pid ), app ); - } - } -} - -void LockWidget::lock() -{ - if ( !mLock->lock() ) { - KMessageBox::sorry( this, mLock->error() ); - } else { - mStatus->setText( "Status: Locked" ); - } -} - -void LockWidget::unlock() -{ - if ( !mLock->unlock() ) { - KMessageBox::sorry( this, mLock->error() ); - } else { - mStatus->setText( "Status: Unlocked" ); - } -} - - -static const TDECmdLineOptions options[] = -{ - { "a", 0, 0 }, - { "addressbook", "Standard address book", 0 }, - { "d", 0, 0 }, - { "diraddressbook", "Standard address book directory resource", 0 }, - { "+identifier", "Identifier of resource to be locked, e.g. filename", 0 }, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testlock",I18N_NOOP("Test libkabc Lock"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TQString identifier; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if ( args->count() == 1 ) { - identifier = args->arg( 0 ); - } else if ( args->count() != 0 ) { - std::cerr << "Usage: testlock " << std::endl; - return 1; - } - - if ( args->isSet( "addressbook" ) ) { - if ( args->count() == 1 ) { - std::cerr << "Ignoring resource identifier" << std::endl; - } - identifier = StdAddressBook::fileName(); - } - - if ( args->isSet( "diraddressbook" ) ) { - if ( args->count() == 1 ) { - std::cerr << "Ignoring resource identifier" << std::endl; - } - identifier = StdAddressBook::directoryName(); - } - - LockWidget mainWidget( identifier ); - - kapp->setMainWidget( &mainWidget ); - mainWidget.show(); - - return app.exec(); -} - -#include "testlock.moc" diff --git a/kabc/tests/testlock.h b/kabc/tests/testlock.h deleted file mode 100644 index a94d4e8c6..000000000 --- a/kabc/tests/testlock.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_TESTLOCK_H -#define KABC_TESTLOCK_H - -#include "lock.h" - -#include - -class TQLabel; -class TQListView; - -class KABC_EXPORT LockWidget : public TQWidget -{ - Q_OBJECT - public: - LockWidget( const TQString &identifier ); - ~LockWidget(); - - protected slots: - void lock(); - void unlock(); - - void updateLockView(); - - private: - KABC::Lock *mLock; - - TQLabel *mStatus; - TQListView *mLockView; -}; - -#endif diff --git a/kabc/timezone.cpp b/kabc/timezone.cpp deleted file mode 100644 index 59a184c6d..000000000 --- a/kabc/timezone.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "timezone.h" - -using namespace KABC; - -TimeZone::TimeZone() : - mOffset( 0 ), mValid( false ) -{ -} - -TimeZone::TimeZone( int offset ) : - mOffset( offset ), mValid( true ) -{ -} - -void TimeZone::setOffset( int offset ) -{ - mOffset = offset; - mValid = true; -} - -int TimeZone::offset() const -{ - return mOffset; -} - -bool TimeZone::isValid() const -{ - return mValid; -} - -bool TimeZone::operator==( const TimeZone &t ) const -{ - if ( !t.isValid() && !isValid() ) return true; - if ( !t.isValid() || !isValid() ) return false; - if ( t.mOffset == mOffset ) return true; - return false; -} - -bool TimeZone::operator!=( const TimeZone &t ) const -{ - if ( !t.isValid() && !isValid() ) return false; - if ( !t.isValid() || !isValid() ) return true; - if ( t.mOffset != mOffset ) return true; - return false; -} - -TQString TimeZone::asString() const -{ - return TQString::number( mOffset ); -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const TimeZone &zone ) -{ - return s << zone.mOffset; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, TimeZone &zone ) -{ - s >> zone.mOffset; - zone.mValid = true; - - return s; -} diff --git a/kabc/timezone.h b/kabc/timezone.h deleted file mode 100644 index 8705797fb..000000000 --- a/kabc/timezone.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_TIMEZONE_H -#define KABC_TIMEZONE_H - -#include - -#include - -namespace KABC { - -/** - * @short Time zone information. - * - * This class stores information about a time zone. - */ -class KABC_EXPORT TimeZone -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); - -public: - - /** - * Construct invalid time zone. - */ - TimeZone(); - - /** - * Construct time zone. - * - * @param offset Offset in minutes relative to UTC. - */ - TimeZone( int offset ); - - /** - * Set time zone offset relative to UTC. - * - * @param offset Offset in minutes. - */ - void setOffset( int offset ); - - /** - * Return offset in minutes relative to UTC. - */ - int offset() const; - - /** - * Return, if this time zone object is valid. - */ - bool isValid() const; - - bool operator==( const TimeZone & ) const; - bool operator!=( const TimeZone & ) const; - - /** - * Return string representation of time zone offset. - */ - TQString asString() const; - -private: - int mOffset; // Offset in minutes - - bool mValid; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); - -} -#endif diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp deleted file mode 100644 index 5ad56f4fb..000000000 --- a/kabc/vcard/AdrParam.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include - -using namespace VCARD; - -AdrParam::AdrParam() - : Param() -{ -} - -AdrParam::AdrParam(const AdrParam & x) - : Param(x), - adrTypeList_ (x.adrTypeList_) -{ -} - -AdrParam::AdrParam(const TQCString & s) - : Param(s) -{ -} - - AdrParam & -AdrParam::operator = (AdrParam & x) -{ - if (*this == x) return *this; - - adrTypeList_ = x.adrTypeList(); - textParam_ = x.textParam(); - - Param::operator = (x); - return *this; -} - - AdrParam & -AdrParam::operator = (const TQCString & s) -{ - Param::operator = (s); - - adrTypeList_.clear(); - textParam_.truncate(0); - - return *this; -} - - bool -AdrParam::operator == (AdrParam & x) -{ - parse(); - - if (!x.textParam().isEmpty()) - return (x.textParam_ == textParam_); - - if (x.adrTypeList().count() != adrTypeList_.count()) - return false; - - TQStrListIterator it(x.adrTypeList_); - - for (; it.current(); ++it) - if (!adrTypeList_.find(it.current())) - return false; - - return true; -} - -AdrParam::~AdrParam() -{ -} - - void -AdrParam::_parse() -{ - adrTypeList_.clear(); - - if (strRep_.left(4) != "TYPE") { - textParam_ = strRep_; - return; - } - - if (!strRep_.contains('=')) - return; - - RTokenise(strRep_, ",", adrTypeList_); -} - - void -AdrParam::_assemble() -{ - if (!textParam_.isEmpty()) { - strRep_ = textParam_; - return; - } - - TQStrListIterator it(adrTypeList_); - - for (; it.current(); ++it) { - - strRep_ += it.current(); - - if (it.current() != adrTypeList_.last()) - strRep_ += ','; - } -} diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp deleted file mode 100644 index 535ba6980..000000000 --- a/kabc/vcard/AdrValue.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include -#include - -using namespace VCARD; - -AdrValue::AdrValue() - : Value() -{ -} - -AdrValue::AdrValue(const AdrValue & x) - : Value(x), - poBox_ (x.poBox_), - extAddress_ (x.extAddress_), - street_ (x.street_), - locality_ (x.locality_), - region_ (x.region_), - postCode_ (x.postCode_), - countryName_ (x.countryName_) -{ -} - -AdrValue::AdrValue(const TQCString & s) - : Value(s) -{ -} - - AdrValue & -AdrValue::operator = (AdrValue & x) -{ - if (*this == x) return *this; - - poBox_ = x.poBox_; - extAddress_ = x.extAddress_; - street_ = x.street_; - locality_ = x.locality_; - region_ = x.region_; - postCode_ = x.postCode_; - countryName_ = x.countryName_; - - Value::operator = (x); - return *this; -} - - AdrValue & -AdrValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -AdrValue::operator == (AdrValue & x) -{ - parse(); - x.parse(); - - return ( - poBox_ == x.poBox_ && - extAddress_ == x.extAddress_ && - street_ == x.street_ && - locality_ == x.locality_ && - region_ == x.region_ && - postCode_ == x.postCode_ && - countryName_ == x.countryName_); -} - -AdrValue::~AdrValue() -{ -} - - AdrValue * -AdrValue::clone() -{ - return new AdrValue( *this ); -} - - void -AdrValue::_parse() -{ - vDebug("AdrValue::_parse()"); - - TQStrList l; - RTokenise(strRep_, ";", l); - - for (unsigned int i = 0; i < l.count(); i++) { - - switch (i) { - - case 0: poBox_ = l.at(0); break; - case 1: extAddress_ = l.at(1); break; - case 2: street_ = l.at(2); break; - case 3: locality_ = l.at(3); break; - case 4: region_ = l.at(4); break; - case 5: postCode_ = l.at(5); break; - case 6: countryName_ = l.at(6); break; - default: break; - } - } -} - - void -AdrValue::_assemble() -{ - vDebug("AdrValue::_assemble"); - - strRep_ = poBox_; - strRep_ += ";" + extAddress_; - strRep_ += ";" + street_; - strRep_ += ";" + locality_; - strRep_ += ";" + region_; - strRep_ += ";" + postCode_; - strRep_ += ";" + countryName_; -} - diff --git a/kabc/vcard/AgentParam.cpp b/kabc/vcard/AgentParam.cpp deleted file mode 100644 index 9e4531b02..000000000 --- a/kabc/vcard/AgentParam.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -AgentParam::AgentParam() - : Param() -{ -} - -AgentParam::AgentParam(const AgentParam & x) - : Param(x), - refer_ (x.refer_), - uri_ (x.uri_) -{ -} - -AgentParam::AgentParam(const TQCString & s) - : Param(s) -{ -} - - AgentParam & -AgentParam::operator = (AgentParam & x) -{ - if (*this == x) return *this; - - refer_ = x.refer_; - uri_ = x.uri_; - - Param::operator = (x); - return *this; -} - - AgentParam & -AgentParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -AgentParam::operator == (AgentParam & x) -{ - parse(); - - if (refer_) - return (x.refer() && uri_ == x.uri_); - - return !x.refer(); -} - -AgentParam::~AgentParam() -{ -} - - void -AgentParam::_parse() -{ - if (strRep_.isEmpty()) { - refer_ = false; - return; - } - - refer_ = true; - uri_ = strRep_; -} - - void -AgentParam::_assemble() -{ - if (!refer_) { - strRep_.truncate(0); - return; - } - - strRep_ = uri_.asString(); - return; -} diff --git a/kabc/vcard/AgentValue.cpp b/kabc/vcard/AgentValue.cpp deleted file mode 100644 index 7d356f8d7..000000000 --- a/kabc/vcard/AgentValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -AgentValue::AgentValue() - : Value() -{ -} - -AgentValue::AgentValue(const AgentValue & x) - : Value(x) -{ -} - -AgentValue::AgentValue(const TQCString & s) - : Value(s) -{ -} - - AgentValue & -AgentValue::operator = (AgentValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - AgentValue & -AgentValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -AgentValue::operator == (AgentValue & x) -{ - x.parse(); - return false; -} - -AgentValue::~AgentValue() -{ -} - - void -AgentValue::_parse() -{ -} - - void -AgentValue::_assemble() -{ -} - diff --git a/kabc/vcard/CMakeLists.txt b/kabc/vcard/CMakeLists.txt deleted file mode 100644 index 8ad988434..000000000 --- a/kabc/vcard/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${CMAKE_CURRENT_SOURCE_DIR}/include/generated - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### vcard ##################################### - -set( target vcard ) - -set( ${target}_SRCS - vCard-all.cpp -) - -tde_add_library( ${target} SHARED - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK tdecore-shared - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/kabc/vcard/ClassValue.cpp b/kabc/vcard/ClassValue.cpp deleted file mode 100644 index 21417f87b..000000000 --- a/kabc/vcard/ClassValue.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -ClassValue::ClassValue() - : Value() -{ -} - -ClassValue::ClassValue(const ClassValue & x) - : Value(x), - classType_(x.classType_) -{ -} - -ClassValue::ClassValue(const TQCString & s) - : Value(s) -{ -} - - ClassValue & -ClassValue::operator = (ClassValue & x) -{ - if (*this == x) return *this; - x.parse(); - - classType_ = x.classType_; - - Value::operator = (x); - return *this; -} - - ClassValue & -ClassValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -ClassValue::operator == (ClassValue & x) -{ - x.parse(); - return ( classType_ == x.classType_ ); -} - -ClassValue::~ClassValue() -{ -} - - ClassValue * -ClassValue::clone() -{ - return new ClassValue( *this ); -} - - void -ClassValue::_parse() -{ - if (tqstricmp(strRep_, "PUBLIC") == 0) - classType_ = Public; - - else if (tqstricmp(strRep_, "PRIVATE") == 0) - classType_ = Private; - - else if (tqstricmp(strRep_, "CONFIDENTIAL") == 0) - classType_ = Confidential; - - else classType_ = Other; -} - - void -ClassValue::_assemble() -{ - switch (classType_) { - - case Public: - strRep_ = "PUBLIC"; - break; - - case Private: - strRep_ = "PRIVATE"; - break; - - case Confidential: - strRep_ = "CONFIDENTIAL"; - break; - - default: - break; - } -} - diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp deleted file mode 100644 index 52bcdf4f5..000000000 --- a/kabc/vcard/ContentLine.cpp +++ /dev/null @@ -1,302 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -using namespace VCARD; - -ContentLine::ContentLine() - : Entity(), - value_(0), - paramType_( ParamUnknown ), - valueType_( ValueUnknown ), - entityType_( EntityUnknown ) -{ -} - -ContentLine::ContentLine(const ContentLine & x) - : Entity(x), - group_ (x.group_), - name_ (x.name_), - paramList_(x.paramList_), - value_(x.value_->clone()), - paramType_( x.paramType_ ), - valueType_( x.valueType_ ), - entityType_( x.entityType_ ) -{ -} - -ContentLine::ContentLine(const TQCString & s) - : Entity(s), - value_(0), - paramType_( ParamUnknown ), - valueType_( ValueUnknown ), - entityType_( EntityUnknown ) -{ -} - - ContentLine & -ContentLine::operator = (ContentLine & x) -{ - if (*this == x) return *this; - - paramList_ = x.paramList(); - value_ = x.value_->clone(); - - Entity::operator = (x); - return *this; -} - - ContentLine & -ContentLine::operator = (const TQCString & s) -{ - Entity::operator = (s); - delete value_; - value_ = 0; - return *this; -} - - bool -ContentLine::operator == (ContentLine & x) -{ - x.parse(); - - TQPtrListIterator it(x.paramList()); - - if (!paramList_.find(it.current())) - return false; - - return true; -} - -ContentLine::~ContentLine() -{ - delete value_; - value_ = 0; -} - - void -ContentLine::_parse() -{ - vDebug("parse"); - - // Unqote newlines - strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" ); - - int split = strRep_.find(':'); - - if (split == -1) { // invalid content line - vDebug("No ':'"); - return; - } - - TQCString firstPart(strRep_.left(split)); - TQCString valuePart(strRep_.mid(split + 1)); - - split = firstPart.find('.'); - - if (split != -1) { - group_ = firstPart.left(split); - firstPart = firstPart.mid(split + 1); - } - - vDebug("Group == " + group_); - vDebug("firstPart == " + firstPart); - vDebug("valuePart == " + valuePart); - - // Now we have the group, the name and param list together and the value. - - TQStrList l; - - RTokenise(firstPart, ";", l); - - if (l.count() == 0) {// invalid - no name ! - vDebug("No name for this content line !"); - return; - } - - name_ = l.at(0); - - // Now we have the name, so the rest of 'l' is the params. - // Remove the name part. - l.remove(0u); - - entityType_ = EntityNameToEntityType(name_); - paramType_ = EntityTypeToParamType(entityType_); - - unsigned int i = 0; - - // For each parameter, create a new parameter of the correct type. - - TQStrListIterator it(l); - - for (; it.current(); ++it, i++) { - - TQCString str = *it; - - split = str.find("="); - if (split < 0 ) { - vDebug("No '=' in parameter."); - continue; - } - - TQCString paraName = str.left(split); - TQCString paraValue = str.mid(split + 1); - - TQStrList paraValues; - RTokenise(paraValue, ",", paraValues); - - TQStrListIterator it2( paraValues ); - - for(; it2.current(); ++it2) { - - Param *p = new Param; - p->setName( paraName ); - p->setValue( *it2 ); - - paramList_.append(p); - } - } - - // Create a new value of the correct type. - - valueType_ = EntityTypeToValueType(entityType_); - -// kdDebug(5710) << "valueType: " << valueType_ << endl; - - switch (valueType_) { - - case ValueSound: value_ = new SoundValue; break; - case ValueAgent: value_ = new AgentValue; break; - case ValueAddress: value_ = new AdrValue; break; - case ValueTel: value_ = new TelValue; break; - case ValueTextBin: value_ = new TextBinValue; break; - case ValueOrg: value_ = new OrgValue; break; - case ValueN: value_ = new NValue; break; - case ValueUTC: value_ = new UTCValue; break; - case ValueURI: value_ = new URIValue; break; - case ValueClass: value_ = new ClassValue; break; - case ValueFloat: value_ = new FloatValue; break; - case ValueImage: value_ = new ImageValue; break; - case ValueDate: value_ = new DateValue; break; - case ValueTextList: value_ = new TextListValue; break; - case ValueGeo: value_ = new GeoValue; break; - case ValueText: - case ValueUnknown: - default: value_ = new TextValue; break; - } - - *value_ = valuePart; -} - - void -ContentLine::_assemble() -{ - vDebug("Assemble (argl) - my name is \"" + name_ + "\""); - strRep_.truncate(0); - - TQCString line; - - if (!group_.isEmpty()) - line += group_ + '.'; - - line += name_; - - vDebug("Adding parameters"); - ParamListIterator it(paramList_); - - for (; it.current(); ++it) - line += ";" + it.current()->asString(); - - vDebug("Adding value"); - if (value_ != 0) - line += ":" + value_->asString(); - else { - vDebug("No value"); - } - - // Quote newlines - line = line.replace( TQRegExp( "\n" ), "\\n" ); - - // Fold lines longer than 72 chars - const int maxLen = 72; - uint cursor = 0; - while( line.length() > ( cursor + 1 ) * maxLen ) { - strRep_ += line.mid( cursor * maxLen, maxLen ); - strRep_ += "\r\n "; - ++cursor; - } - strRep_ += line.mid( cursor * maxLen ); -} - - void -ContentLine::clear() -{ - group_.truncate(0); - name_.truncate(0); - paramList_.clear(); - delete value_; - value_ = 0; - paramType_ = ParamUnknown; - valueType_ = ValueUnknown; - entityType_ = EntityUnknown; -} diff --git a/kabc/vcard/DateParam.cpp b/kabc/vcard/DateParam.cpp deleted file mode 100644 index ffaf4b3f6..000000000 --- a/kabc/vcard/DateParam.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -DateParam::DateParam() - : Param() -{ -} - -DateParam::DateParam(const DateParam & x) - : Param(x) -{ -} - -DateParam::DateParam(const TQCString & s) - : Param(s) -{ -} - - DateParam & -DateParam::operator = (DateParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - DateParam & -DateParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -DateParam::operator == (DateParam & x) -{ - x.parse(); - - return false; -} - -DateParam::~DateParam() -{ -} - - void -DateParam::_parse() -{ -} - - void -DateParam::_assemble() -{ -} - diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp deleted file mode 100644 index 9f578a158..000000000 --- a/kabc/vcard/DateValue.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include -#include -#include - -using namespace VCARD; - -DateValue::DateValue() - : Value() -{ - vDebug("DateValue::DateValue()"); -} - -DateValue::DateValue( - unsigned int year, - unsigned int month, - unsigned int day, - unsigned int hour, - unsigned int minute, - unsigned int second, - double secFrac, - bool zonePositive, - unsigned int zoneHour, - unsigned int zoneMinute) - : Value (), - year_ (year), - month_ (month), - day_ (day), - hour_ (hour), - minute_ (minute), - second_ (second), - zoneHour_ (zoneHour), - zoneMinute_ (zoneMinute), - secFrac_ (secFrac), - zonePositive_ (zonePositive), - hasTime_(true) -{ - parsed_ = true; - assembled_ = false; -} - -DateValue::DateValue(const TQDate & d) - : Value (), - year_ (d.year()), - month_ (d.month()), - day_ (d.day()), - hasTime_(false) -{ - parsed_ = true; - assembled_ = false; -} - -DateValue::DateValue(const TQDateTime & d) - : Value (), - year_ (d.date().year()), - month_ (d.date().month()), - day_ (d.date().day()), - hour_ (d.time().hour()), - minute_ (d.time().minute()), - second_ (d.time().second()), - hasTime_(true) -{ - parsed_ = true; - assembled_ = false; -} - -DateValue::DateValue(const DateValue & x) - : Value(x) -{ - year_ = x.year_; - month_ = x.month_; - day_ = x.day_; - hour_ = x.hour_; - minute_ = x.minute_; - second_ = x.second_; - zoneHour_ = x.zoneHour_; - zoneMinute_ = x.zoneMinute_; - secFrac_ = x.secFrac_; - hasTime_ = x.hasTime_; -} - -DateValue::DateValue(const TQCString & s) - : Value(s) -{ -} - - DateValue & -DateValue::operator = (DateValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - DateValue & -DateValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -DateValue::operator == (DateValue & x) -{ - x.parse(); - return false; -} - -DateValue::~DateValue() -{ -} - - DateValue * -DateValue::clone() -{ - return new DateValue( *this ); -} - - void -DateValue::_parse() -{ - vDebug("DateValue::_parse()"); - - // date = date-full-year ["-"] date-month ["-"] date-mday - // time = time-hour [":"] time-minute [":"] time-second [":"] - // [time-secfrac] [time-zone] - - int timeSep = strRep_.find('T'); - - TQCString dateStr; - TQCString timeStr; - - if (timeSep == -1) { - - dateStr = strRep_; - vDebug("Has date string \"" + dateStr + "\""); - - } else { - - dateStr = strRep_.left(timeSep); - vDebug("Has date string \"" + dateStr + "\""); - - timeStr = strRep_.mid(timeSep + 1); - vDebug("Has time string \"" + timeStr + "\""); - } - - /////////////////////////////////////////////////////////////// DATE - - dateStr.replace(TQRegExp("-"), ""); - - kdDebug(5710) << "dateStr: " << dateStr << endl; - - year_ = dateStr.left(4).toInt(); - month_ = dateStr.mid(4, 2).toInt(); - day_ = dateStr.right(2).toInt(); - - if (timeSep == -1) { - hasTime_ = false; - return; // No time, done. - } - else - hasTime_ = true; - - /////////////////////////////////////////////////////////////// TIME - - /////////////////////////////////////////////////////////////// ZONE - - int zoneSep = timeStr.find('Z'); - - if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { - - TQCString zoneStr(timeStr.mid(zoneSep + 1)); - vDebug("zoneStr == " + zoneStr); - - zonePositive_ = (zoneStr[0] == '+'); - zoneHour_ = zoneStr.mid(1, 2).toInt(); - zoneMinute_ = zoneStr.right(2).toInt(); - - timeStr.remove(zoneSep, timeStr.length() - zoneSep); - } - - //////////////////////////////////////////////////// SECOND FRACTION - - int secFracSep = timeStr.findRev(','); - - if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. - TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); - secFrac_ = quirkafleeg.toDouble(); - } - - /////////////////////////////////////////////////////////////// HMS - - timeStr.replace(TQRegExp(":"), ""); - - hour_ = timeStr.left(2).toInt(); - minute_ = timeStr.mid(2, 2).toInt(); - second_ = timeStr.mid(4, 2).toInt(); -} - - void -DateValue::_assemble() -{ - vDebug("DateValue::_assemble"); - - TQCString year; - TQCString month; - TQCString day; - - year.setNum( year_ ); - month.setNum( month_ ); - day.setNum( day_ ); - - if ( month.length() < 2 ) month.prepend( "0" ); - if ( day.length() < 2 ) day.prepend( "0" ); - - strRep_ = year + '-' + month + '-' + day; - - if ( hasTime_ ) { - TQCString hour; - TQCString minute; - TQCString second; - - hour.setNum( hour_ ); - minute.setNum( minute_ ); - second.setNum( second_ ); - - if ( hour.length() < 2 ) hour.prepend( "0" ); - if ( minute.length() < 2 ) minute.prepend( "0" ); - if ( second.length() < 2 ) second.prepend( "0" ); - - strRep_ += 'T' + hour + ':' + minute + ':' + second + 'Z'; - } -} - - unsigned int -DateValue::year() -{ - parse(); - return year_; -} - - unsigned int -DateValue::month() -{ - parse(); - return month_; -} - - unsigned int -DateValue::day() -{ - parse(); - return day_; -} - unsigned int -DateValue::hour() -{ - parse(); - return hour_; -} - - unsigned int -DateValue::minute() -{ - parse(); - return minute_; -} - - unsigned int -DateValue::second() -{ - parse(); - return second_; -} - - double -DateValue::secondFraction() -{ - parse(); - return secFrac_; -} - - bool -DateValue::zonePositive() -{ - parse(); - return zonePositive_; -} - - unsigned int -DateValue::zoneHour() -{ - parse(); - return zoneHour_; -} - - unsigned int -DateValue::zoneMinute() -{ - parse(); - return zoneMinute_; -} - - void -DateValue::setYear(unsigned int i) -{ - year_ = i; - assembled_ = false; -} - - void -DateValue::setMonth(unsigned int i) -{ - month_ = i; - assembled_ = false; -} - - void -DateValue::setDay(unsigned int i) -{ - day_ = i; - assembled_ = false; -} - - void -DateValue::setHour(unsigned int i) -{ - hour_ = i; - assembled_ = false; -} - - void -DateValue::setMinute(unsigned int i) -{ - minute_ = i; - assembled_ = false; -} - - void -DateValue::setSecond(unsigned int i) -{ - second_ = i; - assembled_ = false; -} - - void -DateValue::setSecondFraction(double d) -{ - secFrac_ = d; - assembled_ = false; -} - - void -DateValue::setZonePositive(bool b) -{ - zonePositive_ = b; - assembled_ = false; -} - - void -DateValue::setZoneHour(unsigned int i) -{ - zoneHour_ = i; - assembled_ = false; -} - - void -DateValue::setZoneMinute(unsigned int i) -{ - zoneMinute_ = i; - assembled_ = false; -} - - TQDate -DateValue::qdate() -{ - parse(); - TQDate d(year_, month_, day_); - return d; -} - - TQTime -DateValue::qtime() -{ - parse(); - TQTime t(hour_, minute_, second_); -// t.setMs(1 / secFrac_); - return t; -} - - TQDateTime -DateValue::qdt() -{ - parse(); - TQDateTime dt; - dt.setDate(qdate()); - dt.setTime(qtime()); - return dt; -} - - bool -DateValue::hasTime() -{ - parse(); - return hasTime_; -} - diff --git a/kabc/vcard/EmailParam.cpp b/kabc/vcard/EmailParam.cpp deleted file mode 100644 index 7daf19ccc..000000000 --- a/kabc/vcard/EmailParam.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include - -using namespace VCARD; - -EmailParam::EmailParam() - : Param() -{ - vDebug("ctor"); -} - -EmailParam::EmailParam(const EmailParam & x) - : Param(x), - emailType_ (x.emailType_), - pref_ (x.pref_) -{ -} - -EmailParam::EmailParam(const TQCString & s) - : Param(s) -{ -} - - EmailParam & -EmailParam::operator = (EmailParam & x) -{ - if (*this == x) return *this; - - emailType_ = x.emailType(); - pref_ = x.pref_; - - Param::operator = (x); - return *this; -} - - EmailParam & -EmailParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -EmailParam::operator == (EmailParam & x) -{ - parse(); - - if (pref_) - return (x.pref_ && x.emailType() == emailType_); - - return !x.pref(); -} - -EmailParam::~EmailParam() -{ -} - - void -EmailParam::_parse() -{ -#if 0 - Param::parseToList(); - - SubParamListIterator it(subParamList_); - - pref_ = true; - emailType_ = ""; - - for (; it.current(); ++it) { - - if (tqstricmp(it.current()->name(), "TYPE") == 0) { - emailType_ = it.current()->value(); - continue; - } - - if (tqstricmp(it.current()->name(), "PREF") == 0) { - pref_ = true; - } - } -#endif -} - - void -EmailParam::_assemble() -{ - strRep_ = "TYPE="; - strRep_ += emailType_; - - if (pref_) - strRep_ += ",PREF"; -} - diff --git a/kabc/vcard/Entity.cpp b/kabc/vcard/Entity.cpp deleted file mode 100644 index 5eaf6a1d0..000000000 --- a/kabc/vcard/Entity.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -using namespace VCARD; - -Entity::Entity() - : parsed_ (false), - assembled_ (true) -{ - // empty -} - -Entity::Entity(const Entity & e) - : strRep_ (e.strRep_), - parsed_ (e.parsed_), - assembled_ (e.assembled_) -{ - // empty -} - -Entity::Entity(const TQCString & s) - : strRep_ (s), - parsed_ (false), - assembled_ (true) -{ - // empty -} - - Entity & -Entity::operator = (const Entity & e) -{ - if (this == &e) return *this; - - strRep_ = e.strRep_; - parsed_ = e.parsed_; - assembled_ = e.assembled_; - - return *this; -} - - Entity & -Entity::operator = (const TQCString & s) -{ - strRep_ = s; - parsed_ = false; - assembled_ = true; - - return *this; -} - - bool -Entity::operator == (Entity & e) -{ - return asString() == e.asString(); -} - - bool -Entity::operator != (Entity & e) -{ - return !(*this == e); -} - - bool -Entity::operator == (const TQCString & s) -{ - return asString() == s; -} - - bool -Entity::operator != (const TQCString & s) -{ - return !(*this == s); -} - -Entity::~Entity() -{ - // empty -} - - TQCString -Entity::asString() -{ -// vDebug("Entity::asString()"); - assemble(); - - return strRep_; -} - - void -Entity::parse() -{ -// vDebug( "Entity::parse()" ); - - if (!parsed_) _parse(); - - parsed_ = true; - assembled_ = false; -} - - void -Entity::assemble() -{ -// vDebug( "Entity::assemble()" ); - - if (assembled_) return; - - parse(); - _assemble(); - - assembled_ = true; -} - diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp deleted file mode 100644 index bcb48f98a..000000000 --- a/kabc/vcard/Enum.cpp +++ /dev/null @@ -1,490 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -#include - -using namespace VCARD; - -// There are 31 possible types, not including extensions. -// URI is a custom field designed to store the upstream URI for each contact -// in order to handle certain limited CardDAV systems such as Zimbra - const TQCString -VCARD::paramNames [] = -{ - "NAME", - "PROFILE", - "SOURCE", - "FN", - "N", - "NICKNAME", - "PHOTO", - "BDAY", - "ADR", - "LABEL", - "TEL", - "EMAIL", - "MAILER", - "TZ", - "GEO", - "TITLE", - "ROLE", - "LOGO", - "AGENT", - "ORG", - "CATEGORIES", - "NOTE", - "PRODID", - "REV", - "SORT-STRING", - "SOUND", - "UID", - "URL", - "VERSION", - "CLASS", - "KEY", - "URI" -}; - - const ParamType -VCARD::paramTypesTable[] = { - ParamNone, // NAME - ParamNone, // PROFILE - ParamSource, // SOURCE - ParamText, // FN - ParamText, // N - ParamText, // NICKNAME - ParamImage, // PHOTO (inline/refer) - ParamDate, // BDAY ("VALUE = "date-time/date) - ParamAddrText, // ADR (adr-param/text-param) - ParamAddrText, // LABEL (adr-param/text-param) - ParamTel, // TEL - ParamEmail, // EMAIL - ParamText, // MAILER - ParamNone, // TZ - ParamNone, // GEO - ParamText, // TITLE - ParamText, // ROLE - ParamImage, // LOGO - ParamAgent, // AGENT - ParamText, // ORG - ParamText, // CATEGORIES - ParamText, // NOTE - ParamNone, // PRODID - ParamDate, // REV - ParamText, // SORT-STRING - ParamSound, // SOUND - ParamNone, // UID - ParamNone, // URL - ParamNone, // VERSION - ParamNone, // CLASS - ParamTextBin, // KEY - ParamTextNS, // X - ParamNone // URI -}; - - ParamType -VCARD::EntityTypeToParamType(EntityType e) -{ - ParamType t(ParamUnknown); - - switch (e) { - - //---------------------------------------------------------------// - case EntityAgent: t = ParamAgent; break; - //---------------------------------------------------------------// - case EntitySound: t = ParamSound; break; - //---------------------------------------------------------------// - case EntitySource: t = ParamSource; break; - //---------------------------------------------------------------// - case EntityTelephone: t = ParamTel; break; - //---------------------------------------------------------------// - case EntityEmail: t = ParamEmail; break; - //---------------------------------------------------------------// - case EntityKey: t = ParamTextBin; break; - //---------------------------------------------------------------// - case EntityExtension: t = ParamTextNS; break; - //---------------------------------------------------------------// - case EntityAddress: - case EntityLabel: t = ParamAddrText; break; - //---------------------------------------------------------------// - case EntityBirthday: - case EntityRevision: t = ParamDate; break; - //---------------------------------------------------------------// - case EntityPhoto: - case EntityLogo: t = ParamImage; break; - //---------------------------------------------------------------// - case EntityOrganisation: - case EntityTitle: - case EntityRole: - case EntityFullName: - case EntityMailer: - case EntityN: - case EntitySortString: - case EntityNickname: - case EntityCategories: - case EntityNote: t = ParamText; break; - //---------------------------------------------------------------// - case EntityProductID: - case EntityTimeZone: - case EntityUID: - case EntityURL: - case EntityClass: - case EntityGeo: - case EntityName: - case EntityVersion: - case EntityProfile: - case EntityURI: - default: t = ParamNone; break; - //---------------------------------------------------------------// - - } - - return t; -} - - ValueType -VCARD::EntityTypeToValueType(EntityType e) -{ - ValueType t(ValueUnknown); - - switch (e) { - - //---------------------------------------------------------------// - case EntitySound: t = ValueSound; break; - //---------------------------------------------------------------// - case EntityAgent: t = ValueAgent; break; - //---------------------------------------------------------------// - case EntityAddress: t = ValueAddress; break; - //---------------------------------------------------------------// - case EntityTelephone: t = ValueTel; break; - //---------------------------------------------------------------// - case EntityKey: t = ValueTextBin; break; - //---------------------------------------------------------------// - case EntityOrganisation: t = ValueOrg; break; - //---------------------------------------------------------------// - case EntityN: t = ValueN; break; - //---------------------------------------------------------------// - case EntityTimeZone: t = ValueUTC; break; - //---------------------------------------------------------------// - case EntityClass: t = ValueClass; break; - //---------------------------------------------------------------// - case EntityGeo: t = ValueGeo; break; - //---------------------------------------------------------------// - case EntitySource: - case EntityURL: t = ValueURI; break; - //---------------------------------------------------------------// - case EntityPhoto: - case EntityLogo: t = ValueImage; break; - //---------------------------------------------------------------// - case EntityBirthday: - case EntityRevision: t = ValueDate; break; - //---------------------------------------------------------------// - case EntityCategories: - case EntityNickname: t = ValueTextList; break; - //---------------------------------------------------------------// - case EntityLabel: - case EntityExtension: - case EntityEmail: - case EntityTitle: - case EntityRole: - case EntityFullName: - case EntityMailer: - case EntityProductID: - case EntityName: - case EntitySortString: - case EntityVersion: - case EntityProfile: - case EntityUID: - case EntityNote: - case EntityURI: - default: t = ValueText; break; - //---------------------------------------------------------------// - - } - - return t; -} - - TQCString -VCARD::EntityTypeToParamName(EntityType e) -{ - if ( e > EntityUnknown ) e = EntityUnknown; - return paramNames[ int( e ) ]; -} - - EntityType -VCARD::EntityNameToEntityType(const TQCString & s) -{ - if (s.isEmpty()) return EntityUnknown; - - EntityType t(EntityUnknown); - - switch (s[0]) { - - case 'A': - if (s == "ADR") - t = EntityAddress; - else if (s == "AGENT") - t = EntityAgent; - break; - - case 'B': - if (s == "BDAY") - t = EntityBirthday; - break; - - case 'C': - if (s == "CATEGORIES") - t = EntityCategories; - else if (s == "CLASS") - t = EntityClass; - break; - - case 'E': - if (s == "EMAIL") - t = EntityEmail; - break; - - case 'F': - if (s == "FN") - t = EntityFullName; - break; - - case 'G': - if (s == "GEO") - t = EntityGeo; - break; - - case 'K': - if (s == "KEY") - t = EntityKey; - break; - - case 'L': - if (s == "LABEL") - t = EntityLabel; - else if (s == "LOGO") - t = EntityLogo; - break; - - case 'M': - if (s == "MAILER") - t = EntityMailer; - break; - - case 'N': - if (s == "N") - t = EntityN; - else if (s == "NAME") - t = EntityName; - else if (s == "NICKNAME") - t = EntityNickname; - else if (s == "NOTE") - t = EntityNote; - break; - - case 'O': - if (s == "ORG") - t = EntityOrganisation; - break; - - case 'P': - if (s == "PHOTO") - t = EntityPhoto; - else if (s == "PRODID") - t = EntityProductID; - else if (s == "PROFILE") - t = EntityProfile; - break; - - case 'R': - if (s == "REV") - t = EntityRevision; - else if (s == "ROLE") - t = EntityRole; - break; - - case 'S': - if (s == "SORT-STRING") - t = EntitySortString; - else if (s == "SOUND") - t = EntitySound; - else if (s == "SOURCE") - t = EntitySource; - break; - - case 'T': - if (s == "TEL") - t = EntityTelephone; - else if (s == "TITLE") - t = EntityTitle; - else if (s == "TZ") - t = EntityTimeZone; - break; - - case 'U': - if (s == "UID") - t = EntityUID; - else if (s == "URL") - t = EntityURL; - else if (s == "URI") - t = EntityURI; - case 'V': - if (s == "VERSION") - t = EntityVersion; - break; - - case 'X': - if (s.left(2) == "X-") - t = EntityExtension; - break; - - default: - - t = EntityUnknown; - } - - return t; -} - -// The copyright notice below refers to the base64 codec functions used below, -// which are modified from the original sources. - -/* - * Original version Copyright 1988 by The Leland Stanford Junior University - * Copyright 1998 by the University of Washington - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notices appear in all copies and that both the - * above copyright notices and this permission notice appear in supporting - * documentation, and that the name of the University of Washington or The - * Leland Stanford Junior University not be used in advertising or publicity - * pertaining to distribution of the software without specific, written prior - * permission. This software is made available "as is", and - * THE UNIVERSITY OF WASHINGTON AND THE LELAND STANFORD JUNIOR UNIVERSITY - * DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE, - * INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF - * WASHINGTON OR THE LELAND STANFORD JUNIOR UNIVERSITY BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -static char B64[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -// the mime base64 disctionary used for decoding -static signed char b64dec[] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30 - -1, -1, -1,-19, -1, -1, -1,-16, -4, -4, // 40 -19 == '+' -16 == '/' - -4, -4, -4, -4, -4, -4, -4, -4, -1, -1, // 50 -4 == '0' - -1, 0, -1, -1, -1, 65, 65, 65, 65, 65, // 60 0 == '=' 65 == 'A' - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 70 - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 80 - 65, -1, -1, -1, -1, -1, -1, 71, 71, 71, // 90 71 == 'a' - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 100 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 110 - 71, 71, 71, -1, -1, -1, -1, -1, -1, -1, // 120 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 130 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 140 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 150 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 160 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 170 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 180 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 190 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 200 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 210 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 220 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 230 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 240 - -1, -1, -1, -1, -1, -1, -1 // 250 -}; - - char * -VCARD::decodeBase64(const char * s, unsigned long srcl, unsigned long & len) -{ - register unsigned char c; - register unsigned long e(0); - len = 0; - unsigned const char * src = (unsigned const char *)s; - char * ret = new char[srcl + (srcl / 4 + 1)]; - register char *d = ret; - while (srcl--) { // Critical loop - c = *src++; - int dec = b64dec[c]; - if (dec == -1) continue; - if (c == '=') { - switch (e++) { - case 3: e = 0; break; - case 2: if (*src == '=') break; - default: delete [] ret; ret = 0; return 0; break; - } - continue; - } - c -= dec; - if (e == 0) { *d = c << 2; ++e; continue; } - switch (e) { - case 1: *d |= c >> 4; *++d = c << 4; break; - case 2: *d |= c >> 2; *++d = c << 6; break; - case 3: *d++ |= c; e = 0; continue; break; - } - ++e; - } - len = d - (char *)ret; - return ret; -} - - - char * -VCARD::encodeBase64(const char * src, unsigned long srcl, unsigned long & destl) -{ - register const unsigned char *s = (unsigned char *)src; - register unsigned long i = ((srcl + 2) / 3) * 4; - destl = i += 2 * ((i / 60) + 1); - i = 0; - char * ret = new char[destl]; - register unsigned char *d((unsigned char *)ret); - while (srcl != 0) { // Critical loop - *d++ = B64[s[0] >> 2]; - *d++ = B64[((s[0] << 4) + (--srcl == 0 ? 0 : s[1] >> 4)) & 0x3f]; - *d++ = srcl == 0 ? '=' : - B64[((s[1] << 2) + (--srcl == 0 ? 0 : s[2] >> 6)) & 0x3f]; - *d++ = srcl == 0 ? '=' : B64[s[2] & 0x3f]; - if (srcl != 0) srcl--; - if (++i == 15) { i = 0; *d++ = '\r'; *d++ = '\n'; } - s += 3; - } - *d = '\r'; *++d = '\n'; *++d = '\0'; - return ret; -} - diff --git a/kabc/vcard/FloatValue.cpp b/kabc/vcard/FloatValue.cpp deleted file mode 100644 index ac1f2c6b5..000000000 --- a/kabc/vcard/FloatValue.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -FloatValue::FloatValue() - : Value() -{ -} - -FloatValue::FloatValue(float f) - : Value (), - value_ (f) -{ - parsed_ = true; -} - -FloatValue::FloatValue(const FloatValue & x) - : Value(x) -{ - value_ = x.value_; -} - -FloatValue::FloatValue(const TQCString & s) - : Value(s) -{ -} - - FloatValue & -FloatValue::operator = (FloatValue & x) -{ - if (*this == x) return *this; - - x.parse(); - value_ = x.value_; - - Value::operator = (x); - return *this; -} - - FloatValue & -FloatValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -FloatValue::operator == (FloatValue & x) -{ - x.parse(); - return (value_ == x.value_); -} - -FloatValue::~FloatValue() -{ -} - - void -FloatValue::_parse() -{ - bool negative(false); - - if (strRep_[0] == '-' || strRep_[1] == '+') { - - if (strRep_[0] == '-') - negative = true; - - strRep_.remove(0, 1); - } - - value_ = strRep_.toFloat(); - if (negative) - value_ = -value_; -} - - void -FloatValue::_assemble() -{ - strRep_ = TQCString().setNum(value_); -} - - float -FloatValue::value() -{ - parse(); - return value_; -} - - void -FloatValue::setValue(float f) -{ - parsed_ = true; - value_ = f; -} - diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp deleted file mode 100644 index 2bac28c1e..000000000 --- a/kabc/vcard/GeoValue.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libvcard. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -GeoValue::GeoValue() - : Value() -{ -} - -GeoValue::GeoValue(const GeoValue & x) - : Value(x), latitude_(x.latitude_), longitude_(x.longitude_) -{ -} - -GeoValue::GeoValue(const TQCString & s) - : Value(s) -{ -} - - GeoValue & -GeoValue::operator = (GeoValue & x) -{ - if (*this == x) return *this; - - latitude_ = x.latitude_; - longitude_ = x.longitude_; - - Value::operator = (x); - return *this; -} - - GeoValue & -GeoValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -GeoValue::operator == (GeoValue & x) -{ - x.parse(); - - if ( latitude_ != x.latitude_ ) return false; - if ( longitude_ != x.longitude_ ) return false; - - return true; -} - -GeoValue::~GeoValue() -{ -} - - GeoValue * -GeoValue::clone() -{ - return new GeoValue( *this ); -} - - void -GeoValue::_parse() -{ - int semiColon = strRep_.find( ";" ); - - if ( semiColon == -1 ) // invalid - return; - - latitude_ = strRep_.left( semiColon ).toFloat(); - longitude_ = strRep_.mid( semiColon + 1, strRep_.length() - semiColon ).toFloat(); -} - - void -GeoValue::_assemble() -{ - strRep_.sprintf( "%.6f;%.6f", latitude_, longitude_ ); -} diff --git a/kabc/vcard/ImageParam.cpp b/kabc/vcard/ImageParam.cpp deleted file mode 100644 index 69611eeab..000000000 --- a/kabc/vcard/ImageParam.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -ImageParam::ImageParam() - : Param() -{ -} - -ImageParam::ImageParam(const ImageParam & x) - : Param(x) -{ -} - -ImageParam::ImageParam(const TQCString & s) - : Param(s) -{ -} - - ImageParam & -ImageParam::operator = (ImageParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - ImageParam & -ImageParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -ImageParam::operator == (ImageParam & x) -{ - x.parse(); - return false; -} - -ImageParam::~ImageParam() -{ -} - - void -ImageParam::_parse() -{ -} - - void -ImageParam::_assemble() -{ -} - diff --git a/kabc/vcard/ImageValue.cpp b/kabc/vcard/ImageValue.cpp deleted file mode 100644 index 5d8d29bb7..000000000 --- a/kabc/vcard/ImageValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -ImageValue::ImageValue() - : Value() -{ -} - -ImageValue::ImageValue(const ImageValue & x) - : Value(x) -{ -} - -ImageValue::ImageValue(const TQCString & s) - : Value(s) -{ -} - - ImageValue & -ImageValue::operator = (ImageValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - ImageValue & -ImageValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -ImageValue::operator == (ImageValue & x) -{ - x.parse(); - return false; -} - -ImageValue::~ImageValue() -{ -} - - void -ImageValue::_parse() -{ -} - - void -ImageValue::_assemble() -{ -} - diff --git a/kabc/vcard/ImgValue.cpp b/kabc/vcard/ImgValue.cpp deleted file mode 100644 index 42889acd8..000000000 --- a/kabc/vcard/ImgValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -ImgValue::ImgValue() - : Value() -{ -} - -ImgValue::ImgValue(const ImgValue & x) - : Value(x) -{ -} - -ImgValue::ImgValue(const TQCString & s) - : Value(s) -{ -} - - ImgValue & -ImgValue::operator = (ImgValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - ImgValue & -ImgValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -ImgValue::operator == (ImgValue & x) -{ - x.parse(); - return false; -} - -ImgValue::~ImgValue() -{ -} - - void -ImgValue::_parse() -{ -} - - void -ImgValue::_assemble() -{ -} - diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp deleted file mode 100644 index f7e5a759e..000000000 --- a/kabc/vcard/LangValue.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -LangValue::LangValue() - : Value() -{ -} - -LangValue::LangValue(const LangValue & x) - : Value(x) -{ -} - -LangValue::LangValue(const TQCString & s) - : Value(s) -{ -} - - LangValue & -LangValue::operator = (LangValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - LangValue & -LangValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -LangValue::operator == (LangValue & x) -{ - x.parse(); - return false; -} - -LangValue::~LangValue() -{ -} - - void -LangValue::_parse() -{ - TQStrList l; - RTokenise(strRep_, "-", l); - - if (l.count() == 0) return; - - primary_ = l.at(0); - - l.remove(0u); - - subtags_ = l; -} - - void -LangValue::_assemble() -{ - strRep_ = primary_; - - TQStrListIterator it(subtags_); - - for (; it.current(); ++it) - strRep_ += TQCString('-') + it.current(); -} - - TQCString -LangValue::primary() -{ - parse(); - return primary_; -} - - TQStrList -LangValue::subtags() -{ - parse(); - return subtags_; -} - - void -LangValue::setPrimary(const TQCString & s) -{ - parse(); - primary_ = s; -} - - void -LangValue::setSubTags(const TQStrList & l) -{ - parse(); - subtags_ = l; -} - diff --git a/kabc/vcard/Makefile.am b/kabc/vcard/Makefile.am deleted file mode 100644 index e8a33c3a9..000000000 --- a/kabc/vcard/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDES = \ - -I$(srcdir)/include \ - -I$(srcdir)/include/generated \ - $(all_includes) - -### KDE 4.0: either make noinst or rename to something like libkvcard -lib_LTLIBRARIES = libvcard.la - -libvcard_la_SOURCES = vCard-all.cpp -libvcard_la_LDFLAGS = $(all_libraries) -libvcard_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) - -check_PROGRAMS = testwrite testread - -testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testwrite_LDADD = libvcard.la -testwrite_SOURCES = testwrite.cpp - -testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testread_LDADD = libvcard.la -testread_SOURCES = testread.cpp diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp deleted file mode 100644 index e63268134..000000000 --- a/kabc/vcard/NValue.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include -#include -#include -#include - -using namespace VCARD; - -NValue::NValue() - : Value() -{ - vDebug("ctor"); -} - -NValue::NValue(const NValue & x) - : Value(x), - family_ (x.family_), - given_ (x.given_), - middle_ (x.middle_), - prefix_ (x.prefix_), - suffix_ (x.suffix_) -{ -} - -NValue::NValue(const TQCString & s) - : Value(s) -{ - vDebug("ctor"); -} - - NValue & -NValue::operator = (NValue & x) -{ - if (*this == x) return *this; - - family_ = x.family_; - given_ = x.given_; - middle_ = x.middle_; - prefix_ = x.prefix_; - suffix_ = x.suffix_; - - Value::operator = (x); - return *this; -} - - NValue & -NValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -NValue::operator == (NValue & x) -{ - x.parse(); - - return ( - family_ == x.family_ && - given_ == x.given_ && - middle_ == x.middle_ && - prefix_ == x.prefix_ && - suffix_ == x.suffix_); -} - -NValue::~NValue() -{ -} - - NValue * -NValue::clone() -{ - return new NValue( *this ); -} - - void -NValue::_parse() -{ - TQStrList l; - RTokenise(strRep_, ";", l); - - for (unsigned int i = 0; i < l.count(); i++) { - - switch (i) { - case 0: family_ = l.at(0); break; - case 1: given_ = l.at(1); break; - case 2: middle_ = l.at(2); break; - case 3: prefix_ = l.at(3); break; - case 4: suffix_ = l.at(4); break; - default: break; - } - } -} - - void -NValue::_assemble() -{ - strRep_ = family_; - strRep_ += ";" + given_; - strRep_ += ";" + middle_; - strRep_ += ";" + prefix_; - strRep_ += ";" + suffix_; -} - diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp deleted file mode 100644 index 94ca18243..000000000 --- a/kabc/vcard/OrgValue.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -OrgValue::OrgValue() - : Value() -{ -} - -OrgValue::OrgValue(const OrgValue & x) - : Value(x) -{ -} - -OrgValue::OrgValue(const TQCString & s) - : Value(s) -{ -} - - OrgValue & -OrgValue::operator = (OrgValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - OrgValue & -OrgValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -OrgValue::operator == (OrgValue & x) -{ - x.parse(); - return false; -} - -OrgValue::~OrgValue() -{ -} - - void -OrgValue::_parse() -{ - RTokenise(strRep_, ";", valueList_); -} - - void -OrgValue::_assemble() -{ - bool first(true); - - TQStrListIterator it(valueList_); - - for (; it.current(); ++it) { - if (!first) strRep_ += ';'; - strRep_ += it.current(); - first = false; - } -} - - unsigned int -OrgValue::numValues() -{ - parse(); - return valueList_.count(); -} - - TQCString -OrgValue::value(unsigned int i) -{ - parse(); - return valueList_.at(i); -} - diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp deleted file mode 100644 index 8c5ad9e2c..000000000 --- a/kabc/vcard/Param.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -Param::Param() - : Entity(), - name_(""), - value_("") -{ -} - -Param::Param(const Param & x) - : Entity(x), - name_(x.name_), - value_(x.value_) -{ -} - -Param::Param(const TQCString & s) - : Entity(s), - name_(""), - value_("") -{ -} - - Param & -Param::operator = (Param & x) -{ - if (*this == x) return *this; - - Entity::operator = (x); - name_ = x.name_; - value_ = x.value_; - - return *this; -} - - Param & -Param::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -Param::operator == (Param & x) -{ - x.parse(); - return false; -} - -Param::~Param() -{ -} - - void -Param::_parse() -{ -} - - void -Param::_assemble() -{ - strRep_ = name_ + "=" + value_; -} - -Param::Param(const TQCString &name, const TQCString &value) - : Entity(), - name_(name), - value_(value) -{ - parsed_ = true; - assembled_ = false; -} - - void -Param::setName(const TQCString & name) -{ - name_ = name; - - assembled_ = false; -} - - void -Param::setValue(const TQCString & value) -{ - value_ = value; - - assembled_ = false; -} - - TQCString -Param::name() -{ - return name_; -} - - TQCString -Param::value() -{ - return value_; -} diff --git a/kabc/vcard/PhoneNumberValue.cpp b/kabc/vcard/PhoneNumberValue.cpp deleted file mode 100644 index 02a1266fe..000000000 --- a/kabc/vcard/PhoneNumberValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -PhoneNumberValue::PhoneNumberValue() - : Value() -{ -} - -PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) - : Value(x) -{ -} - -PhoneNumberValue::PhoneNumberValue(const TQCString & s) - : Value(s) -{ -} - - PhoneNumberValue & -PhoneNumberValue::operator = (PhoneNumberValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - PhoneNumberValue & -PhoneNumberValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -PhoneNumberValue::operator == (PhoneNumberValue & x) -{ - x.parse(); - return false; -} - -PhoneNumberValue::~PhoneNumberValue() -{ -} - - void -PhoneNumberValue::_parse() -{ -} - - void -PhoneNumberValue::_assemble() -{ -} - diff --git a/kabc/vcard/README b/kabc/vcard/README deleted file mode 100644 index 18a9daf4a..000000000 --- a/kabc/vcard/README +++ /dev/null @@ -1,15 +0,0 @@ -libvcard (C) 1999 Rik Hemsley -Written for the KDE project. - -This software is licensed under the MIT license. - -A vCard 3.0 parser based on the same principles that librmm (from Empath) uses. - -It's small and very fast due to parsing and assembly of object being lazy. - -There is a base64 codec declared in Enum.h - -Feedback welcome. - -Rik - diff --git a/kabc/vcard/RToken.cpp b/kabc/vcard/RToken.cpp deleted file mode 100644 index 582a9e1c7..000000000 --- a/kabc/vcard/RToken.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include -#include - -namespace VCARD -{ - - TQ_UINT32 -RTokenise(const char * str, const char * delim, TQStrList & l) -{ - // FIXME no stderr ! - l.clear(); - - if (!delim || !str || strlen(delim) == 0 || strlen(str) == 0) return 0; - - char * len = (char *)(str + strlen(str)); // End of string. - - register char * rstart = new char[strlen(str) + 1]; - register char * r = rstart; - - - register const char * i = str; // Cursor. - - while (i <= len) { - - if (*i == '\\') { // Escaped chars go straight through. - *r++ = *i++; - if (i <= len) - *r++ = *i++; - continue; - } - - if (strchr(delim, *i) != 0) { - // We hit a delimiter. If we have some text, make a new token. - // This has the effect that multiple delimiters are collapsed. - // cs: We mustn't collapse multiple delimiters, otherwise we - // lose empty fields. - *r = '\0'; -// if (r != rstart) { - l.append(rstart); -// } - r = rstart; - ++i; - continue; - } - - *r++ = *i++; - } - - // Catch last token -// if (r != rstart) { - *r = '\0'; - l.append(rstart); -// } - - r = 0; - - delete [] rstart; - - return l.count(); -} - -} diff --git a/kabc/vcard/SoundValue.cpp b/kabc/vcard/SoundValue.cpp deleted file mode 100644 index 5be75d358..000000000 --- a/kabc/vcard/SoundValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -SoundValue::SoundValue() - : Value() -{ -} - -SoundValue::SoundValue(const SoundValue & x) - : Value(x) -{ -} - -SoundValue::SoundValue(const TQCString & s) - : Value(s) -{ -} - - SoundValue & -SoundValue::operator = (SoundValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - SoundValue & -SoundValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -SoundValue::operator == (SoundValue & x) -{ - x.parse(); - return false; -} - -SoundValue::~SoundValue() -{ -} - - void -SoundValue::_parse() -{ -} - - void -SoundValue::_assemble() -{ -} - diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp deleted file mode 100644 index 6a0e772ac..000000000 --- a/kabc/vcard/SourceParam.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -SourceParam::SourceParam() - : Param(), - type_(SourceParam::TypeUnknown) -{ -} - -SourceParam::SourceParam(const SourceParam & x) - : Param(x), - type_ (x.type_), - par_ (x.par_), - val_ (x.val_) -{ -} - -SourceParam::SourceParam(const TQCString & s) - : Param(s), - type_(SourceParam::TypeUnknown) -{ -} - - SourceParam & -SourceParam::operator = (SourceParam & x) -{ - if (*this == x) return *this; - type_ = x.type(); - par_ = x.par(); - val_ = x.val(); - - Param::operator = (x); - return *this; -} - - SourceParam & -SourceParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -SourceParam::operator == (SourceParam & x) -{ - x.parse(); - return false; -} - -SourceParam::~SourceParam() -{ -} - - void -SourceParam::_parse() -{ - int i = strRep_.find('='); - if (i == -1) // Invalid - return; - - par_ = strRep_.left(i); - val_ = strRep_.right(strRep_.length() - i - 1); - - if (tqstricmp(par_, "VALUE") == 0 && tqstricmp(val_, "uri") == 0) - type_ = TypeValue; - else if (tqstricmp(par_, "CONTEXT") == 0 && tqstricmp(val_, "word") == 0) - type_ = TypeContext; - else if (tqstrnicmp(par_, "X-", 2) == 0) { - type_ = TypeX; - } - else type_ = TypeUnknown; - -} - - void -SourceParam::_assemble() -{ - if (type_ == TypeValue) - strRep_ = "VALUE=uri"; - else if (type_ == TypeContext) - strRep_ = "CONTEXT=word"; - else if (type_ == TypeX) - strRep_ = par_ + "=" + val_; - else strRep_ = ""; -} - diff --git a/kabc/vcard/TelParam.cpp b/kabc/vcard/TelParam.cpp deleted file mode 100644 index 072b1dc81..000000000 --- a/kabc/vcard/TelParam.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TelParam::TelParam() - : Param() -{ -} - -TelParam::TelParam(const TelParam & x) - : Param(x) -{ -} - -TelParam::TelParam(const TQCString & s) - : Param(s) -{ -} - - TelParam & -TelParam::operator = (TelParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - TelParam & -TelParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -TelParam::operator == (TelParam & x) -{ - x.parse(); - return false; -} - -TelParam::~TelParam() -{ -} - - void -TelParam::_parse() -{ -} - - void -TelParam::_assemble() -{ -} - diff --git a/kabc/vcard/TelValue.cpp b/kabc/vcard/TelValue.cpp deleted file mode 100644 index c9c1b85aa..000000000 --- a/kabc/vcard/TelValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TelValue::TelValue() - : Value() -{ -} - -TelValue::TelValue(const TelValue & x) - : Value(x) -{ -} - -TelValue::TelValue(const TQCString & s) - : Value(s) -{ -} - - TelValue & -TelValue::operator = (TelValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - TelValue & -TelValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TelValue::operator == (TelValue & x) -{ - x.parse(); - return false; -} - -TelValue::~TelValue() -{ -} - - void -TelValue::_parse() -{ -} - - void -TelValue::_assemble() -{ -} - diff --git a/kabc/vcard/TextBinParam.cpp b/kabc/vcard/TextBinParam.cpp deleted file mode 100644 index 4e0ebadff..000000000 --- a/kabc/vcard/TextBinParam.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TextBinParam::TextBinParam() - : Param() -{ -} - -TextBinParam::TextBinParam(const TextBinParam & x) - : Param(x) -{ -} - -TextBinParam::TextBinParam(const TQCString & s) - : Param(s) -{ -} - - TextBinParam & -TextBinParam::operator = (TextBinParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - TextBinParam & -TextBinParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -TextBinParam::operator == (TextBinParam & x) -{ - x.parse(); - return false; -} - -TextBinParam::~TextBinParam() -{ -} - - void -TextBinParam::_parse() -{ -} - - void -TextBinParam::_assemble() -{ -} - diff --git a/kabc/vcard/TextBinValue.cpp b/kabc/vcard/TextBinValue.cpp deleted file mode 100644 index e7da0b7c6..000000000 --- a/kabc/vcard/TextBinValue.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include -#include - -using namespace VCARD; - -TextBinValue::TextBinValue() - : Value() -{ -} - -TextBinValue::TextBinValue(const TextBinValue & x) - : Value(x) -{ - mIsBinary_ = x.mIsBinary_; - mData_ = x.mData_; - mUrl_ = x.mUrl_; -} - -TextBinValue::TextBinValue(const TQCString & s) - : Value(s) -{ -} - - TextBinValue & -TextBinValue::operator = (TextBinValue & x) -{ - if (*this == x) return *this; - - mIsBinary_ = x.mIsBinary_; - mData_ = x.mData_; - mUrl_ = x.mUrl_; - - Value::operator = (x); - return *this; -} - - TextBinValue & -TextBinValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TextBinValue::operator == (TextBinValue & x) -{ - x.parse(); - - if ( mIsBinary_ != x.mIsBinary_ ) return false; - if ( mData_ != x.mData_ ) return false; - if ( mUrl_ != x.mUrl_ ) return false; - - return true; -} - -TextBinValue::~TextBinValue() -{ -} - - TextBinValue * -TextBinValue::clone() -{ - return new TextBinValue( *this ); -} - - void -TextBinValue::_parse() -{ -} - - void -TextBinValue::_assemble() -{ - if ( mIsBinary_ ) { - strRep_ = KCodecs::base64Encode( mData_ ); - } else - strRep_ = mUrl_.utf8(); -} - diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp deleted file mode 100644 index 2bec2e181..000000000 --- a/kabc/vcard/TextListValue.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -TextListValue::TextListValue() - : Value() -{ -} - -TextListValue::TextListValue(const TextListValue & x) - : Value(x) -{ -} - -TextListValue::TextListValue(const TQCString & s) - : Value(s) -{ -} - - TextListValue & -TextListValue::operator = (TextListValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - TextListValue & -TextListValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TextListValue::operator == (TextListValue & x) -{ - x.parse(); - return false; -} - -TextListValue::~TextListValue() -{ -} - - void -TextListValue::_parse() -{ - RTokenise(strRep_, ";", valueList_); -} - - void -TextListValue::_assemble() -{ - bool first(true); - - TQStrListIterator it(valueList_); - - for (; it.current(); ++it) { - if (!first) strRep_ += ';'; - strRep_ += it.current(); - first = false; - } -} - - unsigned int -TextListValue::numValues() -{ - parse(); - return valueList_.count(); -} - - TQCString -TextListValue::value(unsigned int i) -{ - parse(); - return valueList_.at(i); -} - diff --git a/kabc/vcard/TextParam.cpp b/kabc/vcard/TextParam.cpp deleted file mode 100644 index b353483ec..000000000 --- a/kabc/vcard/TextParam.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TextParam::TextParam() - : Param() -{ -} - -TextParam::TextParam(const TextParam & x) - : Param(x) -{ -} - -TextParam::TextParam(const TQCString & s) - : Param(s) -{ -} - - TextParam & -TextParam::operator = (TextParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - TextParam & -TextParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -TextParam::operator == (TextParam & x) -{ - x.parse(); - - return false; -} - -TextParam::~TextParam() -{ -} - - void -TextParam::_parse() -{ -} - - void -TextParam::_assemble() -{ -} - diff --git a/kabc/vcard/TextValue.cpp b/kabc/vcard/TextValue.cpp deleted file mode 100644 index cf8e0673f..000000000 --- a/kabc/vcard/TextValue.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TextValue::TextValue() - : Value() -{ -} - -TextValue::TextValue(const TextValue & x) - : Value(x) -{ -} - -TextValue::TextValue(const TQCString & s) - : Value(s) -{ -} - - TextValue & -TextValue::operator = (TextValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - TextValue & -TextValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TextValue::operator == (TextValue & x) -{ - return strRep_ == x.strRep_; -} - -TextValue::~TextValue() -{ -} - - TextValue * -TextValue::clone() -{ - return new TextValue( *this ); -} - - void -TextValue::_parse() -{ -} - - void -TextValue::_assemble() -{ -} - diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp deleted file mode 100644 index bba8db0fa..000000000 --- a/kabc/vcard/URIValue.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -URIValue::URIValue() - : Value() -{ -} - -URIValue::URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart) - : Value(), - scheme_ (scheme), - schemeSpecificPart_ (schemeSpecificPart) -{ - parsed_ = true; -} - -URIValue::URIValue(const URIValue & x) - : Value (x), - scheme_ (x.scheme_), - schemeSpecificPart_ (x.schemeSpecificPart_) -{ -} - -URIValue::URIValue(const TQCString & s) - : Value(s) -{ -} - - URIValue & -URIValue::operator = (URIValue & x) -{ - if (*this == x) return *this; - - scheme_ = x.scheme_; - schemeSpecificPart_ = x.schemeSpecificPart_; - - Value::operator = (x); - return *this; -} - - URIValue & -URIValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -URIValue::operator == (URIValue & x) -{ - x.parse(); - return ( - (scheme_ == x.scheme_) && - (schemeSpecificPart_ == x.schemeSpecificPart_)); - - return false; -} - -URIValue::~URIValue() -{ -} - - void -URIValue::_parse() -{ - int split = strRep_.find(':'); - if (split == -1) - return; - - scheme_ = strRep_.left(split); - schemeSpecificPart_ = strRep_.mid(split + 1); -} - - void -URIValue::_assemble() -{ - strRep_ = scheme_ + ':' + schemeSpecificPart_; -} - - TQCString -URIValue::scheme() -{ - parse(); - return scheme_; -} - - TQCString -URIValue::schemeSpecificPart() -{ - parse(); - return schemeSpecificPart_; -} - - void -URIValue::setScheme(const TQCString & s) -{ - parse(); - scheme_ = s; -} - - void -URIValue::setSchemeSpecificPart(const TQCString & s) -{ - parse(); - schemeSpecificPart_ = s; -} - diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp deleted file mode 100644 index 30473661f..000000000 --- a/kabc/vcard/UTCValue.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -UTCValue::UTCValue() - : Value() -{ -} - -UTCValue::UTCValue(const UTCValue & x) - : Value(x), positive_(x.positive_), hour_(x.hour_), minute_(x.minute_) - -{ -} - -UTCValue::UTCValue(const TQCString & s) - : Value(s) -{ -} - - UTCValue & -UTCValue::operator = (UTCValue & x) -{ - if (*this == x) return *this; - - positive_ = x.positive_; - hour_ = x.hour_; - minute_ = x.minute_; - - Value::operator = (x); - return *this; -} - - UTCValue & -UTCValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -UTCValue::operator == (UTCValue & x) -{ - x.parse(); - - if (positive_ != x.positive_) return false; - if (hour_ != x.hour_) return false; - if (minute_ != x.minute_) return false; - - return true; -} - -UTCValue::~UTCValue() -{ -} - - UTCValue * -UTCValue::clone() -{ - return new UTCValue( *this ); -} - - void -UTCValue::_parse() -{ - if ( strRep_.isEmpty() ) - return; - - positive_ = ( strRep_[0] == '+' ); - - int colon = strRep_.find( ':' ); - - if ( colon == -1 ) // Not valid. - return; - - hour_ = strRep_.mid( 1, 2 ).toInt(); - minute_ = strRep_.right( 2 ).toInt(); -} - - void -UTCValue::_assemble() -{ - strRep_.sprintf( "%c%.2i:%.2i", (positive_ ? '+' : '-'), hour_, minute_ ); -} - diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp deleted file mode 100644 index eb3f57f6e..000000000 --- a/kabc/vcard/VCard.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -#include -#include -#include -#include - -#include - -using namespace VCARD; - -VCard::VCard() - : Entity() -{ - contentLineList_.setAutoDelete( true ); -} - -VCard::VCard(const VCard & x) - : Entity(x), - group_(x.group_), - contentLineList_(x.contentLineList_) -{ -} - -VCard::VCard(const TQCString & s) - : Entity(s) -{ -} - - VCard & -VCard::operator = (VCard & x) -{ - if (*this == x) return *this; - - group_ = x.group(); - contentLineList_ = x.contentLineList_; - - Entity::operator = (x); - return *this; -} - - VCard & -VCard::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -VCard::operator == (VCard & x) -{ - x.parse(); - return false; -} - -VCard::~VCard() -{ -} - - void -VCard::_parse() -{ - vDebug("parse() called"); - TQStrList l; - - RTokenise(strRep_, "\r\n", l); - - if (l.count() < 3) { // Invalid VCARD ! - vDebug("Invalid vcard"); - return; - } - - // Get the first line - TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace(); - - vDebug("Begin line == \"" + beginLine + "\""); - - // Remove extra blank lines - while (TQCString(l.last()).isEmpty()) - l.remove(l.last()); - - // Now we know this is the last line - TQCString endLine = l.last(); - - // Trash the first and last lines as we have seen them. - l.remove(0u); - l.remove(l.last()); - - /////////////////////////////////////////////////////////////// - // FIRST LINE - - int split = beginLine.find(':'); - - if (split == -1) { // invalid, no BEGIN - vDebug("No split"); - return; - } - - TQCString firstPart(beginLine.left(split)); - TQCString valuePart(beginLine.mid(split + 1)); - - split = firstPart.find('.'); - - if (split != -1) { - group_ = firstPart.left(split); - firstPart = firstPart.right(firstPart.length() - split - 1); - } - - if (tqstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN ! - vDebug("No BEGIN"); - return; - } - - if (tqstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard ! - vDebug("No VCARD"); - return; - } - - /////////////////////////////////////////////////////////////// - // CONTENT LINES - // - vDebug("Content lines"); - - // Handle folded lines. - - TQStrList refolded; - - TQStrListIterator it(l); - - TQCString cur; - - for (; it.current(); ++it) { - - cur = it.current(); - - ++it; - - while ( - it.current() && - it.current()[0] == ' ' && - strlen(it.current()) != 1) - { - cur += it.current() + 1; - ++it; - } - - --it; - - refolded.append(cur); - } - - TQStrListIterator it2(refolded); - - for (; it2.current(); ++it2) { - - vDebug("New contentline using \"" + TQCString(it2.current()) + "\""); - ContentLine * cl = new ContentLine(it2.current()); - - cl->parse(); - - contentLineList_.append(cl); - } - - /////////////////////////////////////////////////////////////// - // LAST LINE - - split = endLine.find(':'); - - if (split == -1) // invalid, no END - return; - - firstPart = endLine.left(split); - valuePart = endLine.right(firstPart.length() - split - 1); - - split = firstPart.find('.'); - - if (split != -1) { - group_ = firstPart.left(split); - firstPart = firstPart.right(firstPart.length() - split - 1); - } - - if (tqstricmp(firstPart, "END") != 0) // No END ! - return; - - if (tqstricmp(valuePart, "VCARD") != 0) // Not a vcard ! - return; -} - - void -VCard::_assemble() -{ - vDebug("Assembling vcard"); - strRep_ = "BEGIN:VCARD\r\n"; - strRep_ += "VERSION:3.0\r\n"; - - TQPtrListIterator it(contentLineList_); - - for (; it.current(); ++it) - strRep_ += it.current()->asString() + "\r\n"; - - strRep_ += "END:VCARD\r\n"; -} - - bool -VCard::has(EntityType t) -{ - parse(); - return contentLine(t) == 0 ? false : true; -} - - bool -VCard::has(const TQCString & s) -{ - parse(); - return contentLine(s) == 0 ? false : true; -} - - void -VCard::add(const ContentLine & cl) -{ - parse(); - ContentLine * c = new ContentLine(cl); - contentLineList_.append(c); -} - - void -VCard::add(const TQCString & s) -{ - parse(); - ContentLine * c = new ContentLine(s); - contentLineList_.append(c); -} - - ContentLine * -VCard::contentLine(EntityType t) -{ - parse(); - TQPtrListIterator it(contentLineList_); - - for (; it.current(); ++it) - if (it.current()->entityType() == t) - return it.current(); - - return 0; -} - - ContentLine * -VCard::contentLine(const TQCString & s) -{ - parse(); - TQPtrListIterator it(contentLineList_); - - for (; it.current(); ++it) - if (it.current()->entityType() == EntityNameToEntityType(s)) - return it.current(); - - return 0; -} - diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp deleted file mode 100644 index 1f8cea5b1..000000000 --- a/kabc/vcard/VCardEntity.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include -#include - -using namespace VCARD; - -VCardEntity::VCardEntity() - : Entity() -{ -} - -VCardEntity::VCardEntity(const VCardEntity & x) - : Entity(x) -{ -} - -VCardEntity::VCardEntity(const TQCString & s) - : Entity(s) -{ -} - - VCardEntity & -VCardEntity::operator = (VCardEntity & x) -{ - if (*this == x) return *this; - - Entity::operator = (x); - return *this; -} - - VCardEntity & -VCardEntity::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -VCardEntity::operator == (VCardEntity & x) -{ - x.parse(); - return false; -} - -VCardEntity::~VCardEntity() -{ -} - - void -VCardEntity::_parse() -{ - vDebug("parse"); - TQCString s(strRep_); - - int i = s.find(TQRegExp("BEGIN:VCARD", false)); - - while (i != -1) { - - i = s.find(TQRegExp("BEGIN:VCARD", false), 11); - - TQCString cardStr(s.left(i)); - - VCard * v = new VCard(cardStr); - - cardList_.append(v); - - v->parse(); - - s.remove(0, i); - } -} - - void -VCardEntity::_assemble() -{ - VCardListIterator it(cardList_); - - for (; it.current(); ++it) - strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. -} - - VCardList & -VCardEntity::cardList() -{ - parse(); - return cardList_; -} - - void -VCardEntity::setCardList(const VCardList & l) -{ - parse(); - cardList_ = l; -} - diff --git a/kabc/vcard/Value.cpp b/kabc/vcard/Value.cpp deleted file mode 100644 index c95c0712b..000000000 --- a/kabc/vcard/Value.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -using namespace VCARD; - -Value::Value() - : Entity() -{ -} - -Value::Value(const Value & x) - : Entity(x) -{ -} - -Value::Value(const TQCString & s) - : Entity(s) -{ -} - - Value & -Value::operator = (Value & x) -{ - if (*this == x) return *this; - - Entity::operator = (x); - return *this; -} - - Value & -Value::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -Value::operator == (Value & x) -{ - x.parse(); - return false; -} - -Value::~Value() -{ -} - - void -Value::_parse() -{ -} - - void -Value::_assemble() -{ - vDebug("Value::_assemble()"); -} - diff --git a/kabc/vcard/include/VCard.h b/kabc/vcard/include/VCard.h deleted file mode 100644 index 17b50e8f2..000000000 --- a/kabc/vcard/include/VCard.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef VCARD_H -#define VCARD_H - -#include "VCardAdrParam.h" -#include "VCardAdrValue.h" -#include "VCardAgentParam.h" -#include "VCardAgentValue.h" -#include "VCardClassValue.h" -#include "VCardContentLine.h" -#include "VCardDateParam.h" -#include "VCardDateValue.h" -#include "VCardDefines.h" -#include "VCardEmailParam.h" -#include "VCardEntity.h" -#include "VCardEnum.h" -#include "VCardFloatValue.h" -#include "VCardGeoValue.h" -#include "VCardGroup.h" -#include "VCardImageParam.h" -#include "VCardImageValue.h" -#include "VCardImgValue.h" -#include "VCardLangValue.h" -#include "VCardNValue.h" -#include "VCardOrgValue.h" -#include "VCardParam.h" -#include "VCardPhoneNumberValue.h" -#include "VCardRToken.h" -#include "VCardSoundValue.h" -#include "VCardSourceParam.h" -#include "VCardTelParam.h" -#include "VCardTelValue.h" -#include "VCardTextBinParam.h" -#include "VCardTextBinValue.h" -#include "VCardTextListValue.h" -#include "VCardTextParam.h" -#include "VCardTextValue.h" -#include "VCardURIValue.h" -#include "VCardUTCValue.h" -#include "VCardVCard.h" -#include "VCardVCardEntity.h" -#include "VCardValue.h" - -#endif diff --git a/kabc/vcard/include/VCardAdrParam.h b/kabc/vcard/include/VCardAdrParam.h deleted file mode 100644 index d40165f4a..000000000 --- a/kabc/vcard/include/VCardAdrParam.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ADRPARAM_H -#define ADRPARAM_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AdrParam : public Param -{ - -#include "AdrParam-generated.h" - - TQStrList adrTypeList() - { parse(); return adrTypeList_; } - - TQCString textParam() - { parse(); return textParam_; } - - void setAdrTypeList(const TQStrList & l) - { adrTypeList_ = l; assembled_ = false; } - - void setTextParam(const TQCString & s) - { textParam_ = s; assembled_ = false; } - - enum AdrType { - AdrDom, AdrIntl, AdrPostal, AdrParcel, AdrHome, AdrWork, AdrPref, - AdrIANA, AdrX - }; - - private: - - TQStrList adrTypeList_; - TQCString textParam_; -}; -} - -#endif diff --git a/kabc/vcard/include/VCardAdrValue.h b/kabc/vcard/include/VCardAdrValue.h deleted file mode 100644 index 94ed93aee..000000000 --- a/kabc/vcard/include/VCardAdrValue.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ADRVALUE_H -#define ADRVALUE_H - -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AdrValue : public Value -{ - -#include "AdrValue-generated.h" - - AdrValue *clone(); - - void setPOBox(const TQCString & s) - { poBox_ = s; assembled_ = false; } - - void setExtAddress(const TQCString & s) - { extAddress_ = s; assembled_ = false; } - - void setStreet(const TQCString & s) - { street_ = s; assembled_ = false; } - - void setLocality(const TQCString & s) - { locality_ = s; assembled_ = false; } - - void setRegion(const TQCString & s) - { region_ = s; assembled_ = false; } - - void setPostCode(const TQCString & s) - { postCode_ = s; assembled_ = false; } - - void setCountryName(const TQCString & s) - { countryName_ = s; assembled_ = false; } - - TQCString poBox() { parse(); return poBox_; } - TQCString extAddress() { parse(); return extAddress_; } - TQCString street() { parse(); return street_; } - TQCString locality() { parse(); return locality_; } - TQCString region() { parse(); return region_; } - TQCString postCode() { parse(); return postCode_; } - TQCString countryName() { parse(); return countryName_; } - - private: - - TQCString poBox_; - TQCString extAddress_; - TQCString street_; - TQCString locality_; - TQCString region_; - TQCString postCode_; - TQCString countryName_; -}; - -} - -#endif - diff --git a/kabc/vcard/include/VCardAgentParam.h b/kabc/vcard/include/VCardAgentParam.h deleted file mode 100644 index 90c3bd528..000000000 --- a/kabc/vcard/include/VCardAgentParam.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef AGENTPARAM_H -#define AGENTPARAM_H - -#include - -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AgentParam : public Param -{ - -#include "AgentParam-generated.h" - - bool refer() - { parse(); return refer_; } - - URIValue uri() - { parse(); return uri_; } - - void setRefer(bool b) - { refer_ = b; assembled_ = false; } - - void setURI(const TQCString & s) - { uri_ = s; assembled_ = false; } - - private: - - bool refer_; - URIValue uri_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardAgentValue.h b/kabc/vcard/include/VCardAgentValue.h deleted file mode 100644 index dd68145c9..000000000 --- a/kabc/vcard/include/VCardAgentValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef AGENTVALUE_H -#define AGENTVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AgentValue : public Value -{ - -#include "AgentValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardClassValue.h b/kabc/vcard/include/VCardClassValue.h deleted file mode 100644 index 5de79167b..000000000 --- a/kabc/vcard/include/VCardClassValue.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef CLASSVALUE_H -#define CLASSVALUE_H - -#include - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ClassValue : public Value -{ - -#include "ClassValue-generated.h" - - enum ClassType { - Public, Private, Confidential, Other - }; - - ClassValue *clone(); - - void setType( int type ) { classType_ = type; assembled_ = false; parsed_ = true; } - int type() { parse(); return classType_; } - - private: - int classType_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardContentLine.h b/kabc/vcard/include/VCardContentLine.h deleted file mode 100644 index ea59444a0..000000000 --- a/kabc/vcard/include/VCardContentLine.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef CONTENTLINE_H -#define CONTENTLINE_H - -#include - -#include "VCardEnum.h" -#include "VCardEntity.h" -#include "VCardParam.h" -#include "VCardValue.h" - -namespace VCARD -{ - -class KVCARD_EXPORT ContentLine : public Entity -{ - -#include "ContentLine-generated.h" - - TQCString group() { parse(); return group_; } - TQCString name() { parse(); return name_; } - Value * value() { parse(); return value_; } - ParamList paramList() { parse(); return paramList_; } - ParamType paramType() { parse(); return paramType_; } - ValueType valueType() { parse(); return valueType_; } - EntityType entityType() { parse(); return entityType_; } - - void setGroup (const TQCString & s) - { group_ = s; assembled_ = false; } - - void setName (const TQCString & s) - { name_ = s; assembled_ = false; } - - void setValue (Value *s) - { value_ = s; assembled_ = false; } - - void setParamList (const ParamList & l) - { paramList_ = l; assembled_ = false; } - - void clear (); - - private: - - TQCString group_; - TQCString name_; - TQPtrList paramList_; - Value * value_; - - ParamType paramType_; - ValueType valueType_; - EntityType entityType_; -}; -} - -#endif diff --git a/kabc/vcard/include/VCardDateParam.h b/kabc/vcard/include/VCardDateParam.h deleted file mode 100644 index 410eae6b7..000000000 --- a/kabc/vcard/include/VCardDateParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef DATEPARAM_H -#define DATEPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT DateParam : public Param -{ - -#include "DateParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardDateValue.h b/kabc/vcard/include/VCardDateValue.h deleted file mode 100644 index 4f2e2fe7f..000000000 --- a/kabc/vcard/include/VCardDateValue.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef DATEVALUE_H -#define DATEVALUE_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT DateValue : public Value -{ -#include "DateValue-generated.h" - - DateValue( - unsigned int year, - unsigned int month, - unsigned int day, - unsigned int hour = 0, - unsigned int minute = 0, - unsigned int second = 0, - double secFrac = 0, - bool zonePositive = true, - unsigned int zoneHour = 0, - unsigned int zoneMinute = 0); - - DateValue(const TQDate &); - DateValue(const TQDateTime &); - - DateValue *clone(); - - bool hasTime(); - - unsigned int year(); - unsigned int month(); - unsigned int day(); - unsigned int hour(); - unsigned int minute(); - unsigned int second(); - double secondFraction(); - bool zonePositive(); - unsigned int zoneHour(); - unsigned int zoneMinute(); - - void setYear (unsigned int); - void setMonth (unsigned int); - void setDay (unsigned int); - void setHour (unsigned int); - void setMinute (unsigned int); - void setSecond (unsigned int); - void setSecondFraction (double); - void setZonePositive (bool); - void setZoneHour (unsigned int); - void setZoneMinute (unsigned int); - - TQDate qdate(); - TQTime qtime(); - TQDateTime qdt(); - - private: - - unsigned int year_, month_, day_, - hour_, minute_, second_, - zoneHour_, zoneMinute_; - - double secFrac_; - - bool zonePositive_; - - bool hasTime_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardDefines.h b/kabc/vcard/include/VCardDefines.h deleted file mode 100644 index e778bc24f..000000000 --- a/kabc/vcard/include/VCardDefines.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VCARD_DEFINES_H -#define VCARD_DEFINES_H - -#include - -#ifdef VCARD_DEBUG -#define vDebug(a) kdDebug(5710) << a << endl; -#else -#define vDebug(a) -#endif - -#if 0 -#ifndef NDEBUG -# include -# include -# ifdef __GNUG__ -# define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ - << __LINE__ << "): " << TQCString((a)).data() << endl; -# else -# define vDebug(a) cerr << className() << ": " \ - << TQCString((a)).data() << endl; -# endif -#else -# define vDebug(a) -#endif -#endif - -#endif // Included this file - diff --git a/kabc/vcard/include/VCardEmailParam.h b/kabc/vcard/include/VCardEmailParam.h deleted file mode 100644 index 1fe558afd..000000000 --- a/kabc/vcard/include/VCardEmailParam.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef EMAILPARAM_H -#define EMAILPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT EmailParam : public Param -{ - -#include "EmailParam-generated.h" - - TQCString emailType() { parse(); return emailType_; } - bool pref() { parse(); return pref_; } - - void setEmailType(const TQCString & s) - { emailType_ = s; assembled_ = false; } - - void setPref(bool b) - { pref_ = b; assembled_ = false; } - - private: - - TQCString emailType_; - bool pref_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardEntity.h b/kabc/vcard/include/VCardEntity.h deleted file mode 100644 index e87c5f1a6..000000000 --- a/kabc/vcard/include/VCardEntity.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ENTITY_H -#define ENTITY_H - -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Entity -{ - public: - - Entity(); - Entity(const Entity & e); - Entity(const TQCString & s); - - virtual Entity & operator = (const Entity & e); - virtual Entity & operator = (const TQCString & s); - - virtual bool operator == (Entity & e); - virtual bool operator != (Entity & e); - virtual bool operator == (const TQCString & s); - virtual bool operator != (const TQCString & s); - - virtual ~Entity(); - - TQCString asString(); - - virtual void parse(); - virtual void assemble(); - - virtual void _parse() = 0; - virtual void _assemble() = 0; - - protected: - - TQCString strRep_; - bool parsed_; - bool assembled_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardEnum.h b/kabc/vcard/include/VCardEnum.h deleted file mode 100644 index 4552ccdbc..000000000 --- a/kabc/vcard/include/VCardEnum.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ENUM_H -#define ENUM_H - -#include - -#include - -namespace VCARD -{ - -extern const TQCString paramNames []; - -enum EntityType { - EntityName, - EntityProfile, - EntitySource, - EntityFullName, - EntityN, - EntityNickname, - EntityPhoto, - EntityBirthday, - EntityAddress, - EntityLabel, - EntityTelephone, - EntityEmail, - EntityMailer, - EntityTimeZone, - EntityGeo, - EntityTitle, - EntityRole, - EntityLogo, - EntityAgent, - EntityOrganisation, - EntityCategories, - EntityNote, - EntityProductID, - EntityRevision, - EntitySortString, - EntitySound, - EntityUID, - EntityURI, - EntityURL, - EntityVersion, - EntityClass, - EntityKey, - EntityExtension, - EntityUnknown -}; - -enum ValueType { - ValueSound, - ValueAgent, - ValueAddress, - ValueTel, - ValueTextBin, - ValueOrg, - ValueN, - ValueUTC, - ValueURI, - ValueClass, - ValueFloat, - ValueImage, - ValueDate, - ValueTextList, - ValueText, - ValueGeo, - ValueUnknown -}; - -enum ParamType { - ParamUnknown, - ParamNone, - ParamSource, - ParamText, - ParamImage, - ParamDate, - ParamAddrText, - ParamTel, - ParamEmail, - ParamMailer, - ParamAgent, - ParamTextBin, - ParamTextNS, - ParamSound -}; - -extern const ParamType paramTypesTable[]; - -KVCARD_EXPORT ParamType EntityTypeToParamType(EntityType); -KVCARD_EXPORT ValueType EntityTypeToValueType(EntityType); -KVCARD_EXPORT TQCString EntityTypeToParamName(EntityType); -KVCARD_EXPORT EntityType EntityNameToEntityType(const TQCString &); - -KVCARD_EXPORT char * encodeBase64(const char *, unsigned long, unsigned long &); -KVCARD_EXPORT char * decodeBase64(const char *, unsigned long, unsigned long &); - -} - -#endif - diff --git a/kabc/vcard/include/VCardFloatValue.h b/kabc/vcard/include/VCardFloatValue.h deleted file mode 100644 index 45a6823be..000000000 --- a/kabc/vcard/include/VCardFloatValue.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef FLOATVALUE_H -#define FLOATVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT FloatValue : public Value -{ - -#include "FloatValue-generated.h" - - FloatValue(float); - - float value(); - void setValue(float); - - private: - - float value_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardGeoValue.h b/kabc/vcard/include/VCardGeoValue.h deleted file mode 100644 index 4228587a4..000000000 --- a/kabc/vcard/include/VCardGeoValue.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - This file is part of libvcard. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef GEOVALUE_H -#define GEOVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT GeoValue : public Value -{ - -#include "GeoValue-generated.h" - - GeoValue *clone(); - - void setLatitude( float lat ) { latitude_ = lat; assembled_ = false; } - void setLongitude( float lon ) { longitude_ = lon; assembled_ = false; } - - float latitude() { parse(); return latitude_; } - float longitude() { parse(); return longitude_; } - - private: - float latitude_; - float longitude_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardGroup.h b/kabc/vcard/include/VCardGroup.h deleted file mode 100644 index ce884f100..000000000 --- a/kabc/vcard/include/VCardGroup.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef GROUP_H -#define GROUP_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Group : public Entity -{ -#include "Group-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardImageParam.h b/kabc/vcard/include/VCardImageParam.h deleted file mode 100644 index 10ab8a3f5..000000000 --- a/kabc/vcard/include/VCardImageParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef IMGPARAM_H -#define IMGPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ImageParam : public Param -{ - -#include "ImageParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardImageValue.h b/kabc/vcard/include/VCardImageValue.h deleted file mode 100644 index 45fbcad9c..000000000 --- a/kabc/vcard/include/VCardImageValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef IMAGEVALUE_H -#define IMAGEVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ImageValue : public Value -{ - -#include "ImageValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardImgValue.h b/kabc/vcard/include/VCardImgValue.h deleted file mode 100644 index 7d4bbfa2d..000000000 --- a/kabc/vcard/include/VCardImgValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef IMGVALUE_H -#define IMGVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ImgValue : public Value -{ -#include "ImgValue-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardLangValue.h b/kabc/vcard/include/VCardLangValue.h deleted file mode 100644 index 7767d52fa..000000000 --- a/kabc/vcard/include/VCardLangValue.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef LANGVALUE_H -#define LANGVALUE_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT LangValue : public Value -{ -#include "LangValue-generated.h" - - TQCString primary(); - TQStrList subtags(); - - void setPrimary(const TQCString &); - void setSubTags(const TQStrList &); - - TQCString primary_; - TQStrList subtags_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardNValue.h b/kabc/vcard/include/VCardNValue.h deleted file mode 100644 index 9db37fbbc..000000000 --- a/kabc/vcard/include/VCardNValue.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef NVALUE_H -#define NVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT NValue : public Value -{ -#include "NValue-generated.h" - NValue *clone(); - - TQCString family() { parse(); return family_; } - TQCString given() { parse(); return given_; } - TQCString middle() { parse(); return middle_; } - TQCString prefix() { parse(); return prefix_; } - TQCString suffix() { parse(); return suffix_; } - - void setFamily (const TQCString & s) { family_ = s; assembled_ = false; } - void setGiven (const TQCString & s) { given_ = s; assembled_ = false; } - void setMiddle (const TQCString & s) { middle_ = s; assembled_ = false; } - void setPrefix (const TQCString & s) { prefix_ = s; assembled_ = false; } - void setSuffix (const TQCString & s) { suffix_ = s; assembled_ = false; } - - private: - - TQCString family_, given_, middle_, prefix_, suffix_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardOrgValue.h b/kabc/vcard/include/VCardOrgValue.h deleted file mode 100644 index a2bd803e5..000000000 --- a/kabc/vcard/include/VCardOrgValue.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ORGVALUE_H -#define ORGVALUE_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT OrgValue : public Value -{ - -#include "OrgValue-generated.h" - - unsigned int numValues(); - TQCString value(unsigned int); - - private: - - TQStrList valueList_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardParam.h b/kabc/vcard/include/VCardParam.h deleted file mode 100644 index 93d70f06b..000000000 --- a/kabc/vcard/include/VCardParam.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef PARAM_H -#define PARAM_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Param : public Entity -{ - -#include "Param-generated.h" - - Param(const TQCString &name, const TQCString &value); - - void setName(const TQCString &); - void setValue(const TQCString &); - - TQCString name(); - TQCString value(); - - private: - - TQCString name_; - TQCString value_; -}; - -typedef TQPtrList ParamList; -typedef TQPtrListIterator ParamListIterator; - -} - -#endif diff --git a/kabc/vcard/include/VCardPhoneNumberValue.h b/kabc/vcard/include/VCardPhoneNumberValue.h deleted file mode 100644 index 3f9e106ca..000000000 --- a/kabc/vcard/include/VCardPhoneNumberValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef PHONENUMBERVALUE_H -#define PHONENUMBERVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT PhoneNumberValue : public Value -{ -#include "PhoneNumberValue-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardRToken.h b/kabc/vcard/include/VCardRToken.h deleted file mode 100644 index 17a3943d3..000000000 --- a/kabc/vcard/include/VCardRToken.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef RTOKEN_H -#define RTOKEN_H - -#include - -#include - -namespace VCARD -{ - -KVCARD_EXPORT TQ_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l); - -} - -#endif - diff --git a/kabc/vcard/include/VCardSndValue.h b/kabc/vcard/include/VCardSndValue.h deleted file mode 100644 index 09a3a8238..000000000 --- a/kabc/vcard/include/VCardSndValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef SNDVALUE_H -#define SNDVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT SndValue : public Value -{ -#include "SndValue-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardSoundValue.h b/kabc/vcard/include/VCardSoundValue.h deleted file mode 100644 index 61858f058..000000000 --- a/kabc/vcard/include/VCardSoundValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef SOUNDVALUE_H -#define SOUNDVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT SoundValue : public Value -{ - -#include "SoundValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardSourceParam.h b/kabc/vcard/include/VCardSourceParam.h deleted file mode 100644 index 1d9d03d47..000000000 --- a/kabc/vcard/include/VCardSourceParam.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef SOURCEPARAM_H -#define SOURCEPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT SourceParam : public Param -{ - -#include "SourceParam-generated.h" - - enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX }; - - SourceParamType type() { parse(); return type_;} - TQCString par() { parse(); return par_; } - TQCString val() { parse(); return val_; } - - void setType(SourceParamType t) { type_ = t; assembled_ = false; } - void setPar(const TQCString & s) { par_ = s; assembled_ = false; } - void setVal(const TQCString & s) { val_ = s; assembled_ = false; } - - private: - - SourceParamType type_; - // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" - TQCString par_, val_; // Sub-parameter, value -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTelParam.h b/kabc/vcard/include/VCardTelParam.h deleted file mode 100644 index 9eea5da2f..000000000 --- a/kabc/vcard/include/VCardTelParam.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TELPARAM_H -#define TELPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TelParam : public Param -{ -#include "TelParam-generated.h" - - enum TelType { - TelHome, TelWork, TelPref, TelVoice, TelFex, TelMsg, TelCell, - TelPager, TelBBS, TelModem, TelCar, TelISDN, TelVideo, TelPCS, - TelIANA, TelX - }; - - private: - - TQPtrList types_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTelValue.h b/kabc/vcard/include/VCardTelValue.h deleted file mode 100644 index 043a45aa9..000000000 --- a/kabc/vcard/include/VCardTelValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TELVALUE_H -#define TELVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TelValue : public Value -{ - -#include "TelValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextBinParam.h b/kabc/vcard/include/VCardTextBinParam.h deleted file mode 100644 index 5a681ad48..000000000 --- a/kabc/vcard/include/VCardTextBinParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTBINPARAM_H -#define TEXTBINPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextBinParam : public Param -{ - -#include "TextBinParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextBinValue.h b/kabc/vcard/include/VCardTextBinValue.h deleted file mode 100644 index 316fa7832..000000000 --- a/kabc/vcard/include/VCardTextBinValue.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTBINVALUE_H -#define TEXTBINVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextBinValue : public Value -{ - -#include "TextBinValue-generated.h" - - TextBinValue *clone(); - - bool isBinary() { parse(); return mIsBinary_; } - TQByteArray data() { parse(); return mData_; } - TQString url() { parse(); return mUrl_; } - - void setData( const TQByteArray &data ) - { - mData_ = data; - mIsBinary_ = true; - assembled_ = false; - } - - void setUrl( const TQString &url ) - { - mUrl_ = url; - mIsBinary_ = false; - assembled_ = false; - } - - private: - int mIsBinary_; - TQByteArray mData_; - TQString mUrl_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextListValue.h b/kabc/vcard/include/VCardTextListValue.h deleted file mode 100644 index 53760c75a..000000000 --- a/kabc/vcard/include/VCardTextListValue.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTLISTVALUE_H -#define TEXTLISTVALUE_H - -#include - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextListValue : public Value -{ - -#include "TextListValue-generated.h" - - unsigned int numValues(); - TQCString value(unsigned int); - - private: - - TQStrList valueList_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextParam.h b/kabc/vcard/include/VCardTextParam.h deleted file mode 100644 index d593c0578..000000000 --- a/kabc/vcard/include/VCardTextParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTPARAM_H -#define TEXTPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextParam : public Param -{ - -#include "TextParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextValue.h b/kabc/vcard/include/VCardTextValue.h deleted file mode 100644 index 66eed32a8..000000000 --- a/kabc/vcard/include/VCardTextValue.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTVALUE_H -#define TEXTVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextValue : public Value -{ -#include "TextValue-generated.h" - - TextValue *clone(); -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardURIValue.h b/kabc/vcard/include/VCardURIValue.h deleted file mode 100644 index 696887774..000000000 --- a/kabc/vcard/include/VCardURIValue.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef URIVALUE_H -#define URIVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT URIValue : public Value -{ -#include "URIValue-generated.h" - - URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart); - - TQCString scheme(); - TQCString schemeSpecificPart(); - - void setScheme (const TQCString &); - void setSchemeSpecificPart (const TQCString &); - - private: - - TQCString scheme_; - TQCString schemeSpecificPart_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardUTCValue.h b/kabc/vcard/include/VCardUTCValue.h deleted file mode 100644 index cb09ccf00..000000000 --- a/kabc/vcard/include/VCardUTCValue.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef UTCVALUE_H -#define UTCVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT UTCValue : public Value -{ - -#include "UTCValue-generated.h" - - UTCValue *clone(); - - void setPositive( int p ) { positive_ = p; assembled_ = false; } - void setHour( int h ) { hour_ = h; assembled_ = false; } - void setMinute( int m ) { minute_ = m; assembled_ = false; } - - bool positive() { parse(); return positive_; } - unsigned int hour() { parse(); return hour_; } - unsigned int minute() { parse(); return minute_; } - - private: - - bool positive_; - unsigned int hour_; - unsigned int minute_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardVCard.h b/kabc/vcard/include/VCardVCard.h deleted file mode 100644 index 53563e8c0..000000000 --- a/kabc/vcard/include/VCardVCard.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VCARD_VCARD_H -#define VCARD_VCARD_H - -#include -#include - -#include -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT VCard : public Entity -{ - -#include "VCard-generated.h" - - bool has(EntityType); - bool has(const TQCString &); - - void add(const ContentLine &); - void add(const TQCString &); - - ContentLine * contentLine(EntityType); - ContentLine * contentLine(const TQCString &); - - TQCString group() { parse(); return group_; } - - TQPtrList contentLineList() { parse(); return contentLineList_; } - - private: - - TQCString group_; - TQPtrList contentLineList_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardVCardEntity.h b/kabc/vcard/include/VCardVCardEntity.h deleted file mode 100644 index 422790c22..000000000 --- a/kabc/vcard/include/VCardVCardEntity.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VCARD_ENTITY_H -#define VCARD_ENTITY_H - -#include -#include - -#include -#include -#include - -namespace VCARD -{ - -typedef TQPtrList VCardList; -typedef TQPtrListIterator VCardListIterator; - -class KVCARD_EXPORT VCardEntity : public Entity -{ - -#include "VCardEntity-generated.h" - - void setCardList(const VCardList & l); - VCardList & cardList(); - - private: - - VCardList cardList_; - -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardValue.h b/kabc/vcard/include/VCardValue.h deleted file mode 100644 index 3c167d70a..000000000 --- a/kabc/vcard/include/VCardValue.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VALUE_H -#define VALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Value : public Entity -{ -#include "Value-generated.h" - - virtual Value *clone() { return new Value( *this ); } -}; - -typedef TQPtrList ValueList; -typedef TQPtrListIterator ValueListIterator; - -} - -#endif diff --git a/kabc/vcard/include/generated/AdrParam-generated.h b/kabc/vcard/include/generated/AdrParam-generated.h deleted file mode 100644 index 1afdcd36a..000000000 --- a/kabc/vcard/include/generated/AdrParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AdrParam(); -AdrParam(const AdrParam&); -AdrParam(const TQCString&); -AdrParam & operator = (AdrParam&); -AdrParam & operator = (const TQCString&); -bool operator ==(AdrParam&); -bool operator !=(AdrParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AdrParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AdrParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AdrParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/AdrValue-generated.h b/kabc/vcard/include/generated/AdrValue-generated.h deleted file mode 100644 index 9882d1186..000000000 --- a/kabc/vcard/include/generated/AdrValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AdrValue(); -AdrValue(const AdrValue&); -AdrValue(const TQCString&); -AdrValue & operator = (AdrValue&); -AdrValue & operator = (const TQCString&); -bool operator ==(AdrValue&); -bool operator !=(AdrValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AdrValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AdrValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AdrValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/AgentParam-generated.h b/kabc/vcard/include/generated/AgentParam-generated.h deleted file mode 100644 index 07b87d106..000000000 --- a/kabc/vcard/include/generated/AgentParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AgentParam(); -AgentParam(const AgentParam&); -AgentParam(const TQCString&); -AgentParam & operator = (AgentParam&); -AgentParam & operator = (const TQCString&); -bool operator ==(AgentParam&); -bool operator !=(AgentParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AgentParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AgentParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AgentParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/AgentValue-generated.h b/kabc/vcard/include/generated/AgentValue-generated.h deleted file mode 100644 index e2866bb8f..000000000 --- a/kabc/vcard/include/generated/AgentValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AgentValue(); -AgentValue(const AgentValue&); -AgentValue(const TQCString&); -AgentValue & operator = (AgentValue&); -AgentValue & operator = (const TQCString&); -bool operator ==(AgentValue&); -bool operator !=(AgentValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AgentValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AgentValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AgentValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ClassValue-generated.h b/kabc/vcard/include/generated/ClassValue-generated.h deleted file mode 100644 index e10c65568..000000000 --- a/kabc/vcard/include/generated/ClassValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ClassValue(); -ClassValue(const ClassValue&); -ClassValue(const TQCString&); -ClassValue & operator = (ClassValue&); -ClassValue & operator = (const TQCString&); -bool operator ==(ClassValue&); -bool operator !=(ClassValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ClassValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ClassValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ClassValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ContentLine-generated.h b/kabc/vcard/include/generated/ContentLine-generated.h deleted file mode 100644 index ad2ac7649..000000000 --- a/kabc/vcard/include/generated/ContentLine-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ContentLine(); -ContentLine(const ContentLine&); -ContentLine(const TQCString&); -ContentLine & operator = (ContentLine&); -ContentLine & operator = (const TQCString&); -bool operator ==(ContentLine&); -bool operator !=(ContentLine& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ContentLine a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ContentLine(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ContentLine"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/DateParam-generated.h b/kabc/vcard/include/generated/DateParam-generated.h deleted file mode 100644 index 75e7ad72d..000000000 --- a/kabc/vcard/include/generated/DateParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -DateParam(); -DateParam(const DateParam&); -DateParam(const TQCString&); -DateParam & operator = (DateParam&); -DateParam & operator = (const TQCString&); -bool operator ==(DateParam&); -bool operator !=(DateParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {DateParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~DateParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "DateParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/DateValue-generated.h b/kabc/vcard/include/generated/DateValue-generated.h deleted file mode 100644 index cf0eb40d8..000000000 --- a/kabc/vcard/include/generated/DateValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -DateValue(); -DateValue(const DateValue&); -DateValue(const TQCString&); -DateValue & operator = (DateValue&); -DateValue & operator = (const TQCString&); -bool operator ==(DateValue&); -bool operator !=(DateValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {DateValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~DateValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "DateValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/EmailParam-generated.h b/kabc/vcard/include/generated/EmailParam-generated.h deleted file mode 100644 index 46ae1f80f..000000000 --- a/kabc/vcard/include/generated/EmailParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -EmailParam(); -EmailParam(const EmailParam&); -EmailParam(const TQCString&); -EmailParam & operator = (EmailParam&); -EmailParam & operator = (const TQCString&); -bool operator ==(EmailParam&); -bool operator !=(EmailParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {EmailParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~EmailParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "EmailParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/FloatValue-generated.h b/kabc/vcard/include/generated/FloatValue-generated.h deleted file mode 100644 index 155f52ae1..000000000 --- a/kabc/vcard/include/generated/FloatValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -FloatValue(); -FloatValue(const FloatValue&); -FloatValue(const TQCString&); -FloatValue & operator = (FloatValue&); -FloatValue & operator = (const TQCString&); -bool operator ==(FloatValue&); -bool operator !=(FloatValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {FloatValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~FloatValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "FloatValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/GeoValue-generated.h b/kabc/vcard/include/generated/GeoValue-generated.h deleted file mode 100644 index b525e8c21..000000000 --- a/kabc/vcard/include/generated/GeoValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -GeoValue(); -GeoValue(const GeoValue&); -GeoValue(const TQCString&); -GeoValue & operator = (GeoValue&); -GeoValue & operator = (const TQCString&); -bool operator ==(GeoValue&); -bool operator !=(GeoValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {GeoValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~GeoValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "GeoValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Group-generated.h b/kabc/vcard/include/generated/Group-generated.h deleted file mode 100644 index 38e1c2a3a..000000000 --- a/kabc/vcard/include/generated/Group-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -Group(); -Group(const Group&); -Group(const TQCString&); -Group & operator = (Group&); -Group & operator = (const TQCString&); -bool operator ==(Group&); -bool operator !=(Group& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {Group a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~Group(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "Group"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImageParam-generated.h b/kabc/vcard/include/generated/ImageParam-generated.h deleted file mode 100644 index 78a5a97cf..000000000 --- a/kabc/vcard/include/generated/ImageParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImageParam(); -ImageParam(const ImageParam&); -ImageParam(const TQCString&); -ImageParam & operator = (ImageParam&); -ImageParam & operator = (const TQCString&); -bool operator ==(ImageParam&); -bool operator !=(ImageParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImageParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImageParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ImageParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImageValue-generated.h b/kabc/vcard/include/generated/ImageValue-generated.h deleted file mode 100644 index 882081fbc..000000000 --- a/kabc/vcard/include/generated/ImageValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImageValue(); -ImageValue(const ImageValue&); -ImageValue(const TQCString&); -ImageValue & operator = (ImageValue&); -ImageValue & operator = (const TQCString&); -bool operator ==(ImageValue&); -bool operator !=(ImageValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImageValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImageValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ImageValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImgParam-generated.h b/kabc/vcard/include/generated/ImgParam-generated.h deleted file mode 100644 index 04132c857..000000000 --- a/kabc/vcard/include/generated/ImgParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImgParam(); -ImgParam(const ImgParam&); -ImgParam(const TQCString&); -ImgParam & operator = (ImgParam&); -ImgParam & operator = (const TQCString&); -bool operator ==(ImgParam&); -bool operator !=(ImgParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImgParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImgParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -virtual const char * className() const { return "ImgParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImgValue-generated.h b/kabc/vcard/include/generated/ImgValue-generated.h deleted file mode 100644 index 0774de9bf..000000000 --- a/kabc/vcard/include/generated/ImgValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImgValue(); -ImgValue(const ImgValue&); -ImgValue(const TQCString&); -ImgValue & operator = (ImgValue&); -ImgValue & operator = (const TQCString&); -bool operator ==(ImgValue&); -bool operator !=(ImgValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImgValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImgValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -virtual const char * className() const { return "ImgValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/LangValue-generated.h b/kabc/vcard/include/generated/LangValue-generated.h deleted file mode 100644 index c4930c59e..000000000 --- a/kabc/vcard/include/generated/LangValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -LangValue(); -LangValue(const LangValue&); -LangValue(const TQCString&); -LangValue & operator = (LangValue&); -LangValue & operator = (const TQCString&); -bool operator ==(LangValue&); -bool operator !=(LangValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {LangValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~LangValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "LangValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/NValue-generated.h b/kabc/vcard/include/generated/NValue-generated.h deleted file mode 100644 index d78715ec0..000000000 --- a/kabc/vcard/include/generated/NValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -NValue(); -NValue(const NValue&); -NValue(const TQCString&); -NValue & operator = (NValue&); -NValue & operator = (const TQCString&); -bool operator ==(NValue&); -bool operator !=(NValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {NValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~NValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "NValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Name-generated.h b/kabc/vcard/include/generated/Name-generated.h deleted file mode 100644 index 17d56e680..000000000 --- a/kabc/vcard/include/generated/Name-generated.h +++ /dev/null @@ -1,22 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -V_Name(); -V_Name(const V_Name&); -V_Name(const TQCString&); -V_Name & operator = (V_Name&); -V_Name & operator = (const TQCString&); -bool operator ==(V_Name&); -bool operator !=(V_Name& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {V_Name a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~V_Name(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/OrgValue-generated.h b/kabc/vcard/include/generated/OrgValue-generated.h deleted file mode 100644 index 661ecf5a3..000000000 --- a/kabc/vcard/include/generated/OrgValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -OrgValue(); -OrgValue(const OrgValue&); -OrgValue(const TQCString&); -OrgValue & operator = (OrgValue&); -OrgValue & operator = (const TQCString&); -bool operator ==(OrgValue&); -bool operator !=(OrgValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {OrgValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~OrgValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "OrgValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Param-generated.h b/kabc/vcard/include/generated/Param-generated.h deleted file mode 100644 index bf63e7166..000000000 --- a/kabc/vcard/include/generated/Param-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -Param(); -Param(const Param&); -Param(const TQCString&); -Param & operator = (Param&); -Param & operator = (const TQCString&); -bool operator ==(Param&); -bool operator !=(Param& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {Param a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~Param(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "Param"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ParamName-generated.h b/kabc/vcard/include/generated/ParamName-generated.h deleted file mode 100644 index 60b1e12d5..000000000 --- a/kabc/vcard/include/generated/ParamName-generated.h +++ /dev/null @@ -1,22 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -V_ParamName(); -V_ParamName(const V_ParamName&); -V_ParamName(const TQCString&); -V_ParamName & operator = (V_ParamName&); -V_ParamName & operator = (const TQCString&); -bool operator ==(V_ParamName&); -bool operator !=(V_ParamName& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {V_ParamName a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~V_ParamName(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ParamValue-generated.h b/kabc/vcard/include/generated/ParamValue-generated.h deleted file mode 100644 index f31a166c6..000000000 --- a/kabc/vcard/include/generated/ParamValue-generated.h +++ /dev/null @@ -1,22 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -V_ParamValue(); -V_ParamValue(const V_ParamValue&); -V_ParamValue(const TQCString&); -V_ParamValue & operator = (V_ParamValue&); -V_ParamValue & operator = (const TQCString&); -bool operator ==(V_ParamValue&); -bool operator !=(V_ParamValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {V_ParamValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~V_ParamValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/PhoneNumberValue-generated.h b/kabc/vcard/include/generated/PhoneNumberValue-generated.h deleted file mode 100644 index f0eb6b4f4..000000000 --- a/kabc/vcard/include/generated/PhoneNumberValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -PhoneNumberValue(); -PhoneNumberValue(const PhoneNumberValue&); -PhoneNumberValue(const TQCString&); -PhoneNumberValue & operator = (PhoneNumberValue&); -PhoneNumberValue & operator = (const TQCString&); -bool operator ==(PhoneNumberValue&); -bool operator !=(PhoneNumberValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {PhoneNumberValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~PhoneNumberValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "PhoneNumberValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/SoundValue-generated.h b/kabc/vcard/include/generated/SoundValue-generated.h deleted file mode 100644 index 64081be0b..000000000 --- a/kabc/vcard/include/generated/SoundValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -SoundValue(); -SoundValue(const SoundValue&); -SoundValue(const TQCString&); -SoundValue & operator = (SoundValue&); -SoundValue & operator = (const TQCString&); -bool operator ==(SoundValue&); -bool operator !=(SoundValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {SoundValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~SoundValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "SoundValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/SourceParam-generated.h b/kabc/vcard/include/generated/SourceParam-generated.h deleted file mode 100644 index e3b13bca1..000000000 --- a/kabc/vcard/include/generated/SourceParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -SourceParam(); -SourceParam(const SourceParam&); -SourceParam(const TQCString&); -SourceParam & operator = (SourceParam&); -SourceParam & operator = (const TQCString&); -bool operator ==(SourceParam&); -bool operator !=(SourceParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {SourceParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~SourceParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "SourceParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TelParam-generated.h b/kabc/vcard/include/generated/TelParam-generated.h deleted file mode 100644 index 9f8f24270..000000000 --- a/kabc/vcard/include/generated/TelParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TelParam(); -TelParam(const TelParam&); -TelParam(const TQCString&); -TelParam & operator = (TelParam&); -TelParam & operator = (const TQCString&); -bool operator ==(TelParam&); -bool operator !=(TelParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TelParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TelParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TelParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TelValue-generated.h b/kabc/vcard/include/generated/TelValue-generated.h deleted file mode 100644 index 600da7727..000000000 --- a/kabc/vcard/include/generated/TelValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TelValue(); -TelValue(const TelValue&); -TelValue(const TQCString&); -TelValue & operator = (TelValue&); -TelValue & operator = (const TQCString&); -bool operator ==(TelValue&); -bool operator !=(TelValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TelValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TelValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TelValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextBinParam-generated.h b/kabc/vcard/include/generated/TextBinParam-generated.h deleted file mode 100644 index 37dc56e55..000000000 --- a/kabc/vcard/include/generated/TextBinParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextBinParam(); -TextBinParam(const TextBinParam&); -TextBinParam(const TQCString&); -TextBinParam & operator = (TextBinParam&); -TextBinParam & operator = (const TQCString&); -bool operator ==(TextBinParam&); -bool operator !=(TextBinParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextBinParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextBinParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextBinParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextBinValue-generated.h b/kabc/vcard/include/generated/TextBinValue-generated.h deleted file mode 100644 index 4c9580421..000000000 --- a/kabc/vcard/include/generated/TextBinValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextBinValue(); -TextBinValue(const TextBinValue&); -TextBinValue(const TQCString&); -TextBinValue & operator = (TextBinValue&); -TextBinValue & operator = (const TQCString&); -bool operator ==(TextBinValue&); -bool operator !=(TextBinValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextBinValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextBinValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextBinValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextListValue-generated.h b/kabc/vcard/include/generated/TextListValue-generated.h deleted file mode 100644 index 8babb0d9f..000000000 --- a/kabc/vcard/include/generated/TextListValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextListValue(); -TextListValue(const TextListValue&); -TextListValue(const TQCString&); -TextListValue & operator = (TextListValue&); -TextListValue & operator = (const TQCString&); -bool operator ==(TextListValue&); -bool operator !=(TextListValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextListValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextListValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextListValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextNSParam-generated.h b/kabc/vcard/include/generated/TextNSParam-generated.h deleted file mode 100644 index bd8e74b07..000000000 --- a/kabc/vcard/include/generated/TextNSParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextNSParam(); -TextNSParam(const TextNSParam&); -TextNSParam(const TQCString&); -TextNSParam & operator = (TextNSParam&); -TextNSParam & operator = (const TQCString&); -bool operator ==(TextNSParam&); -bool operator !=(TextNSParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextNSParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextNSParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextNSParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextParam-generated.h b/kabc/vcard/include/generated/TextParam-generated.h deleted file mode 100644 index 54ae611a5..000000000 --- a/kabc/vcard/include/generated/TextParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextParam(); -TextParam(const TextParam&); -TextParam(const TQCString&); -TextParam & operator = (TextParam&); -TextParam & operator = (const TQCString&); -bool operator ==(TextParam&); -bool operator !=(TextParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextValue-generated.h b/kabc/vcard/include/generated/TextValue-generated.h deleted file mode 100644 index 5b56b54a7..000000000 --- a/kabc/vcard/include/generated/TextValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextValue(); -TextValue(const TextValue&); -TextValue(const TQCString&); -TextValue & operator = (TextValue&); -TextValue & operator = (const TQCString&); -bool operator ==(TextValue&); -bool operator !=(TextValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/URIValue-generated.h b/kabc/vcard/include/generated/URIValue-generated.h deleted file mode 100644 index 5a691e6d6..000000000 --- a/kabc/vcard/include/generated/URIValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -URIValue(); -URIValue(const URIValue&); -URIValue(const TQCString&); -URIValue & operator = (URIValue&); -URIValue & operator = (const TQCString&); -bool operator ==(URIValue&); -bool operator !=(URIValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {URIValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~URIValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "URIValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/UTCValue-generated.h b/kabc/vcard/include/generated/UTCValue-generated.h deleted file mode 100644 index 0c6edfb46..000000000 --- a/kabc/vcard/include/generated/UTCValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -UTCValue(); -UTCValue(const UTCValue&); -UTCValue(const TQCString&); -UTCValue & operator = (UTCValue&); -UTCValue & operator = (const TQCString&); -bool operator ==(UTCValue&); -bool operator !=(UTCValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {UTCValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~UTCValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "UTCValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/VCard-generated.h b/kabc/vcard/include/generated/VCard-generated.h deleted file mode 100644 index 4f36d11da..000000000 --- a/kabc/vcard/include/generated/VCard-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -VCard(); -VCard(const VCard&); -VCard(const TQCString&); -VCard & operator = (VCard&); -VCard & operator = (const TQCString&); -bool operator ==(VCard&); -bool operator !=(VCard& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {VCard a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~VCard(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "VCard"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/VCardEntity-generated.h b/kabc/vcard/include/generated/VCardEntity-generated.h deleted file mode 100644 index 4e973e62a..000000000 --- a/kabc/vcard/include/generated/VCardEntity-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -VCardEntity(); -VCardEntity(const VCardEntity&); -VCardEntity(const TQCString&); -VCardEntity & operator = (VCardEntity&); -VCardEntity & operator = (const TQCString&); -bool operator ==(VCardEntity&); -bool operator !=(VCardEntity& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {VCardEntity a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~VCardEntity(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "VCardEntity"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Value-generated.h b/kabc/vcard/include/generated/Value-generated.h deleted file mode 100644 index 935d137b6..000000000 --- a/kabc/vcard/include/generated/Value-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -Value(); -Value(const Value&); -Value(const TQCString&); -Value & operator = (Value&); -Value & operator = (const TQCString&); -bool operator ==(Value&); -bool operator !=(Value& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {Value a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~Value(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "Value"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/generate b/kabc/vcard/include/generated/generate deleted file mode 100755 index 926dbf136..000000000 --- a/kabc/vcard/include/generated/generate +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cat headerBodies | awk -f generateHeaders.awk diff --git a/kabc/vcard/include/generated/generateHeaders.awk b/kabc/vcard/include/generated/generateHeaders.awk deleted file mode 100755 index 471db11b4..000000000 --- a/kabc/vcard/include/generated/generateHeaders.awk +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/awk -f - -{ - outfile = $1 "-generated.h" - name = $1 - - OFS="" - - print "// XXX Automatically generated. DO NOT EDIT! XXX //\n" > outfile - print "// WARNING! All changes made in this file will be lost!\n" > outfile - - if ($2 == "v") { pre = "virtual " } else { pre = "" } - - print "public:" >> outfile - print name "();" >> outfile - print name "(const " name "&);" >> outfile - print name "(const QCString&);" >> outfile - print pre name " & operator = (" name "&);" >> outfile - print pre name " & operator = (const QCString&);" >> outfile - print pre "bool operator ==(" name "&);" >> outfile - print pre "bool operator !=(" name "& x) {return !(*this==x);}" \ - >> outfile - print pre "bool operator ==(const QCString& s) {" name " a(s);" \ - "return(*this==a);} " >> outfile - print pre "bool operator != (const QCString& s) {return !(*this == s);}\n" \ - >> outfile - print "virtual ~" name "();" >> outfile - print pre "void parse() " \ - "{if(!parsed_) _parse();parsed_=true;assembled_=false;}\n" \ - >> outfile - print pre "void assemble() " \ - "{if(assembled_) return;parse();_assemble();assembled_=true;}\n" \ - >> outfile - print pre "void _parse();" >> outfile - print pre "void _assemble();" >> outfile - print pre "const char * className() const { return \"" name "\"; }" \ - >> outfile - - print "\n// End of automatically generated code //" >> outfile -} - diff --git a/kabc/vcard/include/generated/headerBodies b/kabc/vcard/include/generated/headerBodies deleted file mode 100644 index 5e77b2b5e..000000000 --- a/kabc/vcard/include/generated/headerBodies +++ /dev/null @@ -1,34 +0,0 @@ -AdrParam Param -AdrValue Value -AgentParam Param -ContentLine Entity -DateParam Param -DateValue Value -EmailParam Param -GeoValue Value -Group Entity -ImageParam Param -ImageValue Value -LangValue Value -NValue Value -Param Entity -PhoneNumberValue Value -SourceParam Param -TelParam Param -TextParam Param -TextNSParam Param -TextValue Value -TextBinParam Param -URIValue Value -VCard Entity -VCardEntity Entity -Value Entity -SoundValue Value -AgentValue Value -TelValue Value -TextBinValue Value -OrgValue Value -UTCValue Value -ClassValue Value -FloatValue Value -TextListValue Value diff --git a/kabc/vcard/testread.cpp b/kabc/vcard/testread.cpp deleted file mode 100644 index 3a33c7d54..000000000 --- a/kabc/vcard/testread.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include -#include -#include - -#include -#include - -#include - -using namespace std; - -int main(int argc, char * argv[]) -{ - if (argc != 2) { - cerr << "Usage: " << argv[0] << " " << endl; - exit(1); - } - - TQFile f(argv[1]); - - TQCString str; - - if (!f.open(IO_ReadOnly)) { - cerr << "Couldn't open file \"" << argv[1] << endl; - exit(1); - } - - TQTextStream t(&f); - - while (!t.eof()) - str += t.readLine().utf8() + '\n'; - - using namespace VCARD; - - // Iterate through all vCards in the file. - - cout << "--------- begin ----------" << endl; - cout << str.data(); - cout << "--------- end ----------" << endl; - - VCardEntity e(str); - - VCardListIterator it(e.cardList()); - - for (; it.current(); ++it) { - - cerr << "****************** VCARD ********************" << endl; - - // Create a vcard using the string representation. - VCard & v (*it.current()); - - if (v.has(EntityEmail)) { - cerr << "Email parameter found" << endl; - - TQCString s = v.contentLine(EntityEmail)->value()->asString(); - - cerr << "Email value == " << s << endl; - } - - if (v.has(EntityNickname)) { - cerr << "Nickname parameter found" << endl; - - cerr << "Nickname value == " << - v.contentLine(EntityNickname)->value()->asString() << - endl; - } - - if (v.has(EntityRevision)) { - - cerr << "Revision parameter found" << endl; - - DateValue * d = - (DateValue *) - v.contentLine(EntityRevision)->value(); - - assert(d != 0); - - cerr << "Revision date: " << endl; - cerr << "Day : " << d->day() << endl; - cerr << "Month : " << d->month() << endl; - cerr << "Year : " << d->year() << endl; - - if (d->hasTime()) { - cerr << "Revision date has a time component" << endl; - cerr << "Revision time: " << endl; - cerr << "Hour : " << d->hour() << endl; - cerr << "Minute : " << d->minute() << endl; - cerr << "Second : " << d->second() << endl; - - } - else cerr << "Revision date does NOT have a time component" << endl; - } - - if (v.has(EntityURL)) { - cerr << "URL Parameter found" << endl; - - cerr << "URL Value == " << - v.contentLine(EntityURL)->value()->asString() << - endl; - - URIValue * urlVal = - (URIValue *)v.contentLine(EntityURL)->value(); - - assert(urlVal != 0); - - cerr << "URL scheme == " << - urlVal->scheme() << endl; - - cerr << "URL scheme specific part == " << - urlVal->schemeSpecificPart() << endl; - } - - if (v.has(EntityN)) { - cerr << "N Parameter found" << endl; - - NValue * n = - (NValue *)(v.contentLine(EntityN)->value()); - - cerr << "Family name == " << n->family() << endl; - cerr << "Given name == " << n->given() << endl; - cerr << "Middle name == " << n->middle() << endl; - cerr << "Prefix == " << n->prefix() << endl; - cerr << "Suffix == " << n->suffix() << endl; - } - - cerr << "***************** END VCARD ******************" << endl; - } -} - diff --git a/kabc/vcard/testwrite.cpp b/kabc/vcard/testwrite.cpp deleted file mode 100644 index 67f8eb20a..000000000 --- a/kabc/vcard/testwrite.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app; - - kdDebug() << "Test Write VCard" << endl; - - using namespace VCARD; - - VCard v; - - ContentLine cl1; - cl1.setName(EntityTypeToParamName(EntityName)); - cl1.setValue(new TextValue("Hans Wurst")); - v.add(cl1); - - ContentLine cl2; - cl2.setName(EntityTypeToParamName(EntityTelephone)); - cl2.setValue(new TelValue("12345")); - ParamList p; - p.append( new TelParam("home") ); - p.append( new TelParam("fax") ); - cl2.setParamList( p ); - v.add(cl2); - - TQCString str = v.asString(); - - kdDebug() << "--- VCard begin ---" << endl - << str - << "--- VCard end ---" << endl; -} diff --git a/kabc/vcard/vCard-all.cpp b/kabc/vcard/vCard-all.cpp deleted file mode 100644 index 07bbcd2bb..000000000 --- a/kabc/vcard/vCard-all.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "AdrParam.cpp" -#include "AdrValue.cpp" -#include "AgentParam.cpp" -#include "AgentValue.cpp" -#include "ClassValue.cpp" -#include "ContentLine.cpp" -#include "DateParam.cpp" -#include "DateValue.cpp" -#include "EmailParam.cpp" -#include "Entity.cpp" -#include "Enum.cpp" -#include "FloatValue.cpp" -#include "GeoValue.cpp" -#include "ImageParam.cpp" -#include "ImageValue.cpp" -#include "ImgValue.cpp" -#include "LangValue.cpp" -#include "NValue.cpp" -#include "OrgValue.cpp" -#include "Param.cpp" -#include "PhoneNumberValue.cpp" -#include "RToken.cpp" -#include "SoundValue.cpp" -#include "SourceParam.cpp" -#include "TelParam.cpp" -#include "TelValue.cpp" -#include "TextBinParam.cpp" -#include "TextBinValue.cpp" -#include "TextListValue.cpp" -#include "TextParam.cpp" -#include "TextValue.cpp" -#include "URIValue.cpp" -#include "UTCValue.cpp" -#include "VCard.cpp" -#include "VCardEntity.cpp" -#include "Value.cpp" - diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp deleted file mode 100644 index 8a3bfcaea..000000000 --- a/kabc/vcard21parser.cpp +++ /dev/null @@ -1,608 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Mark Westcott - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "vcard21parser.h" -#include "vcardconverter.h" - -using namespace KABC; - -bool VCardLineX::isValid() const -{ - // Invalid: if it is "begin:vcard" or "end:vcard" - if ( name == VCARD_BEGIN_N || name == VCARD_END_N ) - return false; - - if ( name[0] == 'x' && name[1] == '-' ) // A custom x- line - return true; - - // This is long but it makes it a bit faster (and saves me from using - // a tree which is probably the ideal situation, but a bit memory heavy) - switch( name[0] ) { - case 'a': - if ( name == VCARD_ADR && qualified && - (qualifiers.contains(VCARD_ADR_DOM) || - qualifiers.contains(VCARD_ADR_INTL) || - qualifiers.contains(VCARD_ADR_POSTAL) || - qualifiers.contains(VCARD_ADR_HOME) || - qualifiers.contains(VCARD_ADR_WORK) || - qualifiers.contains(VCARD_ADR_PREF) - ) ) - return true; - - if ( name == VCARD_AGENT ) - return true; - break; - - case 'b': - if ( name == VCARD_BDAY ) - return true; - break; - - case 'c': - if ( name == VCARD_CATEGORIES ) - return true; - if ( name == VCARD_CLASS && qualified && - (qualifiers.contains(VCARD_CLASS_PUBLIC) || - qualifiers.contains(VCARD_CLASS_PRIVATE) || - qualifiers.contains(VCARD_CLASS_CONFIDENTIAL) - ) ) - return true; - break; - - case 'e': - if ( name == VCARD_EMAIL && qualified && - (qualifiers.contains(VCARD_EMAIL_INTERNET) || - qualifiers.contains(VCARD_EMAIL_PREF) || - qualifiers.contains(VCARD_EMAIL_X400) - ) ) - return true; - break; - - case 'f': - if ( name == VCARD_FN ) - return true; - break; - - case 'g': - if ( name == VCARD_GEO ) - return true; - break; - - case 'k': - if ( name == VCARD_KEY && qualified && - (qualifiers.contains(VCARD_KEY_X509) || - qualifiers.contains(VCARD_KEY_PGP) - ) ) - return true; - break; - - case 'l': - if ( name == VCARD_LABEL ) - return true; - if ( name == VCARD_LOGO ) - return true; - break; - - case 'm': - if ( name == VCARD_MAILER ) - return true; - break; - - case 'n': - if ( name == VCARD_N ) - return true; - if ( name == VCARD_NAME ) - return true; - if ( name == VCARD_NICKNAME ) - return true; - if ( name == VCARD_NOTE ) - return true; - break; - - case 'o': - if ( name == VCARD_ORG ) - return true; - break; - - case 'p': - if ( name == VCARD_PHOTO ) - return true; - if ( name == VCARD_PROFILE ) - return true; - if ( name == VCARD_PRODID ) - return true; - break; - - case 'r': - if ( name == VCARD_ROLE ) - return true; - if ( name == VCARD_REV ) - return true; - break; - - case 's': - if ( name == VCARD_SOURCE ) - return true; - if ( name == VCARD_SOUND ) - return true; - break; - - case 't': - if ( name == VCARD_TEL && qualified && - (qualifiers.contains(VCARD_TEL_HOME) || - qualifiers.contains(VCARD_TEL_WORK) || - qualifiers.contains(VCARD_TEL_PREF) || - qualifiers.contains(VCARD_TEL_VOICE) || - qualifiers.contains(VCARD_TEL_FAX) || - qualifiers.contains(VCARD_TEL_MSG) || - qualifiers.contains(VCARD_TEL_CELL) || - qualifiers.contains(VCARD_TEL_PAGER) || - qualifiers.contains(VCARD_TEL_BBS) || - qualifiers.contains(VCARD_TEL_MODEM) || - qualifiers.contains(VCARD_TEL_CAR) || - qualifiers.contains(VCARD_TEL_ISDN) || - qualifiers.contains(VCARD_TEL_VIDEO) || - qualifiers.contains(VCARD_TEL_PCS) - ) ) - return true; - if ( name == VCARD_TZ ) - return true; - if ( name == VCARD_TITLE ) - return true; - break; - - case 'u': - if ( name == VCARD_URL ) - return true; - if ( name == VCARD_UID ) - return true; - break; - - case 'v': - if ( name == VCARD_VERSION ) - return true; - break; - default: - break; - } - - return false; -} - - -VCard21Parser::VCard21Parser() -{ -} - -VCard21Parser::~VCard21Parser() -{ -} - -void VCard21Parser::readFromString(KABC::AddressBook *addressbook, const TQString &data) -{ - KABC::Addressee mAddressee = readFromString(data); - addressbook->insertAddressee(mAddressee); -} - -KABC::Addressee VCard21Parser::readFromString( const TQString &data) -{ - KABC::Addressee addressee; - VCard21ParserImpl *vCard = VCard21ParserImpl::parseVCard(data); - TQString tmpStr; - - // Check if parsing failed - if (vCard == 0) - { - kdDebug() << "Parsing failed" << endl; - return addressee; - } - //set the addressees name and formated name - TQStringList tmpList = vCard->getValues(VCARD_N); - TQString formattedName = ""; - if (tmpList.count() > 0) - addressee.setFamilyName(tmpList[0]); - if (tmpList.count() > 1) - addressee.setGivenName(tmpList[1]); - if (tmpList.count() > 2) - addressee.setAdditionalName(tmpList[2]); - if (tmpList.count() > 3) - addressee.setPrefix(tmpList[3]); - if (tmpList.count() > 4) - addressee.setSuffix(tmpList[4]); - - tmpStr = (vCard->getValue(VCARD_FN)); - if (!tmpStr.isEmpty()) - addressee.setFormattedName(tmpStr); - - //set the addressee's nick name - tmpStr = vCard->getValue(VCARD_NICKNAME); - addressee.setNickName(tmpStr); - //set the addressee's organization - tmpStr = vCard->getValue(VCARD_ORG); - addressee.setOrganization(tmpStr); - //set the addressee's title - tmpStr = vCard->getValue(VCARD_TITLE); - addressee.setTitle(tmpStr); - //set the addressee's email - we can only deal with two. The preferenced one and one other. - tmpStr = vCard->getValue(VCARD_EMAIL, VCARD_EMAIL_INTERNET); - addressee.insertEmail(tmpStr, false); - tmpStr = vCard->getValue(VCARD_EMAIL,VCARD_EMAIL_PREF); - addressee.insertEmail(tmpStr, true); - //set the addressee's url - tmpStr = vCard->getValue(VCARD_URL); - if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_WORK); - if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_HOME); - if (!tmpStr.isEmpty()) { - addressee.setUrl(KURL(tmpStr)); - } - - //set the addressee's birthday - tmpStr = vCard->getValue(VCARD_BDAY); - addressee.setBirthday(VCardStringToDate(tmpStr)); - - //set the addressee's phone numbers - for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { - if ( (*i).name == VCARD_TEL ) { - int type = 0; - if ( (*i).qualified ) { - if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) - type |= PhoneNumber::Home; - if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) - type |= PhoneNumber::Work; - if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) - type |= PhoneNumber::Pref; - // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) - // type |= PhoneNumber::Voice; - if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) - type |= PhoneNumber::Fax; - if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) - type |= PhoneNumber::Msg; - if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) - type |= PhoneNumber::Cell; - if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) - type |= PhoneNumber::Pager; - if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) - type |= PhoneNumber::Bbs; - if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) - type |= PhoneNumber::Modem; - if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) - type |= PhoneNumber::Car; - if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) - type |= PhoneNumber::Isdn; - if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) - type |= PhoneNumber::Video; - if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) - type |= PhoneNumber::Pcs; - } - addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); - } - } - - //set the addressee's addresses - for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { - if ( (*i).name == VCARD_ADR ) { - int type = 0; - if ( (*i).qualified ) { - if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) - type |= Address::Dom; - if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) - type |= Address::Intl; - if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) - type |= Address::Postal; - if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) - type |= Address::Parcel; - if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) - type |= Address::Home; - if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) - type |= Address::Work; - if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) - type |= Address::Pref; - } - addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); - } - } - - //set the addressee's delivery label - tmpStr = vCard->getValue(VCARD_LABEL); - if (!tmpStr.isEmpty()) { - tmpStr.replace("\r\n","\n"); - Address tmpAddress; - tmpAddress.setLabel(tmpStr); - addressee.insertAddress(tmpAddress); - } - - //set the addressee's notes - tmpStr = vCard->getValue(VCARD_NOTE); - tmpStr.replace("\r\n","\n"); - addressee.setNote(tmpStr); - - //set the addressee's timezone - tmpStr = vCard->getValue(VCARD_TZ); - TimeZone tmpZone(tmpStr.toInt()); - addressee.setTimeZone(tmpZone); - - //set the addressee's geographical position - tmpList = vCard->getValues(VCARD_GEO); - if (tmpList.count()==2) - { - tmpStr = tmpList[0]; - float glat = tmpStr.toFloat(); - tmpStr = tmpList[1]; - float glong = tmpStr.toFloat(); - Geo tmpGeo(glat,glong); - addressee.setGeo(tmpGeo); - } - - //set the last revision date - tmpStr = vCard->getValue(VCARD_REV); - addressee.setRevision(VCardStringToDate(tmpStr)); - - //set the role of the addressee - tmpStr = vCard->getValue(VCARD_ROLE); - addressee.setRole(tmpStr); - - delete vCard; - - return addressee; -} - - - -KABC::Address VCard21Parser::readAddressFromQStringList ( const TQStringList &data, const int type ) -{ - KABC::Address mAddress; - mAddress.setType( type ); - - if ( data.count() > 0 ) - mAddress.setPostOfficeBox( data[0] ); - if ( data.count() > 1 ) - mAddress.setExtended( data[1] ); - if ( data.count() > 2 ) - mAddress.setStreet( data[2] ); - if ( data.count() > 3 ) - mAddress.setLocality( data[3] ); - if ( data.count() > 4 ) - mAddress.setRegion( data[4] ); - if ( data.count() > 5 ) - mAddress.setPostalCode( data[5] ); - if ( data.count() > 6 ) - mAddress.setCountry( data[6] ); - - return mAddress; -} - - -VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err ) -{ - int _err = 0; - int _state = VC_STATE_BEGIN; - - TQValueList *vcdata; - TQValueList lines; - - vcdata = new TQValueList; - - lines = TQStringList::split( TQRegExp( "[\x0d\x0a]" ), vc ); - - // for each line in the vCard - for ( TQStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) { - VCardLineX _vcl; - - // take spaces off the end - ugly but necessary hack - for ( int g = (*j).length()-1; g > 0 && (*j)[g].isSpace(); --g ) - (*j)[g] = 0; - - // first token: - // verify state, update if necessary - if ( _state & VC_STATE_BEGIN) { - if ( !tqstricmp( (*j).latin1(), VCARD_BEGIN ) ) { - _state = VC_STATE_BODY; - continue; - } else { - _err = VC_ERR_NO_BEGIN; - break; - } - } else if ( _state & VC_STATE_BODY ) { - if ( !tqstricmp( (*j).latin1(), VCARD_END ) ) { - _state |= VC_STATE_END; - break; - } - - // split into two tokens - int colon = (*j).find( ':' ); - if ( colon < 0 ) { - _err = VC_ERR_INVALID_LINE; - break; - } - - TQString key = (*j).left( colon ); - TQString value = (*j).mid( colon + 1 ); - - // check for qualifiers and - // set name, qualified, qualifier(s) - TQStringList keyTokens = TQStringList::split( ';', key ); - bool qp = false, first_pass = true; - bool b64 = false; - - if ( keyTokens.count() > 0 ) { - _vcl.qualified = false; - _vcl.name = keyTokens[ 0 ].lower(); - - for ( TQStringList::Iterator z = keyTokens.begin(); z != keyTokens.end(); ++z ) { - TQString zz = (*z).lower(); - if ( zz == VCARD_QUOTED_PRINTABLE || zz == VCARD_ENCODING_QUOTED_PRINTABLE ) { - qp = true; - } else if ( zz == VCARD_BASE64 ) { - b64 = true; - } else if ( !first_pass ) { - _vcl.qualified = true; - _vcl.qualifiers.append( zz ); - } - first_pass = false; - } - } else { - _err = VC_ERR_INVALID_LINE; - } - - if ( _err != 0 ) - break; - - if ( _vcl.name == VCARD_VERSION ) - _state |= VC_STATE_HAVE_VERSION; - - if ( _vcl.name == VCARD_N || _vcl.name == VCARD_FN ) - _state |= VC_STATE_HAVE_N; - - // second token: - // split into tokens by ; - // add to parameters vector - if ( b64 ) { - if ( value[ value.length() - 1 ] != '=' ) - do { - value += *( ++j ); - } while ( (*j)[ (*j).length() - 1 ] != '=' ); - } else { - if ( qp ) { // join any split lines - while ( value[ value.length() - 1 ] == '=' ) { - value.remove( value.length() - 1, 1 ); - value.append(*( ++j )); - } - } - _vcl.parameters = TQStringList::split( ';', value, true ); - if ( qp ) { // decode the quoted printable - for ( TQStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) - *z = KCodecs::quotedPrintableDecode( TQCString((*z).latin1()) ); - } - } - } else { - _err = VC_ERR_INTERNAL; - break; - } - - // validate VCardLineX - if ( !_vcl.isValid() ) { - _err = VC_ERR_INVALID_LINE; - break; - } - - // add to vector - vcdata->append( _vcl ); - } - - // errors to check at the last minute (exit state related) - if ( _err == 0 ) { - if ( !( _state & VC_STATE_END ) ) // we have to have an end!! - _err = VC_ERR_NO_END; - - if ( !( _state & VC_STATE_HAVE_N ) || // we have to have the mandatories! - !( _state & VC_STATE_HAVE_VERSION ) ) - _err = VC_ERR_MISSING_MANDATORY; - } - - // set the error message if we can, and only return an object - // if the vCard was valid. - if ( err ) - *err = _err; - - if ( _err != 0 ) { - delete vcdata; - return 0; - } - - return new VCard21ParserImpl( vcdata ); -} - -VCard21ParserImpl::VCard21ParserImpl() - : _vcdata( 0 ) -{ -} - -VCard21ParserImpl::VCard21ParserImpl(TQValueList *_vcd) - : _vcdata(_vcd) -{ -} - -VCard21ParserImpl::~VCard21ParserImpl() -{ - delete _vcdata; - _vcdata = 0; -} - -TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& qualifier) -{ - TQString failed; - const TQString lowname = name.lower(); - const TQString lowqualifier = qualifier.lower(); - - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { - if ((*i).parameters.count() > 0) - return (*i).parameters[0]; - else return failed; - } - } - return failed; -} - - -TQString VCard21ParserImpl::getValue(const TQString& name) -{ - TQString failed; - const TQString lowname = name.lower(); - - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && !(*i).qualified) { - if ((*i).parameters.count() > 0) - return (*i).parameters[0]; - else return failed; - } - } - return failed; -} - - -TQStringList VCard21ParserImpl::getValues(const TQString& name) -{ - const TQString lowname = name.lower(); - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && !(*i).qualified) - return (*i).parameters; - } - // failed. - return TQStringList(); -} - -TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& qualifier) -{ - const TQString lowname = name.lower(); - const TQString lowqualifier = qualifier.lower(); - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) - return (*i).parameters; - } - // failed. - return TQStringList(); -} - - diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h deleted file mode 100644 index 0eb66fa93..000000000 --- a/kabc/vcard21parser.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2002 Mark Westcott - Copyright (c) 2000 George Staikos - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARD21FORMAT_H -#define KABC_VCARD21FORMAT_H - -#include -#include -#include -#include -#include -#include - -#include "addressee.h" -#include "addressbook.h" -#include "phonenumber.h" - - -#define VCARD_BEGIN "begin:vcard" -#define VCARD_END "end:vcard" -#define VCARD_BEGIN_N "begin" -#define VCARD_END_N "end" -#define VCARD_VERSION "version" - -#define VCARD_FN "fn" -#define VCARD_N "n" - -// optional -#define VCARD_NAME "name" -#define VCARD_NICKNAME "nickname" -#define VCARD_PHOTO "photo" -#define VCARD_BDAY "bday" -#define VCARD_ADR "adr" - -// types -#define VCARD_ADR_DOM "dom" -#define VCARD_ADR_INTL "intl" -#define VCARD_ADR_POSTAL "postal" -#define VCARD_ADR_PARCEL "parcel" -#define VCARD_ADR_HOME "home" -#define VCARD_ADR_WORK "work" -#define VCARD_ADR_PREF "pref" -// values -#define VCARD_ADR_POBOX "PO Box" -#define VCARD_ADR_EXTADR "Extended Address" -#define VCARD_ADR_STREET "Street" -#define VCARD_ADR_LOCALITY "Locality" -#define VCARD_ADR_REGION "Region" -#define VCARD_ADR_POSTCODE "Postal Code" -#define VCARD_ADR_COUNTRY "Country Name" -#define VCARD_LABEL "label" -#define VCARD_PROFILE "profile" -#define VCARD_SOURCE "source" -#define VCARD_TEL "tel" -// types -#define VCARD_TEL_HOME "home" -#define VCARD_TEL_WORK "work" -#define VCARD_TEL_PREF "pref" -#define VCARD_TEL_VOICE "voice" -#define VCARD_TEL_FAX "fax" -#define VCARD_TEL_MSG "msg" -#define VCARD_TEL_CELL "cell" -#define VCARD_TEL_PAGER "pager" -#define VCARD_TEL_BBS "bbs" -#define VCARD_TEL_MODEM "modem" -#define VCARD_TEL_CAR "car" -#define VCARD_TEL_ISDN "isdn" -#define VCARD_TEL_VIDEO "video" -#define VCARD_TEL_PCS "pcs" -#define VCARD_EMAIL "email" -// types -#define VCARD_EMAIL_PREF "pref" -#define VCARD_EMAIL_INTERNET "internet" -#define VCARD_EMAIL_X400 "x400" -#define VCARD_TZ "tz" -#define VCARD_GEO "geo" -#define VCARD_MAILER "mailer" -#define VCARD_TITLE "title" -#define VCARD_ROLE "role" -#define VCARD_LOGO "logo" -#define VCARD_AGENT "agent" -#define VCARD_ORG "org" -#define VCARD_CATEGORIES "categories" -#define VCARD_NOTE "note" -#define VCARD_PRODID "prodid" -#define VCARD_REV "rev" -#define VCARD_SOUND "sound" -#define VCARD_UID "uid" -#define VCARD_URL "url" -#define VCARD_CLASS "class" -#define VCARD_CLASS_PUBLIC "public" -#define VCARD_CLASS_PRIVATE "private" -#define VCARD_CLASS_CONFIDENTIAL "confidential" -#define VCARD_KEY "key" -// types -#define VCARD_KEY_X509 "x509" -#define VCARD_KEY_PGP "pgp" - -#define VCARD_QUOTED_PRINTABLE "quoted-printable" -// this one is a temporary hack until we support TYPE=VALUE -#define VCARD_ENCODING_QUOTED_PRINTABLE "encoding=quoted-printable" -#define VCARD_BASE64 "base64" - -#define VC_STATE_BEGIN 1 -#define VC_STATE_BODY 2 -#define VC_STATE_END 4 -#define VC_STATE_HAVE_N 8 -#define VC_STATE_HAVE_VERSION 16 - -#define VC_ERR_NO_BEGIN 1 -#define VC_ERR_NO_END 2 -#define VC_ERR_INVALID_LINE 3 -#define VC_ERR_INTERNAL 4 -#define VC_ERR_INVALID_NAME 5 -#define VC_ERR_MISSING_MANDATORY 6 - -namespace KABC { - -class AddressBook; - -/** - @deprecated use VCardConverter instead. - */ -class KABC_EXPORT_DEPRECATED VCard21Parser -{ -public: - - /** - * Constructor. - */ - VCard21Parser(); - - /** - * Destructor. - */ - virtual ~VCard21Parser(); - - /** - * Parses a string in vcard2.1 format and saves the single addressees - * to the address book. - * - * @param ab The address book. - * @param str The vcard string. - */ - void readFromString( KABC::AddressBook *ab, const TQString &str ); - - /** - * FIXME: we need a writeToString method - * TQString writeToString (KABC::AddressBook *); - */ - - /** - * Parses a string in vcard2.1 format and returns the inherent addressee. - */ - KABC::Addressee readFromString( const TQString &data); - - /** - * Helper method to store a address. - * - * @param data A string list, that is filled with 'street', 'house number' ... - * @param type The type of the returned address. - */ - static KABC::Address readAddressFromQStringList (const TQStringList &data, const int type); -}; - -} - -/** - * @short Helper class - */ -class KABC_EXPORT VCardLineX -{ -public: - TQString name; - bool qualified; - TQValueList qualifiers; - TQValueList parameters; - bool isValid() const; -}; - -/** - * @short Helper class - */ -class KABC_EXPORT VCard21ParserImpl -{ - friend class VCardLineX; - -public: - VCard21ParserImpl(); - virtual ~VCard21ParserImpl(); - static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = NULL); - TQString getValue(const TQString& name, const TQString& qualifier); - TQString getValue(const TQString& name); - TQStringList getValues(const TQString& name, const TQString& qualifier); - TQStringList getValues(const TQString& name); - - TQValueList *_vcdata; - -private: - VCard21ParserImpl (TQValueList *_vcd); -}; - -#endif diff --git a/kabc/vcardconverter.cpp b/kabc/vcardconverter.cpp deleted file mode 100644 index d575b019c..000000000 --- a/kabc/vcardconverter.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcard21parser.h" -#include "vcardformatimpl.h" -#include "vcardtool.h" - -#include "vcardconverter.h" - -using namespace KABC; - -struct VCardConverter::VCardConverterData -{ - VCard21Parser vcard21parser; - VCardFormatImpl vcard30parser; -}; - -VCardConverter::VCardConverter() - : d( new VCardConverterData ) -{ -} - -VCardConverter::~VCardConverter() -{ - delete d; - d = 0; -} - -TQString VCardConverter::createVCard( const Addressee &addr, Version version ) -{ - Addressee::List list; - list.append( addr ); - - return createVCards( list, version ); -} - -TQString VCardConverter::createVCards( Addressee::List list, Version version ) -{ - VCardTool tool; - - return tool.createVCards( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) ); -} - -Addressee VCardConverter::parseVCard( const TQString& vcard ) -{ - Addressee::List list = parseVCards( vcard ); - - return list[ 0 ]; -} - -Addressee::List VCardConverter::parseVCards( const TQString& vcard ) -{ - VCardTool tool; - - return tool.parseVCards( vcard ); -} - -// ---------------------------- deprecated stuff ---------------------------- // - -bool VCardConverter::vCardToAddressee( const TQString &str, Addressee &addr, Version version ) -{ - if ( version == v2_1 ) { - addr = d->vcard21parser.readFromString( str ); - return true; - } - - if ( version == v3_0 ) - return d->vcard30parser.readFromString( str, addr ); - - return false; -} - -bool VCardConverter::addresseeToVCard( const Addressee &addr, TQString &str, Version version ) -{ - if ( version == v2_1 ) - return false; - - if ( version == v3_0 ) - return d->vcard30parser.writeToString( addr, str ); - - return false; -} - - -/* Helper functions */ - -TQString KABC::dateToVCardString( const TQDateTime &dateTime ) -{ - return dateTime.toString("yyyyMMddThhmmssZ"); -} - -TQString KABC::dateToVCardString( const TQDate &date ) -{ - return date.toString("yyyyMMdd"); -} - -TQDateTime KABC::VCardStringToDate( const TQString &dateString ) -{ - TQDate date; - TQTime time; - TQString d( dateString ); - - d = d.remove('-').remove(':'); - - if (d.length()>=8) - date = TQDate( d.mid(0,4).toUInt(), d.mid(4,2).toUInt(), d.mid(6,2).toUInt() ); - if (d.length()>9 && d[8].upper()=='T') - time = TQTime( d.mid(9,2).toUInt(), d.mid(11,2).toUInt(), d.mid(13,2).toUInt() ); - - return TQDateTime( date, time ); -} - diff --git a/kabc/vcardconverter.h b/kabc/vcardconverter.h deleted file mode 100644 index ab09279f2..000000000 --- a/kabc/vcardconverter.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDCONVERTER_H -#define KABC_VCARDCONVERTER_H - -#include - -#include "addressee.h" - -namespace KABC { - -/** - @short Class to converting contact objects into vCard format and vice versa. - - This class implements reading and writing of contact using from/to the - vCard format. Currently vCard version 2.1 and 3.0 is supported. - - Example: - - \code - - TQFile file( "myfile.vcf" ); - file.open( IO_ReadOnly ); - - TQString data = file.readAll(); - - VCardConverter converter; - Addressee::List list = converter.parseVCards( data ); - - // print formatted name of first contact - tqDebug( "name=%s", list[ 0 ].formattedName().latin1() ); - - \endcode -*/ -class KABC_EXPORT VCardConverter -{ - public: - - /** - @li v2_1 - VCard format version 2.1 - @li v3_0 - VCard format version 3.0 - */ - enum Version - { - v2_1, - v3_0 - }; - - /** - Constructor. - */ - VCardConverter(); - - /** - Destructor. - */ - ~VCardConverter(); - - /** - Creates a string in vCard format which contains the given - contact. - - @param addr The contact object - @param version The version of the generated vCard format - */ - TQString createVCard( const Addressee &addr, Version version = v3_0 ); - - /** - Creates a string in vCard format which contains the given - list of contact. - - @param list The list of contact objects - @param version The version of the generated vCard format - */ - // FIXME: Add error handling - TQString createVCards( Addressee::List list, Version version = v3_0 ); - - // FIXME: Add "createVCards( AddressBook * )" - - /** - Parses a string in vCard format and returns the first contact. - */ - Addressee parseVCard( const TQString& vcard ); - - /** - Parses a string in vCard format and returns a list of contact objects. - */ - // FIXME: Add error handling - Addressee::List parseVCards( const TQString& vcard ); - - // FIXME: Add "bool parseVCards( AddressBook *, const TQString &vcard )" - - /** - @deprecated - */ - bool vCardToAddressee( const TQString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED; - - /** - @deprecated - */ - bool addresseeToVCard( const Addressee&, TQString&, Version version = v3_0 ) KDE_DEPRECATED; - - private: - /** - Split a string and replaces escaped separators on the fly with - unescaped ones. - */ - TQStringList splitString( const TQChar &sep, const TQString &value ); - - struct VCardConverterData; - VCardConverterData *d; -}; - - -/** - Helper functions - */ - -/** - * Converts a TQDateTime to a date string as it is used in VCard and LDIF files. - * The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z") - * @param dateTime date and time to be converted - * @since 3.2 - */ -KABC_EXPORT TQString dateToVCardString( const TQDateTime &dateTime ); - -/** - * Converts a TQDate to a short date string as it is used in VCard and LDIF files. - * The return value is in the form "yyyyMMdd" (e.g. "20031201") - * @param date date to be converted - * @since 3.2 - */ -KABC_EXPORT TQString dateToVCardString( const TQDate &date ); - -/** - * Converts a date string as it is used in VCard and LDIF files to a TQDateTime value. - * If the date string does not contain a time value, it will be returned as 00:00:00. - * (e.g. "20031201T120000" will return a TQDateTime for 2003-12-01 at 12:00) - * @param dateString string representing the date and time. - * @since 3.2 - */ -KABC_EXPORT TQDateTime VCardStringToDate( const TQString &dateString ); - -} -#endif diff --git a/kabc/vcardformat.cpp b/kabc/vcardformat.cpp deleted file mode 100644 index 147aa4259..000000000 --- a/kabc/vcardformat.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcardformatimpl.h" - -#include "vcardformat.h" - -using namespace KABC; - -VCardFormat::VCardFormat() -{ - mImpl = new VCardFormatImpl; -} - -VCardFormat::~VCardFormat() -{ - delete mImpl; -} - -bool VCardFormat::load( AddressBook *addressBook, const TQString &fileName ) -{ - TQFile f( fileName ); - if ( !f.open( IO_ReadOnly ) ) return false; - - bool result = mImpl->loadAll( addressBook, 0, &f ); - - f.close(); - - return result; -} - -bool VCardFormat::save( AddressBook *addressBook, const TQString &fileName ) -{ - TQFile f( fileName ); - if ( !f.open( IO_WriteOnly ) ) return false; - - mImpl->saveAll( addressBook, 0, &f ); - - f.close(); - - return true; -} diff --git a/kabc/vcardformat.h b/kabc/vcardformat.h deleted file mode 100644 index 8194056cb..000000000 --- a/kabc/vcardformat.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_VCARDFORMAT_H -#define KABC_VCARDFORMAT_H - -#include - -#include "format.h" - -namespace KABC { - -class AddressBook; -class VCardFormatImpl; - -/** - @deprecated use VCardFormatPlugin instead. - */ -class KABC_EXPORT_DEPRECATED VCardFormat : public Format { - public: - VCardFormat(); - virtual ~VCardFormat(); - - bool load( AddressBook *, const TQString &fileName ); - bool save( AddressBook *, const TQString &fileName ); - - private: - VCardFormatImpl *mImpl; -}; - -} - -#endif diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp deleted file mode 100644 index ebaf337b0..000000000 --- a/kabc/vcardformatimpl.cpp +++ /dev/null @@ -1,1001 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include -#include - -#include -#include -#include -#include - -#include - -#include "addressbook.h" -#include "vcardformatimpl.h" - -using namespace KABC; -using namespace VCARD; - -bool VCardFormatImpl::load( Addressee &addressee, TQFile *file ) -{ - kdDebug(5700) << "VCardFormat::load()" << endl; - - TQByteArray fdata = file->readAll(); - TQCString data(fdata.data(), fdata.size()+1); - - VCardEntity e( data ); - - VCardListIterator it( e.cardList() ); - - if ( it.current() ) { - VCARD::VCard v(*it.current()); - loadAddressee( addressee, v ); - return true; - } - - return false; -} - -bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, TQFile *file ) -{ - kdDebug(5700) << "VCardFormat::loadAll()" << endl; - - TQByteArray fdata = file->readAll(); - TQCString data(fdata.data(), fdata.size()+1); - - VCardEntity e( data ); - - VCardListIterator it( e.cardList() ); - - for (; it.current(); ++it) { - VCARD::VCard v(*it.current()); - Addressee addressee; - loadAddressee( addressee, v ); - addressee.setResource( resource ); - addressBook->insertAddressee( addressee ); - } - - return true; -} - -void VCardFormatImpl::save( const Addressee &addressee, TQFile *file ) -{ - VCardEntity vcards; - VCardList vcardlist; - vcardlist.setAutoDelete( true ); - - VCARD::VCard *v = new VCARD::VCard; - - saveAddressee( addressee, v, false ); - - vcardlist.append( v ); - vcards.setCardList( vcardlist ); - - TQCString vcardData = vcards.asString(); - file->writeBlock( (const char*)vcardData, vcardData.length() ); -} - -void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, TQFile *file ) -{ - VCardEntity vcards; - VCardList vcardlist; - vcardlist.setAutoDelete( true ); - - AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { - if ( (*it).resource() == resource ) { - VCARD::VCard *v = new VCARD::VCard; - saveAddressee( (*it), v, false ); - (*it).setChanged( false ); - vcardlist.append( v ); - } - } - - vcards.setCardList( vcardlist ); - - TQCString vcardData = vcards.asString(); - file->writeBlock( (const char*)vcardData, vcardData.length() ); -} - -bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v ) -{ - TQPtrList contentLines = v.contentLineList(); - ContentLine *cl; - - for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - TQCString n = cl->name(); - if ( n.left( 2 ) == "X-" ) { - n = n.mid( 2 ); - int posDash = n.find( "-" ); - addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ), - TQString::fromUtf8( n.mid( posDash + 1 ) ), - TQString::fromUtf8( cl->value()->asString() ) ); - continue; - } - - EntityType type = cl->entityType(); - switch( type ) { - - case EntityUID: - addressee.setUid( readTextValue( cl ) ); - break; - - case EntityURI: - addressee.setUri( readTextValue( cl ) ); - break; - - case EntityEmail: - addressee.insertEmail( readTextValue( cl ) ); - break; - - case EntityName: - addressee.setName( readTextValue( cl ) ); - break; - - case EntityFullName: - addressee.setFormattedName( readTextValue( cl ) ); - break; - - case EntityURL: - addressee.setUrl( KURL( readTextValue( cl ) ) ); - break; - - case EntityNickname: - addressee.setNickName( readTextValue( cl ) ); - break; - - case EntityLabel: - // not yet supported by kabc - break; - - case EntityMailer: - addressee.setMailer( readTextValue( cl ) ); - break; - - case EntityTitle: - addressee.setTitle( readTextValue( cl ) ); - break; - - case EntityRole: - addressee.setRole( readTextValue( cl ) ); - break; - - case EntityOrganisation: - addressee.setOrganization( readTextValue( cl ) ); - break; - - case EntityNote: - addressee.setNote( readTextValue( cl ) ); - break; - - case EntityProductID: - addressee.setProductId( readTextValue( cl ) ); - break; - - case EntitySortString: - addressee.setSortString( readTextValue( cl ) ); - break; - - case EntityN: - readNValue( cl, addressee ); - break; - - case EntityAddress: - addressee.insertAddress( readAddressValue( cl ) ); - break; - - case EntityTelephone: - addressee.insertPhoneNumber( readTelephoneValue( cl ) ); - break; - - case EntityCategories: - addressee.setCategories( TQStringList::split( ",", readTextValue( cl ) ) ); - break; - - case EntityBirthday: - addressee.setBirthday( readDateValue( cl ) ); - break; - - case EntityRevision: - addressee.setRevision( readDateTimeValue( cl ) ); - break; - - case EntityGeo: - addressee.setGeo( readGeoValue( cl ) ); - break; - - case EntityTimeZone: - addressee.setTimeZone( readUTCValue( cl ) ); - break; - - case EntityVersion: - break; - - case EntityClass: - addressee.setSecrecy( readClassValue( cl ) ); - break; - - case EntityKey: - addressee.insertKey( readKeyValue( cl ) ); - break; - - case EntityPhoto: - addressee.setPhoto( readPictureValue( cl, EntityPhoto, addressee ) ); - break; - - case EntityLogo: - addressee.setLogo( readPictureValue( cl, EntityLogo, addressee ) ); - break; - - case EntityAgent: - addressee.setAgent( readAgentValue( cl ) ); - break; - - case EntitySound: - addressee.setSound( readSoundValue( cl, addressee ) ); - break; - - default: - kdDebug(5700) << "VCardFormat::load(): Unsupported entity: " - << int( type ) << ": " << cl->asString() << endl; - break; - } - } - - for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - EntityType type = cl->entityType(); - if ( type == EntityLabel ) { - int type = readAddressParam( cl ); - Address address = addressee.address( type ); - if ( address.isEmpty() ) - address.setType( type ); - - address.setLabel( TQString::fromUtf8( cl->value()->asString() ) ); - addressee.insertAddress( address ); - } - } - - return true; -} - -void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v, bool intern ) -{ - ContentLine cl; - TQString value; - - addTextValue( v, EntityName, addressee.name() ); - addTextValue( v, EntityUID, addressee.uid() ); - addTextValue( v, EntityURI, addressee.uri() ); - addTextValue( v, EntityFullName, addressee.formattedName() ); - - TQStringList emails = addressee.emails(); - TQStringList::ConstIterator it4; - for( it4 = emails.begin(); it4 != emails.end(); ++it4 ) { - addTextValue( v, EntityEmail, *it4 ); - } - - TQStringList customs = addressee.customs(); - TQStringList::ConstIterator it5; - for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { - addCustomValue( v, *it5 ); - } - - addTextValue( v, EntityURL, addressee.url().url() ); - - addNValue( v, addressee ); - - addTextValue( v, EntityNickname, addressee.nickName() ); - addTextValue( v, EntityMailer, addressee.mailer() ); - addTextValue( v, EntityTitle, addressee.title() ); - addTextValue( v, EntityRole, addressee.role() ); - addTextValue( v, EntityOrganisation, addressee.organization() ); - addTextValue( v, EntityNote, addressee.note() ); - addTextValue( v, EntityProductID, addressee.productId() ); - addTextValue( v, EntitySortString, addressee.sortString() ); - - Address::List addresses = addressee.addresses(); - Address::List::ConstIterator it3; - for( it3 = addresses.begin(); it3 != addresses.end(); ++it3 ) { - addAddressValue( v, *it3 ); - addLabelValue( v, *it3 ); - } - - PhoneNumber::List phoneNumbers = addressee.phoneNumbers(); - PhoneNumber::List::ConstIterator it2; - for( it2 = phoneNumbers.begin(); it2 != phoneNumbers.end(); ++it2 ) { - addTelephoneValue( v, *it2 ); - } - - Key::List keys = addressee.keys(); - Key::List::ConstIterator it6; - for( it6 = keys.begin(); it6 != keys.end(); ++it6 ) { - addKeyValue( v, *it6 ); - } - - addTextValue( v, EntityCategories, addressee.categories().join(",") ); - - addDateValue( v, EntityBirthday, TQT_TQDATE_OBJECT(addressee.birthday().date()) ); - addDateTimeValue( v, EntityRevision, TQT_TQDATETIME_OBJECT(addressee.revision()) ); - addGeoValue( v, addressee.geo() ); - addUTCValue( v, addressee.timeZone() ); - - addClassValue( v, addressee.secrecy() ); - - addPictureValue( v, EntityPhoto, addressee.photo(), addressee, intern ); - addPictureValue( v, EntityLogo, addressee.logo(), addressee, intern ); - - addAgentValue( v, addressee.agent() ); - - addSoundValue( v, addressee.sound(), addressee, intern ); -} - -void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt ) -{ - if ( txt.isEmpty() ) return; - - ContentLine cl; - cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() ); - TQString value = txt.mid( txt.find( ":" ) + 1 ); - if ( value.isEmpty() ) - return; - cl.setValue( new TextValue( value.utf8() ) ); - v->add(cl); -} - -void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const TQString &txt ) -{ - if ( txt.isEmpty() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - cl.setValue( new TextValue( txt.utf8() ) ); - v->add(cl); -} - -void VCardFormatImpl::addDateValue( VCARD::VCard *vcard, EntityType type, - const TQDate &date ) -{ - if ( !date.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - - DateValue *v = new DateValue( date ); - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addDateTimeValue( VCARD::VCard *vcard, EntityType type, - const TQDateTime &dateTime ) -{ - if ( !dateTime.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - - DateValue *v = new DateValue( dateTime ); - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addAddressValue( VCARD::VCard *vcard, const Address &a ) -{ - if ( a.isEmpty() ) - return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityAddress ) ); - - AdrValue *v = new AdrValue; - v->setPOBox( a.postOfficeBox().utf8() ); - v->setExtAddress( a.extended().utf8() ); - v->setStreet( a.street().utf8() ); - v->setLocality( a.locality().utf8() ); - v->setRegion( a.region().utf8() ); - v->setPostCode( a.postalCode().utf8() ); - v->setCountryName( a.country().utf8() ); - cl.setValue( v ); - - addAddressParam( &cl, a.type() ); - - vcard->add( cl ); -} - -void VCardFormatImpl::addLabelValue( VCARD::VCard *vcard, const Address &a ) -{ - if ( a.label().isEmpty() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityLabel ) ); - cl.setValue( new TextValue( a.label().utf8() ) ); - - addAddressParam( &cl, a.type() ); - - vcard->add( cl ); -} - -void VCardFormatImpl::addAddressParam( ContentLine *cl, int type ) -{ - ParamList params; - if ( type & Address::Dom ) params.append( new Param( "TYPE", "dom" ) ); - if ( type & Address::Intl ) params.append( new Param( "TYPE", "intl" ) ); - if ( type & Address::Parcel ) params.append( new Param( "TYPE", "parcel" ) ); - if ( type & Address::Postal ) params.append( new Param( "TYPE", "postal" ) ); - if ( type & Address::Work ) params.append( new Param( "TYPE", "work" ) ); - if ( type & Address::Home ) params.append( new Param( "TYPE", "home" ) ); - if ( type & Address::Pref ) params.append( new Param( "TYPE", "pref" ) ); - cl->setParamList( params ); -} - -void VCardFormatImpl::addGeoValue( VCARD::VCard *vcard, const Geo &geo ) -{ - if ( !geo.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityGeo ) ); - - GeoValue *v = new GeoValue; - v->setLatitude( geo.latitude() ); - v->setLongitude( geo.longitude() ); - - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addUTCValue( VCARD::VCard *vcard, const TimeZone &tz ) -{ - if ( !tz.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityTimeZone ) ); - - UTCValue *v = new UTCValue; - - v->setPositive( tz.offset() >= 0 ); - v->setHour( (tz.offset() / 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); - v->setMinute( (tz.offset() % 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); - - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addClassValue( VCARD::VCard *vcard, const Secrecy &secrecy ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityClass ) ); - - ClassValue *v = new ClassValue; - switch ( secrecy.type() ) { - case Secrecy::Public: - v->setType( (int)ClassValue::Public ); - break; - case Secrecy::Private: - v->setType( (int)ClassValue::Private ); - break; - case Secrecy::Confidential: - v->setType( (int)ClassValue::Confidential ); - break; - } - - cl.setValue( v ); - vcard->add(cl); -} - - -Address VCardFormatImpl::readAddressValue( ContentLine *cl ) -{ - Address a; - AdrValue *v = (AdrValue *)cl->value(); - a.setPostOfficeBox( TQString::fromUtf8( v->poBox() ) ); - a.setExtended( TQString::fromUtf8( v->extAddress() ) ); - a.setStreet( TQString::fromUtf8( v->street() ) ); - a.setLocality( TQString::fromUtf8( v->locality() ) ); - a.setRegion( TQString::fromUtf8( v->region() ) ); - a.setPostalCode( TQString::fromUtf8( v->postCode() ) ); - a.setCountry( TQString::fromUtf8( v->countryName() ) ); - - a.setType( readAddressParam( cl ) ); - - return a; -} - -int VCardFormatImpl::readAddressParam( ContentLine *cl ) -{ - int type = 0; - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "TYPE" ) { - if ( (*it)->value() == "dom" ) type |= Address::Dom; - else if ( (*it)->value() == "intl" ) type |= Address::Intl; - else if ( (*it)->value() == "parcel" ) type |= Address::Parcel; - else if ( (*it)->value() == "postal" ) type |= Address::Postal; - else if ( (*it)->value() == "work" ) type |= Address::Work; - else if ( (*it)->value() == "home" ) type |= Address::Home; - else if ( (*it)->value() == "pref" ) type |= Address::Pref; - } - } - return type; -} - -void VCardFormatImpl::addNValue( VCARD::VCard *vcard, const Addressee &a ) -{ - ContentLine cl; - cl.setName(EntityTypeToParamName( EntityN ) ); - NValue *v = new NValue; - v->setFamily( TQString(a.familyName()).utf8() ); - v->setGiven( TQString(a.givenName()).utf8() ); - v->setMiddle( TQString(a.additionalName()).utf8() ); - v->setPrefix( TQString(a.prefix()).utf8() ); - v->setSuffix( TQString(a.suffix()).utf8() ); - - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::readNValue( ContentLine *cl, Addressee &a ) -{ - NValue *v = (NValue *)cl->value(); - a.setFamilyName( TQString::fromUtf8( v->family() ) ); - a.setGivenName( TQString::fromUtf8( v->given() ) ); - a.setAdditionalName( TQString::fromUtf8( v->middle() ) ); - a.setPrefix( TQString::fromUtf8( v->prefix() ) ); - a.setSuffix( TQString::fromUtf8( v->suffix() ) ); -} - -void VCardFormatImpl::addTelephoneValue( VCARD::VCard *v, const PhoneNumber &p ) -{ - if ( p.number().isEmpty() ) - return; - - ContentLine cl; - cl.setName(EntityTypeToParamName(EntityTelephone)); - cl.setValue(new TelValue( p.number().utf8() )); - - ParamList params; - if( p.type() & PhoneNumber::Home ) params.append( new Param( "TYPE", "home" ) ); - if( p.type() & PhoneNumber::Work ) params.append( new Param( "TYPE", "work" ) ); - if( p.type() & PhoneNumber::Msg ) params.append( new Param( "TYPE", "msg" ) ); - if( p.type() & PhoneNumber::Pref ) params.append( new Param( "TYPE", "pref" ) ); - if( p.type() & PhoneNumber::Voice ) params.append( new Param( "TYPE", "voice" ) ); - if( p.type() & PhoneNumber::Fax ) params.append( new Param( "TYPE", "fax" ) ); - if( p.type() & PhoneNumber::Cell ) params.append( new Param( "TYPE", "cell" ) ); - if( p.type() & PhoneNumber::Video ) params.append( new Param( "TYPE", "video" ) ); - if( p.type() & PhoneNumber::Bbs ) params.append( new Param( "TYPE", "bbs" ) ); - if( p.type() & PhoneNumber::Modem ) params.append( new Param( "TYPE", "modem" ) ); - if( p.type() & PhoneNumber::Car ) params.append( new Param( "TYPE", "car" ) ); - if( p.type() & PhoneNumber::Isdn ) params.append( new Param( "TYPE", "isdn" ) ); - if( p.type() & PhoneNumber::Pcs ) params.append( new Param( "TYPE", "pcs" ) ); - if( p.type() & PhoneNumber::Pager ) params.append( new Param( "TYPE", "pager" ) ); - cl.setParamList( params ); - - v->add(cl); -} - -PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) -{ - PhoneNumber p; - TelValue *value = (TelValue *)cl->value(); - p.setNumber( TQString::fromUtf8( value->asString() ) ); - - int type = 0; - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "TYPE" ) { - if ( (*it)->value() == "home" ) type |= PhoneNumber::Home; - else if ( (*it)->value() == "work" ) type |= PhoneNumber::Work; - else if ( (*it)->value() == "msg" ) type |= PhoneNumber::Msg; - else if ( (*it)->value() == "pref" ) type |= PhoneNumber::Pref; - else if ( (*it)->value() == "voice" ) type |= PhoneNumber::Voice; - else if ( (*it)->value() == "fax" ) type |= PhoneNumber::Fax; - else if ( (*it)->value() == "cell" ) type |= PhoneNumber::Cell; - else if ( (*it)->value() == "video" ) type |= PhoneNumber::Video; - else if ( (*it)->value() == "bbs" ) type |= PhoneNumber::Bbs; - else if ( (*it)->value() == "modem" ) type |= PhoneNumber::Modem; - else if ( (*it)->value() == "car" ) type |= PhoneNumber::Car; - else if ( (*it)->value() == "isdn" ) type |= PhoneNumber::Isdn; - else if ( (*it)->value() == "pcs" ) type |= PhoneNumber::Pcs; - else if ( (*it)->value() == "pager" ) type |= PhoneNumber::Pager; - } - } - p.setType( type ); - - return p; -} - -TQString VCardFormatImpl::readTextValue( ContentLine *cl ) -{ - VCARD::Value *value = cl->value(); - if ( value ) { - return TQString::fromUtf8( value->asString() ); - } else { - kdDebug(5700) << "No value: " << cl->asString() << endl; - return TQString::null; - } -} - -TQDate VCardFormatImpl::readDateValue( ContentLine *cl ) -{ - DateValue *dateValue = (DateValue *)cl->value(); - if ( dateValue ) - return dateValue->qdate(); - else - return TQDate(); -} - -TQDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl ) -{ - DateValue *dateValue = (DateValue *)cl->value(); - if ( dateValue ) - return dateValue->qdt(); - else - return TQDateTime(); -} - -Geo VCardFormatImpl::readGeoValue( ContentLine *cl ) -{ - GeoValue *geoValue = (GeoValue *)cl->value(); - if ( geoValue ) { - Geo geo( geoValue->latitude(), geoValue->longitude() ); - return geo; - } else - return Geo(); -} - -TimeZone VCardFormatImpl::readUTCValue( ContentLine *cl ) -{ - UTCValue *utcValue = (UTCValue *)cl->value(); - if ( utcValue ) { - TimeZone tz; - tz.setOffset(((utcValue->hour()*60)+utcValue->minute())*(utcValue->positive() ? 1 : -1)); - return tz; - } else - return TimeZone(); -} - -Secrecy VCardFormatImpl::readClassValue( ContentLine *cl ) -{ - ClassValue *classValue = (ClassValue *)cl->value(); - if ( classValue ) { - Secrecy secrecy; - switch ( classValue->type() ) { - case ClassValue::Public: - secrecy.setType( Secrecy::Public ); - break; - case ClassValue::Private: - secrecy.setType( Secrecy::Private ); - break; - case ClassValue::Confidential: - secrecy.setType( Secrecy::Confidential ); - break; - } - - return secrecy; - } else - return Secrecy(); -} - -void VCardFormatImpl::addKeyValue( VCARD::VCard *vcard, const Key &key ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityKey ) ); - - ParamList params; - if ( key.isBinary() ) { - cl.setValue( new TextValue( KCodecs::base64Encode( key.binaryData() ) ) ); - params.append( new Param( "ENCODING", "b" ) ); - } else { - cl.setValue( new TextValue( key.textData().utf8() ) ); - } - - switch ( key.type() ) { - case Key::X509: - params.append( new Param( "TYPE", "X509" ) ); - break; - case Key::PGP: - params.append( new Param( "TYPE", "PGP" ) ); - break; - case Key::Custom: - params.append( new Param( "TYPE", key.customTypeString().utf8() ) ); - break; - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Key VCardFormatImpl::readKeyValue( VCARD::ContentLine *cl ) -{ - Key key; - bool isBinary = false; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) - isBinary = true; - if ( (*it)->name() == "TYPE" ) { - if ( (*it)->value().isEmpty() ) - continue; - if ( (*it)->value() == "X509" ) - key.setType( Key::X509 ); - else if ( (*it)->value() == "PGP" ) - key.setType( Key::PGP ); - else { - key.setType( Key::Custom ); - key.setCustomTypeString( TQString::fromUtf8( (*it)->value() ) ); - } - } - } - - - if ( isBinary ) { - TQByteArray data; - KCodecs::base64Decode( v->asString().stripWhiteSpace(), data ); - key.setBinaryData( data ); - } else { - key.setTextData( TQString::fromUtf8( v->asString() ) ); - } - - return key; -} - - -void VCardFormatImpl::addAgentValue( VCARD::VCard *vcard, const Agent &agent ) -{ - if ( agent.isIntern() && !agent.addressee() ) - return; - - if ( !agent.isIntern() && agent.url().isEmpty() ) - return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityAgent ) ); - - ParamList params; - if ( agent.isIntern() ) { - TQString vstr; - Addressee *addr = agent.addressee(); - if ( addr ) { - writeToString( (*addr), vstr ); - vstr.replace( ":", "\\:" ); - vstr.replace( ",", "\\," ); - vstr.replace( ";", "\\;" ); - vstr.replace( "\r\n", "\\n" ); - cl.setValue( new TextValue( vstr.utf8() ) ); - } else - return; - } else { - cl.setValue( new TextValue( agent.url().utf8() ) ); - params.append( new Param( "VALUE", "uri" ) ); - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl ) -{ - Agent agent; - bool isIntern = true; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "VALUE" && (*it)->value() == "uri" ) - isIntern = false; - } - - if ( isIntern ) { - TQString vstr = TQString::fromUtf8( v->asString() ); - vstr.replace( "\\n", "\r\n" ); - vstr.replace( "\\:", ":" ); - vstr.replace( "\\,", "," ); - vstr.replace( "\\;", ";" ); - Addressee *addr = new Addressee; - readFromString( vstr, *addr ); - agent.setAddressee( addr ); - } else { - agent.setUrl( TQString::fromUtf8( v->asString() ) ); - } - - return agent; -} - -void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType type, const Picture &pic, const Addressee &addr, bool intern ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - - if ( pic.isIntern() && pic.data().isNull() ) - return; - - if ( !pic.isIntern() && pic.url().isEmpty() ) - return; - - ParamList params; - if ( pic.isIntern() ) { - TQImage img = pic.data(); - if ( intern ) { // only for vCard export we really write the data inline - TQByteArray data; - TQDataStream s( data, IO_WriteOnly ); - s.setVersion( 4 ); // to produce valid png files - s << img; - cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); - } else { // save picture in cache - TQString dir; - if ( type == EntityPhoto ) - dir = "photos"; - if ( type == EntityLogo ) - dir = "logos"; - - img.save( locateLocal( "data", "kabc/" + dir + "/" + addr.uid() ), pic.type().utf8() ); - cl.setValue( new TextValue( "" ) ); - } - params.append( new Param( "ENCODING", "b" ) ); - if ( !pic.type().isEmpty() ) - params.append( new Param( "TYPE", pic.type().utf8() ) ); - } else { - cl.setValue( new TextValue( pic.url().utf8() ) ); - params.append( new Param( "VALUE", "uri" ) ); - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::EntityType type, const Addressee &addr ) -{ - Picture pic; - bool isInline = false; - TQString picType; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) - isInline = true; - if ( (*it)->name() == "TYPE" && !(*it)->value().isEmpty() ) - picType = TQString::fromUtf8( (*it)->value() ); - } - - if ( isInline ) { - TQImage img; - if ( v->asString() == "" ) { // no picture inline stored => picture is in cache - TQString dir; - if ( type == EntityPhoto ) - dir = "photos"; - if ( type == EntityLogo ) - dir = "logos"; - - img.load( locateLocal( "data", "kabc/" + dir + "/" + addr.uid() ) ); - } else { - TQByteArray data; - KCodecs::base64Decode( v->asString(), data ); - img.loadFromData( data ); - } - pic.setData( img ); - pic.setType( picType ); - } else { - pic.setUrl( TQString::fromUtf8( v->asString() ) ); - } - - return pic; -} - -void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, const Addressee &addr, bool intern ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( EntitySound ) ); - - if ( sound.isIntern() && sound.data().isNull() ) - return; - - if ( !sound.isIntern() && sound.url().isEmpty() ) - return; - - ParamList params; - if ( sound.isIntern() ) { - TQByteArray data = sound.data(); - if ( intern ) { // only for vCard export we really write the data inline - cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); - } else { // save sound in cache - TQFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_WriteOnly ) ) { - file.writeBlock( data ); - } - cl.setValue( new TextValue( "" ) ); - } - params.append( new Param( "ENCODING", "b" ) ); - } else { - cl.setValue( new TextValue( sound.url().utf8() ) ); - params.append( new Param( "VALUE", "uri" ) ); - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &addr ) -{ - Sound sound; - bool isInline = false; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) - isInline = true; - } - - if ( isInline ) { - TQByteArray data; - if ( v->asString() == "" ) { // no sound inline stored => sound is in cache - TQFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_ReadOnly ) ) { - data = file.readAll(); - file.close(); - } - } else { - KCodecs::base64Decode( v->asString(), data ); - } - sound.setData( data ); - } else { - sound.setUrl( TQString::fromUtf8( v->asString() ) ); - } - - return sound; -} - -bool VCardFormatImpl::readFromString( const TQString &vcard, Addressee &addressee ) -{ - VCardEntity e( vcard.utf8() ); - VCardListIterator it( e.cardList() ); - - if ( it.current() ) { - VCARD::VCard v(*it.current()); - loadAddressee( addressee, v ); - return true; - } - - return false; -} - -bool VCardFormatImpl::writeToString( const Addressee &addressee, TQString &vcard ) -{ - VCardEntity vcards; - VCardList vcardlist; - vcardlist.setAutoDelete( true ); - - VCARD::VCard *v = new VCARD::VCard; - - saveAddressee( addressee, v, true ); - - vcardlist.append( v ); - vcards.setCardList( vcardlist ); - vcard = TQString::fromUtf8( vcards.asString() ); - - return true; -} diff --git a/kabc/vcardformatimpl.h b/kabc/vcardformatimpl.h deleted file mode 100644 index 78c466a86..000000000 --- a/kabc/vcardformatimpl.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDFORMATIMPL_H -#define KABC_VCARDFORMATIMPL_H - -#include -#include - -#include "address.h" -#include "addressee.h" - -#ifdef __CYGWIN__ -#include -#else -#include -#endif - -namespace KABC { - -class AddressBook; - -/** - @deprecated use VCardFormatPlugin instead. - */ -class KABC_EXPORT_DEPRECATED VCardFormatImpl -{ - public: - bool load( Addressee &, TQFile *file ); - bool loadAll( AddressBook *, Resource *, TQFile *file ); - void save( const Addressee &, TQFile *file ); - void saveAll( AddressBook *, Resource *, TQFile *file ); - - bool readFromString( const TQString &vcard, Addressee &addr ); - bool writeToString( const Addressee &addressee, TQString &vcard ); - - protected: - bool loadAddressee( Addressee &, VCARD::VCard & ); - void saveAddressee( const Addressee &, VCARD::VCard *, bool intern ); - - void addTextValue (VCARD::VCard *, VCARD::EntityType, const TQString & ); - TQString readTextValue( VCARD::ContentLine * ); - - void addDateValue( VCARD::VCard *, VCARD::EntityType, const TQDate & ); - TQDate readDateValue( VCARD::ContentLine * ); - - void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const TQDateTime & ); - TQDateTime readDateTimeValue( VCARD::ContentLine * ); - - void addAddressValue( VCARD::VCard *, const Address & ); - Address readAddressValue( VCARD::ContentLine * ); - - void addLabelValue( VCARD::VCard *, const Address & ); - - void addTelephoneValue( VCARD::VCard *, const PhoneNumber & ); - PhoneNumber readTelephoneValue( VCARD::ContentLine * ); - - void addNValue( VCARD::VCard *, const Addressee & ); - void readNValue( VCARD::ContentLine *, Addressee & ); - - void addCustomValue( VCARD::VCard *, const TQString & ); - - void addAddressParam( VCARD::ContentLine *, int ); - int readAddressParam( VCARD::ContentLine * ); - - void addGeoValue( VCARD::VCard *, const Geo & ); - Geo readGeoValue( VCARD::ContentLine * ); - - void addUTCValue( VCARD::VCard *, const TimeZone & ); - TimeZone readUTCValue( VCARD::ContentLine * ); - - void addClassValue( VCARD::VCard *, const Secrecy & ); - Secrecy readClassValue( VCARD::ContentLine * ); - - void addKeyValue( VCARD::VCard *, const Key & ); - Key readKeyValue( VCARD::ContentLine * ); - - void addPictureValue( VCARD::VCard *, VCARD::EntityType, const Picture &, const Addressee &, bool ); - Picture readPictureValue( VCARD::ContentLine *, VCARD::EntityType, const Addressee &addr ); - - void addSoundValue( VCARD::VCard *, const Sound &, const Addressee &, bool ); - Sound readSoundValue( VCARD::ContentLine *, const Addressee &addr ); - - void addAgentValue( VCARD::VCard *, const Agent & ); - Agent readAgentValue( VCARD::ContentLine * ); -}; - -} -#endif diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp deleted file mode 100644 index 6194cd0fe..000000000 --- a/kabc/vcardformatplugin.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "address.h" -#include "addressee.h" -#include "vcardconverter.h" - -#include "vcardformatplugin.h" - -using namespace KABC; - -VCardFormatPlugin::VCardFormatPlugin() -{ -} - -VCardFormatPlugin::~VCardFormatPlugin() -{ -} - -bool VCardFormatPlugin::load( Addressee &addressee, TQFile *file ) -{ - TQString data; - - TQTextStream t( file ); - t.setEncoding( TQTextStream::Latin1 ); - data = t.read(); - - VCardConverter converter; - Addressee::List l = converter.parseVCards( data ); - - if ( ! l.first().isEmpty() ) { - addressee = l.first(); - return true; - } - - return false; -} - -bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, TQFile *file ) -{ - TQString data; - - TQTextStream t( file ); - t.setEncoding( TQTextStream::Latin1 ); - data = t.read(); - - VCardConverter converter; - - Addressee::List l = converter.parseVCards( data ); - - Addressee::List::iterator itr; - for ( itr = l.begin(); itr != l.end(); ++itr) { - Addressee addressee = *itr; - addressee.setResource( resource ); - addressee.setChanged( false ); - resource->insertAddressee( addressee ); - } - - return true; -} - -void VCardFormatPlugin::save( const Addressee &addressee, TQFile *file ) -{ - VCardConverter converter ; - Addressee::List vcardlist; - - - vcardlist.append( addressee ); - - TQTextStream t( file ); - t.setEncoding( TQTextStream::UnicodeUTF8 ); - t << converter.createVCards( vcardlist ); -} - -void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, TQFile *file ) -{ - VCardConverter converter; - Addressee::List vcardlist; - - Resource::Iterator it; - for ( it = resource->begin(); it != resource->end(); ++it ) { - (*it).setChanged( false ); - vcardlist.append( *it ); - } - - TQTextStream t( file ); - t.setEncoding( TQTextStream::UnicodeUTF8 ); - t << converter.createVCards( vcardlist ); -} - -bool VCardFormatPlugin::checkFormat( TQFile *file ) const -{ - TQString line; - - file->readLine( line, 1024 ); - line = line.stripWhiteSpace(); - if ( line == "BEGIN:VCARD" ) - return true; - else - return false; -} diff --git a/kabc/vcardformatplugin.h b/kabc/vcardformatplugin.h deleted file mode 100644 index 5ac7e49c2..000000000 --- a/kabc/vcardformatplugin.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDFORMATPLUGIN_H -#define KABC_VCARDFORMATPLUGIN_H - -#include "formatplugin.h" - -namespace KABC { - -class AddressBook; -class Addressee; - -/** - @short Interface of vCard backend for address book. - - This class implements the file format interface of address book entries for - the vCard format. -*/ -class KABC_EXPORT VCardFormatPlugin : public FormatPlugin -{ - public: - VCardFormatPlugin(); - virtual ~VCardFormatPlugin(); - - bool load( Addressee &, TQFile *file ); - bool loadAll( AddressBook *, Resource *, TQFile *file ); - void save( const Addressee &, TQFile *file ); - void saveAll( AddressBook *, Resource *, TQFile *file ); - - bool checkFormat( TQFile *file ) const; - - private: - struct VCardFormatPrivate; - VCardFormatPrivate *d; -}; - -} -#endif diff --git a/kabc/vcardparser/CMakeLists.txt b/kabc/vcardparser/CMakeLists.txt deleted file mode 100644 index 2c6fa112a..000000000 --- a/kabc/vcardparser/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - vcard.h vcardline.h vcardparser.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### vcards #################################### - -set( target vcards ) - -set( ${target}_SRCS - vcard.cpp vcardline.cpp vcardparser.cpp -) - -tde_add_library( ${target} STATIC_PIC - SOURCES ${${target}_SRCS} -) diff --git a/kabc/vcardparser/Makefile.am b/kabc/vcardparser/Makefile.am deleted file mode 100644 index 53e4e42ab..000000000 --- a/kabc/vcardparser/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) - -noinst_LTLIBRARIES = libvcards.la -libvcards_la_SOURCES = vcard.cpp vcardline.cpp vcardparser.cpp - -vcardsincludedir = $(includedir)/kabc -vcardsinclude_HEADERS = vcard.h vcardline.h vcardparser.h - -check_PROGRAMS = testread testwrite testread2 - -testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testread_LDADD = libvcards.la $(top_builddir)/kabc/libkabc.la -testread_SOURCES = testread.cpp - -testread2_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testread2_LDADD = libvcards.la $(top_builddir)/kabc/libkabc.la -testread2_SOURCES = testread2.cpp testutils.cpp - -testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testwrite_LDADD = libvcards.la $(top_builddir)/kabc/libkabc.la -testwrite_SOURCES = testwrite.cpp - -TESTFILES = vcard1.vcf vcard2.vcf vcard3.vcf vcard4.vcf vcard6.vcf vcard7.vcf - -check-local: testread - rm -f FAILED; \ - for i in $(TESTFILES); \ - do perl $(top_srcdir)/kabc/vcardparser/checkvcard.pl \ - $(top_srcdir)/kabc/vcardparser/tests/$$i; \ - done; \ - [ ! -e FAILED ] diff --git a/kabc/vcardparser/README.testing b/kabc/vcardparser/README.testing deleted file mode 100644 index a7794931d..000000000 --- a/kabc/vcardparser/README.testing +++ /dev/null @@ -1,15 +0,0 @@ -For testing the vcardparser there are some test files and a small testsuite -automatically checking for regressions. The tests directory contains some vCard -files and correpsonding reference output files (with an additional ".ref" -suffix). For running the geression test do "make check". This will compile some -test programs, parse the test files, write them out as vCard again and compare -the output to the reference file. The check fails, if there are unexpected -differences and shows which lines differed. - -For creating a new test put a vCard file to be parsed into the tests directory. -Create a reference file by running "testread" on the test file. It will put out -the parsed data as vCard again on stdout. Carefully check the output, manually -correct any errors and save the result as reference file in the tests directory. -Now add the filename to the TESTFILES variable in Makefile.am and run "make -check". If the check fails adapt the reference file or fix the bugs in the -parser, whatever is appropriate. diff --git a/kabc/vcardparser/checkvcard.pl b/kabc/vcardparser/checkvcard.pl deleted file mode 100755 index 67160ea4a..000000000 --- a/kabc/vcardparser/checkvcard.pl +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/perl - -if ( @ARGV != 1 ) { - print STDERR "Missing arg: filename\n"; - exit 1; -} - -$file = $ARGV[0]; - -if ( !open( IN, "$file" ) ) { - print STDERR "Unable to open '$file'\n"; - exit 1; -} - -while( ) { - if (/^VERSION:(.*)$/ ) { - $version = $1; - if ( $version eq "2.1" ) { $options = "--vcard21"; } - } -} - -close IN; - -$ref = "$file.ref"; - -if ( !open( REF, "$ref" ) ) { - print STDERR "Unable to open $ref\n"; - exit 1; -} - -while( ) { - push @ref, $_; -} - -close REF; - -if ( !open( READ, "./testread $file $options 2> /dev/null |" ) ) { - print STDERR "Unable to open testread\n"; - exit 1; -} - -print "Checking '$file':\n"; - -$gotsomething = 0; -$error = 0; -$i = 0; -while( ) { - $gotsomething = 1; - $out = $_; - $ref = @ref[$i++]; - - if ( $out ne $ref ) { - if ( $ref =~ /^UID/ && $out =~ /^UID/ ) { next; } - $error++; - print " Expected : $ref"; - print " Parser output : $out"; - } -} - -close READ; - -if ( $gotsomething == 0 ) { - print "\n FAILED: testread didn't output anything\n"; - system "touch FAILED"; - exit 1; -} -if ( $error > 0 ) { - print "\n FAILED: $error errors found.\n"; - system "touch FAILED"; - exit 1; -} else { - print " OK\n"; -} - -exit 0; diff --git a/kabc/vcardparser/testread.cpp b/kabc/vcardparser/testread.cpp deleted file mode 100644 index 6c3405ef9..000000000 --- a/kabc/vcardparser/testread.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - This file is part of libkabc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "vcardconverter.h" -#include "vcard.h" - -static const TDECmdLineOptions options[] = -{ - {"vcard21", I18N_NOOP("vCard 2.1"), 0}, - {"+inputfile", I18N_NOOP("Input file"), 0}, - TDECmdLineLastOption -}; - -int main( int argc, char **argv ) -{ - TDEApplication::disableAutoDcopRegistration(); - - TDEAboutData aboutData( "testread", "vCard test reader", "0.1" ); - aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app( false, false ); - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if ( args->count() != 1 ) { - std::cerr << "Missing argument" << std::endl; - return 1; - } - - TQString inputFile( args->arg( 0 ) ); - - TQFile file( inputFile ); - if ( !file.open( IO_ReadOnly ) ) { - tqDebug( "Unable to open file '%s' for reading!", file.name().latin1() ); - return 1; - } - - TQString text; - - TQTextStream s( &file ); - s.setEncoding( TQTextStream::Latin1 ); - text = s.read(); - file.close(); - - KABC::VCardConverter converter; - KABC::Addressee::List list = converter.parseVCards( text ); - - if ( args->isSet( "vcard21" ) ) { - text = converter.createVCards( list, KABC::VCardConverter::v2_1 ); // uses version 2.1 - } else { - text = converter.createVCards( list ); // uses version 3.0 - } - - std::cout << text.utf8(); - - return 0; -} diff --git a/kabc/vcardparser/testread2.cpp b/kabc/vcardparser/testread2.cpp deleted file mode 100644 index ba73081e7..000000000 --- a/kabc/vcardparser/testread2.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "testutils.h" -#include -#include -#include - -using namespace KABC; - -int -main() -{ - Addressee::List l = vCardsAsAddresseeList(); - TQString vcards = vCardsAsText(); - - VCardConverter vct; - - Addressee::List parsed = vct.parseVCards( vcards ); - - if ( l.size() != parsed.size() ) { - kdDebug()<<"\tSize - FAILED : "< -#include -#include - -using namespace KABC; - -Addressee -vcard1() -{ - Addressee addr; - - addr.setName( "Frank Dawson" ); - addr.setOrganization( "Lotus Development Corporation" ); - addr.setUrl( KURL( "http://home.earthlink.net/~fdawson") ); - addr.insertEmail( "fdawson@earthlink.net" ); - addr.insertEmail( "Frank_Dawson@Lotus.com", true ); - addr.insertPhoneNumber( PhoneNumber("+1-919-676-9515",PhoneNumber::Voice|PhoneNumber::Msg - |PhoneNumber::Work ) ); - addr.insertPhoneNumber( PhoneNumber("+1-919-676-9564",PhoneNumber::Fax |PhoneNumber::Work )); - Address a( Address::Work | Address::Postal | Address::Parcel ); - a.setStreet( "6544 Battleford Drive" ); - a.setLocality( "Raleigh" ); - a.setRegion( "NC" ); - a.setPostalCode( "27613-3502" ); - a.setCountry( "U.S.A." ); - addr.insertAddress( a ); - return addr; -} - -Addressee -vcard2() -{ - Addressee addr; - - addr.setName( "Tim Howes" ); - addr.setOrganization( "Netscape Communications Corp." ); - addr.insertEmail( "howes@netscape.com" ); - addr.insertPhoneNumber( PhoneNumber("+1-415-937-3419",PhoneNumber::Voice|PhoneNumber::Msg - |PhoneNumber::Work) ); - addr.insertPhoneNumber( PhoneNumber("+1-415-528-4164",PhoneNumber::Fax |PhoneNumber::Work) ); - Address a( Address::Work ); - a.setStreet( "501 E. Middlefield Rd." ); - a.setLocality( "Mountain View" ); - a.setRegion( "CA" ); - a.setPostalCode( "94043" ); - a.setCountry( "U.S.A." ); - addr.insertAddress( a ); - return addr; -} - -Addressee -vcard3() -{ - Addressee addr; - - addr.setName( "ian geiser" ); - addr.setOrganization( "Source eXtreme" ); - addr.insertEmail( "geiseri@yahoo.com" ); - addr.setTitle( "VP of Engineering" ); - return addr; -} - - -QString -vcardAsText( const TQString& location ) -{ - TQString line; - TQFile file( location ); - if ( file.open( IO_ReadOnly ) ) { - TQTextStream stream( &file ); - if ( !stream.eof() ) { - line = stream.read(); - } - file.close(); - } - return line; -} - -Addressee::List -vCardsAsAddresseeList() -{ - Addressee::List l; - - l.append( vcard1() ); - l.append( vcard2() ); - l.append( vcard3() ); - - return l; -} - -QString -vCardsAsText() -{ - TQString vcards = vcardAsText( "tests/vcard1.vcf" ); - vcards += vcardAsText( "tests/vcard2.vcf" ); - vcards += vcardAsText( "tests/vcard3.vcf" ); - - return vcards; -} diff --git a/kabc/vcardparser/testutils.h b/kabc/vcardparser/testutils.h deleted file mode 100644 index 4f2024177..000000000 --- a/kabc/vcardparser/testutils.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef TESTUTILS_H -#define TESTUTILS_H - -#include -#include - -KABC::Addressee vcard1(); -KABC::Addressee vcard2(); -KABC::Addressee vcard3(); -KABC::Addressee::List vCardsAsAddresseeList(); -TQString vCardAsText( const TQString& location ); -TQString vCardsAsText(); - -#endif diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp deleted file mode 100644 index 5a58bd8a8..000000000 --- a/kabc/vcardparser/testwrite.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - This file is part of libkabc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "vcardconverter.h" - -int main( int argc, char **argv ) -{ - TDEAboutData aboutData( "testwrite", "vCard test writer", "0.1" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - - TDEApplication app( false, false ); - - - KABC::Addressee addressee; - - addressee.setNameFromString( "Mr. Tobias Koenig Jr." ); - addressee.setNickName( "tokoe" ); - addressee.setBirthday( TQDate( 1982, 7, 19 ) ); - addressee.setMailer( "mutt1.2" ); - addressee.setTimeZone( KABC::TimeZone( +2 ) ); - - KABC::Geo geo; - geo.setLatitude( 30 ); - geo.setLongitude( 51 ); - addressee.setGeo( geo ); - - addressee.setTitle( "nerd" ); - addressee.setRole( "Maintainer" ); - addressee.setOrganization( "KDE" ); - addressee.setNote( "nerver\ntouch a running system" ); - addressee.setProductId( "testId" ); - addressee.setRevision( TQDateTime::currentDateTime() ); - addressee.setSortString( "koenig" ); - addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); - addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); -/* - TQImage img; - img.load( "testimg.png", "PNG" ); - KABC::Picture photo; - photo.setData( img ); - addressee.setPhoto( photo ); - - TQImage img2; - img2.load( "testimg.png", "PNG" ); - KABC::Picture logo; - logo.setData( img2 ); - addressee.setLogo( logo ); - - TQFile soundFile( "testsound.wav" ); - soundFile.open( IO_ReadOnly ); - TQByteArray data = soundFile.readAll(); - soundFile.close(); - KABC::Sound sound; - sound.setData( data ); - addressee.setSound( sound ); -*/ - addressee.insertEmail( "tokoe@kde.org", true ); - addressee.insertEmail( "tokoe82@yahoo.de", true ); - - KABC::PhoneNumber phone1( "3541523475", KABC::PhoneNumber::Pref | KABC::PhoneNumber::Home ); - KABC::PhoneNumber phone2( "+46745673475", KABC::PhoneNumber::Work ); - addressee.insertPhoneNumber( phone1 ); - addressee.insertPhoneNumber( phone2 ); - - KABC::Key key( "secret key", KABC::Key::X509 ); - addressee.insertKey( key ); - - TQStringList categories; - categories << "Friends" << "School" << "KDE"; - addressee.setCategories( categories ); - - KABC::Address a( KABC::Address::Work | KABC::Address::Postal | KABC::Address::Parcel ); - a.setStreet( "6544 Battleford Drive" ); - a.setLocality( "Raleigh" ); - a.setRegion( "NC" ); - a.setPostalCode( "27613-3502" ); - a.setCountry( "U.S.A." ); - addressee.insertAddress( a ); - - addressee.insertCustom( "1hsdf", "ertuer", "iurt" ); - addressee.insertCustom( "2hsdf", "ertuer", "iurt" ); - addressee.insertCustom( "3hsdf", "ertuer", "iurt" ); - - KABC::Addressee::List list; - for ( int i = 0; i < 1000; ++i ) { - KABC::Addressee addr = addressee; - addr.setUid( TQString::number( i ) ); - list.append( addr ); - } - - KABC::VCardConverter converter; - TQString txt = converter.createVCards( list ); - - TQFile file( "out.vcf" ); - file.open( IO_WriteOnly ); - - TQTextStream s( &file ); - s.setEncoding( TQTextStream::UnicodeUTF8 ); - s << txt; - file.close(); - - return 0; -} diff --git a/kabc/vcardparser/vcard.cpp b/kabc/vcardparser/vcard.cpp deleted file mode 100644 index 30a8e1c49..000000000 --- a/kabc/vcardparser/vcard.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcard.h" - -using namespace KABC; - -VCard::VCard() -{ -} - -VCard::VCard( const VCard& vcard ) -{ - mLineMap = vcard.mLineMap; -} - -VCard::~VCard() -{ -} - -VCard& VCard::operator=( const VCard& vcard ) -{ - if ( &vcard == this ) - return *this; - - mLineMap = vcard.mLineMap; - - return *this; -} - -void VCard::clear() -{ - mLineMap.clear(); -} - -TQStringList VCard::identifiers() const -{ - return mLineMap.keys(); -} - -void VCard::addLine( const VCardLine& line ) -{ - mLineMap[ line.identifier() ].append( line ); -} - -VCardLine::List VCard::lines( const TQString& identifier ) const -{ - LineMap::ConstIterator it = mLineMap.find( identifier ); - if ( it == mLineMap.end() ) - return VCardLine::List(); - - return *it; -} - -VCardLine VCard::line( const TQString& identifier ) const -{ - LineMap::ConstIterator it = mLineMap.find( identifier ); - if ( it == mLineMap.end() ) - return VCardLine(); - - if ( (*it).isEmpty() ) - return VCardLine(); - else - return (*it).first(); -} - -void VCard::setVersion( Version version ) -{ - mLineMap.erase( "VERSION" ); - - VCardLine line; - line.setIdentifier( "VERSION" ); - if ( version == v2_1 ) - line.setIdentifier( "2.1" ); - else if ( version == v3_0 ) - line.setIdentifier( "3.0" ); - - mLineMap[ "VERSION" ].append( line ); -} - -VCard::Version VCard::version() const -{ - LineMap::ConstIterator versionEntry = mLineMap.find( "VERSION" ); - if ( versionEntry == mLineMap.end() ) - return v3_0; - - VCardLine line = ( *versionEntry )[ 0 ]; - if ( line.value() == "2.1" ) - return v2_1; - else - return v3_0; -} diff --git a/kabc/vcardparser/vcard.h b/kabc/vcardparser/vcard.h deleted file mode 100644 index 6afeeda26..000000000 --- a/kabc/vcardparser/vcard.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef VCARDPARSER_VCARD_H -#define VCARDPARSER_VCARD_H - -#include "vcardline.h" -#include -#include -#include - -namespace KABC { - -class VCard -{ - public: - typedef TQValueList List; - typedef TQMap< TQString, VCardLine::List > LineMap; - - enum Version { v2_1, v3_0 }; - - VCard(); - VCard( const VCard& ); - - ~VCard(); - - VCard& operator=( const VCard& ); - - /** - * Removes all lines from the vCard. - */ - void clear(); - - /** - * Returns a list of all identifiers that exists in the - * vCard. - */ - TQStringList identifiers() const; - - /** - * Adds a VCardLine to the VCard - */ - void addLine( const VCardLine& line ); - - /** - * Returns all lines of the vcard with a special identifier. - */ - VCardLine::List lines( const TQString& identifier ) const; - - /** - * Returns only the first line of the vcard with a special identifier. - */ - VCardLine line( const TQString& identifier ) const; - - /** - * Set the version of the vCard. - */ - void setVersion( Version version ); - - /** - * Returns the version of this vCard. - */ - Version version() const; - - private: - LineMap mLineMap; - - class VCardPrivate; - VCardPrivate *d; -}; - -} - -#endif diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp deleted file mode 100644 index 6680cf7d0..000000000 --- a/kabc/vcardparser/vcardline.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcardline.h" - -using namespace KABC; - -class VCardLine::VCardLinePrivate -{ - public: - TQString mGroup; -}; - -VCardLine::VCardLine() - : d( 0 ) -{ -} - -VCardLine::VCardLine( const TQString &identifier ) - : d( 0 ) -{ - mIdentifier = identifier; -} - -VCardLine::VCardLine( const TQString &identifier, const TQVariant &value ) - : d( 0 ) -{ - mIdentifier = identifier; - mValue = value; -} - -VCardLine::VCardLine( const VCardLine& line ) - : d( 0 ) -{ - mParamMap = line.mParamMap; - mValue = line.mValue; - mIdentifier = line.mIdentifier; -} - -VCardLine::~VCardLine() -{ - delete d; - d = 0; -} - -VCardLine& VCardLine::operator=( const VCardLine& line ) -{ - if ( &line == this ) - return *this; - - mParamMap = line.mParamMap; - mValue = line.mValue; - mIdentifier = line.mIdentifier; - - return *this; -} - -void VCardLine::setIdentifier( const TQString& identifier ) -{ - mIdentifier = identifier; -} - -TQString VCardLine::identifier() const -{ - return mIdentifier; -} - -void VCardLine::setValue( const TQVariant& value ) -{ - mValue = value; -} - -TQVariant VCardLine::value() const -{ - return mValue; -} - -void VCardLine::setGroup( const TQString& group ) -{ - if ( !d ) - d = new VCardLinePrivate(); - - d->mGroup = group; -} - -TQString VCardLine::group() const -{ - if ( d ) - return d->mGroup; - else - return TQString(); -} - -bool VCardLine::hasGroup() const -{ - if ( !d ) - return false; - else - return d->mGroup.isEmpty(); -} - -TQStringList VCardLine::parameterList() const -{ - return mParamMap.keys(); -} - -void VCardLine::addParameter( const TQString& param, const TQString& value ) -{ - TQStringList &list = mParamMap[ param ]; - if ( list.findIndex( value ) == -1 ) // not included yet - list.append( value ); -} - -TQStringList VCardLine::parameters( const TQString& param ) const -{ - ParamMap::ConstIterator it = mParamMap.find( param ); - if ( it == mParamMap.end() ) - return TQStringList(); - else - return *it; -} - -TQString VCardLine::parameter( const TQString& param ) const -{ - ParamMap::ConstIterator it = mParamMap.find( param ); - if ( it == mParamMap.end() ) - return TQString::null; - else { - if ( (*it).isEmpty() ) - return TQString::null; - else - return (*it).first(); - } -} diff --git a/kabc/vcardparser/vcardline.h b/kabc/vcardparser/vcardline.h deleted file mode 100644 index 92fe743f6..000000000 --- a/kabc/vcardparser/vcardline.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef VCARDLINE_H -#define VCARDLINE_H - -#include -#include -#include -#include -#include - -namespace KABC { - -class VCardLine -{ - public: - typedef TQValueList List; - typedef TQMap ParamMap; - - VCardLine(); - VCardLine( const TQString &identifier ); - VCardLine( const TQString &identifier, const TQVariant &value ); - VCardLine( const VCardLine& ); - - ~VCardLine(); - - VCardLine& operator=( const VCardLine& ); - - /** - * Sets the identifier of this line e.g. UID, FN, CLASS - */ - void setIdentifier( const TQString& identifier ); - - /** - * Returns the identifier of this line. - */ - TQString identifier() const; - - /** - * Sets the value of of this line. - */ - void setValue( const TQVariant& value ); - - /** - * Returns the value of this line. - */ - TQVariant value() const; - - /** - * Sets the group the line belongs to. - */ - void setGroup( const TQString& group ); - - /** - * Returns the group the line belongs to. - */ - TQString group() const; - - /** - * Returns whether the line belongs to a group. - */ - bool hasGroup() const; - - /** - * Returns all parameters. - */ - TQStringList parameterList() const; - - /** - * Add a new parameter to the line. - */ - void addParameter( const TQString& param, const TQString& value ); - - /** - * Returns the values of a special parameter. - * You can get a list of all parameters with paramList(). - */ - TQStringList parameters( const TQString& param ) const; - - /** - * Returns only the first value of a special parameter. - * You can get a list of all parameters with paramList(). - */ - TQString parameter( const TQString& param ) const; - - private: - ParamMap mParamMap; - TQString mIdentifier; - TQVariant mValue; - - class VCardLinePrivate; - VCardLinePrivate *d; -}; - -} - -#endif diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp deleted file mode 100644 index aed9ebd39..000000000 --- a/kabc/vcardparser/vcardparser.cpp +++ /dev/null @@ -1,297 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include - -#include "vcardparser.h" - -#define FOLD_WIDTH 75 - -using namespace KABC; - -static TQString backslash( "\\\\" ); -static TQString comma( "\\," ); -static TQString newline( "\\n" ); -static TQString cr( "\\r" ); - -static void addEscapes( TQString &str ) -{ - str.replace( '\\', backslash ); - str.replace( ',', comma ); - str.replace( '\r', cr ); - str.replace( '\n', newline ); -} - -static void removeEscapes( TQString &str ) -{ - str.replace( cr, "\\r" ); - str.replace( newline, "\n" ); - str.replace( comma, "," ); - str.replace( backslash, "\\" ); -} - -VCardParser::VCardParser() -{ -} - -VCardParser::~VCardParser() -{ -} - -VCard::List VCardParser::parseVCards( const TQString& text ) -{ - static TQRegExp sep( "[\x0d\x0a]" ); - - VCard currentVCard; - VCard::List vCardList; - TQString currentLine; - - const TQStringList lines = TQStringList::split( sep, text ); - TQStringList::ConstIterator it; - - bool inVCard = false; - TQStringList::ConstIterator linesEnd( lines.end() ); - for ( it = lines.begin(); it != linesEnd; ++it ) { - - if ( (*it).isEmpty() ) // empty line - continue; - - if ( (*it)[ 0 ] == ' ' || (*it)[ 0 ] == '\t' ) { // folded line => append to previous - currentLine += TQString( *it ).remove( 0, 1 ); - continue; - } else { - if ( inVCard && !currentLine.isEmpty() ) { // now parse the line - int colon = currentLine.find( ':' ); - if ( colon == -1 ) { // invalid line - currentLine = (*it); - continue; - } - - VCardLine vCardLine; - const TQString key = currentLine.left( colon ).stripWhiteSpace(); - TQString value = currentLine.mid( colon + 1 ); - - TQStringList params = TQStringList::split( ';', key ); - - // check for group - if ( params[0].find( '.' ) != -1 ) { - const TQStringList groupList = TQStringList::split( '.', params[0] ); - vCardLine.setGroup( groupList[0] ); - vCardLine.setIdentifier( groupList[1] ); - } else - vCardLine.setIdentifier( params[0] ); - - if ( params.count() > 1 ) { // find all parameters - TQStringList::ConstIterator paramIt = params.begin(); - for ( ++paramIt; paramIt != params.end(); ++paramIt ) { - TQStringList pair = TQStringList::split( '=', *paramIt ); - if ( pair.size() == 1 ) { - // correct the 2.1 'standard' - if ( pair[0].lower() == "quoted-printable" ) { - pair[0] = "encoding"; - pair[1] = "quoted-printable"; - } else if ( pair[0].lower() == "base64" ) { - pair[0] = "encoding"; - pair[1] = "base64"; - } else { - pair.prepend( "type" ); - } - } - // This is pretty much a faster pair[1].contains( ',' )... - if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format - const TQStringList args = TQStringList::split( ',', pair[ 1 ] ); - TQStringList::ConstIterator argIt; - for ( argIt = args.begin(); argIt != args.end(); ++argIt ) - vCardLine.addParameter( pair[0].lower(), *argIt ); - } else - vCardLine.addParameter( pair[0].lower(), pair[1] ); - } - } - - removeEscapes( value ); - - TQByteArray output; - bool wasBase64Encoded = false; - - params = vCardLine.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data - TQByteArray input; - input = TQCString(value.latin1()); - if ( vCardLine.parameter( "encoding" ).lower() == "b" || - vCardLine.parameter( "encoding" ).lower() == "base64" ) { - KCodecs::base64Decode( input, output ); - wasBase64Encoded = true; - } - else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) { - // join any qp-folded lines - while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) { - value = value.remove( value.length() - 1, 1 ) + (*it); - ++it; - } - input = TQCString(value.latin1()); - KCodecs::quotedPrintableDecode( input, output ); - } - } else { - output = TQCString(value.latin1()); - } - - if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data - TQTextCodec *codec = - TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() ); - if ( codec ) { - vCardLine.setValue( codec->toUnicode( output ) ); - } else { - vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); - } - } else if ( wasBase64Encoded ) { - vCardLine.setValue( output ); - } else { // if charset not given, assume it's in UTF-8 (as used in previous KDE versions) - vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); - } - - currentVCard.addLine( vCardLine ); - } - - // we do not save the start and end tag as vcardline - if ( (*it).lower().startsWith( "begin:vcard" ) ) { - inVCard = true; - currentLine.setLength( 0 ); - currentVCard.clear(); // flush vcard - continue; - } - - if ( (*it).lower().startsWith( "end:vcard" ) ) { - inVCard = false; - vCardList.append( currentVCard ); - currentLine.setLength( 0 ); - currentVCard.clear(); // flush vcard - continue; - } - - currentLine = (*it); - } - } - - return vCardList; -} - -TQString VCardParser::createVCards( const VCard::List& list ) -{ - TQString text; - TQString textLine; - TQString encodingType; - TQStringList idents; - TQStringList params; - TQStringList values; - TQStringList::ConstIterator identIt; - TQStringList::Iterator paramIt; - TQStringList::ConstIterator valueIt; - - VCardLine::List lines; - VCardLine::List::ConstIterator lineIt; - VCard::List::ConstIterator cardIt; - - bool hasEncoding; - - text.reserve( list.size() * 300 ); // reserve memory to be more efficient - - // iterate over the cards - VCard::List::ConstIterator listEnd( list.end() ); - for ( cardIt = list.begin(); cardIt != listEnd; ++cardIt ) { - text.append( "BEGIN:VCARD\r\n" ); - - idents = (*cardIt).identifiers(); - for ( identIt = idents.constBegin(); identIt != idents.constEnd(); ++identIt ) { - lines = (*cardIt).lines( (*identIt) ); - - // iterate over the lines - for ( lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt ) { - if ( !(*lineIt).value().asString().isEmpty() ) { - if ((*lineIt).identifier() != TQString("URI")) { - if ( (*lineIt).hasGroup() ) - textLine = (*lineIt).group() + "." + (*lineIt).identifier(); - else - textLine = (*lineIt).identifier(); - - params = (*lineIt).parameterList(); - hasEncoding = false; - if ( params.count() > 0 ) { // we have parameters - for ( paramIt = params.begin(); paramIt != params.end(); ++paramIt ) { - if ( (*paramIt) == "encoding" ) { - hasEncoding = true; - encodingType = (*lineIt).parameter( "encoding" ).lower(); - } - - values = (*lineIt).parameters( *paramIt ); - for ( valueIt = values.constBegin(); valueIt != values.constEnd(); ++valueIt ) { - textLine.append( ";" + (*paramIt).upper() ); - if ( !(*valueIt).isEmpty() ) - textLine.append( "=" + (*valueIt) ); - } - } - } - - if ( hasEncoding ) { // have to encode the data - TQByteArray input, output; - if ( encodingType == "b" ) { - input = (*lineIt).value().toByteArray(); - KCodecs::base64Encode( input, output ); - } else if ( encodingType == "quoted-printable" ) { - input = (*lineIt).value().toString().utf8(); - input.resize( input.size() - 1 ); // strip \0 - KCodecs::quotedPrintableEncode( input, output, false ); - } - - TQString value( output ); - addEscapes( value ); - textLine.append( ":" + value ); - } else { - TQString value( (*lineIt).value().asString() ); - addEscapes( value ); - textLine.append( ":" + value ); - } - - if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line - for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) - text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" ); - } else - text.append( textLine + "\r\n" ); - } - else { - // URIs can be full of weird symbols, etc. so bypass all checks - textLine = (*lineIt).identifier(); - TQString value( (*lineIt).value().asString() ); - addEscapes( value ); - textLine.append( ":" + value ); - text.append( textLine + "\r\n" ); - } - } - } - } - - text.append( "END:VCARD\r\n" ); - text.append( "\r\n" ); - } - - return text; -} diff --git a/kabc/vcardparser/vcardparser.h b/kabc/vcardparser/vcardparser.h deleted file mode 100644 index da5fdd46e..000000000 --- a/kabc/vcardparser/vcardparser.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef VCARDPARSER_H -#define VCARDPARSER_H - -#include "vcard.h" - -namespace KABC { - -class VCardParser -{ - public: - VCardParser(); - ~VCardParser(); - - static VCard::List parseVCards( const TQString& text ); - static TQString createVCards( const VCard::List& list ); - - private: - class VCardParserPrivate; - VCardParserPrivate *d; -}; - -} - -#endif diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp deleted file mode 100644 index 295360a03..000000000 --- a/kabc/vcardtool.cpp +++ /dev/null @@ -1,896 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "agent.h" -#include "key.h" -#include "picture.h" -#include "secrecy.h" -#include "sound.h" - -#include "vcardtool.h" - -using namespace KABC; - -static bool needsEncoding( const TQString &value ) -{ - uint length = value.length(); - for ( uint i = 0; i < length; ++i ) { - char c = value.at( i ).latin1(); - if ( (c < 33 || c > 126) && c != ' ' && c != '=' ) - return true; - } - - return false; -} - -VCardTool::VCardTool() -{ - mAddressTypeMap.insert( "dom", Address::Dom ); - mAddressTypeMap.insert( "intl", Address::Intl ); - mAddressTypeMap.insert( "postal", Address::Postal ); - mAddressTypeMap.insert( "parcel", Address::Parcel ); - mAddressTypeMap.insert( "home", Address::Home ); - mAddressTypeMap.insert( "work", Address::Work ); - mAddressTypeMap.insert( "pref", Address::Pref ); - - mPhoneTypeMap.insert( "HOME", PhoneNumber::Home ); - mPhoneTypeMap.insert( "WORK", PhoneNumber::Work ); - mPhoneTypeMap.insert( "MSG", PhoneNumber::Msg ); - mPhoneTypeMap.insert( "PREF", PhoneNumber::Pref ); - mPhoneTypeMap.insert( "VOICE", PhoneNumber::Voice ); - mPhoneTypeMap.insert( "FAX", PhoneNumber::Fax ); - mPhoneTypeMap.insert( "CELL", PhoneNumber::Cell ); - mPhoneTypeMap.insert( "VIDEO", PhoneNumber::Video ); - mPhoneTypeMap.insert( "BBS", PhoneNumber::Bbs ); - mPhoneTypeMap.insert( "MODEM", PhoneNumber::Modem ); - mPhoneTypeMap.insert( "CAR", PhoneNumber::Car ); - mPhoneTypeMap.insert( "ISDN", PhoneNumber::Isdn ); - mPhoneTypeMap.insert( "PCS", PhoneNumber::Pcs ); - mPhoneTypeMap.insert( "PAGER", PhoneNumber::Pager ); -} - -VCardTool::~VCardTool() -{ -} - -// TODO: make list a const& -TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) -{ - VCard::List vCardList; - - Addressee::List::ConstIterator addrIt; - Addressee::List::ConstIterator listEnd( list.constEnd() ); - for ( addrIt = list.constBegin(); addrIt != listEnd; ++addrIt ) { - VCard card; - TQStringList::ConstIterator strIt; - - // ADR + LABEL - const Address::List addresses = (*addrIt).addresses(); - for ( Address::List::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { - TQStringList address; - - bool isEmpty = ( (*it).postOfficeBox().isEmpty() && - (*it).extended().isEmpty() && - (*it).street().isEmpty() && - (*it).locality().isEmpty() && - (*it).region().isEmpty() && - (*it).postalCode().isEmpty() && - (*it).country().isEmpty() ); - - address.append( (*it).postOfficeBox().replace( ';', "\\;" ) ); - address.append( (*it).extended().replace( ';', "\\;" ) ); - address.append( (*it).street().replace( ';', "\\;" ) ); - address.append( (*it).locality().replace( ';', "\\;" ) ); - address.append( (*it).region().replace( ';', "\\;" ) ); - address.append( (*it).postalCode().replace( ';', "\\;" ) ); - address.append( (*it).country().replace( ';', "\\;" ) ); - - VCardLine adrLine( "ADR", address.join( ";" ) ); - if ( version == VCard::v2_1 && needsEncoding( address.join( ";" ) ) ) { - adrLine.addParameter( "charset", "UTF-8" ); - adrLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - - VCardLine labelLine( "LABEL", (*it).label() ); - if ( version == VCard::v2_1 && needsEncoding( (*it).label() ) ) { - labelLine.addParameter( "charset", "UTF-8" ); - labelLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - - bool hasLabel = !(*it).label().isEmpty(); - TQMap::ConstIterator typeIt; - for ( typeIt = mAddressTypeMap.constBegin(); typeIt != mAddressTypeMap.constEnd(); ++typeIt ) { - if ( typeIt.data() & (*it).type() ) { - adrLine.addParameter( "TYPE", typeIt.key() ); - if ( hasLabel ) - labelLine.addParameter( "TYPE", typeIt.key() ); - } - } - - if ( !isEmpty ) - card.addLine( adrLine ); - if ( hasLabel ) - card.addLine( labelLine ); - } - - // AGENT - card.addLine( createAgent( version, (*addrIt).agent() ) ); - - // BDAY - card.addLine( VCardLine( "BDAY", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).birthday()) ) ) ); - - // CATEGORIES - if ( version == VCard::v3_0 ) { - TQStringList categories = (*addrIt).categories(); - TQStringList::Iterator catIt; - for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) - (*catIt).replace( ',', "\\," ); - - VCardLine catLine( "CATEGORIES", categories.join( "," ) ); - if ( version == VCard::v2_1 && needsEncoding( categories.join( "," ) ) ) { - catLine.addParameter( "charset", "UTF-8" ); - catLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - - card.addLine( catLine ); - } - - // CLASS - if ( version == VCard::v3_0 ) { - card.addLine( createSecrecy( (*addrIt).secrecy() ) ); - } - - // EMAIL - const TQStringList emails = (*addrIt).emails(); - bool pref = true; - for ( strIt = emails.begin(); strIt != emails.end(); ++strIt ) { - VCardLine line( "EMAIL", *strIt ); - if ( pref == true && emails.count() > 1 ) { - line.addParameter( "TYPE", "PREF" ); - pref = false; - } - card.addLine( line ); - } - - // FN - VCardLine fnLine( "FN", TQString((*addrIt).formattedName()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).formattedName() ) ) { - fnLine.addParameter( "charset", "UTF-8" ); - fnLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( fnLine ); - - // GEO - Geo geo = (*addrIt).geo(); - if ( geo.isValid() ) { - TQString str; - str.sprintf( "%.6f;%.6f", geo.latitude(), geo.longitude() ); - card.addLine( VCardLine( "GEO", str ) ); - } - - // KEY - const Key::List keys = (*addrIt).keys(); - Key::List::ConstIterator keyIt; - for ( keyIt = keys.begin(); keyIt != keys.end(); ++keyIt ) - card.addLine( createKey( *keyIt ) ); - - // LOGO - card.addLine( createPicture( "LOGO", (*addrIt).logo() ) ); - - // MAILER - VCardLine mailerLine( "MAILER", TQString((*addrIt).mailer()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).mailer() ) ) { - mailerLine.addParameter( "charset", "UTF-8" ); - mailerLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( mailerLine ); - - // N - TQStringList name; - name.append( (*addrIt).familyName().replace( ';', "\\;" ) ); - name.append( (*addrIt).givenName().replace( ';', "\\;" ) ); - name.append( (*addrIt).additionalName().replace( ';', "\\;" ) ); - name.append( (*addrIt).prefix().replace( ';', "\\;" ) ); - name.append( (*addrIt).suffix().replace( ';', "\\;" ) ); - - VCardLine nLine( "N", name.join( ";" ) ); - if ( version == VCard::v2_1 && needsEncoding( name.join( ";" ) ) ) { - nLine.addParameter( "charset", "UTF-8" ); - nLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( nLine ); - - // NAME - VCardLine nameLine( "NAME", TQString((*addrIt).name()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).name() ) ) { - nameLine.addParameter( "charset", "UTF-8" ); - nameLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( nameLine ); - - // NICKNAME - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "NICKNAME", TQString((*addrIt).nickName()) ) ); - - // NOTE - VCardLine noteLine( "NOTE", TQString((*addrIt).note()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).note() ) ) { - noteLine.addParameter( "charset", "UTF-8" ); - noteLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( noteLine ); - - // ORG - TQStringList organization; - organization.append( ( *addrIt ).organization().replace( ';', "\\;" ) ); - if ( !( *addrIt ).department().isEmpty() ) - organization.append( ( *addrIt ).department().replace( ';', "\\;" ) ); - VCardLine orgLine( "ORG", organization.join( ";" ) ); - if ( version == VCard::v2_1 && needsEncoding( organization.join( ";" ) ) ) { - orgLine.addParameter( "charset", "UTF-8" ); - orgLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( orgLine ); - - // PHOTO - card.addLine( createPicture( "PHOTO", (*addrIt).photo() ) ); - - // PROID - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "PRODID", TQString((*addrIt).productId()) ) ); - - // REV - card.addLine( VCardLine( "REV", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).revision()) ) ) ); - - // ROLE - VCardLine roleLine( "ROLE", TQString((*addrIt).role()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).role() ) ) { - roleLine.addParameter( "charset", "UTF-8" ); - roleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( roleLine ); - - // SORT-STRING - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "SORT-STRING", TQString((*addrIt).sortString()) ) ); - - // SOUND - card.addLine( createSound( (*addrIt).sound() ) ); - - // TEL - const PhoneNumber::List phoneNumbers = (*addrIt).phoneNumbers(); - PhoneNumber::List::ConstIterator phoneIt; - for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) { - VCardLine line( "TEL", (*phoneIt).number() ); - - TQMap::ConstIterator typeIt; - for ( typeIt = mPhoneTypeMap.constBegin(); typeIt != mPhoneTypeMap.constEnd(); ++typeIt ) { - if ( typeIt.data() & (*phoneIt).type() ) - line.addParameter( "TYPE", typeIt.key() ); - } - - card.addLine( line ); - } - - // TITLE - VCardLine titleLine( "TITLE", TQString((*addrIt).title()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).title() ) ) { - titleLine.addParameter( "charset", "UTF-8" ); - titleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( titleLine ); - - // TZ - TimeZone timeZone = (*addrIt).timeZone(); - if ( timeZone.isValid() ) { - TQString str; - - int neg = 1; - if ( timeZone.offset() < 0 ) - neg = -1; - - str.sprintf( "%c%02d:%02d", ( timeZone.offset() >= 0 ? '+' : '-' ), - ( timeZone.offset() / 60 ) * neg, - ( timeZone.offset() % 60 ) * neg ); - - card.addLine( VCardLine( "TZ", str ) ); - } - - // UID - card.addLine( VCardLine( "UID", (*addrIt).uid() ) ); - - // UID - card.addLine( VCardLine( "URI", (*addrIt).uri() ) ); - - // URL - card.addLine( VCardLine( "URL", (*addrIt).url().url() ) ); - - // VERSION - if ( version == VCard::v2_1 ) - card.addLine( VCardLine( "VERSION", "2.1" ) ); - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "VERSION", "3.0" ) ); - - // X- - const TQStringList customs = (*addrIt).customs(); - for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) { - TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) ); - TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 ); - if ( value.isEmpty() ) - continue; - - VCardLine line( identifier, value ); - if ( version == VCard::v2_1 && needsEncoding( value ) ) { - line.addParameter( "charset", "UTF-8" ); - line.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( line ); - } - - vCardList.append( card ); - } - - return VCardParser::createVCards( vCardList ); -} - -Addressee::List VCardTool::parseVCards( const TQString& vcard ) -{ - static const TQChar semicolonSep( ';' ); - static const TQChar commaSep( ',' ); - TQString identifier; - - Addressee::List addrList; - const VCard::List vCardList = VCardParser::parseVCards( vcard ); - - VCard::List::ConstIterator cardIt; - VCard::List::ConstIterator listEnd( vCardList.end() ); - for ( cardIt = vCardList.begin(); cardIt != listEnd; ++cardIt ) { - Addressee addr; - - const TQStringList idents = (*cardIt).identifiers(); - TQStringList::ConstIterator identIt; - TQStringList::ConstIterator identEnd( idents.end() ); - for ( identIt = idents.begin(); identIt != identEnd; ++identIt ) { - const VCardLine::List lines = (*cardIt).lines( (*identIt) ); - VCardLine::List::ConstIterator lineIt; - - // iterate over the lines - for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { - identifier = (*lineIt).identifier().lower(); - // ADR - if ( identifier == "adr" ) { - Address address; - const TQStringList addrParts = splitString( semicolonSep, (*lineIt).value().asString() ); - if ( addrParts.count() > 0 ) - address.setPostOfficeBox( addrParts[ 0 ] ); - if ( addrParts.count() > 1 ) - address.setExtended( addrParts[ 1 ] ); - if ( addrParts.count() > 2 ) - address.setStreet( addrParts[ 2 ] ); - if ( addrParts.count() > 3 ) - address.setLocality( addrParts[ 3 ] ); - if ( addrParts.count() > 4 ) - address.setRegion( addrParts[ 4 ] ); - if ( addrParts.count() > 5 ) - address.setPostalCode( addrParts[ 5 ] ); - if ( addrParts.count() > 6 ) - address.setCountry( addrParts[ 6 ] ); - - int type = 0; - - const TQStringList types = (*lineIt).parameters( "type" ); - for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) - type += mAddressTypeMap[ (*it).lower() ]; - - address.setType( type ); - addr.insertAddress( address ); - } - - // AGENT - else if ( identifier == "agent" ) - addr.setAgent( parseAgent( *lineIt ) ); - - // BDAY - else if ( identifier == "bday" ) - addr.setBirthday( parseDateTime( (*lineIt).value().asString() ) ); - - // CATEGORIES - else if ( identifier == "categories" ) { - const TQStringList categories = splitString( commaSep, (*lineIt).value().asString() ); - addr.setCategories( categories ); - } - - // CLASS - else if ( identifier == "class" ) - addr.setSecrecy( parseSecrecy( *lineIt ) ); - - // EMAIL - else if ( identifier == "email" ) { - const TQStringList types = (*lineIt).parameters( "type" ); - addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 ); - } - - // FN - else if ( identifier == "fn" ) - addr.setFormattedName( (*lineIt).value().asString() ); - - // GEO - else if ( identifier == "geo" ) { - Geo geo; - - const TQStringList geoParts = TQStringList::split( ';', (*lineIt).value().asString(), true ); - geo.setLatitude( geoParts[ 0 ].toFloat() ); - geo.setLongitude( geoParts[ 1 ].toFloat() ); - - addr.setGeo( geo ); - } - - // KEY - else if ( identifier == "key" ) - addr.insertKey( parseKey( *lineIt ) ); - - // LABEL - else if ( identifier == "label" ) { - int type = 0; - - const TQStringList types = (*lineIt).parameters( "type" ); - for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) - type += mAddressTypeMap[ (*it).lower() ]; - - bool available = false; - KABC::Address::List addressList = addr.addresses(); - KABC::Address::List::Iterator it; - for ( it = addressList.begin(); it != addressList.end(); ++it ) { - if ( (*it).type() == type ) { - (*it).setLabel( (*lineIt).value().asString() ); - addr.insertAddress( *it ); - available = true; - break; - } - } - - if ( !available ) { // a standalone LABEL tag - KABC::Address address( type ); - address.setLabel( (*lineIt).value().asString() ); - addr.insertAddress( address ); - } - } - - // LOGO - else if ( identifier == "logo" ) - addr.setLogo( parsePicture( *lineIt ) ); - - // MAILER - else if ( identifier == "mailer" ) - addr.setMailer( (*lineIt).value().asString() ); - - // N - else if ( identifier == "n" ) { - const TQStringList nameParts = splitString( semicolonSep, (*lineIt).value().asString() ); - if ( nameParts.count() > 0 ) - addr.setFamilyName( nameParts[ 0 ] ); - if ( nameParts.count() > 1 ) - addr.setGivenName( nameParts[ 1 ] ); - if ( nameParts.count() > 2 ) - addr.setAdditionalName( nameParts[ 2 ] ); - if ( nameParts.count() > 3 ) - addr.setPrefix( nameParts[ 3 ] ); - if ( nameParts.count() > 4 ) - addr.setSuffix( nameParts[ 4 ] ); - } - - // NAME - else if ( identifier == "name" ) - addr.setName( (*lineIt).value().asString() ); - - // NICKNAME - else if ( identifier == "nickname" ) - addr.setNickName( (*lineIt).value().asString() ); - - // NOTE - else if ( identifier == "note" ) - addr.setNote( (*lineIt).value().asString() ); - - // ORGANIZATION - else if ( identifier == "org" ) { - const TQStringList orgParts = splitString( semicolonSep, (*lineIt).value().asString() ); - if ( orgParts.count() > 0 ) - addr.setOrganization( orgParts[ 0 ] ); - if ( orgParts.count() > 1 ) - addr.setDepartment( orgParts[ 1 ] ); - } - - // PHOTO - else if ( identifier == "photo" ) - addr.setPhoto( parsePicture( *lineIt ) ); - - // PROID - else if ( identifier == "prodid" ) - addr.setProductId( (*lineIt).value().asString() ); - - // REV - else if ( identifier == "rev" ) - addr.setRevision( parseDateTime( (*lineIt).value().asString() ) ); - - // ROLE - else if ( identifier == "role" ) - addr.setRole( (*lineIt).value().asString() ); - - // SORT-STRING - else if ( identifier == "sort-string" ) - addr.setSortString( (*lineIt).value().asString() ); - - // SOUND - else if ( identifier == "sound" ) - addr.setSound( parseSound( *lineIt ) ); - - // TEL - else if ( identifier == "tel" ) { - PhoneNumber phone; - phone.setNumber( (*lineIt).value().asString() ); - - int type = 0; - - const TQStringList types = (*lineIt).parameters( "type" ); - for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) - type += mPhoneTypeMap[(*it).upper()]; - - phone.setType( type ); - - addr.insertPhoneNumber( phone ); - } - - // TITLE - else if ( identifier == "title" ) - addr.setTitle( (*lineIt).value().asString() ); - - // TZ - else if ( identifier == "tz" ) { - TimeZone tz; - const TQString date = (*lineIt).value().asString(); - - int hours = date.mid( 1, 2).toInt(); - int minutes = date.mid( 4, 2 ).toInt(); - int offset = ( hours * 60 ) + minutes; - offset = offset * ( date[ 0 ] == '+' ? 1 : -1 ); - - tz.setOffset( offset ); - addr.setTimeZone( tz ); - } - - // UID - else if ( identifier == "uid" ) - addr.setUid( (*lineIt).value().asString() ); - - // URI - else if ( identifier == "uri" ) - addr.setUri( (*lineIt).value().asString() ); - - // URL - else if ( identifier == "url" ) - addr.setUrl( KURL( (*lineIt).value().asString() ) ); - - // X- - else if ( identifier.startsWith( "x-" ) ) { - const TQString key = (*lineIt).identifier().mid( 2 ); - int dash = key.find( "-" ); - addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() ); - } - } - } - - addrList.append( addr ); - } - - return addrList; -} - -TQDateTime VCardTool::parseDateTime( const TQString &str ) -{ - TQDateTime dateTime; - - if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd) - dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(), - str.mid( 6, 2 ).toInt() ) ); - - if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss - dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), - str.mid( 17, 2 ).toInt() ) ); - - } else { // is extended format yyyy-mm-dd - dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(), - str.mid( 8, 2 ).toInt() ) ); - - if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss - dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), - str.mid( 17, 2 ).toInt() ) ); - } - - return dateTime; -} - -TQString VCardTool::createDateTime( const TQDateTime &dateTime ) -{ - TQString str; - - if ( dateTime.date().isValid() ) { - str.sprintf( "%4d-%02d-%02d", dateTime.date().year(), dateTime.date().month(), - dateTime.date().day() ); - if ( dateTime.time().isValid() ) { - TQString tmp; - tmp.sprintf( "T%02d:%02d:%02dZ", dateTime.time().hour(), dateTime.time().minute(), - dateTime.time().second() ); - str += tmp; - } - } - - return str; -} - -Picture VCardTool::parsePicture( const VCardLine &line ) -{ - Picture pic; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) { - TQImage img; - img.loadFromData( line.value().asByteArray() ); - pic.setData( img ); - } else if ( params.findIndex( "value" ) != -1 ) { - if ( line.parameter( "value" ).lower() == "uri" ) - pic.setUrl( line.value().asString() ); - } - - if ( params.findIndex( "type" ) != -1 ) - pic.setType( line.parameter( "type" ) ); - - return pic; -} - -VCardLine VCardTool::createPicture( const TQString &identifier, const Picture &pic ) -{ - VCardLine line( identifier ); - - if ( pic.isIntern() ) { - if ( !pic.data().isNull() ) { - TQByteArray input; - TQBuffer buffer( input ); - buffer.open( IO_WriteOnly ); - - TQImageIO iio( &buffer, "JPEG" ); - iio.setImage( pic.data() ); - iio.setQuality( 100 ); - iio.write(); - - line.setValue( input ); - line.addParameter( "encoding", "b" ); - line.addParameter( "type", "image/jpeg" ); - } - } else if ( !pic.url().isEmpty() ) { - line.setValue( pic.url() ); - line.addParameter( "value", "URI" ); - } - - return line; -} - -Sound VCardTool::parseSound( const VCardLine &line ) -{ - Sound snd; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) - snd.setData( line.value().asByteArray() ); - else if ( params.findIndex( "value" ) != -1 ) { - if ( line.parameter( "value" ).lower() == "uri" ) - snd.setUrl( line.value().asString() ); - } - -/* TODO: support sound types - if ( params.contains( "type" ) ) - snd.setType( line.parameter( "type" ) ); -*/ - - return snd; -} - -VCardLine VCardTool::createSound( const Sound &snd ) -{ - VCardLine line( "SOUND" ); - - if ( snd.isIntern() ) { - if ( !snd.data().isEmpty() ) { - line.setValue( snd.data() ); - line.addParameter( "encoding", "b" ); - // TODO: need to store sound type!!! - } - } else if ( !snd.url().isEmpty() ) { - line.setValue( snd.url() ); - line.addParameter( "value", "URI" ); - } - - return line; -} - -Key VCardTool::parseKey( const VCardLine &line ) -{ - Key key; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) - key.setBinaryData( line.value().asByteArray() ); - else - key.setTextData( line.value().asString() ); - - if ( params.findIndex( "type" ) != -1 ) { - if ( line.parameter( "type" ).lower() == "x509" ) - key.setType( Key::X509 ); - else if ( line.parameter( "type" ).lower() == "pgp" ) - key.setType( Key::PGP ); - else { - key.setType( Key::Custom ); - key.setCustomTypeString( line.parameter( "type" ) ); - } - } - - return key; -} - -VCardLine VCardTool::createKey( const Key &key ) -{ - VCardLine line( "KEY" ); - - if ( key.isBinary() ) { - if ( !key.binaryData().isEmpty() ) { - line.setValue( key.binaryData() ); - line.addParameter( "encoding", "b" ); - } - } else if ( !key.textData().isEmpty() ) - line.setValue( key.textData() ); - - if ( key.type() == Key::X509 ) - line.addParameter( "type", "X509" ); - else if ( key.type() == Key::PGP ) - line.addParameter( "type", "PGP" ); - else if ( key.type() == Key::Custom ) - line.addParameter( "type", key.customTypeString() ); - - return line; -} - -Secrecy VCardTool::parseSecrecy( const VCardLine &line ) -{ - Secrecy secrecy; - - if ( line.value().asString().lower() == "public" ) - secrecy.setType( Secrecy::Public ); - if ( line.value().asString().lower() == "private" ) - secrecy.setType( Secrecy::Private ); - if ( line.value().asString().lower() == "confidential" ) - secrecy.setType( Secrecy::Confidential ); - - return secrecy; -} - -VCardLine VCardTool::createSecrecy( const Secrecy &secrecy ) -{ - VCardLine line( "CLASS" ); - - int type = secrecy.type(); - - if ( type == Secrecy::Public ) - line.setValue( "PUBLIC" ); - else if ( type == Secrecy::Private ) - line.setValue( "PRIVATE" ); - else if ( type == Secrecy::Confidential ) - line.setValue( "CONFIDENTIAL" ); - - return line; -} - -Agent VCardTool::parseAgent( const VCardLine &line ) -{ - Agent agent; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "value" ) != -1 ) { - if ( line.parameter( "value" ).lower() == "uri" ) - agent.setUrl( line.value().asString() ); - } else { - TQString str = line.value().asString(); - str.replace( "\\n", "\r\n" ); - str.replace( "\\N", "\r\n" ); - str.replace( "\\;", ";" ); - str.replace( "\\:", ":" ); - str.replace( "\\,", "," ); - - const Addressee::List list = parseVCards( str ); - if ( list.count() > 0 ) { - Addressee *addr = new Addressee; - *addr = list[ 0 ]; - agent.setAddressee( addr ); - } - } - - return agent; -} - -VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent ) -{ - VCardLine line( "AGENT" ); - - if ( agent.isIntern() ) { - if ( agent.addressee() != 0 ) { - Addressee::List list; - list.append( *agent.addressee() ); - - TQString str = createVCards( list, version ); - str.replace( "\r\n", "\\n" ); - str.replace( ";", "\\;" ); - str.replace( ":", "\\:" ); - str.replace( ",", "\\," ); - line.setValue( str ); - } - } else if ( !agent.url().isEmpty() ) { - line.setValue( agent.url() ); - line.addParameter( "value", "URI" ); - } - - return line; -} - -TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str ) -{ - TQStringList list; - TQString value( str ); - - int start = 0; - int pos = value.find( sep, start ); - - while ( pos != -1 ) { - if ( value[ pos - 1 ] != '\\' ) { - if ( pos > start && pos <= (int)value.length() ) - list << value.mid( start, pos - start ); - else - list << TQString::null; - - start = pos + 1; - pos = value.find( sep, start ); - } else { - if ( pos != 0 ) { - value.replace( pos - 1, 2, sep ); - pos = value.find( sep, pos ); - } else - pos = value.find( sep, pos + 1 ); - } - } - - int l = value.length() - 1; - if ( value.mid( start, l - start + 1 ).length() > 0 ) - list << value.mid( start, l - start + 1 ); - else - list << TQString::null; - - return list; -} diff --git a/kabc/vcardtool.h b/kabc/vcardtool.h deleted file mode 100644 index fbf959613..000000000 --- a/kabc/vcardtool.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDTOOL_H -#define KABC_VCARDTOOL_H - -#include "addressee.h" -#include "vcardparser.h" - -class TQDateTime; - -namespace KABC { - -class Agent; -class Key; -class Picture; -class Secrecy; -class Sound; - -class KABC_EXPORT VCardTool -{ - public: - VCardTool(); - ~VCardTool(); - - /** - Creates a string that contains the addressees from the list in - the vCard format. - */ - TQString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 ); - - /** - Parses the string and returns a list of addressee objects. - */ - Addressee::List parseVCards( const TQString& vcard ); - - private: - /** - Split a string and replaces escaped separators on the fly with - unescaped ones. - */ - TQStringList splitString( const TQChar &sep, const TQString &value ); - - TQDateTime parseDateTime( const TQString &str ); - TQString createDateTime( const TQDateTime &dateTime ); - - Picture parsePicture( const VCardLine &line ); - VCardLine createPicture( const TQString &identifier, const Picture &pic ); - - Sound parseSound( const VCardLine &line ); - VCardLine createSound( const Sound &snd ); - - Key parseKey( const VCardLine &line ); - VCardLine createKey( const Key &key ); - - Secrecy parseSecrecy( const VCardLine &line ); - VCardLine createSecrecy( const Secrecy &secrecy ); - - Agent parseAgent( const VCardLine &line ); - VCardLine createAgent( VCard::Version version, const Agent &agent ); - - TQMap mAddressTypeMap; - TQMap mPhoneTypeMap; - - class VCardToolPrivate; - VCardToolPrivate *d; -}; - -} - -#endif diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index d904e16ce..9bbe317df 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -27,7 +27,7 @@ #include "katejscript.h" #include "kateview.h" -#include +#include #include #include diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index 5a1a085c2..f29ec9915 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -23,7 +23,7 @@ #include "katedocument.h" #include "kateview.h" -#include +#include #include #include #include diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp index 7d930570d..61f81fadf 100644 --- a/kate/part/katebuffer.cpp +++ b/kate/part/katebuffer.cpp @@ -31,7 +31,7 @@ #include "kateautoindent.h" #include -#include +#include #include #include diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp index ad8943328..09dd46f13 100644 --- a/kate/part/katecmds.cpp +++ b/kate/part/katecmds.cpp @@ -32,7 +32,7 @@ #include "../interfaces/katecmd.h" #include -#include +#include #include #include diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp index 9c8e0856f..ed4eaacd2 100644 --- a/kate/part/kateconfig.cpp +++ b/kate/part/kateconfig.cpp @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 03257735c..1b8ce89eb 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -53,15 +53,15 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index 1928ec225..e42bfb0bd 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -49,24 +49,24 @@ #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h index a2a2c6408..adc0dc92a 100644 --- a/kate/part/katedocument.h +++ b/kate/part/katedocument.h @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/kate/part/katedocumenthelpers.cpp b/kate/part/katedocumenthelpers.cpp index e50906b0d..b2e43758f 100644 --- a/kate/part/katedocumenthelpers.cpp +++ b/kate/part/katedocumenthelpers.cpp @@ -25,7 +25,7 @@ #include "kateview.h" #include -#include +#include KateBrowserExtension::KateBrowserExtension( KateDocument* doc ) : KParts::BrowserExtension( doc, "katepartbrowserextension" ), diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp index eb760aaff..d6a9e0d59 100644 --- a/kate/part/katefactory.cpp +++ b/kate/part/katefactory.cpp @@ -34,7 +34,7 @@ #include "../interfaces/katecmd.h" #include -#include +#include #include #include diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index f0b01ef2d..281bf7e2d 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/katefont.cpp b/kate/part/katefont.cpp index 29955d7e2..c00953469 100644 --- a/kate/part/katefont.cpp +++ b/kate/part/katefont.cpp @@ -21,7 +21,7 @@ #include "katefont.h" -#include +#include #include diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index f6d5ae315..119b718fb 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -33,16 +33,16 @@ #include "kateconfig.h" #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp index f3a5cd548..cab335312 100644 --- a/kate/part/katejscript.cpp +++ b/kate/part/katejscript.cpp @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp index 46cf531a7..375b0b7d4 100644 --- a/kate/part/kateluaindentscript.cpp +++ b/kate/part/kateluaindentscript.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include extern "C" { #include diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 6f22b2407..e66119747 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -35,7 +35,7 @@ #include #include // for spacingHint() #include -#include +#include #include #include #include // for loginName diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 388513f17..5b71c92e8 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -27,7 +27,7 @@ #include "kateview.h" #include "katerenderer.h" -#include +#include #include #include #include @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index 9d0dc896b..930e4d906 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -31,9 +31,9 @@ #include "kateconfig.h" #include "katehighlight.h" -#include +#include #include -#include +#include #include #include #include diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index fc7e943cf..494e52894 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include KateSpell::KateSpell( KateView* view ) : TQObject( view ) diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp index d90f5de73..700daa9da 100644 --- a/kate/part/katesyntaxdocument.cpp +++ b/kate/part/katesyntaxdocument.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp index 6c701e1ed..005892607 100644 --- a/kate/part/katetextline.cpp +++ b/kate/part/katetextline.cpp @@ -23,7 +23,7 @@ #include "katetextline.h" #include "katerenderer.h" -#include +#include #include diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index 92d1bb97e..821cb0faf 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -57,10 +57,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index e8df70aa8..dd52451b0 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -33,10 +33,10 @@ #include "kateviewinternal.h" #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp index a687c5523..c2b0ca4db 100644 --- a/kate/part/kateviewinternal.cpp +++ b/kate/part/kateviewinternal.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index a503020c3..1b6decfe3 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index 495233d40..3f87f1580 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index 567262a64..e2e3d354a 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -28,10 +28,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index a36c9dc60..7cb01ccc9 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index d3b762b8e..e14cd9249 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include //END includes diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index 4a3d34207..26dce06d0 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kded/kbuildimageiofactory.cpp b/kded/kbuildimageiofactory.cpp index 267af31f6..b5873cad8 100644 --- a/kded/kbuildimageiofactory.cpp +++ b/kded/kbuildimageiofactory.cpp @@ -20,10 +20,10 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include -#include +#include #include #include diff --git a/kded/kbuildprotocolinfofactory.cpp b/kded/kbuildprotocolinfofactory.cpp index f3fe698d4..921e55ab9 100644 --- a/kded/kbuildprotocolinfofactory.cpp +++ b/kded/kbuildprotocolinfofactory.cpp @@ -21,11 +21,11 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include #include -#include +#include #include KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() : diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp index 7d9406d36..6f127caf2 100644 --- a/kded/kbuildservicefactory.cpp +++ b/kded/kbuildservicefactory.cpp @@ -23,10 +23,10 @@ #include "kresourcelist.h" #include "kmimetype.h" -#include +#include #include #include -#include +#include #include #include diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp index 76f27ba57..3903a6b39 100644 --- a/kded/kbuildservicegroupfactory.cpp +++ b/kded/kbuildservicegroupfactory.cpp @@ -21,11 +21,11 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include #include -#include +#include #include KBuildServiceGroupFactory::KBuildServiceGroupFactory() : diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp index 351b7847a..da2863347 100644 --- a/kded/kbuildservicetypefactory.cpp +++ b/kded/kbuildservicetypefactory.cpp @@ -21,11 +21,11 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include #include -#include +#include #include #include diff --git a/kded/kded.cpp b/kded/kded.cpp index b6e6b523f..947d3b816 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/kded/khostname.cpp b/kded/khostname.cpp index 7585e0ad0..c78152b97 100644 --- a/kded/khostname.cpp +++ b/kded/khostname.cpp @@ -30,9 +30,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kded/tde-menu.cpp b/kded/tde-menu.cpp index 4ad6bc3db..4cf7a843e 100644 --- a/kded/tde-menu.cpp +++ b/kded/tde-menu.cpp @@ -26,8 +26,8 @@ #include "tdeaboutdata.h" #include "tdeapplication.h" #include "tdecmdlineargs.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kservice.h" #include "kservicegroup.h" #include "kstandarddirs.h" diff --git a/kded/tdebuildsycoca.cpp b/kded/tdebuildsycoca.cpp index aa03c2c94..4325162f7 100644 --- a/kded/tdebuildsycoca.cpp +++ b/kded/tdebuildsycoca.cpp @@ -42,12 +42,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ #ifdef KBUILDSYCOCA_GUI // KBUILDSYCOCA_GUI is used on win32 to build // GUI version of tdebuildsycoca, so-called "tdebuildsycocaw". # include -# include +# include bool silent; bool showprogress; #endif diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index e2dc603ba..408c6af9a 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -23,7 +23,7 @@ #include // getenv #include -#include +#include #include #include #include diff --git a/kdewidgets/CMakeLists.txt b/kdewidgets/CMakeLists.txt index a0a6f29df..19768e7ef 100644 --- a/kdewidgets/CMakeLists.txt +++ b/kdewidgets/CMakeLists.txt @@ -61,6 +61,6 @@ add_custom_command( OUTPUT kdewidgets.cpp tde_add_kpart( ${target} AUTOMOC SOURCES ${${target}_SRCS} - LINK kabc-shared + LINK tdeabc-shared DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer ) diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets index c81df5394..81b5ba82a 100644 --- a/kdewidgets/kde.widgets +++ b/kdewidgets/kde.widgets @@ -272,7 +272,7 @@ Group=Display (KDE) ConstructorArgs=(parent, 210, 16) [KABC::LdapConfigWidget] -IncludeFile=kabc/ldapconfigwidget.h +IncludeFile=tdeabc/ldapconfigwidget.h ToolTip=A widget which allows the user to set up LDAP connection parameters Group=Input (KDE) ConstructorArgs=(KABC::LdapConfigWidget::W_ALL, parent, name) diff --git a/kdewidgets/tests/test.widgets b/kdewidgets/tests/test.widgets index 30758f69e..aa5ade889 100644 --- a/kdewidgets/tests/test.widgets +++ b/kdewidgets/tests/test.widgets @@ -261,7 +261,7 @@ Group=Display (KDE) ConstructorArgs=(parent, 210, 16) [KABC::AddressLineEdit] -IncludeFile=kabc/addresslineedit.h +IncludeFile=tdeabc/addresslineedit.h ToolTip=A lineedit with LDAP and kabc completion. Group=Input (KDE) ConstructorArgs=(parent, true, name) diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp index d0a1b7323..51f0b913a 100644 --- a/kdoctools/meinproc.cpp +++ b/kdoctools/meinproc.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kdoctools/tdeio_help.cpp b/kdoctools/tdeio_help.cpp index d9f306b43..7b9d2a36e 100644 --- a/kdoctools/tdeio_help.cpp +++ b/kdoctools/tdeio_help.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kdoctools/xslt.cpp b/kdoctools/xslt.cpp index 2eb03cfbc..498e6b2c8 100644 --- a/kdoctools/xslt.cpp +++ b/kdoctools/xslt.cpp @@ -12,7 +12,7 @@ #include #include #include "tdeio_help.h" -#include +#include #include #include #include diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp index d174bf893..22251002c 100644 --- a/kimgio/dds.cpp +++ b/kimgio/dds.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include // sqrtf diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp index d839ffe30..bcf916836 100644 --- a/kimgio/eps.cpp +++ b/kimgio/eps.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include "eps.h" diff --git a/kimgio/exr.cpp b/kimgio/exr.cpp index c28cb799b..563c151a2 100644 --- a/kimgio/exr.cpp +++ b/kimgio/exr.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/kimgio/gimp.h b/kimgio/gimp.h index 114ffdc0f..7da1a45f8 100644 --- a/kimgio/gimp.h +++ b/kimgio/gimp.h @@ -21,7 +21,7 @@ * */ -#include +#include /* * These are the constants and functions I extracted from The GIMP source diff --git a/kimgio/hdr.cpp b/kimgio/hdr.cpp index 82cba5c12..5f1832f02 100644 --- a/kimgio/hdr.cpp +++ b/kimgio/hdr.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include typedef TQ_UINT8 uchar; diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp index 2200c948c..5de8fff8e 100644 --- a/kimgio/jp2.cpp +++ b/kimgio/jp2.cpp @@ -12,7 +12,7 @@ #ifdef HAVE_STDINT_H #include #endif -#include +#include #include #include #include diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp index 4e4ad1f56..ccdbd3d97 100644 --- a/kinit/autostart.cpp +++ b/kinit/autostart.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index f6b4a3e59..1dc03002d 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -54,11 +54,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #ifdef HAVE_SYS_PRCTL_H #include @@ -68,7 +68,7 @@ #endif #if defined Q_WS_X11 && ! defined K_WS_QTONLY -#include // schroder +#include // schroder #endif #include diff --git a/kinit/tdelauncher.cpp b/kinit/tdelauncher.cpp index 7b75bfaf5..f7ca08678 100644 --- a/kinit/tdelauncher.cpp +++ b/kinit/tdelauncher.cpp @@ -32,16 +32,16 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #if defined Q_WS_X11 && ! defined K_WS_QTONLY -#include // schroder +#include // schroder #endif diff --git a/kinit/tdelauncher_main.cpp b/kinit/tdelauncher_main.cpp index d59cfb86f..747050668 100644 --- a/kinit/tdelauncher_main.cpp +++ b/kinit/tdelauncher_main.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "tdelauncher_cmds.h" diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index ccbde83d6..8c31712cb 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -21,12 +21,12 @@ #include "downloaddialog.h" #include "downloaddialog.moc" -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/knewstuff/engine.cpp b/knewstuff/engine.cpp index a22750f8b..2b33e85f5 100644 --- a/knewstuff/engine.cpp +++ b/knewstuff/engine.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include "knewstuff.h" diff --git a/knewstuff/entry.cpp b/knewstuff/entry.cpp index 56dd375f4..00f7df522 100644 --- a/knewstuff/entry.cpp +++ b/knewstuff/entry.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include using namespace KNS; diff --git a/knewstuff/ghns.cpp b/knewstuff/ghns.cpp index dfe86a2a4..0702f16bb 100644 --- a/knewstuff/ghns.cpp +++ b/knewstuff/ghns.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp index 07034b454..b652ba4a8 100644 --- a/knewstuff/knewstuff.cpp +++ b/knewstuff/knewstuff.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "engine.h" diff --git a/knewstuff/knewstuffbutton.cpp b/knewstuff/knewstuffbutton.cpp index 3ad0d6ac6..3baa83397 100644 --- a/knewstuff/knewstuffbutton.cpp +++ b/knewstuff/knewstuffbutton.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include "downloaddialog.h" #include "knewstuffbutton.h" diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp index aa94559b9..ef6a37456 100644 --- a/knewstuff/knewstuffgeneric.cpp +++ b/knewstuff/knewstuffgeneric.cpp @@ -24,11 +24,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include "entry.h" diff --git a/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp index b61924243..67374800e 100644 --- a/knewstuff/knewstuffsecure.cpp +++ b/knewstuff/knewstuffsecure.cpp @@ -18,10 +18,10 @@ //kde includes #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp index d5da6bdde..20f1668f7 100644 --- a/knewstuff/provider.cpp +++ b/knewstuff/provider.cpp @@ -21,9 +21,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp index ddc0b2ef3..f71558ecd 100644 --- a/knewstuff/providerdialog.cpp +++ b/knewstuff/providerdialog.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include "engine.h" #include "provider.h" diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp index d9ad85a7c..d161c2969 100644 --- a/knewstuff/security.cpp +++ b/knewstuff/security.cpp @@ -22,9 +22,9 @@ //kde includes #include #include -#include +#include #include -#include +#include #include #include diff --git a/knewstuff/tdehotnewstuff.cpp b/knewstuff/tdehotnewstuff.cpp index 87d735330..fb9e92a9b 100644 --- a/knewstuff/tdehotnewstuff.cpp +++ b/knewstuff/tdehotnewstuff.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp index 82b6d18f7..3494c5230 100644 --- a/knewstuff/testnewstuff.cpp +++ b/knewstuff/testnewstuff.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp index 98f8f60c7..f4b3dd50e 100644 --- a/knewstuff/uploaddialog.cpp +++ b/knewstuff/uploaddialog.cpp @@ -27,10 +27,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp index 9de7f1bfd..f271113ca 100644 --- a/kstyles/highcontrast/config/highcontrastconfig.cpp +++ b/kstyles/highcontrast/config/highcontrastconfig.cpp @@ -28,8 +28,8 @@ DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include +#include +#include #include "highcontrastconfig.h" diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index 5c083632e..a169de874 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -24,7 +24,7 @@ #include "klegacystyle.h" #include "klegacystyle.moc" -#include +#include #include #define INCLUDE_MENUITEM_DEF diff --git a/kstyles/klegacy/plugin.cpp b/kstyles/klegacy/plugin.cpp index 5d3a58492..558b54e73 100644 --- a/kstyles/klegacy/plugin.cpp +++ b/kstyles/klegacy/plugin.cpp @@ -1,5 +1,5 @@ #include "klegacystyle.h" -#include +#include extern "C" { TDEStyle* allocate(); diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index 4cc374e5d..a164821b1 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -53,7 +53,7 @@ Port version 0.9.7 #include #include #include -#include +#include #include #include #include diff --git a/kstyles/plastik/config/plastitdeconf.cpp b/kstyles/plastik/config/plastitdeconf.cpp index 8d3e4acfd..38cda2426 100644 --- a/kstyles/plastik/config/plastitdeconf.cpp +++ b/kstyles/plastik/config/plastitdeconf.cpp @@ -30,8 +30,8 @@ DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include +#include +#include #include #include diff --git a/kstyles/utils/installtheme/main.cpp b/kstyles/utils/installtheme/main.cpp index 274c2d335..3ce63dfdf 100644 --- a/kstyles/utils/installtheme/main.cpp +++ b/kstyles/utils/installtheme/main.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kstyles/web/plugin.cpp b/kstyles/web/plugin.cpp index 6ab10ebd8..bd4371ce3 100644 --- a/kstyles/web/plugin.cpp +++ b/kstyles/web/plugin.cpp @@ -1,4 +1,4 @@ -#include +#include #include "webstyle.h" extern "C" diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index d96688ee0..b3b461954 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include diff --git a/libtdemid/deviceman.cc b/libtdemid/deviceman.cc index b8210af6d..fec0ff090 100644 --- a/libtdemid/deviceman.cc +++ b/libtdemid/deviceman.cc @@ -67,7 +67,7 @@ #if 1 #include -#include +#include #include #endif diff --git a/libtdescreensaver/main.cpp b/libtdescreensaver/main.cpp index f9d8ccb17..073d7845d 100644 --- a/libtdescreensaver/main.cpp +++ b/libtdescreensaver/main.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp index c37214ecd..f36220886 100644 --- a/networkstatus/connectionmanager.cpp +++ b/networkstatus/connectionmanager.cpp @@ -20,8 +20,8 @@ */ #include -#include -#include +#include +#include #include #include "clientiface_stub.h" diff --git a/networkstatus/networkstatusindicator.cpp b/networkstatus/networkstatusindicator.cpp index 957d6f739..a77f1c1fd 100644 --- a/networkstatus/networkstatusindicator.cpp +++ b/networkstatus/networkstatusindicator.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "connectionmanager.h" diff --git a/tdeabc/CMakeLists.txt b/tdeabc/CMakeLists.txt new file mode 100644 index 000000000..e0ec832d0 --- /dev/null +++ b/tdeabc/CMakeLists.txt @@ -0,0 +1,123 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( vcard ) +add_subdirectory( vcardparser ) +add_subdirectory( formats ) +add_subdirectory( plugins ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include + ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include/generated + ${CMAKE_CURRENT_SOURCE_DIR}/vcardparser + + # external includes + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/kab +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + address.h addressbook.h addresseedialog.h + agent.h distributionlist.h distributionlistdialog.h + distributionlisteditor.h errorhandler.h field.h + format.h formatfactory.h formatplugin.h geo.h key.h + phonenumber.h picture.h plugin.h resource.h secrecy.h + resourceselectdialog.h sound.h stdaddressbook.h + timezone.h vcardconverter.h vcardformat.h lock.h + vcardformatplugin.h ldifconverter.h addresslineedit.h + ldapclient.h addresseelist.h locknull.h ldif.h + ldapurl.h ldapconfigwidget.h sortmode.h + ${CMAKE_CURRENT_BINARY_DIR}/addressee.h + DESTINATION ${INCLUDE_INSTALL_DIR}/tdeabc ) + + +##### other data ################################ + +install( FILES tdeab2tdeabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) +install( FILES kabc_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources ) +install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/tdeabc ) + + +##### generated files ########################### +# FIXME this hack make compatibility with out-of-source mode + +file( COPY + scripts/makeaddressee scripts/addressee.src.cpp + scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp + DESTINATION scripts ) + +add_custom_command( + OUTPUT addressee.cpp addressee.h field.cpp + COMMAND perl + ARGS makeaddressee + DEPENDS scripts/addressee.src.cpp scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts +) + + +##### tdeabc ###################################### + +set( target tdeabc ) + +set( ${target}_SRCS + address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp + agent.cpp distributionlist.cpp distributionlistdialog.cpp + distributionlisteditor.cpp errorhandler.cpp field.cpp + formatfactory.cpp geo.cpp key.cpp phonenumber.cpp + picture.cpp plugin.cpp resource.cpp resourceselectdialog.cpp + secrecy.cpp sound.cpp stdaddressbook.cpp timezone.cpp + vcard21parser.cpp vcardconverter.cpp vcardformat.cpp + vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp + addresslineedit.cpp ldapclient.cpp addresseelist.cpp + vcardtool.cpp addresseehelper.cpp lock.cpp locknull.cpp + ldif.cpp ldapurl.cpp ldapconfigwidget.cpp sortmode.cpp + addresseehelper.skel +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.2.0 + LINK vcards-static vcard-shared tdeio-shared tderesources-shared + DEPENDENCIES addressee.h dcopidl + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### tdeab2tdeabc ################################## + +set( target tdeab2tdeabc ) + +set( ${target}_SRCS + tdeab2tdeabc.cpp +) + +tde_add_executable( ${target} + SOURCES ${${target}_SRCS} + LINK kab-static tdeabc-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/tdeabc/HACKING b/tdeabc/HACKING new file mode 100644 index 000000000..429ae0865 --- /dev/null +++ b/tdeabc/HACKING @@ -0,0 +1,100 @@ +Coding Style +============ + +See http://korganizer.kde.org/hacking.html for an HTML version. + +Formatting +---------- + +- No Tabs. +- Indent with 2 spaces. +- A line must not have more than 80 chars. +- Put Spaces between brackets and arguments of functions. +- For if, else, while and similar statements put the brackets on the same line + as the statement. +- Function and class definitions have their brackets on separate lines. + +Example: + +void MyClass::myFunction() +{ + if ( blah == fasel ) { + blubbVariable = arglValue; + } else { + blubbVariable = oerxValue; + } +} + + +Header Formatting +----------------- + +- General formatting rules apply. +- Access modifiers are indented. +- Put curly brackets of class definition on its own line. +- Double inclusion protection defines are all upper case letters and are + composed of the namespace (if available), the classname and a H suffix + separated by underscores. +- Inside a namespace there is no indentation. + +Example: + +#ifndef XKJ_MYCLASS_H +#define XKJ_MYCLASS_H + +namespace XKJ { + +class MyClass +{ + public: + MyClass(); + + private: + int mMyInt; +}; + +} + +#endif + + +API docs +-------- + +- Each public function must have a Doxygen compatible comment in the header +- Use C-style comments without additional asterisks +- Indent correctly. +- Comments should be grammatically correct, e.g. sentences start with uppercase + letters and end with a full stop. +- Be concise. + +Example: + + /** + This function makes tea. + + @param cups number of cups. + @result tea + */ + Tea makeTea( int cups ); + + +Class and File Names +-------------------- + +- Put classes in files, which have the same name as the class, but only + lower-case letters. +- Designer-generated files should have a name classname_base.ui and shoul + contain a class called ClassnameBase. +- Classes inheriting from designer-generated classes have the same name as the + generated class, but without the Base suffix. + +Class and Variable Names +------------------------ + +- For class, variable, function names seperate multiple words by upper-casing + the words precedeed by other words. +- Class names start with an upper-case letter. +- Function names start with a lower-case letter. +- Variable names start with a lower-case letter. +- Member variables of a class start with "m" followed by an upper-case letter. diff --git a/tdeabc/HOWTO b/tdeabc/HOWTO new file mode 100644 index 000000000..3941b2033 --- /dev/null +++ b/tdeabc/HOWTO @@ -0,0 +1,372 @@ +The KDE Address Book Framework +=============================== + +The KDE address book framework tries to provide an easy to use and powerful +mechanism to handle contacts in all KDE applications. + +If you want to make use of it, this small introduction to programming +with libkabc may be helpful. + + +General Concepts +================= + +In libkabc the storage and management of contacts is devided in 2 layers. + +****************** +Management Layer * +****************** + + .-------------------. + | KABC::AddressBook | + .--------------------------------. + | KABC::Addressee | => Iterators + | KABC::Addressee | + | KABC::Addressee | => Search functions + | ... | + `--------------------------------' + | + - - - - - - - - - - - | - - - - - - - - - - - - - + | +*************** | +Storage Layer * | +*************** | ....................... + | . . - Network + .---------------. | . .---------------. . + | ResourceFile |----+-----| ResourceLDAP | . + `---------------' | . `---------------' . + .---------------. | . .---------------. . + | ResourceDir |----+-----| ResourceNet | . + `---------------' . `---------------' . + . . + ....................... + + +The Management Layer +--------------------- +The Management Layer consists of the two classes KABC::AddressBook and +KABC::Addressee. KABC::AddressBook is a container for KABC::Addressee objects +and provides 2 kinds of access methods. +1) Iterators + With iterators you can iterate over each of the contacts of the + address book and perform an action on it + +2) Search functions + With search functions you can search for contacts with special attributes + such as "all contacts with the name 'Harald'" + +The class KABC::Addressee represents a single contact and contains all data +a vCard could store (as specified in RFC 2426). + +The Storage Layer +------------------ +The Storage Layer consists of the class KABC::Resource and its derived classes. +These classes are used by KABC::AddressBook to load and store the contacts to +the single backends. +At the moment libkabc provides 4 types of resources: +1) ResourceFile + - stores all contacts in a single file + +2) ResourceDir + - stores each contact in its own file with the unique identifier of the + contact as a filename, will all of the files together in one directory + +3) ResourceLDAP + - stores all of the contacts on a LDAP server + +4) ResourceNet + - stores all contacts in a single file, which can be accessable via HTTP, + FTP, Fish, WebDAV, POP3, IMAP or whatever the KIO frame work supports + +In general the developer does not have to take how to save the single contacts. +He just has to plug one of the above mentioned resources into KABC::AddressBook +and perform a save action. + +Examples +========= +Like a picture, C/C++ code is worth a 1000 words I'd like to give you a +lot of examples now, how to use libkabc for several tasks: + + +Using KABC::StdAddressBook and Iterators +----------------------------------------- +Normally you have to plugin the resources manually into the addressbook object +and call the load() function before you can access the contacts, but there is +a special class KABC::StdAddressBook, which loads all resources of the standard +address book of the user automatically. You can use it the following way: + + + #include + + 1: KABC::AddressBook *ab = KABC::StdAddressBook::self(); + 2: KABC::AddressBook::Iterator it; + 3: for ( it = ab->begin(); it != ab->end(); ++it ) { + 4: KABC::Addressee addr = (*it); + 5: + 6: kdDebug() << "Name = " << addr.formattedName() << endl; + 7: } + +The above example prints out the names of all the contacts in the user's address +book. In line 1 you retrieve a pointer to the user's standard address book +(provided by KABC::StdAddressBook via a singleton design pattern). +In line 2 an iterator is defined, which is used in line 3 to iterate over the +whole address book. The assignment in line 4 is intended only to show more +clearly how iterators function. +You could also use (*it).formattedName() directly. In line 6 the formatted name +of the current contact is printed out to stderr. +As you can see that's all magic, and it's quite easy ;) + + +Using KABC::AddressBook manually +--------------------------------- +In some cases you don't want to load the user's standard address book, but, +for example, just a single vCard. For this purpose you have to use the +class KABC::AddressBook and handle the resource stuff manually. +The following code will create a file resource and save a contact into it: + + + #include + #include + + 1: KABC::AddressBook ab; + 2: + 3: // create a file resource + 4: KABC::Resource *res = new KABC::ResourceFile( "/home/user/myvcard.vcf", "vcard" ); + 5: + 6: if ( !ab.addResource( res ) ) { + 7: kdDebug() << "Unable to open resource" << endl; + 8: return 1; + 9: } +10: +11: if ( !ab.load() ) { +12: kdDebug() << "Unable to load address book!" << endl; +13: return 2; +14: } +15: +16: KABC::Addressee addr; +17: addr.setNameFromString( "Otto Harald Meyer" ); +18: addr.setBirthday( QDate( 1982, 07, 19 ) ); +19: addr.setNickName( "otto" ); +20: addr.setMailer( "kmail" ); +21: +22: // TZ +23: KABC::TimeZone tz( 60 ); // takes time shift in minutes as argument +24: addr.setTimeZone( tz ); +25: +26: // GEO +27: KABC::Geo geo( 52.5, 13.36 ); // takes latitude and longitude as argument +28: addr.setGeo( geo ); +29: +30: addr.setTitle( "dude, the" ); +31: addr.setRole( "developer" ); +32: addr.setOrganization( "KDE e.V." ); +33: addr.setNote( "Yet another senseless note..." ); +34: addr.setUrl( KURL( "http://kaddressbook.org" ) ); +35: +36: // CLASS +37: KABC::Secrecy secrecy( KABC::Secrecy::Confidential ); +38: addr.setSecrecy( secrecy ); +39: +40: // PHOTO or LOGO +41: KABC::Picture photo; +42: QImage img; +43: if ( img.load( "face.png", "PNG" ) ) { +44: photo.setData( img ); +45: photo.setType( "image/png" ); +46: addr.setPhoto( photo ); +47: } +48: +49: addr.insertEmail( "otto@kde.se", true ); // preferred email +50: addr.insertEmail( "otti@yahoo.com", false ); +51: +52: // TEL +53: KABC::PhoneNumber phoneHome( "0351 5466738", KABC::PhoneNumber::Home ); +54: KABC::PhoneNumber phoneWork( "0351 2335411", KABC::PhoneNumber::Work ); +55: addr.insertPhoneNumber( phoneHome ); +56: addr.insertPhoneNumber( phoneWork ); +57: +58: // ADR +59: KABC::Address homeAddr( KABC::Address::Home ); +60: homeAddr.setStreet( "Milliwaystreet 42" ); +61: homeAddr.setLocality( "London" ); +62: homeAddr.setRegion( "Saxony" ); +63: homeAddr.setPostalCode( "43435" ); +64: homeAddr.setCountry( "Germany" ); +65: addr.insertAddress( homeAddr ); +66: +67: addr.insertCategory( "LUG-Dresden-Members" ); +68: +69: addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", "21.04.2009" ); +70: +71: ab.insertAddressee( addr ); // will be assigned to the standard resource +72: // automatically +73: +74: KABC::Ticket *ticket = ab.requestSaveTicket( res ); +75: if ( !ticket ) { +76: kdError() << "Resource is locked by other application!" << endl; +77: } else { +78: if ( !ab.save( ticket ) ) { +79: kdError() << "Saving failed!" << endl; +80: ab.releaseSaveTicket( ticket ); +81: } +82: +83: } +84: +85: return 0; + +In line 1 the KABC::AddressBook is created. In line 4 you creat the +KABC::ResourceFile (which will handle the loading/saving). +The resource takes 2 arguments, the first is the file name and the +second one the file format. At the moment libkabc supports two file formats: +1) vCard, as specified in RFC 2426 +2) Binary, which increases performance during loading and saving + +In line 6 we try to plug the resource into the addressbook. The addressbook +class tries to open the resource immediately and returns whether opening was +successful. We add here only one resource, but you can add as many resources +as you want. + +In line 11 we try to load all contacts from the backends into the address book. +As before, it returns whether opening was successful. + +In line 16 a KABC::Addressee is created, which we will fill now with data, +before inserting it into the KABC::AddressBook. +The setNameFromString() function in the following line takes a string as +argument and tries to parse it into the single name components such as: given +name, family name, additional names, honoric prefix and honoric suffix. +You can set these values manually as well by calling + addr.setGivenName( "Otto" ); +and + addr.setFamilyName( "Meyer" ); +etc. etc. + +In line 23 we use the class KABC::TimeZone to store the timezone. This class +takes the time shift in minutes. + +In line 27 the KABC::Geo class is used for storing the geographical +information. The arguments are the latitude and longitude as float values. + +KABC::Secrecy in line 37 represents the CLASS entity of a vCard and can take +KABC::Secrecy::Public, KABC::Secrecy::Private or KABC::Secrecy::Confidential +as argument. + +In line 41 we make use of KABC::Picture class to store the photo of the +contact. This class can contain either an URL or the raw image data in form +of a QImage, in this example we use the latter. + +In line 43 we try to load the image "face.png" from the local directory and +assign this QImage to the KABC::Picture class via the setData() function. +Additionally we set the type of the picture to "image/png". + +From 49 - 50 we insert 2 email addresses with the first one as preferred +(second argument is true). + +In 53 and the following 3 lines we add two telephone numbers. For this purpose +libkabc provides the KABC::PhoneNumber class, which takes the phone number in +string representation as first argument and the type as second. The types can +be combined, so 'KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax' would be +the Home Fax. + +In line 59 we create a KABC::Address object and set the single parts in the +following lines. + +In line 67 we assign the contact to a special category. + +A contact can also contain custom entries, which are not specified in the API, +so you can add custom values with insertCustom() as shown in line 69. +The first argument of this function should be the name of the application, so +2 applications which use the same custom entry accidentally, do not overwrite +the data for each other. The second argument contains the name of the +custom entry and the third argument the value in string representation. + +In line 71 we finally insert the KABC::Addressee object into the +KABC::AddressBook. Since we have only one resource loaded, the contact is +automatically assigned to this resource. If you have several writeable +resources loaded, you should ask the user which resource the contact shall +belong to and assign the selected resource to the contact with + KABC::Addressee.setResource( KABC::Resource *resource ); +before inserting it into the address book. + +To prevent multiple access to one resource and possible resulting data loss +we have to lock the resource before saving our changes. +For this purpose KABC::AddressBook provides the function + requestSaveTicket( KABC::Resource* ) +which takes a pointer to the resource which shall be saved as argument and +returns a so called 'Save Ticket' if locking succeeded or a null pointer +if the resource is already locked by another application. + +So when we retrieved a valid ticket in line 74, we try to save our changes in +line 78. +The KABC::AddressBook::save() function takes the save ticket as argument and +returns whether saving succeeded. It also releases the save ticket when successful. + +Important! +If the save() call fails, you have to release the save ticket manually, as is +done in line 80, otherwise possible locks, created by the resources, won't be +removed. + +You can see also, that manual use is quite easy for the KABC::AddressBook class +and for the ResourceFile. For more information about the API of KABC::Addressee +please take a look at the official API documentation or the header files. + + +Distribution Lists +------------------- +libkabc provides so called distribution lists to group contacts. These lists +just store the uid of contacts, so they can be used for every kind of contact +grouping. There are 2 classes which handle the whole distribution list tasks, +KABC::DistributionListManager and KABC::DistributionList. The first one keeps +track of all available distribution lists and the latter one is the +representation of one list. + + + #include + #include + + 1: KABC::DistributionListManager manager( KABC::StdAddressBook::self() ); + 2: + 3: // load the lists + 4: manager.load(); + 5: + 6: QStringList listNames = manager.listNames(); + 7: QStringList::Iterator it; + 8: for ( it = listNames.begin(); it != listNames.end(); ++it ) { + 9: KABC::DistributionList *list = manager.list( *it ); +10: kdDebug() << list->name() << endl; +11: +12: QStringList emails = list->emails(); +13: QStringList::Iterator eit; +14: for ( eit = emails.begin(); eit != emails.end(); ++eit ) +15: kdDebug() << QString( "\t%1" ).arg( (*eit).latin1() ) << endl; +16: } + +In the first line a KABC::DistributionListManager is created. The manager takes +a pointer to a KABC::AddressBook, because he has to resolve the stored uids to +currently available email addresses. +In line 4 the manager loads all distribution lists from the central config file +$HOME/.trinity/share/apps/tdeabc/distlists. +The next line queries the names of all available distribution lists, which are +used in line 9 to retrieve a pointer to the specific list. +Now that you have a KABC::DistributionList object, you can performe the +following actions on it: + - set / get the name + - insert an entry + - remove an entry + - get a list of all email addresses + - get a list of all entries (which includes the uids) + +In line 12 we query all email addresses of every resource and print them out. + + contains also the declaration for the class +KABC::DistributionListWatcher. This class exists only once per application and +its only job is to emit a signal as soon as the distribution list file has +changed. So to make your application aware of changes use the following code: + + + #include + + 1: connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ), + 2: this, SLOT( slotDistributionListChanged() ) ); + +You see, as usual, easy ;) + diff --git a/tdeabc/Makefile.am b/tdeabc/Makefile.am new file mode 100644 index 000000000..57e72aec2 --- /dev/null +++ b/tdeabc/Makefile.am @@ -0,0 +1,72 @@ +SUBDIRS = vcard vcardparser . formats plugins scripts tests + +# Make sure $(all_includes) remains last! +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ + -I$(srcdir)/vcard/include -I$(srcdir)/vcardparser/ \ + -I$(srcdir)/vcard/include/generated \ + -I$(srcdir)/vcardparser $(all_includes) + +field.cpp: addressee.h addressee.cpp +addressee.cpp: addressee.h +addressee.cpp addressee.h field.cpp: \ + $(srcdir)/scripts/makeaddressee \ + $(srcdir)/scripts/addressee.src.cpp \ + $(srcdir)/scripts/addressee.src.h \ + $(srcdir)/scripts/entrylist \ + $(srcdir)/scripts/field.src.cpp + mysrcdir=`cd $(srcdir)/scripts && pwd` ;\ + cd scripts && $(PERL) $$mysrcdir/makeaddressee + +CLEANFILES = addressee.h addressee.cpp field.cpp + +lib_LTLIBRARIES = libkabc.la +libkabc_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 3:0:2 -no-undefined +libkabc_la_LIBADD = vcard/libvcard.la vcardparser/libvcards.la $(LIB_KIO) \ + $(top_builddir)/tderesources/libtderesources.la $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE) +libkabc_la_COMPILE_FIRST = addressee.h + +libkabc_la_SOURCES = \ + address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp agent.cpp \ + distributionlist.cpp distributionlistdialog.cpp distributionlisteditor.cpp \ + errorhandler.cpp field.cpp formatfactory.cpp geo.cpp key.cpp \ + phonenumber.cpp picture.cpp plugin.cpp resource.cpp \ + resourceselectdialog.cpp secrecy.cpp sound.cpp stdaddressbook.cpp \ + timezone.cpp vcard21parser.cpp vcardconverter.cpp vcardformat.cpp \ + vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp addresslineedit.cpp \ + ldapclient.cpp addresseelist.cpp vcardtool.cpp addresseehelper.cpp \ + addresseehelper.skel lock.cpp locknull.cpp ldif.cpp ldapurl.cpp ldapconfigwidget.cpp \ + sortmode.cpp + + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = address.h addressbook.h addressee.h addresseedialog.h \ + agent.h distributionlist.h distributionlistdialog.h distributionlisteditor.h \ + errorhandler.h field.h format.h formatfactory.h formatplugin.h geo.h key.h \ + phonenumber.h picture.h plugin.h resource.h \ + resourceselectdialog.h secrecy.h sound.h stdaddressbook.h timezone.h \ + vcardconverter.h vcardformat.h vcardformatplugin.h ldifconverter.h \ + addresslineedit.h ldapclient.h addresseelist.h lock.h locknull.h ldif.h \ + ldapurl.h ldapconfigwidget.h sortmode.h + +METASOURCES = AUTO + +bin_PROGRAMS = tdeab2tdeabc + +tdeab2tdeabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdeab2tdeabc_LDADD = libkabc.la ../kab/libkab.la +tdeab2tdeabc_SOURCES = tdeab2tdeabc.cpp + +autostart_DATA = tdeab2tdeabc.desktop +autostartdir = $(datadir)/autostart + +manager_DATA = kabc_manager.desktop +managerdir = $(kde_servicesdir)/tderesources + +DOXYGEN_REFERENCES = tdecore tdeui + +map_DATA = countrytransl.map +mapdir = $(kde_datadir)/kabc + +EXTRA_DIST = $(map_DATA) + +include ../admin/Doxyfile.am diff --git a/tdeabc/README b/tdeabc/README new file mode 100644 index 000000000..46d21b9b6 --- /dev/null +++ b/tdeabc/README @@ -0,0 +1,28 @@ +LIBKABC - new address book API for KDE + +PURPOSE: + +libkabc provides an API for address book data. This can be used by all KDE +application using data of this type, e.g. KAddressBook, KMail, KOrganizer, +KPilot etc. It is meant as replacement for libkab (in tdebase/kab). + +FEATURES: + +- Value based interface, addressbook entry data is implicitly shared. +- Address book entries are identified by a unique id. +- vCard backend (RFC 2425 / RFC 2426). +- Locking mechanism to support concurrent access to the address book by + multiple processes. +- Notification on change of addressbook by other process. +- Dialog for selecting address book entries, supports mouse and keyboard + selection, supports automatic name completion. +- GUI client for viewing, modifying address book data. This is aimed at + developers not end users. +- Tool for converting data, written with libkab, to libkabc format. +- Multiple backends (resources) for storing entries e.g. LDAP + +AUTHOR: Cornelius Schumacher + +LICENCE: LPGL + +DATE: 13 Oct 2001 diff --git a/tdeabc/README.AddressFormat b/tdeabc/README.AddressFormat new file mode 100644 index 000000000..8079e4914 --- /dev/null +++ b/tdeabc/README.AddressFormat @@ -0,0 +1,66 @@ +Address formats can be a tricky thing. libkabc tries very hard to perfectly fit +the needs of ~95% of users and to be at least sufficient for the other 5%. + +The formatting of an address depends on the destination country as well as on +the origin country of a letter. Basically, the part indicating the destination +country follows the rules of the country of origin, all the rest follows the +rules of the destination country. So we need to store for every country a) the +country positioning and b) the address formatting. + +Address formats should usually be stored in a country's entry.desktop. There we +store the country position in field "AddressCountryPosition" and the address +format in a field "AddressFormat". Note that for most countries one field +"AddressFormat" is sufficient for personal as well as company addresses +(because personal addresses look just like business addresses without company); +however, in some countries (eg. Hungary) business addresses differ in their +structure. In this case you have the possibility of adding another field +"BusinessAddressFormat" which will be preferred for formatting of business +addresses; if libkabc can't find such a field, it will fall back to +"AddressFormat". (Please use BusinessAddressFormat ONLY if you really need to) + +The format consists mainly of tags that will be replaced by address fields. +The list of tags may grow in the future, the format *might* change in the near +future, but I hope not. + +Any comments very very welcome to kde-pim@kde.org or to jost@schenck.de. + +-Jost. + +Fields AddressFormat and BusinessAddressFormat +------------------------------------------------ +%n = real name +%N = REAL NAME +%cm = company +%CM = COMPANY +%s = street +%S = STREET +%z = zip code +%l = location +%L = LOCATION +%r = region +%R = REGION +%p = post office box +%, = conditional comma+whitespace, + will be left out if the value left or right of it is purged +%w = conditional whitespace, + will be left out if the value left or right of it is purged +%0(...) = the text inside the brackets will be completely purged if not + at least one tag inside it evaluates to something. Example: when the + address doesn't have a postbox, the string %0(PO Box %p) will not + evaluate to "PO Box " but to an empty string. +\n = newline + +Field AddressCountryPosition +------------------------------------------------ +below = country name below rest of address +BELOW = country name below in capital letters +above = country name above rest of address +ABOVE = country name above in capital letters + +Some Tips +------------------------------------------------ +- You sometimes have three fields in a line which can all be empty. If you eg. +separate them all with conditional whitespace (same goes for cond. comma) like +in "%z%w%r%w%l" and only the middle value (here: region) is empty, there will +be no whitespace at all between the outer values (here: zipcode and location). +To avoid this, combine two of these values with purge brackets: %0(%z%w%r)%w%l. diff --git a/tdeabc/TODO b/tdeabc/TODO new file mode 100644 index 000000000..13f75b6bb --- /dev/null +++ b/tdeabc/TODO @@ -0,0 +1 @@ +Factor out TDELockFile. diff --git a/tdeabc/address.cpp b/tdeabc/address.cpp new file mode 100644 index 000000000..112a70617 --- /dev/null +++ b/tdeabc/address.cpp @@ -0,0 +1,592 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "address.h" + +#include +#include +#include +#include +#include +#include + +#include + +using namespace KABC; + +TQMap *Address::mISOMap = 0; +static KStaticDeleter< TQMap > isoMapDeleter; + +Address::Address() : + mEmpty( true ), mType( 0 ) +{ + mId = TDEApplication::randomString( 10 ); +} + +Address::Address( int type ) : + mEmpty( true ), mType( type ) +{ + mId = TDEApplication::randomString( 10 ); +} + +bool Address::operator==( const Address &a ) const +{ + if ( mPostOfficeBox != a.mPostOfficeBox ) return false; + if ( mExtended != a.mExtended ) return false; + if ( mStreet != a.mStreet ) return false; + if ( mLocality != a.mLocality ) return false; + if ( mRegion != a.mRegion ) return false; + if ( mPostalCode != a.mPostalCode ) return false; + if ( mCountry != a.mCountry ) return false; + if ( mLabel != a.mLabel ) return false; + + return true; +} + +bool Address::operator!=( const Address &a ) const +{ + return !( a == *this ); +} + +bool Address::isEmpty() const +{ + if ( mPostOfficeBox.isEmpty() && + mExtended.isEmpty() && + mStreet.isEmpty() && + mLocality.isEmpty() && + mRegion.isEmpty() && + mPostalCode.isEmpty() && + mCountry.isEmpty() && + mLabel.isEmpty() ) { + return true; + } + return false; +} + +void Address::clear() +{ + *this = Address(); +} + +void Address::setId( const TQString &id ) +{ + mEmpty = false; + + mId = id; +} + +TQString Address::id() const +{ + return mId; +} + +void Address::setType( int type ) +{ + mEmpty = false; + + mType = type; +} + +int Address::type() const +{ + return mType; +} + +TQString Address::typeLabel() const +{ + TQString label; + bool first = true; + + const TypeList list = typeList(); + + TypeList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { + label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); + if ( first ) + first = false; + } + } + + return label; +} + +void Address::setPostOfficeBox( const TQString &s ) +{ + mEmpty = false; + + mPostOfficeBox = s; +} + +TQString Address::postOfficeBox() const +{ + return mPostOfficeBox; +} + +TQString Address::postOfficeBoxLabel() +{ + return i18n("Post Office Box"); +} + + +void Address::setExtended( const TQString &s ) +{ + mEmpty = false; + + mExtended = s; +} + +TQString Address::extended() const +{ + return mExtended; +} + +TQString Address::extendedLabel() +{ + return i18n("Extended Address Information"); +} + + +void Address::setStreet( const TQString &s ) +{ + mEmpty = false; + + mStreet = s; +} + +TQString Address::street() const +{ + return mStreet; +} + +TQString Address::streetLabel() +{ + return i18n("Street"); +} + + +void Address::setLocality( const TQString &s ) +{ + mEmpty = false; + + mLocality = s; +} + +TQString Address::locality() const +{ + return mLocality; +} + +TQString Address::localityLabel() +{ + return i18n("Locality"); +} + + +void Address::setRegion( const TQString &s ) +{ + mEmpty = false; + + mRegion = s; +} + +TQString Address::region() const +{ + return mRegion; +} + +TQString Address::regionLabel() +{ + return i18n("Region"); +} + + +void Address::setPostalCode( const TQString &s ) +{ + mEmpty = false; + + mPostalCode = s; +} + +TQString Address::postalCode() const +{ + return mPostalCode; +} + +TQString Address::postalCodeLabel() +{ + return i18n("Postal Code"); +} + + +void Address::setCountry( const TQString &s ) +{ + mEmpty = false; + + mCountry = s; +} + +TQString Address::country() const +{ + return mCountry; +} + +TQString Address::countryLabel() +{ + return i18n("Country"); +} + + +void Address::setLabel( const TQString &s ) +{ + mEmpty = false; + + mLabel = s; +} + +TQString Address::label() const +{ + return mLabel; +} + +TQString Address::labelLabel() +{ + return i18n("Delivery Label"); +} + +Address::TypeList Address::typeList() +{ + static TypeList list; + + if ( list.isEmpty() ) + list << Dom << Intl << Postal << Parcel << Home << Work << Pref; + + return list; +} + +TQString Address::typeLabel( int type ) +{ + if ( type & Pref ) + return i18n( "Preferred address", "Preferred" ); + + switch ( type ) { + case Dom: + return i18n("Domestic"); + break; + case Intl: + return i18n("International"); + break; + case Postal: + return i18n("Postal"); + break; + case Parcel: + return i18n("Parcel"); + break; + case Home: + return i18n("Home Address", "Home"); + break; + case Work: + return i18n("Work Address", "Work"); + break; + case Pref: + return i18n("Preferred Address"); + break; + default: + return i18n("Other"); + break; + } +} + +void Address::dump() const +{ + kdDebug(5700) << " Address {" << endl; + kdDebug(5700) << " Id: " << id() << endl; + kdDebug(5700) << " Extended: " << extended() << endl; + kdDebug(5700) << " Street: " << street() << endl; + kdDebug(5700) << " Postal Code: " << postalCode() << endl; + kdDebug(5700) << " Locality: " << locality() << endl; + kdDebug(5700) << " }" << endl; +} + + +TQString Address::formattedAddress( const TQString &realName, + const TQString &orgaName ) const +{ + TQString ciso; + TQString addrTemplate; + TQString ret; + + // FIXME: first check for iso-country-field and prefer that one + if ( !country().isEmpty() ) { + ciso = countryToISO( country() ); + } else { + // fall back to our own country + ciso = TDEGlobal::locale()->country(); + } + KSimpleConfig entry( locate( "locale", + TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) ); + entry.setGroup( "KCM Locale" ); + + // decide whether this needs special business address formatting + if ( orgaName.isEmpty() ) { + addrTemplate = entry.readEntry( "AddressFormat" ); + } else { + addrTemplate = entry.readEntry( "BusinessAddressFormat" ); + if ( addrTemplate.isEmpty() ) + addrTemplate = entry.readEntry( "AddressFormat" ); + } + + // in the case there's no format found at all, default to what we've always + // used: + if ( addrTemplate.isEmpty() ) { + kdWarning(5700) << "address format database incomplete " + << "(no format for locale " << ciso + << " found). Using default address formatting." << endl; + addrTemplate = "%0(%n\\n)%0(%cm\\n)%0(%s\\n)%0(PO BOX %p\\n)%0(%l%w%r)%,%z"; + } + + // scan + parseAddressTemplateSection( addrTemplate, ret, realName, orgaName ); + + // now add the country line if needed (formatting this time according to + // the rules of our own system country ) + if ( !country().isEmpty() ) { + KSimpleConfig entry( locate( "locale", TQString( "l10n/" ) + + TDEGlobal::locale()->country() + TQString( "/entry.desktop" ) ) ); + entry.setGroup( "KCM Locale" ); + TQString cpos = entry.readEntry( "AddressCountryPosition" ); + if ( "BELOW" == cpos || cpos.isEmpty() ) { + ret = ret + "\n\n" + country().upper(); + } else if ( "below" == cpos ) { + ret = ret + "\n\n" + country(); + } else if ( "ABOVE" == cpos ) { + ret = country().upper() + "\n\n" + ret; + } else if ( "above" == cpos ) { + ret = country() + "\n\n" + ret; + } + } + + return ret; +} + +bool Address::parseAddressTemplateSection( const TQString &tsection, + TQString &result, const TQString &realName, const TQString &orgaName ) const +{ + // This method first parses and substitutes any bracketed sections and + // after that replaces any tags with their values. If a bracketed section + // or a tag evaluate to zero, they are not just removed but replaced + // with a placeholder. This is because in the last step conditionals are + // resolved which depend on information about zero-evaluations. + result = tsection; + int stpos = 0; + bool ret = false; + + // first check for brackets that have to be evaluated first + int fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); + while ( -1 != fpos ) { + int bpos1 = fpos + KABC_FMTTAG_purgeempty.length(); + int bpos2; + // expect opening bracket and find next balanced closing bracket. If + // next char is no opening bracket, continue parsing (no valid tag) + if ( '(' == result[bpos1] ) { + bpos2 = findBalancedBracket( result, bpos1 ); + if ( -1 != bpos2 ) { + // we have balanced brackets, recursively parse: + TQString rplstr; + bool purge = !parseAddressTemplateSection( result.mid( bpos1+1, + bpos2-bpos1-1 ), rplstr, + realName, orgaName ); + if ( purge ) { + // purge -> remove all + // replace with !_P_!, so conditional tags work later + result.replace( fpos, bpos2 - fpos + 1, "!_P_!" ); + // leave stpos as it is + } else { + // no purge -> replace with recursively parsed string + result.replace( fpos, bpos2 - fpos + 1, rplstr ); + ret = true; + stpos = fpos + rplstr.length(); + } + } else { + // unbalanced brackets: keep on parsing (should not happen + // and will result in bad formatting) + stpos = bpos1; + } + } + fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); + } + + // after sorting out all purge tags, we just search'n'replace the rest, + // keeping track of whether at least one tag evaluates to something. + // The following macro needs TQString for R_FIELD + // It substitutes !_P_! for empty fields so conditional tags work later +#define REPLTAG(R_TAG,R_FIELD) \ + if ( result.find(R_TAG, false) != -1 ) { \ + TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \ + result.replace( R_TAG, rpl ); \ + if ( !R_FIELD.isEmpty() ) { \ + ret = true; \ + } \ + } + REPLTAG( KABC_FMTTAG_realname, realName ); + REPLTAG( KABC_FMTTAG_REALNAME, realName.upper() ); + REPLTAG( KABC_FMTTAG_company, orgaName ); + REPLTAG( KABC_FMTTAG_COMPANY, orgaName.upper() ); + REPLTAG( KABC_FMTTAG_pobox, postOfficeBox() ); + REPLTAG( KABC_FMTTAG_street, street() ); + REPLTAG( KABC_FMTTAG_STREET, street().upper() ); + REPLTAG( KABC_FMTTAG_zipcode, postalCode() ); + REPLTAG( KABC_FMTTAG_location, locality() ); + REPLTAG( KABC_FMTTAG_LOCATION, locality().upper() ); + REPLTAG( KABC_FMTTAG_region, region() ); + REPLTAG( KABC_FMTTAG_REGION, region().upper() ); + result.replace( KABC_FMTTAG_newline, "\n" ); +#undef REPLTAG + + // conditional comma + fpos = result.find( KABC_FMTTAG_condcomma, 0 ); + while ( -1 != fpos ) { + TQString str1 = result.mid( fpos - 5, 5 ); + TQString str2 = result.mid( fpos + 2, 5 ); + if ( str1 != "!_P_!" && str2 != "!_P_!" ) { + result.replace( fpos, 2, ", " ); + } else { + result.remove( fpos, 2 ); + } + fpos = result.find( KABC_FMTTAG_condcomma, fpos ); + } + // conditional whitespace + fpos = result.find( KABC_FMTTAG_condwhite, 0 ); + while ( -1 != fpos ) { + TQString str1 = result.mid( fpos - 5, 5 ); + TQString str2 = result.mid( fpos + 2, 5 ); + if ( str1 != "!_P_!" && str2 != "!_P_!" ) { + result.replace( fpos, 2, " " ); + } else { + result.remove( fpos, 2 ); + } + fpos = result.find( KABC_FMTTAG_condwhite, fpos ); + } + + // remove purged: + result.remove( "!_P_!" ); + + return ret; +} + +int Address::findBalancedBracket( const TQString &tsection, int pos ) const +{ + int balancecounter = 0; + for( unsigned int i = pos + 1; i < tsection.length(); i++ ) { + if ( ')' == tsection[i] && 0 == balancecounter ) { + // found end of brackets + return i; + } else + if ( '(' == tsection[i] ) { + // nested brackets + balancecounter++; + } + } + return -1; +} + +TQString Address::countryToISO( const TQString &cname ) +{ + // we search a map file for translations from country names to + // iso codes, storing caching things in a TQMap for faster future + // access. + if ( !mISOMap ) + isoMapDeleter.setObject( mISOMap, new TQMap() ); + + TQMap::ConstIterator it; + it = mISOMap->find( cname ); + if ( it != mISOMap->end() ) + return it.data(); + + TQString mapfile = TDEGlobal::dirs()->findResource( "data", + TQString::fromLatin1( "tdeabc/countrytransl.map" ) ); + + TQFile file( mapfile ); + if ( file.open( IO_ReadOnly ) ) { + TQTextStream s( &file ); + TQString strbuf = s.readLine(); + while( !strbuf.isEmpty() ) { + TQStringList countryInfo = TQStringList::split( '\t', strbuf, true ); + if ( countryInfo[ 0 ] == cname ) { + file.close(); + mISOMap->insert( cname, countryInfo[ 1 ] ); + return countryInfo[ 1 ]; + } + strbuf = s.readLine(); + } + file.close(); + } + + // fall back to system country + mISOMap->insert( cname, TDEGlobal::locale()->country() ); + return TDEGlobal::locale()->country(); +} + +TQString Address::ISOtoCountry( const TQString &ISOname ) +{ + // get country name from ISO country code (e.g. "no" -> i18n("Norway")) + if ( ISOname.simplifyWhiteSpace().isEmpty() ) + return TQString::null; + + TQString mapfile = TDEGlobal::dirs()->findResource( "data", + TQString::fromLatin1( "tdeabc/countrytransl.map" ) ); + + TQFile file( mapfile ); + if ( file.open( IO_ReadOnly ) ) { + TQTextStream s( &file ); + TQString searchStr = "\t" + ISOname.simplifyWhiteSpace().lower(); + TQString strbuf = s.readLine(); + int pos; + while ( !strbuf.isEmpty() ) { + if ( (pos = strbuf.find( searchStr )) != -1 ) { + file.close(); + return i18n( strbuf.left( pos ).utf8() ); + } + strbuf = s.readLine(); + } + file.close(); + } + + return ISOname; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Address &addr ) +{ + return s << addr.mId << addr.mType << addr.mPostOfficeBox << + addr.mExtended << addr.mStreet << addr.mLocality << + addr.mRegion << addr.mPostalCode << addr.mCountry << + addr.mLabel; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Address &addr ) +{ + s >> addr.mId >> addr.mType >> addr.mPostOfficeBox >> addr.mExtended >> + addr.mStreet >> addr.mLocality >> addr.mRegion >> + addr.mPostalCode >> addr.mCountry >> addr.mLabel; + + addr.mEmpty = false; + + return s; +} diff --git a/tdeabc/address.h b/tdeabc/address.h new file mode 100644 index 000000000..b4165a098 --- /dev/null +++ b/tdeabc/address.h @@ -0,0 +1,341 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESS_H +#define KABC_ADDRESS_H + +#include +#include +#include + +#include + +// template tags for address formatting localization +#define KABC_FMTTAG_realname TQString("%n") +#define KABC_FMTTAG_REALNAME TQString("%N") +#define KABC_FMTTAG_company TQString("%cm") +#define KABC_FMTTAG_COMPANY TQString("%CM") +#define KABC_FMTTAG_pobox TQString("%p") +#define KABC_FMTTAG_street TQString("%s") +#define KABC_FMTTAG_STREET TQString("%S") +#define KABC_FMTTAG_zipcode TQString("%z") +#define KABC_FMTTAG_location TQString("%l") +#define KABC_FMTTAG_LOCATION TQString("%L") +#define KABC_FMTTAG_region TQString("%r") +#define KABC_FMTTAG_REGION TQString("%R") +#define KABC_FMTTAG_newline TQString("\\n") +#define KABC_FMTTAG_condcomma TQString("%,") +#define KABC_FMTTAG_condwhite TQString("%w") +#define KABC_FMTTAG_purgeempty TQString("%0") + +namespace KABC { + +/** + @short Postal address information. + + This class represents information about a postal address. +*/ +class KABC_EXPORT Address +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); + + public: + /** + List of addresses. + */ + typedef TQValueList
      List; + typedef TQValueList TypeList; + + /** + Address types: + + @li @p Dom - domestic + @li @p Intl - international + @li @p Postal - postal + @li @p Parcel - parcel + @li @p Home - home address + @li @p Work - address at work + @li @p Pref - preferred address + */ + enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, + Pref = 64 }; + + /** + Constructor that creates an empty Address, which is initialized + with a unique id (see id()). + */ + Address(); + + /** + This is like Address() just above, with the difference + that you can specify the type. + */ + Address( int ); + + bool operator==( const Address & ) const; + bool operator!=( const Address & ) const; + + /** + Returns true, if the address is empty. + */ + bool isEmpty() const; + + /** + Clears all entries of the address. + */ + void clear(); + + /** + Sets the unique id. + */ + void setId( const TQString & ); + + /* + Returns the unique id. + */ + TQString id() const; + + /** + Sets the type of address. See enum for definiton of types. + + @param type type, can be a bitwise or of multiple types. + */ + void setType( int type ); + + /** + Returns the type of address. Can be a bitwise or of multiple types. + */ + int type() const; + + /** + Returns a translated string of all types the address has. + */ + TQString typeLabel() const; + + /** + Sets the post office box. + */ + void setPostOfficeBox( const TQString & ); + + /** + Returns the post office box. + */ + TQString postOfficeBox() const; + + /** + Returns the translated label for post office box field. + */ + static TQString postOfficeBoxLabel(); + + /** + Sets the extended address information. + */ + void setExtended( const TQString & ); + + /** + Returns the extended address information. + */ + TQString extended() const; + + /** + Returns the translated label for extended field. + */ + static TQString extendedLabel(); + + /** + Sets the street (including number). + */ + void setStreet( const TQString & ); + + /** + Returns the street. + */ + TQString street() const; + + /** + Returns the translated label for street field. + */ + static TQString streetLabel(); + + /** + Sets the locality, e.g. city. + */ + void setLocality( const TQString & ); + + /** + Returns the locality. + */ + TQString locality() const; + + /** + Returns the translated label for locality field. + */ + static TQString localityLabel(); + + /** + Sets the region, e.g. state. + */ + void setRegion( const TQString & ); + + /** + Returns the region. + */ + TQString region() const; + + /** + Returns the translated label for region field. + */ + static TQString regionLabel(); + + /** + Sets the postal code. + */ + void setPostalCode( const TQString & ); + + /** + Returns the postal code. + */ + TQString postalCode() const; + + /** + Returns the translated label for postal code field. + */ + static TQString postalCodeLabel(); + + /** + Sets the country. + */ + void setCountry( const TQString & ); + + /** + Returns the country. + */ + TQString country() const; + + /** + Returns the translated label for country field. + */ + static TQString countryLabel(); + + /** + Sets the delivery label. This is the literal text to be used as label. + */ + void setLabel( const TQString & ); + + /** + Returns the delivery label. + */ + TQString label() const; + + /** + Returns the translated label for delivery label field. + */ + static TQString labelLabel(); + + /** + Returns the list of available types. + */ + static TypeList typeList(); + + /** + Returns the translated label for a special type. + */ + static TQString typeLabel( int type ); + + /** + Used for debug output. + */ + void dump() const; + + /** + Returns this address formatted according to the country-specific + address formatting rules. The formatting rules applied depend on + either the addresses {@link #country country} field, or (if the + latter is empty) on the system country setting. If companyName is + provided, an available business address format will be preferred. + + @param realName the formatted name of the contact + @param orgaName the name of the organization or company + @return the formatted address (containing newline characters) + */ + TQString formattedAddress( const TQString &realName=TQString::null + , const TQString &orgaName=TQString::null ) const; + + /** + Returns ISO code for a localized country name. Only localized country + names will be understood. This might be replaced by a TDELocale method in + the future. + @param cname name of the country + @return two digit ISO code + */ + static TQString countryToISO( const TQString &cname ); + + /** + Returns a localized country name for a ISO code. + This might be replaced by a TDELocale method in the future. + @param ISOname two digit ISO code + @return localized name of the country + @since 3.2 + */ + static TQString ISOtoCountry( const TQString &ISOname ); + + private: + /** + Parses a snippet of an address template + @param tsection the template string to be parsed + @param result TQString reference in which the result will be stored + @return true if at least one tag evaluated positively, else false + */ + bool parseAddressTemplateSection( const TQString &tsection + , TQString &result + , const TQString &realName + , const TQString &orgaName ) const; + + /** + Finds the balanced closing bracket starting from the opening bracket at + pos in tsection. + @return position of closing bracket, -1 for unbalanced brackets + */ + int findBalancedBracket( const TQString &tsection, int pos ) const; + + bool mEmpty; + + TQString mId; + int mType; + + TQString mPostOfficeBox; + TQString mExtended; + TQString mStreet; + TQString mLocality; + TQString mRegion; + TQString mPostalCode; + TQString mCountry; + TQString mLabel; + + static TQMap *mISOMap; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); + +} + +#endif diff --git a/tdeabc/addressbook.cpp b/tdeabc/addressbook.cpp new file mode 100644 index 000000000..50cd9c8a6 --- /dev/null +++ b/tdeabc/addressbook.cpp @@ -0,0 +1,842 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "errorhandler.h" +#include "resource.h" + +#include "addressbook.h" +#include "addressbook.moc" + +using namespace KABC; + +struct AddressBook::AddressBookData +{ + Field::List mAllFields; + ErrorHandler *mErrorHandler; + TDEConfig *mConfig; + KRES::Manager *mManager; + TQPtrList mPendingLoadResources; + TQPtrList mPendingSaveResources; + Iterator end; +}; + +struct AddressBook::Iterator::IteratorData +{ + Resource::Iterator mIt; + TQValueList mResources; + int mCurrRes; +}; + +struct AddressBook::ConstIterator::ConstIteratorData +{ + Resource::ConstIterator mIt; + TQValueList mResources; + int mCurrRes; +}; + +AddressBook::Iterator::Iterator() + : d( new IteratorData ) +{ +} + +AddressBook::Iterator::Iterator( const AddressBook::Iterator &i ) + : d( new IteratorData ) +{ + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; +} + +AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iterator &i ) +{ + if ( this == &i ) + return *this; // guard against self assignment + + delete d; // delete the old data the Iterator was completely constructed before + d = new IteratorData; + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; + + return *this; +} + +AddressBook::Iterator::~Iterator() +{ + delete d; + d = 0; +} + +const Addressee &AddressBook::Iterator::operator*() const +{ + return *(d->mIt); +} + +Addressee &AddressBook::Iterator::operator*() +{ + return *(d->mIt); +} + +Addressee *AddressBook::Iterator::operator->() +{ + return &(*(d->mIt)); +} + +AddressBook::Iterator &AddressBook::Iterator::operator++() +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::Iterator &AddressBook::Iterator::operator++( int ) +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::Iterator &AddressBook::Iterator::operator--() +{ + (d->mIt)--; + + return *this; +} + +AddressBook::Iterator &AddressBook::Iterator::operator--( int ) +{ + (d->mIt)--; + + return *this; +} + +bool AddressBook::Iterator::operator==( const Iterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool AddressBook::Iterator::operator!=( const Iterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + + +AddressBook::ConstIterator::ConstIterator() + : d( new ConstIteratorData ) +{ +} + +AddressBook::ConstIterator::ConstIterator( const AddressBook::ConstIterator &i ) + : d( new ConstIteratorData ) +{ + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; +} + +AddressBook::ConstIterator::ConstIterator( const AddressBook::Iterator &i ) +{ + d = new ConstIteratorData; + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator=( const AddressBook::ConstIterator &i ) +{ + if ( this == &i ) + return *this; // guard for self assignment + + delete d; // delete the old data because the Iterator was really constructed before + d = new ConstIteratorData; + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; + + return *this; +} + +AddressBook::ConstIterator::~ConstIterator() +{ + delete d; + d = 0; +} + +const Addressee &AddressBook::ConstIterator::operator*() const +{ + return *(d->mIt); +} + +const Addressee* AddressBook::ConstIterator::operator->() const +{ + return &(*(d->mIt)); +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator++() +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator++(int) +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator--() +{ + (d->mIt)--; + return *this; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator--(int) +{ + (d->mIt)--; + return *this; +} + +bool AddressBook::ConstIterator::operator==( const ConstIterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool AddressBook::ConstIterator::operator!=( const ConstIterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + + +AddressBook::AddressBook() + : d( new AddressBookData ) +{ + d->mErrorHandler = 0; + d->mConfig = 0; + d->mManager = new KRES::Manager( "contact" ); + d->end.d->mResources = TQValueList(); + d->end.d->mCurrRes = -1; +} + +AddressBook::AddressBook( const TQString &config ) + : d( new AddressBookData ) +{ + d->mErrorHandler = 0; + if ( config.isEmpty() ) + d->mConfig = 0; + else + d->mConfig = new TDEConfig( config ); + d->mManager = new KRES::Manager( "contact" ); + d->mManager->readConfig( d->mConfig ); + d->end.d->mResources = TQValueList(); + d->end.d->mCurrRes = -1; +} + +AddressBook::~AddressBook() +{ + delete d->mManager; d->mManager = 0; + delete d->mConfig; d->mConfig = 0; + delete d->mErrorHandler; d->mErrorHandler = 0; + delete d; d = 0; +} + +bool AddressBook::load() +{ + kdDebug(5700) << "AddressBook::load()" << endl; + + clear(); + + KRES::Manager::ActiveIterator it; + bool ok = true; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( !(*it)->load() ) { + error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); + ok = false; + } + } + + return ok; +} + +bool AddressBook::asyncLoad() +{ + kdDebug(5700) << "AddressBook::asyncLoad()" << endl; + + clear(); + + KRES::Manager::ActiveIterator it; + bool ok = true; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + d->mPendingLoadResources.append( *it ); + if ( !(*it)->asyncLoad() ) { + error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); + ok = false; + } + } + + return ok; +} + +bool AddressBook::save( Ticket *ticket ) +{ + kdDebug(5700) << "AddressBook::save()"<< endl; + + if ( ticket->resource() ) { + deleteRemovedAddressees(); + bool ok = ticket->resource()->save( ticket ); + if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); + return ok; + } + + return false; +} + +bool AddressBook::asyncSave( Ticket *ticket ) +{ + kdDebug(5700) << "AddressBook::asyncSave()"<< endl; + + if ( ticket->resource() ) { + d->mPendingSaveResources.append( ticket->resource() ); + bool ok = ticket->resource()->asyncSave( ticket ); + if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); + return ok; + } + + return false; +} + +AddressBook::Iterator AddressBook::begin() +{ + TQValueList list; + KRES::Manager::ActiveIterator resIt; + for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) + list.append( *resIt ); + + if ( list.count() == 0 ) + return end(); + + Iterator it = Iterator(); + it.d->mResources = list; + it.d->mCurrRes = 0; + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + + while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { + if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) + return end(); + + it.d->mCurrRes++; + + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + } + + return it; +} + +AddressBook::ConstIterator AddressBook::begin() const +{ + TQValueList list; + KRES::Manager::ActiveIterator resIt; + for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) + list.append( *resIt ); + + if ( list.count() == 0 ) + return end(); + + Iterator it = Iterator(); + it.d->mResources = list; + it.d->mCurrRes = 0; + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + + while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { + if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) + return end(); + + it.d->mCurrRes++; + + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + } + + return it; +} + +AddressBook::Iterator AddressBook::end() +{ + KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); + + if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available + d->end.d->mIt = Resource::Iterator(); + } else { + d->end.d->mIt = (*resIt)->end(); + } + + return d->end; +} + +AddressBook::ConstIterator AddressBook::end() const +{ + KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); + + if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available + d->end.d->mIt = Resource::Iterator(); + } else { + d->end.d->mIt = (*resIt)->end(); + } + + return d->end; +} + +void AddressBook::clear() +{ + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + (*it)->clear(); +} + +Ticket *AddressBook::requestSaveTicket( Resource *resource ) +{ + kdDebug(5700) << "AddressBook::requestSaveTicket()" << endl; + + if ( !resource ) + resource = standardResource(); + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( (*it) == resource ) { + if ( (*it)->readOnly() || !(*it)->isOpen() ) + return 0; + else + return (*it)->requestSaveTicket(); + } + } + + return 0; +} + +void AddressBook::releaseSaveTicket( Ticket *ticket ) +{ + if ( !ticket ) + return; + + if ( ticket->resource() ) { + ticket->resource()->releaseSaveTicket( ticket ); + } +} + +void AddressBook::insertAddressee( const Addressee &a ) +{ + Resource *resource = a.resource(); + if ( resource == 0 ) + resource = standardResource(); + + Resource::Iterator it; + Addressee fAddr = resource->findByUid( a.uid() ); + + Addressee addr( a ); + if ( !fAddr.isEmpty() ) { + if ( fAddr != a ) + addr.setRevision( TQDateTime::currentDateTime() ); + else { + if ( fAddr.resource() == 0 ) { + fAddr.setResource( resource ); + //NOTE: Should we have setChanged( true ) here? + resource->insertAddressee( fAddr ); + } + return; + } + } + + addr.setResource( resource ); + addr.setChanged( true ); + resource->insertAddressee( addr ); +} + +void AddressBook::removeAddressee( const Addressee &a ) +{ + if ( a.resource() ) + a.resource()->removeAddressee( a ); +} + +void AddressBook::removeAddressee( const Iterator &it ) +{ + if ( (*it).resource() ) + (*it).resource()->removeAddressee( *it ); +} + +AddressBook::Iterator AddressBook::find( const Addressee &a ) +{ + Iterator it; + for ( it = begin(); it != end(); ++it ) { + if ( a.uid() == (*it).uid() ) + return it; + } + + return end(); +} + +Addressee AddressBook::findByUid( const TQString &uid ) +{ + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + Addressee addr = (*it)->findByUid( uid ); + if ( !addr.isEmpty() ) + return addr; + } + + return Addressee(); +} + +Addressee::List AddressBook::allAddressees() +{ + Addressee::List list; + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) + list.append( *it ); + + return list; +} + +Addressee::List AddressBook::findByName( const TQString &name ) +{ + Addressee::List results; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + results += (*it)->findByName( name ); + + return results; +} + +Addressee::List AddressBook::findByEmail( const TQString &email ) +{ + Addressee::List results; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + results += (*it)->findByEmail( email ); + + return results; +} + +Addressee::List AddressBook::findByCategory( const TQString &category ) +{ + Addressee::List results; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + results += (*it)->findByCategory( category ); + + return results; +} + +void AddressBook::dump() const +{ + kdDebug(5700) << "AddressBook::dump() --- begin ---" << endl; + + ConstIterator it; + for( it = begin(); it != end(); ++it ) { + (*it).dump(); + } + + kdDebug(5700) << "AddressBook::dump() --- end ---" << endl; +} + +TQString AddressBook::identifier() +{ + TQStringList identifier; + + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( !(*it)->identifier().isEmpty() ) + identifier.append( (*it)->identifier() ); + } + + return identifier.join( ":" ); +} + +Field::List AddressBook::fields( int category ) +{ + if ( d->mAllFields.isEmpty() ) { + d->mAllFields = Field::allFields(); + } + + if ( category == Field::All ) return d->mAllFields; + + Field::List result; + Field::List::ConstIterator it; + for ( it = d->mAllFields.constBegin(); it != d->mAllFields.constEnd(); ++it ) { + if ( (*it)->category() & category ) + result.append( *it ); + } + + return result; +} + +bool AddressBook::addCustomField( const TQString &label, int category, + const TQString &key, const TQString &app ) +{ + if ( d->mAllFields.isEmpty() ) { + d->mAllFields = Field::allFields(); + } + + TQString a = app.isNull() ? TDEGlobal::instance()->instanceName() : app; + TQString k = key.isNull() ? label : key; + + Field *field = Field::createCustomField( label, category, k, a ); + + if ( !field ) return false; + + d->mAllFields.append( field ); + + return true; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const AddressBook &ab ) +{ + if (!ab.d) return s; + + return s;// << ab.d->mAddressees; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, AddressBook &ab ) +{ + if (!ab.d) return s; + +// s >> ab.d->mAddressees; + + return s; +} + +bool AddressBook::addResource( Resource *resource ) +{ + if ( !resource->open() ) { + kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl; + return false; + } + + d->mManager->add( resource ); + resource->setAddressBook( this ); + + connect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), + this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); + connect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), + this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); + + connect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + connect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); + + return true; +} + +bool AddressBook::removeResource( Resource *resource ) +{ + resource->close(); + + if ( resource == standardResource() ) + d->mManager->setStandardResource( 0 ); + + resource->setAddressBook( 0 ); + + disconnect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), + this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); + disconnect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), + this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); + + disconnect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + disconnect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + + d->mManager->remove( resource ); + + return true; +} + +TQPtrList AddressBook::resources() +{ + TQPtrList list; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( d->mManager->standardResource() == (*it) ) + list.prepend( *it ); + else + list.append( *it ); + } + + return list; +} + +void AddressBook::setErrorHandler( ErrorHandler *handler ) +{ + delete d->mErrorHandler; + d->mErrorHandler = handler; +} + +void AddressBook::error( const TQString& msg ) +{ + if ( !d->mErrorHandler ) // create default error handler + d->mErrorHandler = new ConsoleErrorHandler; + + if ( d->mErrorHandler ) + d->mErrorHandler->error( msg ); + else + kdError(5700) << "no error handler defined" << endl; +} + +void AddressBook::deleteRemovedAddressees() +{ + // no any longer needed +} + +void AddressBook::setStandardResource( Resource *resource ) +{ + d->mManager->setStandardResource( resource ); +} + +Resource *AddressBook::standardResource() +{ + return d->mManager->standardResource(); +} + +KRES::Manager *AddressBook::resourceManager() +{ + return d->mManager; +} + +void AddressBook::cleanUp() +{ +} + +bool AddressBook::loadingHasFinished() const +{ + return d->mPendingLoadResources.isEmpty(); +} + +void AddressBook::resourceLoadingFinished( Resource *res ) +{ + d->mPendingLoadResources.remove( res ); + emit loadingFinished( res ); + + if ( d->mPendingLoadResources.count() == 0 ) + emit addressBookChanged( this ); +} + +void AddressBook::resourceSavingFinished( Resource *res ) +{ + d->mPendingSaveResources.remove( res ); + + emit savingFinished( res ); +} + +void AddressBook::resourceLoadingError( Resource *res, const TQString &errMsg ) +{ + error( errMsg ); + + d->mPendingLoadResources.remove( res ); + if ( d->mPendingLoadResources.count() == 0 ) + emit addressBookChanged( this ); +} + +void AddressBook::resourceSavingError( Resource *res, const TQString &errMsg ) +{ + error( errMsg ); + + d->mPendingSaveResources.remove( res ); +} diff --git a/tdeabc/addressbook.h b/tdeabc/addressbook.h new file mode 100644 index 000000000..8b87b6898 --- /dev/null +++ b/tdeabc/addressbook.h @@ -0,0 +1,431 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSBOOK_H +#define KABC_ADDRESSBOOK_H + +#include +#include + +#include + +#include "addressee.h" +#include "field.h" + +namespace KABC { + +class ErrorHandler; +class Resource; +class Ticket; + +/** + @short Address Book + + This class provides access to a collection of address book entries. + */ +class KABC_EXPORT AddressBook : public TQObject +{ + Q_OBJECT + + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); + friend class StdAddressBook; + + public: + /** + @short Address Book Iterator + + This class provides an iterator for address book entries. + */ + class KABC_EXPORT Iterator + { + public: + Iterator(); + Iterator( const Iterator & ); + ~Iterator(); + + Iterator &operator=( const Iterator & ); + const Addressee &operator*() const; + Addressee &operator*(); + Addressee* operator->(); + Iterator &operator++(); + Iterator &operator++(int); + Iterator &operator--(); + Iterator &operator--(int); + bool operator==( const Iterator &it ); + bool operator!=( const Iterator &it ); + + struct IteratorData; + IteratorData *d; + }; + + /** + @short Address Book Const Iterator + + This class provides a const iterator for address book entries. + */ + class KABC_EXPORT ConstIterator + { + public: + ConstIterator(); + ConstIterator( const ConstIterator & ); + ConstIterator( const Iterator & ); + ~ConstIterator(); + + ConstIterator &operator=( const ConstIterator & ); + const Addressee &operator*() const; + const Addressee* operator->() const; + ConstIterator &operator++(); + ConstIterator &operator++(int); + ConstIterator &operator--(); + ConstIterator &operator--(int); + bool operator==( const ConstIterator &it ); + bool operator!=( const ConstIterator &it ); + + struct ConstIteratorData; + ConstIteratorData *d; + }; + + /** + Constructs an address book object. + You have to add the resources manually before calling load(). + */ + AddressBook(); + + /** + Constructs an address book object. + The resources are loaded automatically. + + @param config The config file which contains the resource settings. + */ + AddressBook( const TQString &config ); + + /** + Destructor. + */ + virtual ~AddressBook(); + + /** + Requests a ticket for saving the addressbook. Calling this function locks + the addressbook for all other processes. You need the returned ticket + object for calling the save() function. + + @param resource A pointer to the resource which shall be locked. If 0, + the default resource is locked. + @return 0 if the resource is already locked or a valid save ticket + otherwise. + @see save() + */ + Ticket *requestSaveTicket( Resource *resource = 0 ); + + /** + Releases the ticket requested previously with requestSaveTicket(). + Call this function, if you want to release a ticket without saving. + */ + void releaseSaveTicket( Ticket *ticket ); + + /** + Loads all addressees synchronously. + + @return Whether the loading was successfully. + */ + bool load(); + + /** + Loads all addressees asynchronously. This function returns immediately + and emits the addressBookChanged() signal as soon as the loading has + finished. + + @return Whether the synchronous part of loading was successfully. + */ + bool asyncLoad(); + + /** + Saves all addressees of one resource synchronously. If the save is + successfull the ticket is deleted. + + @param ticket The ticket returned by requestSaveTicket(). + @return Whether the saving was successfully. + */ + bool save( Ticket *ticket ); + + /** + Saves all addressees of one resource asynchronously. If the save is + successfull the ticket is deleted. + + @param ticket The ticket returned by requestSaveTicket(). + @return Whether the synchronous part of saving was successfully. + */ + bool asyncSave( Ticket *ticket ); + + /** + Returns an iterator pointing to the first addressee of address book. + This iterator equals end() if the address book is empty. + */ + ConstIterator begin() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + Iterator begin(); + + /** + Returns an iterator pointing to the last addressee of address book. + This iterator equals begin() if the address book is empty. + */ + ConstIterator end() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + Iterator end(); + + + /** + Removes all addressees from the address book. + */ + void clear(); + + /** + Insert an addressee into the address book. If an addressee with the same + unique id already exists, it is replaced by the new one, otherwise it is + appended. + + @param addr The addressee which shall be insert. + */ + void insertAddressee( const Addressee &addr ); + + /** + Removes an addressee from the address book. + + @param addr The addressee which shall be removed. + */ + void removeAddressee( const Addressee &addr ); + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + + @param it An iterator pointing to the addressee which shall be removed. + */ + void removeAddressee( const Iterator &it ); + + /** + Returns an iterator pointing to the specified addressee. It will return + end() if no addressee matched. + + @param addr The addresee you are looking for. + */ + Iterator find( const Addressee &addr ); // KDE4: const + + /** + Searches an addressee with the specified unique identifier. + + @param uid The unique identifier you are looking for. + @return The addressee with the specified unique identifier or an + empty addressee. + */ + Addressee findByUid( const TQString &uid ); // KDE4: const + + /** + Returns a list of all addressees in the address book. + */ + Addressee::List allAddressees(); // KDE4: const + + /** + Searches all addressees which match the specified name. + + @param name The name you are looking for. + @return A list of all matching addressees. + */ + Addressee::List findByName( const TQString &name ); // KDE4: const + + /** + Searches all addressees which match the specified email address. + + @param email The email address you are looking for. + @return A list of all matching addressees. + */ + Addressee::List findByEmail( const TQString &email ); // KDE4: const + + /** + Searches all addressees which belongs to the specified category. + + @param category The category you are looking for. + @return A list of all matching addressees. + */ + Addressee::List findByCategory( const TQString &category ); // KDE4: const + + /** + Returns a string identifying this addressbook. The identifier is + created by concatenation of the resource identifiers. + */ + virtual TQString identifier(); // KDE4: const + + /** + Returns a list of all Fields known to the address book which are associated + with the given field category. + */ + Field::List fields( int category = Field::All ); // KDE4: const + + /** + Add custom field to address book. + + @param label User visible label of the field. + @param category Ored list of field categories. + @param key Identifier used as key for reading and writing the field. + @param app String used as application key for reading and writing + the field. + */ + bool addCustomField( const TQString &label, int category = Field::All, + const TQString &key = TQString::null, + const TQString &app = TQString::null ); + + /** + Adds a resource to the address book. + + @param resource The resource you want to add. + @return Whether opening the resource was successfully. + */ + bool addResource( Resource *resource ); + + /** + Removes a resource from the address book. + + @param resource The resource you want to remove. + @return Whether closing the resource was successfully. + */ + bool removeResource( Resource *resource ); + + /** + Returns a list of all resources. + */ + TQPtrList resources(); // KDE4: const + + /** + Sets the @p ErrorHandler, that is used by error() to + provide GUI independent error messages. + + @param errorHandler The error handler you want to use. + */ + void setErrorHandler( ErrorHandler *errorHandler ); + + /** + Shows GUI independent error messages. + + @param msg The error message that shall be displayed. + */ + void error( const TQString &msg ); + + /** + @deprecated There is no need to call this function anymore. + */ + void cleanUp() KDE_DEPRECATED; + + /** + Used for debug output. This function prints out the list + of all addressees to kdDebug(5700). + */ + void dump() const; + + /** + */ + void emitAddressBookLocked() { emit addressBookLocked( this ); } + void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } + void emitAddressBookChanged() { emit addressBookChanged( this ); } + + /** + Returns true when the loading of the addressbook has finished, + otherwise false. + + @since 3.5 + */ + bool loadingHasFinished() const; + + signals: + /** + Emitted when one of the resources discovered a change in its backend + or the asynchronous loading of all resources has finished. + You should connect to this signal to update the presentation of + the contact data in your application. + + @param addressBook The address book which emitted this signal. + */ + void addressBookChanged( AddressBook *addressBook ); + + /** + Emitted when one of the resources has been locked for writing. + + @param addressBook The address book which emitted this signal. + */ + void addressBookLocked( AddressBook *addressBook ); + + /** + Emitted when one of the resources has been unlocked. + You should connect to this signal if you want to save your changes + to a resource which is currently locked, and want to get notified when + saving is possible again. + + @param addressBook The address book which emitted this signal. + */ + void addressBookUnlocked( AddressBook *addressBook ); + + /** + Emitted when the asynchronous loading of one resource has finished + after calling asyncLoad(). + + @param resource The resource which emitted this signal. + */ + void loadingFinished( Resource *resource ); + + /** + Emitted when the asynchronous saving of one resource has finished + after calling asyncSave(). + + @param resource The resource which emitted this signal. + */ + void savingFinished( Resource *resource ); + + protected slots: + void resourceLoadingFinished( Resource* ); + void resourceSavingFinished( Resource* ); + void resourceLoadingError( Resource*, const TQString& ); + void resourceSavingError( Resource*, const TQString& ); + + protected: + void deleteRemovedAddressees(); + void setStandardResource( Resource* ); + Resource *standardResource(); + KRES::Manager *resourceManager(); + + private: + TQPtrList mDummy; // Remove in KDE 4 + struct AddressBookData; + AddressBookData *d; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); + +} + +#endif diff --git a/tdeabc/addresseedialog.cpp b/tdeabc/addresseedialog.cpp new file mode 100644 index 000000000..2b8bc91e6 --- /dev/null +++ b/tdeabc/addresseedialog.cpp @@ -0,0 +1,259 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include + +#include "stdaddressbook.h" + +#include "addresseedialog.h" +#include "addresseedialog.moc" + +using namespace KABC; + +AddresseeItem::AddresseeItem( TQListView *parent, const Addressee &addressee ) : + TQListViewItem( parent ), + mAddressee( addressee ) +{ + setText( Name, addressee.realName() ); + setText( Email, addressee.preferredEmail() ); +} + +TQString AddresseeItem::key( int column, bool ) const +{ + if (column == Email) { + TQString value = text(Email); + TQRegExp emailRe("<\\S*>"); + int match = emailRe.search(value); + if (match > -1) + value = value.mid(match + 1, emailRe.matchedLength() - 2); + + return value.lower(); + } + + return text(column).lower(); +} + +AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : + KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), + Ok|Cancel, Ok, parent ), mMultiple( multiple ) +{ + TQWidget *topWidget = plainPage(); + + TQBoxLayout *topLayout = new TQHBoxLayout( topWidget ); + TQBoxLayout *listLayout = new TQVBoxLayout; + topLayout->addLayout( listLayout ); + + mAddresseeList = new TDEListView( topWidget ); + mAddresseeList->addColumn( i18n("Name") ); + mAddresseeList->addColumn( i18n("Email") ); + mAddresseeList->setAllColumnsShowFocus( true ); + mAddresseeList->setFullWidth( true ); + listLayout->addWidget( mAddresseeList ); + connect( mAddresseeList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( slotOk() ) ); + connect( mAddresseeList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SLOT( updateEdit( TQListViewItem * ) ) ); + + mAddresseeEdit = new KLineEdit( topWidget ); + mAddresseeEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto ); + connect( mAddresseeEdit->completionObject(), TQT_SIGNAL( match( const TQString & ) ), + TQT_SLOT( selectItem( const TQString & ) ) ); + mAddresseeEdit->setFocus(); + mAddresseeEdit->completionObject()->setIgnoreCase( true ); + listLayout->addWidget( mAddresseeEdit ); + + setInitialSize( TQSize( 450, 300 ) ); + + if ( mMultiple ) { + TQBoxLayout *selectedLayout = new TQVBoxLayout; + topLayout->addLayout( selectedLayout ); + topLayout->setSpacing( spacingHint() ); + + TQGroupBox *selectedGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("Selected"), + topWidget ); + selectedLayout->addWidget( selectedGroup ); + + mSelectedList = new TDEListView( selectedGroup ); + mSelectedList->addColumn( i18n("Name") ); + mSelectedList->addColumn( i18n("Email") ); + mSelectedList->setAllColumnsShowFocus( true ); + mSelectedList->setFullWidth( true ); + connect( mSelectedList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( removeSelected() ) ); + + TQPushButton *unselectButton = new TQPushButton( i18n("Unselect"), selectedGroup ); + connect ( unselectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelected() ) ); + + connect( mAddresseeList, TQT_SIGNAL( clicked( TQListViewItem * ) ), + TQT_SLOT( addSelected( TQListViewItem * ) ) ); + + setInitialSize( TQSize( 650, 350 ) ); + } + + mAddressBook = StdAddressBook::self( true ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + TQT_SLOT( addressBookChanged() ) ); + connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ), + TQT_SLOT( addressBookChanged() ) ); + + loadAddressBook(); +} + +AddresseeDialog::~AddresseeDialog() +{ +} + +void AddresseeDialog::loadAddressBook() +{ + mAddresseeList->clear(); + mItemDict.clear(); + mAddresseeEdit->completionObject()->clear(); + + AddressBook::Iterator it; + for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); + addCompletionItem( (*it).realName(), item ); + addCompletionItem( (*it).preferredEmail(), item ); + } +} + +void AddresseeDialog::addCompletionItem( const TQString &str, TQListViewItem *item ) +{ + if ( str.isEmpty() ) return; + + mItemDict.insert( str, item ); + mAddresseeEdit->completionObject()->addItem( str ); +} + +void AddresseeDialog::selectItem( const TQString &str ) +{ + if ( str.isEmpty() ) return; + + TQListViewItem *item = mItemDict.find( str ); + if ( item ) { + mAddresseeList->blockSignals( true ); + mAddresseeList->setSelected( item, true ); + mAddresseeList->ensureItemVisible( item ); + mAddresseeList->blockSignals( false ); + } +} + +void AddresseeDialog::updateEdit( TQListViewItem *item ) +{ + mAddresseeEdit->setText( item->text( 0 ) ); + mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); +} + +void AddresseeDialog::addSelected( TQListViewItem *item ) +{ + AddresseeItem *addrItem = dynamic_cast( item ); + if ( !addrItem ) return; + + Addressee a = addrItem->addressee(); + + TQListViewItem *selectedItem = mSelectedDict.find( a.uid() ); + if ( !selectedItem ) { + selectedItem = new AddresseeItem( mSelectedList, a ); + mSelectedDict.insert( a.uid(), selectedItem ); + } +} + +void AddresseeDialog::removeSelected() +{ + TQListViewItem *item = mSelectedList->selectedItem(); + AddresseeItem *addrItem = dynamic_cast( item ); + if ( !addrItem ) return; + + mSelectedDict.remove( addrItem->addressee().uid() ); + delete addrItem; +} + +Addressee AddresseeDialog::addressee() +{ + AddresseeItem *aItem = 0; + + if ( mMultiple ) + aItem = dynamic_cast( mSelectedList->firstChild() ); + else + aItem = dynamic_cast( mAddresseeList->selectedItem() ); + + if (aItem) return aItem->addressee(); + return Addressee(); +} + +Addressee::List AddresseeDialog::addressees() +{ + Addressee::List al; + AddresseeItem *aItem = 0; + + if ( mMultiple ) { + TQListViewItem *item = mSelectedList->firstChild(); + while( item ) { + aItem = dynamic_cast( item ); + if ( aItem ) al.append( aItem->addressee() ); + item = item->nextSibling(); + } + } + else + { + aItem = dynamic_cast( mAddresseeList->selectedItem() ); + if (aItem) al.append( aItem->addressee() ); + } + + return al; +} + +Addressee AddresseeDialog::getAddressee( TQWidget *parent ) +{ + AddresseeDialog *dlg = new AddresseeDialog( parent ); + Addressee addressee; + int result = dlg->exec(); + + if ( result == TQDialog::Accepted ) { + addressee = dlg->addressee(); + } + + delete dlg; + return addressee; +} + +Addressee::List AddresseeDialog::getAddressees( TQWidget *parent ) +{ + AddresseeDialog *dlg = new AddresseeDialog( parent, true ); + Addressee::List addressees; + int result = dlg->exec(); + if ( result == TQDialog::Accepted ) { + addressees = dlg->addressees(); + } + + delete dlg; + return addressees; +} + +void AddresseeDialog::addressBookChanged() +{ + loadAddressBook(); +} diff --git a/tdeabc/addresseedialog.h b/tdeabc/addresseedialog.h new file mode 100644 index 000000000..74470d1b4 --- /dev/null +++ b/tdeabc/addresseedialog.h @@ -0,0 +1,161 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEEDIALOG_H +#define KABC_ADDRESSEEDIALOG_H + +#include + +#include +#include +#include + +#include "addressbook.h" + +namespace KABC { + +/** + @short Special ListViewItem, that is used by the AddresseeDialog. +*/ +class KABC_EXPORT AddresseeItem : public TQListViewItem +{ + public: + + /** + Type of column + @li @p Name - Name in Addressee + @li @p Email - Email in Addressee + */ + enum columns { Name = 0, Email = 1 }; + + /** + Constructor. + + @param parent The parent listview. + @param addressee The associated addressee. + */ + AddresseeItem( TQListView *parent, const Addressee &addressee ); + + /** + Returns the addressee. + */ + Addressee addressee() const { return mAddressee; } + + /** + Method used by TQListView to sort the items. + */ + virtual TQString key( int column, bool ascending ) const; + + private: + Addressee mAddressee; +}; + +/** + @short Dialog for selecting address book entries. + + This class provides a dialog for selecting entries from the standard KDE + address book. Use the getAddressee() function to open a modal dialog, + returning an address book entry. + + In the dialog you can select an entry from the list with the mouse or type in + the first letters of the name or email address you are searching for. The + entry matching best is automatically selected. Use double click, pressing + return or pressing the ok button to return the selected addressee to the + application. +*/ +class KABC_EXPORT AddresseeDialog : public KDialogBase +{ + Q_OBJECT + + public: + /** + Construct addressbook entry select dialog. + + @param parent parent widget + @param multiple if true, indicates a multiple selection. + */ + AddresseeDialog( TQWidget *parent=0, bool multiple=false ); + + /** + Destructor. + */ + virtual ~AddresseeDialog(); + + /** + Return the address chosen. + + If it is a multiple select, this will return only the first address chosen + */ + Addressee addressee(); + + /** + Return the list of addresses chosen + */ + Addressee::List addressees(); + + /** + Select a single address book entry. + + Open addressee select dialog and return the entry selected by the user. + If the user doesn't select an entry or presses cancel, the returned + addressee is empty. + */ + static Addressee getAddressee( TQWidget *parent ); + + /** + Select multiple address book entries. + + Open addressee select dialog and return the entries selected by the user. + If the user doesn't select an entry or presses cancel, the returned + addressee list is empty. + */ + static Addressee::List getAddressees( TQWidget *parent ); + + private slots: + void selectItem( const TQString & ); + void updateEdit( TQListViewItem *item ); + void addSelected( TQListViewItem *item ); + void removeSelected(); + + protected slots: + void addressBookChanged(); + + private: + void loadAddressBook(); + void addCompletionItem( const TQString &str, TQListViewItem *item ); + + bool mMultiple; + + TDEListView *mAddresseeList; + KLineEdit *mAddresseeEdit; + + TDEListView *mSelectedList; + + AddressBook *mAddressBook; + + TQDict mItemDict; + TQDict mSelectedDict; + + class AddresseeDialogPrivate; + AddresseeDialogPrivate *d; +}; + +} +#endif diff --git a/tdeabc/addresseehelper.cpp b/tdeabc/addresseehelper.cpp new file mode 100644 index 000000000..e8faeb897 --- /dev/null +++ b/tdeabc/addresseehelper.cpp @@ -0,0 +1,111 @@ +/* + This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include + +#include "addresseehelper.h" + +using namespace KABC; + +AddresseeHelper * AddresseeHelper::s_self; + +// static +AddresseeHelper *AddresseeHelper::self() +{ + if ( !s_self ) + s_self = new AddresseeHelper(); + + return s_self; +} + +AddresseeHelper::AddresseeHelper() + : TQObject( tqApp ), + DCOPObject( "KABC::AddresseeHelper" ) +{ + initSettings(); + + connectDCOPSignal( "kaddressbook", "KABC::AddressBookConfig", + "changed()", "initSettings()", false ); +} + +// static +void AddresseeHelper::addToSet( const TQStringList& list, + std::set& container ) +{ + TQStringList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( !(*it).isEmpty() ) + container.insert( *it ); + } +} + +void AddresseeHelper::initSettings() +{ + mTitles.clear(); + mSuffixes.clear(); + mPrefixes.clear(); + + mTitles.insert( i18n( "Dr." ) ); + mTitles.insert( i18n( "Miss" ) ); + mTitles.insert( i18n( "Mr." ) ); + mTitles.insert( i18n( "Mrs." ) ); + mTitles.insert( i18n( "Ms." ) ); + mTitles.insert( i18n( "Prof." ) ); + + mSuffixes.insert( i18n( "I" ) ); + mSuffixes.insert( i18n( "II" ) ); + mSuffixes.insert( i18n( "III" ) ); + mSuffixes.insert( i18n( "Jr." ) ); + mSuffixes.insert( i18n( "Sr." ) ); + + mPrefixes.insert( "van" ); + mPrefixes.insert( "von" ); + mPrefixes.insert( "de" ); + + TDEConfig config( "kabcrc", true, false ); // readonly, no kdeglobals + config.setGroup( "General" ); + + addToSet( config.readListEntry( "Prefixes" ), mTitles ); + addToSet( config.readListEntry( "Inclusions" ), mPrefixes ); + addToSet( config.readListEntry( "Suffixes" ), mSuffixes ); + mTradeAsFamilyName = config.readBoolEntry( "TradeAsFamilyName", true ); +} + +bool AddresseeHelper::containsTitle( const TQString& title ) const +{ + return mTitles.find( title ) != mTitles.end(); +} + +bool AddresseeHelper::containsPrefix( const TQString& prefix ) const +{ + return mPrefixes.find( prefix ) != mPrefixes.end(); +} + +bool AddresseeHelper::containsSuffix( const TQString& suffix ) const +{ + return mSuffixes.find( suffix ) != mSuffixes.end(); +} + +bool AddresseeHelper::tradeAsFamilyName() const +{ + return mTradeAsFamilyName; +} diff --git a/tdeabc/addresseehelper.h b/tdeabc/addresseehelper.h new file mode 100644 index 000000000..5280e6b2d --- /dev/null +++ b/tdeabc/addresseehelper.h @@ -0,0 +1,66 @@ +/* + This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEEHELPER_H +#define KABC_ADDRESSEEHELPER_H + +#include +#include + +#include + +#include + +/** + static data, shared by ALL addressee objects +*/ + +namespace KABC { + +class KABC_EXPORT AddresseeHelper : public TQObject, public DCOPObject +{ + K_DCOP + + public: + static AddresseeHelper *self(); + + bool containsTitle( const TQString& title ) const; + bool containsPrefix( const TQString& prefix ) const; + bool containsSuffix( const TQString& suffix ) const; + bool tradeAsFamilyName() const; + + k_dcop: + ASYNC initSettings(); + + private: + AddresseeHelper(); + + static void addToSet( const TQStringList& list, + std::set& container ); + std::set mTitles; + std::set mPrefixes; + std::set mSuffixes; + bool mTradeAsFamilyName; + + static AddresseeHelper *s_self; +}; + +} + +#endif diff --git a/tdeabc/addresseelist.cpp b/tdeabc/addresseelist.cpp new file mode 100644 index 000000000..47324001c --- /dev/null +++ b/tdeabc/addresseelist.cpp @@ -0,0 +1,256 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Jost Schenck + 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "addresseelist.h" + +#include "field.h" +#include "sortmode.h" + +using namespace KABC; + +// +// +// Traits +// +// + +bool SortingTraits::Uid::eq( const Addressee &a1, const Addressee &a2 ) +{ + // locale awareness doesn't make sense sorting ids + return ( TQString::compare( a1.uid(), a2.uid() ) == 0 ); +} + +bool SortingTraits::Uid::lt( const Addressee &a1, const Addressee &a2 ) +{ + // locale awareness doesn't make sense sorting ids + return ( TQString::compare( a1.uid(), a2.uid() ) < 0 ); +} + +bool SortingTraits::Name::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.name(), a2.name() ) == 0 ); +} + +bool SortingTraits::Name::lt( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.name(), a2.name() ) < 0 ); +} + +bool SortingTraits::FormattedName::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) == 0 ); +} + +bool SortingTraits::FormattedName::lt( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) < 0 ); +} + +bool SortingTraits::FamilyName::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 + && TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 ); +} + +bool SortingTraits::FamilyName::lt( const Addressee &a1, const Addressee &a2 ) +{ + int family = TQString::localeAwareCompare( a1.familyName(), a2.familyName() ); + if ( 0 == family ) { + return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) < 0 ); + } else { + return family < 0; + } +} + +bool SortingTraits::GivenName::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 + && TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 ); +} + +bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 ) +{ + int given = TQString::localeAwareCompare( a1.givenName(), a2.givenName() ); + if ( 0 == given ) { + return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) < 0 ); + } else { + return given < 0; + } +} + +// +// +// AddresseeList +// +// + +static Field *sActiveField=0; + +AddresseeList::AddresseeList() + : TQValueList() +{ + mReverseSorting = false; + mActiveSortingCriterion = FormattedName; +} + +AddresseeList::~AddresseeList() +{ +} + +AddresseeList::AddresseeList( const AddresseeList &l ) + : TQValueList( l ) +{ + mReverseSorting = l.reverseSorting(); + mActiveSortingCriterion = l.sortingCriterion(); +} + +AddresseeList::AddresseeList( const TQValueList &l ) + : TQValueList( l ) +{ + mReverseSorting = false; +} + +void AddresseeList::dump() const +{ + kdDebug(5700) << "AddresseeList {" << endl; + kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl; + + TQString crit; + if ( Uid == mActiveSortingCriterion ) { + crit = "Uid"; + } else if ( Name == mActiveSortingCriterion ) { + crit = "Name"; + } else if ( FormattedName == mActiveSortingCriterion ) { + crit = "FormattedName"; + } else if ( FamilyName == mActiveSortingCriterion ) { + crit = "FamilyName"; + } else if ( GivenName == mActiveSortingCriterion ) { + crit = "GivenName"; + } else { + crit = "unknown -- update dump method"; + } + + kdDebug(5700) << "sorting criterion: " << crit << endl; + + for ( const_iterator it = begin(); it != end(); ++it ) { + (*it).dump(); + } + + kdDebug(5700) << "}" << endl; +} + +void AddresseeList::sortBy( SortingCriterion c ) +{ + mActiveSortingCriterion = c; + if ( Uid == c ) { + sortByTrait(); + } else if ( Name == c ) { + sortByTrait(); + } else if ( FormattedName == c ) { + sortByTrait(); + } else if ( FamilyName == c ) { + sortByTrait(); + } else if ( GivenName==c ) { + sortByTrait(); + } else { + kdError(5700) << "AddresseeList sorting criterion passed for which a trait is not known. No sorting done." << endl; + } +} + +void AddresseeList::sort() +{ + sortBy( mActiveSortingCriterion ); +} + +template +void AddresseeList::sortByTrait() +{ + // FIXME: better sorting algorithm, bubblesort is not acceptable for larger lists. + // + // for i := 1 to n - 1 + // do for j := 1 to n - i + // do if A[j] > A[j+1] + // then temp := A[j] + // A[j] := A[j + 1] + // A[j + 1 ] := temp + + iterator i1 = begin(); + iterator endIt = end(); + --endIt; + if ( i1 == endIt ) // don't need sorting + return; + + iterator i2 = endIt; + while( i1 != endIt ) { + iterator j1 = begin(); + iterator j2 = j1; + ++j2; + while( j1 != i2 ) { + if ( !mReverseSorting && Trait::lt( *j2, *j1 ) + || mReverseSorting && Trait::lt( *j1, *j2 ) ) { + tqSwap( *j1, *j2 ); + } + ++j1; + ++j2; + } + ++i1; + --i2; + } +} + +void AddresseeList::sortByField( Field *field ) +{ + if ( !field ) { + kdWarning(5700) << "sortByField called with no active sort field" << endl; + return; + } + + sActiveField = field; + + if ( count() == 0 ) + return; + + KABC::FieldSortMode *mode = new KABC::FieldSortMode( sActiveField, !mReverseSorting ); + + KABC::Addressee::setSortMode( mode ); + qHeapSort( *this ); + KABC::Addressee::setSortMode( 0 ); + + delete mode; +} + +void AddresseeList::sortByMode( SortMode *mode ) +{ + if ( count() == 0 ) + return; + + KABC::Addressee::setSortMode( mode ); + qHeapSort( *this ); + KABC::Addressee::setSortMode( 0 ); +} + +Field* +AddresseeList::sortingField() const +{ + return sActiveField; +} diff --git a/tdeabc/addresseelist.h b/tdeabc/addresseelist.h new file mode 100644 index 000000000..7c9df0275 --- /dev/null +++ b/tdeabc/addresseelist.h @@ -0,0 +1,221 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Jost Schenck + 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEELIST_H +#define KABC_ADDRESSEELIST_H + +#include + +#include "addressee.h" + +namespace KABC { + +class Field; +class SortField; +class SortMode; + +/** + * Each trait must implement one static function for equality, one for "less + * than". Class name should be the field name. A trait does not necessarily + * have to stick to just one field: a trait sorting by family name can e.g. + * sort addressees with equal family name by given name. + * + * If you want to implement reverse sorting, you do not have to write another + * trait, as AddresseeList takes care of that. + */ +namespace SortingTraits +{ + +class KABC_EXPORT Uid +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT Name +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT FormattedName +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT FamilyName // fallback to given name +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT GivenName // fallback to family name +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +} + +/** + * Addressee attribute used for sorting. + */ +typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterion; + +/** + * @short a TQValueList of Addressee, with sorting functionality + * + * This class extends the functionality of TQValueList with + * sorting methods specific to the Addressee class. It can be used + * just like any other TQValueList but is no template class. + * + * An AddresseeList does not automatically keep sorted when addressees + * are added or removed or the sorting order is changed, as this would + * slow down larger operations by sorting after every step. So after + * such operations you have to call {@link #sort} or {@link #sortBy} to + * create a defined order again. + * + * Iterator usage is inherited by TQValueList and extensively documented + * there. Please remember that the state of an iterator is undefined + * after any sorting operation. + * + * For the enumeration Type SortingCriterion, which specifies the + * field by the collection will be sorted, the following values exist: + * Uid, Name, FormattedName, FamilyName, GivenName. + * + * @author Jost Schenck jost@schenck.de + */ +class KABC_EXPORT AddresseeList : public TQValueList +{ + public: + AddresseeList(); + ~AddresseeList(); + AddresseeList( const AddresseeList & ); + AddresseeList( const TQValueList & ); + + /** + * Debug output. + */ + void dump() const; + + /** + * Determines the direction of sorting. On change, the list + * will not automatically be resorted. + * @param r true if sorting should be done reverse, false otherwise + */ + void setReverseSorting( bool r = true ) { mReverseSorting = r; } + + /** + * Returns the direction of sorting. + * @return true if sorting is done reverse, false otherwise + */ + bool reverseSorting() const { return mReverseSorting; } + + /** + * Sorts this list by a specific criterion. + * @param c the criterion by which should be sorted + */ + void sortBy( SortingCriterion c ); + + /** + * Sorts this list by a specific field. If no parameter is given, the + * last used Field object will be used. + * @param field pointer to the Field object to be sorted by + */ + void sortByField( Field *field = 0 ); + + /** + * Sorts this list by a specific sorting mode. + * @param mode pointer to the sorting mode object to be sorted by + * @since 3.4 + */ + void sortByMode( SortMode *mode = 0 ); + + /** + * Sorts this list by its active sorting criterion. This normally is the + * criterion of the last sortBy operation or FormattedName if up + * to now there has been no sortBy operation. + * + * Please note that the sorting trait of the last {@link #sortByTrait} + * method call is not remembered and thus the action can not be repeated + * by this method. + */ + void sort(); + + /** + * Templated sort function. You normally will not want to use this but + * {@link #sortBy} and {@link #sort} instead as the existing sorting + * criteria completely suffice for most cases. + * + * However, if you do want to use some special sorting criterion, you can + * write a trait class that will be provided to this templated method. + * This trait class has to have a class declaration like the following: + * \code + * class MySortingTrait { + * public: + * // eq returns true if a1 and a2 are equal + * static bool eq(KABC::Addressee a1, KABC::Addressee a2); + * // lt returns true is a1 is "less than" a2 + * static bool lt(KABC::Addressee a1, KABC::Addressee a2); + * }; + * \endcode + * You can then pass this class to the sortByTrait method like this: + * \code + * myAddresseelist.sortByTrait<MySortingTrait>(); + * \endcode + * Please note that the {@link #sort} method can not be used to repeat the + * sorting of the last sortByTrait action. + * + * Right now this method uses the bubble sort algorithm. This should be + * replaced for a better one when I have time. + */ + template void sortByTrait(); + + /** + * Returns the active sorting criterion, ie the sorting criterion that + * will be used by a {@link #sort} call. + */ + SortingCriterion sortingCriterion() const { return mActiveSortingCriterion; } + + /** + * Returns the active sorting field, ie a pointer to the Field object + * which was used for the last {@link #sortByField} operation. + * This function returns the last GLOBAL sorting field, not + * the class specific one. + * You're a lot better off by keeping track of this locally. + */ + Field* sortingField() const; + + private: + bool mReverseSorting; + SortingCriterion mActiveSortingCriterion; + //KDE 4.0 - add a d-pointer here! +}; + +} + +#endif diff --git a/tdeabc/addresslineedit.cpp b/tdeabc/addresslineedit.cpp new file mode 100644 index 000000000..dc7a889a1 --- /dev/null +++ b/tdeabc/addresslineedit.cpp @@ -0,0 +1,610 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Helge Deller + 2002 Lubos Lunak + 2001,2003 Carsten Pfeiffer + 2001 Waldo Bastian + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +// $Id$ + +#include "addresslineedit.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "ldapclient.h" + +#include + +//============================================================================= +// +// Class AddressLineEdit +// +//============================================================================= + + +using namespace KABC; + +TDECompletion * AddressLineEdit::s_completion = 0L; +bool AddressLineEdit::s_addressesDirty = false; +TQTimer* AddressLineEdit::s_LDAPTimer = 0L; +LdapSearch* AddressLineEdit::s_LDAPSearch = 0L; +TQString* AddressLineEdit::s_LDAPText = 0L; +AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L; +TDEConfig *AddressLineEdit::s_config = 0L; + +static KStaticDeleter completionDeleter; +static KStaticDeleter ldapTimerDeleter; +static KStaticDeleter ldapSearchDeleter; +static KStaticDeleter ldapTextDeleter; +static KStaticDeleter configDeleter; + +AddressLineEdit::AddressLineEdit(TQWidget* parent, + bool useCompletion, + const char *name) + : KLineEdit(parent,name) +{ + m_useCompletion = useCompletion; + m_completionInitialized = false; + m_smartPaste = false; + + init(); + + // Whenever a new AddressLineEdit is created (== a new composer is created), + // we set a dirty flag to reload the addresses upon the first completion. + // The address completions are shared between all AddressLineEdits. + // Is there a signal that tells us about addressbook updates? + if (m_useCompletion) + s_addressesDirty = true; +} + + +//----------------------------------------------------------------------------- +void AddressLineEdit::init() +{ + if ( !s_completion ) { + completionDeleter.setObject( s_completion, new TDECompletion() ); + s_completion->setOrder( TDECompletion::Sorted ); + s_completion->setIgnoreCase( true ); + } + + if( m_useCompletion ) { + if( !s_LDAPTimer ) { + ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer ); + ldapSearchDeleter.setObject( s_LDAPSearch, new LdapSearch ); + ldapTextDeleter.setObject( s_LDAPText, new TQString ); + } + connect( s_LDAPTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotStartLDAPLookup())); + connect( s_LDAPSearch, TQT_SIGNAL( searchData( const TQStringList& )), + TQT_SLOT( slotLDAPSearchData( const TQStringList& ))); + } + + if ( m_useCompletion && !m_completionInitialized ) + { + setCompletionObject( s_completion, false ); // we handle it ourself + connect( this, TQT_SIGNAL( completion(const TQString&)), + this, TQT_SLOT(slotCompletion() )); + + TDECompletionBox *box = completionBox(); + connect( box, TQT_SIGNAL( highlighted( const TQString& )), + this, TQT_SLOT( slotPopupCompletion( const TQString& ) )); + connect( box, TQT_SIGNAL( userCancelled( const TQString& )), + TQT_SLOT( userCancelled( const TQString& ))); + + m_completionInitialized = true; // don't connect muliple times. That's + // ugly, tho, better have completionBox() + // virtual in KDE 4 + // Why? This is only called once. Why should this be called more + // than once? And why was this protected? + } +} + +//----------------------------------------------------------------------------- +AddressLineEdit::~AddressLineEdit() +{ +} + +//----------------------------------------------------------------------------- + +TDEConfig* AddressLineEdit::config() +{ + if ( !s_config ) + configDeleter.setObject( s_config, new TDEConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals + + return s_config; +} + +void AddressLineEdit::setFont( const TQFont& font ) +{ + KLineEdit::setFont( font ); + if ( m_useCompletion ) + completionBox()->setFont( font ); +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::keyPressEvent(TQKeyEvent *e) +{ + bool accept = false; + + if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e))) + { + doCompletion(true); + accept = true; + } + else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e))) + { + int len = text().length(); + + if (len == cursorPosition()) // at End? + { + doCompletion(true); + accept = true; + } + } + + if( !accept ) + KLineEdit::keyPressEvent( e ); + + if( e->isAccepted()) + { + if( m_useCompletion && s_LDAPTimer != NULL ) + { + if( *s_LDAPText != text()) + stopLDAPLookup(); + *s_LDAPText = text(); + s_LDAPLineEdit = this; + s_LDAPTimer->start( 500, true ); + } + } +} + +void AddressLineEdit::mouseReleaseEvent( TQMouseEvent * e ) +{ + if (m_useCompletion && (e->button() == Qt::MidButton)) + { + m_smartPaste = true; + KLineEdit::mouseReleaseEvent(e); + m_smartPaste = false; + return; + } + KLineEdit::mouseReleaseEvent(e); +} + +void AddressLineEdit::insert(const TQString &t) +{ + if (!m_smartPaste) + { + KLineEdit::insert(t); + return; + } + TQString newText = t.stripWhiteSpace(); + if (newText.isEmpty()) + return; + + // remove newlines in the to-be-pasted string as well as an eventual + // mailto: protocol + newText.replace( TQRegExp("\r?\n"), ", " ); + if ( newText.startsWith( "mailto:" ) ) + { + KURL u(newText); + newText = u.path(); + } + else if (newText.find(" at ") != -1) + { + // Anti-spam stuff + newText.replace( " at ", "@" ); + newText.replace( " dot ", "." ); + } + else if (newText.find("(at)") != -1) + { + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + } + + TQString contents = text(); + int start_sel = 0; + int end_sel = 0; + int pos = cursorPosition(); + if (getSelection(&start_sel, &end_sel)) + { + // Cut away the selection. + if (pos > end_sel) + pos -= (end_sel - start_sel); + else if (pos > start_sel) + pos = start_sel; + contents = contents.left(start_sel) + contents.right(end_sel+1); + } + + int eot = contents.length(); + while ((eot > 0) && contents[eot-1].isSpace()) eot--; + if (eot == 0) + { + contents = TQString::null; + } + else if (pos >= eot) + { + if (contents[eot-1] == ',') + eot--; + contents.truncate(eot); + contents += ", "; + pos = eot+2; + } + + contents = contents.left(pos)+newText+contents.mid(pos); + setText(contents); + setCursorPosition(pos+newText.length()); +} + +void AddressLineEdit::paste() +{ + if (m_useCompletion) + m_smartPaste = true; + KLineEdit::paste(); + m_smartPaste = false; +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::cursorAtEnd() +{ + setCursorPosition( text().length() ); +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::enableCompletion(bool enable) +{ + m_useCompletion = enable; +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::doCompletion(bool ctrlT) +{ + if ( !m_useCompletion ) + return; + + TQString prevAddr; + + TQString s(text()); + int n = s.findRev(','); + + if (n >= 0) + { + n++; // Go past the "," + + int len = s.length(); + + // Increment past any whitespace... + while( n < len && s[n].isSpace() ) + n++; + + prevAddr = s.left(n); + s = s.mid(n,255).stripWhiteSpace(); + } + + if ( s_addressesDirty ) + loadAddresses(); + + if ( ctrlT ) + { + TQStringList completions = s_completion->substringCompletion( s ); + if (completions.count() > 1) { + m_previousAddresses = prevAddr; + setCompletedItems( completions ); + } + else if (completions.count() == 1) + setText(prevAddr + completions.first()); + + cursorAtEnd(); + return; + } + + TDEGlobalSettings::Completion mode = completionMode(); + + switch ( mode ) + { + case TDEGlobalSettings::CompletionPopupAuto: + { + if (s.isEmpty()) + break; + } + case TDEGlobalSettings::CompletionPopup: + { + m_previousAddresses = prevAddr; + TQStringList items = s_completion->allMatches( s ); + items += s_completion->allMatches( "\"" + s ); + items += s_completion->substringCompletion( '<' + s ); + uint beforeDollarCompletionCount = items.count(); + + if( s.find( ' ' ) == -1 ) // one word, possibly given name + items += s_completion->allMatches( "$$" + s ); + + if ( !items.isEmpty() ) + { + if ( items.count() > beforeDollarCompletionCount ) + { + // remove the '$$whatever$' part + for( TQStringList::Iterator it = items.begin(); + it != items.end(); + ++it ) + { + int pos = (*it).find( '$', 2 ); + if( pos < 0 ) // ??? + continue; + (*it)=(*it).mid( pos + 1 ); + } + } + + items = removeMailDupes( items ); + + // We do not want KLineEdit::setCompletedItems to perform text + // completion (suggestion) since it does not know how to deal + // with providing proper completions for different items on the + // same line, e.g. comma-separated list of email addresses. + bool autoSuggest = (mode != TDEGlobalSettings::CompletionPopupAuto); + setCompletedItems( items, autoSuggest ); + + if (!autoSuggest) + { + int index = items.first().find( s ); + TQString newText = prevAddr + items.first().mid( index ); + //kdDebug() << "OLD TEXT: " << text() << endl; + //kdDebug() << "NEW TEXT: " << newText << endl; + setUserSelection(false); + setCompletedText(newText,true); + } + } + + break; + } + + case TDEGlobalSettings::CompletionShell: + { + TQString match = s_completion->makeCompletion( s ); + if ( !match.isNull() && match != s ) + { + setText( prevAddr + match ); + cursorAtEnd(); + } + break; + } + + case TDEGlobalSettings::CompletionMan: // Short-Auto in fact + case TDEGlobalSettings::CompletionAuto: + { + if (!s.isEmpty()) + { + TQString match = s_completion->makeCompletion( s ); + if ( !match.isNull() && match != s ) + { + TQString adds = prevAddr + match; + setCompletedText( adds ); + } + break; + } + } + case TDEGlobalSettings::CompletionNone: + default: // fall through + break; + } +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::slotPopupCompletion( const TQString& completion ) +{ + setText( m_previousAddresses + completion ); + cursorAtEnd(); +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::loadAddresses() +{ + s_completion->clear(); + s_addressesDirty = false; + + TQStringList adrs = addresses(); + for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it) + addAddress( *it ); +} + +void AddressLineEdit::addAddress( const TQString& adr ) +{ + s_completion->addItem( adr ); + int pos = adr.find( '<' ); + if( pos >= 0 ) + { + ++pos; + int pos2 = adr.find( pos, '>' ); + if( pos2 >= 0 ) + s_completion->addItem( adr.mid( pos, pos2 - pos )); + } +} + +void AddressLineEdit::slotStartLDAPLookup() +{ + if( !s_LDAPSearch->isAvailable() || s_LDAPLineEdit != this ) + return; + startLoadingLDAPEntries(); +} + +void AddressLineEdit::stopLDAPLookup() +{ + s_LDAPSearch->cancelSearch(); + s_LDAPLineEdit = NULL; +} + +void AddressLineEdit::startLoadingLDAPEntries() +{ + TQString s( *s_LDAPText ); + // TODO cache last? + TQString prevAddr; + int n = s.findRev(','); + if (n>= 0) + { + prevAddr = s.left(n+1) + ' '; + s = s.mid(n+1,255).stripWhiteSpace(); + } + if( s.length() == 0 ) + return; + + loadAddresses(); // TODO reuse these? + s_LDAPSearch->startSearch( s ); +} + +void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs ) +{ + if( s_LDAPLineEdit != this ) + return; + for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) { + TQString name(*it); + int pos = name.find( " <" ); + int pos_comma = name.find( ',' ); + // put name in quotes, if we have a comma in the name + if (pos>0 && pos_comma>0 && pos_commahasFocus()) + { + if( completionMode() != TDEGlobalSettings::CompletionNone ) + { + doCompletion( false ); + } + } +} + +TQStringList AddressLineEdit::removeMailDupes( const TQStringList& adrs ) +{ + TQStringList src = adrs; + qHeapSort( src ); + TQString last; + for( TQStringList::Iterator it = src.begin(); it != src.end(); ) { + if( *it == last ) + { + it = src.remove( it ); + continue; // dupe + } + last = *it; + ++it; + } + return src; +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::dropEvent(TQDropEvent *e) +{ + KURL::List uriList; + if(KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList )) + { + TQString ct = text(); + KURL::List::Iterator it = uriList.begin(); + for (; it != uriList.end(); ++it) + { + if (!ct.isEmpty()) ct.append(", "); + KURL u(*it); + if ((*it).protocol() == "mailto") + ct.append( (*it).path() ); + else + ct.append( (*it).url() ); + } + setText(ct); + setEdited( true ); + } + else { + if (m_useCompletion) + m_smartPaste = true; + TQLineEdit::dropEvent(e); + m_smartPaste = false; + } +} + + +TQStringList AddressLineEdit::addresses() +{ + TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while + + TQStringList result; + TQString space(" "); + TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]"); + TQString endQuote("\" "); + TQString addr, email; + + KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); + KABC::AddressBook::Iterator it; + for( it = addressBook->begin(); it != addressBook->end(); ++it ) { + TQStringList emails = (*it).emails(); + + TQString n = (*it).prefix() + space + + (*it).givenName() + space + + (*it).additionalName() + space + + (*it).familyName() + space + + (*it).suffix(); + + n = n.simplifyWhiteSpace(); + + TQStringList::ConstIterator mit; + + for ( mit = emails.begin(); mit != emails.end(); ++mit ) { + email = *mit; + if (!email.isEmpty()) { + if (n.isEmpty() || (email.find( '<' ) != -1)) + addr = TQString::null; + else { /* do we really need quotes around this name ? */ + if (n.find(needQuotes) != -1) + addr = '"' + n + endQuote; + else + addr = n + space; + } + + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) + addr += '<' + email + '>'; + else + addr += email; + addr = addr.stripWhiteSpace(); + result.append( addr ); + } + } + } + + KABC::DistributionListManager manager( addressBook ); + manager.load(); + result += manager.listNames(); + + TQApplication::restoreOverrideCursor(); + + return result; +} + +#include "addresslineedit.moc" diff --git a/tdeabc/addresslineedit.h b/tdeabc/addresslineedit.h new file mode 100644 index 000000000..f81ffbfe4 --- /dev/null +++ b/tdeabc/addresslineedit.h @@ -0,0 +1,123 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Helge Deller + 2002 Lubos Lunak + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSLINEEDIT_H +#define KABC_ADDRESSLINEEDIT_H +// $Id$ + +#include +#include +#include + +#include "klineedit.h" +#include "kcompletion.h" + +class TDEConfig; + +namespace KABC { + +class LdapSearch; + +/** + * A lineedit with LDAP and kabc completion + * + * This lineedit is supposed to be used wherever the user types email addresses + * and might want a completion. You can simply use it as a replacement for + * KLineEdit or TQLineEdit. + * + * You can enable or disable the lineedit at any time. + * + * @see AddressLineEdit::enableCompletion() + */ +class KABC_EXPORT AddressLineEdit : public KLineEdit +{ + Q_OBJECT +public: + AddressLineEdit(TQWidget* parent, bool useCompletion = true, + const char *name = 0L); + virtual ~AddressLineEdit(); + + /** + * Reimplented for internal reasons. + * @ see KLineEdit::setFont() + */ + virtual void setFont( const TQFont& ); + + static TDEConfig *config(); + +public slots: + /** + * Set cursor to end of line. + */ + void cursorAtEnd(); + /** + * Toggle completion. + */ + void enableCompletion( bool enable ); + +protected: + /** + * Always call AddressLineEdit::loadAddresses() as the first thing. + * Use addAddress() to add addresses. + */ + virtual void loadAddresses(); + void addAddress( const TQString& ); + virtual void keyPressEvent(TQKeyEvent*); + virtual void dropEvent(TQDropEvent *e); + virtual void paste(); + virtual void insert(const TQString &t); + virtual void mouseReleaseEvent( TQMouseEvent * e ); + void doCompletion(bool ctrlT); + +private slots: + void slotCompletion() { doCompletion(false); } + void slotPopupCompletion( const TQString& ); + void slotStartLDAPLookup(); + void slotLDAPSearchData( const TQStringList& ); + +private: + void init(); + void startLoadingLDAPEntries(); + void stopLDAPLookup(); + TQStringList addresses(); + TQStringList removeMailDupes( const TQStringList& adrs ); + + TQString m_previousAddresses; + bool m_useCompletion; + bool m_completionInitialized; + bool m_smartPaste; + TQString m_typedText; // unused + + static bool s_addressesDirty; + static TDECompletion *s_completion; + static TQTimer *s_LDAPTimer; + static LdapSearch *s_LDAPSearch; + static TQString *s_LDAPText; + static AddressLineEdit *s_LDAPLineEdit; + static TDEConfig *s_config; + +private: + class AddressLineEditPrivate* d; +}; + +} + +#endif /* KABC_ADDRESSLINEEDIT_H */ diff --git a/tdeabc/agent.cpp b/tdeabc/agent.cpp new file mode 100644 index 000000000..571b7803e --- /dev/null +++ b/tdeabc/agent.cpp @@ -0,0 +1,148 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "addressee.h" + +#include "agent.h" + +using namespace KABC; + +Agent::Agent() + : mAddressee( 0 ), mIntern( false ) +{ +} + +Agent::Agent( const TQString &url ) + : mAddressee( 0 ),mUrl( url ), mIntern( false ) +{ +} + +Agent::Agent( Addressee *addressee ) + : mAddressee( addressee ), mIntern( true ) +{ +} + +Agent::~Agent() +{ + delete mAddressee; + mAddressee = 0; +} + +bool Agent::operator==( const Agent &a ) const +{ + if ( mIntern != a.mIntern ) + return false; + + if ( !mIntern ) { + if ( mUrl != a.mUrl ) + return false; + } else { + if ( mAddressee && !a.mAddressee ) return false; + if ( !mAddressee && a.mAddressee ) return false; + if ( !mAddressee && !a.mAddressee ) return false; + if ( (*mAddressee) != (*a.mAddressee) ) return false; + } + + return true; +} + +bool Agent::operator!=( const Agent &a ) const +{ + return !( a == *this ); +} + +Agent &Agent::operator=( const Agent &addr ) +{ + if ( this == &addr ) + return *this; + + if ( addr.mIntern && addr.mAddressee ) { + if ( mAddressee ) + delete mAddressee; + + mAddressee = new Addressee; + *mAddressee = *(addr.mAddressee); + } + + mUrl = addr.mUrl; + mIntern = addr.mIntern; + + return *this; +} + +void Agent::setUrl( const TQString &url ) +{ + mUrl = url; + mIntern = false; +} + +void Agent::setAddressee( Addressee *addressee ) +{ + mAddressee = addressee; + mIntern = true; +} + +bool Agent::isIntern() const +{ + return mIntern; +} + +TQString Agent::url() const +{ + return mUrl; +} + +Addressee *Agent::addressee() const +{ + return mAddressee; +} + +TQString Agent::asString() const +{ + if ( mIntern ) + return "intern agent"; + else + return mUrl; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent ) +{ + TQ_UINT32 hasAddressee = ( agent.mAddressee != 0 ); + + s << agent.mIntern << agent.mUrl << hasAddressee; + if ( hasAddressee ) + s << (*agent.mAddressee); + + return s; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Agent &agent ) +{ + TQ_UINT32 hasAddressee; + + s >> agent.mIntern >> agent.mUrl >> hasAddressee; + + if ( hasAddressee ) { + agent.mAddressee = new Addressee; + s >> (*agent.mAddressee); + } + + return s; +} diff --git a/tdeabc/agent.h b/tdeabc/agent.h new file mode 100644 index 000000000..dbe048f08 --- /dev/null +++ b/tdeabc/agent.h @@ -0,0 +1,128 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_AGENT_H +#define KABC_AGENT_H + +class TQDataStream; + +#include + +#include + +namespace KABC { + +class Addressee; + +/** + * Important!!! + * + * At the moment the vcard format does not support saving and loading + * this entity. + */ +class KABC_EXPORT Agent +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); + +public: + + /** + * Consturctor. Creates an empty object. + */ + Agent(); + + /** + * Consturctor. + * + * @param url A URL that describes the position of the agent file. + */ + Agent( const TQString &url ); + + /** + * Consturctor. + * + * @param addressee The addressee object of the agent. + */ + Agent( Addressee *addressee ); + + /** + * Destructor. + */ + ~Agent(); + + + bool operator==( const Agent & ) const; + bool operator!=( const Agent & ) const; + Agent &operator=( const Agent & ); + + /** + * Sets a URL for the location of the agent file. When using this + * function, isIntern() will return 'false' until you use + * setAddressee(). + * + * @param url The location URL of the agent file. + */ + void setUrl( const TQString &url ); + + /** + * Sets the addressee of the agent. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param addressee The addressee object of the agent. + */ + void setAddressee( Addressee *addressee ); + + /** + * Returns whether the agent is described by a URL (extern) or + * by a addressee (intern). + * When this method returns 'true' you can use addressee() to + * get a Addressee object. Otherwise you can request the URL + * of this agent by url() and load the data from that location. + */ + bool isIntern() const; + + /** + * Returns the location URL of this agent. + */ + TQString url() const; + + /** + * Returns the addressee object of this agent. + */ + Addressee* addressee() const; + + /** + * Returns string representation of the agent. + */ + TQString asString() const; + +private: + Addressee *mAddressee; + TQString mUrl; + + int mIntern; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); + +} +#endif diff --git a/tdeabc/countrytransl.map b/tdeabc/countrytransl.map new file mode 100644 index 000000000..1459f0942 --- /dev/null +++ b/tdeabc/countrytransl.map @@ -0,0 +1,12381 @@ +Andorra ad +Andorra ad +أندورا ad +Ðндора ad +Ðндора ad +অà§à¦¯à¦¾à¦¨à¦¡à§‹à¦°à¦¾ ad +Andora ad +Andora ad +ΑνδόÏα ad +Andoro ad +آندورا ad +Andorre ad +Andóra ad +×נדורה ad +अंडोरा ad +アンドラ ad +អង់ដូរ៉ា ad +안ë„ë¼ ad +ອີນເດີຠad +Andora ad +Ðндора ad +Ðндорра ad +à¨à¨‚ਡੋਰਾ ad +Andora ad +Ðндорра ad +Andora ad +Ðндора ad +Andora ad +அனà¯à®Ÿà¯‹à®°à®¾ ad +Ðндора ad +à¹à¸­à¸™à¹‚ดรา ad +Ðндорра ad +Ðндорра ad +Andore ad +安é“å°” ad +安é“爾 ad +United Arab Emirates ae +Vereenigde Arabiese Emirate ae +الإمارات العربية المتحدة ae +Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ ÐрабÑÐºÑ–Ñ Ð­Ð¼Ñ–Ñ€Ð°Ñ‚Ñ‹ ae +ОÐЕ ae +সংযà§à¦•à§à¦¤ আরব আমিরশাহি ae +Stadoù-Unanet Arabeg ae +Ujedinjeni arapski emirati ae +Emirats Àrabs Units ae +Spojené arabské emiráty ae +Emiraethau Arabaidd Unedig ae +Forenende Arabiske Emirater ae +Vereinigte Arabische Emirate ae +Ενωμένα ΑÏαβικά ΕμιÏάτα ae +UniÄintaj Arabaj Emirlandoj ae +Emiratos árabes unidos ae +Araabia Ühendemiraadid ae +Arabiar Emirato Batuak ae +امارات متحده عربی ae +Yhdistyneet Arabiemiraatit ae +Émirats Arabes Unis ae +Ferienigde Arabyske Emiraten ae +Aontas na nÉimíríochtaí Arabacha ae +Emiratos Ãrabes Unidos ae +×יחוד ×”×מירויות הערביות ae +संयà¥à¤•à¥à¤¤ अरब अमीरात ae +Ujedinjeni arapski emirati ae +Egyesült Arab Emirátusok ae +Sameinuðu arabísku furstadæmin ae +Emirati Arabi Uniti ae +アラブ首長国連邦 ae +អារ៉ាប់​រួម ae +ì•„ëž ì—미레ì´íЏ ì—°í•© ae +ສະຫະລັດ ae +Jungtiniai Arabų Emiratai ae +Apvienotie ArÄbu EmerÄti ae +Обединети ÐрапÑки Емирати ae +ÐÑгдÑÑн арабын имрат ae +Emirati Għarab Magħquda ae +De forente arabiske emirater ae +Vereenigte Araabsche Emiraten ae +Verenigde Arabische Emiraten ae +Dei sameinte arabiske emirata ae +Di-Emirate tseo di Kopanego tsa Arab ae +ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ ae +Zjednoczone Emiraty Arabskie ae +Emiratos Ãrabes Unidos ae +Emirados Ãrabes Unidos ae +Emiratele Arabe Unite ae +Объединенные ÐрабÑкие Эмираты ae +Leta Zunze Ubumwe z'Abarabu ae +Ovttastuvvon arábalaÅ¡ emiráhtat ae +Spojené arabské emiráty ae +Združeni arabski Emirati ae +Уједињени арапÑки емирати ae +Ujedinjeni arapski emirati ae +Förenade arabemiraten ae +யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ அரபி எமிரேடà¯à®¸à¯ ae +Ðморати муттаҳидаи Ðраб ae +สหรัà¸à¸­à¸²à¸«à¸£à¸±à¸šà¸­à¸µà¸¡à¸´à¹€à¸£à¸•ส์ ae +BirleÅŸik Arap Emirlikleri ae +Berläşkän Ğäräp Ämirlekläre ae +Об'єднані ÐрабÑькі Емірати ae +Бирлашган Ðраб Ðмирликлари ae +Mashango o tangananaho a Emirates ae +Emirat Arabes Unis ae +阿è”é…‹ ae +阿拉伯è¯åˆå¤§å…¬åœ‹ ae +Izindawo zezinduna zase-United Arab ae +Afghanistan af +Ø£ÙØºØ§Ù†Ø³ØªØ§Ù† af +ÐфганіÑтан af +ÐфганиÑтан af +আফগানিসà§à¦¤à¦¾à¦¨ af +Afganistan af +Afganistan af +Afganistan af +Afghanistán af +Affganistan af +Αφγανιστάν af +Afganio af +Afghanistán af +Afganistan af +Ø§ÙØºØ§Ù†Ø³ØªØ§Ù† af +Afganistan af +An Afganastáin af +Afganistan af +×פגניסטן af +अफगानिसà¥à¤¤à¤¾à¤¨ af +Afganistan af +Afganisztán af +Afganistan af +Afganistan af +アフガニスタン af +អាហ្វកានីស្ážáž¶áž“ af +아프가니스탄 af +ລີທົ່ວເນີຠaf +AfganistÄna af +ÐвганиÑтан af +ÐфганÑтан af +Afganistan af +ਅਫਗਾਨਿਸਤਾਨ af +Afganistan af +Afeganistão af +Afeganistão af +Afganistan af +ÐфганиÑтан af +Afuganisitani af +Afganistan af +Afganistan af +ÐвганиÑтан af +Avganistan af +Afganistan af +ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯ af +ÐфғониÑтон af +อาฟà¸à¸²à¸™à¸´à¸ªà¸–าน af +Afganistan af +Äfğänstan af +ÐфганіÑтан af +ÐфғониÑтон af +Afganistan af +阿富汗 af +阿富汗 af +Antigua and Barbuda ag +Antigue en Barbuda ag +أنتيغوا Ùˆ باربودا ag +Antigua vÉ™ Barbuda ag +Ðнтыгуа Ñ– Барбуда ag +Ðнтигуа и Барбуда ag +অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦—à§à§Ÿà¦¾ à¦à¦¬à¦‚ বারà§à¦¬à§à¦¡à¦¾ ag +Antigua ha Barbuda ag +Antigua i Barbuda ag +Antigua i Barbuda ag +Antigua a Barbuda ag +Antigwa a Barbwda ag +Antigua og Barbuda ag +Antigua und Barbuda ag +Αντίγκουα και ΜπαÏμποÏντα ag +Antigvo-Barbudo ag +Antigua y Barbuda ag +Antigua ja Barbuda ag +Antigua eta Barbuda ag +آنتیگوا Ùˆ باربودا ag +Antigua ja Barbados ag +Antigua og Barbuda ag +Antigua et Barbuda ag +Antigua en Barbuda ag +Antigua agus Barbúda ag +Antiga e Barbuda ag +×נטיגו××” ובריבודה ag +à¤à¤¨à¥à¤Ÿà¤¿à¤—à¥à¤† और बारबूडा ag +Antigua i Barbuda ag +Antigua és Barbuda ag +Antigua dan Barbuda ag +Antígva og Barbúda ag +Antigua e Barbuda ag +アンティグアãƒãƒ¼ãƒ–ーダ ag +Antigua និង Barbuda ag +앤티가 바부다 ag +Antikva ir Barbuda ag +Antigva un Barbuda ag +Ðнтигва и Барбуда ag +Ðнтигуа ба Барбуда ag +Antigwa u Barbuda ag +Antigua og Barbuda ag +Antigua un Barbuda ag +Antigua en Barbuda ag +Antigua og Barbuda ag +Antigua le Barbuda ag +Antigua e Barbuda ag +à¨à¨‚ਟੀਗà©à¨† ਤੇ ਬਾਰਬà©à¨¡à¨¾ ag +Antigua i Barbuda ag +Antígua e Barbuda ag +Antigua e Barbuda ag +Antigua ÅŸi Barbuda ag +Ðнтигуа и Барбуда ag +Antigwa na Barubida ag +Antigua ja Barbuda ag +Antigua a Barbuda ag +Antigva in Barbuda ag +Ðнтигва и Барбуда ag +Antigva i Barbuda ag +I-Antigua kanye ne Barbuda ag +Antigua och Barbuda ag +ஆனà¯à®Ÿà®¿à®•ா மறà¯à®±à¯à®®à¯ பெரà¯à®®à¯à®Ÿà®¾ ag +Ðнтигуо ва Барбудо ag +อันทิà¸à¸±à¸§ à¹à¸¥à¸° บาร์บูดา ag +Antigua ve Barbuda ag +Antigua wä Barbuda ag +Трінідад Ñ– Тобаго ag +Ðнтигуа ва Барбуда ag +Antigua và Barbuda ag +Antigua eyet Barbuda ag +Antigua ne Barbuda ag +安æç“œå’Œå·´å¸ƒè¾¾ ag +安地瓜島和巴布é”å³¶ ag +Antigua kanye ne-Barbuda ag +Anguilla ai +أنغويلا ai +ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai +Ðнгила ai +অà§à¦¯à¦¾à¦™à§à¦—à§à¦‡à¦²à¦¾ ai +Angilla ai +Angwila ai +Ανγκουίλα ai +Angvilo ai +آنگوییلا ai +×נגווילה ai +à¤à¤‚गà¥à¤à¤²à¤¾ ai +Angvilla ai +イギリス属領アンギラ ai +អង់ហ្ស៊ីឡា ai +ì•™ê¸¸ë¼ ai +à»àºžàº™àº§àº´àº™ ai +Ðнгилја ai +Ðнгуаилла ai +Angwilla ai +à¨à¨‚ਨਗà©à¨ˆà¨²à¨¾ ai +Anghila ai +Ðнгилла ai +Angwiya ai +Angvila ai +Ðнгвила ai +Angvila ai +ஆனà¯à®•ிலà¯à®²à®¾ ai +Ðнгуилло ai +à¹à¸­à¸‡à¸à¸µà¸¥à¸² ai +ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai +Ðнгвилла ai +Anguila ai +安圭拉 ai +阿爾åŠåˆ©äºž ai +Albania al +Albanië al +ألبانيا al +ÐÐ»ÑŒÐ±Ð°Ð½Ñ–Ñ al +ÐÐ»Ð±Ð°Ð½Ð¸Ñ al +অলবেনিয়া al +Albani al +Albanija al +Albània al +Albánie al +Albanien al +Albanien al +Αλβανία al +Albanio al +Albaania al +آلبانی al +Albanie al +Albanië al +An Albáin al +Albánia al +×לבניה al +अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾ al +Albánia al +Albanía al +アルãƒãƒ‹ã‚¢ al +អាល់បានី al +알바니아 al +à»àº­àº”à»àº¥àº™àº•ິຠal +Albanija al +AlbÄnija al +Ðлбанија al +Ðлбани al +Albanija al +Albanien al +Albanië al +ਅਲਬਾਨੀਆ al +Albânia al +Albânia al +ÐÐ»Ð±Ð°Ð½Ð¸Ñ al +Alubaniya al +Albánia al +Albánsko al +Albanija al +Ðлбанија al +Albanija al +Albanien al +ஆலà¯à®ªà®©à®¿à®¯à®¾ al +Олбанӣ al +อัลเบเนีย al +Arnavutluk al +ÐÐ»Ð±Ð°Ð½Ñ–Ñ al +ÐÐ»Ð±Ð°Ð½Ð¸Ñ al +Albaneye al +阿尔巴尼亚 al +阿亞巴尼亞 al +Armenia am +Armenië am +أرمينيا am +ÐрмÑÐ½Ñ–Ñ am +ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am +আরà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ am +Armeni am +Armenija am +Armènia am +Arménie am +Armenien am +Armenien am +ΑÏμενία am +Armenio am +Armeenia am +ارمنستان am +Arménie am +Armenië am +An Airméin am +Arménia am +×רמניה am +आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾ am +Örményország am +Armenía am +アルメニア am +អារមáŸáž“ី am +아르메니아 am +ອາເຈນຕິນາ am +ArmÄ—nija am +ArmÄ“nija am +Ерменија am +Ðрмен am +Armenien am +Armenië am +ਅਰਮੀਨੀਆ am +Arménia am +Armênia am +ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am +Arumeniya am +Arménsko am +Armenija am +Јерменија am +Jermenija am +Armenien am +ஆரà¯à®®à¯‡à®©à®¿à®¯à®¾ am +ÐрманиÑтон am +อาร์เมเนีย am +Ermenistan am +Ärmänstan am +Ð’Ñ–Ñ€Ð¼ÐµÐ½Ñ–Ñ am +ÐрманиÑтон am +Ã…rmeneye am +亚美尼亚 am +亞美尼亞 am +Netherlands Antilles an +Nederlandse Antilles an +أنتيل هولندا an +ÐідÑрлÑндÑÐºÑ–Ñ Ðнтылы an +ХоландÑки Ðнтили an +নেদারলà§à¦¯à¦¾à¦£à§à¦¡à¦¸ অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦²à§‡à¦¸ an +Antilh an Izelvroioù an +Nizozemski Antili an +Antilles del Països Baixos an +Nizozemské Antily an +Ynysoedd Iseldiraidd Y Carib? an +Nederlandske antiller an +Niederländische Antillen an +Ολλανδικές Αντίλλες an +Nederlandaj Antiloj an +Antillas holandesas an +Hollandi Antillid an +Antilla Holandarrak an +آنتیلس هلند an +Alankomaiden Antillit an +Antilles néerlandaises an +Nederlânske Antillen an +Aintillí na hÃsiltíre an +Antillas Holandesas an +नीदरलैंड à¤à¤¨à¥à¤Ÿà¥€à¤²à¥€à¤¸ an +Nizozemski Antili an +Holland-Antillák an +Hollensku Antillur an +Antille Olandesi an +オランダ領アンãƒãƒ« an +អង់ទីយáŸâ€‹áž áž¼áž›áŸ’លង់ an +네ëœëž€ë“œë ¹ 안틸레스 an +ເນເທີà»àº¥àº™ an +Nyderlandų Antilai an +NÄ«derlandes Antiļas an +ХоландÑки Ðнтили an +Ðедерландын ÐнтиллÑÑ an +De nederlandske Antillene an +Nedderlandsche Antillen an +Nederlandse Antillen an +Dei nederlandske Antillane an +ਨੀਂਦਰਲੈਂਡ à¨à¨‚ਟੀਲੀਸ an +Antyle Holenderskie an +Antilhas Holandês an +Antilhas Holandesas an +Antilele Olandeze an +ÐидерландÑкие ÐнтильÑкие оÑтрова an +Antiye z'Ubuholande an +HollándalaÅ¡ Antillat an +Holandské Antily an +Nizozemski Antili an +ХоландÑки антили an +Holandski antili an +Nederländska Antillerna an +நெதரà¯à®²à®¾à®¨à¯à®¤à¯ அனà¯à®Ÿà®¿à®²à¯à®¸à¯ an +ÐнтилиÑи Ҳолланд an +เนเธอร์à¹à¸¥à¸™à¸”์ à¹à¸­à¸™à¸—ิลีส an +Hollanda Antilleri an +Niderland Antilläre an +ÐнтільÑькі оÑтрови (Ðідерланди) an +Ðидерландлар Ðнтил Ороллари an +Hà Lan Antilles an +Antiyes Neyerlandesses an +è·å±žå®‰çš„列斯群岛 an +è·å±¬å®‰åœ°åˆ—斯群島 an +Angola ao +أنغولا ao +Ðнгола ao +Ðнгола ao +অà§à¦¯à¦¾à¦™à§à¦—োলা ao +Ανγκόλα ao +Angolo ao +آنگولا ao +Angóla ao +×נגולה ao +अंगोला ao +Angóla ao +アンゴラ ao +អង់ហ្គោឡា ao +ì•™ê³¨ë¼ ao +ບັນà»àºà»€àº¥àºµàº ao +Ðнгола ao +Ðнгол ao +ਅੰਗੋਲਾ ao +Ðнгола ao +Ðнгола ao +ஆஙà¯à®•ோலா ao +Ðнгуло ao +à¹à¸­à¸‡à¹‚à¸à¸¥à¸² ao +Ðнгола ao +Ðнгола ao +安哥拉 ao +安哥拉 ao +Argentina ar +Argentinië ar +الأرجنتين ar +Ðргентына ar +Ðржентина ar +আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ ar +Arc'hantina ar +Ariannin ar +Argentinien ar +ΑÏγεντινή ar +Argentino ar +آرژانتین ar +Agentiina ar +Argentine ar +Argentinië ar +An Airgintín ar +Arxentina ar +×רגנטינה ar +अरà¥à¤œà¥‡à¤‚टीना ar +Argentína ar +Argentína ar +アルゼンãƒãƒ³ ar +អាហ្សង់ទីន ar +아르헨티나 ar +ອາເຈນຕິນາ ar +ArgentÄ«na ar +Ðргентина ar +Ðргентин ar +ArÄ¡entina ar +Argentinien ar +Argentinië ar +ਅਰਜ਼ਨਟੀਨਾ ar +Argentyna ar +Ðргентина ar +Arijantina ar +Argentína ar +Ðргентина ar +I-Argentina ar +ஆரà¯à®šà¯†à®©à¯à®Ÿà®¿à®©à®¾ ar +Оржонтина ar +อาร์เจนตินา ar +Arjantin ar +Ðргентина ar +Ðргентина ar +Agenthina ar +Ã…rdjintene ar +阿根廷 ar +阿根廷 ar +American Samoa as +Amerikanse Samoa as +ساموا الأمريكية as +ÐмÑрыканÑкае Самоа as +ÐмериканÑки Самоа as +মারà§à¦•িন সামোয়া as +Samoa amerikanek as +AmeriÄka Samoa as +Samoa Americana as +Americká Samoa as +Samoa Americanaidd as +Samoa (USA) as +Amerikanisches Samoa as +ΑμεÏικανική Σαμόα as +Amerika Samoo as +Samoa americana as +Ameerika Samoa as +Amerikar Samoa as +ساموای آمریکا as +Amerikan Samoa as +Samoa américaines as +Amerikaansk Samoa as +Samó Meiriceánach as +Samoa Americana as +סמו××” ×”×מריקנית as +अमेरिकी सामोआ as +AmeriÄka Samoa as +Amerikai Szamoa as +Bandaríska Samóa as +Samoa Americane as +アメリカンサモア as +សាមូអា អាមáŸážšáž·áž€ as +미국령 사모아 as +ອາເມລິàºàº²à»€àº«àº™àº·àº­ as +Amerikos Samoa as +Amerikas Samoa as +ÐмериканÑка Самоа as +Ðмерик, Самоа as +Samoa Amerikana as +Amerikansk Samoa as +Amerikaansch Samoa as +Amerikaans Samoa as +Amerikansk Samoa as +ਅਮਰੀਕੀ ਸਾਮੋਆ as +Samoa AmerykaÅ„skie as +Samoa Americana as +Samoa Americana as +Samoa americană as +ÐмериканÑкое Самоа as +Samowa Nyamerika as +AmerihkálaÅ¡ Samoa as +Americká Samoa as +AmeriÅ¡ka Samoa as +Ðмеричка Самоа as +AmeriÄka Samoa as +Amerikanska Samoa as +அமெரிகà¯à®•ா சமோயா as +Самоаи Ðмрикоӣ as +อเมริà¸à¸±à¸™ ซามัว as +Amerika Samoası as +Amerikalı Samoa as +ÐмериканÑьке Самоа as +Ðмерика СамоаÑи as +Samowa Amerikinne as +ç¾Žå±žè¨æ‘©äºš as +美屬薩摩亞 as +Austria at +Oostenryk at +النمسا at +Avstriya at +ÐÑžÑÑ‚Ñ€Ñ‹Ñ at +ÐвÑÑ‚Ñ€Ð¸Ñ at +অসà§à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ at +Aostria at +Austrija at +Àustria at +Rakousko at +Awstria at +Østrig at +Österreich at +ΑυστÏία at +AÅ­strio at +اتریش at +Itävalta at +Eysturríki at +Autriche at +Eastenryk at +An Ostair at +×וסטריה at +आसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾ at +Austrija at +Ausztria at +Austurríki at +オーストリア at +អូទ្រីស at +오스트리아 at +ອອດສະເຕເລີຠat +Austrija at +Austrija at +ÐвÑтрија at +ÐвÑтри at +Awtrija at +Østerrike at +Österriek at +Oostenrijk at +Austerrike at +ਆਸਟਰੀਆ at +Ãustria at +Ãustria at +ÐвÑÑ‚Ñ€Ð¸Ñ at +Ositiriya at +Nuortariika at +Rakúsko at +Avstrija at +ÐуÑтрија at +Austrija at +I-Austria at +Österrike at +ஆஸà¯à®¤à¯à®¤à®¿à®°à®¿à®¯à®¾ at +ÐвÑÑ‚Ñ€Ð¸Ñ at +ออสเตรีย at +Avusturya at +ÐвÑÑ‚Ñ€Ñ–Ñ at +ÐвÑÑ‚Ñ€Ð¸Ñ at +Ositiria at +Ão at +Otriche at +奥地利 at +奧地利 at +Australia au +Australië au +أستراليا au +Avustralya au +ÐÑžÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au +ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au +অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à§Ÿà¦¾ au +Aostralia au +Australija au +Austràlia au +Austrálie au +Awstralia au +Australien au +Australien au +ΑυστÏαλία au +AÅ­stralio au +Austraalia au +استرالیا au +Australie au +Australië au +An Astráil au +Austrália au +×וסטרליה au +आसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾ au +Australija au +Ausztrália au +Ãstralía au +オーストラリア au +អូស្ážáŸ’រាលី au +오스트레ì¼ë¦¬ì•„ au +ອອດສະເຕເລີຠau +Australija au +AustrÄlija au +ÐвÑтралија au +ÐвÑтрали au +Awstralja au +Australien au +Australië au +ਅਸਟਰੇਲੀਆ au +Austrália au +Austrália au +ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au +Ositaraliya au +Austrália au +Austrália au +Avstralija au +ÐуÑтралија au +Australija au +I-Australia au +Australien au +ஆஸà¯à®¤à¯à®¤à®¿à®°à¯‡à®²à®¿à®¯à®¾ au +ОÑтролиё au +ออสเตรเลีย au +Avusturalya au +ÐвÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au +ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au +Ositiralia au +Úc au +Ostraleye au +澳大利亚 au +澳大利亞 au +Aruba aw +أروبا aw +Ðруба aw +আরà§à¦¬à¦¾ aw +Arwba aw +ΑÏοÏμπα aw +Arubo aw +آروبا aw +×רובה aw +अरूबा aw +Arúba aw +オランダ自治領アルムaw +អារូបា aw +아루바 aw +ເàºàº¡à»„ັພ່ aw +Ðруба aw +Ðрува aw +ਅਰੂਬੀ aw +Ðруба aw +Ãruba aw +Ðруба aw +à®…à®°à¯à®ªà®¾ aw +Ðрубо aw +อรูบา aw +Ðруба aw +Ðруба aw +Arouba aw +阿é²å·´ aw +阿魯巴 aw +Ã…land Islands ax +Ã…land Eilande ax +ОÑтрови Ðланд ax +Illes Ã…land ax +Ã…landské ostrovy ax +Ã…land-øerne ax +Aland ax +Îησιά Ã…land ax +Islas Aland ax +Ahvenamaa ax +Ã…land irlak ax +Ahvenanmaan saaret ax +ÃŽles Ã…land ax +Ã…land-eilannen ax +Na hOileáin Ã…land ax +Illas Ã…land ax +Ã…land-szigetek ax +Ãlandseyjar ax +Isole Ã…land ax +オーランド諸島 ax +កោះ Ã…land ax +Ã…land salos ax +ОÑтрови Оланд ax +Ã…land-øyene ax +Ã…land-Inseln ax +Ã…land-eilanden ax +Ã…land-øyane ax +ਅਮਾਨ ਟਾਪੂ ax +Wyspy Ã…land ax +Ilhas Ã…land ax +Ilhas Ã…land ax +ÐландÑкие оÑтрова ax +Ibirwa by'Ã…land ax +Ã…land sullot ax +Ã…landski otoki ax +ÐландÑка оÑтрва ax +Alandska ostrva ax +Ã…land ax +หมู่เà¸à¸²à¸°à¸­à¸²à¸¥à¸±à¸™à¸”์ ax +Cayman Adaları ax +Aland Utrawları ax +ÐландÑькі оÑтрови ax +Ðланд Ороллари ax +阿兰群岛 ax +奧蘭群島 ax +Azerbaijan az +أذربيجان az +AzÉ™rbaycan az +ÐзÑрбайджан az +Ðзербайджан az +আজেরবাইজান az +Azerbeidjan az +Azerbejdžan az +Azerbaitjan az +Ãzerbajdžánský az +Aserbaijan az +Azerbajdjan az +Aserbaidschan az +ΑζεÏμπαϊτζάν az +AzerbajÄano az +Azerbaiján az +Aserbaidžaan az +آذربایجان az +Azerbaidäani az +Aserbadsjan az +Azerbeidjan az +An Asarbaiseáin az +×זרביג'ן az +अजरबैजान az +Azerbejdžan az +Azerbajdzsán az +Aserbaídsjan az +Azerbaigian az +アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³ az +អាហ្ស៊ែរបែហ្សង់ az +아제르바ì´ìž” az +ອາເຊີໄບຈັນ az +Azerbaidžanas az +AzerbaidžÄna az +Ðзербејџан az +Ðзарбайжан az +AżerbajÄ¡an az +Aserbajdsjan az +Aserbaidschan az +Azerbeidjan az +Aserbajdsjan az +ਅਜ਼ਰਬਾਈਜਾਨ az +Azerbejdżan az +Azerbaijão az +Azerbaijão az +Ðзербайджан az +Azeribayijani az +Aserbaižan az +Ãzerbajdžánsky az +Azerbajdžan az +Ðзербејџан az +Azerbejdžan az +I-Azerbaijan az +அசரà¯à®ªà¯ˆà®šà®¾à®©à¯ az +Озарбойҷон az +อาร์เซอร์ไบจัน az +Azerice az +Äzärbaycan az +Ðзербайджан az +Озарбайжон az +Azerbaydjan az +阿塞拜疆 az +亞塞拜然 az +Bosnia and Herzegovina ba +Bosnië en Herzegovina ba +البوسنا Ùˆ الهرسك ba +БоÑÑŒÐ½Ñ–Ñ Ñ– Герцагавіна ba +БоÑна и Херцеговина ba +বসনিয়া à¦à¦¬à¦‚ হারজিগোভিনা ba +Bosni hag Herzigovi ba +Bosna i Hercegovina ba +Bòsnia i Hercegovina ba +Bosna a Herzegovina ba +Bosnia a Hertsegofina ba +Bosnien-Herzegovina ba +Bosnien und Herzegowina ba +Βοσνία και ΕÏζεγοβίνη ba +Bosnio kaj Hercegovino ba +Bosnia y Herzegovina ba +Bosnia ja Hertsegovina ba +Bosnia eta Herzegovina ba +بوسنی Ùˆ هرزگوین ba +Bosnia ja Herzegovina ba +Bosnia-Herzegovina ba +Bosnie herzégovine ba +Bosnië en Herzegovina ba +An Bhoisnia agus Heirseagóivéin ba +Bosnia e Herzegovina ba +בוסניה הרצגובינה ba +बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¥‡à¤—ोविना ba +Bosna i Hercegovina ba +Bosznia-Hercegovina ba +Bosnía og Hersegóvína ba +Bosnia e Erzegovina ba +ボスニアヘルツェゴビナ ba +បូស្ន៊ី និង​ហឺហ្ស៊áŸáž áŸ’គោវីណា ba +보스니아어와 헤르체고비나 ba +ບອສເນີຠà»àº¥àº° ເຫີເຊີໂàºàº§àº´àº™àº² ba +Bosnija ir Hercegovina ba +Bosnija un Hercogovina ba +БоÑна и Херцеговина ba +БоÑни ба Херцеговина ba +Bożnia u Ħerżegovina ba +Bosnia-Hercegovina ba +Bosnien-Herzegowina ba +Bosnië en Herzegovina ba +Bosnia-Hercegovina ba +Bosnia le Herzegovina ba +ਬੋਸਨੀਆ ਤੇ ਹਰਜ਼ੀਗੋਵਿਨਾ ba +BoÅ›nia i Hercegowina ba +Bósnia e Herzegovina ba +Bósnia Herzegovina ba +Bosnia ÅŸi HerÅ£egovina ba +БоÑÐ½Ð¸Ñ Ð¸ Герцеговина ba +Bosiniya na Herizegovina ba +Bosnia ja Hercegovina ba +Bosna a Hercegovina ba +Bosna in Hercegovina ba +БоÑна и Херцеговина ba +Bosna i Hercegovina ba +I-Bosnia kanye ne Herzegovina ba +Bosnien och Herzegovina ba +பொசà¯à®©à®¿à®¯à®¾ மறà¯à®±à¯à®®à¯ ஹரà¯à®œà®¿à®•ோவினா ba +БоÑÐ½Ð¸Ñ Ð²Ð° ГерÑогавина ba +บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸´à¸™à¸² ba +Bosna Hersek ba +Bosnia wä Herzegovina ba +БоÑÐ½Ñ–Ñ Ñ– Герцеговина ba +БоÑÐ½Ð¸Ñ Ð²Ð° Герцоговина ba +Mubosinia na Muhezegovina ba +Bosnia và Herzegovina ba +Bosneye ba +Bosnia ne Herzegovina ba +波斯尼亚和黑塞哥维那 ba +æ³¢å£«å°¼äºžèˆ‡èµ«å¡žå“¥ç¶­ç´ ba +Bosnia kanye ne-Herzegovina ba +Barbados bb +بربادوس bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Ð‘Ð°Ñ€Ð±ÐµÐ¹Ð´Ð¾Ñ bb +বারবাডোস bb +ΜπαÏμπάντος bb +Barbado bb +باربادوس bb +Barbade bb +Barbadós bb +ברבדוס bb +बारबाडोस bb +ãƒãƒ«ãƒãƒ‰ã‚¹ bb +បារបាដូស bb +바르바ë„스 bb +ບາລບາດອດສ bb +Barbadosas bb +Barbadosa bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Ð‘Ð°Ñ€Ð±Ð¾Ð´Ð°Ñ bb +ਬਾਰਬਾਡੋਸ bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Barubadosi bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +I-Barbados bb +பாரà¯à®ªà¯‡à®Ÿà®¾à®šà¯ bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +บาร์บาดอส bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +BÃ¥rbades bb +巴巴多斯 bb +å·´è²å¤š bb +Bangladesh bd +بنغلاديش bd +BanqladeÅŸ bd +БанглÑдÑш bd +Бангладеш bd +বাংলাদেশ bd +Bangladaech bd +BangladeÅ¡ bd +Bangladéš bd +Bangladesch bd +Μπαγκλαντές bd +BangladeÅo bd +بنگلادش bd +An Bhanglaidéis bd +בנגלדש bd +बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶ bd +BangladeÅ¡ bd +Banglades bd +Bangladess bd +ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥ bd +បង់ក្លាដáŸážŸáŸ’áž  bd +방글ë¼ë°ì‹œ bd +ບັງຄະລາເທດ bd +BangladeÅ¡as bd +BangladeÅ¡a bd +Бангладеш bd +Бангладеш bd +Bangladexx bd +Bangladesch bd +ਬੰਗਲਾਦੇਸ਼ bd +Bangladesz bd +BangladeÅŸ bd +Бангладеш bd +Bangaladeshi bd +Bangladéš bd +BangladeÅ¡ bd +Бангладеш bd +BangladeÅ¡ bd +I-Bangladesh bd +பஙà¯à®•ளாதேச௠bd +Банглодеш bd +บังคลาเทศ bd +BangladeÅŸ bd +BangladeÅŸ bd +Бангладеш bd +Бангладеш bd +孟加拉国 bd +孟加拉 bd +Belgium be +België be +بلجيكا be +Belçika be +БÑÐ»ÑŒÐ³Ñ–Ñ be +Ð‘ÐµÐ»Ð³Ð¸Ñ be +বেলজিয়াম be +Belgia be +Belgija be +Bèlgica be +Belgie be +Gwlad Belg be +Belgien be +Belgien be +Βέλγιο be +Belgio be +Bélgica be +Belgia be +Belgika be +بلژیک be +Belgia be +Belgia be +Belgique be +België be +An Bheilg be +Bélxica be +בלגיה be +बेलà¥à¤œà¤¿à¤¯à¤® be +Belgija be +Belgia be +Belgía be +Belgio be +ベルギー be +បែលហ្ស៊ិក be +ë²¨ê¸°ì— be +ເບລຢ່ງມ be +Belgija be +Beļģija be +Белгија be +Белги be +BelÄ¡ju be +Belgia be +Belgien be +België be +Belgia be +Bèlgica be +ਬੈਲਜੀਅਮ be +Belgia be +Bélgica be +Bélgica be +Belgia be +Ð‘ÐµÐ»ÑŒÐ³Ð¸Ñ be +Ububiligi be +Belgia be +Belgicko be +Belgija be +Белгија be +Belgija be +I-Belgium be +Belgien be +பெலà¯à®šà®¿à®¯à®®à¯ be +Ð‘ÐµÐ»Ð³Ð¸Ñ be +เบลเยียม be +Belçika be +Belgia be +Ð‘ÐµÐ»ÑŒÐ³Ñ–Ñ be +Ð‘ÐµÐ»Ð³Ð¸Ñ be +Bỉ be +Beldjike be +比利时 be +比利時 be +Burkina Faso bf +بوركينا ÙØ§Ø³Ùˆ bf +Буркіна ФаÑо bf +Буркина ФаÑо bf +বারকিনা ফাসো bf +Bwrcina Ffaso bf +ΜπουÏκίνα Φάσο bf +Burkino bf +Ø¨ÙˆØ±Ú©ÛŒÙ†Ø§ÙØ§Ø³Ùˆ bf +Buircíne Fasó bf +בורניקה פ×סו bf +बà¥à¤°à¥à¤•िना फासो bf +Burkina faso bf +Búrkína Fasó bf +ブルキナファソ bf +ប៊ូរគីណាហ្វាសូ bf +부르키나 파소 bf +ຕຸລະàºàºµ bf +Буркина ФаÑо bf +Буркина ФаÑо bf +ਬà©à¨°à¨•ਿਨਾ ਫਾਸੋ bf +Буркина-ФаÑо bf +Burukina Faso bf +Буркина ФаÑо bf +பரà¯à®•ினா ஃபசோ bf +Буркина ФаÑу bf +เบอร์à¸à¸´à¸™à¸²à¸Ÿà¸²à¹‚ซ bf +Буркіна-ФаÑо bf +Буркина-ФаÑÑо bf +Bourkina Fasso bf +布基纳法索 bf +布å‰ç´æ³•ç´¢ bf +Bulgaria bg +Bulgarye bg +بلغاريا bg +Bolgarıstan bg +Ð‘Ð°ÑžÐ³Ð°Ñ€Ñ‹Ñ bg +Ð‘ÑŠÐ»Ð³Ð°Ñ€Ð¸Ñ bg +বà§à¦²à¦—েরিয়া bg +Bulgari bg +Bugarska bg +Bulgària bg +Bulharsko bg +Bwlgaria bg +Bulgarien bg +Bulgarien bg +ΒουλγαÏία bg +Bulgario bg +Bulgaaria bg +بلغارستان bg +Bulgarie bg +Bulgarije bg +An Bhulgáir bg +Bulgária bg +בולגריה bg +बà¥à¤²à¥à¤—ारिया bg +Bugarska bg +Bulgária bg +Búlgaría bg +ブルガリア bg +ប៊ុលហ្ការី bg +불가리아 bg +ບັນà»àºà»€àº¥àºµàº bg +Bulgarija bg +BulgÄrija bg +Бугарија bg +Болгари bg +Bulgarija bg +Bulgarien bg +Bulgarije bg +ਬà©à¨²à¨—ਾਰੀਆ bg +BuÅ‚garia bg +Bulgária bg +Bulgária bg +Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg +Buligariya bg +Bulgária bg +Bulharsko bg +Bolgarija bg +БугарÑка bg +Bugarska bg +I-Bulgaria bg +Bulgarien bg +பலà¯à®•ேரியா bg +БулғориÑтон bg +บัลà¹à¸à¹€à¸£à¸µà¸¢ bg +Bulgaristan bg +Ð‘Ð¾Ð»Ð³Ð°Ñ€Ñ–Ñ bg +Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg +Baligaria bg +BulgÃ¥reye bg +ä¿åŠ åˆ©äºš bg +ä¿åŠ åˆ©äºž bg +Bahrain bh +البحرين bh +БахрÑйн bh +Бахрейн bh +বাহরেন bh +Barein bh +Bahrein bh +Bahrajn bh +ΜπαχÏέιν bh +Barejno bh +Bahrein bh +Bahrein bh +بحرین bh +Baghrein bh +Bairéin bh +Barein bh +בחריין bh +बहारीन bh +Barein bh +ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³ bh +បារ៉ែន bh +ë°”ë ˆì¸ bh +ຖັàºàºà»ˆàº‡àº§ bh +Bahreinas bh +Bahreina bh +Бахреин bh +Бахрайн bh +Baħrain bh +Baghrein bh +ਬਹਿਰੀਨ bh +Bahrajn bh +Bahrein bh +Бахрейн bh +Bahirayini bh +Bahrajn bh +Bahrajn bh +Бахреин bh +Bahrein bh +I-Bahrain bh +Bahrein bh +பஹà¯à®°à¯ˆà®©à¯ bh +Баҳрайн bh +บาห์เรียน bh +Bahreyn bh +Bahreyn bh +Бахрейн bh +Баҳрайн bh +Bareyn bh +å·´æž— bh +å·´æž— bh +Burundi bi +بوروندي bi +Бурундзі bi +Бурунди bi +বà§à¦°à§à¦¨à§à¦¡à¦¿ bi +Bwrwndi bi +ΜπουÏουντί bi +Burundo bi +بروندی bi +An Bhurúin bi +בורונדי bi +बà¥à¤°à¥‚ंडी bi +Búrúndí bi +ブルンジ bi +ប៊ូរុនឌី bi +부룬디 bi +ເຄອຣດ bi +Burundija bi +Бурунди bi +Бурунди bi +ਬà©à¨°à©à¨¨à¨¡à©€ bi +Бурунди bi +Бурунди bi +பà¯à®°à¯à®©à¯à®Ÿà®¿ bi +Бурундӣ bi +บูรันดิ bi +Бурунді bi +Бурунди bi +Bouroundi bi +布隆迪 bi +浦隆地 bi +Benin bj +Denin bj +بينين bj +БÑнін bj +Бенин bj +বেনিন bj +Μπενίν bj +Benino bj +بنین bj +Bénin bj +Beinin bj +בנין bj +बेनिन bj +Benín bj +ベナン bj +áž”áŸážŽáž¶áŸ†áž„ bj +베냉 bj +ບອສເນີຠbj +Benina bj +Бенин bj +Бенин bj +ਬੀਨਿਨ bj +Benim bj +Бенин bj +Bene bj +Бенин bj +பெனின௠bj +Бенини bj +เบนิน bj +Бенін bj +Бенин bj +è´å® bj +è²å— bj +Bermuda bm +برمودا bm +БÑрмуды bm +Бермуда bm +বারà§à¦®à§à¦¡à¦¾ bm +Bermud bm +Bermudy bm +Bermwda bm +Bermudas bm +ΒεÏμοÏδες bm +Bermudoj bm +برمودا bm +Bermudes bm +Beirmiúda bm +ברמודה bm +बरमूडा bm +Bermúdaeyjar bm +英領ãƒãƒ¼ãƒŸãƒ¥ãƒ¼ãƒ€ bm +ប៊áŸážšáž˜áž¼ážŠáž¶ bm +버뮤다 bm +ເàºàº¥àº¥àº°àº¡àº±àº™ bm +Bermudų bm +Bermudas bm +Бермуди bm +Бермуда bm +ਬੀਰਮà©à¨¡à¨¾ bm +Bermudy bm +Bermude bm +БермудÑкие ОÑтрова bm +Berimuda bm +Bermudy bm +Bermudi bm +Бермуда bm +பெரà¯à®®à¯à®Ÿà®¾ bm +Бермудо bm +เบอร์มิวดา bm +Бермуди bm +Бермуда Ороллари bm +Bermudes bm +百慕大 bm +ç™¾æ…•é” bm +Brunei Darussalam bn +بروناي دار السلام bn +БрунÑй bn +Бруней bn +বà§à¦°à§à¦¨à§‡à¦‡ দারà¦à¦¸à¦¸à¦²à¦¾à¦® bn +Darussalam Brunei bn +Brunej bn +Brwnei Darwsalam bn +Brunei bn +ΜπÏουνέι ÎταÏουσαλάμ bn +Brunejo bn +Brunei bn +برونویی بیت‌المقدس bn +Brunei bn +Brúiné bn +בורניי ×“×¨×•×¡×œ× bn +बà¥à¤°à¥‚नेई दारेसà¥à¤¸à¤²à¤¾à¤® bn +Brunei Szultánság bn +Brúnei Darussalam bn +Brunei bn +ブルãƒã‚¤ bn +ប្រ៊ុយណ០bn +ë¸Œë£¨ë‚˜ì´ bn +ເບລາລັສເຊີຠbn +Bruneja Darusalama bn +Брунеи Дар ÐµÑ Ð¡Ð°Ð»Ð°Ð¼ bn +Бруней ДаруÑÑалам bn +Brunei bn +Brunei bn +Brunei bn +ਬਰੂਨੀ ਡਾਰੂਸਲਾਮ bn +Brunei Dar-es-Salam bn +Brunei bn +Бруней bn +Buruneyi Darusalamu bn +Brunei bn +Brunei Darusalam bn +Брунеј ДаруÑалам bn +Brunej Darusalam bn +பà¯à®°à¯‚னை டரà¯à®šà®²à®¾à®®à¯ bn +Брунеи Ð‘Ð°Ð¹Ñ‚ÑƒÐ»Ð¼ÑƒÒ›Ð°Ð´Ð´Ð°Ñ bn +บรูไนดูรัสซาลาม bn +Brunei bn +Бруней ДаруÑÑалам bn +Бруней ДоруÑÑалом bn +Bruney Darussalam bn +文莱达é²è¨å…° bn +æ–‡èŠé”魯薩蘭 bn +Bolivia bo +Bolivië bo +بوليÙيا bo +Boliviya bo +Ð‘Ð°Ð»Ñ–Ð²Ñ–Ñ bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +বলিভিয়া bo +Bolivija bo +Bolívia bo +Bolívie bo +Bolifia bo +Bolivien bo +Βολιβία bo +Bolivio bo +Boliivia bo +بولیوی bo +Bolivie bo +An Bholaiv bo +Bolívia bo +בוליביה bo +बोलिविया bo +Bolivija bo +Bolívia bo +Bólivía bo +ボリビア bo +បូលីវី bo +볼리비아 bo +ໂບລີເວີຠbo +Bolivija bo +BolÄ«vija bo +Боливија bo +Боливи bo +Bolivja bo +Bolivien bo +ਬੋਲਵੀਆ bo +Boliwia bo +Bolívia bo +Bolívia bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +Boliviya bo +Bolívia bo +Bolivija bo +Боливија bo +Bolivija bo +I-Bolivia bo +பொலிவியா bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +โบลิเวีย bo +Bolivya bo +Ð‘Ð¾Ð»Ñ–Ð²Ñ–Ñ bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +Boliveye bo +玻利维亚 bo +玻利維亞 bo +Brazil br +Brazilië br +البرازيل br +Braziliya br +Ð‘Ñ€Ð°Ð·Ñ‹Ð»Ñ–Ñ br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br +বà§à¦°à¦¾à¦œà¦¿à¦² br +Brasil br +Brazílie br +Brasil br +Brasilien br +Brasilien br +Î’Ïαζιλία br +Brazilo br +Brasil br +Brasiilia br +Brasil br +برزیل br +Brasilia br +Brésil br +Brazilië br +An Bhrasaíl br +Brasil br +ברזיל br +बà¥à¤°à¤¾à¤œà¥€à¤² br +Brazília br +Brasilía br +Brasile br +ブラジル br +ប្រáŸáž áŸ’ស៊ីល br +브ë¼ì§ˆ br +ບາຊີລ br +Brazilija br +BrazÄ«lija br +Бразил br +Бразил br +Brażil br +Brasil br +Brasilien br +Brazilië br +Brasil br +Brasil br +ਬਰਾਜ਼ੀਲ br +Brazylia br +Brasil br +Brasil br +Brazilia br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br +Burezile br +Brasil br +Brazília br +Brazilija br +Бразил br +I-Brazil br +Brasilien br +பிரேசில௠br +Бразил br +บราซิล br +Brezilya br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ñ–Ñ br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br +Burazili br +Braezi br +巴西 br +巴西 br +Bahamas bs +جزر الباهاما bs +Багамы bs +БахамÑки оÑтрови bs +বাহামাস bs +Bahami bs +Bahames bs +Bahamy bs +Ynysoedd Bahama bs +Μπαχάμες bs +Bahamoj bs +Bahama bs +باهاماس bs +Bahaman saaret bs +Na Bahámaí bs +Baamas bs +בהמס bs +बहामा bs +Bahamák bs +Bahamaeyjar bs +ãƒãƒãƒž bs +បាហាម៉ា bs +바하마 bs +ປານາມາ bs +Bahamų bs +Бахами bs +Ð‘Ð°Ñ…Ð°Ð¼Ð°Ñ bs +Baħamas bs +ਬਾਹਾਮਾਸ bs +Bahamy bs +БагамÑкие оÑтрова bs +Bahamasi bs +Bahamy bs +Bahami bs +Бахами bs +Bahami bs +பனாமா bs +Ð‘Ð¾Ò³Ð¾Ð¼Ð¾Ñ bs +บาฮามา bs +Bahamalar bs +Багами bs +Багама Ороллари bs +巴哈马 bs +巴拿馬 bs +Bhutan bt +بوتان bt +Бутан bt +Бутан bt +ভূটান bt +Butañ bt +Butan bt +Bhútán bt +Bhwtan bt +Μπουτάν bt +Butano bt +Bhután bt +بوتان bt +Bhoutan bt +An Bhútáin bt +Bután bt +בהוטן bt +भूटान bt +Bhután bt +Bútan bt +ブータン bt +ប៊ូážáž¶áž“ bt +부탄 bt +ຖັàºàºà»ˆàº‡àº§ bt +Bhutano bt +ButÄna bt +Бутан bt +Бутан bt +Butan bt +ਭà©à¨Ÿà¨¾à¨¨ bt +Butão bt +Butão bt +Butan bt +Бутан bt +Butani bt +Butan bt +Бутан bt +Butan bt +பூடான௠bt +Бутон bt +ภูà¸à¸²à¸™ bt +Butan bt +Бутан bt +Бутан bt +Boutan bt +ä¸ä¸¹ bt +ä¸ä¸¹ bt +Botswana bw +بوتسوانا bw +БатÑвана bw +БотÑуана bw +বটসওয়ানা bw +Bocvana bw +Μποτσουάνα bw +Bocvano bw +بوتسووانا bw +An Bhotsuáin bw +Botsuana bw +בוצ×ונה bw +बोतà¥à¤¸à¤µà¤¾à¤¨à¤¾ bw +Botsvana bw +Botsvana bw +ボツワナ bw +បុážážŸáŸ’វាណា bw +보츠와나 bw +ບອດສເນີຠbw +Botsvanos bw +BotsvÄna bw +Боцвана bw +БотÑвана bw +ਬੋਟਸਵਾਨਾ bw +Botsuana bw +БотÑвана bw +Botsvana bw +Боцвана bw +Bocvana bw +பாடà¯à®¸à¯à®µà®©à®¾ bw +БотÑвана bw +บอทสวานา bw +Botsvana bw +БотÑвана bw +Боцвана bw +Boswana bw +åšèŒ¨ç“¦çº³ bw +波札那 bw +Belarus by +روسيا البيضاء by +БеларуÑÑŒ by +Ð‘ÐµÐ»Ð°Ñ€ÑƒÑ by +বেলারà§à¦¸ by +Belarusi by +Bjelorusija by +Bielorússia by +BÄ›lorusko by +Belarws by +Hviderusland by +Weißrussland by +ΛευκοÏωσία by +Belorusio by +Valgevene by +بلاروس by +Valkovenäjä by +Hvítarusland by +Bélarus by +Wyt-Rusland by +An Bhealarúis by +Bielorúsia by +בלרוס by +बेलारूस by +Bjelorusija by +Fehéroroszország by +Hvíta-Rússland by +Bielorussia by +ベラルーシ by +áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស by +벨ë¼ë£¨ìФ by +ເບລາລັສ by +Baltarusija by +Baltkrievija by +БелоруÑија by +Цагаан Ð¾Ñ€Ð¾Ñ by +Hviterussland by +Wittrussland by +Wit-Rusland by +Kviterussland by +ਬੇਲਾਰੂਸ by +BiaÅ‚oruÅ› by +Bielorrússia by +БеларуÑÑŒ by +Belarusi by +Vilges-Ruošša by +Bielorusko by +Belorusija by +БелоруÑија by +Belorusija by +I-Belarus by +Vitryssland by +பெலாரூச௠by +БелоруÑиё by +เบลารุส by +БілоруÑÑ–Ñ by +Ð‘ÐµÐ»Ð¾Ñ€ÑƒÑ by +Belaruss by +白俄罗斯 by +白俄羅斯 by +Belize bz +بيليز bz +БÑлізе bz +Белийз bz +বেলিজ bz +Beliz bz +Bel?s bz +Μπελίζε bz +Belizo bz +بلیز bz +An Bheilís bz +בליז bz +बेलिज bz +Belís bz +ベリーズ bz +áž”áŸáž›áž¸áž áŸ’ស bz +벨리즈 bz +ເບລàºà»ˆàº‡àº¡ bz +Belizo bz +Beliza bz +Белизе bz +Ð‘ÐµÐ»Ð¸Ð·Ñ bz +Beliż bz +ਬੀਲੀਜ਼ਿ bz +Белиз bz +Белиз bz +Beliz bz +பெலà¯à®šà®¿à®¯à®®à¯ bz +Белиз bz +เบลไลซ์ bz +Beliz bz +Беліз bz +Белиз bz +伯利兹 bz +比利時 bz +Default C +Standaard C +Ø§ÙØªØ±Ø§Ø¶ÙŠ C +Ön QurÄŸulu C +Па ўмаўчаньні C +По подразбиране C +ডিফলà§à¦Ÿ C +Dre ziouer C +Omissió C +Výchozí C +Rhagosodedig C +Standard C +Standard C +ΠÏοκαθοÏισμένο C +Apriora C +Predeterminado C +Vaikimisi C +Lehenetsia C +Ù¾ÛŒØ´â€ŒÙØ±Ø¶ C +Oletus C +Forsettur C +Par défaut C +Standert C +Réamhshocrú C +Por Omisión C +ברירת מחדל C +डिफ़ॉलà¥à¤Ÿ C +UobiÄajeno C +Standard C +Alapértelmezett C +Standar C +Sjálfgefið C +Predefinito C +標準 C +លំនាំដើម C +기본 C +ຄ່າປະລິàºàº²àº C +Numatyta C +NoklusÄ“tais C +Почетно C +Стандарт C +Normali C +Standard C +Standard C +Standaard C +Standard C +Thuso ya Tshoganetso C +Omission C +ਮੂਲ C +DomyÅ›lnie C +Por Omissão C +Padrão C +Implicit C +По умолчанию C +Mburabuzi C +Standárda C +Å tandardný C +Privzeto C +Подразумевано C +Podrazumevano C +Förval C +à®®à¯à®©à¯à®©à®¿à®°à¯à®ªà¯à®ªà¯ C +Пешфарзӣ C +ค่าปริยาย C +Öntanımlı C +Ğädäti C +Типовий C +Ðндоза C +Mặc định C +Prémetou C +Okwendalo C +默认 C +é è¨­ C +Okwendalo C +Canada ca +Kanada ca +كندا ca +Kanada ca +Канада ca +Канада ca +কানাডা ca +Kanada ca +Kanada ca +Canadà ca +Kanada ca +Kanada ca +Καναδάς ca +Kanado ca +Canadá ca +Kanada ca +Kanada ca +کانادا ca +Kanada ca +Kanada ca +Kanada ca +Ceanada ca +Canadá ca +קנדה ca +कनाडा ca +Kanada ca +Kanada ca +Kanada ca +Kanada ca +カナダ ca +កាណាដា ca +ìºë‚˜ë‹¤ ca +à»àº„ນາດາ ca +Kanada ca +KanÄda ca +Канада ca +Канад ca +Kanada ca +Kanada ca +ਕੈਨੇਡਾ ca +Kanada ca +Canadá ca +Canadá ca +Канада ca +Kanada ca +Kanada ca +Kanada ca +Канада ca +Kanada ca +I-Canada ca +Kanada ca +கனடா ca +Канада ca +à¹à¸„นาดา ca +Kanada ca +Kanada ca +Канада ca +Канада ca +加拿大 ca +加拿大 ca +Cocos (Keeling) Islands cc +Kokos Eilande cc +جزر كوكوس (كيلينغ) cc +КокоÑови оÑтрови cc +কোকোস (কীলিং) দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ cc +Inizi Koko (Keeling) cc +Kokosovo (Keeling) ostrvo cc +Illes Cocos (Keeling) cc +Kokosové ostrovy (Keeling) cc +Ynysoedd y Cocos (Keeling) cc +Cocos/Keeling-Inseln cc +Îήσοι Κόκος (Κήλινγκ) cc +Kokosinsuloj cc +Islas Cocos (Keeling) cc +Kookossaared cc +Cocos Irlak cc +جزایر کوکوس کیلینگ cc +Cookinsaaret cc +ÃŽles Cocos cc +Oileán na gCócónna (Keeling) cc +Illas Cocos (Keeling) cc +××™×™ קוקוס cc +कोकोस (कीलिंग) आइलैंडà¥à¤¸ cc +Cocos (Keeling) Otoci cc +Kókusz-szigetek (Keeling) cc +Kókoseyjar cc +Isole Cocos (Keeling) cc +オーストラリア領ココス島 cc +កោះ Cocos (Keeling) cc +코코스 ì œë„ cc +Kokosu salas cc +ОÑтрови ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc +Cocos (Keeling) арлууд cc +Gżejjer Cocos (Keeling) cc +Kokosøyene cc +Cocos- (Keeling-) Inseln cc +Kokosøyane cc +ਕੋਕੋਸ(ਕਿਨਿੰਗ) ਟਾਪੂ cc +Wyspy Kokosowe (Keelinga) cc +Ilhas Cocos (Keeling) cc +Ilhas Cocos cc +Insulele Cocos (Keeling) cc +КокоÑовые (Килинг) оÑтрова cc +Ibirwa Kokosi cc +Kokosullut cc +Kokosove Ostrovy cc +Kokosovi (Keelingovi) otoki cc +КокоÑова (Килингова) оÑтрва cc +Kokosova (Kilingova) ostrva cc +Kokosöarna cc +கோகோஸ௠(கீலிஙà¯) தீவà¯à®•ள௠cc +Ҷазираи ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc +หมู่เà¸à¸²à¸°à¹‚คคอส (Keeling) cc +Keeling Adaları cc +Kokos (Keeling) Utrawları cc +КокоÑові оÑтрови cc +ÐšÐ¾ÐºÐ¾Ñ (Килинг) Ороллари cc +Iyes Cocos cc +科科斯群岛 cc +å¯å¯æ–¯ç¾¤å³¶ cc +Congo, The Democratic Republic of the cd +Kongo, Demokratiese republiek van die cd +ДÑÐ¼Ð°ÐºÑ€Ð°Ñ‚Ñ‹Ñ‡Ð½Ð°Ñ Ð ÑÑпубліка Конга cd +ДР Конго cd +কঙà§à¦—োর গণতানà§à¦¤à§à¦°à¦¿à¦• পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦° cd +Kongo, Demokratska republika cd +Congo, República Democràtica del cd +Kongo cd +Congo, Gweriniaeth Democrataidd y cd +Congo, den demokratiske republik cd +Kongo, Republik cd +Κονγκό, ΔημοκÏατία του cd +Kongo, la Demokratia Respubliko de la cd +Congo, República democrática del cd +Kongo (DV) cd +Kongoko Errepublika Demokratikoa cd +Kongon demokraattinen tasavalta cd +République Démocratique du Congo cd +Kongo, de democratische republyk van de cd +Poblacht Dhaonlathach an Chongó cd +Congo, República Democrática do cd +קונגו, הרפובליקה הדמוקרטית של cd +डेमोकà¥à¤°à¥‡à¤Ÿà¤¿à¤• रिपबà¥à¤²à¤¿à¤• ऑफ कॉगो cd +Kongói Demokratikus Köztársaság cd +Kongó, Austur cd +Congo, Repubblica Democratica del cd +コンゴ,民主共和国 cd +សាធារណរដ្ឋ​ប្រជាធិបážáŸáž™áŸ’យ​កុងហ្គោ cd +Kongo demokratinÄ— respublika cd +Kongo demokrÄtiskÄ republika cd +Конго, ДемократÑка Република на cd +Kongo (RD) cd +Kongo cd +Kongo (De demokraatsche Republiek) cd +Congo, Democratische republiek cd +Kongo cd +ਕਾਂਗੋ, ਲੋਕਤੰਤਰੀ ਗਣਰਾਜ cd +Republika Demokratyczna Kongo cd +Congo, República Democrática do cd +República Democrática do Congo cd +Congo, Republica Democrată cd +ДемократичеÑÐºÐ°Ñ Ð ÐµÑпублика Конго cd +Kongo, Repubulika Iharanira Demokarasi ya cd +Kongo cd +Demokratická Republika Kongo cd +Kongo, demokratiÄna republika cd +Конго, ДемократÑка Република cd +Kongo, Demokratska Republika cd +Demokratiska republiken Kongo cd +கானà¯à®•ோ, கà¯à®Ÿà®¿à®¯à®°à®šà¯ cd +Ҷумҳурии демократии Ҳонконг cd +สาธารณรัà¸à¸›à¸£à¸°à¸Šà¸²à¸˜à¸´à¸›à¹„ตยคองโภcd +Demokratik Kongo Cumhuriyeti cd +Kongo, Demokrat Cömhüriäte cd +Конго, демократична реÑпубліка cd +Конго Демократик РеÑпубликаÑи cd +Congo, republike democratike cd +刚果民主共和国 cd +剛果民主共和國 cd +Central African Republic cf +Sentrale Afrika Republiek cf +جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى cf +ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка cf +ЦÐР cf +মধà§à¦¯ আফà§à¦°à¦¿à¦•ান রিপাবলিক cf +Republik centrafricaine cf +CentralnoafriÄka Republika cf +República Centro Africana cf +StÅ™edoafrická republika cf +Gweriniaeth Canolig Affrica cf +Central-afrikanske Republik cf +Zentralafrikanische Republik cf +ΔημοκÏατία ΚεντÏικής ΑφÏικής cf +Mezafrika Respubliko cf +República Centroafricana cf +Kesk-Aafrika Vabariik cf +Afrika Erdiko Errepublika cf +جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی cf +Keski-Afrikan tasavalta cf +République centrafricaine cf +Sintraal Afrikaanse Republyk cf +Poblacht na hAfraice Láir cf +República Centro Africana cf +הרפובליקה ×”×פריקנית התיכונה cf +सेंटà¥à¤°à¤² अफà¥à¤°à¥€à¤•न रिपबà¥à¤²à¤¿à¤• cf +Centralna AfriÄka Republika cf +Közép-Afrikai Köztársaság cf +Mið-Afríkulýðveldið cf +Repubblica Centrafricana cf +中央アフリカ共和国 cf +សាធារណរដ្ឋ​អាហ្វ្រិក​កណ្ដាល cf +중앙 아프리카 공화국 cf +ໂດມິນິàºàº±àº™ cf +CentrinÄ—s Afrikos Respublika cf +CentrÄlÄfrikas republika cf +ЦентралноафриканÑка Република cf +Төв африкын ард ÑƒÐ»Ñ cf +Repubblika ÄŠentrali Afrikana cf +Den sentralafrikanske republikk cf +Zentraalafrikaansche Republiek cf +Centraal Afrikaanse Republiek cf +Den sentralafrikanske republikken cf +ਕੇਂਦਰੀ ਅਫਰੀਕੀ ਗਣਰਾਜ cf +Republika Åšrodkowej Afryki cf +República Central Africana cf +República da Ãfrica Central cf +Republica Centrafricană cf +Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика cf +Repubulika ya Santara Afurika cf +GuovddášafrihkálaÅ¡ republihkka cf +Stredoafrická Republika cf +CentralnoafriÅ¡ka republika cf +Централноафричка Република cf +CentralnoafriÄka Republika cf +Centralafrikanska Republiken cf +மைய ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®• கà¯à®Ÿà®¿à®¯à®°à®šà¯ cf +Ҷумҳурии Ðфриқои Марказӣ cf +สาธารณรัà¸à¸­à¸±à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡ cf +Orta Afrika Cumhuriyeti cf +Üzäk Afrika Cömhüriäte cf +Центральна африканÑька реÑпубліка cf +Марказий Ðфрика РеÑпубликаÑи cf +Cá»™ng hoà Trung Phi cf +Cintrafrike cf +中éžå…±å’Œå›½ cf +多明尼加共和國 cf +Congo cg +Konsole cg +الكونغو cg +Конга cg +Конго cg +কঙà§à¦—à§‹ cg +Kongo cg +Kongo cg +Kongo cg +Kongo cg +Κονγκό cg +Kongo (Brazavila) cg +Kongo cg +Kongo cg +Ú©Ù†Ú¯Ùˆ cg +Kongo cg +Kongo cg +Congó cg +קונגו cg +कोंगो cg +Kongo cg +Kongó cg +Kongó, Vestur cg +コンゴ cg +កុងហ្គោ cg +콩고 cg +ຄອນໂà»àºŠàº¥ cg +Kongo cg +Kongo cg +Конго cg +Конго cg +Kongo cg +Kongo-Brazaville cg +Kongo cg +Kongo-Brazaville cg +ਕਾਂਗੋ cg +Kongo cg +Конго cg +Kongo cg +Kongo cg +Kongo cg +Kongo cg +Конго cg +Kongo cg +Kongo cg +கானà¯à®•ோ cg +Конго cg +คองโภcg +Kongo cg +Kongo cg +Конго cg +Конго cg +刚果 cg +剛果 cg +Switzerland ch +Switserland ch +سويسرا ch +İsveçrÉ™ ch +ШвÑÐ¹Ñ†Ð°Ñ€Ñ‹Ñ ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch +সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦£à§à¦¡ ch +Suis ch +Å vicarska ch +Suïssa ch +Å výcarsko ch +Y Swistir ch +Schweiz ch +Schweiz ch +Ελβετία ch +Svislando ch +Suiza ch +Å veits ch +Suitza ch +سوییس ch +Sveitsi ch +Suisse ch +Switserlân ch +An Eilvéis ch +Suíza ch +שוייץ ch +सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤°à¤²à¥ˆà¤‚ड ch +Å vicarska ch +Svájc ch +Swiss ch +Sviss ch +Svizzera ch +スイス ch +ស្វ៊ីស ch +스위스 ch +ສະວິສເຊີà»àº¥àº™ ch +Å veicarija ch +Å veice ch +Швајцарија ch +Швецарь ch +Svizzera ch +Sveits ch +Swiez ch +Zwitserland ch +Sveits ch +Suissa ch +ਸਵਿਟਜ਼ਰਲੈਂਡ ch +Szwajcaria ch +Suíça ch +Suíça ch +ElveÅ£ia ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch +Swazilande ch +Å veica ch +Å vajÄiarsko ch +Å vica ch +ШвајцарÑка ch +Å vajcarska ch +I-Switzerland ch +Schweiz ch +சà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯ ch +Свитзерланд ch +สวิสเซอร์à¹à¸¥à¸™à¸”์ ch +İsviçre ch +İswiçrä ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ñ–Ñ ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch +Thuỵ SÄ© ch +Swisse ch +瑞士 ch +瑞士 ch +Cote d'ivoire ci +ساحل العاج ci +Бераг Слановай КоÑьці ci +Кот Дивоар ci +Aod an Olifant ci +Obala SlonovaÄe ci +Costa d'ivori ci +PobÅ™eží slonoviny ci +Y Traeth Ifori ci +Elfenbenskysten ci +Ακτή Î•Î»ÎµÏ†Î±Î½Ï„Î¿ÏƒÏ„Î¿Ï ci +Eburio ci +Costa de Marfil ci +Cote d'Ivoire ci +Boli kosta ci +Ú©ÙØªÙ دیوÙیر ci +Côte d'Ivoire ci +Ivoorkust ci +An Cósta Eabhair ci +कोट डि'वॉरे ci +Baci kocke ci +Elefántcsontpart ci +Fílabeinsströndin ci +Costa d'Avorio ci +コートジボアール ci +កូដឌីវáŸážš ci +코트디부아르 ci +ປ່ອàºàº«àº¡àº²àºàºàº°àº¥àº­àº ci +KotdivuÄra ci +Брегот на Слоновата КоÑка ci +Kosta tal-Avorju ci +Elfenbenskysten ci +Elfenbeenküst ci +Ivoorkust ci +Elfenbeinskysten ci +ਕਾਂਟੋ ਡੀਵੋਇਰੀ ci +Wybrzeże KoÅ›ci SÅ‚oniowej ci +Costa do Marfim ci +Coasta de Azur ci +Кот Д'Ивуар ci +Kote divuware ci +ElfenÄalánriddu ci +SlonokoÅ¡Äena obala ci +Обала Ñлоноваче ci +Obala slonovaÄe ci +Elfenbenskusten ci +Соҳили Оҷ ci +อ่าวไอวอรี ci +Кот Д'Івуар ci +Кот д'Ивуар ci +Bá» biển ngà ci +Coisse d' Ivwere ci +科特迪瓦 ci +象牙海岸 ci +Cook islands ck +Cook Eilande ck +جزر كوك ck +ÐÑтравы Кука ck +ОÑтрови Кук ck +কà§à¦• দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ck +Inizi Kook ck +Kukova ostrva ck +Illes Cook ck +Cookovy ostrovy ck +Ynysoedd Cook ck +Cook-øerne ck +Cook-Inseln ck +Îησιά Κουκ ck +Kukinsuloj ck +Islas Cook ck +Cooki saared ck +Cook Irlak ck +جزایر Ú©ÙˆÚ© ck +Cooksaaret ck +ÃŽles Cook ck +Oileáin Chook ck +Illas Cook ck +××™×™ קוק ck +कà¥à¤• आइलैंड ck +Cook otoci ck +Cook-szigetek ck +Cooks-eyjar ck +Isole Cook ck +ニュージーランド自治領クック諸島 ck +កោះ Cook ck +ì¿¡ ì œë„ ck +ຄຸàºàºàºµà»‰ ck +Kuko salų ck +Kuka salas ck +Кукови оÑтрови ck +Cook арлууд ck +Gżejjer Cook ck +Cookøyene ck +Cookinseln ck +Cook Eilanden ck +Cookøyane ck +ਕà©à©±à¨• ਟਾਪੂ ck +Wyspy Cooka ck +Ilhas Cook ck +Ilhas Cook ck +Insulele Cook ck +ОÑтрова Кука ck +Ibirwa bya Kuke ck +Cooksullut ck +Cookove ostrovy ck +Cookovi otoki ck +Кукова оÑтрва ck +Kukova ostrva ck +Cooköarna ck +கà¯à®•௠தீவ௠ck +Ҷазираи Кук ck +หมู่เà¸à¸²à¸°à¸„ุภck +Cook Adaları ck +Kok Utrawları ck +ОÑтрови Кука ck +Кук Ороллари ck +Iyes Cook ck +库克群岛 ck +庫克群島 ck +Chile cl +Chilië cl +تشيلي cl +Åžili cl +Чылі cl +Чили cl +চিলি cl +ÄŒile cl +Xile cl +Tsile cl +Χιλή cl +Ĉilio cl +TÅ¡iili cl +Txile cl +شیلی cl +Chili cl +Chili cl +An tSile cl +צ'ילה cl +चिली cl +ÄŒile cl +Chili cl +Cile cl +ãƒãƒª cl +ឈីលី cl +ì¹ ë ˆ cl +ຊີລີ cl +ÄŒilÄ— cl +Čīle cl +Чиле cl +Чили cl +ÄŠile cl +Chili cl +ਚਿੱਲੀ cl +Cile cl +Чили cl +Shili cl +ÄŒile cl +ÄŒile cl +Чиле cl +ÄŒile cl +I-Chile cl +சிலி cl +Чилли cl +ชิลี cl +Åžili cl +Çili cl +Чилі cl +Чили cl +Chi lê cl +Tchili cl +智利 cl +智利 cl +Cameroon cm +Kameroon cm +الكاميرون cm +КамÑрун cm +Камерун cm +কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨ cm +Kameroun cm +Kamerun cm +Camerun cm +Kamerun cm +Y Camer?n cm +Cameroun cm +Kamerun cm +ΚαμεÏοÏν cm +Kameruno cm +Camerún cm +Kamerun cm +Kamerun cm +کامرون cm +Kamerun cm +Cameroun cm +Kameroen cm +Camarún cm +Camerún cm +קמרון cm +कैमरून cm +Kamerun cm +Kamerun cm +Kamerún cm +Camerun cm +カメルーン cm +កាមáŸážšáž¼áž“ cm +카메룬 cm +ຕາລາງງານ - K cm +KamerÅ«no cm +KamerÅ«na cm +Камерун cm +Камерун cm +Kamerun cm +Kamerun cm +Kamerun cm +Cameroen cm +Kamerun cm +ਕੈਮਰੂਨ cm +Kamerun cm +Camarões cm +Camarões cm +Camerun cm +Камерун cm +Kameruni cm +Kamerun cm +Komerun cm +Kamerun cm +Камерун cm +Kamerun cm +Kamerun cm +கமீரூன௠cm +Камерун cm +คาเมรูน cm +Kamerun cm +Kameroon cm +Камерун cm +Камерун cm +Camrone cm +喀麦隆 cm +喀麥隆 cm +China cn +الصين cn +Çin cn +Кітай cn +Китай cn +চীন cn +Sina cn +Kina cn +Xina cn +Čína cn +Tseina cn +Kina cn +Κίνα cn +Ĉinujo cn +Hiina cn +Txina cn +چین cn +Kiina cn +Kina cn +Chine cn +An tSín cn +סין cn +चीन cn +Kina cn +Kína cn +Cina cn +Kína cn +Cina cn +中国 cn +áž…áž·áž“ cn +중국 cn +ຈີນ cn +Kinija cn +Ķīna cn +Кина cn +Ð¥Ñтад cn +ÄŠina cn +Kina cn +Kina cn +Xina cn +ਚੀਨ cn +Chiny cn +Китай cn +Ubushinwa cn +Kiinná cn +Čína cn +Kitajska cn +Кина cn +Kina cn +I-China cn +Kina cn +சீனா cn +Хитой cn +จีน cn +Çin cn +Çin cn +Китай cn +Хитой cn +Trung Quốc cn +Chine cn +中国 cn +中國 cn +Colombia co +Colombië co +كولمبيا co +ÐšÐ°Ð»ÑŽÐ¼Ð±Ñ–Ñ co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +কলোমà§à¦¬à¦¿à§Ÿà¦¾ co +Kolumbi co +Kolumbija co +Colòmbia co +Kolumbie co +Kolumbien co +Κολομβία co +Kolumbio co +Kolumbia co +Kolonbia co +کلمبیا co +Kolumbia co +Colombie co +Columbia co +An Cholóim co +Colómbia co +קולומביה co +कोलमà¥à¤¬à¤¿à¤¯à¤¾ co +Kolumbija co +Kolumbia co +Kólumbía co +コロンビア co +កូឡុំប៊ី co +콜롬비아 co +ໂຄລຳເບີຠco +Kolumbija co +Kolumbija co +Колумбија co +Колумб co +Kolumbja co +Kolumbien co +Columbia co +ਕੋਲੰਬੀਆ co +Kolumbia co +Colômbia co +Colômbia co +Columbia co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +Kolombiya co +Kolombia co +Kolumbia co +Kolumbija co +Колумбија co +Kolumbija co +I-Colombia co +கொலமà¯à®ªà®¿à®¯à®¾ co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +โคลัมเบีย co +Kolombiya co +Kolombia co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ñ–Ñ co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +Colombeye co +Columbia co +哥伦比亚 co +哥倫比亞 co +Costa Rica cr +كوستاريكا cr +КоÑта Рыка cr +КоÑта Рика cr +কোসà§à¦Ÿà¦¾ রিকা cr +Kosta Rika cr +Kostarika cr +Kostarika cr +Κόστα Ρίκα cr +Kostariko cr +کاستاریکا cr +Kosta Rika cr +Cósta Ríce cr +קוסטה ריקה cr +कोसà¥à¤Ÿà¤¾ रिका cr +Kosta rika cr +Kostaríka cr +コスタリカ cr +កូស្ážáž¶ážšáž¸áž€áž¶ cr +코스타 리카 cr +ໂຄເອເທີຠcr +Kosta Rika cr +Kostarika cr +КоÑта Рика cr +КоÑта Рика cr +ਕੋਸਟਾ ਰੀਕਾ cr +Kostaryka cr +КоÑта-Рика cr +Kosita Rika cr +Kostarika cr +Kostarika cr +КоÑтарика cr +Kostarika cr +I-Costa Rica cr +கோஸà¯à®Ÿà®¾ ரிகா cr +КоÑта Рика cr +คอสตาริà¸à¸² cr +Kosta Rika cr +Kosta Rika cr +КоÑта-Ріка cr +КоÑта Рика cr +哥斯达黎加 cr +哥斯大黎加 cr +Cuba cu +Kuba cu +كوبا cu +Куба cu +Куба cu +কিউবা cu +Kuba cu +Kuba cu +Kuba cu +Ciwba cu +Kuba cu +ΚοÏβα cu +Kubo cu +Kuuba cu +Kuba cu +کوبا cu +Kuuba cu +Kuba cu +Cúba cu +קובה cu +कà¥à¤¯à¥‚बा cu +Kuba cu +Kuba cu +Kúba cu +キュームcu +គុយបា cu +ì¿ ë°” cu +ເàºàº¡à»„ພ່ cu +Kuba cu +Kuba cu +Куба cu +Куба cu +Kuba cu +Kuba cu +ਕਿਊਬਾ cu +Kuba cu +Куба cu +Kuba cu +Kuba cu +Kuba cu +Куба cu +Kuba cu +I-Cuba cu +Kuba cu +கியà¯à®ªà®¾ cu +Куба cu +คิวบา cu +Küba cu +Kuba cu +Куба cu +Куба cu +å¤å·´ cu +å¤å·´ cu +Cape Verde cv +Kaap Verde cv +كاب Ùيردي cv +Кабо Верде cv +কেপ ভারডি cv +Penn Verde cv +Zelenortska ostrva cv +Cap Verd cv +Kapverdy cv +Cape Ferde cv +Kapverdiske øer cv +Cap Verdische Inseln cv +ΠÏάσινο ΑκÏωτήÏιο cv +Kapo-Verdo cv +Cabo Verde cv +Roheneeme saared cv +Cabo Verde cv +کیپ‌ورده cv +Kap Verde cv +Cap vert cv +Kaap Verdië cv +Rinn Verde cv +Cabo Verde cv +×›×£ וורדה cv +कैप वरà¥à¤¡à¥‡ cv +Zöldfoki-szigetek cv +Grænhöfðaeyjar cv +Capo Verde cv +カーãƒãƒ™ãƒ«ãƒ‡ cv +កាបវែរ cv +ì¹´ë³´ë² ë¥´ë° cv +ເàºàº¡à»„ພ່ cv +Kabaverde cv +Кејп Верде cv +Капе Ð’ÑÑ€Ð´Ñ cv +Kapp Verde cv +Kap Verde cv +Kaap Verdië cv +Kapp Verde cv +ਕੇਪ ਵੀਰਡੀ cv +Cabo Verde cv +Cabo Verde cv +Capul Verde cv +Кабо-Верде cv +Kapu Veri cv +Кејп Верд cv +Kejp Verd cv +Kap Verde cv +கேப௠வெரà¯à®Ÿà¯ cv +Димоғи Верде cv +à¹à¸«à¸¥à¸¡à¹€à¸§à¸­à¸£à¹Œà¸”ี cv +Kape Verde cv +Кабо-Верде cv +Кейп Верде cv +Cap Vert cv +佛得角 cv +ç¶­å¾·è§’ cv +Christmas Island cx +Kersfees Eiland cx +جزر الكريسماس cx +ОÑтров РождеÑтво cx +কà§à¦°à¦¿à¦¸à§à¦Ÿà¦®à¦¾à¦¸ দà§à¦¬à§€à¦ª cx +Inizi Nedeleg cx +BožiÄno ostrvo cx +Illa de Pascua cx +VánoÄní ostrovy cx +Ynys y Nadolig cx +Juleøen cx +Weihnachtsinsel cx +Îήσος των ΧÏιστουγέννων cx +Kristnaskinsulo cx +Islas Christmas cx +Jõulusaar cx +Eguberri Irla cx +جزایر کریسمس cx +Joulusaari cx +ÃŽle de Noël cx +Christmas Eilân cx +Oileán na Nollag cx +Illas Christmas cx +××™×™ כריסטמס cx +कà¥à¤°à¤¿à¤¸à¤®à¤¸ आइलैंड cx +UskrÅ¡nji otoci cx +Karácsony-szigetek cx +Jólaey cx +Isola Christmas cx +クリスマス諸島 cx +កោះ Christmas cx +í¬ë¦¬ìŠ¤ë§ˆìŠ¤ 섬 cx +ຄິດສະຕອລ cx +KalÄ—dų salos cx +ZiemassvÄ“tku salas cx +ВелигденÑки ОÑтрови cx +КриÑÑ‚Ð¼Ð°Ñ Ð°Ñ€Ð»ÑƒÑƒÐ´ cx +Christmasøya cx +Wiehnachtsinsel cx +Christmasøya cx +ਕà©à¨°à¨¿à¨¸à¨®à¨¿à¨¸ ਟਾਪੂ cx +Wyspy Bożego Narodzenia cx +Ilhas Natal cx +Ilhas do Natal cx +Insulele Christmas cx +ОÑтров РождеÑтва cx +Ikirwa cya Noheli cx +Christmassuollu cx +VianoÄné Ostrovy cx +BožiÄni otok cx +Божићно оÑтрво cx +Božićno ostrvo cx +Julön cx +கிரà¯à®¸à¯à®¤à¯à®®à®¸à¯ தீவ௠cx +Ҷазираи КриÑÑ‚Ð¼Ð°Ñ cx +เà¸à¸²à¸°à¸„ริสต์มาส cx +Yılbaşı Adaları cx +Christmas Utrawları cx +ОÑтрів Різдва cx +КриÑÐ¼Ð°Ñ ÐžÑ€Ð¾Ð»Ð¸ cx +Äảo giáng sinh cx +圣诞岛 cx +è–誕島 cx +Cyprus cy +Siprus cy +قبرص cy +Кіпр cy +Кипър cy +সাইপà§à¦°à¦¾à¦¸ cy +Chipr cy +Kipar cy +Xipre cy +Kypr cy +Cypern cy +Zypern cy +ΚÏÏ€Ïος cy +Cipro cy +Chipre cy +Küpros cy +Txipre cy +قبرس cy +Kypros cy +Chypre cy +An Chipir cy +Chipre cy +קפריסין cy +साइपà¥à¤°à¤¸ cy +Cipar cy +Ciprus cy +Kýpur cy +Cipro cy +キプロス cy +ស៊ីពរ០cy +키프로스 cy +ບີບອັດ cy +Kipro cy +Kipra cy +Кипар cy +Ð¡Ð¸Ð¿Ñ€ÑƒÑ cy +ÄŠipru cy +Kypros cy +Zypern cy +Kypros cy +ਕਿਉਪਰਸ cy +Cypr cy +Chipre cy +Chipre cy +Cipru cy +Кипр cy +Shipure cy +Kypros cy +Ciper cy +Кипар cy +Kipar cy +Cypern cy +சிபà¯à®°à®¸à¯ cy +Кипр cy +ไซปรัส cy +Kıbrıs cy +Kiper cy +Кіпр cy +Кипр cy +Síp cy +Chîpe cy +塞浦路斯 cy +賽普勒斯 cy +Czechia cz +Czechië cz +التشيك cz +Çex Respublikası cz +ЧÑÑ…Ñ–Ñ cz +Чешка република cz +চেকিয়া cz +Tchekia cz +ÄŒeÅ¡ka cz +Txèquia cz +ÄŒesko cz +Y Weriniaeth Siec cz +Tjekkiet cz +Tschechien cz +Τσεχία cz +ĈeÄ¥io cz +República Checa cz +TÅ¡ehhi cz +Txekia cz +Ú†Ú© cz +Tsekki cz +République tchèque cz +Tsjechië cz +Poblacht na Seice cz +Chéquia cz +צ'×›×™×” cz +चेक cz +ÄŒeÅ¡ka cz +Csehország cz +Tékkland cz +Repubblica Ceca cz +ãƒã‚§ã‚³ cz +ឆáŸáž€ cz +ì²´ì½” cz +ÄŒekija cz +ÄŒehija cz +Чешка cz +Чехиа cz +Cżekia cz +Tsjekkia cz +Tschechien cz +Tsjechië cz +Tsjekkia cz +Chèquia cz +ਚੈੱਚੀਆ cz +Czechy cz +República Checa cz +República Tcheca cz +Cehia cz +Ð§ÐµÑ…Ð¸Ñ cz +Ceke cz +ÄŒeahkka cz +ÄŒesko cz +ÄŒeÅ¡ka cz +Чешка cz +ÄŒeÅ¡ka cz +I-Czechia cz +Tjeckien cz +செகà¯à®¯à®¾ cz +Ð§ÐµÑ…Ð¸Ñ cz +เชค cz +Çek Cumhuriyeti cz +Çexiä cz +Ð§ÐµÑ…Ñ–Ñ cz +Ð§ÐµÑ…Ð¸Ñ cz +Séc cz +Tchekeye cz +æ·å…‹ cz +æ·å…‹ cz +Germany de +Duitsland de +ألمانيا de +Almaniya de +ÐÑмеччына de +Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de +জারà§à¦®à¦¾à¦¨à¦¿ de +Alamagn de +NjemaÄka de +Alemanya de +NÄ›mecko de +Yr Almaen de +Tyskland de +Deutschland de +ΓεÏμανία de +Germanio de +Alemania de +Saksamaa de +Alemania de +آلمان de +Saksa de +Týskland de +Allemagne de +Dûtslân de +An Ghearmáin de +Alemaña de +גרמניה de +जरà¥à¤®à¤¨à¥€ de +NjemaÄka de +Németország de +Jerman de +Þýskaland de +Germania de +ドイツ de +អាល្លឺម៉ង់ de +ë…ì¼ de +ເàºàº¥àº¥àº°àº¡àº±àº™àº™àºµ de +Vokietija de +VÄcija de +Германија de +Герман de +Jerman de +Ä ermanja de +Tyskland de +Düütschland de +Duitsland de +Tyskland de +Alemanya de +ਜਰਮਨੀ de +Niemcy de +Alemanha de +Alemanha de +Germania de +Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de +Ubudage de +Duiska de +Nemecko de +NemÄija de +Ðемачка de +NemaÄka de +I-Germany de +Tyskland de +ஜெரà¯à®®à®©à®¿ de +Олмон de +เยอรมันนี de +Almanya de +Almania de +Ðімеччина de +ÐžÐ»Ð¼Ð¾Ð½Ð¸Ñ de +Äức de +Almagne de +德国 de +德國 de +IJalimani de +Djibouti dj +جيبوتي dj +Джыбуці dj +Джибути dj +জিবৌতি dj +Äibuti dj +Džibuti dj +Jib?ti dj +Dschibuti dj +Τζιμπουτί dj +Äœibutio dj +جیبوتی dj +Xibuti dj +×’'יבוטי dj +डिबौती dj +Džibuti dj +Dzsibuti dj +Djíbútí dj +Gibuti dj +ジブムdj +ហ្ស៊ីបូទី dj +지부티 dj +ພັດພາ dj +Džibutis dj +Džibutija dj +Ðибути dj +Жибут dj +DÄ¡ibuti dj +Dschibouti dj +ਡਜੀਬà©à¨‰à¨Ÿà©€ dj +Dżibuti dj +Djibuti dj +Djibuti dj +Джибути dj +Jibuti dj +Djibuhti dj +Džibuty dj +Džibuti dj +Ðибути dj +Džibuti dj +I-Djibouti dj +டிஜிபொடி dj +Ҷибойти dj +จิบูติ dj +Cibuti dj +Djibuti dj +Джібуті dj +Жибути dj +å‰å¸ƒæ dj +å‰å¸ƒåœ° dj +Denmark dk +Denemarke dk +الدنمارك dk +Danimarka dk +Ð”Ð°Ð½Ñ–Ñ dk +Ð”Ð°Ð½Ð¸Ñ dk +ডেনমারà§à¦• dk +Danmark dk +Danska dk +Dinamarca dk +Dánsko dk +Denmarc dk +Danmark dk +Dänemark dk +Δανία dk +Danlando dk +Dinamarca dk +Taani dk +Danimarka dk +دانمارک dk +Tanska dk +Danmark dk +Danemark dk +Denemarken dk +An Danmhairg dk +Dinamarca dk +דנמרק dk +डेनमारà¥à¤• dk +Danska dk +Dánia dk +Danmörk dk +Danimarca dk +デンマーク dk +ដាណឺម៉ាក dk +ë´ë§ˆí¬ dk +ເດນມາຠdk +Danija dk +DÄnija dk +ДанÑка dk +Дани dk +Danimarka dk +Danmark dk +Dänmark dk +Denemarken dk +Danmark dk +Dinamarca dk +ਡੈੱਨਮਾਰਕ dk +Dania dk +Dinamarca dk +Dinamarca dk +Danemarca dk +Ð”Ð°Ð½Ð¸Ñ dk +Danimarike dk +Dánmárku dk +Dánsko dk +Danska dk +ДанÑка dk +Danska dk +I-Denmark dk +Danmark dk +டெனà¯à®®à®¾à®°à¯à®•௠dk +Денмарк dk +เดนมาร์ภdk +Danimarka dk +Dania dk +Ð”Ð°Ð½Ñ–Ñ dk +Ð”Ð°Ð½Ð¸Ñ dk +Äan Mạch dk +DaenmÃ¥tche dk +丹麦 dk +丹麥 dk +Dominica dm +Dominisië dm +دومينيكا dm +Дамініка dm +Доминика dm +ডমিনিকা dm +Dominik dm +Dominika dm +Dominika dm +Dominikanische Republik dm +Îτομίνικα dm +Dominiko dm +دومینیکا dm +Dominique dm +Doiminice dm +דומינקה dm +डोमिनिका dm +Dominika dm +Dóminíka dm +ドミニカ dm +ដូមីនីកា dm +ë„미니카 dm +ໂລມາເນີຠdm +Dominika dm +Dominika dm +Доминика dm +Доминика dm +Dominika dm +ਡੋਮਾਨੀਕਾ dm +Dominika dm +Dominicana dm +Доминика dm +Dominikani dm +Dominikánsko dm +Dominikanska republika dm +Доминика dm +Dominika dm +டொமினிகா dm +Доминика dm +โดมินาà¸à¸±à¸™ dm +Dominik dm +Dominika dm +Домініка dm +Доминика dm +Dominike dm +多米尼加 dm +多明尼加 dm +Dominican Republic do +Dominikaanse Republiek do +جمهورية الدومينيكان do +Dominik Respublikası do +ДамініканÑÐºÐ°Ñ Ð ÑÑпубліка do +ДоминиканÑка република do +ডমিনিকান রিপাবলিক do +Republik Dominikan do +Dominikanska Republika do +República Dominicana do +Dominikánská republika do +Gweriniaeth Dominica do +Dominikanske Republik do +Dominikanische Republik do +Δομινικανή ΔημοκÏατία do +Dominika Respubliko do +República Dominicana do +Dominikaani Vabariik do +Dominikar Errepublika do +جمهوری دامینیکن do +Dominikaaninen tasavalta do +République dominicaine do +Dominicaanse Republyk do +An Phoblacht Dhoiminiceach do +República Dominicana do +הרפובליקה הדומיניקנית do +डोमिनिकन रिपबà¥à¤²à¤¿à¤• do +Dominikanska Republika do +Dominikai Köztársaság do +Republik Dominika do +Dóminíska lýðveldið do +Repubblica Dominicana do +ドミニカ共和国 do +សាធារណរដ្ឋ​ដូមីនីកែន do +ë„미니카 공화국 do +ໂດມິນີàºàº±àº™ do +Dominikos Respublika do +Dominikas Republika do +ДоминиканÑка Република do +Домникан ард ÑƒÐ»Ñ do +Repubblika Dominikana do +Den dominikanske republikk do +Dominikaansche Republiek do +Dominicaanse Republiek do +Den dominikanske republikken do +Republica Dominicana do +ਡੋਮਾਨੀਕਾ ਗਣਰਾਜ do +Dominikana do +República Dominicana do +República Dominicana do +Republica Dominicană do +ДоминиканÑÐºÐ°Ñ Ñ€ÐµÑпублика do +Repubulika Dominikani do +DominihkalaÅ¡ republihkka do +Dominikánska republika do +Dominikanska republika do +ДоминиканÑка Република do +Dominikanska Republika do +I-Dominican Republic do +Dominikanska republiken do +டொமினிகà¯à®•ன௠கà¯à®Ÿà®¿à®¯à®°à®šà¯ do +Ҷумҳурии Доминика do +สาธารณรัà¸à¹‚ดมินิà¸à¸±à¸™ do +Dominik Cumhuriyeti do +Dominika Cömhüriäte do +ДомініканÑька реÑпубліка do +Доминикана РеÑпубликаÑи do +Muvhuso wa Dominican do +Cá»™ng hoà Dominican do +Republike Dominikinne do +IRepublic yeDominican do +多米尼加共和国 do +多明尼加共和國 do +Algeria dz +Algerië dz +الجزائر dz +Ðльжыр dz +Ðлжир dz +অà§à¦¯à¦¾à¦²à¦œà§‡à¦°à¦¿à§Ÿà¦¾ dz +Aljeri dz +Alžir dz +Algèria dz +Alžírsko dz +Algeriet dz +Algerien dz +ΑλγεÏία dz +Algerio dz +Argelia dz +Alžeeria dz +الجزیره dz +Algérie dz +Algerije dz +An Ailgéir dz +Alxéria dz +×לג'יריה dz +अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾ dz +Alžir dz +Algéria dz +Alsír dz +アルジェリア dz +អាល់ហ្សáŸážšáž¸ dz +알제리 dz +ບັນàºàº²à»€àº¥àºµàº dz +Alžyras dz +Alžīrija dz +Ðлжир dz +Ðлжер dz +AlÄ¡erija dz +Algerie dz +Algerien dz +Algerije dz +Algerie dz +ਅਲਜੀਰੀਆ dz +Algieria dz +Argélia dz +Argélia dz +Ðлжир dz +Aligeriya dz +Alžírsko dz +Alžirija dz +Ðлжир dz +Alžir dz +I-Algeria dz +Algeriet dz +அலà¯à®œà®¿à®°à®¿à®¯à®¾ dz +Ðлҷазоир dz +อัลจีเรีย dz +Aljır dz +Ðлжир dz +Жазоир dz +Aldjereye dz +阿尔åŠåˆ©äºš dz +阿爾åŠåˆ©äºž dz +Equador ec +Ewenaar ec +الإكوادور ec +Ekvator ec +Эквадор ec +Еквадор ec +ইকà§à§Ÿà§‡à¦¡à¦° ec +Ecuador ec +Ekvador ec +Ekvádor ec +Ecwador ec +Ecuador ec +ΙσημεÏινός ec +Ekvadoro ec +Ecuador ec +Ekuador ec +اکوادور ec +Équateur ec +Eacuadór ec +Ecuador ec +×קוודור ec +इकà¥à¤µà¥‡à¤¡à¥‰à¤° ec +Ekvador ec +Ecuador ec +Ekvador ec +Ecuador ec +エクアドル ec +អáŸáž€áŸ’វាឌáŸážš ec +ì—ì½°ë„르 ec +ເອàºà»àº”à» ec +Ekvadoras ec +Ekvadora ec +Еквадор ec +Эквадор ec +Ekwador ec +Ecuador ec +Ecuador ec +Ecuador ec +à¨à¨•ਾਵੇਡਰ ec +Ekwador ec +Ecuador ec +Эквадор ec +Ekwateri ec +Ekvador ec +Ekvádor ec +Ekvador ec +Еквадор ec +Ekvador ec +I-Equador ec +ஈகà¯à®µà¯†à®Ÿà®¾à®°à¯ ec +Эквадор ec +เอà¸à¸§à¸²à¸”อร์ ec +Ekvator ec +Еквадор ec +Эквадор ec +EcwÃ¥teur ec +厄瓜多尔 ec +厄瓜多 ec +Estonia ee +Estlandies ee +استونيا ee +Estoniya ee +ЭÑÑ‚Ð¾Ð½Ñ–Ñ ee +ЕÑÑ‚Ð¾Ð½Ð¸Ñ ee +à¦à¦¸à§à¦Ÿà§‹à¦¨à¦¿à§Ÿà¦¾ ee +Estonija ee +Estònia ee +Estonsko ee +Estland ee +Estland ee +Εσθονία ee +Estlando ee +Eesti ee +استونی ee +Eesti ee +Estonie ee +Estland ee +An Eastóin ee +×סטוניה ee +à¤à¤¸à¥à¤¤à¥‹à¤¨à¤¿à¤¯à¤¾ ee +Estonija ee +Észtország ee +Eistland ee +エストニア ee +អáŸážŸáŸ’ážáž¼áž“ី ee +ì—스토니아 ee +ເອໂທເນີຠee +Estija ee +Igaunija ee +ЕÑтонија ee +ЭÑтони ee +Estonja ee +Estland ee +Estland ee +Estland ee +Estland ee +Estònia ee +ਈਸਟੋਨੀਆ ee +Estónia ee +Estônia ee +ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee +Esitoniya ee +Estteeana ee +Estónsko ee +Estonija ee +ЕÑтонија ee +Estonija ee +I-Estonia ee +Estland ee +எசà¯à®Ÿà¯‹à®©à®¿à®¯à®¾ ee +ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee +เอสโทเนีย ee +Estonya ee +ЕÑÑ‚Ð¾Ð½Ñ–Ñ ee +ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee +Estoneye ee +爱沙尼亚 ee +愛沙尼亞 ee +Egypt eg +Egipte eg +مصر eg +Misir eg +ЭгіпÑÑ‚ eg +Египет eg +মিশর eg +Ejipt eg +Egipat eg +Egipte eg +Yr Aifft eg +Egypten eg +Ägypten eg +Αίγυπτος eg +Egiptujo eg +Egipto eg +Egiptus eg +Egipto eg +مصر eg +Egypti eg +Egyptaland eg +Égypte eg +Egypte eg +An Éigipt eg +Exipto eg +×ž×¦×¨×™× eg +इजिपà¥à¤¤ eg +Egipat eg +Egyiptom eg +Egyptaland eg +Egitto eg +エジプト eg +អáŸáž áŸ’ស៊ីប eg +ì´ì§‘트 eg +ອີຢີບ eg +Egiptas eg +Ä’Ä£ipte eg +Египет eg +Египт eg +Mesir eg +EÄ¡ittu eg +Ägypten eg +Egypte eg +Egepeta eg +ਮਿਸਰ eg +Egipt eg +Egipto eg +Egito eg +Egipt eg +Египет eg +Misiri eg +Egypta eg +Egipt eg +Египат eg +Egipat eg +I-Egypt eg +Egypten eg +எகிபà¯à®¤à¯ eg +МиÑÑ€ eg +อียิปต์ eg +Mısır eg +Mısır eg +Єгипет eg +МиÑÑ€ eg +Ai Cập eg +Edjipe eg +åŸƒåŠ eg +åŸƒåŠ eg +Igibhithe eg +Western Sahara eh +Westelike Sahara eh +الصحراء الغربية eh +ЗаходнÑÑ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh +Западна Сахара eh +পশà§à¦šà¦¿à¦® সাহারা eh +Sahara occidental eh +Zapadna Sahara eh +Sàhara Occidental eh +Západní Sahara eh +Gorllewin Sahara eh +Vestsahara eh +Westsahara eh +Δυτική ΣαχάÏα eh +Okcidenta Saharo eh +Sahara occidental eh +Lääne-Sahara eh +Mendebaldeko Sahara eh +صحرای غربی eh +Länsi-Sahara eh +Sahara occidental eh +West Sahara eh +An Sahára Thiar eh +Saara Ocidental eh +מערב סהרה eh +पशà¥à¤šà¤¿à¤®à¥€ सहारा eh +Westerm Sahara eh +Nyugat-Szahara eh +Vestur-Sahara eh +Sahara Occidentale eh +西サãƒãƒ© eh +សាហារ៉ា​ážáž¶áž„​លិច eh +ì„œì‚¬í•˜ë¼ eh +ພື້ນທີ່ທຳງານ eh +Vakarų Sahara eh +RietumsahÄra eh +Западна Сахара eh +Барууг Ñахар eh +Saħara tal-Punent eh +Vest-Sahara eh +Westsahara eh +West Sahara eh +Vest-Sahara eh +ਦੱਖਣੀ ਸਹਾਰਾ eh +Zachodnia Sahara eh +Sara Ocidental eh +Sahara Ocidental eh +Sahara de Vest eh +Ð—Ð°Ð¿Ð°Ð´Ð½Ð°Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh +Sahara y'Iburengerazuba eh +Oarje-Sahara eh +Západna Sahara eh +Zahodna Sahara eh +Западна Сахара eh +Zapadna Sahara eh +Västsahara eh +மேறà¯à®•தà¯à®¤à®¿à®¯ சஹாரா eh +Саҳрои Ғарбӣ eh +ซาฮาร่าตะวันตภeh +Batı Sahara eh +Batış Sahara eh +Західна Сахара eh +Ғарбий Сахара eh +Tây Sahara eh +Sara Coûtchantrece eh +西撒哈拉 eh +西盛哈拉 eh +Eritrea er +اريتريا er +ЭрытрÑÑ er +Ð•Ñ€Ð¸Ñ‚Ñ€ÐµÑ er +à¦à¦°à¦¿à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ er +Eritre er +Eritreja er +ΕÏυθÏαία er +Eritreo er +اریتره er +Érythrée er +Eiritré er +×ריתרי××” er +à¤à¤°à¤¿à¤Ÿà¥à¤°à¥€à¤¯à¤¾ er +Eritreja er +Erítrea er +エリトリア er +អáŸážšáž¸áž‘្រា er +ì—리트레아 er +à»àºà»‰à»„ຂà»àºŸà»‰àº¡àº—ຳງານ er +EritrÄ—ja er +Eritreja er +Еритреја er +Эритреа er +ਈਰੀਟਰੀਆ er +Erytrea er +Eritreia er +Eritréia er +Ð­Ñ€Ð¸Ñ‚Ñ€ÐµÑ er +Eritereya er +Eritreja er +Еритреја er +Eritreja er +ரிடà¯à®°à®¿à®¯à®¾ er +Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er +เอริเทรีย er +Eritre er +Ð•Ñ€Ñ–Ñ‚Ñ€ÐµÑ er +Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er +Eritrêye er +厄立特里亚 er +厄利垂亞 er +Spain es +Spanje es +أسبانيا es +İspaniya es +Ð“Ñ–ÑˆÐ¿Ð°Ð½Ñ–Ñ es +ИÑÐ¿Ð°Ð½Ð¸Ñ es +সà§à¦ªà§‡à¦¨ es +Spagn es +Å panija es +Espanya es +Å panÄ›lsko es +Sbaen es +Spanien es +Spanien es +Ισπανία es +Hispanio es +España es +Hispaania es +Espainia es +اسپانیا es +Espanja es +Spania es +Espagne es +Spanje es +An Spáinn es +España es +ספרד es +सà¥à¤ªà¥‡à¤¨ es +Å panjolska es +Spanyolország es +Spanyol es +Spánn es +Spagna es +スペイン es +អáŸážŸáŸ’ប៉ាញ es +ìŠ¤íŽ˜ì¸ es +ສະເປັນ es +Ispanija es +SpÄnija es +Шпанија es +ИÑпани es +Sepanyol es +Spanja es +Spania es +Spanien es +Spanje es +Spania es +Espanha es +ਸਪੇਨ es +Hiszpania es +Espanha es +Espanha es +Spania es +ИÑÐ¿Ð°Ð½Ð¸Ñ es +Esipanye es +Spánia es +Å panielsko es +Å panija es +Шпанија es +Å panija es +I-Spain es +Spanien es +சà¯à®ªà¯†à®¯à®¿à®©à¯ es +ИÑпаниё es +สเปน es +İspanya es +İspania es +ІÑÐ¿Ð°Ð½Ñ–Ñ es +ИÑÐ¿Ð°Ð½Ð¸Ñ es +Tây Ban Nha es +Sipagne es +西ç­ç‰™ es +西ç­ç‰™ es +Ethiopia et +Ethiopië et +اثيوبيا et +Ð­Ñ‚Ñ‹Ñ‘Ð¿Ñ–Ñ et +Ð•Ñ‚Ð¸Ð¾Ð¿Ð¸Ñ et +ইথিওপিয়া et +Etiopi et +Etiopija et +Etiòpia et +Etiopie et +Ethiopien et +Äthiopien et +Αιθιοπία et +Etiopio et +Etiopía et +Etioopia et +Etiopia et +اتیوپی et +Etiopia et +Éthiopie et +Ethiopië et +An Aetóip et +Etiopia et +×תיופיה et +इथियोपिया et +Etiopija et +Etiópia et +Eþíópía et +Etiopia et +エãƒã‚ªãƒ”ã‚¢ et +អáŸážáŸ’យូពី et +ì—티오피아 et +ເອໂທເນີຠet +Etiopija et +Etiopija et +Етиопија et +Этопи et +Etjopia et +Etiopia et +Äthiopien et +Ethiopië et +Etiopia et +ਈਥੋਪੀਆ et +Etiopia et +Etiópia et +Etiópia et +Etiopia et +Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et +Etiyopiya et +Etiopia et +Etiópia et +Etiopija et +Етиопија et +Etiopija et +Etiopien et +எதியோபியா et +ҲабашиÑтон et +เอธิโอเปีย et +Etiyopya et +Efiopia et +Ð•Ñ„Ñ–Ð¾Ð¿Ñ–Ñ et +Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et +Etiopeye et +埃塞俄比亚 et +衣索比亞 et +Finland fi +Ùنلندا fi +Finlandiya fi +ФінлÑÐ½Ð´Ñ‹Ñ fi +Ð¤Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ fi +ফিনলà§à¦¯à¦¾à¦£à§à¦¡ fi +Finska fi +Finlàndia fi +Finsko fi +Y Ffindir fi +Finnland fi +Φινλανδία fi +Finnlando fi +Finlandia fi +Soome fi +Finlandia fi +Ùنلاند fi +Suomi fi +Finnland fi +Finlande fi +Finlân fi +An Fhionlainn fi +Finlándia fi +פינלנד fi +फिनलैंड fi +Finska fi +Finnország fi +Finlandia fi +Finnland fi +Finlandia fi +フィンランド fi +ហ្វាំងឡង់ fi +핀란드 fi +ຟີນà»àº¥àº™ fi +Suomija fi +Somija fi +ФинÑка fi +Финнланд fi +Finlandja fi +Finnland fi +Finlandia fi +ਫਿਨਲੈਂਡ fi +Finlandia fi +Finlândia fi +Finlândia fi +Finlanda fi +ФинлÑÐ½Ð´Ð¸Ñ fi +Finilande fi +Suopma fi +Fínsko fi +Finska fi +ФинÑка fi +Finska fi +I-Finland fi +பினà¯à®²à®¾à®¨à¯à®¤à¯ fi +Финлонд fi +ฟินà¹à¸¥à¸™à¸”์ fi +Finlandiya fi +Finland (Suomi) fi +ФінлÑÐ½Ð´Ñ–Ñ fi +ФинлÑÐ½Ð´Ð¸Ñ fi +Phần Lan fi +Finlande fi +芬兰 fi +芬蘭 fi +Fiji fj +Ùيجي fj +Фіджы fj +ОÑтрови Фиджи fj +ফিজি fj +Fidji fj +Fidži fj +Fidži fj +Ffiji fj +Fidschi fj +Φίτζι fj +FiÄioj fj +Fidži fj +Ùیجی fj +Fidji fj +Fidsí fj +פיג'×™ fj +फिजी fj +Fidzsi fj +Fídjieyjar fj +Figi fj +フィジー fj +ហ្វ៊ីហ្ស៊ី fj +피지 fj +ມີດີ fj +Fidži fj +Фиџи fj +Фижи fj +FiÄ¡i fj +Fidschi fj +ਫਿੱਜੀ fj +Fidżi fj +Ilhas Fiji fj +Фиджи fj +Fidži fj +Fidži fj +Фиџи fj +Fidži fj +பிஜி fj +Фиҷи fj +ฟิจิ fj +Фіджі fj +Фижи fj +Fidji fj +æ–æµŽ fj +è²æ¿Ÿ fj +Falkland Islands (Malvinas) fk +Falkland Eilande (Malvinas) fk +جزر الÙوكلاند (المالÙيناس) fk +ФалклендÑÐºÑ–Ñ Ð°Ñтравы (Мальвіны) fk +ФолклендÑки оÑтрови fk +ফকলà§à¦¯à¦¾à¦£à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ (মলভিনাস) fk +Inizi Falklandi (Malvinas) fk +Foklandska ostrva (Malvini) fk +Illes Falkland (Malvines) fk +Falklandy (Malvíny) fk +Ynysoedd Y Ffalcland (Malfinas) fk +Falkland-øerne fk +Falkland-Inseln (Malvinen) fk +Îησιά Φώκλαντ (Malvinas) fk +Falklandoj fk +Islas Falkland (Malvinas) fk +Falklandi saared (Malviinid) fk +Falkland Irlak (Malvinak) fk +جزایر ÙØ§Ù„کلند مالویناس fk +Falklandin saaret (Malvinassaaret) fk +ÃŽles Falkland (Malvinas) fk +Falkland Eilannen (Malvinas) fk +Na hOileáin Fháclainne (Malvinas) fk +Illas Falkland (Malvinas) fk +××™×™ פולקלנד fk +फाकलैंड आइलैंड (मालविनास) fk +Folklandska otoÄja (Malvini) fk +Falkland-szigetek fk +Falklandseyjar fk +Isole Falkland (Malvine) fk +フォークランド諸島 fk +កោះ Falkland (Malvinas) fk +í¬í´ëžœë“œ êµ°ë„ (ë§ë¹„나스) fk +Folklendu salas fk +ФокландÑки ОÑтрови (Малвини) fk +Фалкланд арлууд (МалвинаÑ) fk +Gżejjer Falkland (Malvinas) fk +Falklandsøyene fk +Falklandinseln (Malvinas) fk +Falkland Eilanden (Malvinas) fk +Falklandsøyane fk +ਫਾਕਲੈਂਡ ਟਾਪੂ fk +Wyspy Falklandzkie (Malwiny) fk +Ilhas Falkland (Malvinas) fk +Ilhas Malvinas fk +Insulele Falkland (Malvine) fk +ФолклендÑкие (МальвинÑкие) оÑтрова fk +Ibirwa bya Falikilande (Maluvinasi) fk +Falklánddasullot fk +Falklandské Ostrovy (Malviny) fk +Falklandski otoki (Malvini) fk +ФолкландÑка оÑтрва (Малвини) fk +Folklandska ostrva (Malvini) fk +Falklandsöarna fk +ஃபாலà¯à®•௠தீவà¯(மாலà¯à®µà®¿à®©à®¾à®¸à¯) fk +Ҷазираи фолкланд (Малвина) fk +หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸„à¹à¸¥à¸™à¸”์ (Malvinas) fk +Falkland Adaları fk +Falkland Utrawları (Malvinnar) fk +ФолклендÑькі оÑтрови (БританіÑ) fk +Фолкленд (Малвин) Ороллари fk +Iyes Malouwines fk +ç¦å…‹å…°ç¾¤å²›(马尔维纳斯) fk +ç¦å…‹è˜­ç¾¤å³¶ (é¦¬çˆ¾ç¶­ç´æ–¯) fk +Micronesia, Federated States of fm +Micronesië, Vereenigde State van fm +ФедÑÑ€Ð°Ñ†Ñ‹Ñ ÐœiкранÑзіі fm +ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm +মাইকà§à¦°à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾, ফেডারেটেড সà§à¦Ÿà§‡à¦Ÿà¦¸ অব fm +Mikronezija, Federalne države fm +Micronesia, Estats Federats de fm +Mikronésie fm +Micronesia, Taleithau Cyfunol fm +Mikronesien, de forenede stater af fm +Mikronesien, Föderation von fm +ΜικÏονησίας, Ομόσπονδες πολιτείες της fm +Mikronezio, Respubliko de fm +Micronesia, Estados federados de fm +Mikroneesia fm +Mikronesiako Estatu Federatuak fm +Mikronesian liittovaltio fm +Etats Fédérés de Micronésie fm +Micronesië, Federale staten Fan fm +Stáit Cónascacha na Micrinéise fm +Micronésia, Estados Federados de fm +מיקרונזיה, מדינות הפדרציה של fm +फेडरेटेड सà¥à¤Ÿà¥‡à¤Ÿ ऑफ माइकà¥à¤°à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾ fm +Mikronézia fm +Míkrónesía, Sambandsríki fm +Micronesia, stati federati di fm +ミクロãƒã‚·ã‚¢,米自由連邦 fm +រដ្ឋ​សហពáŸáž“្ធ​មិក្រូនáŸážŸáŸŠáž¸ fm +Mikronezija fm +MikronÄ“zija fm +Микронезија, Федеративни Држави на fm +Mikronesja (Stati Federati ta') fm +Mikronesiaføderasjonen fm +Mikronesien, Vereenigte Staten vun fm +Micronesië, Federale staten van fm +Mikronesiaføderasjonen fm +ਮਾਇਕਰੋਨੀਸੀਆ, ਸੰਘੀ ਪà©à¨°à¨¾à¨‚ਤ fm +Federacja Stanów Mikronezji fm +Micronésia, Estados Federados da fm +Estados Federados da Micronésia fm +Micronezia, Statele Federative fm +ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm +Mikoronesiya, Leta Zishyizwehamwe fm +MikronesiafederaÅ¡uvdna fm +Spojené Å¡táty Mikronézie fm +Mikronezija, Združene države fm +Микронезија, Федерација држава fm +Mikronezija, Federacija država fm +Mikronesiska federationen fm +மைகà¯à®°à¯‹à®©à®¿à®šà®¾, à®’à®°à¯à®™à¯à®•ிணைநà¯à®¤ மாநிலம௠fm +สหพันธรัà¸à¸¡à¸´à¹‚ครนีเซีย fm +Mikronezya Federasyonu fm +Mikronesia, Berläşkän İlläre fm +МікронезіÑ, федеративні штати fm +ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm +Micronezeye fm +密克罗尼西亚è”邦 fm +密克羅尼西亞è¯é‚¦ fm +Faroe Islands fo +Faroe Eilande fo +جزر الÙيرو fo +ОÑтрови Фаро fo +ফারো দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ fo +Enez Faroe fo +Farska ostrva fo +Illes Faroe fo +Faerské ostrovy fo +Ynysoedd Ffar?e fo +Færøerne fo +Färöer-Inseln fo +Îήσοι ΦεÏόε fo +Ferooj fo +islas Faroe fo +Fääri saared fo +Faroe Irlak fo +جزایر ÙØ§Ø±Ùˆ fo +Färsaaret fo +ÃŽles Féroé fo +Faroe Eilannen fo +Na Scigirí (Oileáin Fharó) fo +Illas Feroe fo +××™×™ פ×רו fo +फारोठआइलैंड fo +Faroe Otoci fo +Faroe-szigetek fo +Færeyjar fo +Isole Fær Øer fo +フェロー諸島 fo +កោះ​ហ្វ៉ារ៉ូ fo +페로 ì œë„ fo +ໄອà»àº¥àº™ fo +Faroe salos fo +FÄ“ru salas fo +ФарÑки ОÑтрови fo +Фарое арлууд fo +Gżejjer Faroe fo +Færøyene fo +Färöerinseln fo +Faroe Eilanden fo +Færøyane fo +ਫਾਰੋਈ ਟਾਪੂ fo +Wyspy Faroe fo +Ilhas Faroe fo +Ilhas Faroe fo +Insulele Feroe fo +ФарерÑкие оÑтрова fo +Ibirwa bya Farowe fo +Fearsuolu fo +Ostrovy Faroe fo +Otoki Faroe fo +ФарÑка оÑтрва fo +Farska ostrva fo +Färöarna fo +ஃபரோ தீவà¯à®•ள௠fo +Ҷазираи Фару fo +หมู่เà¸à¸²à¸°à¸Ÿà¸²à¹‚ร fo +Faroe Adaları fo +Faroe Utrawları fo +ФарерÑькі оÑтрови fo +Фарер Ороллари fo +Äảo Faroe fo +Iye Faeroyé fo +法罗群岛 fo +法羅群島 fo +France fr +Frankryk fr +ÙØ±Ù†Ø³Ø§ fr +Fransa fr +Ð¤Ñ€Ð°Ð½Ñ†Ñ‹Ñ fr +Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr +ফà§à¦°à¦¾à¦¨à§à¦¸ fr +Frañs fr +Francuska fr +França fr +Francie fr +Ffrainc fr +Frankrig fr +Frankreich fr +Γαλλία fr +Francio fr +Francia fr +Prantsusmaa fr +Frantzia fr +ÙØ±Ø§Ù†Ø³Ù‡ fr +Ranska fr +Frakland fr +Frankryk fr +An Fhrainc fr +Franza fr +צרפת fr +फà¥à¤°à¤¾à¤‚स fr +Francuska fr +Franciaország fr +Prancis fr +Frakkland fr +Francia fr +フランス fr +បារាំង fr +프랑스 fr +àºàº£àº±à»ˆàº‡ fr +PrancÅ«zija fr +Francija fr +Франција fr +Франц fr +Perancis fr +Franza fr +Frankrike fr +Frankriek fr +Frankrijk fr +Frankrike fr +Fora fr +França fr +ਫਰਾਂਸ fr +Francja fr +França fr +França fr +FranÅ£a fr +Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr +Ubufaransa fr +Fránkriika fr +Francúzsko fr +Francija fr +ФранцуÑка fr +Francuska fr +I-France fr +Frankrike fr +பிரானà¯à®šà¯ fr +ФаронÑа fr +à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª fr +Fransa fr +Fransia fr +Ð¤Ñ€Ð°Ð½Ñ†Ñ–Ñ fr +Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr +Fura fr +Pháp fr +Fransi fr +法国 fr +法國 fr +Gabon ga +الغابون ga +Габон ga +Габон ga +গà§à¦¯à¦¾à¦¬à¦¨ ga +Gabun ga +Γκαμπόν ga +Gabono ga +Gabón ga +گابون ga +An Ghabúin ga +Gabón ga +גבון ga +गेबॉन ga +ガボン ga +ហ្គាបុង ga +가봉 ga +à»àºàº¥à»ˆàº‡àº™ ga +Gabonas ga +Gabona ga +Габон ga +Габон ga +Gabun ga +ਗਾਬੋਨ ga +Gabão ga +Gabão ga +Габон ga +Gabo ga +Габон ga +காபான௠ga +Габон ga +à¸à¸²à¸šà¸­à¸™ ga +Габон ga +Габон ga +加蓬 ga +加彭 ga +United Kingdom gb +Vereenigde Koninkryk gb +المملكة المتحدة gb +BirləşmiÅŸ Krallıq gb +Злучанае КаралеўÑтва gb +Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb +ইউনাইটেড কিংডম gb +Rouantelezh Unanet gb +Velika Britanija gb +Regne Unit gb +Spojené království gb +Y Deyrnas Unedig gb +Storbritannien gb +Großbritannien gb +Ηνωμένο Βασίλειο gb +Britio gb +Reino Unido gb +Suurbritannia gb +Erresuma Batua gb +بریتانیا gb +Iso-Britannia gb +Stórabretland gb +Royaume Uni gb +Ferienigd Keninkryk gb +An Ríocht Aontaithe gb +Reino Unido gb +בריטניה gb +यूनाइटेड किंगडम gb +Ujedinjeno Kraljevstvo gb +Egyesült Királyság gb +Inggris gb +Bretland gb +Regno Unito gb +イギリス gb +ចក្រភព​អង់គ្លáŸážŸ gb +ì˜êµ­ gb +ສະຫະລາດສະອານາຈັຠgb +JungtinÄ— KaralystÄ— gb +ApvienotÄ Karaliste gb +Обединето КралÑтво gb +Их британ gb +Renju Unit gb +Storbritannia gb +Grootbritannien gb +Verenigd Koninkrijk gb +Storbritannia gb +Regne Unit gb +ਬਰਤਾਨੀਆ gb +Wielka Brytania gb +Reino Unido gb +Reino Unido gb +Anglia gb +Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb +Ubwongereza gb +Stuorrabrittania gb +Anglicko gb +Združeno kraljestvo gb +Уједињено КраљевÑтво gb +Ujedinjeno Kraljevstvo gb +I-United Kingdom gb +Storbritannien gb +à®à®•à¯à®•ிய ராஜà¯à®œà®¿à®¯à®®à¯ gb +Подшоҳии Муттаҳида gb +สหราชอาณาจัà¸à¸£ gb +BirleÅŸik Krallık gb +Berläşkän PadÅŸahlıq gb +Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ gb +Буюк Ð‘Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb +Anh gb +RweyÃ¥me Uni gb +United Kingdom gb +英国 gb +è¯åˆçŽ‹åœ‹ gb +United Kingdom gb +Grenada gd +غرينادا gd +Qrenada gd +ГрÑнада gd +Гренада gd +গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¾ gd +Granada gd +ΓÏενάδα gd +Grenado gd +Granada gd +گرانادا gd +Grenade gd +Granada gd +גרנדה gd +गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾ gd +Granada gd +グレナダ gd +ហ្គ្រីណាដា gd +그러네ì´ë‹¤ gd +ເàºàº™àº²àº”າ gd +GrenÄda gd +Гренада gd +Гренада gd +Granada gd +ਗਰੀਨਾਡਾ gd +Granada gd +Granada gd +Гренада gd +Gerenada gd +I-Grenada gd +கிரெனடா gd +Гронодо gd +เà¸à¸£à¸™à¸²à¸”า gd +Гренада gd +Гренада gd +GrenÃ¥de gd +格林纳达 gd +æ ¼ç‘žé‚£é” gd +Georgia ge +Georgië ge +جورجيا ge +Ð“Ñ€ÑƒÐ·Ñ–Ñ ge +Ð“Ñ€ÑƒÐ·Ð¸Ñ ge +জরà§à¦œà¦¿à§Ÿà¦¾ ge +Jeorji ge +Gruzija ge +Geòrgia ge +Gruzie ge +Georgien ge +Georgien ge +ΓεωÏγία ge +Georgino ge +Gruusia ge +گرجستان ge +Géorgie ge +Georgië ge +An tSeoirsia ge +Xeórxia ge +×’'ורג'×™×” ge +जà¥à¤¯à¤¾à¤°à¥à¤œà¤¿à¤¯à¤¾ ge +Grúzia ge +Georgía ge +ジョージア島 ge +ហ្សកហ្ស៊ី ge +그루지아 ge +ເຊີເບີຠge +Gruzija ge +Gruzija ge +Грузија ge +Георги ge +Ä orÄ¡ia ge +Georgien ge +Georgië ge +ਜਾਰਜੀਆ ge +Gruzja ge +Geórgia ge +Geórgia ge +Ð“Ñ€ÑƒÐ·Ð¸Ñ ge +Jeworugiya ge +Gruzija ge +Грузија ge +Gruzija ge +Georgien ge +ஜியோரà¯à®œà®¿à®¯à®¾ ge +ГурҷиÑтон ge +จอร์เจีย ge +Gürcistan ge +Görcestan ge +Ð“Ñ€ÑƒÐ·Ñ–Ñ ge +ГуржиÑтон ge +Djeyordjeye ge +æ ¼é²å‰äºš ge +喬治亞 ge +Ghana gh +غانا gh +Гана gh +Гана gh +ঘানা gh +Gwana gh +Gana gh +Γκάνα gh +Ganao gh +غنا gh +Gána gh +Gana gh +×’×× ×” gh +घाना gh +Gana gh +ガーナ gh +ហ្កាណា gh +가나 gh +ຈີນ gh +Gana gh +Gana gh +Гана gh +Гана gh +Gana gh +ਘਾਨਾ gh +Gana gh +Gana gh +Gana gh +Гана gh +Gana gh +Gana gh +Гана gh +Gana gh +I-Ghana gh +கானா gh +Ғано gh +à¸à¸²à¸™à¸² gh +Гана gh +Гана gh +Gana gh +加纳 gh +è¿¦ç´ gh +Gibraltar gi +جبل طارق gi +Гібралтар gi +Гибралтар gi +জিবà§à¦°à¦²à§à¦Ÿà¦¾à¦° gi +Jibraltar gi +ΓιβÏÎ±Î»Ï„Î¬Ï gi +Gibraltaro gi +گیبرالتار gi +Giobráltar gi +Xibraltar gi +גיברלטר gi +जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° gi +Gibraltár gi +Gíbraltar gi +Gibilterra gi +ジブラルタル gi +지브롤터 gi +ມອລຕາ gi +Gibraltaras gi +GibraltÄrs gi +Гибралтар gi +Гибралтар gi +Ä ibiltar gi +ਗੀਬਰਾਲਟਾਰ gi +Гибралтар gi +Jiburalitari gi +Гибралтар gi +ஜிபà¯à®°à®²à¯à®Ÿà®¾à®°à¯ gi +Ҷабалуттариқ gi +ยิบรอลตา gi +Cebelitarık gi +Гібралтар gi +Гибралтар gi +Djibraltar gi +直布罗陀 gi +直布羅陀 gi +Greenland gl +Groenland gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl +গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦£à§à¦¡ gl +Griñland gl +Groenlàndia gl +Grónsko gl +Y Lasynys gl +Grønland gl +Grönland gl +Ισλανδία gl +Groenlandia gl +Gröönimaa gl +Gröönlanti gl +Groenland gl +Grienlân gl +An Ghraonlainn gl +Groenlándia gl +Grönland gl +Grænland gl +Groenlandia gl +グリーンランド gl +Grenlandija gl +Гренланд gl +Grønland gl +Gröönland gl +Groenland gl +Grønland gl +ਗਰੀਨਲੈਂਡ gl +Grenlandia gl +Gronelândia gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl +Goronilande gl +Ruonáeatnan gl +Grenlandija gl +Гренланд gl +Grenland gl +Grönland gl +Ð“Ñ€Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ gl +à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์ gl +Grönland gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ñ–Ñ gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl +格陵兰 gl +格陵蘭 gl +Gambia gm +Gambië gm +غامبيا gm +Ð“Ð°Ð¼Ð±Ñ–Ñ gm +Ð“Ð°Ð¼Ð±Ð¸Ñ gm +গামবিয়া gm +Gambi gm +Gambija gm +Gàmbia gm +Gambie gm +Γκάμπια gm +Gambio gm +گامبیا gm +Gambie gm +An Ghaimbia gm +Gámbia gm +גמביה gm +जामà¥à¤¬à¤¿à¤¯à¤¾ gm +Gambija gm +Gambía gm +ガンビア gm +ហ្កាំប៊ី gm +ê°ë¹„ì•„ gm +à»àºàº¡àº¡àº² gm +Gambija gm +Gambija gm +Гамбија gm +Гамби gm +Gambja gm +ਗੈਂਬੀਆ gm +Gâmbia gm +Gâmbia gm +Ð“Ð°Ð¼Ð±Ð¸Ñ gm +Gambiya gm +Gambija gm +Гамбија gm +Gambija gm +காமà¯à®ªà®¿à®¯à®¾ gm +Гомбиё gm +à¹à¸à¸¡à¹€à¸šà¸µà¸¢ gm +Ð“Ð°Ð¼Ð±Ñ–Ñ gm +Ð“Ð°Ð¼Ð±Ð¸Ñ gm +Gambeye gm +冈比亚 gm +甘比亞 gm +Guinea gn +غينيا gn +ГвінÑÑ gn +Ð“Ð²Ð¸Ð½ÐµÑ gn +গিনি gn +Gine gn +Gvineja gn +Gini gn +Γουινέα gn +Gvineo gn +Ginea gn +گینه gn +Guinée gn +An Ghuine gn +Guiné gn +×’×™× ××” gn +गà¥à¤ˆà¤¨à¤¾ gn +Gvineja gn +Gínea gn +ギニア gn +ហ្គីណ០gn +기니 gn +ເຖາວັນ gn +GvinÄ—ja gn +Gvineja gn +Гвинеја gn +Гуйнеа gn +Ginea gn +ਗà©à¨‡à¨¨à©€à¨† gn +Gwinea gn +Guiné gn +Guiné gn +Ð“Ð²Ð¸Ð½ÐµÑ gn +Gineya gn +Gvineja gn +Гвинеја gn +Gvineja gn +கà¯à®¯à¯à®©à®¿à®¯à®¾ gn +Гине gn +à¸à¸´à¸™à¸µ gn +Gine gn +Ð“Ð²Ñ–Ð½ÐµÑ gn +Ð“Ð²Ð¸Ð½ÐµÑ gn +Guinêye gn +几内亚 gn +幾內亞 gn +Guadeloupe gp +غواديلوب gp +ГвадÑлупа gp +Гваделупа gp +গাডেলà§à¦ª gp +Gwadeloup gp +Gvadalupe gp +Guadalupe gp +Gwadel?p gp +ΓουαδελοÏπη gp +Gvadelupo gp +Guadalupe gp +Guadalupe gp +گوادلوپ gp +Guadalúip gp +Guadalupe gp +×’×ודלופה gp +गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‹à¤ª gp +Gvadelúpeyjar gp +Guadalupa gp +ä»é ˜ã‚°ã‚¢ãƒ‰ãƒ«ãƒ¼ãƒ— gp +ហ្គាដឺលុប gp +과들루프 gp +ເດີລຸຠgp +Gvandelupa gp +Гваделупе gp +Gwadelup gp +ਗà©à¨†à¨¡à©€à¨“ਪੀ gp +Gwadelupa gp +Guadalupe gp +Guadalupe gp +Guadelupa gp +Гваделупа gp +Gwaderupe gp +Гвадалупе gp +Gvadalupe gp +கà¯à®µà®¾à®Ÿà¯†à®²à¯à®ªà¯‹à®ªà¯ gp +Гвадалуппо gp +เà¸à¸²à¸°à¸à¸±à¸§à¹€à¸”อลูป gp +Guadelupa gp +Гваделупа gp +Гваделупа gp +瓜德罗普 gp +瓜德魯普 gp +Equatorial Guinea gq +Ekwatoriaal Guinea gq +غينيا الاستوائية gq +ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ gq +Екваториална Ð“Ð²Ð¸Ð½ÐµÑ gq +ইকà§à§Ÿà§‡à¦Ÿà§‹à¦°à¦¿à§Ÿà¦¾à¦² গিনি gq +Guine équatoriale gq +Ekvatorijalna Gvineja gq +Guinea Equatorial gq +Rovníková Guinea gq +Gini Gyhydeddol gq +Ækvatorial Guinea gq +Äquatorial-Guinea gq +ΙσημεÏινή Γουινέα gq +Ekvatora Gvineo gq +Guinea equatorial gq +Ekvatoriaal-Guinea gq +Ginea Ekuatoriala gq +گینه اکوادور gq +Päiväntasaajan Guinea gq +Guinée équatoriale gq +Guine Mheánchiorclach gq +Guinea Ecuatorial gq +×’×™× ××” המשוונית gq +इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गà¥à¤à¤¨à¤¾ gq +Ekvatorijalna Gvineja gq +EgyenlítÅ‘i Guinea gq +Miðbaugs-Gínea gq +Guinea Equatoriale gq +赤é“ギニア gq +ហ្គីណáŸâ€‹áž¢áŸáž€áŸ’វាទáŸážš gq +ì ë„ 기니 gq +àºàº²àº™àºªàº­àº™ gq +Ekvatoriaus GvinÄ—ja gq +EkvatoriÄlÄ Gvineja gq +Екваторијална Гвинеја gq +Equatorial Гуйнеа gq +Ginea Ekwatorjali gq +Ekvatorial-Guinea gq +Äquatoriaal-Guinea gq +Equatoriaal Guinea gq +Ekvatorial-Guinea gq +à¨à¨•ੂਲੇਟਰਲ ਗà©à¨ˆà¨¨à¨¿à¨† gq +Gwinea Równikowa gq +Guiné Equatorial gq +Guiné Equatorial gq +Guinea Ecuatorială gq +Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ gq +Gineya Ekwatoriyale gq +EkvatorialalaÅ¡-Guinea gq +Rovníkova Guinea gq +Ekvatorialna Gvineja gq +Екваторијална Гвинеја gq +Ekvatorijalna Gvineja gq +Ekvatorialguinea gq +ஈகோடோரியல௠கà¯à®¯à¯à®©à®¿à®¯à®¾ gq +Гинеи Экваторӣ gq +à¸à¸´à¸™à¸µ ตรงเส้นศูนย์สูตร gq +Ekvatoral Gine gq +Equatorlı Guinea gq +Екваторіальна Ð“Ð²Ñ–Ð½ÐµÑ gq +Экваториал Ð“Ð²Ð¸Ð½ÐµÑ gq +Guinêye EcwÃ¥toriÃ¥le gq +赤é“几内亚 gq +赤é“幾內亞 gq +Greece gr +Griekeland gr +اليونان gr +Yunanıstan gr +ГрÑÑ†Ñ‹Ñ gr +Ð“ÑŠÑ€Ñ†Ð¸Ñ gr +গà§à¦°à§€à¦¸ gr +Gres gr +GrÄka gr +Grècia gr +Řecko gr +Gwlad Groeg gr +Grækenland gr +Griechenland gr +Ελλάδα gr +Grekujo gr +Grecia gr +Kreeka gr +Grezia gr +یونان gr +Kreikka gr +Grikkaland gr +Grèce gr +Grikelân gr +An Ghréig gr +Grécia gr +יוון gr +गà¥à¤°à¥€à¤¸ gr +GrÄka gr +Görögország gr +Grikkland gr +Grecia gr +ギリシャ gr +ក្រិក gr +그리스 gr +àºàºµàºŠ gr +Graikija gr +GrieÄ·ija gr +Грција gr +Грек gr +GreÄ‹ja gr +Hellas gr +Grekenland gr +Griekenland gr +Hellas gr +Grèça gr +ਗਰੀਸ gr +Grecja gr +Grécia gr +Grécia gr +Grecia gr +Ð“Ñ€ÐµÑ†Ð¸Ñ gr +Ubugereki gr +Greika gr +Grécko gr +GrÄija gr +Грчка gr +GrÄka gr +I-Greece gr +Grekland gr +கிரீச௠gr +Юнон gr +à¸à¸£à¸µà¸‹ gr +Yunanistan gr +Yunanstan gr +Ð“Ñ€ÐµÑ†Ñ–Ñ gr +ЮнониÑтон gr +Hy Lạp gr +Grece gr +希腊 gr +希臘 gr +Guatemala gt +Gautemala gt +غواتيمالا gt +Quatemala gt +ГватÑмала gt +Гватемала gt +গà§à§Ÿà¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾ gt +Gvatemala gt +Gwatemala gt +Γουατεμάλα gt +Gvatemalo gt +گواتمالا gt +Guatamala gt +גו×טמלה gt +गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾ gt +Gvatemala gt +Gvatemala gt +グァテマラ gt +ហ្គាážáŸáž˜áŸ‰áž¶áž¡áž¶ gt +과테ë§ë¼ gt +àºàº±àº§à»€àº•ມາລາ gt +Gvatemala gt +Gvatemala gt +Гватемала gt +ГуÑтемала gt +Gwatemala gt +ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾ gt +Gwatemala gt +Гватемала gt +Gwatemala gt +Gvatemala gt +Гватемала gt +Gvatemala gt +I-Guatemala gt +கà¯à®µà®¾à®¤à¯à®¤à®®à®¾à®²à®¾ gt +Гватемоло gt +à¸à¸±à¸§à¹€à¸•มาลา gt +Гватемала gt +Гватемала gt +Gwatemala gt +å±åœ°é©¬æ‹‰ gt +瓜地馬拉 gt +Guam gu +غوام gu +Гуам gu +Гуам gu +গà§à§Ÿà¦¾à¦® gu +Gwam gu +Gw?m gu +Γκουάμ gu +Gvamo gu +گوام gu +גו×× gu +गà¥à¤µà¤¾à¤® gu +Gvam gu +グァム gu +ហ្គាំម gu +ê´Œ gu +à»àºàº¡àº¡àº² gu +Guama gu +Гвам gu +Гуам gu +Gwam gu +ਗà©à¨†à¨® gu +Гуам gu +Gwamu gu +Гуам gu +காம௠gu +Гуамма gu +à¸à¸§à¸¡ gu +Гуам gu +Гуам gu +Gwam gu +关岛 gu +關島 gu +Guinea-Bissau gw +غينيا-بيساو gw +ГвінÑÑ-БіÑаў gw +Ð“Ð²Ð¸Ð½ÐµÑ Ð‘Ð¸Ñау gw +গিনি-বিসো gw +Gine-Biso gw +Gvineja-Bisau gw +Gini-Bisaw gw +Γουινέα-Μπισσάου gw +Gvineo BisaÅ­a gw +Ginea-Bissau gw +گینه بیسائو gw +Guinée-Bissau gw +Guine-Bhissau gw +×’×™× ××” ביס×ו gw +गà¥à¤à¤¨à¤¾-बिसाऊ gw +Bissau-Guinea gw +Gínea-Bissá gw +ギニアビサオ gw +ហ្គីណáŸáž”៊ីសៅ gw +기니비사 gw +ລັດເຊີຠgw +Gvineja-Bisava gw +Гвинеја БиÑао gw +Гуйнеа-БиÑÑау gw +Ginea-Bissaw gw +ਗà©à¨‡à¨¨à¨¿à¨†-ਬਿਸ਼ਾਉ gw +Gwinea-Bissau gw +Guiné Bissau gw +Guiné-Bissau gw +ГвинеÑ-БиÑау gw +Gineya-Bisawu gw +Гвинеја БиÑао gw +Gvineja Bisao gw +கà¯à®¯à¯à®©à®¿à®¯à®¾-பிஸà¯à®¸à®¾ gw +Гвинеи БиÑÑои gw +à¸à¸´à¸™à¸µ - บิสซอ gw +Gine-Bissau gw +ГвінеÑ-БіÑау gw +ГвинеÑ-БиÑÑау gw +Guinêye-Bissaw gw +å‡ å†…äºšæ¯”ç» gw +幾內亞比紹 gw +Guyana gy +غيانا gy +ГвіÑна gy +Гуайана gy +গায়ানা gy +Gwiana gy +Gvajana gy +Giana gy +Γουιάνα gy +Gujano gy +گویان gy +Guyane gy +An Ghuáin gy +Guiana gy +גוי×× ×” gy +गà¥à¤¯à¤¾à¤¨à¤¾ gy +Gvæjana gy +ガイアナ gy +ហ្គីយ៉ាណា gy +ê°€ì´ì•„나 gy +ຈີນ gy +Gviana gy +Gajana gy +Гвајана gy +ГуÑна gy +Gujana gy +ਗà©à¨†à¨¨à¨¾ gy +Gujana gy +Guiana gy +Guiana gy +Guiana gy +Гайана gy +Giyana gy +Gvajana gy +Гвајана gy +Gvajana gy +கானா gy +Гуана gy +à¸à¸¹à¸¢à¸²à¸™à¹ˆà¸² gy +Guana gy +ГайÑна gy +Гвиана gy +圭亚那 gy +è“‹äºžç´ gy +Hong Kong SAR(China) hk +Hong Kong SAR (China) hk +Хонг Конг (Китай) hk +হং কং SAR(চীন) hk +Hong Kong SAR(Sina) hk +Hong Kong SAR(Xina) hk +Hong Kong SAR (Čína) hk +Hongkong SAR(Kina) hk +Χονγκ Κονγκ SAR (Κίνα) hk +Hongkong hk +Hong Kong SAR(Txina) hk +Hong Kong SAR (Kiina) hk +Hong Kong SAR (Chine) hk +Hong Cong SAR(An tSín) hk +Hong Kong hk +הונג קונג SAR (סין) hk +Hongkong (Kína) hk +Hong Kong (sjálfstjórnarhérað í Kína) hk +Hong Kong SAR(Cina) hk +香港(中国) hk +ហុងចិន (áž…áž·áž“) hk +Hong Kongas SAR(Kinija) hk +Хонг Конг СÐР(Кина) hk +Hongkong SAR(Kina) hk +Hong Kong hk +Hongkong SAR(Kina) hk +ਹਾਂਗ-ਕਾਂਗ SAR(ਚੀਨ) hk +Hong Kong SAR (Chiny) hk +Hong Kong SAR (China) hk +Гонконг hk +Hong Kong SAR (Ubushinwa) hk +Hongkong SAR(Kiinná) hk +Hong Kong SAR (Kitajska) hk +SAR Hong Kong (Кина) hk +SAR Hong Kong (Kina) hk +Hong Kong (Kina) hk +ஹாஙà¯à®•ாங௠SAR(சீனா) hk +ฮ่องà¸à¸‡ hk +Hong Kong (Çin) hk +Гонконг SAR (Китай) hk +Гонконг (Хитой) hk +中国香港特别行政区 hk +香港 SAR(中國) hk +Honduras hn +هندوراس hn +Ð“Ð°Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +হণà§à¦¡à§à¦°à¦¾à¦¸ hn +Hondures hn +Hondwras hn +ΟνδοÏÏα hn +Honduro hn +هندوراس hn +Hondúras hn +הונדורס hn +होंडà¥à¤°à¤¾à¤¸ hn +Hondúras hn +ホンジュラス hn +ហុងឌូរ៉ាស់ hn +온ë‘ë¼ìФ hn +ຫອນດູລັດ hn +HondÅ«ras hn +Hondurasa hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ħonduras hn +Hondures hn +ਹੰਨਡੂਰਸ hn +Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Hondirasi hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +I-Honduras hn +ஆணà¯à®Ÿà¯à®°à®¾à®¸à¯ hn +Ò²Ð¸Ð½Ð´ÑƒÑ€Ð¾Ñ hn +ฮอนดูรัส hn +Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +洪都拉斯 hn +å®éƒ½æ‹‰æ–¯ hn +Croatia hr +Kroasië hr +كرواتيا hr +Xırvatıstan hr +Ð¥Ð°Ñ€Ð²Ð°Ñ‚Ñ‹Ñ hr +ХърватÑка hr +কà§à¦°à§‹à§Ÿà¦¾à¦¶à¦¿à§Ÿà¦¾ hr +Kroatia hr +Hrvatska hr +Croàcia hr +Chorvatsko hr +Kroatien hr +Kroatien hr +ΚÏοατία hr +Kroatio hr +Croacia hr +Horvaatia hr +Kroazia hr +کرواسی hr +Kroatia hr +Kroatia hr +Croatie hr +Kroatië hr +An Chróit hr +Croácia hr +קרו×טיה hr +कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾ hr +Hrvatska hr +Horvátország hr +Kroasia hr +Króatía hr +Croazia hr +クロアãƒã‚¢ hr +ក្រូអាហhr +í¬ë¡œì•„í‹°ì•„ hr +ໂຄເອເທີຠhr +Kroatija hr +HorvÄtija hr +ХрватÑка hr +Кроати hr +Kroazja hr +Kroatia hr +Kroatien hr +Kroatië hr +Kroatia hr +Croacia hr +ਕਰੋਆਟਿਆ hr +Chorwacja hr +Croácia hr +Croácia hr +CroaÅ£ia hr +Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr +Korowasiya hr +Kroátia hr +Chorvátsko hr +HrvaÅ¡ka hr +ХрватÑка hr +Hrvatska hr +I-Croatia hr +Kroatien hr +கà¯à®°à¯‹à®Ÿà®¿à®¯à®¾ hr +Хорватӣ hr +โครเอเธีย hr +Hırvatistan hr +Kroatia hr +Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ñ–Ñ hr +Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr +CrowÃ¥ceye hr +克罗地亚 hr +克羅埃西亞 hr +Haiti ht +Haïti ht +هايتي ht +Гаіці ht +Хаити ht +হাইতি ht +Haití ht +Αϊτή ht +Haitio ht +Haití ht +هاییتی ht +Haïti ht +Háítí ht +×”×יטי ht +हैती ht +Haítí ht +ãƒã‚¤ãƒ ht +ហែទី ht +ì•„ì´í‹° ht +ວາດຮູບ - K ht +Haitis ht +Хаити ht +Хайти ht +Ħaiti ht +ਹਾਇਟੀ ht +Гаити ht +Hayiti ht +Хаити ht +ஹைதி ht +Ҳаити ht +ไฮติ ht +Гаїті ht +Гаити ht +Hayiti ht +海地 ht +海地 ht +Hungary hu +Hongarye hu +هنغاريا hu +Macarıstan hu +Вугоршчына hu +Ð£Ð½Ð³Ð°Ñ€Ð¸Ñ hu +হাঙà§à¦—েরী hu +Hungaria hu +MaÄ‘arska hu +Hongria hu +MaÄarsko hu +Hwngari hu +Ungarn hu +Ungarn hu +ΟυγγαÏία hu +Hungario hu +Hungría hu +Ungari hu +Hungaria hu +مجارستان hu +Unkari hu +Ungarn hu +Hongrie hu +Hongarije hu +An Ungáir hu +Hungria hu +הונגריה hu +हंगरी hu +MaÄ‘jarska hu +Magyarország hu +Hungaria hu +Ungverjaland hu +Ungheria hu +ãƒãƒ³ã‚¬ãƒªãƒ¼ hu +ហុងគ្រី hu +í—가리 hu +ຫັງàºàº²àº¥àºµ hu +Vengrija hu +UngÄrija hu +Унгарија hu +Унгар hu +Ungerija hu +Ungarn hu +Ungarn hu +Hongarije hu +Ungarn hu +Hongria hu +ਹੰਗਰੀ hu +WÄ™gry hu +Hungria hu +Hungria hu +Ungaria hu +Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu +Hongiriya hu +Ungár hu +MaÄarsko hu +Madžarska hu +МађарÑка hu +MaÄ‘arska hu +I-Hungary hu +Ungern hu +ஹஙà¯à®•ேரி hu +МаҷориÑтон hu +ฮังà¸à¸²à¸£à¸µ hu +Macaristan hu +Macarstan hu +Угорщина hu +Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu +Hongreye hu +匈牙利 hu +匈牙利 hu +Indonesia id +Indonesië id +إندونيسيا id +İndoneziya id +ІнданÑÐ·Ñ–Ñ id +Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id +ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾ id +Indonezi id +Indonezija id +Indonèsia id +Indonésie id +Indonesien id +Indonesien id +Ινδονησία id +Indonezio id +Indoneesia id +اندونزی id +Indonésie id +Indonesië id +An Indinéis id +Indonésia id +×ינדונזיה id +इंडोनेशिया id +Indonezija id +Indonézia id +Indónesía id +インドãƒã‚·ã‚¢ id +ឥណ្ឌូនáŸážŸáŸŠáž¸ id +ì¸ë„네시아 id +ອີàºà»‚ດນີເຊີຠid +Indonezija id +IndonÄ“zija id +Индонезија id +Индонез id +Indoneżja id +Indonesien id +Indonesië id +ਇੰਡੋਨੇਸ਼ੀਆ id +Indonezja id +Indonésia id +Indonésia id +Indonezia id +Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id +Indonesiya id +Indonézia id +Indonezija id +Индонезија id +Indonezija id +I-Indonesia id +Indonesien id +இநà¯à®¤à¯‹à®©à¯€à®šà®¿à®¯à®¾ id +Индонезӣ id +อินโดนีเซีย id +İndonezya id +İndonesia id +Ð†Ð½Ð´Ð¾Ð½ÐµÐ·Ñ–Ñ id +Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id +Indonezeye id +å°åº¦å°¼è¥¿äºš id +å°å°¼ id +Ireland ie +Ierland ie +أيرلندا ie +İrlandiya ie +ІрлÑÐ½Ð´Ñ‹Ñ ie +Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie +আয়ারলà§à¦¯à¦¾à¦£à§à¦¡ ie +Iwerzhon ie +Irska ie +Irlanda ie +Irsko ie +Iwerddon ie +Irland ie +Irland ie +ΙÏλανδία ie +Islando ie +Irlanda ie +Iirimaa ie +Irlanda ie +ایرلند ie +Irlanti ie +Ãrland ie +Irlande ie +Ierlân ie +Éire ie +Irlanda ie +×ירלנד ie +आयरलैंड ie +Irska ie +Ãrország ie +Irlandia ie +Ãrland ie +Irlanda ie +アイルランド ie +អៀរឡង់ ie +ì•„ì¼ëžœë“œ ie +ໄອà»àº¥àº™ ie +Airija ie +Īrija ie +ИрÑка ie +Ирланд ie +Irlanda ie +Irland ie +Irland ie +Ierland ie +Irland ie +Irlanda ie +ਆਇਰਲੈਂਡ ie +Irlandia ie +Irlanda ie +Irlanda ie +Irlanda ie +Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie +Irilande ie +Irlánda ie +Ãrsko ie +Irska ie +ИрÑка ie +Irska ie +I-Ireland ie +Irland ie +அயரà¯à®²à®¾à®¨à¯à®¤à¯ ie +Ирлонд ie +ไอร์à¹à¸¥à¸™à¸”์ ie +İrlanda ie +İreland, İrlandia ie +Ð†Ñ€Ð»Ð°Ð½Ð´Ñ–Ñ ie +Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie +Irlande ie +伊朗 ie +愛爾蘭 ie +Israel il +اسرائيل il +İzrail il +Ізраіль il +Израел il +ইসরাইল il +Izrael il +Izrael il +ΙσÏαήλ il +Israelo il +Iisrael il +اسراییل il +Ãsrael il +Israël il +Iosrael il +ישר×ל il +इज़राइल il +Izrael il +Izrael il +Ãsrael il +Israele il +イスラエル il +អ៊ីស្រាអែល il +ì´ìФë¼ì—˜ il +ອິດສະລະເອລ il +Izraelis il +IzraÄ“la il +Израел il +Изриал il +Iżrael il +ਇਜ਼ਰਾਈਲ il +Izrael il +Израиль il +Isirayeli il +Izrael il +Izrael il +Израел il +Izrael il +I-Israel il +இசà¯à®°à¯‡à®²à¯ il +ИÑроил il +อิสราเอล il +İsrail il +İsrael il +Ізраїль il +ИÑроил il +Israyel il +USirayeli il +以色列 il +以色列 il +India in +Indië in +الهند in +Hindistan in +Ð†Ð½Ð´Ñ‹Ñ in +Ð˜Ð½Ð´Ð¸Ñ in +ভারত in +Indez in +Indija in +Ãndia in +Indie in +Indien in +Indien in +Ινδία in +Hindujo in +هندوستان in +Intia in +Inde in +An India in +Ãndia in +הודו in +भारत in +Indija in +Indland in +インド in +ឥណ្ឌា in +ì¸ë„ in +ອິນເດີຠin +Indija in +Indija in +Индија in +ЭнÑтхÑг in +Indja in +Indien in +ਭਾਰਤ in +Indie in +Ãndia in +Ãndia in +Ð˜Ð½Ð´Ð¸Ñ in +Ubuhinde in +Indija in +Индија in +Indija in +I-India in +Indien in +இநà¯à®¤à®¿à®¯à®¾ in +ҲиндуÑтон in +อินเดีย in +Hindistan in +Hindstan in +Ð†Ð½Ð´Ñ–Ñ in +ҲиндиÑтон in +Ấn Äá»™ in +Inde in +å°åº¦ in +å°åº¦ in +Endiya in +Iraq iq +Irak iq +العراق iq +İraq iq +Ірак iq +Ирак iq +ইরাক iq +Irak iq +Irak iq +Irák iq +Irac iq +Irak iq +Irak iq +ΙÏάκ iq +Irako iq +Irak iq +Iraak iq +Irak iq +عراق iq +Irak iq +Irak iq +Irak iq +Irak iq +An Iaráic iq +עיר××§ iq +इराक iq +Irak iq +Irak iq +Ãrak iq +イラク iq +អ៊ីរ៉ាក់ iq +ì´ë¼í¬ iq +ອີລັຠiq +Irakas iq +IrÄka iq +Ирак iq +Ирак iq +Irak iq +Irak iq +Irak iq +Irak iq +ਇਰਾਕ iq +Irak iq +Iraque iq +Iraque iq +Irak iq +Ирак iq +Iraki iq +Iráka iq +Irák iq +Irak iq +Ирак iq +Irak iq +I-Iraq iq +Irak iq +ஈராக௠iq +Ироқ iq +อิรัภiq +Irak iq +Ğíraq iq +Ірак iq +Ироқ iq +Irak iq +伊拉克 iq +伊拉克 iq +Iran ir +أيران ir +Іран ir +Иран ir +ইরান ir +Ãrán ir +ΙÏάν ir +Irano ir +Iraan ir +ایران ir +An Iaráin ir +Irán ir +×יר×ן ir +इरान ir +Irán ir +Ãran ir +イラン ir +អ៊ីរ៉ង់ ir +ì´ëž€ ir +ອີລັຠir +Iranas ir +IrÄna ir +Иран ir +Иран ir +ਈਰਾਨ ir +Irão ir +Irã ir +Иран ir +Irani ir +Irána ir +Irán ir +Иран ir +I-Iran ir +ஈரான௠ir +Эрон ir +อิหร่าน ir +İran ir +İran ir +Іран ir +Эрон ir +伊朗 ir +伊朗 ir +Iceland is +Ysland is +أيسلندا is +İslandiya is +ІÑьлÑÐ½Ð´Ñ‹Ñ is +ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is +আইসলà§à¦¯à¦¾à¦£à§à¦¡ is +Island is +Island is +Islàndia is +Island is +Ynys yr I? is +Island is +Island is +Ισλανδία is +Islando is +Islandia is +Island is +Islandia is +ایسلند is +Islanti is +Ãsland is +Islande is +Yslân is +An Ãoslainn is +Islándia is +×יסלנד is +आयरलैंड is +Island is +Izland is +Islandia is +Ãsland is +Islanda is +アイスランド is +អ៊ីស្លង់ is +ì•„ì´ìŠ¬ëž€ë“œ is +ໄອຊà»àº¥àº™ is +Islandija is +Islande is +ИÑланд is +ИÑланд is +Islandja is +Island is +Island is +IJsland is +Island is +Islandia is +ਆਈਸਲੈਂਡ is +Islandia is +Islândia is +Islândia is +Islanda is +ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is +Isilande is +Islánda is +Island is +Islandija is +ИÑланд is +Island is +I-Iceland is +Island is +தீவ௠is +ИÑлонд is +ไอซ์à¹à¸¥à¸™à¸”์ is +İzlanda is +İsland is +ІÑÐ»Ð°Ð½Ð´Ñ–Ñ is +ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is +Izlande is +冰岛 is +冰島 is +Icelandi is +Italy it +Italië it +ايطاليا it +İtalyia it +Ð†Ñ‚Ð°Ð»Ñ–Ñ it +Ð˜Ñ‚Ð°Ð»Ð¸Ñ it +ইতালী it +Italia it +Italija it +Itàlia it +Itálie it +Yr Eidal it +Italien it +Italien it +Ιταλία it +Italio it +Italia it +Itaalia it +Italia it +ایتالیا it +Italia it +Italia it +Italie it +Italië it +An Iodáil it +Itália it +×יטליה it +इटली it +Italija it +Olaszország it +Italia it +Ãtalía it +Italia it +イタリア it +អ៊ីážáž¶áž›áž¸ it +ì´íƒˆë¦¬ì•„ it +ອີຕາລີ it +Italija it +ItÄlija it +Италија it +Итали it +Itali it +Italja it +Italia it +Italien it +Italië it +Italia it +Italia it +ਇਟਲੀ it +WÅ‚ochy it +Itália it +Itália it +Italia it +Ð˜Ñ‚Ð°Ð»Ð¸Ñ it +Ubutaliyani it +Itália it +Taliansko it +Italija it +Италија it +Italija it +I-Italy it +Italien it +இதà¯à®¤à®¾à®²à®¿ it +Итолиё it +อิตาลี it +İtalya it +İtalia it +Ð†Ñ‚Ð°Ð»Ñ–Ñ it +Ð˜Ñ‚Ð°Ð»Ð¸Ñ it +à it +ItÃ¥leye it +Ithali it +æ„大利 it +義大利 it +Jamaica jm +Jamaika jm +جامايكا jm +Yamayka jm +Ямайка jm +Ямайка jm +জামাইকা jm +Jamaika jm +Jamajka jm +Jamajka jm +Jamaika jm +Τζαμάικα jm +Jamajko jm +Jamaika jm +جاماییکا jm +Jamaika jm +Jamaïque jm +An Iamáice jm +Xamaica jm +×’'מייקה jm +जमैका jm +Jamajka jm +Jamaika jm +Jamaika jm +Jamaíka jm +Giamaica jm +ジャマイカ jm +ហ្សាម៉ាអ៊ិគ jm +ìžë©”ì´ì¹´ jm +ຈາໄມàºàº² jm +Jamaika jm +Jamaika jm +Јамајка jm +Ямайк jm +Ä amajka jm +Jamaika jm +ਜੈਮੇਕਾ jm +Jamajka jm +Ямайка jm +Jamayika jm +Jamajka jm +Jamajka jm +Јамајка jm +Jamajka jm +I-Jamaica jm +சமெயà¯à®•à¯à®•ா jm +Ҷомойко jm +จาไมà¸à¹‰à¸² jm +Jamaika jm +Jamayka jm +Ямайка jm +Ямайка jm +Djamayike jm +牙买加 jm +牙買加 jm +Jordan jo +Jordaan jo +الأردن jo +İordaniya jo +Ð¯Ñ€Ð´Ð°Ð½Ñ–Ñ jo +Ð™Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo +জরà§à¦¡à¦¾à¦¨ jo +Jordani jo +Jordània jo +Jordán jo +Gwlad Iorddonen jo +Jordanien jo +ΙοÏδανία jo +Jordanio jo +Jordania jo +Jordaania jo +Jordania jo +اردن jo +Jordania jo +Jordanie jo +Jordanië jo +An Iordáin jo +Xordánia jo +ירדן jo +जॉरà¥à¤¡à¤¨ jo +Jordánia jo +Jórdanía jo +Giordania jo +ヨルダン jo +ហ្ស៊កដានី jo +요르단 jo +ຈà»à»àº”ນ jo +Jordanija jo +JordÄnija jo +Јордан jo +Ðрдан jo +Ä ordan jo +Jordanien jo +Jordanië jo +ਜਾਰਡਨ jo +Jordania jo +Jordânia jo +Jordânia jo +Iordania jo +Ð˜Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo +Yorudani jo +Jordánia jo +Jordánsko jo +Jordanija jo +Јордан jo +I-Jordan jo +Jordanien jo +ஜோரà¯à®Ÿà®¾à®©à¯ jo +Урдон jo +จอร์à¹à¸”น jo +Ürdün jo +Ð™Ð¾Ñ€Ð´Ð°Ð½Ñ–Ñ jo +Иордан jo +Djordaneye jo +约旦 jo +ç´„æ—¦ jo +Ijolidani jo +Japan jp +اليابان jp +Yaponiya jp +Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp +Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp +জাপান jp +Japon jp +Japó jp +Japonsko jp +Siapan jp +Ιαπωνία jp +Japanio jp +Japón jp +Jaapan jp +Japonia jp +ژاپن jp +Japani jp +Japon jp +An tSeapáin jp +Xapón jp +יפן jp +जापान jp +Japán jp +Jepang jp +Giappone jp +日本 jp +ជប៉ុន jp +ì¼ë³¸ jp +àºàºµà»ˆàº›àº¸à»ˆàº™ jp +Japonija jp +JapÄna jp +Јапонија jp +Япон jp +Jepun jp +Ä appun jp +Japon jp +ਜਾਪਾਨ jp +Japonia jp +Japão jp +Japão jp +Japonia jp +Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp +Ubuyapani jp +Japána jp +Japonsko jp +Japonska jp +Јапан jp +I-Japan jp +சபà¯à®ªà®¾à®©à¯ jp +Ҷопон jp +à¸à¸µà¹ˆà¸›à¹ˆà¸¸à¸™ jp +Japonya jp +Japan, Yaponia jp +Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp +Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp +Nhật bản jp +Djapon jp +日本 jp +日本 jp +Kenya ke +Kenië ke +كينيا ke +ÐšÐµÐ½Ñ–Ñ ke +ÐšÐµÐ½Ð¸Ñ ke +কেনিয়া ke +Kenija ke +Keňa ke +Cenia ke +Kenia ke +Κένυα ke +Kenjo ke +Kenia ke +کنیا ke +Kenia ke +An Chéinia ke +Kenia ke +×§× ×™×” ke +केनà¥à¤¯à¤¾ ke +Kenija ke +Kenía ke +ケニア ke +កáŸáž“យ៉ា ke +ì¼€ëƒ ke +ເວນດາ ke +Kenija ke +Kenija ke +Кенија ke +ÐšÐµÐ½Ð¸Ñ ke +Kenja ke +Kenia ke +ਕੀਨੀਆ ke +Kenia ke +Quénia ke +Quênia ke +Kenia ke +ÐšÐµÐ½Ð¸Ñ ke +Keňa ke +Kenija ke +Кенија ke +Kenija ke +கெனà¯à®¯à®¾ ke +Куниё ke +เคนยา ke +Kenia ke +ÐšÐµÐ½Ñ–Ñ ke +ÐšÐµÐ½Ð¸Ñ ke +Kenia ke +肯尼亚 ke +肯亞 ke +Kyrgyzstan kg +قيرغيزستان kg +КыргызÑтан kg +КиргизÑтан kg +কিরà§à¦—িজসà§à¦¤à¦¾à¦¨ kg +Kirgistan kg +Kirgistan kg +Kyrgigstan kg +Kyrgyzstán kg +Cyrgystan kg +Kirgizistan kg +Kirgisien kg +ΚιÏγιζιστάν kg +Kirgizujo kg +Kyrgyzstán kg +Kõrgõzstan kg +قرقیزستان kg +Kirghizstan kg +An Chirgeastáin kg +Kirguizistán kg +קירגיסטן kg +किरà¥à¤—िजिसà¥à¤¤à¤¾à¤¨ kg +Kirgizisztán kg +Kirgisistan kg +Kirghizistan kg +キルギスタン kg +គៀរហ្គីស្ážáž„់ kg +키르기스스탄 kg +ຄສິຕັລ kg +Kirgistanas kg +KirgizstÄna kg +КиргиÑтан kg +КиргизÑтан kg +Kirgiżstan kg +Kirgisistan kg +Kirgisien kg +Kirgizië kg +Kirgisistan kg +ਕਿਰਗਸਤਾਨ kg +Kigistan kg +Quirguistão kg +Quirguistão kg +Kirgiztan kg +КиргизÑтан kg +Kirigizisitani kg +Kirgisistan kg +Kirgizstan kg +КиргиÑтан kg +Kirgistan kg +Kirgizistan kg +கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯ kg +ҚирғизиÑтон kg +คีจิสถาน kg +Kırgızistan kg +Qırğızstan kg +КиргизÑтан kg +ҚирғизиÑтон kg +Kirguiztan kg +å‰å°”剿–¯æ–¯å¦ kg +å‰çˆ¾å‰æ–¯ kg +Cambodia kh +Kambodië kh +كمبوديا kh +Камбоджа kh +Камбоджа kh +কামবোডিয়া kh +Kambodj kh +KamboÄ‘a kh +Cambodja kh +Kambodža kh +Kambodscha kh +Καμπότζη kh +KamboÄo kh +Kambodža kh +Canbodia kh +کامبوج kh +Kambodza kh +Cambodge kh +Cambodja kh +An Chambóid kh +Camboia kh +קמבודיה kh +कमà¥à¤¬à¥‹à¤¡à¤¿à¤¯à¤¾ kh +KamboÄ‘a kh +Kambodzsa kh +Kambódía kh +Cambogia kh +カンボジア kh +កម្ពុជា kh +캄보디아 kh +ໂຄລຳເບີຠkh +Kambodža kh +Kambodža kh +Камбоџа kh +Камбодиа kh +Kemboja kh +Kambodja kh +Kambodsja kh +Kambodscha kh +Cambodja kh +Kambodsja kh +ਕੰਬੋਡੀਆ kh +Kambodża kh +Cambodja kh +Cambodja kh +Cambogia kh +Камбоджа kh +Kamboji kh +Kamboža kh +Kambodža kh +Kambodža kh +Камбоџа kh +Kambodža kh +Kambodja kh +கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®¾ kh +Камбуҷа kh +à¸à¸±à¸¡à¸žà¸¹à¸Šà¸² kh +Kamboçya kh +Kambodia kh +Камбоджа kh +Камбоджа kh +Cam pu chia kh +Cambodje kh +柬埔寨 kh +柬埔寨 kh +Kiribati ki +كيريباتي ki +Кiрыбацi ki +Кирибати ki +কিরিবাটি ki +Ciribati ki +ΚιÏιμπάτι ki +Kiribato ki +کیریباتی ki +Ciribeas ki +קיריב×טי ki +किरीबाती ki +Kíribatí ki +キリãƒã‚¹ ki +គិរិបាទី ki +키리바시 ki +à»àºŸàº„ທັລ - K ki +Кирибати ki +Крибати ki +ਕਿਰਿਬਟੀ ki +Кирибати ki +Кирибати ki +கிரிபடி ki +Карибот ki +คิริบาติ ki +Кірібаті ki +Кирибати ki +基里巴斯 ki +å‰é‡Œå·´æ–¯ ki +Comoros km +جزر القمر km +Каморы km +КоморÑки оÑтрови km +কমোরস km +Komoros km +Komori km +Komory km +Ynysoedd Y Comoros km +Comorerne km +Komoren km +ΚομόÏες km +Komoroj km +Komoorid km +کوموروس km +Komorit km +Comores km +Na Comóir km +קומורוס km +कोमोरो km +Kómoreyjar km +Comore km +コモロ km +កុំម៉ូរ៉ូស km +코모로 km +ສີ km +Komoru salas km +КоморÑки оÑтрови km +Ð¡Ð¾Ð¼Ð¾Ñ€Ð¾Ñ km +Komoros km +Komorene km +Komoren km +Komorane km +ਕੋਮੋਰੋਸ km +Komory km +КоморÑкие оÑтрова km +Komore km +Komorot km +Komori km +Комора km +Komora km +Komorerna km +காமாரோஸ௠km +ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km +โคโมรอส km +Komoros km +Komorlar km +КоморÑькі оÑтрови km +ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km +Comores km +ç§‘æ‘©ç½— km +葛摩 km +St. Kitts and Nevis kn +St. Kitts en Nevis kn +سانت كيتس Ùˆ نيÙيس kn +St. Kitts vÉ™ Nevis kn +СÑнт-КрыÑтофер Ñ– ÐÑÐ²Ñ–Ñ kn +Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +সেনà§à¦Ÿ কিটস à¦à¦¬à¦‚ নেভিস kn +S. Kitts ha Nevis kn +St. Kitts i Nevis kn +Sv. Kitts a Nevis kn +Ynysoedd St. Kitts a Nevis kn +St. Kitts-Nevis kn +St. Kitts und Nevis kn +Άγιος ΧÏιστόφοÏος (Σαιντ Κιτς) και Îέβις kn +Sent-Kristofo kaj Neviso kn +St. Kitts y Nevis kn +St. Kitts ja Nevis kn +St. Kitts eta Nevis kn +سن کیتس Ùˆ نویس kn +St. Kitts ja Nevis kn +St Kitts et Nevis kn +St. Kitts en Nevis kn +San Críostóir Nimheas kn +Saint Kitts e Nevis kn +סנט קיטס ונביס kn +सेंट किटà¥à¤¸ तथा नेविस kn +St. Kitts és Nevis kn +St. Kitts dan Nevis kn +Sankti Kristófer og Nevis kn +Saint Kitts e Nevis kn +セントクリストファーãƒã‚¤ãƒ“ス kn +សង់ឃីហនិង áž“áŸážœáž¸ážŸ kn +세ì¸íЏ 키츠 네비스 kn +Å v. Kitts ir Nevis kn +Senkitsa un Nevisa kn +Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +St. ÐšÐ¸Ñ‚Ñ‚Ñ Ð±Ð° ÐÐµÐ²Ð¸Ñ kn +St. Kitts u Nevis kn +St. Kitts og Nevis kn +St. Kitts un Nevis kn +St. Kitts en Nevis kn +St. Kitts og Nevis kn +St. Kitts le Nevis kn +St. Kitts e Nevis kn +ਸੇਂਟ ਕਿਟਸ ਤੇ ਨਿਵੀਸ kn +St. Kitts e Nevis kn +St Kitts e Nevis kn +Sf. Kitts ÅŸi Nevis kn +Сент-ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +Mutagatifu Kitsi na Nevisi kn +St. Kitts ja Nevis kn +St. Kitts a Nevis kn +St. Kitts in Nevis kn +Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +Sv. Kits i Nevis kn +I-St. Kitts and Nevis kn +St. Kitts och Nevis kn +செயினà¯à®Ÿà¯ கிடà¯à®šà¯ & நெவிச௠kn +Синт ÐšÐ¸Ñ‚Ñ‚Ñ Ð²Ð° ÐÐµÐ²Ð¸Ñ kn +เซนต์à¸à¸´à¸•ส์à¹à¸¥à¸°à¹€à¸™à¸§à¸´à¸ª kn +St. Kitts ve Nevis kn +Santa Kitts wä Nevis kn +Ð¤ÐµÐ´ÐµÑ€Ð°Ñ†Ñ–Ñ Ð¡ÐµÐ½Ñ‚-ÐšÑ–Ñ‚Ñ Ñ– ÐÐµÐ²Ñ–Ñ kn +Сент-КриÑтофер ва ÐÐµÐ²Ð¸Ñ kn +St. Kitts na Nevis kn +St. Kitts và Nevis kn +St. Kitts neNevis kn +圣基茨和尼维斯 kn +è–å…‹ç†æ–¯å¤šç¦åŠå°¼ç¶­æ–¯ kn +St. Kitts kanye no-Nevis kn +North Korea kp +Noord Korea kp +كوريا الشمالية kp +Åžimali Koreya kp +ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ ÐšÐ°Ñ€ÑÑ kp +Северна ÐšÐ¾Ñ€ÐµÑ kp +উতà§à¦¤à¦° কোরিয়া kp +Norzh-Korea kp +Sjeverna Koreja kp +Corea del Nord kp +Severní Korea kp +Gogledd Corea kp +Nordkorea kp +Nord-Korea kp +Î’ÏŒÏεια ΚοÏέα kp +Nordkoreo kp +Corea del Norte kp +Põhja-Korea kp +Ipar Korea kp +کره شمالی kp +Pohjois-Korea kp +Norðurkorea kp +Corée du nord kp +Noard-Korea kp +An Chóiré Thuaidh kp +Corea do Norte kp +צפון קורי××” kp +उतà¥à¤¤à¤°à¥€ कोरिया kp +Sjeverna Koreja kp +Észak-Korea kp +Korea Utara kp +Norður-Kórea kp +Corea del Nord kp +æœé®®æ°‘主主義人民共和国 kp +កូរ៉áŸâ€‹ážáž¶áž„​ជើង kp +ì¡°ì„ ë¯¼ì£¼ì£¼ì˜ ì¸ë¯¼ê³µí™”êµ­ kp +ເàºàº»àº²àº¥àºµà»€àº«àº™àº·àº­ kp +Å iaurÄ—s KorÄ—ja kp +ZiemeļKoreja kp +Северна Кореја kp +Хойд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kp +Korea ta' Fuq kp +Nord-Korea kp +Noordkorea kp +Noord-Korea kp +Nord-Korea kp +Lebowa la Korea kp +Corea dèu Nord kp +ਉੱਤਰੀ ਕੋਰੀਆ kp +Korea Północna kp +Coreia do Norte kp +Coréia do Norte kp +Coreea de Nord kp +Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kp +Koreya y'Amajyaruguru kp +Davvi-Korea kp +severná Kórea kp +Severna Koreja kp +Северна Кореја kp +Severna Koreja kp +I-North Korea kp +Nordkorea kp +வட கொரியா kp +КореÑи Шимолӣ kp +เà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­ kp +Kuzey Kore kp +Tönyaq Korea kp +Північна ÐšÐ¾Ñ€ÐµÑ kp +Шимолий ÐšÐ¾Ñ€ÐµÑ kp +Devhula ha Korea kp +Bắc Triá»u Tiên kp +Bijhe Corêye kp +Umntla Korea kp +æœé²œ kp +北韓 kp +Enyakatho ne-Korea kp +South Korea kr +Suid Korea kr +كوريا الجنوبية kr +CÉ™nubi Koreya kr +ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ ÐšÐ°Ñ€ÑÑ kr +Южна ÐšÐ¾Ñ€ÐµÑ kr +দকà§à¦·à¦¿à¦£ কোরিয়া kr +Su-Korea kr +Južna Koreja kr +Corea del Sud kr +Jižní Korea kr +De Corea kr +Sydkorea kr +Süd-Korea kr +Îότια ΚοÏέα kr +Sudkoreo kr +Corea del Sur kr +Lõuna-Korea kr +Hego Korea kr +کره جنوبی kr +Etelä-Korea kr +Suðurkorea kr +Corée du sud kr +Sûd-Korea kr +An Chóiré Theas kr +Corea do Sur kr +×“×¨×•× ×§×•×¨×™××” kr +दकà¥à¤·à¤¿à¤£à¥€ कोरिया kr +Južna Koreja kr +Dél-Korea kr +Korea Selatan kr +Suður-Kórea kr +Corea del Sud kr +大韓民国 kr +កូរ៉áŸâ€‹ážáž¶áž„​ážáŸ’បូង kr +대한민국 kr +ເàºàº»àº²àº¥àºµà»ƒàº•້ kr +Pietų KorÄ—ja kr +DievidKoreja kr +Јужна Кореја kr +Өмнөд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kr +Korea t'Isfel kr +Sør-Korea kr +Söödkorea kr +Zuid-Korea kr +Sør-Korea kr +Borwa bja Korea kr +Corea dèu Sud kr +ਦੱਖਣੀ ਕੋਰੀਆ kr +Korea PoÅ‚udniowa kr +Coreia do Sul kr +Coréia do Sul kr +Coreea de Sud kr +Ð®Ð¶Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kr +Koreya y'Amajyepfo kr +Lulli-Korea kr +Južná Kórea kr +Južna Koreja kr +Јужна Кореја kr +Južna Koreja kr +I-South Korea kr +Sydkorea kr +தென௠கொரியா kr +КореÑи Ҷанубӣ kr +เà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้ kr +Güney Kore kr +Könyaq Korea kr +Південна ÐšÐ¾Ñ€ÐµÑ kr +Жанубий ÐšÐ¾Ñ€ÐµÑ kr +Korea tshipembe kr +Hàn Quốc kr +Nonne Corêye kr +Umzantsi Korea kr +韩国 kr +å—韓 kr +Emzansi Korea kr +Kuwait kw +Kuwaït kw +الكويت kw +КувÑйт kw +Кувейт kw +কà§à§Ÿà§‡à¦¤ kw +Kowaet kw +Kuvajt kw +Kuvajt kw +Coweit kw +Κουβέιτ kw +Kuvajto kw +Kuveit kw +کویت kw +Kuvait kw +Kowait kw +Koeweit kw +Cuáit kw +כווית kw +कà¥à¤µà¥ˆà¤¤ kw +Kuvajt kw +Kuvait kw +Kúveit kw +クェート kw +គុយវ៉ែហkw +쿠웨ì´íЏ kw +à»àº•້ມຮູບ- K kw +Kuveitas kw +Kuveita kw +Кувајт kw +Кувейт kw +Koeweit kw +ਕà©à¨µà©ˆà¨¤ kw +Koweit kw +Kuveit kw +Кувейт kw +Koweti kw +Kuvajt kw +Kuvajt kw +Кувајт kw +Kuvajt kw +I-Kuwait kw +கà¯à®µà¯ˆà®¤à¯ kw +Қувейт kw +คูเวต kw +Küwäyt kw +KКувейт kw +Кувайт kw +Kuweyt kw +ç§‘å¨ç‰¹ kw +ç§‘å¨ç‰¹ kw +Cayman Islands ky +Cayman Eilande ky +جزر الكايمان ky +Кайманови оÑтрови ky +কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ky +Inizi Kaeman ky +Kajmanska ostrva ky +Illes Caimà ky +Kajmanské ostrovy ky +Ynysoedd Caiman ky +Cayman-øerne ky +Kaiman-Inseln ky +Îησιά Κάυμαν ky +Kejmanoj ky +Islas Caimán ky +Kaimanisaared ky +Kaiman Irlak ky +جزایر Ú©Ùیمن ky +Cayman-saaret ky +ÃŽles Caïman ky +Kaaiman Eilannen ky +Oileáin na gCadhman ky +Illas Caimán ky +××™×™ קיימן ky +केमन आइलैंड ky +Kajmanski Otoci ky +Kajmán-szigetek ky +Cayman-eyjar ky +Isole Cayman ky +英領ケイマン諸島 ky +កោះ​កៃម៉ាន ky +ì¼€ì´ë§¨ ì œë„ ky +ຄາຕາລັນ ky +Kaimanų salos ky +Kaimanu salas ky +КајманÑки ОÑтрови ky +Cayman арлууд ky +Gżejjer Cayman ky +Caymanøyene ky +Kayman-Inseln ky +Kaaiman Eilanden ky +Caymanøyane ky +ਕਾਅਮਾਨ ਟਾਪੂ ky +Kajmany ky +Ilhas Caimão ky +Ilhas Cayman ky +Insulele Cayman ky +Каймановы оÑтрова ky +Ibirwa bya Kayimani ky +Caymansullot ky +Kajmanske Ostrovy ky +Kajmanski otoki ky +КајманÑка оÑтрва ky +Kajmanska ostrva ky +Caymanöarna ky +கேமான௠தீவà¯à®•ள௠ky +Ҷазираи Кайман ky +หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™ ky +Cayman Adaları ky +Kayman Utrawları ky +Кайман оÑтрів ky +Кайман Ороллари ky +Iyes Cayman ky +开曼群岛 ky +開曼群島 ky +Kazakhstan kz +كازاخستان kz +КазахÑтан kz +КазахÑтан kz +কাজাকসà§à¦¤à¦¾à¦¨ kz +Kazakstan kz +Kazahstan kz +Kazachstán kz +Casacstan kz +Kasachstan kz +Καζακστάν kz +KazaÄ¥ujo kz +Kazakhstán kz +Kasahstan kz +قزاقستان kz +Kazakstan kz +Kazachstan kz +An Chasacstáin kz +Kazaxistán kz +קזחסט×ן kz +कज़ाखिसà¥à¤¤à¤¾à¤¨ kz +Kazahstan kz +Kazahsztán kz +Kasakstan kz +Kazakistan kz +カザフスタン kz +កាហ្សាក់ស្ážáž„់ kz +ì¹´ìží스탄 kz +à»àºà»àº¥àºàº•ິຠ- K kz +Kazachstanas kz +KazahstÄna kz +КазакÑтан kz +Казак kz +Każakstan kz +Kasakhstan kz +Kasachstan kz +Kazachstan kz +Kasakhstan kz +ਕਾਜ਼ਾਕਸਤਾਨ kz +Kazachstan kz +Cazaquistão kz +Cazaquistão kz +Cazahstan kz +КазахÑтан kz +Kazakisitani kz +Kasakhstan kz +Kazachstan kz +Kazahstan kz +КазахÑтан kz +Kazahstan kz +Kazakstan kz +கஜஸà¯à®¤à®¾à®©à¯` kz +ҚазоқиÑтон kz +คาซัคสถาน kz +Kazakistan kz +Qazaqstan kz +КазахÑтан kz +ҚозоғиÑтон kz +Kazaxhtan kz +哈è¨å…‹æ–¯å¦ kz +哈薩克 kz +Laos la +لاوس la +Ð›Ð°Ð¾Ñ la +Ð›Ð°Ð¾Ñ la +লাওস la +Λάος la +Laoso la +لائوس la +Láós la +ל×וס la +लाओस la +Laosz la +ラオス la +ឡាវ la +ë¼ì˜¤ìФ la +ລາວ la +Laosas la +Laosa la +Ð›Ð°Ð¾Ñ la +Ð›Ð°Ð¾Ñ la +ਲਿਉਸ la +Ð›Ð°Ð¾Ñ la +Lawosi la +Ð›Ð°Ð¾Ñ la +லாஸ௠la +Ð›Ð°Ð¾Ñ la +ลาว la +Ð›Ð°Ð¾Ñ la +Ð›Ð°Ð¾Ñ la +Lào la +Lawosse la +è€æŒ la +寮國 la +Lebanon lb +Libanon lb +لبنان lb +Ліван lb +Ливан lb +লেবানন lb +Liban lb +Liban lb +Líban lb +Libanon lb +Libanus lb +Libanon lb +Libanon lb +Λίβανος lb +Libano lb +Líbano lb +Liibanon lb +Libano lb +لبنان lb +Libanon lb +Libanon lb +Liban lb +Libanon lb +An Liobáin lb +Líbano lb +לבנון lb +लेबनान lb +Libanon lb +Libanon lb +Líbanon lb +Libano lb +レãƒãƒŽãƒ³ lb +លីបង់ lb +레바논 lb +ເດນ່ງນ lb +Libanas lb +LibÄna lb +Либан lb +Либанон lb +Lubnan lb +Libanu lb +Libanon lb +Libanon lb +Libanon lb +Libanon lb +ਲਿਬਨਾਨ lb +Liban lb +Líbano lb +Líbano lb +Liban lb +Ливан lb +Libani lb +Libanon lb +Libanon lb +Libanon lb +Либан lb +Liban lb +I-Lebanon lb +Libanon lb +லெபனான௠lb +Лубнон lb +เลบานอน lb +Ліван lb +Лебанон lb +Li Băng lb +Liban lb +黎巴嫩 lb +黎巴嫩 lb +St. Lucia lc +سانت لوسيا lc +СÑнт-ЛюÑÑ–Ñ lc +Св. Ð›ÑƒÑ‡Ð¸Ñ lc +সেনà§à¦Ÿ লà§à¦¸à¦¿à§Ÿà¦¾ lc +S. Lucia lc +Svatá Lucie lc +St. Lwsia lc +Σάντα Λουτσία lc +Sent-Lucio lc +Santa Lucía lc +سن لوسیا lc +Sankta Lusia lc +Sainte Lucie lc +San Lúisia lc +Santa Lucia lc +סנטה לוסיה lc +सेंट लूसिया lc +Sankti Lúsía lc +Santa Lucia lc +セントルシア lc +សង់លូស៊ីយ៉ា lc +세ì¸íЏ 루시아 lc +ເຊັນລູເຊີຠlc +Å v Liucija lc +Sv. LÅ«cija lc +Св. Луција lc +St. ЛуÑиа lc +St. LuÄ‹ija lc +ਸੇਂਟ ਲੂਉਸ lc +Santa Lúcia lc +Santa Lúcia lc +Sf. Lucia lc +Сент-ЛюÑÐ¸Ñ lc +Mutagatifu Lusiya lc +Sv. Júlia lc +Sv. Lucija lc +Св. Луција lc +Sv. Lucija lc +I-St. Lucia lc +செனà¯à®Ÿà¯ லூசியா lc +Синт ЛуÑиё lc +เซนต์ลูเซีย lc +Santa Lüçiä lc +Сент-ЛюÑÑ–Ñ lc +Сент-ЛюÑÐ¸Ñ lc +Ste Luceye lc +圣å¢è¥¿äºš lc +è–露西亞 lc +Liechtenstein li +ليشتنشتاين li +ЛіхтÑнштÑйн li +Лихтенщайн li +লিখটেনসà§à¦Ÿà¦¾à¦‡à¦¨ li +LihtenÅ¡tajn li +LichtenÅ¡tejnsko li +Λίχτενσταϊν li +LiÄ¥tenÅtejno li +Liechtestein li +لیختن اشتاین li +An Lichtinstéin li +ליכטנשטין li +लिचटेनसà¥à¤Ÿà¥€à¤¨ li +LihtenÅ¡tajn li +リヒテンシュタイン li +លិចទáŸáž“ស្ážáŸ‚áž“ li +리히í…ìŠˆíƒ€ì¸ li +ຟ້າà»àº¡àºš li +LichtenÅ¡teinas li +LihtenÅ¡teina li +Лихтенштајн li +ЛихтÑнштайн li +Liechtensteen li +ਲੀਚਟੀਨਸਟੀਨ li +Lichtensztajn li +Лихтенштейн li +Liyeshitensiteyini li +Лихтенштајн li +LihtenÅ¡tajn li +லசà¯à®šà¯†à®©à¯à®¸à¯à®Ÿà¯†à®©à¯ li +Лихтанштоин li +ลิชเทนสไตน์ li +LihtenÅŸtayn li +Lihtenstein li +Ліхтенштейн li +Лихтенштейн li +Lîchtensteyn li +列支敦士登 li +列支敦斯登 li +Sri Lanka lk +سريلانكا lk +Шры-Ланка lk +Шри Ланка lk +শà§à¦°à§€à¦²à¦™à§à¦•া lk +Å ri Lanka lk +Srí Lanka lk +Sri Lanca lk +ΣÏι Λάνκα lk +Sri-Lanko lk +سریلانکا lk +Srí Lanca lk +סרי לנקה lk +शà¥à¤°à¥€ लंका lk +Å ri Lanka lk +Srí Lanka lk +スリランカ lk +ស្រីលង្កា lk +스리랑카 lk +ເຊີເບີຠlk +Å ri Lanka lk +Å rilanka lk +Шри Ланка lk +Шириланк lk +ਸà©à¨°à©€à¨²à©°à¨•ਾ lk +Шри-Ланка lk +Siri Lanka lk +Å ri Lanka lk +Шри Ланка lk +Å ri Lanka lk +இலஙà¯à®•ை lk +Сри Лонко lk +ศรีลังà¸à¸² lk +Åžri Lanka lk +Шрі-Ланка lk +Шри Ланка lk +æ–¯é‡Œå…°å¡ lk +æ–¯é‡Œè˜­å¡ lk +Liberia lr +Liberië lr +ليبيريا lr +ЛібÑÑ€Ñ‹Ñ lr +Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr +লাইবেরিয়া lr +Liberija lr +Libèria lr +Libérie lr +ΛιβεÏία lr +Liberio lr +Libeeria lr +لیبریا lr +Libéria lr +An Libéir lr +Libéria lr +לוב lr +लाइबेरिया lr +Liberija lr +Libéria lr +Líbería lr +リベリア lr +លីបáŸážšáž¸áž™áŸ‰áž¶ lr +ë¼ì´ë² ë¦¬ì•„ lr +ລິຊາ lr +LibÄ“rija lr +Либерија lr +Либери lr +Liberja lr +ਲੀਬਿਰੀਆ lr +Libéria lr +Libéria lr +Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr +Liberiya lr +Lýbia lr +Liberija lr +Либерија lr +Liberija lr +லிபிரியா lr +Либериё lr +ไลบีเรีย lr +Liberya lr +Ð›Ñ–Ð±ÐµÑ€Ñ–Ñ lr +Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr +利比里亚 lr +賴比瑞亞 lr +Lesotho ls +ليسوتو ls +ЛеÑота ls +ЛеÑото ls +লেসোথো ls +Lesoto ls +Lesoto ls +Λεσόθο ls +Lesoto ls +Lesoto ls +لسوتو ls +Leosóta ls +Lesoto ls +לסוטו ls +लेसोथो ls +Lesótó ls +レソト ls +áž¡áŸážŸáž¼ážáž¼ ls +레소토 ls +ທົດສອບ ls +Lesoto ls +ЛеÑото ls +ЛиÑото ls +Leżoto ls +ਲਿਉਥੂ ls +Lesoto ls +Lesoto ls +Lesoto ls +ЛеÑото ls +Lesoto ls +Lesoto ls +ЛеÑото ls +Lesoto ls +லஸொதோ ls +ЛиÑуту ls +เลโซโต ls +Lesoto ls +Lesoto ls +ЛеÑото ls +ЛеÑото ls +Lessoto ls +莱索托 ls +賴索扥 ls +Lithuania lt +Lithuanië lt +ليتوانيا lt +Litvaniya lt +Літва lt +Литва lt +লিথà§à§Ÿà§‡à¦¨à¦¿à§Ÿà¦¾ lt +Lituani lt +Litvanija lt +Lituània lt +Litva lt +Lithwania lt +Litauen lt +Litauen lt +Λιθουανία lt +Litovio lt +Lituania lt +Leedu lt +Lituania lt +لیتوانی lt +Liettua lt +Lituanie lt +Litouwen lt +An Liotuáin lt +Lituánia lt +×œ×™×˜× lt +लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾ lt +Litva lt +Litvánia lt +Litháen lt +Lituania lt +リトアニア lt +លីទុយអានី lt +리투아니아 lt +ລິທົ່ວເນີຠlt +Lietuva lt +Lietuva lt +Литванија lt +Литва lt +Litwanja lt +Litauen lt +Litauen lt +Litouwen lt +Litauen lt +ਲੀਥੂਨੀਆ lt +Litwa lt +Lituânia lt +Lituânia lt +Lituania lt +Литва lt +Litwaniya lt +Lietuva lt +Litva lt +Litva lt +Литванија lt +Litvanija lt +I-Lithuania lt +Litauen lt +லிதà¯à®¤à¯à®µà¯‡à®©à®¿à®¯à®¾ lt +Литвониё lt +ลิธัวเนีย lt +Litvanya lt +Lituania lt +Литва lt +Литва lt +Litwaneye lt +ç«‹é™¶å®› lt +ç«‹é™¶å®› lt +Luxembourg lu +Luxenburg lu +لوكسمبورغ lu +Lüksemburq lu +ЛюкÑÑмбург lu +ЛюкÑембург lu +লাকà§à¦¸à§‡à¦®à¦¬à§à¦°à§à¦— lu +Luksembourg lu +Luksemburg lu +Luxemburg lu +Lucembursko lu +Lwcsembwrg lu +Luxemburg lu +ΛουξεμβοÏÏγο lu +Luksemburgo lu +Luxemburgo lu +Luksemburg lu +Luxenburgo lu +لوگزامبورگ lu +Luxemburg lu +Luksemborg lu +Luxemburg lu +Lucsamburg lu +Luxemburgo lu +לוקסמבורג lu +लकà¥à¤¸à¤®à¤¬à¤°à¥à¤— lu +Luksemburg lu +Luxemburg lu +Lúxemborg lu +Lussemburgo lu +ルクセンブルグ lu +លុចហ្សំបួរ lu +ë£©ì…ˆë¶€ë¥´í¬ lu +ລັàºà»àºŠàº¡à»€àºšàºµàº lu +Liuksemburgas lu +Luksemburga lu +ЛукÑембург lu +ЛюкÑембүрг lu +Lussemburgu lu +Luxemborg lu +Luxemburg lu +ਲਕਸ਼ਮਬਰਗ lu +Luksemburg lu +Luxemburgo lu +Luxemburgo lu +Luxemburg lu +ЛюкÑембург lu +Lugizamburu lu +Luxemburg lu +Luxemburg lu +Luksemburg lu +ЛукÑембург lu +Luksemburg lu +I-Luxembourg lu +Luxemburg lu +லகà¯à®šà®®à¯à®ªà¯‹à®°à¯à®•௠lu +Лукзамбург lu +ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸­à¸£à¹Œà¸ lu +Lüksemburg lu +Lüksemburg lu +ЛюкÑембург lu +ЛюкÑембург lu +Lussimbork lu +墿£®å ¡ lu +盧森堡 lu +Latvia lv +لاتÙيا lv +Latviya lv +Ð›Ð°Ñ‚Ð²Ñ–Ñ lv +Ð›Ð°Ñ‚Ð²Ð¸Ñ lv +লাতভিয়া lv +Latvija lv +Letònia lv +LotyÅ¡sko lv +Latfia lv +Letland lv +Lettland lv +Λεττονία lv +Latvio lv +Letonia lv +Läti lv +لاتویا lv +Lettonie lv +Letland lv +An Laitvia lv +Letónia lv +לטביה lv +लाटविया lv +Latvija lv +Lettország lv +Lettland lv +Lettonia lv +ラトビア lv +ឡាážážœáž¸áž™áŸ‰áž¶ lv +ë¼íŠ¸ë¹„ì•„ lv +ລັດເວີຠlv +Latvija lv +Latvija lv +Латвија lv +Латви lv +Latvja lv +Lettland lv +Letland lv +ਲਾਟਵੀਆ lv +Åotwa lv +Letónia lv +Ð›Ð°Ñ‚Ð²Ð¸Ñ lv +Lativiya lv +Látvia lv +LotyÅ¡sko lv +Latvija lv +Латвија lv +Latvija lv +I-Latvia lv +Lettland lv +லடà¯à®µà®¿à®¯à®¾ lv +Латвонӣ lv +ลัธเวีย lv +Litvanya lv +Ð›Ð°Ñ‚Ð²Ñ–Ñ lv +Ð›Ð°Ñ‚Ð²Ð¸Ñ lv +Lativia lv +Letoneye lv +拉脱维亚 lv +拉脫維亞 lv +Libya ly +Libië ly +ليبيا ly +Ð›Ñ–Ð²Ñ–Ñ ly +Ð›Ð¸Ð±Ð¸Ñ ly +লিবিয়া ly +Julia ly +Libija ly +Líbia ly +Lýbie ly +Libia ly +Libyen ly +Libyen ly +ΛιβÏη ly +Libio ly +Libia ly +Liibüa ly +Libia ly +لیبی ly +Lybie ly +Libië ly +An Libia ly +Líbia ly +לוב ly +लीबिया ly +Libija ly +Líbia ly +Líbía ly +Libia ly +リビア ly +លីប៊ី ly +리비아 ly +ລິຊາ ly +Libija ly +LÄ«bija ly +Либија ly +Ð›Ð¸Ð±Ñ ly +Libja ly +Libyen ly +Libië ly +ਲੀਬੀਆ ly +Libia ly +Líbia ly +Líbia ly +Libia ly +Ð›Ð¸Ð²Ð¸Ñ ly +Libiya ly +Lýbia ly +Libija ly +Либија ly +Libija ly +I-Libya ly +Libyen ly +லிபியா ly +Ð›Ð¸Ð±Ð¸Ñ ly +ลิเบีย ly +Libia ly +Ð›Ñ–Ð²Ñ–Ñ ly +Ð›Ð¸Ð±Ð¸Ñ ly +Libeye ly +利比亚 ly +利比亞 ly +Morocco ma +Morokko ma +المغرب ma +Марока ma +Мароко ma +মরকà§à¦•à§‹ ma +Marok ma +Maroko ma +Marroc ma +Maroko ma +Moroco ma +Marokko ma +Marokko ma +ΜαÏόκο ma +Maroko ma +Marruecos ma +Maroko ma +Maroko ma +مراکش ma +Marokko ma +Marokko ma +Maroc ma +Marokko ma +Maracó ma +Marrocos ma +מרוקו ma +मोरकà¥à¤•ो ma +Maroko ma +Marokkó ma +Marokkó ma +Marocco ma +モロッコ ma +ម៉ារ៉ុក ma +모로코 ma +ເມົາລິ ma +Marokas ma +Maroka ma +Мароко ma +Морокко ma +Marokk ma +Marokko ma +Marokko ma +Marokko ma +Marokko ma +ਮੋਰਕੋ ma +Maroko ma +Marrocos ma +Marrocos ma +Maroc ma +Марокко ma +Maroke ma +Marokko ma +Maroko ma +Maroko ma +Мароко ma +Maroko ma +I-Morocco ma +Marocko ma +மோராகோ ma +Марокко ma +โมร็อคโค ma +Morokko ma +Марокко ma +Марокаш ma +Ma rốc ma +Marok ma +摩洛哥 ma +摩洛哥 ma +Monaco mc +Monako mc +موناكو mc +Манака mc +Монако mc +মোনাকো mc +Monako mc +Monako mc +Mònaco mc +Monako mc +Μονακό mc +Monako mc +Mónaco mc +موناکو mc +Monacó mc +Mónaco mc +מונקו mc +मोनेको mc +Monako mc +Mónakó mc +モナコ mc +ម៉ូណាកូ mc +모나코 mc +ເມົາລິ mc +Monakas mc +Monako mc +Монако mc +Монако mc +Monako mc +ਮੋਨਕੋ mc +Monako mc +Mónaco mc +Mônaco mc +Монако mc +Monako mc +Monako mc +Monako mc +Монако mc +Monako mc +மனாகோ mc +Монако mc +โมนาโค mc +Monako mc +Manako mc +Монако mc +Монако mc +摩纳哥 mc +æ‘©ç´å“¥ mc +Moldova md +Ù…ÙˆÙ„Ø¯ÙˆÙØ§ md +Малдова md +ÐœÐ¾Ð»Ð´Ð°Ð²Ð¸Ñ md +মলডোভা md +Moldavi md +Moldàvia md +Moldávie md +Moldofa md +Moldawien md +Μολδαβία md +Moldavujo md +Moldavia md +Moldavia md +مولداوی md +Moldavie md +An Mholdóiv md +Moldávia md +מולדובה md +मॉलà¥à¤¦à¥‹à¤µà¤¾ md +Moldóva md +Moldavia md +モルドムmd +ម៉ុលដូវ៉ា md +몰ë„ë°” md +ສະໂລວັຠmd +MoldÄvija md +Молдавија md +Молдав md +Moldavja md +Moldawien md +Moldavië md +ਮੋਡੋਵਾ md +MoÅ‚dawia md +Moldávia md +Молдова md +Molidova md +Moldávsko md +Молдавија md +Moldavija md +Moldavien md +மாலà¯à®Ÿà¯‹à®µà®¾ md +Молдавӣ md +มอลโดวา md +Молдова md +Молдова md +摩尔多瓦 md +摩爾多瓦 md +Madagascar mg +Madagaskar mg +مدغشقر mg +МадагаÑкар mg +МадагаÑкар mg +মাদাগাসà§à¦•ার mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +ΜαδαγασκάÏη mg +Madagaskaro mg +Madagaskar mg +ماداگاسکار mg +Madagaskar mg +מדגסקר mg +मेडागासà¥à¤•र mg +Madagaskar mg +Madagaszkár mg +Madagaskar mg +マダガスカル mg +ម៉ាដាហ្កាស្ការ mg +마다카스카르 mg +ຄາສະບາລ - K mg +Madagaskaras mg +Madagaskara mg +МадаÑкар mg +МадагаÑкар mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +ਮੈਡਾਗਾਸਕਰ mg +Madagaskar mg +Madagáscar mg +МадагаÑкар mg +Madagasikari mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +МадагаÑкар mg +Madagaskar mg +Madagaskar mg +மடகஸà¯à®•ார௠mg +МадогоÑкор mg +มาดาà¸à¸±à¸ªà¸à¸² mg +Madagaskar mg +Madagaskar mg +МадагаÑкар mg +МадагаÑкар mg +马达加斯加 mg +馬é”加斯加 mg +Marshall Islands mh +Marshall EIlande mh +جزر مارشال mh +Маршалавы аÑтравы mh +МаршалÑки оÑтрови mh +মারশাল দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ mh +Inizi Marshall mh +MarÅ¡alova ostrva mh +Illes Marshall mh +Marshallovy ostrovy mh +Ynysoedd Marshall mh +Marshall-øerne mh +Marshall-Inseln mh +Îησιά ΜάÏσαλ mh +MarÅaloj mh +Islas Marshall mh +Marshalli saared mh +Marshall Irlak mh +جزایر مارشال mh +Marshallinsaaret mh +ÃŽles Marshall mh +Marshall Eilânen mh +Oileáin Mharshall mh +Illas Marshall mh +××™×™ מרשל mh +मारà¥à¤¶à¤² आइलैंड mh +Marshall Otoci mh +Marshall-szigetek mh +Marshall-eyjar mh +Isole Marshall mh +米自由連åˆãƒžãƒ¼ã‚·ãƒ£ãƒ«è«¸å³¶ mh +កោះ Marshall mh +마샬 ì œë„ mh +ລາດສະອານາຈັàºà»„ທຠmh +Marshalo salos mh +MÄrÅ¡alu salas mh +Маршалови ОÑтрови mh +Маршаллын арлууд mh +Gżejjer Marshall mh +Marshalløyene mh +Marshallinseln mh +Marshall Eilanden mh +Marshalløyane mh +ਮਾਰਸ਼ਲ ਟਾਪੂ mh +Wyspy Marshalla mh +Ilhas Marshall mh +Ilhas Marshall mh +Insulele Marshall mh +Маршалловы оÑтрова mh +Ibirwa bya Marishali mh +Marshallsullot mh +Maršálove ostrovy mh +Marshallovi otoki mh +Маршалова оÑтрва mh +MarÅ¡alova ostrva mh +Marshallöarna mh +மாரà¯à®·à®²à¯ தீவà¯à®•ள௠mh +Ҷазираи Маршал mh +หมู่เà¸à¸²à¸°à¸¡à¸²à¹à¸Šà¸¥ mh +MarÅŸal Adaları mh +MarÅŸal Utrawları mh +МаршальÑькі оÑтрови mh +Маршалл Ороллари mh +Iyes Marshall mh +马ç»ç¾¤å²› mh +馬紹爾群島 mh +Macedonia mk +Makedoniese mk +مقدونيا mk +Makedonya mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk +মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ mk +Makedonia mk +Makedonija mk +Macedònia mk +Makedonie mk +Makedonien mk +Makedonien mk +Σλαβομακεδονία mk +Makedonujo mk +Makedoonia mk +Mazedonia mk +مقدونیه mk +Makedonia mk +Macédoine mk +Macedonië mk +An Mhacadóin (IPIM) mk +Macedónia mk +מקדוניה mk +मकदूनिया mk +Makedonija mk +Macedónia mk +Masedonia mk +Makedónía mk +マケドニア mk +ម៉ាសáŸážŠáž“ mk +마케ë„니아 mk +ມາເຊໂດເນີຠmk +Makedonija mk +MaÄ·edonija mk +Македонија mk +Макидон mk +MaÄ‹edonja mk +Makedonia mk +Makedonien mk +Macedonië mk +Makedonia mk +Macedònian mk +ਮੈਕਡੋਨੀਆ mk +Macedónia mk +Macedônia mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk +Masedoniya mk +Makedonia mk +Macedónsky mk +Makedonija mk +Македонија mk +Makedonija mk +I-Macedonia mk +Makedonien mk +மாசிடோ னியா mk +Мақдуниё mk +มาเซโดเนีย mk +Makedonya mk +Makedonia mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk +Masedonia mk +Macedoneye mk +马其顿 mk +馬其頓 mk +Mali ml +مالي ml +Малі ml +Мали ml +মালি ml +Μαλί ml +Malio ml +مالی ml +Mailí ml +מ×לי ml +माली ml +Malí ml +マリ ml +ម៉ាលី ml +ë§ë¦¬ ml +ຈົດຫມາຠml +Мали ml +Мали ml +ਮਾਲੀ ml +Мали ml +Мали ml +மாலி ml +Молӣ ml +มาลี ml +Малі ml +Мали ml +马里 ml +馬利 ml +Myanmar mm +ميانمار mm +М'Ñнма mm +Мианмар mm +মিয়ানমার mm +Mjanmar mm +Mianmar mm +Burma mm +Burma (Myanmar) mm +ÎœÎ¹Î±Î½Î¼Î¬Ï mm +Mjanmao mm +Birmania mm +میانمار mm +Maenmar mm +מינמר mm +मà¥à¤¯à¤¨à¤®à¤¾à¤° mm +Mianmar mm +Mjanmar mm +ミャンマー mm +មីយ៉ាន់ម៉ា mm +미얀마 mm +ຕົວຮງàºàºžàºµàº·à»‰àº™àº—ີ່ທຳງານ - K mm +Mjanma mm +Мијанмар mm +МÑнмар mm +Mjanmar mm +Myanmar (Birma) mm +ਮਿਆਂਮਾਰ mm +Mianmar mm +МьÑнма (Бирма) mm +Mjanmar mm +Мијанмар mm +Mijanmar mm +மயனà¯à®®à®¾à®°à¯ mm +Миёнмор mm +เมียนมาร์ mm +Mianmar mm +М'Ñнма mm +МÑнмар mm +Miến Äiện mm +Birmaneye mm +缅甸 mm +緬甸 mm +Mongolia mn +Mongolië mn +منغوليا mn +ÐœÐ°Ð½Ð³Ð¾Ð»Ñ–Ñ mn +ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn +মোঙà§à¦—োলিয়া mn +Mongoli mn +Mongolija mn +Mongòlia mn +Mongolsko mn +Mongoliet mn +Mongolei mn +Μογγολία mn +Mongolio mn +Mongoolia mn +مغولستان mn +Mongolie mn +Mongolië mn +An Mhongóil mn +Mongólia mn +מונגוליה mn +मंगोलिया mn +Mongolija mn +Mongólia mn +Mongólía mn +モンゴル mn +ម៉ុងហ្គោលី mn +몽골 mn +ລອàºàº­àº´àº™ mn +Mongolija mn +Mongolija mn +Монголија mn +МОÐГОЛ mn +Mongolja mn +Mongolei mn +Mongolië mn +ਮੰਗੋਲੀਆ mn +Mongólia mn +Mongólia mn +ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn +Mongoliya mn +Mongolsko mn +Mongolija mn +Монголија mn +Mongolija mn +Mongoliet mn +மாஙà¯à®•ோலியா mn +МуғулиÑтон mn +มองโà¸à¹€à¸¥à¸µà¸¢ mn +MoÄŸolistan mn +MoÄŸolstan mn +ÐœÐ¾Ð½Ð³Ð¾Ð»Ñ–Ñ mn +МуғилиÑтон mn +Mông cổ mn +Mongoleye mn +è’™å¤ mn +è’™å¤ mn +Macau SAR(China) mo +Macau SAR (China) mo +Макао (Китай) mo +মাকাউ SAR(চীন) mo +Makav SAR(Sina) mo +Macau SAR(Xina) mo +Macau SAR (Čína) mo +Macau SAR(Kina) mo +Macao SAR (China) mo +Μακάο SAR (Κίνα) mo +Macau mo +Macau SAR(Txina) mo +Makao SAR(Kiina) mo +Macao SAR (Chine) mo +Macao SAR(An tSín) mo +מק×ו SAR (סין) mo +Makaó (Kína) mo +Makaó (sjálfstjórnarhérað í Kína) mo +Macau SAR(Cina) mo +マカオ(中国) mo +ម៉ាកាវ (áž…áž·áž“) mo +Macau SAR(Kinija) mo +Макао СÐР(Кина) mo +Macao SAR (Kina) mo +Macao mo +Macao SAR (Kina) mo +ਮੈਕਿਉ SAR(ਚੀਨ) mo +Makao SAR (Chiny) mo +Macau (China) mo +Macao SAR(China) mo +Макао mo +Makawu SAR (Ubushinwa) mo +Macau SAR (Kiinná) mo +Macau SAR (Kitajska) mo +SAR Macau (Кина) mo +SAR Macau (Kina) mo +Macao (Kina) mo +Macau SAR(சீனா) mo +มาเà¸à¹Šà¸² mo +Makau (Çin) mo +Macau SAR(Китай) mo +Макау (Хитой) mo +中国澳门特别行政区 mo +澳門 SAR(中國) mo +Martinique mq +مارتينيك mq +Мартыніка mq +Мартиника mq +মারà§à¦Ÿà¦¿à¦¨à¦¿à¦•à§ mq +Martinik mq +Martinik mq +Martinica mq +Martinik mq +Martin?c mq +ΜαÏτινίκα mq +Martiniko mq +Martinica mq +Martinika mq +مارتینیک mq +Martainíc mq +Martinica mq +מרטיניק mq +मारà¥à¤Ÿà¥€à¤¨à¥€à¤• mq +Martiník mq +Martinica mq +フランス海外県マルãƒãƒ‹ãƒ¼ã‚¯ mq +ម៉ារទីនីគ mq +ë§ˆë¥´í‹°ë‹ˆí¬ mq +ເມົາລິ mq +Martinika mq +Martinika mq +Мартиник mq +Мартиники mq +Martinik mq +ਮਾਰਟੀਨਿਕਿਉ mq +Martynika mq +Martinica mq +Martinica mq +Martinica mq +Мартиника mq +Maritinike mq +Martinik mq +Мартиник mq +Martinik mq +மாரà¯à®¤à®¿à®©à®¿à®•à¯à®¯à¯ mq +Мартиник mq +มาทินิค mq +Martinik mq +Martinik mq +Мартініка mq +Мартиника mq +Martinike mq +马æå°¼å…‹ mq +馬æå°¼å…‹ mq +Mauritania mr +Mauritanië mr +موريتانيا mr +ÐœÐ°ÑžÑ€Ñ‹Ñ‚Ð°Ð½Ñ–Ñ mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr +মরিটানিয়া mr +Maouritani mr +Mauritanija mr +Mauritània mr +Mauretánie mr +Mawritania mr +Mauretanien mr +Mauretanien mr +ΜαυÏιτανία mr +MaÅ­ritanujo mr +Mauritaania mr +موراتانی mr +Mauritanie mr +Mauritanië mr +An Mháratáin mr +Mauritánia mr +מ×וריטניה mr +मारीतानिया mr +Mauritanija mr +Mauritánia mr +Máritanía mr +モーリタニア mr +ម៉ូរីážáž¶áž“ី mr +모리타니 mr +ລິທົວເນີຠmr +Mauritanija mr +MauritÄnija mr +Мавританија mr +Мауритани mr +Mawritanja mr +Mauretanien mr +Mauritanië mr +ਮਾਉਰੀਟਨਿਆ mr +Mauretania mr +Mauritânia mr +Mauritânia mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr +Moritaniya mr +Mavretanija mr +Мауританија mr +Mauritanija mr +Mauretanien mr +மௌரிடானியா mr +Мавритонӣ mr +มอริทาเนีย mr +Mauritanya mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr +Moritanreye mr +毛里塔尼亚 mr +茅利塔尼亞 mr +Montserrat ms +مونتسيرات ms +МонÑерат ms +মনà§à¦Ÿà¦¸à§‡à¦°à¦¾à¦Ÿ ms +Monsera ms +ΜοντσεÏάτ ms +Moncerato ms +مون‌سرات ms +Montsarat ms +מונטסרט ms +मॉटसेरट ms +Monserrat ms +英領モントセラト ms +ម៉ុងសáŸážšáŸ‰áž¶ ms +몬트세ë¼íЏ ms +ຈà»àºžàº²àºš ms +Monserata ms +МонÑерат ms +МонтÑеррат ms +ਮੋਨਟਸੀਰਾਟ ms +МонтÑеррат ms +Monserati ms +МонÑерат ms +Monserat ms +மானà¯à®Ÿà¯à®šà¯†à®°à¯à®°à®Ÿà¯ ms +МунтеÑирот ms +มอนต์เซอร์รัท ms +МонтÑеррат ms +Монцеррат ms +蒙特塞拉特 ms +蒙的塞拉特 ms +Malta mt +مالطة mt +Мальта mt +Малта mt +মলটা mt +Malt mt +Μάλτα mt +Malto mt +مالت mt +Malte mt +Málta mt +מלטה mt +मालà¥à¤Ÿà¤¾ mt +Málta mt +マルタ mt +ម៉ាល់ážáž¶ mt +몰타 mt +ມອລຕາ mt +Малта mt +Малта mt +ਮਾਲਟਾ mt +Мальта mt +Malita mt +Малта mt +I-Malta mt +மாலà¯à®Ÿà®¾ mt +Молет mt +มอลตา mt +Мальта mt +Малта mt +Male mt +马耳他 mt +馬爾他 mt +Mauritius mu +موريشيوس mu +Маўрыцы mu +ОÑтров Мавриций mu +মরিশাস mu +Mauris mu +Mauricijus mu +Maurici mu +Mauricius mu +Mawrisiws mu +ΜαυÏίκιος mu +MaÅ­ricio mu +Mauricio mu +Maurizio mu +موریتیس mu +ÃŽle Maurice mu +Oileán Mhuirís mu +Maurício mu +מ×וריציוס mu +मॉरीशस mu +Mauricijus mu +Máritíus mu +モーリシャス mu +ម៉ូរីទុស mu +모리셔스 mu +ພາທິຊັ້ນ mu +MaurÄ«cija mu +ÐœÐ°Ð²Ñ€Ð¸Ñ†Ð¸ÑƒÑ mu +ÐœÐ°Ð²Ñ€Ð¸Ñ‚ÑƒÑ mu +Mawriju mu +ਮਾਉਰੀਟਿਸ mu +Mauritânia mu +Ilhas Maurício mu +MauriÅ£ius mu +Маврикий mu +Ibirwa bya Morise mu +Maurícius mu +Mavricij mu +ÐœÐ°ÑƒÑ€Ð¸Ñ†Ð¸Ñ˜ÑƒÑ mu +Mauricijus mu +மௌரிடியஸ௠mu +Мавритӣ mu +มอริเชียส mu +Mauritus mu +Маврікій mu +Маврикий mu +Iye Môrice mu +毛里求斯 mu +毛里求斯 mu +Maldives mv +جزر المالدي٠mv +Мальдывы mv +МалдивÑки оÑтрови mv +মালদà§à¦¬à§€à¦ª mv +Inizi Maldiv mv +Maldivi mv +Maledivy mv +Ynysoedd y Mald?f mv +Maldiverne mv +Malediven mv +Μαλδίβες mv +Maldivoj mv +Maldivas mv +Maldiivid mv +Maldibak mv +مالدیو mv +Malediivit mv +Malediven mv +Na Maildiví mv +Maldivas mv +מולדבה mv +मालदीव mv +Maldivi mv +Maldív-szigetek mv +Maldíveyjar mv +Maldive mv +モルジブ mv +ម៉ាល់ឌីវ mv +몰디브 mv +ມັລດິສ mv +Maldyvai mv +Maldivu salas mv +Малдиви mv +Малдив mv +Maldivene mv +Malediven mv +Malediven mv +Maldivane mv +ਮਾਲਦੀਵ mv +Malediwy mv +Maldivas mv +Maldivas mv +Maldive mv +МальдивÑкие оÑтрова mv +Malidive mv +Maldiivat mv +Maldiv mv +Малдиви mv +Maldivi mv +Maldiverna mv +மாலà¯à®¤à¯€à®µà¯à®•ள௠mv +Молдивӣ mv +มัลดิฟ mv +Maldivler mv +Maldivlar mv +Мальдіви mv +Малдив Ороллари mv +马尔代夫 mv +馬爾地夫 mv +Malawi mw +مالاوي mw +Малаві mw +Малави mw +মালাওয়ি mw +Malavi mw +Μαλάουι mw +Malavio mw +مالاوی mw +An Mhaláiv mw +Malavi mw +מל×ווי mw +मलावी mw +Malavi mw +Malaví mw +マラウイ mw +ម៉ាឡាវី mw +ë§ë¼ìœ„ mw +ມອລຕາ mw +Malavi mw +Малави mw +Малави mw +ਮਾਲਾਵੀ mw +Малави mw +Малави mw +Malavi mw +மலவி mw +Моловӣ mw +มาลาวี mw +Malavi mw +Малаві mw +Малави mw +马拉维 mw +é¦¬æ‹‰å¨ mw +Mexico mx +Meksiko mx +المكسيك mx +Meksika mx +МÑкÑыка mx +МекÑико mx +মেকà§à¦¸à¦¿à¦•à§‹ mx +Mec'hiko mx +Meksiko mx +Mèxic mx +Mexiko mx +Mecsico mx +Mexiko mx +Μεξικό mx +Meksiko mx +México mx +Mehhiko mx +Mexiko mx +مکزیک mx +Meksiko mx +Meksiko mx +Mexique mx +Meicsiceo mx +México mx +מקסיקו mx +मेकà¥à¤¸à¤¿à¤•ो mx +Meksiko mx +Mexikó mx +Meksiko mx +Mexíkó mx +Messico mx +メキシコ mx +ម៉ិចស៊ិក mx +멕시코 mx +ເມັàºàºŠàºµà»‚ຠmx +Meksika mx +Meksika mx +МекÑико mx +МекÑико mx +Messiku mx +Mexiko mx +Mèxic mx +ਮੈਕਸਿਕੋ mx +Meksyk mx +México mx +México mx +Mexic mx +МекÑика mx +Megizike mx +Mexiko mx +Mehika mx +МекÑико mx +Meksiko mx +I-Mexico mx +மெகà¯à®šà®¿à®•ோ mx +МекÑико mx +เม็à¸à¸‹à¸´à¹‚ภmx +Meksika mx +Meksiko mx +МекÑика mx +МекÑика mx +Mê hi cô mx +Mecsike mx +墨西哥 mx +墨西哥 mx +Malaysia my +Malysië my +ماليزيا my +ÐœÐ°Ð»Ð°Ð¹Ð·Ñ‹Ñ my +ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my +মালয়েশিয়া my +Malezia my +Malezija my +Malàsia my +Malajsie my +Maleisia my +Μαλαισία my +Malajzio my +Malasia my +Malaisia my +Malasia my +مالزی my +Malesia my +Malaisie my +Maleisië my +An Mhalaeisia my +Malásia my +מלזיה my +मलेशिया my +Malezija my +Malajzia my +Malasía my +マレーシア my +ម៉ាឡáŸážŸáŸŠáž¸ my +ë§ë ˆì´ì‹œì•„ my +ມອລຕາ my +Malaizija my +Malaizija my +Малезија my +Малайз my +Malażja my +Maleisië my +ਮਲੇਸ਼ੀਆ my +Malezja my +Malásia my +Malásia my +Malaezia my +ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my +Maleziya my +Malajzia my +Malezija my +Малезија my +Malezija my +மலேசியா my +Малайзӣ my +มาเลเซีย my +Malezya my +ÐœÐ°Ð»Ð°Ð¹Ð·Ñ–Ñ my +ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my +Malaizeye my +马æ¥è¥¿äºš my +馬來西亞 my +Mozambique mz +Mosambiek mz +موزمبيق mz +Мазамбік mz +Мозамбик mz +মোজামবিক mz +Mozambik mz +Mozambik mz +Moçambic mz +Mozambik mz +Mosamb?c mz +Μοζαμβίκη mz +Mozambiko mz +Mosambiik mz +Mozanbike mz +موزامبیک mz +Mosambik mz +Mósaimbíc mz +מוזמביק mz +मोज़ामà¥à¤¬à¥€à¤• mz +Mozambik mz +Mozambik mz +Mósambík mz +Mozambico mz +モザンビーク mz +ម៉ូហ្សាំប៊ិក mz +ëª¨ìž ë¹„í¬ mz +ຫນ່ວàºàº„ວາມຈຳ mz +Mozambikas mz +Mozambika mz +Мозамбик mz +Мозамбайк mz +Możambik mz +Mosambik mz +Mosambik mz +Mosambik mz +ਮੋਜ਼ਾਨਬਿਕਿਉ mz +Mozambik mz +Moçambique mz +Moçambique mz +Mozambic mz +Мозамбик mz +Mosambik mz +Mozambik mz +Mozambik mz +Мозамбик mz +Mozambik mz +Moçambique mz +மோசாமà¯à®ªà®¿à®•௠mz +Мозамбик mz +โมà¹à¸‹à¸¡à¸šà¸´à¸ mz +Mozambik mz +Mozambik mz +Мозамбік mz +Мозамбик mz +Mozambike mz +莫桑比克 mz +莫三比克 mz +Namibia na +Namibië na +ناميبيا na +ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na +ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na +নামিবিয়া na +Namibi na +Namibija na +Namíbia na +Namíbie na +Îαμίμπια na +Namibio na +Namiibia na +نامیبیا na +Namibie na +Namibië na +An Namaib na +Namíbia na +נמיביה na +नामीबिया na +Namibija na +Namíbia na +Namibía na +ナミビア na +ណាមីប៊ី na +나미비아 na +ຈາໄມàºàº² na +Namibija na +NamÄ«bija na +Ðамибија na +Ðамиби na +Namibja na +Namibië na +ਨਾਮੀਬੀਆ na +Namíbia na +Namíbia na +ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na +Namibiya na +Namíbia na +Namibija na +Ðамибија na +Namibija na +நாமிபியா na +Ðамибиё na +นามิเบีย na +Namibya na +ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na +ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na +Namibeye na +纳米比亚 na +那米比亞 na +New Caledonia nc +Nuwe Caledonië nc +كاليدونيا الجديدة nc +ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc +Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc +নিউ কà§à¦¯à¦¾à¦²à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ nc +Kaledoni-nevez nc +Nova Kaledonija nc +Nova Caledònia nc +Nová Kaledonie nc +Caledonia Newydd nc +Ny Caledonien nc +Neukaledonien nc +Îέα Καληδονία nc +Nov-Kaledonio nc +Nueva Caledonia nc +Uus-Kaledoonia nc +Kaledonia Berria nc +کالدونیا نو nc +Uusi-Kaledonia nc +Nouvelle Calédonie nc +Nij Caledonië nc +An Nua-Chaladóin nc +Nova Caledónia nc +קלדוניה החדשה nc +नà¥à¤¯à¥‚ केलेदूनिया nc +Nova Kaledonija nc +Új-Kaledónia nc +Nýja-Kaledónía nc +Nuova Caledonia nc +ニューカレドニア nc +នូវែលកាលáŸážŠáž¼áž“ី nc +뉴 칼레ë„니아 nc +ມາເຊໂດເນີຠnc +Naujoji Kaledonija nc +Jaunkaledonija nc +Ðова Каледонија nc +Ð¨Ð¸Ð½Ñ ÐºÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸ nc +Kaledonja Ä dida nc +Ny-Caledonia nc +Nieg Kaledonien nc +Nieuw Caledonië nc +Ny-Caledonia nc +ਨਵਾਂ ਕਾਲੀਡੋਨਾ nc +Nowa Kaledonia nc +Nova Caledónia nc +Nova Caledônia nc +Noua Caledonie nc +ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc +Kaledoniya nc +Ođđa Kaledonia nc +Nová Kaledónia nc +Nova Kaledonija nc +Ðова Каледонија nc +Nova Kaledonija nc +Nya Caledonien nc +நியூ கலடோனியா nc +КаледониÑи Ðав nc +นิวคาเลโดเนีย nc +Yeni Kaledonya nc +Yaña Kaledonia nc +Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc +Янги ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc +Nouve Caledonreye nc +新喀里多尼亚 nc +新喀里多尼亞 nc +Niger ne +النيجر ne +Ðігер ne +Ðигер ne +নাইজের ne +Nijer ne +Níger ne +ÎίγηÏας ne +NiÄero ne +نیجر ne +Nigeria ne +An Nígir ne +Níxer ne +× ×™×’'ר ne +निगर ne +Níger ne +ニジェール ne +នីហ្សáŸážš ne +니제르 ne +ຕົວຮງàºàºžàº·à»‰àº™àº—ີ່ທຳງານ ne +NigÄ“ra ne +Ðигер ne +Ðигер ne +NiÄ¡er ne +ਨਿਜੀਰ ne +Nigéria ne +Nigéria ne +Ðигер ne +Nijeri ne +Nigéria ne +Ðигер ne +நிஜர௠ne +Ðигерӣ ne +ไนเจอร์ ne +Nijerya ne +Ðігер ne +Ðигер ne +Nidjer ne +尼日尔 ne +尼日 ne +Norfolk Island nf +Norfolk Eiland nf +جزيرة نورÙولك nf +Ðорфалк nf +ОÑтров Ðорфолк nf +নরফোক দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ nf +Enez Norfolk nf +Norfolk ostrvo nf +Illa Norfolk nf +Ynys Norffolc nf +Norfolk-øerne (Australien) nf +Norfolk-Insel nf +Îήσος ÎÏŒÏφοκ nf +Norfolkinsulo nf +Isla Norfolk nf +Norfolki saar nf +Norfok Irla nf +جزایر نورÙولک nf +Norfolkinsaari nf +ÃŽle Norfolk nf +Norfolk Eilân nf +Oileán Norfolc nf +Illa Norfolk nf +××™×™ נורפולק nf +नॉरफाक आइलैंड nf +Otok Norfolk nf +Norfolk-szigetek nf +Norfolkeyja nf +Isola Norfolk nf +オーストラリア領ノーフォーク諸島 nf +កោះ Norfolk nf +ë…¸í¬í¬ ì œë„ nf +ໂປà»àº¥àº™ nf +Norfolko sala nf +Norfolka nf +Ðорфолшки ОÑтров nf +Norfolk арлууд nf +Gżira ta' Norfolk nf +Norfolkøya nf +Norfolkinsel nf +Norfolk Eiland nf +Norfolkøya nf +ਨੋਰਫੋਲਕ ਟਾਪੂ nf +Wyspy Norfolk nf +Ilha Norfolk nf +Ilhas Norfolk nf +Insulele Norfolk nf +ОÑтров Ðорфолк nf +Ikirwa cya Norufolika nf +Norfolksuolu nf +Ostrov Norfolk nf +Otok Norfolk nf +Ðорфолкшко оÑтрво nf +NorfolkÅ¡ko ostrvo nf +Norfolkön nf +நாரà¯à®ªà¯‹à®•௠தீவ௠nf +Ҷазираи Ðурфолк nf +เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¸Ÿà¸­à¸¥à¹Œà¸„ nf +Norfolk Adaları nf +Norfolk Utrawları nf +ОÑтрів Ðорфолк nf +Ðорфолк Ороли nf +Iye di Norfolk nf +诺ç¦å…‹å²› nf +諾ç¦å…‹å³¶ nf +Nigeria ng +Nigerië ng +نيجيريا ng +ÐÑ–Ð³ÐµÑ€Ñ‹Ñ ng +ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng +নাইজেরিয়া ng +Nijeria ng +Nigerija ng +Nigèria ng +Nigérie ng +ÎιγηÏία ng +NiÄerio ng +Nigeeria ng +نیجریه ng +Nigéria ng +An Nigéir ng +Nixéria ng +ניגריה ng +नाइजीरिया ng +Nigerija ng +Nigéria ng +Nígería ng +ナイジェリア ng +នីហ្សáŸážšáž¸áž™áŸ‰áž¶ ng +나ì´ì§€ë¦¬ì•„ ng +ບັນà»àºà»€àº¥àºµàº ng +Nigerija ng +NigÄ“rija ng +Ðигерија ng +Ðигери ng +NiÄ¡erja ng +ਨੀਜੀਰਿਆ ng +Nigéria ng +Nigéria ng +ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng +Nigeriya ng +Nigéria ng +Nigerija ng +Ðигерија ng +Nigerija ng +நிஜேரியா ng +Ðигерӣ ng +ไนจีเรีย ng +Nijerya ng +ÐÑ–Ð³ÐµÑ€Ñ–Ñ ng +ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng +Nidjeria ng +尼日利亚 ng +奈åŠåˆ©äºž ng +Nicaragua ni +Nikaragua ni +نيكاراغوا ni +Ðікарагуа ni +Ðикарагуа ni +নিকারাগà§à§Ÿà¦¾ ni +Nikwaraga ni +Nikaragva ni +Nikaragua ni +Nicaragwa ni +ÎικαÏάγουα ni +Nikaragvo ni +Nikaraagua ni +Nikaragua ni +نیکاراگویه ni +Nikaragua ni +Nikaragua ni +Nicearagua ni +ניקרגווה ni +निकारागà¥à¤† ni +Nikaragva ni +Níkaragva ni +ニカラグア ni +នីការ៉ាហ្គáŸážš ni +니카ë¼ê³¼ ni +ປາລາàºàºàº§àº ni +Nikaragva ni +Nikaragva ni +Ðикарагва ni +Ðикрагуа ni +Nikaragwa ni +ਨਿਕਾਰਗà©à¨† ni +Nikaragua ni +Nicarágua ni +Nicarágua ni +Ðикарагуа ni +Nikaragwa ni +Nikaragua ni +Nikaragva ni +Ðикарагва ni +Nikaragva ni +I-Nicaragua ni +நிகராகà¯à®µà¯‡ ni +Ðикарагуа ni +นิคาราà¸à¸±à¸§ ni +Nikaragua ni +Nikaragua ni +Ðікарагуа ni +Ðикарагуа ni +Nicaragwa ni +尼加拉瓜 ni +尼加拉瓜 ni +Netherlands nl +Nederland nl +هولندا nl +Hollandiya nl +ГалÑÐ½Ð´Ñ‹Ñ nl +Ð¥Ð¾Ð»Ð°Ð½Ð´Ð¸Ñ nl +হলà§à¦¯à¦¾à¦£à§à¦¡ nl +Izelvroioù nl +Nizozemska nl +Holanda nl +Nizozemí nl +Yr Iseldiroedd nl +Holland nl +Niederlande nl +Κάτω ΧώÏες nl +Nederlando nl +Países Bajos nl +Holland nl +Holanda nl +هلند nl +Alankomaat nl +Háland nl +Pays bas nl +Nederlân nl +An Ãsiltír nl +Países Baixos nl +הולנד nl +नीदरलैंडà¥à¤¸ nl +Nizozemska nl +Hollandia nl +Belanda nl +Holland nl +Paesi Bassi nl +オランダ nl +ហុល្លង់ nl +네ëœëž€ë“œ nl +ເນເທີà»àº¥àº™à¹Œ nl +Olandija nl +NÄ«derlande nl +Холандија nl +Ðедерланд nl +Nederland nl +Nedderlanne nl +Nederland nl +Nederland nl +Holanda nl +ਨੀਂਦਰਲੈਂਡ nl +Holandia nl +Holanda nl +Holanda nl +Olanda nl +Ðидерланды nl +Ubuholandi nl +Hollánda nl +Holandsko nl +Nizozemska nl +Холандија nl +Holandija nl +I-Netherlands nl +Nederländerna nl +நெதரà¯à®²à®¾à®¨à¯à®¤à¯ nl +Ҳуланд nl +เนเธอร์à¹à¸¥à¸™à¸”์ nl +Hollanda nl +Niderlandlar nl +Ð“Ð¾Ð»Ð»Ð°Ð½Ð´Ñ–Ñ nl +Ðидерландлар nl +Hà Lan nl +Bas Payis nl +è·å…° nl +è·è˜­ nl +Norway no +Noorweë no +النرويج no +Norveç no +ÐарвÑÐ³Ñ–Ñ no +ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no +নরওয়ে no +Norvegia no +NorveÅ¡ka no +Noruega no +Norsko no +Norwy no +Norge no +Norwegen no +ÎοÏβηγία no +Norvegio no +Noruega no +Norra no +Norvegia no +نروژ no +Norja no +Norra no +Norvège no +Noorwegen no +An Iorua no +Noruega no +נורבגיה no +नारà¥à¤µà¥‡ no +NorveÅ¡ka no +Norvégia no +Norwegia no +Noregur no +Norvegia no +ノルウェー no +áž“áŸážšážœáŸ‚ស no +ë…¸ë¥´ì›¨ì´ no +ນà»à»€àº§ no +Norvegija no +Norvēģija no +Ðорвешка no +Ðорвеги no +NorveÄ¡ja no +Norge no +Norwegen no +Noorwegen no +Noreg no +Noruega no +ਨਾਰਵੇ no +Norwegia no +Noruega no +Noruega no +Norvegia no +ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no +Noruveje no +Norga no +Nórsko no +NorveÅ¡ka no +Ðорвешка no +NorveÅ¡ka no +I-Norway no +Norge no +நாரà¯à®µà¯‡ no +Ðорвегӣ no +นอร์เวย์ no +Norveç no +ÐÐ¾Ñ€Ð²ÐµÐ³Ñ–Ñ no +ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no +Na uy no +Norvedje no +æŒªå¨ no +æŒªå¨ no +Nepal np +نيبال np +ÐÑпал np +Ðепал np +নেপাল np +Nepál np +Îεπάλ np +Nepalo np +نپال np +Népal np +Neipeal np +נפ×ל np +नेपाल np +Nepál np +ãƒãƒ‘ール np +áž“áŸáž”៉ាល់ np +네팔 np +ເວນດາ np +Nepalas np +NepÄla np +Ðепал np +Ðепал np +ਨੇਪਾਲ np +Ðепал np +Nepali np +Ðепал np +நேபாளம௠np +Ðипол np +เนปาล np +Ðепал np +Ðепал np +尼泊尔 np +尼泊爾 np +Nauru nr +ناورو nr +Ðауру nr +Ðауру nr +নাউরৠnr +Naurueg nr +Nawrw nr +ÎαουÏÎ¿Ï nr +NaÅ­ro nr +Naurú nr +نائورو nr +Naurusaaret nr +Nárúis nr +× ×ורו nr +नौरू nr +Naurski nr +Nárú nr +ナウル nr +ណូរូ nr +나우루 nr +ປາລາàºàºàº§àº nr +Ðауру nr +Ðауру nr +Nawru nr +ਨਾਉਰੂ nr +Ðауру nr +Ikinawuru nr +Ðауру nr +நௌர௠nr +Ðауру nr +นาวรู nr +Ðауру nr +Ðауру nr +Nawouro nr +ç‘™é² nr +諾魯 nr +Niue nu +Nieu nu +نيوي nu +ÐÑ–ÑžÑ nu +Ðиуе nu +নিউই nu +Niwe nu +ÎιοÏε nu +Niuo nu +نیئو nu +ניווה nu +नियू nu +ニュージーランド自治領ニウエ nu +នីវ nu +ë‹ˆìš°ì— nu +ເນ໊ຕ nu +Ðије nu +Ðиуе nu +Niwe nu +ਨੀਉਈ nu +Ðиуе nu +Ðиуе nu +நீய௠nu +Ðиу nu +นิอุเอ nu +Nive nu +Niu nu +Ðіуе nu +Ðиуе nu +Niuwé nu +纽埃 nu +ç´é„‚å³¶ nu +New Zealand nz +Nuwe Seeland nz +نيوزيلاندا nz +Yeni Zellandiya nz +ÐÐ¾Ð²Ð°Ñ Ð—ÑлÑÐ½Ð´Ñ‹Ñ nz +Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz +নিউজিলà§à¦¯à¦¾à¦£à§à¦¡ nz +Zeland nevez nz +Novi Zeland nz +Nova Zelanda nz +Nový Zéland nz +Seland Newydd nz +Neuseeland nz +Îέα Ζηλανδία nz +Nov-Zelando nz +Nueva Zelanda nz +Uus-Meremaa nz +Zelanda Berria nz +زلاندنو nz +Uusi-Seelanti nz +Nýsæland nz +Nouvelle Zélande nz +Nij Seelân nz +An Nua-Shéalainn nz +Nova Celándia nz +ניו זילנד nz +नà¥à¤¯à¥‚जीलैंड nz +Novi Zeland nz +Új-Zéland nz +Selandia Baru nz +Nýja-Sjáland nz +Nuova Zelanda nz +ニュージーランド nz +នូវែលហ្សáŸáž¡áž„់ nz +뉴질랜드 nz +ນີວຊີà»àº¥àº™ nz +Naujoji Zelandija nz +JaunZÄ“lande nz +Ðов Зеланд nz +Ð¨Ð¸Ð½Ñ Ð·ÐµÐ°Ð»Ð°Ð½Ð´ nz +Nieg Seeland nz +Nieuw Zeeland nz +Navera Zelanda nz +ਨਿਊਜ਼ੀਲੈਂਡ nz +Nowa Zelandia nz +Nova Zelândia nz +Nova Zelândia nz +Noua Zeelandă nz +ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz +Nuveli Zelande nz +Ođđa Zealánda nz +Nový Zéland nz +Nova Zelandija nz +Ðови Зеланд nz +Novi Zeland nz +I-New Zealand nz +Nya Zeeland nz +நியூசிலாநà¯à®¤à¯ nz +Зилонди Ðав nz +นิวซีà¹à¸¥à¸™à¸”์ nz +Yeni Zelanda nz +Yaña Zealand nz +Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ñ–Ñ nz +Янги Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz +Nouve Zelande nz +新西兰 nz +ç´è¥¿è˜­ nz +Oman om +عÙمان om +Ðман om +Оман om +ওমান om +Omán om +Ομάν om +Omano om +Omán om +Omaan om +عمان om +Omán om +עומן om +ओमन om +Omán om +Óman om +オマーン om +អូម៉ង់ om +오만 om +ເàºàºµàºàº¥àº°àº¡àº±àº™ om +Omanas om +OmÄna om +Оман om +Оман om +ਓਮਾਨ om +Omã om +Omã om +Оман om +Omani om +Omán om +Оман om +I-Oman om +ஓமன௠om +Оман om +โอมาน om +Umman om +Оман om +Уммон om + Oman om +阿曼 om +阿曼 om +Panama pa +بنما pa +Панама pa +Панама pa +পানামা pa +Panamà pa +Παναμάς pa +Panamo pa +Panamá pa +پاناما pa +Panamá pa +פנמה pa +पनामा pa +パナマ pa +ប៉ាណាម៉ា pa +파나마 pa +ປານາມາ pa +Панама pa +Панама pa +ਪੈਨਾਮਾ pa +Panamá pa +Panamá pa +Панама pa +Панама pa +I-Panama pa +பனாமா pa +Панама pa +ปานามา pa +Панама pa +Панама pa +巴拿马 pa +巴拿馬 pa +Peru pe +البيرو pe +ПÑру pe +Перу pe +পেরৠpe +Perou pe +Perú pe +Periw pe +ΠεÏÎ¿Ï pe +Peruo pe +Perú pe +Peruu pe +پرو pe +Pérou pe +Peiriú pe +Perú pe +פרו pe +पेरू pe +Perú pe +Perù pe +ペルー pe +ប៉áŸážšáž¼ pe +페루 pe +ເປລູ pe +Перу pe +Перу pe +Pero pe +ਪੇਰੂ pe +Перу pe +Перу pe +I-Peru pe +பெர௠pe +Перу pe +เปรู pe +Перу pe +Перу pe +Perou pe +ç§˜é² pe +秘魯 pe +French Polynesia pf +Fraans Polynesië pf +بولينيزيا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© pf +ФранцуÑÐºÐ°Ñ ÐŸÐ°Ð»Ñ–Ð½ÑÐ·Ñ–Ñ pf +ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf +ফরাসী পলিনেশিয়া pf +Polinezi galleg pf +Francuska Polinezija pf +Polinèsia francessa pf +Francouzská Polynésie pf +Polynesia Ffrengig pf +Fransk Polynesien pf +Französisch Polynesien pf +Γαλλική Πολυνησία pf +Franca Polinezio pf +Polinesia francesa pf +Prantsuse Polüneesia pf +Polinesia Frantziarra pf +پولونزی ÙØ±Ø§Ù†Ø³Ù‡ pf +Ranskan Polynesia pf +Polynésie française pf +Frânsk Polinesië pf +Polainéis na Fraince pf +Polinésia Francesa pf +פולינזיה הצרפתית pf +फà¥à¤°à¥‡à¤‚च पॉलीनेसिया pf +Francuska Polinezija pf +Francia-Polinézia pf +Franska Pólýnesía pf +Polinesia Francese pf +フランス領ãƒãƒªãƒã‚·ã‚¢ pf +ប៉ូលីនáŸážŸáŸŠáž¸â€‹áž”ារាំង pf +프랑스령 í´ë¦¬ë„¤ì‹œì•„ pf +àºàº£àº±à»ˆàº‡à»€àºªàº” pf +PrancÅ«zų Polinezija pf +FranÄu PolinÄ“zija pf +ФранцуÑка Полинезија pf +Франц полинеÑи pf +Polineżja FranÄ‹iża pf +Fransk Polynesia pf +Franzöösch Polynesien pf +Frans Polinesië pf +Fransk Polynesia pf +ਫਰੈਂਚ ਪੋਲੀਂਸੀਆ pf +Polinezja Francuska pf +Polinésia Francesa pf +Polinésia Francesa pf +Polinezia Franceză pf +ФранцузÑÐºÐ°Ñ ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf +Polinesiya Mfaransa pf +FránskkalaÅ¡ Polynesia pf +Francúzska Polynézia pf +Francoska Polinezija pf +ФранцуÑка Полинезија pf +Francuska Polinezija pf +Franska Polynesien pf +பிரனà¯à®šà¯ போலினேசியா pf +ПулинезиÑи ФаронÑа pf +à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¹‚พลีนีเซีย pf +Fransız Polinezyası pf +Frans Polinesia pf +Французька ÐŸÐ¾Ð»Ñ–Ð½ÐµÐ·Ñ–Ñ pf +Француз ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf +Polynesia thuá»™c Pháp pf +Polinezeye francesse pf +法属波利尼西亚 pf +法屬波利尼西亞 pf +Papua New Guinea pg +بابوا غينيا الجديدة pg +Papua Yeni Gvineya pg +Папуа–ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ pg +Папуа Ðова Ð“Ð²Ð¸Ð½ÐµÑ pg +পাপà§à§Ÿà¦¾ নিউ গিনি pg +Papouazi Gine Nevez pg +Papua Nova Gvineja pg +Papua Nova Guinea pg +Papua - Nová Guinea pg +Papwa Gini Newydd pg +Papua Neu-Guinea pg +ΠαποÏα Îέα Γουινέα pg +Papuo-Nov-Gvineo pg +Papua Nueva Guinea pg +Paapua Uus-Guinea pg +Papua Ginea Berria pg +پاپوا گینه نو pg +Papua-Uusi-Guinea pg +Papouasie-Nouvelle-Guinée pg +Papua Nij Guinea pg +Nua-Ghuine Phapua pg +Papúa Nova Guiné pg +פפו××” ניו ×’×™× ×™ pg +पापà¥à¤† नà¥à¤¯à¥‚ गियाना pg +Papua Nova Gvineja pg +Pápua Új-Guinea pg +Papúa Nýja-Gínea pg +Papua Nuova Guinea pg +パプアニューギニア pg +ប៉ាពូញូវហ្គីណ០pg +파푸아뉴기니 pg +ເທົາອ່ອນ pg +Papua Naujoji GvinÄ—ja pg +Papua Jaungvineja pg +Папуа Ðова Гвинеја pg +Папуа ÑˆÐ¸Ð½Ñ Ð“ÑƒÐ¹Ð½ÐµÐ° pg +Papwa Ginea pg +Papua Ny-Guinea pg +Papua-Niegguinea pg +Papua Ny-Guinea pg +ਪਾਪੂਆ ਨਵਾਂ ਗੂਈਆ pg +Papua Nowa Gwinea pg +Papua Nova Guiné pg +Papua Nova Guiné pg +Papua Noua Guinee pg +Папуа-ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ pg +Papuwa Gineya Nshya pg +Papua Ođđa-Guinea pg +Papua Nová Guinea pg +Papua Nova Gvineja pg +Папуа Ðова Гвинеја pg +Papua Nova Gvineja pg +Papua Nya Guinea pg +பாபà¯à®ªà®¾ நியூ ஜினியா pg +Папуа ГвинеиÑи Ðав pg +ปาปัวนิวà¸à¸´à¸™à¸µ pg +Papua Yeni Gine pg +Papua Yaña Guinea pg +Папуа Ðова Ð“Ð²Ñ–Ð½ÐµÑ pg +Папуа Янги Ð“Ð²Ð¸Ð½ÐµÑ pg +Papouwazeye Nouve Guinêye pg +巴布亚新几内亚 pg +巴布ç´å¹¾å…§äºž pg +Philippines ph +Fillipyne ph +الÙلبين ph +FillipinlÉ™r ph +Філіпіны ph +Филипини ph +ফিলিপিনস ph +Filipin ph +Filipini ph +Filipines ph +Filipíny ph +Ynysoedd Y Philipinau ph +Filippinerne ph +Philippinen ph +Φιλιππίνες ph +Filipinoj ph +Filipinas ph +Filipiinid ph +Filipinak ph +Ùیلیپین ph +Filippiinit ph +Filippijnen ph +Na hOileáin Fhilipíneacha ph +Filipinas ph +×¤×™×œ×™×¤×™× ×™× ph +फिलिपà¥à¤ªà¥€à¤¨à¥à¤¸ ph +Filipini ph +Fülöp-szigetek ph +Filippseyjar ph +Filippine ph +フィリピン ph +ហ្វ៊ីលីពីន ph +필리핀 ph +ອາລະປະໂຫàºàº” ph +Filipinai ph +FilipÄ«nas ph +Филипини ph +Плиппин ph +Filippini ph +Filippinene ph +Philippinen ph +Filippijnen ph +Filippinane ph +ਫਿਲੀਪੀਨਜ਼ ph +Filipiny ph +Filipinas ph +Filipinas ph +Filipine ph +Филиппины ph +Filipine ph +Filippiinat ph +Filipíny ph +Filipini ph +Филипини ph +Filipini ph +Filippinerna ph +பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯ ph +Филипин ph +ฟิลิปปินส์ ph +Filipinler ph +Filippinnär ph +Філіппіни ph +Филиппин ph +Filipenes ph +è²å¾‹å®¾ ph +è²å¾‹è³“ ph +Pakistan pk +باكستان pk +ПакіÑтан pk +ПакиÑтан pk +পাকিসà§à¦¤à¦¾à¦¨ pk +Paquistà pk +Pákistán pk +Pacistan pk +Πακιστάν pk +Pakistano pk +پاکستان pk +An Phacastáin pk +Paquistán pk +פ×קיסטן pk +पाकिसà¥à¤¤à¤¾à¤¨ pk +Pakisztán pk +パキスタン pk +ប៉ាគីស្ážáž¶áž“ pk +파키스탄 pk +ລງບ pk +Pakistanas pk +PakistÄna pk +ПакиÑтан pk +ПакиÑтан pk +ਪਾਕਿਸਤਾਨ pk +Paquistão pk +Paquistão pk +ПакиÑтан pk +Pakisitani pk +ПакиÑтан pk +பாகிஸà¯à®¤à®¾à®©à¯ pk +ПокиÑтон pk +ปาà¸à¸µà¸ªà¸–าน pk +Päqstan pk +ПакиÑтан pk +ПокиÑтон pk +å·´åŸºæ–¯å¦ pk +å·´åŸºæ–¯å¦ pk +Poland pl +بولندا pl +PolÅŸa pl +Польшча pl +Полша pl +পোলà§à¦¯à¦¾à¦£à§à¦¡ pl +Polonia pl +Poljska pl +Polònia pl +Polsko pl +Gwlad Pwyl pl +Polen pl +Polen pl +Πολωνία pl +Pollando pl +Polonia pl +Poola pl +Polonia pl +لهستان pl +Puola pl +Pólland pl +Pologne pl +Polen pl +An Pholainn pl +Polónia pl +פולין pl +पोलैंड pl +Poljska pl +Lengyelország pl +Polandia pl +Pólland pl +Polonia pl +ãƒãƒ¼ãƒ©ãƒ³ãƒ‰ pl +ប៉ូឡូញ pl +í´ëž€ë“œ pl +ໂປà»àº¥àº™ pl +Lenkija pl +Polija pl +ПолÑка pl +Польш pl +Polonja pl +Polen pl +Polen pl +Polen pl +Polen pl +Polònia pl +ਪੋਲੈਂਡ pl +Polska pl +Polónia pl +Polônia pl +Polonia pl +Польша pl +Polonye pl +Polska pl +Poľsko pl +Poljska pl +ПољÑка pl +Poljska pl +I-Poland pl +Polen pl +போலாநà¯à®¤à¯ pl +ÐŸÐ¾Ð»Ð°Ð½Ð´Ð¸Ñ pl +โปà¹à¸¥à¸™à¸”์ pl +Polonya pl +Polonia, PolÅŸa pl +Польща pl +Полша pl +Pholandi pl +Ba Lan pl +Pologne pl +波兰 pl +波蘭 pl +Saint Pierre and Miquelon pm +St Pierre en Miquelon pm +سانت بيير Ùˆ ميكيلون pm +Saint Pierre vÉ™ Miquelon pm +СÑн-П'ер Ñ– Мікелон pm +Св. Пиер и Магелан pm +সেনà§à¦Ÿ পিয়ের à¦à¦¬à¦‚ মিকেলন pm +Sant Per ha Mikelon pm +Sveti Pjer i Migelon pm +Saint Pierre i Miquelon pm +Saint Pierre a Miquelon pm +Ynysoedd Sant Pierre a Micwelon pm +Saint Pierre og Miquelon pm +Saint Pierre und Miquelon pm +Σαιν Î Î¹Î­Ï (Άγιος ΠέτÏος) και Μικελόν pm +Sent-Piero kaj Mikelono pm +Saint Pierre y Miquelon pm +Saint Pierre ja Miquelon pm +Saint Pierre eta Miquelon pm +سنت Ù¾ÛŒÙØ± Ùˆ میکولئون pm +Saint-Pierre ja Miquelon pm +Saint-Pierre-et-Miquelon pm +Saint Pierre en Miquelon pm +Peadar Naofa agus Micilín pm +Saint Pierre e Miquelon pm +ס×ן פייר ומיקלון pm +सेंट पियरे तथा मिकà¥à¤µà¥‡à¤²à¤¨ pm +Saint Pierre i Miquelon pm +Saint Pierre és Miquelon pm +Sankti Pierre og Miquelon pm +Saint Pierre e Miquelon pm +フランス海外領土サンピエールミクロン諸島 pm +세ì¸íЏ 피ì—르 미쿠엘론 pm +SenpjÄ“ra un Mikelona pm +Свети Пјер и Микелон pm +Сайнт пиерре ба микуелон pm +Saint Pierre u Miquelon pm +Saint-Pierre-et-Miquelon pm +Sankt Pierre un Miquelon pm +Saint Pierre en Miquelon pm +Saint-Pierre-et-Miquelon pm +ਸੇਂਟ ਪੀਈਰੀ ਤੇ ਮਾਕਿਉਲੋਨ pm +Saint Pierre i Miquelon pm +S. Pedro e Miquelão pm +Saint Pierre e Miquelon pm +Saint Pierre ÅŸi Miquelon pm +Сен-Пьер и Микелон pm +Mutagatifu Petero na Mikelo pm +Saint-Pierre-et-Miquelon pm +Saint Pierre a Miquelon pm +Sveti Pierre in Miquelon pm +Св. Пјер и Микелон pm +Sv. Pjer i Mikelon pm +Saint Pierre och Miquelon pm +செயினà¯à®Ÿà¯ பியரி மறà¯à®±à¯à®®à¯ மிகà¯à®¯à¯à®²à®©à¯ pm +Синт Пир Миколеюн pm +เซนต์ปิà¹à¸­à¸£à¹Œ à¹à¸¥à¸°à¸¡à¸´à¹€à¸„อลอน pm +Saint Pierre ve Miquelon pm +Saint Pierre wä Miquelon pm +Сент-П'єр Ñ– Мікелон pm +Сент-Пер ва Микелон pm +Sint Pire et Miquelon pm +圣皮埃尔和密克隆 pm +è–皮埃爾島åŠå¯†å…‹éš†å³¶ pm +Pitcairn pn +بيتكايرن pn +ПіткÑрн pn +ОÑтрови Питкерн pn +পিটকেম pn +Pitkern pn +Ynys Pitcairn pn +ΠίτκαιÏν pn +Pitkarna Insulo pn +پیت Ú©ÙØ±Ù† pn +פיטקרן pn +पिटकैरà¥à¤¨ pn +英領ピトケアン諸島 pn +í•케언 pn +ລງບ pn +PitkÄ“rna pn +Питкерн pn +Питкайрн pn +ਪੀਟਕਾਰਨ pn +Питкаирн pn +பிடà¯à®•ாயà¯à®©à¯ pn +Питкорин pn +เà¸à¸²à¸°à¸žà¸´à¸•à¹à¸„ร์น pn +Pitkairn pn +Питкерн pn +çš®ç‰¹å¼€æ© pn +匹特開æ©å³¶ pn +Puerto Rico pr +بورتوريكو pr +Puerto Riko pr +ПуÑрта Рыка pr +Порто Рико pr +পà§à§Ÿà§‡à¦°à§à¦¤à§‹ রিকো pr +Porto Rico pr +Portoriko pr +Portoriko pr +Pwerto Rico pr +ΠουέÏτο Ρίκο pr +Puerto-Riko pr +پورتوریکو pr +Porto Rico pr +Portó Ríce pr +Porto Rico pr +פורטו ריקו pr +पà¥à¤¯à¥‚रà¥à¤Ÿà¥‹ रिको pr +Portoriko pr +Púertó Ríkó pr +Portorico pr +プエルトリコ pr +áž–áŸážšážáž¼ážšáž¸áž€áž¼ pr +푸ì—르토리코 pr +ໂປຣໂຕຄອນ pr +Puerto Rikas pr +Puertoriko pr +Порто Рико pr +Пуерто Рико pr +ਰੂਇਰਟੂ ਰੀਕੋ pr +Porto Rico pr +Porto Rico pr +ПуÑрто-Рико pr +Porito Riko pr +Portoriko pr +Порторико pr +Portoriko pr +பà¯à®¯à¯à®°à¯à®Ÿà¯‹ ரிகோ pr +Пурто Рико pr +เปอร์โตริโภpr +Porta Riko pr +Puerto Riko pr +Пуерто-Ріко pr +ПуÑрто-Рико pr +Porto Rico pr +æ³¢å¤šé»Žå„ pr +æ³¢å¤šé»Žå„ pr +Palestinian Territory ps +Palesteinse Gebied ps +السلطة الÙلسطينية ps +FÉ™lÉ™stin SahÉ™si ps +ПалеÑтынÑÐºÐ°Ñ Ñ‚ÑÑ€Ñ‹Ñ‚Ð¾Ñ€Ñ‹Ñ ps +ПалеÑтина ps +পà§à¦¯à¦¾à¦²à§‡à¦¸à§à¦Ÿà¦¿à¦¨à¦¿à§Ÿà¦¾à¦¨ টেরিটরি ps +Palestinska teritorija ps +Territori Palestí ps +Palestinské území ps +Tiriogaeth Palesteina ps +Palæstinensiske selvstyreomrÃ¥der ps +Palästinensisches Gebiet ps +Παλαιστίνη ps +Palestina Teritorio ps +Territorio palestino ps +Palestiina ps +Palestina ps +Ùلسطین ps +Palestiinalaisalue ps +Palestinensiska økið ps +Territoire palestinien ps +Palestijnsk territorium ps +Críoch na bPalaistíneach ps +Território Palestino ps +×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™× ps +फिलीसà¥à¤¤à¥€à¤¨à¥€ टेरिटरी ps +Palestinski teritorij ps +Palesztin területek ps +Palestína ps +Palestina ps +パレスãƒãƒŠè‡ªæ²»åŒº ps +ប៉ាលáŸážŸáŸ’ទីន ps +íŒ”ë ˆìŠ¤íƒ€ì¸ ìžì¹˜êµ¬ ps +àºàº²àº™àºžàº´àº¡àºœàº´àº”ພາດ ps +Palestinos teritorija ps +PalestÄ«nieÅ¡u treitorija ps +ПалеÑтинÑки територии ps +ПалеÑтины газар нутаг ps +Palestina ps +Palestinske territorier ps +De palästinensche sülvenregeerte Regioon ps +Palestijns territorium ps +Palestinske territorium ps +Bohwa bja Palestina ps +ਫਲਾਸਤੀਨ ਖੇਤਰ ps +Palestyna ps +Território Palestiniano ps +Território Palestino ps +Teritoriul Palestinian ps +ПалеÑтинÑкие территории ps +Igihugu cya Palesitina ps +PalestiinnalaÅ¡ territoria ps +Palestínske územia ps +Palestinski teritorij ps +ПалеÑтина ps +Palestina ps +I-Palestinian Territory ps +Palestina ps +பாலஸà¯à®¤à¯€à®© ஆணையம௠ps +ФалаÑтин ps +เขตปà¸à¸„รองปาเลสไตน์ ps +Filistin Bölgesi ps +Fälestin ps +ПалеÑтинÑька Ñ‚ÐµÑ€Ð¸Ñ‚Ð¾Ñ€Ñ–Ñ ps +ФалаÑтин Ерлари ps +Mukano wa maphalesitina ps +Lãnh thổ cá»§a Palestine ps +Palestene ps +Umhlaba wePalestina ps +å·´å‹’æ–¯å¦åœ°åŒº ps +å·´å‹’æ–¯å¦é ˜åœ° ps +Indawo yama-Phalesitina ps +Portugal pt +البرتغال pt +Portuqaliya pt +ÐŸÐ°Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt +পোরà§à¦¤à§à¦—াল pt +Portugalsko pt +Portiwgal pt +ΠοÏτογαλία pt +Portugalo pt +پرتغال pt +Portugali pt +An Phortaingéil pt +פורטוגל pt +पà¥à¤°à¥à¤¤à¤—ाल pt +Portugália pt +Portúgal pt +Portogallo pt +ãƒãƒ«ãƒˆã‚¬ãƒ« pt +áž–áŸážšáž‘ុយហ្គាល់ pt +í¬ë¥´íˆ¬ê°ˆ pt +ໂປຣຕຸເàºàºª pt +Portugalija pt +PortugÄle pt +Португалија pt +Португал pt +Portugall pt +ਪà©à¨°à¨¤à¨—ਾਲ pt +Portugalia pt +Portugalia pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt +Poritigali pt +Portugalsko pt +Portugalska pt +Португал pt +I-Portugal pt +போரà¯à®¤à¯à®¤à¯à®•ல௠pt +Пуртуқол pt +โปรตุเà¸à¸ª pt +Portekiz pt +Portugalia pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt +Bồ Äào Nha pt +è‘¡è„牙 pt +è‘¡è„牙 pt +Palau pw +بالاو pw +Палау pw +Палау pw +পালাউ pw +Palaw pw +Παλάου pw +Palao pw +پالائو pw +פל×ו pw +पलाऊ pw +Palá pw +パラオ pw +ប៉ាឡូ pw +팔ë¼ìš° pw +ມອລຕາ pw +Палау pw +Палау pw +ਪਾਲਾਉ pw +Палау pw +Palawu pw +Палау pw +பலாவ௠pw +Палау pw +เà¸à¸²à¸°à¸žà¸²à¹€à¸¥à¸² pw +Палау pw +Палау pw +Palawou pw +帕劳 pw +å¸›ç‰ pw +Paraguay py +Paraguaai py +باراغواي py +Paraqvay py +Парагвай py +Парагвай py +পà§à¦¯à¦¾à¦°à¦¾à¦—à§à§Ÿà§‡ py +Paragwae py +Paragvaj py +Paraguai py +Paragw?i py +ΠαÏαγουάη py +Paragvajo py +Paraguai py +پاراگویه py +Paragua py +Paraguai py +פרגו××™ py +पैरागà¥à¤ py +Paragvaj py +Paragvæ py +パラグアイ py +ប៉ារ៉ាហ្គាយ py +파ë¼ê³¼ì´ py +ປາລາàºàºàº§àº py +Paragvajus py +Paragvaja py +Парагвај py +Парагвай py +Paragwaj py +Paraguai py +ਪਾਰਾਗà©à¨† py +Paragwaj py +Paraguai py +Paraguai py +Paraguai py +Парагвай py +Paragwe py +Portugalsko py +Paragvaj py +Парагвај py +Paragvaj py +I-Paraguay py +பராகà¯à®µà¯‡ py +Порогвие py +ปาราà¸à¸§à¸±à¸¢ py +Парагвай py +Парагвай py +Paragway py +巴拉圭 py +巴拉圭 py +Qatar qa +قطر qa +Катар qa +Катар qa +কাতার qa +Kwatar qa +Katar qa +Katar qa +Catar qa +Katar qa +ÎšÎ±Ï„Î¬Ï qa +Kataro qa +Katar qa +قطر qa +Katar qa +Catar qa +קטר qa +क़तर qa +Katar qa +Katar qa +Katar qa +カタール qa +កាážáž¶ážš qa +카타르 qa +ມອລຕາ qa +Kataras qa +Katara qa +Катар qa +Катар qa +Katar qa +ਕਤਰ qa +Katar qa +Катар qa +Katari qa +Katar qa +Katar qa +Катар qa +Katar qa +I-Qatar qa +கதார௠qa +Қатар qa +ควาตาร์ qa +Katar qa +Катар qa +Қатар qa +Katar qa +å¡å¡”å°” qa +å¡é” qa +Romania ro +Romenië ro +رومانيا ro +Rumıniya ro +Ð ÑƒÐ¼Ñ‹Ð½Ñ–Ñ ro +Ð ÑƒÐ¼ÑŠÐ½Ð¸Ñ ro +রà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ ro +Roumani ro +Rumunija ro +Rumunsko ro +Rumænien ro +Rumänien ro +Ρουμανία ro +Rumanio ro +Rumanía ro +Rumeenia ro +Errumania ro +رومانی ro +Rumenia ro +Roumanie ro +Roemenië ro +An Rómáin ro +Románia ro +רומניה ro +रोमानिया ro +Rumunjska ro +Románia ro +Rumania ro +Rúmenía ro +ルーマニア ro +រូម៉ានី ro +루마니아 ro +ໂລມາເນີຠro +Rumunija ro +RumÄnija ro +Романија ro +Румын ro +Rumanija ro +Rumänien ro +Roemenië ro +ਰੋਮਾਨੀਆ ro +Rumunia ro +Roménia ro +Romênia ro +România ro +Ð ÑƒÐ¼Ñ‹Ð½Ð¸Ñ ro +Romaniya ro +Románia ro +Rumunsko ro +Romunija ro +Румунија ro +Rumunija ro +I-Romania ro +Rumänien ro +à®°à¯à®®à¯‡à®©à®¿à®¯à®¾ ro +Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro +โรมาเนีย ro +Romanya ro +Ð ÑƒÐ¼ÑƒÐ½Ñ–Ñ ro +Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro +Roumaneye ro +罗马尼亚 ro +羅馬尼亞 ro +Russia ru +Rusland ru +روسيا ru +Rusiya ru +РаÑÐµÑ ru +РуÑÐ¸Ñ ru +রাশিয়া ru +Rusia ru +Rusija ru +Rússia ru +Rusko ru +Rwsia ru +Rusland ru +Russland ru +Ρωσία ru +Ruslando ru +Rusia ru +Venemaa ru +Errusia ru +روسیه ru +Venäjä ru +Russland ru +Russie ru +Rusland ru +An Rúis ru +Rúsia ru +רוסיה ru +रà¥à¤¸ ru +Rusija ru +Oroszország ru +Rusia ru +Rússland ru +ロシア ru +រូស្ស៊ី ru +러시아 ru +ລັດເຊີຠru +Rusija ru +Krievija ru +РуÑија ru +ÐžÑ€Ð¾Ñ ru +Russja ru +Russland ru +Russland ru +Rusland ru +Russland ru +ਰੂਸ ru +Rosja ru +Rússia ru +Rússia ru +Rusia ru +РоÑÑÐ¸Ñ ru +Uburusiya ru +Ruošša ru +Rusko ru +Rusija ru +РуÑија ru +Rusija ru +I-Russia ru +Ryssland ru +ரசியா ru +РуÑÑÐ¸Ñ ru +รัสเซีย ru +Rusya ru +Urısia, Räsäy ru +РоÑÑ–Ñ ru +РоÑÑÐ¸Ñ ru +Rashia ru +Nga ru +Rûsseye ru +Rashiya ru +ä¿„ç½—æ–¯ ru +ä¿„ç¾…æ–¯ ru +Rwanda rw +رواندا rw +Ruanda rw +Руанда rw +Руанда rw +রোয়ানà§à¦¡à¦¾ rw +Ruanda rw +Ruanda rw +Ruanda rw +Ρουάντα rw +Ruando rw +Ruanda rw +رواندا rw +Ruanda rw +Ruanda rw +Ruanda rw +רו×נדה rw +रवांडा rw +Ruanda rw +Ruanda rw +Rúanda rw +Ruanda rw +ルワンダ rw +រវ៉ាន់ដា rw +르완다 rw +à»àºžàº™àº”້າ rw +Ruanda rw +Ruanda rw +Руанда rw +Рванда rw +Ruanda rw +ਰਵਾਂਡਾ rw +Ruanda rw +Ruanda rw +Ruanda rw +Ruanda rw +Руанда rw +Ruanda rw +Руанда rw +Ruanda rw +வானà¯à®Ÿà®¾ rw +Руондо rw +รวันด้า rw +Ruanda rw +Руанда rw +Рванда rw +墿—ºè¾¾ rw +ç›§å®‰é” rw +Saudi Arabia sa +Saudi Arabië sa +السعودية sa +SÉ™udi ÆrÉ™bistan sa +СаудаўÑÐºÐ°Ñ ÐÑ€Ð°Ð±Ñ–Ñ sa +СаудитÑка ÐÑ€Ð°Ð±Ð¸Ñ sa +সৌদি আরব sa +Arabi Saudiet sa +Saudijska Arabija sa +Aràbia Saurí sa +Saúdská Arábie sa +Sawdi Arabia sa +Saudi Arabien sa +Saudi-Arabien sa +Σαουδική ΑÏαβία sa +SaÅ­da Arabio sa +Arabia Saudí sa +Saudi Araabia sa +عربستان سعودی sa +Saudi-Arabia sa +Arabie Saoudite sa +Saudi-Arabië sa +An Araib Shádach sa +Arabia Saudita sa +ערב הסעודית sa +सऊदी अरब sa +Saudijska Arabija sa +Szaúd-Arábia sa +Sádi-Arabía sa +Arabia Saudita sa +サウジアラビア sa +អារ៉ាប៊ីសាអ៊ូឌីហsa +사우디 ì•„ë¼ë¹„ì•„ sa +ອາລະບິຠsa +Saudo Arabija sa +SaÅ«da ArÄbija sa +СаудиÑка Ðрабија sa +Саудын араб sa +Għarabja Sawdita sa +Saudi-Arabia sa +Saudi Arabien sa +Saudi-Arabië sa +Saudi-Arabia sa +ਸਾਊਦੀ ਅਰਬ sa +Arabia Saudyjska sa +Arábia Saudita sa +Arábia Saudita sa +Arabia Saudită sa +СаудовÑÐºÐ°Ñ ÐÑ€Ð°Ð²Ð¸Ñ sa +Arabiya Sawudite sa +Saudi Arábia sa +Saudská arábia sa +Saudova Arabija sa +СаудијÑка Ðрабија sa +Saudijska Arabija sa +I-Saudi Arabia sa +Saudiarabien sa +சவà¯à®¤à®¿ அரேபியா sa +ÐрабиÑтони Саудӣ sa +ซาอุดิอาระเบีย sa +Suudi Arabistan sa +Söğüd Ğäräbstan sa +СаудівÑька ÐÑ€Ð°Ð²Ñ–Ñ sa +Ð¡Ð°ÑƒÐ´Ð¸Ñ ÐрабиÑтони sa +Ẩrập Saudi sa +Arabeye Sawoudite sa +沙特阿拉伯 sa +æ²™çƒåœ°é˜¿æ‹‰ä¼¯ sa +Solomon Islands sb +Solomon Eilande sb +جزر سليمان sb +Solomon Adaları sb +Саламонавы аÑтравы sb +Соломонови оÑтрови sb +সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ sb +Inizi Salaun sb +Solomonska ostrva sb +Illes Solomon sb +Å alamounovy ostrovy sb +Ynysoedd Solomon sb +Salomon-øerne sb +Salomon-Inseln sb +Îήσοι Σολομώντος sb +Salomonoj sb +Islas Salomón sb +Saalomoni saared sb +Solomon Irlak sb +جزایر سلیمان sb +Solomon-saaret sb +ÃŽles Salomon sb +Solomon Eilannen sb +Oileáin Sholamón sb +Illas Salomón sb +××™×™ שלמה sb +सोलोमन आइलैंड sb +Solomonova otoÄja sb +Salamon-szigetek sb +Salómonseyjar sb +Isole Salomone sb +ソロモン諸島 sb +កោះ​សូឡូម៉ូន sb +솔로몬 ì œë„ sb +ສະໂລວະເນີຠsb +Saliamono salos sb +Solomonu salas sb +СоломонÑки ОÑтрови sb +Соломоны арлууд sb +Gżejjer Solomon sb +Salomonøyene sb +Salomonen sb +Solomon Eilanden sb +Salomonøyane sb +ਸੋਲੋਮੋਨ ਆਈਸਲੈਂਡ sb +Wyspy Salomona sb +Ilhas Salomão sb +Ilhas Salomão sb +Insulele Solomon sb +Соломоновы оÑтрова sb +Ibirwa bya Salomo sb +Salomonsullot sb +Å alamúnove ostrovy sb +Solomonovi otoki sb +Соломонова оÑтрва sb +Solomonova ostrva sb +Salomonöarna sb +சாலமன௠தீவà¯à®•ள௠sb +Ҷазираи Сулаймон sb +หมู่เà¸à¸²à¸°à¹‚ซโลมอน sb +Solomon Adaları sb +Solomon Utrawları sb +Соломонові оÑтрови sb +Соломон Ороллари sb +Quần đảo Solomon sb +Iyes Salomon sb +所罗门群岛 sb +索羅門群島 sb +Seychelles sc +سيشل sc +СÑйшÑлы sc +СейшелÑки оÑтрови sc +সীচিলিস sc +Sechell sc +SejÅ¡eli sc +Ynysoedd y Seisi?l sc +Seychellerne sc +Seychellen sc +Σεϋχέλλες sc +SejÅeloj sc +SeiÅ¡ellid sc +سیشل sc +Seychellit sc +Seychellen sc +Na Séiséil sc +Seicheles sc +××™×™ סיישל sc +शेसेलà¥à¤¸ sc +SejÅ¡eli sc +Seychelles-eyjar sc +セイシェル sc +សីស្ហែល sc +세ì´ì…¸ sc +ເຊລ sc +SeiÅ¡eļu salas sc +Сејшели sc +Ð¡ÐµÐ¹Ñ‡ÐµÐ»Ð»Ð¸Ñ sc +Seychellene sc +Seychellen sc +Seychellen sc +Seychellane sc +ਸੀਲਚੀਲੀਸ sc +Seszele sc +Ilhas Seychelles sc +СейшельÑкие оÑтрова sc +Seyishele sc +SeyÅ¡ellat sc +SejÅ¡eli sc +Сејшели sc +SejÅ¡eli sc +Seychellerna sc +சேசெலà¯à®²à®¸à¯ sc +Сейшелӣ sc +ซีเชลล์ sc +SeyÅŸeller sc +SeyÅŸellär sc +СейшельÑькі оÑтрови sc +Сейшел Ороллари sc +Seycheles sc +塞舌尔 sc +塞席爾 sc +Sudan sd +السودان sd +Судан sd +Судан sd +সà§à¦¦à¦¾à¦¨ sd +Sondan sd +Sudán sd +Swdan sd +Σουδάν sd +Sudano sd +Sudán sd +Sudaan sd +سودان sd +Sudania sd +Soudan sd +An tSúdáin sd +Sudán sd +סודן sd +सूडान sd +Szudán sd +Súdan sd +スーダン sd +ស៊ូដង់ sd +수단 sd +ຊູດານ sd +Sudanas sd +SudÄna sd +Судан sd +Судан sd +ਸੂਡਾਨ sd +Sudão sd +Sudão sd +Судан sd +Sudani sd +Sudán sd +Судан sd +I-Sudan sd +சூடான௠sd +Судон sd +ซูดาน sd +Судан sd +Судан sd +Sudani sd +Soudan sd +è‹ä¸¹ sd +蘇丹 sd +Sweden se +Swede se +السويد se +İsveç se +ШвÑÑ†Ñ‹Ñ se +Ð¨Ð²ÐµÑ†Ð¸Ñ se +সà§à¦‡à¦¡à§‡à¦¨ se +Å vedska se +Suècia se +Å védsko se +Sverige se +Schweden se +Σουηδία se +Svedio se +Suecia se +Rootsi se +Suedia se +سوئد se +Ruotsi se +Svøriki se +Suède se +Zweden se +An tSualainn se +Suécia se +שבדיה se +सà¥à¤µà¥€à¤¡à¤¨ se +Å vedska se +Svédország se +Swedia se +Svíþjóð se +Svezia se +スウェーデン se +ស៊ុយអែដ se +ìŠ¤ì›¨ë´ se +ສະວີເດນ se +Å vedija se +Zviedrija se +ШведÑка se +Швед se +Svezja se +Sverige se +Zweden se +Sverige se +Suècia se +ਸਵੀਡਨ se +Szwecja se +Suécia se +Suécia se +Suedia se +Ð¨Ð²ÐµÑ†Ð¸Ñ se +Suwede se +Ruoŧŧa se +Å védsko se +Å vedska se +ШведÑка se +Å vedska se +I-Sweden se +Sverige se +சà¯à®µà¯€à®Ÿà®©à¯ se +Шведӣ se +สวีเดน se +İsveç se +İswäc, Åžwedsia se +Ð¨Ð²ÐµÑ†Ñ–Ñ se +Ð¨Ð²ÐµÑ†Ð¸Ñ se +Swidene se +Thuỵ Äiển se +Suwede se +瑞典 se +瑞典 se +Singapore sg +سنغاÙورة sg +Sinqapur sg +Сынгапур sg +Сингапур sg +সিঙà§à¦—াপà§à¦° sg +Singapour sg +Singapur sg +Singapur sg +Singapur sg +Singap?r sg +Singapur sg +ΣινγκαποÏÏη sg +Singapuro sg +Singapur sg +Singapur sg +سنگاپور sg +Singapour sg +Singeapór sg +Singapur sg +סינגפור sg +सिंगापोर sg +Singapur sg +Szingapúr sg +Singapúr sg +シンガãƒãƒ¼ãƒ« sg +សិង្ហបុរី sg +싱가í¬ë¥´ sg +ໂຊນາ sg +SingapÅ«ras sg +SingapÅ«ra sg +Сингапур sg +Сингафур sg +Singapura sg +Singapor sg +Singapur sg +ਸਿੰਘਾਪà©à¨° sg +Singapur sg +Singapura sg +Singapura sg +Сингапур sg +Singapur sg +Singapur sg +Сингапур sg +Singapur sg +சிஙà¯à®•பà¯à®ªà¯‚ர௠sg +Сингопур sg +สิงคโปร์ sg +Singapur sg +Singapur sg +Сінгапур sg +Сингапур sg +Singapour sg +æ–°åŠ å¡ sg +æ–°åŠ å¡ sg +Saint Helena sh +St Helena sh +سانت هيلانة sh +ВоÑтраў СьвÑтой Ðлены sh +Св. Елена sh +সেনà§à¦Ÿ হেলেনা sh +Sant Lena sh +Sveta Helena sh +Santa Helena sh +Svatá Helena sh +Ynys Santes Helena sh +St. Helena sh +St. Helena sh +Αγία Ελένη sh +Sent-Heleno sh +Santa Helena sh +سنت هلن sh +Sainte-Hélène sh +Sint Helena sh +San Héilin sh +Santa Helena sh +סט. הלנה sh +सेंट हेलेना sh +Sveta Helena sh +Szent Heléna sh +Sankti Helena sh +Sant'Elena sh +英領セントヘレナ島 sh +សង់ហáŸáž¡áŸážŽáž¶ sh +세ì¸íŠ¸í—¬ë ˆë‚˜ sh +ຫົວເລື່ອງ sh +Å v. Elenos sala sh +Sv. HelÄ“nas sala sh +Света Елена sh +Сайнт Хелена sh +St. Helena sh +Sankt Helena sh +St. Helena sh +ਸੇਂਟ ਹੀਲੀਨਆ sh +ÅšwiÄ™ta Helena sh +Santa Helena sh +Santa Helena sh +Sfînta Elena sh +оÑтров СвÑтой Елены sh +Mutagatifu Helena sh +St. Helena sh +Svätá Helena sh +Sveta Helena sh +Света Јелена sh +Sveta Jelena sh +செயினà¯à®Ÿà¯ ஹேலேனா sh +Синт Ҳилин sh +เซนต์เฮเลน่า sh +ОÑтрів СвÑтої Єлени sh +Ðвлиё Елена Ороли sh +Sint Elene sh +圣赫勒拿 sh +è–赫勒拿島 sh +Slovenia si +Slovenië si +سلوÙينيا si +Sloveniya si +Ð¡Ð»Ð°Ð²ÐµÐ½Ñ–Ñ si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si +সà§à¦²à§‹à¦­à§‡à¦¨à¦¿à§Ÿà¦¾ si +Sloveni si +Slovenija si +Eslovènia si +Slovinsko si +Slofenia si +Slovenien si +Slowenien si +Σλοβενία si +Slovenio si +Eslovenia si +Sloveenia si +Eslovenia si +اسلوانی si +Slovénie si +Slowenië si +An tSlóivéin si +Eslovénia si +סלובניה si +सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾ si +Slovenija si +Szlovénia si +Slóvenía si +スロベニア si +ស្លូវ៉ានី si +슬로베니아 si +ສະໂລວະເນີຠsi +SlovÄ—nija si +SlovÄ“nija si +Словенија si +Слован si +Slovenja si +Slowenien si +Slowenië si +Eslovenia si +ਸਲੋਵੀਨੀਆ si +SÅ‚owenia si +Eslovénia si +Eslovênia si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si +Siloveniya si +Slovinsko si +Slovenija si +Словенија si +Slovenija si +I-Slovenia si +Slovenien si +சà¯à®²à¯‹à®µà®¿à®©à®¿à®¯à®¾ si +УÑлувонӣ si +สโลเวเนีย si +Slovenya si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ñ–Ñ si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si +Esloveneye si +斯洛文尼亚 si +斯洛維尼亞 si +Slovakia sk +Slovakië sk +Ø³Ù„ÙˆÙØ§ÙƒÙŠØ§ sk +Slovakiya sk +Ð¡Ð»Ð°Ð²Ð°ÐºÑ–Ñ sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk +সà§à¦²à§‹à¦­à¦¾à¦•িয়া sk +Slovaki sk +SlovaÄka sk +Eslovàquia sk +Slovensko sk +Slofacia sk +Slovakiet sk +Slowakien sk +Σλοβακία sk +Slovakujo sk +Eslovaquia sk +Slovakkia sk +Eslovakia sk +اسلواکی sk +Slovaquie sk +Slowakije sk +An tSlóvaic sk +Eslováquia sk +סלובקיה sk +सà¥à¤²à¥‹à¤µà¤¾à¤•िया sk +SlovaÄka sk +Szlovákia sk +Slóvakía sk +Slovacchia sk +スロãƒã‚­ã‚¢ sk +ស្លូវ៉ាគី sk +슬로바키아 sk +ສະໂລວັຠsk +Slovakija sk +SlovÄkija sk +Словачка sk +Словак sk +Slovakja sk +Slowakei sk +Slowakije sk +ਸਲੋਵਾਕਿਆ sk +SÅ‚owacja sk +Eslováquia sk +Eslováquia sk +Slovacia sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk +Silovakiya sk +Slovákia sk +Slovensko sk +SlovaÅ¡ka sk +Словачка sk +SlovaÄka sk +I-Slovakia sk +Slovakien sk +சà¯à®²à¯‹à®µà®¾à®•à¯à®•ிய sk +УÑлувок sk +สโลวาเà¸à¸µà¸¢ sk +Slovakya sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÑ–Ñ sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk +Eslovakeye sk +斯洛ä¼å…‹ sk +斯洛ä¼å…‹ sk +San Marino sm +سان مارينو sm +Сан-Марына sm +Сан Марино sm +সান মারিনো sm +Σαν ΜαÏίνο sm +San-Marino sm +سن‌مارینو sm +Saint-Marin sm +San Mairíne sm +סן מרינו sm +सेन मेरिनो sm +San Marínó sm +サンマリノ sm +សាន់ម៉ារីណូ sm +산마리노 sm +ໂຊນາ sm +San Marinas sm +SanmarÄ«no sm +Сан Марино sm +Сан Марино sm +ਸਨ ਮਰੀਨੋ sm +São Marino sm +Сан-Марино sm +Mutagatifu Marini sm +Сан Марино sm +சான௠மரினோ sm +Сан Морину sm +ซานมาริโน sm +Сан-Маріно sm +Сан-Марино sm +Sint Marin sm +圣马力诺 sm +è–馬力諾 sm +Senegal sn +السنغال sn +Seneqal sn +СÑнÑгал sn +Сенегал sn +সেনেগল sn +Σενεγάλη sn +Senegalo sn +سنگال sn +Senegali sn +Sénégal sn +An tSeineagáil sn +סנגל sn +सेनेगल sn +Szenegál sn +ã‚»ãƒã‚¬ãƒ« sn +សáŸáž“áŸáž áŸ’គាល់ sn +세네갈 sn +ທົ່ວໄປ sn +Senegalas sn +SenegÄla sn +Сенегал sn +Сенегал sn +Senegall sn +ਸੈਨੇਗਾਲ sn +Сенегал sn +Senegali sn +Сенегал sn +சீனேகல௠sn +Синегол sn +เซนีà¸à¸±à¸¥ sn +Сенегал sn +Сенегал sn +SenegÃ¥l sn +塞内加尔 sn +塞內加爾 sn +Somalia so +Somalië so +صومال so +Somali so +Самалі so +Ð¡Ð¾Ð¼Ð°Ð»Ð¸Ñ so +সোমালিয়া so +Somali so +Somalija so +Somàlia so +Somálsko so +Σομαλία so +Somalio so +Somaalia so +سومالی so +Somalie so +Somalie so +An tSomáil so +Somália so +סומליה so +सोमालिया so +Somalija so +Szomália so +Sómalía so +ソマリア so +សូម៉ាលី so +소ë§ë¦¬ì•„ so +ໂລມາເນີຠso +Somalis so +SomÄlija so +Сомалија so +Сомали so +Somalija so +Somalien so +Somalie so +ਸੋਮਾਲੀਆ so +Somália so +Somália so +Сомали so +Somaliya so +Somália so +Somálsko so +Somalija so +Сомалија so +Somalija so +I-Somalia so +சோமாலியா so +Сумалӣ so +โซมาเลีย so +Somali so +Сомалі so +Сомали so +Somaleye so +索马里 so +索馬利亞 so +Suriname sr +سورينام sr +Surinam sr +Сурынам sr +Суринам sr +সà§à¦°à¦¿à¦¨à¦¾à¦® sr +Surinam sr +Surinam sr +Surinam sr +Swrinam sr +Surinam sr +ΣουÏινάμ sr +Surinamo sr +Surinam sr +Surinam sr +سورینام sr +Surinam sr +Suranam sr +סורינ×× sr +सूरीनाम sr +Surinam sr +Súrínam sr +スリナム sr +ស៊ូរីណាមី sr +수리남 sr +ເຊີເບີຠsr +Surinamas sr +Surinama sr +Суринам sr +Суринам sr +Surinam sr +Surinam sr +Surinam sr +Surinam sr +ਸੂਰੀਨਾਮੀ sr +Surinam sr +Surinam sr +Суринам sr +Surinamu sr +Surinam sr +Surinam sr +Surinam sr +Суринам sr +Surinam sr +Surinam sr +சà¯à®°à®¿à®¨à¯‡à®®à¯ sr +Суринам sr +ซูรีนามิ sr +Surinam sr +Surinam sr +Сурінам sr +Суринам sr +è‹é‡Œå— sr +è˜‡åˆ©å— sr +Sao Tome and Principe st +Sao Tome en Principe st +ساو تومي Ùˆ البرنسيب st +Sao Tome vÉ™ Principe st +Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі st +Сао Томе и ПринÑипи st +সাও টোম à¦à¦¬à¦‚ পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ª st +Sao Tome ha Principe st +Sao Tome i Principe st +Sao Tome i Principe st +Sao Tome a Principe st +Ynysoedd Sao Tome a Principe st +Sao Tomé og Principe st +Sao Tome und Principe st +Σάο Τομέ και ΠÏίνσιπε st +Sao-Tomeo kaj Principeo st +Sao Tome y Príncipe st +Sao Tome ja Principe st +Sao Tome eta Principe st +سائوتومه Ùˆ پرینسیپه st +São Tomé ja Príncipe st +Sao Tomé et Principe st +Sao Tome en Principe st +São Tomé agus Príncipe st +Santo Tomé e Príncipe st +साओ टोम तथा पà¥à¤°à¤¿à¤‚सिपी st +Sv. Toma i Princip st +Sao Tome és Principe st +Saó Tóme og Prinsípe st +São Tomé e Príncipe st +サントメプリンシペ st +ìƒíˆ¬ë©” 프린시페 st +ບà»àº¥àº´àºàº²àº™ st +Santome un Prinsipi st +Сао Томе и ПринÑипе st +Сао Ð¢Ð¾Ð¼Ñ Ð±Ð° Принцип st +Sao Tome u Principe st +São Tomé og Príncipe st +São Tomé un Príncipe st +Sao Tome en Principe st +São Tomé og Príncipe st +ਸਾਓ ਟੋਮੀ ਤੇ ਪਰੀਸਿਪੀ st +Sao Tome i Principe st +São Tomé and Príncipe st +São Tome e Príncipe st +Sao Tome ÅŸi Principe st +Сан-Томе и ПринÑипи st +Sawo Tome na Purencipe st +São Tomé ja Príncipe st +Sao Tome a Principe st +Sao Tome in Principe st +Св. Тома и Принцип st +Sv. Toma i Princip st +São Tomé och Príncipe st +சயோ டோம௠மறà¯à®±à¯à®®à¯ பிரினà¯à®¸à®¿à®ªà®¿ st +Синт Том ва ПринÑип st +ซาวโทม à¹à¸¥à¸° พรินซิป st +Sao Tome ve Principe st +Sao Tome wä Principe st +Сан-Томе Ñ– ПрінÑіпі st +Сан-Томе ва ПринÑипи st +São Tomé et Prince st +圣多美和普林西比 st +è–å¤šç¾ŽåŠæ™®æž—西比 st +El Salvador sv +Ø§Ù„Ø³Ù„ÙØ§Ø¯ÙˆØ± sv +Сальвадор sv +Салвадор sv +à¦à¦² সালভাডোর sv +Ar Salvador sv +Salvador sv +El Salfador sv +Ελ Î£Î±Î»Î²Î±Î½Ï„ÏŒÏ sv +Salvadoro sv +Salvador sv +السالوادور sv +Salvador sv +An tSalvadóir sv +O Salvador sv +×ל סלבדור sv +अल सलà¥à¤µà¤¾à¤¡à¥‹à¤° sv +Salvador sv +エルサルãƒãƒ‰ãƒ« sv +អែលសាល់វ៉ាឌáŸážš sv +엘살바ë„르 sv +ເອລຊັນວາດດ໠sv +Salvadoras sv +Salvadora sv +Ел Салвадор sv +Эл Салвадор sv +ਈਲ ਸਾਲਵੇਡੋਰ sv +Salwador sv +Salvador sv +Сальвадор sv +Eli Salivadoro sv +Salvádor sv +Salvador sv +Ел Салвадор sv +I-El Salvador sv +எல௠சாலà¯à®µà®Ÿà¯‹ ர௠sv +Ðл Салвадур sv +เอลซัลวาดอร์ sv +Ель-Сальвадор sv +Салвадор sv +è¨å°”瓦多 sv +薩爾瓦多 sv +Syria sy +Sirië sy +سوريا sy +SuriyÉ™ sy +Ð¡Ñ‹Ñ€Ñ‹Ñ sy +Ð¡Ð¸Ñ€Ð¸Ñ sy +সিরিয়া sy +Siri sy +Sirija sy +Síria sy +Sýrie sy +Syrien sy +Syrien sy +ΣυÏία sy +Sirio sy +Siria sy +Süüria sy +Siria sy +سوریه sy +Syyria sy +Syrie sy +Syrië sy +An tSiria sy +Síria sy +סוריה sy +सीरिया sy +Sirija sy +Szíria sy +Sýrland sy +Siria sy +シリア sy +ស៊ីរី sy +시리아 sy +ເຊີເບີຠsy +Sirija sy +SÄ«rija sy +Сирија sy +Сири sy +Siria sy +Syrien sy +Syrië sy +ਸੀਰੀਆ sy +Síria sy +Síria sy +Siria sy +Ð¡Ð¸Ñ€Ð¸Ñ sy +Siriya sy +Sýria sy +Sirija sy +Сирија sy +Sirija sy +I-Syria sy +Syrien sy +சிரியா sy +Ð¡ÑƒÑ€Ð¸Ñ sy +ซีเรีย sy +Suriye sy +Süriä sy +Ð¡Ð¸Ñ€Ñ–Ñ sy +Ð¡ÑƒÑ€Ð¸Ñ sy +Sireye sy +å™åˆ©äºš sy +敘利亞 sy +Swaziland sz +Swasiland sz +سوازيلاند sz +Svaziland sz +СвазылÑнд sz +Свазиленд sz +সোয়াজিলà§à¦¯à¦¾à¦£à§à¦¡ sz +Svazilend sz +Neozelàndia sz +Gwlad y Swasi sz +Swasiland sz +Σουαζιλάνδη sz +Svazilando sz +Swazilandia sz +Svaasimaa sz +Swazilandia sz +سووازیلند sz +Swazimaa sz +An tSuasalainn sz +Suacilándia sz +סוו×זילנד sz +सà¥à¤µà¤¾à¤œà¥€à¤²à¥ˆà¤‚ड sz +Svazilend sz +Szváziföld sz +Svasíland sz +スワジランド sz +ស្វាហ្ស៊ីឡង់ sz +스와질란드 sz +ລາດສະນາຈັàºà»„ທຠsz +Svazilenda sz +Свазиленд sz +Свациланд sz +Sważilandja sz +Swasiland sz +ਸਵਾਜ਼ੀਲੈਂਡ sz +Suazi sz +Suazilândia sz +Suazilândia sz +Suaziland sz +Свазиленд sz +Swazilande sz +Swazijsko sz +Svazi sz +Свазиленд sz +Svazilend sz +ஸà¯à®µà®¾à®šà®¿à®²à®¾à®©à¯à®Ÿà¯ sz +Свозиланд sz +สวาซิà¹à¸¥à¸™à¸”์ sz +Свазіленд sz +Свазиленд sz +Suwazilande sz +æ–¯å¨å£«å…° sz +å²ç“¦æ¿Ÿè˜­ sz +Turks and Caicos Islands tc +Turks en Caicos Eilande tc +جزر الترك Ùˆ الكايكوس tc +Türk vÉ™ Caicos Adaları tc +ÐÑтравы ТÑÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ°Ñ tc +ОÑтрови Ð¢ÑŠÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc +টারà§à¦•স à¦à¦¬à¦‚ কাইকোস দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ tc +Inizi Turks ha Kaikos tc +Turks i Kaikos ostrva tc +Illes Turks i Caicos tc +Turks a Caicos ostrovy tc +Ynysoedd Twrc a Chaicos tc +Turks- og Caicosøerne tc +Turks- und Caicos-Inseln tc +Îήσοι ΤεÏκς και Κάικος tc +Turkoj kaj Kajkoj tc +Islas Turcos y Caicos tc +Turks ja Caicos tc +Turks eta Caicos Irlak tc +جزایر تورکس Ùˆ کایکوس tc +Turks- ja Caicos-saaret tc +ÃŽles Turks et Caicos tc +Turks en Caicos Eilânen tc +Na hOileáin Turks agus Caicos tc +Illas Caicos e Turks tc +××™×™ ×§×יקוס וטורקס tc +तà¥à¤°à¥à¤• तथा कैकोस आइलैंड tc +Turks i Caicos otoÄje tc +Turks- és Caicos-szigetek tc +Turks- og Caicos-eyjar tc +Isole Turks e Caicos tc +英領タークス諸島 カイコス諸島 tc +កោះ​ទួក និង​ កៃកូស tc +í„°í¬ìФ ì¼€ì´ì»¤ìФ ì œë„ tc +TÄ“rksa un Kaikosa tc +ОÑтрови Турк и ÐšÐ°Ð¸ÐºÐ¾Ñ tc +Турк ба Кайкогийн арлууд tc +Gżejjer Turks u Caicos tc +Turks- og Caicosøyene tc +Turks- un Caicosinseln tc +Turks en Caicos Eilanden tc +Turks- og Caicosøyane tc +ਤà©à¨°à¨•ਸ ਤੇ ਕਾਇਕੋਸ ਟਾਪੂ tc +Wyspy Turks i Caicos tc +Ilhas Turks e Caicos tc +Ilhas Caicos e Turca tc +Insulele Turks ÅŸi Caicos tc +ОÑтрова Ð¢ÐµÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc +Ibirwa bya Turike na Kayikosi tc +Turks- ja Kaikossullot tc +Turks a Caicos ostrovy tc +Otoka Turks in Caicos tc +Турка и Кајкошка оÑтрва tc +Turka i KajkoÅ¡ka ostrva tc +Turks- och Caicosöarna tc +தà¯à®°à¯à®•à¯à®•ிகள௠மறà¯à®±à¯à®®à¯ காயà¯à®•ோஸ௠தீவà¯à®•ள௠tc +Ҷазираи Турк ва ÐšÐ¾Ð¹ÐºÑƒÑ tc +เà¸à¸²à¸°à¸”ติร์à¸à¹à¸¥à¸°à¹€à¸„คอส tc +Turks ve Caicos Adaları tc +Türks wä Caicos Utrawları tc +ОÑтрови Ð¢ÐµÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ¾Ñ tc +Ð¢ÑƒÑ€ÐºÑ Ð²Ð° ÐšÐ°Ð¸ÐºÐ¾Ñ ÐžÑ€Ð¾Ð»Ð»Ð°Ñ€Ð¸ tc +Quần đảo Turks và Caicos tc +Iyes Turks et Caicos tc +特克斯和凯科斯群岛 tc +åœŸå…‹æ–¯å’Œé–‹å¡æ–¯ç¾¤å³¶ tc +Chad td +تشاد td +Çad td +Чад td +Чад td +চà§à¦¯à¦¾à¦¡ td +Tchad td +ÄŒad td +Txad td +ÄŒad td +Tsiad td +Tchad td +Tschad td +Τσαντ td +Ĉado td +TÅ¡aad td +Txad td +چاد td +Tchad td +Tsjaad td +Sead td +Chade td +צ'×ד td +चाड td +Äad td +Csád td +Tsjad td +Ciad td +ãƒãƒ£ãƒ‰ td +ឆាដ td +차드 td +ເàºàº¡à»„ພ່ td +ÄŒada td +Чад td +Чад td +ÄŠad td +Tsjad td +Tschad td +Tsjaad td +Tsjad td +ਚਾਂਦ td +Czad td +Chade td +Chade td +Ciad td +Чад td +Cade td +ÄŒad td +ÄŒad td +ÄŒad td +Чад td +ÄŒad td +Tchad td +சாட௠td +Чод td +ชาด td +Çad td +Çad td +Чад td +Чад td +Tchad td +ä¹å¾— td +查德 td +Togo tg +توغو tg +Тога tg +Того tg +টোগো tg +Τόγκο tg +توگو tg +Tógó tg +טוגו tg +टोगो tg +Tógó tg +トーゴ tg +ážáž¼áž áŸ’គោ tg +토고 tg +ຂອງເລ່ນສະນຸຠtg +Того tg +Того tg +ਤੋਗੋ tg +Того tg +Того tg +டோகோ tg +Того tg +โตโภtg +Того tg +Того tg +多哥 tg +多哥 tg +Thailand th +تايلاند th +Tayland th +ТайлÑнд th +Тайланд th +থাইলà§à¦¯à¦¾à¦£à§à¦¡ th +Tajland th +Tailàndia th +Thajsko th +Gwlad y Tai th +Ταϊλάνδη th +Tajlando th +Tailandia th +Tai th +Thailandia th +تایلند th +Thaimaa th +Tailand th +Thaïlande th +Thailân th +An Téalainn th +Tailándia th +ת×ילנד th +थाइलैंड th +Tajland th +Thaiföld th +Taíland th +Tailandia th +タイ th +ážáŸƒ th +태국 th +ລາດສະນາຈັàºà»„ທຠth +Tailandas th +Taizeme th +Тајланд th +Тайланд th +Tajlandja th +Tailandia th +ਥਾਈਲੈਂਡ th +Tajlandia th +Tailândia th +Tailândia th +Tailanda th +Таиланд th +Tayilande th +Thajsko th +Tajska th +Тајланд th +Tajland th +I-Thailand th +தாயà¯à®²à®¾à®¨à¯à®¤à¯ th +Тойлонд th +ราชอาณาจัà¸à¸£à¹„ทย th +Tayland th +Tayland th +Таїланд th +Таиланд th +Thái Lan th +Taylande th +泰国 th +泰國 th +Tajikistan tj +طاجيكستان tj +Tacikistan tj +ТаджыкіÑтан tj +ТаджикиÑтан tj +তাজিকিসà§à¦¤à¦¾à¦¨ tj +Tadjikistan tj +Tadžikistan tj +Tadjikistan tj +Tádžikistán tj +Tajicistan tj +Tadschikistan tj +Τατζικιστάν tj +TaÄikujo tj +Tajikistán tj +Tadžikistan tj +تاجیکستان tj +Tadjikistan tj +An Táidsíceastáin tj +Taxiquistán tj +טג'קיסטן tj +ताजिकिसà¥à¤¤à¤¾à¤¨ tj +Tadžikistan tj +Tadzsikisztán tj +Tadsjikistan tj +Tagikistan tj +タジキスタン tj +ážáž¶áž áŸ’ស៊ីគីស្ážáž„់ tj +타지키스탄 tj +ໃຕ້ຫວັນ tj +Tadžikistanas tj +TadžikistÄna tj +ТаџикиÑтан tj +ТажикÑтан tj +TaÄ¡ikistan tj +Tadsjikistan tj +Tadschikistan tj +Tadjikistan tj +Tadsjikistan tj +ਤਜ਼ਾਕਸਤਾਨ tj +Tadżykistan tj +Tajiquistão tj +Tajiquistão tj +ТаджикиÑтан tj +Tajikisitani tj +Tažikistan tj +Tadžikistan tj +Tadžikistan tj +ТаџикиÑтан tj +Tadžikistan tj +Tadzjikistan tj +தஜிகிஸà¯à®¤à®¾à®©à¯ tj +ТоҷикиÑтон tj +ธาจีà¸à¸´à¸ªà¸–าน tj +Tacikistan tj +Tajıqstan tj +ТаджикиÑтан tj +ТожикиÑтон tj +Tadjikistan tj +å¡”å‰å…‹æ–¯å¦ tj +å¡”å‰å…‹ tj +Tokelau tk +توكيلاو tk +Такелау tk +Токело tk +টোকেলো tk +Tokelo tk +Tocelaw tk +Τοκελάου tk +Tokelao tk +توکلائو tk +Na hOileáin Tócala tk +טוקל×ו tk +तोकेलाऊ tk +Tókelá tk +ニュージーランド自治領トケラウ tk +ážáž¼áž€áŸáž¡áž¼ tk +토켈로 tk +ເບລາລັສ tk +Токелау tk +Токелау tk +Tokelaw tk +ਤੋਕੀਲਾਉ tk +Токелау tk +Tokelawu tk +Токелау tk +டோகேலா tk +Токилау tk +โทเคเลา tk +Tokelauça tk +Токелау tk +Токелау tk +托克劳 tk +托克勞 tk +Turkmenistan tm +تركمانستان tm +TürkmÉ™nistan tm +ТуркмÑніÑтан tm +ТуркмениÑтан tm +তà§à¦°à§à¦•মেনিসà§à¦¤à¦¾à¦¨ tm +Turcmenistan tm +Turkmenistán tm +Twrcmenistan tm +ΤουÏκμενιστάν tm +Turkmenujo tm +Turkmenistán tm +Türkmenistan tm +ترکمنستان tm +Turkménistan tm +An Tuircméanastáin tm +Turkmenistán tm +טורקמניסטן tm +तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨ tm +Türkmenisztán tm +Túrkmenistan tm +トルクメニスタン tm +ទួគមáŸáž“ីស្ážáž„់ tm +투르í¬ë©”니스탄 tm +ຕຸລະàºàºµ tm +TurkmenistÄna tm +ТуркмениÑтан tm +ТуркменÑтан tm +ਤà©à¨°à¨•ੇਮਸਤਾਨ tm +Turquemenistão tm +Turcomenistão tm +Turcmenistan tm +ТуркмениÑтан tm +Turikimenisitani tm +ТуркмениÑтан tm +தà¯à®°à¯à®•à¯à®®à¯†à®©à®¿à®¸à¯à®¤à®¾à®©à¯ tm +ТуркманиÑтон tm +เตอร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน tm +Türkmenistan tm +ТуркменіÑтан tm +ТуркманиÑтон tm +Turcmenistan tm +åœŸåº“æ›¼æ–¯å¦ tm +土庫曼 tm +Tunisia tn +Tunisië tn +تونس tn +Tunis tn +Ð¢ÑƒÐ½Ñ–Ñ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +টিউনিসিয়া tn +Tunizi tn +Tunis tn +Tunísia tn +Tunisko tn +Tiwnisia tn +Tunesien tn +Tunesien tn +Τυνησία tn +Tunizio tn +Túnez tn +Tuneesia tn +تونس tn +Tunesia tn +Tunisie tn +Tunisie tn +An Túinéis tn +Túnez tn +תוניסיה tn +टà¥à¤¯à¥‚नीशिया tn +Tunis tn +Tunézia tn +Túnis tn +ãƒãƒ¥ãƒ‹ã‚¸ã‚¢ tn +ទុយនáŸážŸáŸŠáž¸ tn +튀니지 tn +ລັດເຊີຠtn +Tunisas tn +Tunisija tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tuneżija tn +Tunesien tn +Tunisie tn +ਟà©à¨¨à©€à¨¶à©€à¨† tn +Tunezja tn +Tunísia tn +Tunísia tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tuniziya tn +Tunisko tn +Tunizija tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tunis tn +I-Tunisia tn +Tunisien tn +தà¯à®©à®¿à®šà®¿à®¯à®¾ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +ตูนีเซีย tn +Tunus tn +Ð¢ÑƒÐ½Ñ–Ñ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tunizeye tn +çªå°¼æ–¯ tn +çªå°¼è¥¿äºž tn +Tonga to +تونغا to +Tonqa to +Тонга to +Тонга to +টোংগা to +Inizi Tonga to +Τόνγκα to +Tongo to +تونگو to +טונגה to +टोंगा to +トンガ to +ážáž»áž„ហ្គោ to +통가 to +ໂຊນາ to +Тонга to +Тонга to +ਟਾਂਗਾ to +Тонга to +Тонга to +டோஙà¯à®•ா to +Тонго to +ตองà¸à¹‰à¸² to +Тонга to +Тонга to +汤加 to +æ±åŠ  to +East Timor tp +Oos Timor tp +تيمور الشرقية tp +Şərqi Timor tp +УÑходні Тымор tp +Източен Тимор tp +পূরà§à¦¬ টিমর tp +Timor reter tp +IstoÄni Timor tp +Timor Est tp +Východní Timor tp +Dwyrain Timor tp +Østtimor tp +Ost-Timor tp +Ανατολικό Î¤Î¹Î¼ÏŒÏ tp +Orienta Timoro tp +Timor oriental tp +Ida-Timor tp +Ekialdeko Timor tp +تیمور شرقی tp +Itä-Timor tp +Timor oriental tp +Oost Timor tp +Tíomór Thoir tp +Timor do Leste tp +מזרח טימור tp +पूरà¥à¤µà¥€ तिमोर tp +IstoÄni Timor tp +Kelet-Timor tp +Austur-Tímor tp +Timor Est tp +æ±ãƒ†ã‚£ãƒ¢ãƒ¼ãƒ« tp +ទីមáŸážšâ€‹ážáž¶áž„​កើហtp +ë™í‹°ëª¨ë¥´ tp +ວັນà»àº¥àº°à»€àº§àº¥àº² tp +Rytų Timoras tp +Austrumtimora tp +ИÑточен Тимор tp +Зүүн тимор tp +Timor Timur tp +Timor tal-Lvant tp +Øst-Timor tp +Oosttimor tp +Oost Timor tp +Aust-Timor tp +ਪੂਰਬੀ ਤਾਮੋਰ tp +Timor Wschodni tp +Timor Leste tp +Timor Leste tp +Timorul de Est tp +ВоÑточный Тимор tp +Timoro y'Uburasirazuba tp +Nuorta-Timor tp +Východný Timor tp +Vzhodni Timor tp +ИÑточни Тимор tp +IstoÄni Timor tp +Östtimor tp +கிழகà¯à®•௠திமார௠tp +Тимури Шарқ tp +ติมอร์ตะวันออภtp +DoÄŸu Timur tp +Çığış Timor tp +Східний Тімор tp +Шарқий Тимур tp +Äông Timo tp +Timor Ess tp +ä¸œå¸æ±¶ tp +æ±å¸æ±¶ tp +Turkey tr +Turkeye tr +تركيا tr +TürkiyÉ™ tr +Ð¢ÑƒÑ€Ñ†Ñ‹Ñ tr +Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr +তà§à¦°à§à¦•à§€ tr +Turkia tr +Turska tr +Turquia tr +Turecko tr +Twrci tr +Tyrkiet tr +Türkei tr +ΤουÏκία tr +Turkujo tr +Turquía tr +Türgi tr +Turkia tr +ترکیه tr +Turkki tr +Turkaland tr +Turquie tr +Turkije tr +An Tuirc tr +Turquia tr +טורקיה tr +तà¥à¤°à¥à¤•ी tr +Turska tr +Törökország tr +Turki tr +Tyrkland tr +Turchia tr +トルコ tr +ទួរគី tr +터키 tr +ຕຸລະàºàºµ tr +Turkija tr +Turcija tr +Турција tr +Турк tr +Turki tr +Turkija tr +Tyrkia tr +Törkei tr +Turkije tr +Tyrkia tr +Turquia tr +ਤà©à¨°à¨•à©€ tr +Turcja tr +Turquia tr +Turquia tr +Turcia tr +Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr +Turukiya tr +Durka tr +Turecko tr +TurÄija tr +ТурÑка tr +Turska tr +I-Turkey tr +Turkiet tr +தà¯à®°à¯à®•à¯à®•ி tr +Туркиё tr +ตุรà¸à¸µ tr +Türkiye tr +Törkiä tr +Туреччина tr +Ð¢ÑƒÑ€ÐºÐ¸Ñ tr +Thổ NhÄ© Kì tr +Turkeye tr +土耳其 tr +土耳其 tr +Trinidad and Tobago tt +Trinidad en Tobago tt +ترينيداد Ùˆ توباغو tt +Trinidad vÉ™ Tabaqo tt +Трынідад Ñ– Табага tt +Тринидад и Тобаго tt +তà§à¦°à¦¿à¦¨à¦¿à¦¦à¦¾à¦¦ à¦à¦¬à¦‚ টোবাগো tt +Trinidad ha Tobago tt +Trinidad i Tobago tt +Trinidad i Tobago tt +Trinidad a Tobago tt +Ynysoedd Trinidad a Thobago tt +Trinidad og Tobago tt +Trinidad und Tobago tt +ΤÏίνινταντ και Τομπάγκο tt +Trinidado kaj Tobago tt +Trinidad y Tobago tt +Trinidad ja Tobago tt +Trinidad eta Tobago tt +ترینیداد Ùˆ ØªÙØ¨Ø§Ú¯Ùˆ tt +Trinidad ja Tobago tt +Trinidad og Tobago tt +Trinidad et Tobago tt +Trinidad en Tobago tt +Oileán na Tríonóide agus Tobága tt +Trinidade e Tobago tt +טרינידד וטובגו tt +टà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ और टोबैगो tt +Trinidad i Tobago tt +Trinidad és Tobago tt +Trinidad dan Tobago tt +Trínidad og Tóbagó tt +Trinidad e Tobago tt +トリニダードトãƒã‚³ tt +ទ្រីនីដាដ និង​​ ážáž¼áž”ាហ្គោ tt +트리니다드 토바고 tt +ຕີນິà»àº”ດà»àº¥àº°à»‚ທບາໂຠtt +Trinidadas ir Tobagas tt +Trinidada un Tobago tt +Тринидад и Тобаго tt +Тринида ба Тобаго tt +Trinidad dan Tobago tt +Trinidad u Tobago tt +Trinidad og Tobago tt +Trinidad un Tobago tt +Trinidad en Tobago tt +Trinidad og Tobago tt +Trinidad le Tobago tt +Trinidad e Tobago tt +ਤਰੀਨੀਡਾਡ ਤੇ ਤੋਬਾਗੋ tt +Trinidad i Tobago tt +Trindade e Tobago tt +Trinidad e Tobago tt +Trinidad ÅŸi Tobago tt +Тринидад и Тобаго tt +Tirinida na Tobago tt +Trinidad ja Tobago tt +Trinidad a Tobago tt +Trinidad in Tabago tt +Тринидад и Тобаго tt +Trinidad i Tobago tt +I-Trinidad kanye neTobago tt +Trinidad och Tobago tt +டà¯à®°à®¿à®©à®¿à®Ÿà®¾à®Ÿà¯ & டொபாகோ tt +Туриндод ва Тубогу tt +ตรีนิà¹à¸”ดà¹à¸¥à¸°à¹‚ทบาโภtt +Trinidad veTabago tt +Trinidad wä Tobago tt +РеÑпубліка Трінідад та Тобаго tt +Тринидад ва Тобаго tt +Trinidad na Tobago tt +Trinidad và Tobago tt +Trinité et Tobago tt +Trinidad ne Tobago tt +特立尼达和多巴哥 tt +åƒé‡Œé”åŠæ‰˜è²å“¥ tt +Trinidad knaye ne-Tobago tt +Tuvalu tv +ØªÙˆÙØ§Ù„Ùˆ tv +Тувалу tv +Тувалу tv +টà§à¦­à¦¾à¦²à§ tv +Twfalw tv +Î¤Î¿Ï…Î²Î±Î»Î¿Ï tv +Tuvalo tv +توالو tv +טוב×לו tv +तà¥à¤µà¤¾à¤²à¥‚ tv +Túvalú tv +ツãƒãƒ« tv +ទុយវ៉ាលុយ tv +투발루 tv +ຊູລູ tv +Тувалу tv +Тувалу tv +ਤà©à¨µà¨¾à¨²à©‚ tv +Тувалу tv +Тувалу tv +தà¯à®µà®²à¯ tv +Тувалу tv +ตูวาลู tv +Tuvaluça tv +Тувалу tv +Тувалу tv +Touvalou tv +å›¾ç“¦å¢ tv +å瓦魯 tv +Taiwan tw +تايوان tw +Tayvan tw +Тайвань tw +Тайван tw +তাইওয়ান tw +Tajvan tw +Ταϊβάν tw +Tajvano tw +Taiwán tw +تایوان tw +Taivan tw +Taïwan tw +An Téaváin tw +Taiwán tw +טיוו×ן tw +ताईवान tw +Tajvan tw +Tajvan tw +Taívan tw +å°æ¹¾ tw +ážáŸƒážœáŸ‰áž¶áž“់ tw +대만 tw +ໃຕ້ຫວັນ tw +Taivanis tw +TaivÄna tw +Тајван tw +Тайван tw +Tajwan tw +ਤਾਈਵਾਨ tw +Tajwan tw +Formosa tw +Taivan tw +Тайвань tw +Tayiwani tw +Tajvan tw +Тајван tw +Tajvan tw +I-Taiwan tw +தாயà¯à®µà®¾à®©à¯ tw +Тойвон tw +ไต้หวัน tw +Tayvan tw +Taywan tw +Тайвань tw +Тайван tw +Äài Loan tw +䏭国尿¹¾ tw +å°ç£ tw +Tanzania, United Republic of tz +Tanzanië, Vereenigde Republiek van tz +جمهورية تنزانيا المتحدة tz +Tanzaniya tz +Ð—Ð»ÑƒÑ‡Ð°Ð½Ð°Ñ Ð ÑÑпубліка Ð¢Ð°Ð½Ð·Ð°Ð½Ñ–Ñ tz +Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz +তানজানিয়া tz +Tanzanija, Ujedinjena Republika tz +Tanzània, República Unida de tz +Tanzánie tz +Tansania, Gweriniaeth Unedig tz +Tanzania tz +Tansania, vereinigte Republik tz +Τανζανία, Ενωμένη δημοκÏατία της tz +Tanzanio, UnuiÄinta Respubliko de tz +Tanzania, Republica de tz +Tansaania tz +Tanaziar Errepublika Batua tz +جمهوری متحده تانزانیا tz +Tansanian yhdistäytynyt tasavalta tz +Tanzanie, République unie de tz +Tanzanië, Ferienigd republyk fan tz +An Tansáin tz +República Unida de Tanzánia tz +טנזניה, הרפובליקה המ×וחדת של tz +तंजानिया यूनाइटेड रिपबà¥à¤²à¤¿à¤• tz +Ujedinjena Republika Tanzanija tz +Tanzánia tz +Tansanía tz +Tanzania tz +タンザニア,共和国連邦 tz +ážáž„់ហ្សានី tz +탄ìžë‹ˆì•„ 합중국 tz +ໂດມິນິàºàº±àº™ tz +Tanzanijos Respublika tz +TanzÄnija tz +Танзанија, Обединета Република tz +Танканы нÑгдÑÑн ÑƒÐ»Ñ tz +Republik Bersatu Tanzania tz +Tanżania tz +Tanzania tz +Tansania tz +Tanzania, Verenigde republiek van tz +Tanzania tz +ਤਾਨਜ਼ੂਈਆ, ਸੰਯà©à¨•ਤ ਗਣਰਾਜ tz +Zjednoczna Republika Tanzanii tz +República da União da Tanzânia tz +República da Tanzânia tz +Tanzania, Republica Unită tz +Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz +Tanzaniya, Repubulika Yunze Ubumwe ya tz +Tanzania tz +Tanzánia, Spojená republika tz +Tanzanija, Združena republika tz +Танзанија, Уједињена Република tz +Tanzanija, Ujedinjena Republika tz +Förenade republiken Tanzania tz +டானà¯à®œà®¾à®¨à®¿à®¯à®¾, à®à®•à¯à®•ிய கà¯à®Ÿà®¿à®¯à®°à®šà¯ tz +Ҷумҳурии Муттаҳидаи Тонзониё tz +สาธารณรัà¸à¹à¸—นซาเนีย tz +Tanzanya tz +Tanzania, Berläşkän Cömhüriätläre tz +ТанзаніÑ, об'єднана реÑпубліка tz +Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ Ð‘Ð¸Ñ€Ð»Ð°ÑˆÐ³Ð°Ð½ РеÑпубликаÑи tz +Tanzania, Cá»™ng hoà thống nhât tz +Tanzaneye tz +妿¡‘尼亚è”åˆå…±å’Œå›½ tz +å¦å°šå°¼äºž tz +Ukraine ua +Ukraïne ua +أوكرانيا ua +Ukrayna ua +Украіна ua +Украйна ua +ইউকà§à¦°à§‡à¦¨ ua +Ukraina ua +Ukrajina ua +Ucraïna ua +Ukrajina ua +Wcr?in ua +ΟυκÏανία ua +Ukrainio ua +Ucrania ua +Ukraina ua +Ukrania ua +اکراین ua +Ukraina ua +Ukraina ua +Oekraïne ua +An Úcráin ua +Ucrania ua +×וקר××™× ×” ua +उकà¥à¤°à¥‡à¤¨ ua +Ukrajina ua +Ukrajna ua +Ukraina ua +Úkraína ua +Ucraina ua +ウクライナ ua +អ៊ុយក្រែន ua +ìš°í¬ë¼ì´ë‚˜ ua +àºàº¹à»€àº„ຣນ ua +Ukraina ua +Ukraina ua +Украина ua +Украйн ua +Ukranja ua +Ukraina ua +Oekraïne ua +Ukraina ua +Ucraina ua +ਯੂਕਰੇਨ ua +Ukraina ua +Ucrânia ua +Ucrânia ua +Ucraina ua +Украина ua +Ukerene ua +Ukraina ua +Ukrajina ua +Ukrajina ua +Украјина ua +Ukrajina ua +I-Ukraine ua +Ukraina ua +உகà¯à®°à¯†à®¯à¯à®©à¯ ua +Украина ua +ยูเครน ua +Ukrayna ua +Ukrain ua +Україна ua +Украина ua +Ukraina ua +Oucrinne ua +乌克兰 ua +çƒå…‹è˜­ ua +Uganda ug +أوغندا ug +Uqanda ug +Уганда ug +Уганда ug +ইউগাণà§à¦¡à¦¾ ug +Ouganda ug +Wganda ug +Ουγκάντα ug +Ugando ug +اوگاندا ug +Ouganda ug +×וגנדה ug +उगांडा ug +Úganda ug +ウガンダ ug +អ៊ូហ្គង់ដា ug +우간다 ug +à»àºžàº™àº”້າ ug +Уганда ug +Уганда ug +ਯੂਗਾਂਡਾ ug +Уганда ug +Уганда ug +உகானà¯à®Ÿà®¾ ug +Угондо ug +ยูà¸à¸±à¸™à¸”า ug +Уганда ug +Уганда ug +Ouganda ug +乌干达 ug +çƒå¹²é” ug +United States of America us +Vereenigde State van Amerika us +الولايات المتحدة الأمريكية us +Amerika BirləşmiÅŸ Åžtatları us +Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ ÐмÑрыкі us +СÐЩ us +মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° us +Stadoù-Unanet Amerika us +Sjedinjene AmeriÄke Države us +Estats Units d'Amèrica us +Spojené státy americké us +Unol Daleithau America us +USA us +USA us +Ηνωμένες Πολιτείες της ΑμεÏικής us +Usono us +Estados Unidos de América us +Ameerika Ühendriigid us +Ameriketako Estatu Batuak us +ایالات متحده‌ی آمریکا us +Yhdysvallat us +Sambandsríki Amerika (USA) us +États Unis d'Amérique us +Ferienigde Staten fan Amerika us +Stáit Aontaithe Mheiriceá us +Estados Unidos de América us +×רצות הברית us +संयà¥à¤•à¥à¤¤ राजà¥à¤¯ अमेरिका us +Sjedinjene AmeriÄke Države us +Amerikai Egyesült Ãllamok us +Amerika Serikat us +Bandaríkin us +Stati Uniti d'America us +アメリカåˆè¡†å›½ us +សហរដ្ឋអាមáŸážšáž·áž€ us +미 합중국 us +ສະຫະລັດອາເມລິàºàº² us +JungtinÄ—s Amerikos Valstijos us +Amerikas SavienotÄs Valstis us +Соединети ÐмериканÑки Држави us +ÐÐУ us +Amerika Syarikat us +Stati Uniti us +USA us +Vereenigte Staten vun Amerika us +Verenigde Staten van Amerika us +USA us +Estats Units d'Amèrica us +ਸੰਯà©à¨•ਤ ਰਾਜ ਅਮਰੀਕਾ us +Stany Zjednoczone Ameryki us +Estados Unidos da América us +Estados Unidos da América us +Statele Unite ale Americii us +Соединённые Штаты Ðмерики us +Leta Zunze Ubumwe z'Amerika us +Amerihká ovttastuvvan stáhtat us +USA us +Združene države Amerike us +Сједињене америчке државе us +Sjedinjene ameriÄke države us +I-United States of America us +Amerikas förenta stater us +à®à®•à¯à®•ிய அமெரிகà¯à®•ா us +Иёлоти Муттаҳидаи Ðмрико us +สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² us +Amerika BirleÅŸik Devletleri us +Amerika QuÅŸma Åžtatları us +СШРus +Ðмерика Қўшма Штатлари us +mashango o tangananaho a America us +Hợp chá»§ng quốc Hoa Kỳ us +Estats Unis us +United States ye Melika us +美国 us +美利堅åˆçœ¾åœ‹ us +Uruguay uy +الأوروغواي uy +Uruqvay uy +Уругвай uy +Уругвай uy +উরà§à¦—à§à§Ÿà§‡ uy +Urugvaj uy +Uruguai uy +Wrwgw?i uy +ΟυÏουγουάη uy +Urugvajo uy +Uruguai uy +اروگویه uy +Uragua uy +Uruguai uy +×ורוגו××™ uy +उरूगà¥à¤µà¥‡ uy +Urugvaj uy +Úrúgvæ uy +ウルグアイ uy +អ៊ុយរុយហ្គាយ uy +ìš°ë£¨ê³¼ì´ uy +ອຸລຸàºàºàº§àº uy +Urugvajus uy +Urugvaja uy +Уругвај uy +Уругвай uy +Urugwaj uy +Uruguai uy +ਉਰੂਗਵੇ uy +Urugwaj uy +Uruguai uy +Uruguai uy +Uruguai uy +Уругвай uy +Irigwe uy +Uruguaj uy +Urugvaj uy +Уругвај uy +Urugvaj uy +I-Uruguay uy +உரà¯à®•à¯à®µà¯‡ uy +Уругвай uy +อุรุà¸à¸§à¸±à¸¢ uy +Уругвай uy +Уругвай uy +Ourougway uy +乌拉圭 uy +çƒæ‹‰åœ­ uy +Uzbekistan uz +أوزبكستان uz +ÖzbÉ™kistan uz +УзбÑкіÑтан uz +УзбекиÑтан uz +উজবেকিসà§à¦¤à¦¾à¦¨ uz +Ouzbekistan uz +Uzbekistán uz +Wsbecist?n uz +Usbekistan uz +Ουζμπεκιστάν uz +Uzbekujo uz +Uzbekistán uz +Usbekistan uz +ازبکستان uz +Ouzbékistan uz +Úisbéiceastáin uz +Uzbekistán uz +×וזבקיסטן uz +उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨ uz +Üzbegisztán uz +Úsbekistan uz +ウズベキスタン uz +អ៊ូហ្សបáŸáž‚ីស្ážáž„់ uz +우즈베키스탄 uz +ເດນ່ງນ uz +UzbekistÄna uz +УзбекиÑтан uz +УзбекÑтан uz +Użbekistan uz +Usbekistan uz +Usbekistan uz +Usbekistan uz +ਉਜ਼ੇਬਕਸਤਾਨ uz +Uzbequistão uz +Uzbequistão uz +УзбекиÑтан uz +Uzibekisitani uz +Usbekistan uz +УзбекиÑтан uz +உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯ uz +ӮзбекиÑтон uz +อุซเบà¸à¸´à¸ªà¸–าน uz +Özbekistan uz +Özbäkstan uz +УзбекиÑтан uz +ЎзбекиÑтон uz +Ouzbekistan uz +ä¹Œå…¹åˆ«å…‹æ–¯å¦ uz +çƒèŒ²åˆ¥å…‹ uz +Vatican City va +Vatikaan Stad va +مدينة Ø§Ù„ÙØ§ØªÙŠÙƒØ§Ù† va +Vatican ŞəhÉ™ri va +Ватыкан va +Ватикана va +ভà§à¦¯à¦¾à¦Ÿà¦¿à¦•ান সিটি va +Ker Vatikan va +Vatikan va +Ciutat del Vaticà va +Vatikán va +Dinas y Fatican va +Vatikanstaten va +Vatikanstadt va +Βατικανό va +Vatikano va +Vaticano va +Vatikan va +Batikano Hiria va +شهر واتیکان va +Vatikaani va +Vatican va +Vaticaanstad va +An Chathaoir Naofa va +Cidade do Vaticano va +הוותיקן va +वेटिकन सिटी va +Vatikan va +Vatikán va +Vatíkanið va +Città del Vaticano va +ãƒãƒã‚«ãƒ³å¸‚国 va +ក្រុង​វ៉ាទីកង់ va +바티칸 시티 va +ລັດເວີຠva +VatikÄns va +Ватикан va +Ватикан Ñити va +Vatikan va +Vatikanstaten va +Vatikaan va +Vaticaanstad va +Vatikanstaten va +ਵਾਟੀਕੇਨ ਸਿਟੀ va +Watykan va +Cidade do Vaticano va +Cidade do Vaticano va +Vatican, OraÅŸul va +Ватикан va +Umujyi wa Vatikani va +Vatikanstáhta va +Vatikán va +Vatikan va +Ватикан va +Vatikan va +Vatikanstaten va +வாடிகன௠நகரம௠va +Шаҳри Ватикан va +นครรัà¸à¸§à¸²à¸•ิà¸à¸±à¸™ va +Vatikan va +Vatikan va +Ватікан va +Ватикан Шаҳри va +Thành phố Vatican va +Vatican va +梵蒂冈 va +梵諦岡城 va +St. Vincent and the Grenadines vc +St. Vincent en die Grenadene vc +سانت Ùينسنت Ùˆ الغرينادين vc +St. Vincent vÉ™ Grenadines vc +СÑнт-ВінÑÑнт Ñ– ГрÑнадыны vc +Св. ВинÑет и Гренадините vc +সেনà§à¦Ÿ ভিনসেনà§à¦Ÿ ও গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¿à¦¨ vc +S. Visant hag ar Grenadinez vc +Sveti Vincent i Grenadini vc +St. Vincent i les Granadines vc +St. Vincent a Grenadiny vc +Ynysoedd St. Finsent a'r Grenadinau vc +St. Vincent og Grenadinerne vc +St. Vincent und Grenadinen vc +Άγιος Βικέντιος και ΓÏεναδίνες vc +Sent-Vincento kaj la Grenadinoj vc +San Vicente y las Granadinas vc +St. Vincent ja Grenadiinid vc +St. Vincent eta Grenadines vc +سن وینسن Ùˆ گرادینس vc +St. Vincent ja Grenadiinit vc +Sankta Vinsent og Grenadinoyggjar vc +St Vincent et les Grenadines vc +St. Vincent en de Grenadines vc +St. Vincent agus Grenadines vc +Santo Vicente e as Granadinas vc +סנט וינסנט ×•×”×’×¨× ×“×™× ×™× vc +सेंट विंसेंट तथा गà¥à¤°à¥‡à¤¨à¥‡à¤¡à¤¾à¤‡à¤¨à¥à¤¸ vc +St. Vincent és Grenadines vc +St. Vincent dan the Grenadines vc +Sankti Vinsent og Grenadíneyjar vc +Saint Vincent e Grenadines vc +セントヴィンセントグレナディン vc +សង់វាំងសង់ និង ​ហ្គ្រីណាឌីន vc +세ì¸íЏ 빈센트 그레나딘 vc +ເຊີນວິນà»àºŠàº™ à»àº¥àº°à»€àºàº™àº²àº”ີນ vc +Å v. Vincentas ir Grenadinai vc +Sentvinsenta un GrenadÄ«nes vc +Св. ВинÑент и Гренадите vc +St. ВинÑент ба Гренадин vc +St. Vincent dan Grenadines vc +St. VinÄ‹enz u l-Grenadini vc +St. Vincent og Grenadinene vc +St. Vincent un de Grenadinen vc +St. Vincent en de Grenadines vc +St. Vincent og Grenadinane vc +St. Vincent le Grenadines vc +St. Vincent e les Granadines vc +ਸੇਂਟ ਵੀਨਸੈਂਟ ਤੇ ਗਰੀਨਾਜੀਨਸ vc +St. Vincent i Grenadyny vc +São Vicente e Granadinas vc +São Vicente e Grenadines vc +Sf. Vincent ÅŸi Grenadines vc +Сент-ВинÑент и Гренадины vc +Mutagatifu Visenti na Gerenadine vc +St. Vincent ja the Grenadiinnat vc +St. Vincent a Grenadines vc +Sv. Vincent in Grenadini vc +Св. ВинÑент и Гренадини vc +Sv. Vinsent i Grenadini vc +I-St. Vincent and the Grenadines vc +St. Vincent och Grenadinerna vc +செயினà¯à®Ÿà¯ வினà¯à®šà¯†à®©à¯à®Ÿà¯ மறà¯à®±à¯à®®à¯ கà¯à®°à¯€à®©à®¾à®Ÿà¯ˆà®©à¯à®¸à¯ vc +Синт ВинÑент ва Гренадина vc +เà¸à¸²à¸°à¹€à¸‹à¸™à¸•์วินเซนต์ vc +St. Vincent ve Grenadines vc +Sain Vinsent wä Grenadinnär vc +Сент-ВінÑент Ñ– Гренадіни vc +Сент-ВинÑент ва Гренадина vc +St. Vincent na Grenadines vc +St. Vincent và Grenadines vc +St. Vincint et les Grenadines vc +St. Vincent ne Grenadines vc +åœ£æ–‡æ£®ç‰¹å’Œæ ¼æž—çº³ä¸æ–¯ vc +è–æ–‡æ£®åŠæ ¼ç´é‚£ä¸ vc +I-St. Vincent kanye ne-Grenadines vc +Venezuela ve +Ùنزويلا ve +Venesuella ve +Ð’ÑнÑÑуÑла ve +ВенеÑуела ve +ভেনেজà§à§Ÿà§‡à¦²à¦¾ ve +Venecuela ve +Veneçuela ve +Feneswela ve +Βενεζουέλα ve +Venezuelo ve +Venetsueela ve +ونزویلا ve +Venesuela ve +Vénézuela ve +Veiniséala ve +ונצו×לה ve +वेनेजà¥à¤à¤²à¤¾ ve +Venecuela ve +Venesúela ve +ベãƒã‚ºã‚§ãƒ© ve +ážœáŸážŽáŸáž áŸ’សុ៊យអáŸáž¡áž¶ ve +ë² ë„¤ìˆ˜ì—˜ë¼ ve +ເວເນຊຸເອລາ ve +Venesuela ve +VenecuÄ“la ve +Венецуела ve +ВинеÑÑуел ve +Veneżwela ve +ਵੈਂਨਜ਼ੂà¨à¨²à¨¾ ve +Wenezuela ve +ВенеÑуÑла ve +Venezuwela ve +Венецуела ve +Venecuela ve +I-Venezuela ve +வெனிசà¯à®²à®¾ ve +ВинизуÑлло ve +เวเนซุเอลา ve +ВенеÑуела ve +ВенеÑуÑла ve +Venezwela ve +委内瑞拉 ve +委內瑞拉 ve +Virgin Islands, British vg +Virgin Eilande, Brits vg +الجزر العذراء, بريطانيا vg +Virgin Adaları, Britanya vg +БрытанÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vg +БританÑки ВирджинÑки оÑтрови vg +ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ vg +DjeviÄanska ostrva, Britanska vg +Illes Verges, Angleses vg +Ynysoedd yr Wyryf, Prydeinig vg +Britiske jomfruøer vg +Virgin-Inseln, britisch vg +ΠαÏθένοι Îήσοι, Î’Ïετανικές vg +Virgininsuloj, Britaj vg +Islas Vírgenes Británicas vg +Briti Neitsisaared vg +Britaniar Irla Birjinak vg +جزایر ویرجین انگلیسی vg +Brittien Neitsytsaaret vg +ÃŽles Vierges britanniques vg +Virgin Eilannen, Britse vg +Oileáin Bhriotanacha na Maighdean vg +Illas Virxes, Británicas vg +××™×™ הבתולה, בריטי vg +वरà¥à¤œà¤¿à¤¨ आइलैंड, बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ vg +DjeviÄansko otoÄje, Britanski vg +Virgin-szigetek (brit) vg +Bresku Jómfrúareyjar vg +Isole Vergini Britanniche vg +英領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vg +កោះ​ស្មោង អង់គ្លáŸážŸ vg +ì˜êµ­ë ¹ 버진 ì œë„ vg +Britu Virdžinu salas vg +ДевÑтвени ОÑтрови, БританÑки vg +Виржин арлууд, британи vg +Kepulauan Virgin, British vg +Jomfruøyene (Storbritannia) vg +Britsche Jumferninseln vg +Virgin Eilanden, Britse vg +Jomfruøyane (Storbritannia) vg +ਵੀਰਗੀਨ ਟਾਪੂ, ਬਰਤਾਨੀਆ vg +Wyspy Dziewicze (Brytyjskie) vg +Ilhas Virgens, Inglaterra vg +Ilhas Virgens, Inglaterra vg +Insulele Virgine, Anglia vg +ВиргинÑкие БританÑкие оÑтрова vg +Ibirwa by'Isugi, Nyongereza vg +Panenské Ostrovy, Britské vg +DeviÅ¡ki otoki, Britanski vg +ДевичанÑка оÑтрва, БританÑка vg +DeviÄanska ostrva, Britanska vg +Brittiska Jungfruöarna vg +விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, பிரிடà¯à®Ÿà®¿à®·à¯ vg +Ҷазираи ВирҷиниÑ, Бритониё vg +หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, อังà¸à¸¤à¸© vg +Virgin Adaları (İngiltere) vg +Virgin Utrawları, Britan vg +ВіргінÑькі оÑтрови (БританіÑ) vg +ÐÐ½Ð³Ð»Ð¸Ñ Ð’Ð¸Ñ€Ð¶Ð¸Ð½ Ороллари vg +Quần đảo Trinh nữ, Vưong quốc Anh vg +Iyes Viedjes, britanikes vg +英属维京群岛 vg +英屬維爾京群島 vg +Virgin Islands, U.S. vi +Virgin Eilande, VSA vi +الجزر العذراء, الولايات المتحدة vi +Virgin Adaları, ABÅž vi +ÐмÑрыканÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vi +ÐмериканÑки ВирджинÑки оÑтрови vi +ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° vi +DjeviÄanska ostrva, AmeriÄka vi +Illes Verges, Americanes vi +Panenské ostrovy, U.S. vi +Ynysoedd yr Wyryf, Americanaidd vi +Jomfruøerne vi +Virgin-Inseln, amerikanisch vi +ΠαÏθένοι Îήσοι, Η.Π.A. vi +Virgininsuloj, Usonaj vi +Islas Vírgenes Americanas vi +USA Neitsisaared vi +Estatu Batuar Irla Birjinak vi +جزایر ویرجین امریکا. vi +USA:n Neitsytsaaret vi +ÃŽles Vierges américaines vi +Virgin Eilannen, U.S. vi +Oileáin na Maighdean S.A.M. vi +Illas Virxes, U.S. vi +××™×™ הבתולה, ×רצות־הברית vi +वरà¥à¤œà¤¿à¤¨ आइलैंड, यू.à¤à¤¸. vi +DjeviÄansko otoÄje, SAD vi +Virgin-szigetek (USA) vi +Bandarísku Jómfrúareyjar vi +Isole Vergini Americane vi +米領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vi +កោះ​ស្មោង អាមáŸážšáž·áž€ vi +미국령 버진 ì œë„ vi +Virdžinu salas, ASV. vi +ДевÑтвени ОÑтрови, СÐД vi +Виржин арлууд, ÐÐУ vi +Kepulauan Virgin, U.S. vi +Jomfruøyene (USA) vi +Jumferninseln, U.S. vi +Virgin Eilanden, U.S. vi +Jomfruøyane (USA) vi +ਵੀਰਗੀਨ ਟਾਪੂ, ਅਮਰੀਕਾ vi +Wyspy Dziewicze (USA) vi +Ilhas Virgens, E.U.A. vi +Ilhas Virgens, EUA vi +Insulele Virgine, S.U.A. vi +ВиргинÑкие оÑтрова (СШÐ) vi +Ibirwa by'Isugi, U.S. vi +Panenské Ostrovy, Americké vi +DeviÅ¡ki otoki, ZDA vi +ДевичанÑка оÑтрва, СÐД vi +DeviÄanska ostrva, SAD vi +Amerikanska Jungfruöarna vi +விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, U.S. vi +Ҷазираи ВирҷиниÑ, Ш.М.Ð vi +หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² vi +Virgin Adaları (ABD) vi +Virgin Utrawları, AQÅž vi +ВіргінÑькі оÑтрови (СШÐ) vi +ÐҚШ Виржин Ороллари vi +Quần đảo Trinh nữ, Hoa Kỳ vi +Iyes Viedjes, etazunyinnes vi +美属维京群岛 vi +美屬維爾京群島 vi +Vietnam vn +Viëtnam vn +Ùييتنام vn +Vyetnam vn +Віетнам vn +Виетнам vn +ভিয়েতনাম vn +Vijetnam vn +Panenské ostrovy, U.K. vn +Fiet-nam vn +Βιετνάμ vn +Vjetnamio vn +ویتنام vn +Viëtnam vn +Vítneam vn +וייטנ×× vn +विà¤à¤¤à¤¨à¤¾à¤® vn +Vijetnam vn +Víetnam vn +ベトナム vn +វៀážážŽáž¶áž˜ vn +베트남 vn +ຫວງດນາມ vn +Vietnamas vn +Vjetnama vn +Виетнам vn +Витнам vn +Vjetnam vn +Viëtnam vn +ਵੀਅਤਨਾਮ vn +Wietnam vn +Vietname vn +Vietnã vn +Вьетнам vn +Viyetinamu vn +Вијетнам vn +Vijetnam vn +I-Vietnam vn +வியடà¯à®¨à®¾à®®à¯ vn +Ветнам vn +เวียตนาม vn +Ð’'єтнам vn +Ветнам vn +Việt Nam vn +è¶Šå— vn +è¶Šå— vn +Vanuatu vu +ÙØ§Ù†ÙˆØ§ØªÙˆ vu +Вануату vu +Вануату vu +ভানà§à§Ÿà¦¾à¦Ÿà§ vu +Fanwatw vu +Βανουάτου vu +Vanuatuo vu +وانواتو vu +Vanuatú vu +ונו×טו vu +वनौतू vu +Vanúatú vu +ãƒãƒŒã‚¢ãƒ„ vu +វ៉ានុយអាទុយ vu +바누아투 vu +ຈີນ vu +Вануату vu +Вануату vu +ਵਾਨà©à¨†à¨Ÿà©‚ vu +Vanatu vu +Вануату vu +Vanuwatu vu +Вануату vu +வனட௠vu +Вануату vu +à¹à¸§à¸™à¸±à¸§à¸•ู vu +Вануату vu +Вануату vu +瓦努阿图 vu +è¬é‚£æœ vu +Wallis and Futuna wf +Wallis en Futuna wf +واليس Ùˆ Ùوتونا wf +Vallis vÉ™ Futuna wf +ÐŽÐ¾Ð»Ñ–Ñ Ñ– Футуна wf +ОÑтрови Ð£Ð¾Ð»Ð¸Ñ Ð¸ Футина wf +ওয়ালিস à¦à¦¬à¦‚ ফà§à¦Ÿà§à¦¨à¦¾ wf +Wallis ha Futuna wf +Valis i Futuna wf +Wallis i Futuna wf +Wallis a Futuna wf +Ynysoedd Walis a Ffwtwna wf +Wallis- og Futuna-øerne wf +Wallis und Futuna wf +Βαλίς και ΦουτοÏνα wf +Valiso kaj Futuno wf +Wallis y Futuna wf +Wallis ja Futuna wf +Wallis eta Futuna wf +والیس Ùˆ Ùوتونا wf +Wallis ja Futuna wf +Wallis et Futuna wf +Wallis en Futuna wf +Bhailís agus Futúna wf +Wallis e Futuna wf +ו×ליס ופוטונה wf +वालिस तथा फà¥à¤¤à¥à¤¨à¤¾ wf +Wallis i Futuna wf +Wallis és Futuna wf +Wallis- og Fútúnaeyjar wf +Wallis e Futuna wf +ä»é ˜ãƒ¯ãƒªã‚¹ãƒ•ツナ諸島 wf +월리스 후투나 ì œë„ wf +ປັàºàº­àº´àº™àºžàº²àºš wf +Volisa salas un Futuna wf +Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf +ВилÑÐ¼Ñ Ð±Ð° футуна wf +Wallis dan Futuna wf +Wallis u Futuna wf +Wallis og Futuna wf +Wallis un Futuna wf +Wallis en Futuna wf +Wallis og Futuna wf +ਵਾਲਿਸ਼ ਤੇ ਫੂਟੂਨਾ wf +Wallis i Futuna wf +Wallis e Futuna wf +Wallis e Futuna wf +Wallis ÅŸi Futuna wf +ОÑтрова Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¸ Футуна wf +Walisi na Futuna wf +Wallis ja Futuna wf +Wallis a Futuna wf +Wallis in Futuna wf +Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf +Valis i Futuna wf +Wallis och Futuna wf +வாலிஸ௠மறà¯à®±à¯à®®à¯ பà¯à®¯à¯à®Ÿà®©à®¾ wf +УÑÐ»Ñ Ð²Ð° Футуна wf +วอลลิสà¹à¸¥à¸°à¸Ÿà¸¹à¸—ูนา wf +Wallis ve Futuna wf +Wallis wä Futuna wf +Ð£Ð¾Ð»Ð»Ð¸Ñ Ñ– Футуна wf +Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ð° Футуна Ороллари wf +Wallis và Futuna wf +Wallis et Futuna wf +瓦利斯和富图纳群岛 wf +瓦利斯群島和富圖ç´ç¾¤å³¶ wf +Samoa ws +ساموا ws +Самоа ws +Самоа ws +সামোয়া ws +Inizi Samoe ws +Σαμόα ws +Samoo ws +ساموآ ws +Samó ws +סמו××” ws +सामोआ ws +Szamoa ws +Samóa ws +サモア ws +សាមូអា ws +사모아 ì œë„ ws +ໂຊນາ ws +Самоа ws +Самолоа ws +ਸਾਮੋਆ ws +Самоа ws +Samowa ws +Самоа ws +சாமோயா ws +Самоа ws +ซามัว ws +Самоа ws +Самоа ws +Samowa ws +è¨æ‘©äºšç¾¤å²› ws +薩摩亞 ws +Yemen ye +اليمن ye +YÉ™mÉ™n ye +Емен ye +Йемен ye +ইয়েমেন ye +Ihlemeñ ye +Jemen ye +Iemen ye +Jemen ye +Yr Iemen ye +Jemen ye +Υεμένη ye +Jemeno ye +Jeemen ye +یمن ye +Jemen ye +Jemen ye +Jemen ye +Éimin ye +Iemen ye +תימן ye +यमन ye +Jemen ye +Jemen ye +Jemen ye +イエメン ye +áž™áŸáž˜áŸ‚áž“ ye +예멘 ye +ເດມອນ ye +Jemenas ye +Jemena ye +Јемен ye +Емен ye +Yaman ye +Jemen ye +Jemen ye +Jemen ye +Jemen ye +Jemen ye +ਯਮਨ ye +Jemen ye +Iémen ye +Йемен ye +Yemeni ye +Jemen ye +Jemen ye +Jemen ye +Јемен ye +Jemen ye +I-Yemen ye +Jemen ye +யேமன௠ye +Яман ye +เยเมน ye +Ємен ye +Яман ye +也门 ye +葉門 ye +Serbia and Montenegro yu +Serbië en Montenegro yu +Ð¡ÑŠÑ€Ð±Ð¸Ñ Ð¸ Черна гора yu +সারà§à¦¬à¦¿à§Ÿà¦¾ à¦à¦¬à¦‚ মনà§à¦Ÿà§‡à¦¨à¦¿à¦—à§à¦°à§‹ yu +Serbi ha Montenegro yu +Sèrbia i Montenegro yu +Srbsko a ÄŒerná hora yu +Serbien og Montenegro yu +Serbien und Montenegro yu +ΣεÏβία - ΜαυÏοβοÏνιο yu +Serbia y Montenegro yu +Serbia ja TÅ¡ernogooria yu +Serbia eta Montenegro yu +Serbia ja Montenegro yu +Serbie and Monténégro yu +Servië en Montenegro yu +Sérbia e Montenegro yu +Szerbia és Montenegró yu +Serbía og Svartfjallaland yu +Serbia e Montenegro yu +セルビアモンテãƒã‚°ãƒ­ yu +សែប៊ី និង ម៉ុងážáŸážŽáŸáž áŸ’ក្រូ yu +Serbija ir Juodkalnija yu +Србија и Црна Гора yu +Serbia og Montenegro yu +Serbien un Montenegro yu +Servië en Montenegro yu +Serbia og Montenegro yu +ਸਰਬੀਆ ਅਤੇ ਮਾਂਤਾਂਗਰੋ yu +Serbia i Czarnogóra yu +Sérvia e Montenegro yu +Sérvia e Montenegro yu +Ð¡ÐµÑ€Ð±Ð¸Ñ Ð¸ Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾Ñ€Ð¸Ñ yu +Seribiya na Montenegoro yu +Serbia ja Montenegro yu +Srbija in ÄŒrna gora yu +Србија и Црна Гора yu +Srbija i Crna Gora yu +Serbien och Montenegro yu +เซอร์เบีย à¹à¸¥à¸°à¸¡à¸­à¸™à¸•ิเนโà¸à¸£ yu +Sırbistan KaradaÄŸ yu +Serbia wä Montenegro yu +Ð¡ÐµÑ€Ð±Ñ–Ñ Ñ– Ð§Ð¾Ñ€Ð½Ð¾Ð³Ð¾Ñ€Ñ–Ñ yu +Ð¡ÐµÑ€Ð±Ð¸Ñ Ð²Ð° Монтенегро yu +塞尔维亚和黑山 yu +塞爾維亞和黑山 yu +South Africa za +Suid-Afrika za +جنوب Ø£ÙØ±ÙŠÙ‚يا za +CÉ™nubi Afrika za +ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ðфрыка za +Южна Ðфрика za +দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া za +Suafrika za +Južna Afrika za +Sudàfrica za +Jižní Afrika za +De Affrica za +Sydafrikanske republik za +Südafrika za +Îότια ΑφÏική za +Sudafriko za +Sudáfrica za +Lõuna-Aafrika za +Hego Afrika za +Ø¢ÙØ±ÛŒÙ‚ای جنوبی za +Etelä-Afrikka za +Suðurafrika za +Afrique du sud za +Sûd-Afrika za +An Afraic Theas za +Ãfrica do Sur za +×“×¨×•× ×פריקה za +दकà¥à¤·à¤¿à¤£à¥€ अफà¥à¤°à¥€à¤•ा za +Južna Afrika za +Dél-Afrika za +Afrika Selatan za +Suður-Afríka za +Sud Africa za +å—アフリカ za +អាហ្វ្រិក​ážáž¶áž„​ážáŸ’បូង za +남 아프리카 공화국 za +à»àº­àºšàºžàº´àºàº²à»ƒàº•້ za +Afrika, Pietų za +DienvidÄfrika za +Јужна Ðфрика za +Өмнөд африк za +Afrika Selatan za +Afrika t'Isfel za +Sør-Afrika za +Söödafrika za +Zuid-Afrika za +Sør-Afrika za +Afrika Borwa za +Sudafrica za +ਦੱਖਣੀ ਅਫਰੀਕਾ za +Afryka PoÅ‚udniowa za +Ãfrica do Sul za +Ãfrica do Sul za +Africa de Sud za +Ð®Ð¶Ð½Ð°Ñ Ðфрика za +Afurika Yepfo za +Lulli-Afrihká za +Južná Afrika za +Južna Afrika za +Јужна Ðфрика za +Južna Afrika za +I-South Africa za +Sydafrika za +தென௠ஆபà¯à®°à®¿à®•à¯à®•ா za +Ðфриқои Ҷанубӣ za +à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้ za +Güney Afrika za +Könyaq Afrika za +Південна Ðфрика za +Жанубий Ðфрика za +Afurika tshipembe za +Nam Phi za +Nonne Afrike za +Mzantsi Afrika za +å—éž za +å—éž za +Emzantsi Afrika za +Zambia zm +Zambië zm +زامبيا zm +Zambiya zm +Ð—Ð°Ð¼Ð±Ñ–Ñ zm +Ð—Ð°Ð¼Ð±Ð¸Ñ zm +জামবিয়া zm +Zambi zm +Zàmbia zm +Zambie zm +Sambia zm +Sambia zm +Ζάμπια zm +Zambio zm +Sambia zm +زامبیا zm +Sambia zm +Zambie zm +An tSaimbia zm +Zámbia zm +זמביה zm +ज़ामà¥à¤¬à¤¿à¤¯à¤¾ zm +Zambija zm +Sambía zm +ザンビア zm +ហ្សាំប៊ី zm +잠비아 zm +ຈາໄມàºàº²à»‰ zm +Zambija zm +Замбија zm +Замби zm +Å»ambia zm +Sambia zm +ਜੈਂਬੀਆ zm +Zâmbia zm +Zâmbia zm +Ð—Ð°Ð¼Ð±Ð¸Ñ zm +Zambiya zm +Zambija zm +Замбија zm +Zambija zm +ஜாமà¯à®ªà®¿à®¯à®¾ zm +Зомбиё zm +à¹à¸‹à¸¡à¹€à¸šà¸µà¸¢ zm +Ð—Ð°Ð¼Ð±Ñ–Ñ zm +Ð—Ð°Ð¼Ð±Ð¸Ñ zm +Zambeye zm +赞比亚 zm +尚比亞 zm +Zimbabwe zw +زيمبابوي zw +Zimbabve zw +Ð—Ñ‹Ð¼Ð±Ð°Ð±Ð²Ñ zw +Зимбабве zw +জিমà§à¦¬à¦¾à¦¬à§‹à§Ÿà§‡ zw +Zimbabve zw +Simbabwe zw +Simbabwe zw +Ζιμπάμπουε zw +Zimbabvo zw +زیمبابوه zw +An tSiombáib zw +Zimbabué zw +זימבבווה zw +जिमà¥à¤¬à¤¾à¤¬à¤µà¥‡ zw +Zimbabve zw +Simbabve zw +ジンãƒãƒ–エ zw +ហ្ស៊ីមបាបវ៉០zw +ì§ë°”브웨 zw +ລິຊາ zw +Zimbabve zw +Зимбабве zw +Замбабив zw +Å»imbabwe zw +Simbabwe zw +ਜਿੰਬਾਬਵੇਂ zw +Zimbabue zw +Зимбабве zw +Zimbabve zw +Зимбабве zw +Zimbabve zw +ஜிமà¯à®ªà®¾à®ªà¯‡ zw +Зимбобве zw +ซิมบับเว zw +Зімбабве zw +Зимбабве zw +Zimbabwè zw +津巴布韦 zw +è¾›å·´å¨ zw +Czech Republic cz diff --git a/tdeabc/distributionlist.cpp b/tdeabc/distributionlist.cpp new file mode 100644 index 000000000..ee058ecdf --- /dev/null +++ b/tdeabc/distributionlist.cpp @@ -0,0 +1,298 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include +#include +#include + +#include "distributionlist.h" + +using namespace KABC; + +DistributionList::DistributionList( DistributionListManager *manager, + const TQString &name ) : + mManager( manager ), mName( name ) +{ + mManager->insert( this ); +} + +DistributionList::~DistributionList() +{ + mManager->remove( this ); +} + +void DistributionList::setName( const TQString &name ) +{ + mName = name; +} + +TQString DistributionList::name() const +{ + return mName; +} + +void DistributionList::insertEntry( const Addressee &a, const TQString &email ) +{ + Entry e( a, email ); + + TQValueList::Iterator it; + for( it = mEntries.begin(); it != mEntries.end(); ++it ) { + if ( (*it).addressee.uid() == a.uid() ) { + /** + We have to check if both email addresses contains no data, + a simple 'email1 == email2' wont work here + */ + if ( ( (*it).email.isNull() && email.isEmpty() ) || + ( (*it).email.isEmpty() && email.isNull() ) || + ( (*it).email == email ) ) { + *it = e; + return; + } + } + } + mEntries.append( e ); +} + +void DistributionList::removeEntry( const Addressee &a, const TQString &email ) +{ + TQValueList::Iterator it; + for( it = mEntries.begin(); it != mEntries.end(); ++it ) { + if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { + mEntries.remove( it ); + return; + } + } +} + +TQStringList DistributionList::emails() const +{ + TQStringList emails; + + Entry::List::ConstIterator it; + for( it = mEntries.begin(); it != mEntries.end(); ++it ) { + Addressee a = (*it).addressee; + TQString email = (*it).email.isEmpty() ? a.fullEmail() : + a.fullEmail( (*it).email ); + + if ( !email.isEmpty() ) { + emails.append( email ); + } + } + + return emails; +} + +DistributionList::Entry::List DistributionList::entries() const +{ + return mEntries; +} + +typedef TQValueList< QPair > MissingEntryList; + +class DistributionListManager::DistributionListManagerPrivate +{ + public: + AddressBook *mAddressBook; + TQMap< TQString, MissingEntryList > mMissingEntries; +}; + +DistributionListManager::DistributionListManager( AddressBook *ab ) + : d( new DistributionListManagerPrivate ) +{ + d->mAddressBook = ab; + mLists.setAutoDelete( true ); +} + +DistributionListManager::~DistributionListManager() +{ + mLists.clear(); + + delete d; + d = 0; +} + +DistributionList *DistributionListManager::list( const TQString &name ) +{ + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + if ( list->name() == name ) return list; + } + + return 0; +} + +void DistributionListManager::insert( DistributionList *l ) +{ + if ( !l ) + return; + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + if ( list->name() == l->name() ) { + mLists.remove( list ); + break; + } + } + mLists.append( l ); +} + +void DistributionListManager::remove( DistributionList *l ) +{ + if ( !l ) + return; + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + if ( list->name() == l->name() ) { + mLists.remove( list ); + return; + } + } +} + +TQStringList DistributionListManager::listNames() +{ + TQStringList names; + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + names.append( list->name() ); + } + + return names; +} + +bool DistributionListManager::load() +{ + KSimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) ); + + TQMap entryMap = cfg.entryMap( "DistributionLists" ); + cfg.setGroup( "DistributionLists" ); + + // clear old lists + mLists.clear(); + d->mMissingEntries.clear(); + + TQMap::ConstIterator it; + for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it ) { + TQString name = it.key(); + TQStringList value = cfg.readListEntry( name ); + + kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; + + DistributionList *list = new DistributionList( this, name ); + + MissingEntryList missingEntries; + TQStringList::ConstIterator entryIt = value.constBegin(); + while( entryIt != value.constEnd() ) { + TQString id = *entryIt++; + TQString email = *entryIt; + + kdDebug(5700) << "----- Entry " << id << endl; + + Addressee a = d->mAddressBook->findByUid( id ); + if ( !a.isEmpty() ) { + list->insertEntry( a, email ); + } else { + missingEntries.append( qMakePair( id, email ) ); + } + + if ( entryIt == value.end() ) + break; + ++entryIt; + } + + d->mMissingEntries.insert( name, missingEntries ); + } + + return true; +} + +bool DistributionListManager::save() +{ + kdDebug(5700) << "DistListManager::save()" << endl; + + KSimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) ); + + cfg.deleteGroup( "DistributionLists" ); + cfg.setGroup( "DistributionLists" ); + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + kdDebug(5700) << " Saving '" << list->name() << "'" << endl; + + TQStringList value; + const DistributionList::Entry::List entries = list->entries(); + DistributionList::Entry::List::ConstIterator it; + for( it = entries.begin(); it != entries.end(); ++it ) { + value.append( (*it).addressee.uid() ); + value.append( (*it).email ); + } + + if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) { + const MissingEntryList missList = d->mMissingEntries[ list->name() ]; + MissingEntryList::ConstIterator missIt; + for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) { + value.append( (*missIt).first ); + value.append( (*missIt).second ); + } + } + + cfg.writeEntry( list->name(), value ); + } + + cfg.sync(); + + return true; +} + +DistributionListWatcher* DistributionListWatcher::mSelf = 0; + +DistributionListWatcher::DistributionListWatcher() + : TQObject( tqApp, "DistributionListWatcher" ) +{ + mDirWatch = new KDirWatch; + mDirWatch->addFile( locateLocal( "data", "tdeabc/distlists" ) ); + + connect( mDirWatch, TQT_SIGNAL( dirty( const TQString& ) ), TQT_SIGNAL( changed() ) ); + mDirWatch->startScan(); +} + +DistributionListWatcher::~DistributionListWatcher() +{ + delete mDirWatch; + mDirWatch = 0; +} + +DistributionListWatcher *DistributionListWatcher::self() +{ + kdWarning( !tqApp ) << "No TQApplication object available, you'll get a memleak!" << endl; + + if ( !mSelf ) + mSelf = new DistributionListWatcher(); + + return mSelf; +} + +#include "distributionlist.moc" diff --git a/tdeabc/distributionlist.h b/tdeabc/distributionlist.h new file mode 100644 index 000000000..78d182467 --- /dev/null +++ b/tdeabc/distributionlist.h @@ -0,0 +1,217 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_DISTRIBUTIONLIST_H +#define KABC_DISTRIBUTIONLIST_H + +#include + +#include "addressbook.h" + +namespace KABC { + +class DistributionListManager; + +/** + @short Distribution list of email addresses + + This class represents a list of email addresses. Each email address is + associated with an address book entry. If the address book entry changes, the + entry in the distribution list is automatically updated. +*/ +class KABC_EXPORT DistributionList +{ + public: + /** + @short Distribution List Entry + + This class represents an entry of a distribution list. It consists of an + addressee and an email address. If the email address is null, the + preferred email address of the addressee is used. + */ + struct Entry + { + typedef TQValueList List; + + Entry() {} + Entry( const Addressee &_addressee, const TQString &_email ) : + addressee( _addressee ), email( _email ) {} + + Addressee addressee; + TQString email; + }; + + /** + Create distribution list object. + + @param manager Managing object of this list. + @param name Name of this list. + */ + DistributionList( DistributionListManager *manager, const TQString &name ); + + /** + Destructor. + */ + ~DistributionList(); + + /** + Set name of this list. The name is used as key by the + DistributinListManager. + */ + void setName( const TQString & ); + + /** + Get name of this list. + */ + TQString name() const; + + /** + Insert an entry into this distribution list. If the entry already exists + nothing happens. + */ + void insertEntry( const Addressee &, const TQString &email=TQString::null ); + + /** + Remove an entry from this distribution list. If the entry doesn't exist + nothing happens. + */ + void removeEntry( const Addressee &, const TQString &email=TQString::null ); + + /** + Return list of email addresses, which belong to this distributon list. + These addresses can be directly used by e.g. a mail client. + */ + TQStringList emails() const; + + /** + Return list of entries belonging to this distribution list. This function + is mainly useful for a distribution list editor. + */ + Entry::List entries() const; + + private: + DistributionListManager *mManager; + TQString mName; + + Entry::List mEntries; +}; + +/** + @short Manager of distribution lists + + This class represents a collection of distribution lists, which are associated + with a given address book. +*/ +class KABC_EXPORT DistributionListManager +{ + public: + /** + Create manager for given address book. + */ + DistributionListManager( AddressBook * ); + + /** + Destructor. + */ + ~DistributionListManager(); + + /** + Return distribution list with given name. + */ + DistributionList *list( const TQString &name ); // KDE4: add bool caseSensitive = true + + /** + Insert distribution list. If a list with this name already exists, nothing + happens. The passed object is deleted by the manager. + */ + void insert( DistributionList * ); + + /** + Remove distribution list. If a list with this name doesn't exist, nothing + happens. + */ + void remove( DistributionList * ); + + /** + Return names of all distribution lists managed by this manager. + */ + TQStringList listNames(); + + /** + Load distribution lists form disk. + */ + bool load(); + + /** + Save distribution lists to disk. + */ + bool save(); + + private: + class DistributionListManagerPrivate; + DistributionListManagerPrivate *d; + + TQPtrList mLists; +}; + +/** + @short Watchdog for distribution lists + + This class provides a changed() signal that i emitted when the + distribution lists has changed in some way. + + Exapmle: + + \code + KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() + + connect( watchdog, TQT_SIGNAL( changed() ), TQT_SLOT( doSomething() ) ); + \endcode +*/ + +class KABC_EXPORT DistributionListWatcher : public TQObject +{ + Q_OBJECT + + public: + /** + * Returns the watcher object. + */ + static DistributionListWatcher *self(); + + signals: + /** + * This signal is emmitted whenever the distribution lists has + * changed (if a list was added or removed, when a list was + * renamed or the entries of the list changed). + */ + void changed(); + + protected: + DistributionListWatcher(); + ~DistributionListWatcher(); + + private: + static DistributionListWatcher* mSelf; + KDirWatch *mDirWatch; +}; + +} +#endif diff --git a/tdeabc/distributionlistdialog.cpp b/tdeabc/distributionlistdialog.cpp new file mode 100644 index 000000000..8cd22e8fd --- /dev/null +++ b/tdeabc/distributionlistdialog.cpp @@ -0,0 +1,399 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "addressbook.h" +#include "addresseedialog.h" +#include "distributionlist.h" + +#include "distributionlistdialog.h" +#include "distributionlistdialog.moc" + +using namespace KABC; + +DistributionListDialog::DistributionListDialog( AddressBook *addressBook, TQWidget *parent) + : KDialogBase( parent, "", true, i18n("Configure Distribution Lists"), Ok, Ok, true) +{ + mEditor = new DistributionListEditorWidget( addressBook, this ); + setMainWidget( mEditor ); + + connect( this, TQT_SIGNAL( okClicked() ), mEditor, TQT_SLOT( save() ) ); +} + +DistributionListDialog::~DistributionListDialog() +{ +} + +// TODO KDE4: Add d-pointer to EmailSelector, make sEmailMap a member variable +static TQMap *sEmailMap = 0; + +EmailSelector::EmailSelector( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) : + KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, + parent ) +{ + if (!sEmailMap) + sEmailMap = new TQMap(); + TQFrame *topFrame = plainPage(); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); + + mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), + topFrame ); + topLayout->addWidget( mButtonGroup ); + + TQStringList::ConstIterator it; + for( it = emails.begin(); it != emails.end(); ++it ) { + TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); + sEmailMap->insert( button, *it ); + if ( (*it) == current ) { + mButtonGroup->setButton(mButtonGroup->id(button)); + } + } +} + +TQString EmailSelector::selected() +{ + TQButton *button = mButtonGroup->selected(); + if ( button ) return (*sEmailMap)[button]; + return TQString::null; +} + +TQString EmailSelector::getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) +{ + EmailSelector *dlg = new EmailSelector( emails, current, parent ); + dlg->exec(); + + TQString result = dlg->selected(); + + delete dlg; + + return result; +} + +class EntryItem : public TQListViewItem +{ + public: + EntryItem( TQListView *parent, const Addressee &addressee, + const TQString &email=TQString::null ) : + TQListViewItem( parent ), + mAddressee( addressee ), + mEmail( email ) + { + setText( 0, addressee.realName() ); + if( email.isEmpty() ) { + setText( 1, addressee.preferredEmail() ); + setText( 2, i18n("Yes") ); + } else { + setText( 1, email ); + setText( 2, i18n("No") ); + } + } + + Addressee addressee() const + { + return mAddressee; + } + + TQString email() const + { + return mEmail; + } + + private: + Addressee mAddressee; + TQString mEmail; +}; + +DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, TQWidget *parent) : + TQWidget( parent ), + mAddressBook( addressBook ) +{ + kdDebug(5700) << "DistributionListEditor()" << endl; + + TQBoxLayout *topLayout = new TQVBoxLayout( this ); + topLayout->setSpacing( KDialog::spacingHint() ); + + TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; + + mNameCombo = new TQComboBox( this ); + nameLayout->addWidget( mNameCombo ); + connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); + + mNewButton = new TQPushButton( i18n("New List..."), this ); + nameLayout->addWidget( mNewButton ); + connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); + + mEditButton = new TQPushButton( i18n("Rename List..."), this ); + nameLayout->addWidget( mEditButton ); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) ); + + mRemoveButton = new TQPushButton( i18n("Remove List"), this ); + nameLayout->addWidget( mRemoveButton ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); + + TQGridLayout *gridLayout = new TQGridLayout( topLayout, 3, 3 ); + gridLayout->setColStretch(1, 1); + + TQLabel *listLabel = new TQLabel( i18n("Available addresses:"), this ); + gridLayout->addWidget( listLabel, 0, 0 ); + + mListLabel = new TQLabel( this ); + gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); + + mAddresseeView = new TQListView( this ); + mAddresseeView->addColumn( i18n("Name") ); + mAddresseeView->addColumn( i18n("Preferred Email") ); + mAddresseeView->setAllColumnsShowFocus( true ); + gridLayout->addWidget( mAddresseeView, 1, 0 ); + connect( mAddresseeView, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotSelectionAddresseeViewChanged() ) ); + connect( mAddresseeView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( addEntry() ) ); + + mAddEntryButton = new TQPushButton( i18n("Add Entry"), this ); + mAddEntryButton->setEnabled(false); + gridLayout->addWidget( mAddEntryButton, 2, 0 ); + connect( mAddEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); + + mEntryView = new TQListView( this ); + mEntryView->addColumn( i18n("Name") ); + mEntryView->addColumn( i18n("Email") ); + mEntryView->addColumn( i18n("Use Preferred") ); + mEntryView->setEnabled(false); + mEntryView->setAllColumnsShowFocus( true ); + gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 ); + connect( mEntryView, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotSelectionEntryViewChanged() ) ); + + mChangeEmailButton = new TQPushButton( i18n("Change Email..."), this ); + gridLayout->addWidget( mChangeEmailButton, 2, 1 ); + connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); + + mRemoveEntryButton = new TQPushButton( i18n("Remove Entry"), this ); + gridLayout->addWidget( mRemoveEntryButton, 2, 2 ); + connect( mRemoveEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); + + mManager = new DistributionListManager( mAddressBook ); + mManager->load(); + + updateAddresseeView(); + updateNameCombo(); +} + +DistributionListEditorWidget::~DistributionListEditorWidget() +{ + kdDebug(5700) << "~DistributionListEditor()" << endl; + + delete mManager; +} + +void DistributionListEditorWidget::save() +{ + mManager->save(); +} + +void DistributionListEditorWidget::slotSelectionEntryViewChanged() +{ + EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); + bool state=entryItem; + + mChangeEmailButton->setEnabled(state); + mRemoveEntryButton->setEnabled(state); +} + +void DistributionListEditorWidget::newList() +{ + bool ok; + TQString name = KInputDialog::getText( i18n( "New Distribution List" ), + i18n( "Please enter &name:" ), TQString::null, &ok ); + if (!ok) return; + + new DistributionList( mManager, name ); + + mNameCombo->clear(); + mNameCombo->insertStringList( mManager->listNames() ); + mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); + + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::editList() +{ + TQString oldName = mNameCombo->currentText(); + bool ok; + TQString name = KInputDialog::getText( i18n( "Distribution List" ), + i18n( "Please change &name:" ), oldName, &ok ); + if (!ok) return; + + DistributionList *list = mManager->list( oldName ); + list->setName( name ); + + mNameCombo->clear(); + mNameCombo->insertStringList( mManager->listNames() ); + mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); + + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::removeList() +{ + int result = KMessageBox::warningContinueCancel( this, + i18n("Delete distribution list '%1'?") .arg( mNameCombo->currentText() ), + TQString::null, KStdGuiItem::del() ); + + if ( result != KMessageBox::Continue ) return; + + mManager->remove( mManager->list( mNameCombo->currentText() ) ); + mNameCombo->removeItem( mNameCombo->currentItem() ); + + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::addEntry() +{ + AddresseeItem *addresseeItem = + static_cast( mAddresseeView->selectedItem() ); + + if( !addresseeItem ) { + kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; + return; + } + + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) { + kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; + return; + } + + list->insertEntry( addresseeItem->addressee() ); + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::removeEntry() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EntryItem *entryItem = + static_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + list->removeEntry( entryItem->addressee(), entryItem->email() ); + delete entryItem; +} + +void DistributionListEditorWidget::changeEmail() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EntryItem *entryItem = + static_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + TQString email = EmailSelector::getEmail( entryItem->addressee().emails(), + entryItem->email(), this ); + list->removeEntry( entryItem->addressee(), entryItem->email() ); + list->insertEntry( entryItem->addressee(), email ); + + updateEntryView(); +} + +void DistributionListEditorWidget::updateEntryView() +{ + if ( mNameCombo->currentText().isEmpty() ) { + mListLabel->setText( i18n("Selected addressees:") ); + } else { + mListLabel->setText( i18n("Selected addresses in '%1':") + .arg( mNameCombo->currentText() ) ); + } + + mEntryView->clear(); + + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) { + mEditButton->setEnabled(false); + mRemoveButton->setEnabled(false); + mChangeEmailButton->setEnabled(false); + mRemoveEntryButton->setEnabled(false); + mAddresseeView->setEnabled(false); + mEntryView->setEnabled(false); + return; + } else { + mEditButton->setEnabled(true); + mRemoveButton->setEnabled(true); + mAddresseeView->setEnabled(true); + mEntryView->setEnabled(true); + } + + DistributionList::Entry::List entries = list->entries(); + DistributionList::Entry::List::ConstIterator it; + for( it = entries.begin(); it != entries.end(); ++it ) { + new EntryItem( mEntryView, (*it).addressee, (*it).email ); + } + + EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); + bool state=entryItem; + + mChangeEmailButton->setEnabled(state); + mRemoveEntryButton->setEnabled(state); +} + +void DistributionListEditorWidget::updateAddresseeView() +{ + mAddresseeView->clear(); + + AddressBook::Iterator it; + for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + new AddresseeItem( mAddresseeView, *it ); + } +} + +void DistributionListEditorWidget::updateNameCombo() +{ + mNameCombo->insertStringList( mManager->listNames() ); + + updateEntryView(); +} + +void DistributionListEditorWidget::slotSelectionAddresseeViewChanged() +{ + AddresseeItem *addresseeItem = + static_cast( mAddresseeView->selectedItem() ); + bool state=addresseeItem; + mAddEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); +} diff --git a/tdeabc/distributionlistdialog.h b/tdeabc/distributionlistdialog.h new file mode 100644 index 000000000..1bd6fc788 --- /dev/null +++ b/tdeabc/distributionlistdialog.h @@ -0,0 +1,139 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_DISTRIBUTIONLISTDIALOG_H +#define KABC_DISTRIBUTIONLISTDIALOG_H + +#include + +#include + +class TQListView; +class TQComboBox; +class TQButtonGroup; + +namespace KABC { + +class AddressBook; +class DistributionListEditorWidget; +class DistributionListManager; + +/** + @short Frontend to create distribution lists + + Creating a new DistributionListDialog does automatically + load all addressees and distribution lists from the config + files. The changes will be saved when clicking the 'OK' + button. + + Example: + + \code + KABC::DistributionListDialog *dlg = new + KABC::DistributionListDialog( KABC::StdAddressBook::self(), this ); + + dlg->exec(); + \endcode +*/ +class KABC_EXPORT DistributionListDialog : public KDialogBase +{ + Q_OBJECT + + public: + /** + Constructor. + + @param ab The addressbook, the addressees should be used from + @param parent The parent widget + */ + DistributionListDialog( AddressBook *ab, TQWidget *parent ); + + /** + Destructor. + */ + virtual ~DistributionListDialog(); + + private: + DistributionListEditorWidget *mEditor; + + struct Data; + Data *d; +}; + +/** + @short Helper class +*/ +class KABC_EXPORT EmailSelector : public KDialogBase +{ + public: + EmailSelector( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + TQString selected(); + + static TQString getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + private: + TQButtonGroup *mButtonGroup; +}; + +/** + @short Helper class +*/ +class KABC_EXPORT DistributionListEditorWidget : public TQWidget +{ + Q_OBJECT + + public: + DistributionListEditorWidget( AddressBook *, TQWidget *parent ); + virtual ~DistributionListEditorWidget(); + + private slots: + void newList(); + void editList(); + void removeList(); + void addEntry(); + void removeEntry(); + void changeEmail(); + void updateEntryView(); + void updateAddresseeView(); + void updateNameCombo(); + void slotSelectionEntryViewChanged(); + void slotSelectionAddresseeViewChanged(); + void save(); + + private: + TQComboBox *mNameCombo; + TQLabel *mListLabel; + TQListView *mEntryView; + TQListView *mAddresseeView; + + AddressBook *mAddressBook; + DistributionListManager *mManager; + TQPushButton *mNewButton, *mEditButton, *mRemoveButton; + TQPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; + + struct Data; + Data *d; +}; + +} +#endif diff --git a/tdeabc/distributionlisteditor.cpp b/tdeabc/distributionlisteditor.cpp new file mode 100644 index 000000000..5c26c8121 --- /dev/null +++ b/tdeabc/distributionlisteditor.cpp @@ -0,0 +1,310 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "addressbook.h" +#include "addresseedialog.h" +#include "distributionlist.h" + +#include "distributionlisteditor.h" +#include "distributionlisteditor.moc" + +using namespace KABC; + +EmailSelectDialog::EmailSelectDialog( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) : + KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, + parent ) +{ + TQFrame *topFrame = plainPage(); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); + + mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), + topFrame ); + mButtonGroup->setRadioButtonExclusive( true ); + topLayout->addWidget( mButtonGroup ); + + TQStringList::ConstIterator it; + for( it = emails.begin(); it != emails.end(); ++it ) { + TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); + if ( (*it) == current ) { + button->setDown( true ); + } + } +} + +TQString EmailSelectDialog::selected() +{ + TQButton *button = mButtonGroup->selected(); + if ( button ) return button->text(); + return TQString::null; +} + +TQString EmailSelectDialog::getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) +{ + EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); + dlg->exec(); + + TQString result = dlg->selected(); + + delete dlg; + + return result; +} + +class EditEntryItem : public TQListViewItem +{ + public: + EditEntryItem( TQListView *parent, const Addressee &addressee, + const TQString &email=TQString::null ) : + TQListViewItem( parent ), + mAddressee( addressee ), + mEmail( email ) + { + setText( 0, addressee.realName() ); + if( email.isEmpty() ) { + setText( 1, addressee.preferredEmail() ); + setText( 2, i18n("Yes") ); + } else { + setText( 1, email ); + setText( 2, i18n("No") ); + } + } + + Addressee addressee() const + { + return mAddressee; + } + + TQString email() const + { + return mEmail; + } + + private: + Addressee mAddressee; + TQString mEmail; +}; + +DistributionListEditor::DistributionListEditor( AddressBook *addressBook, TQWidget *parent) : + TQWidget( parent ), + mAddressBook( addressBook ) +{ + kdDebug(5700) << "DistributionListEditor()" << endl; + + TQBoxLayout *topLayout = new TQVBoxLayout( this ); + topLayout->setMargin( KDialog::marginHint() ); + topLayout->setSpacing( KDialog::spacingHint() ); + + TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; + + mNameCombo = new TQComboBox( this ); + nameLayout->addWidget( mNameCombo ); + connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); + + newButton = new TQPushButton( i18n("New List"), this ); + nameLayout->addWidget( newButton ); + connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); + + removeButton = new TQPushButton( i18n("Remove List"), this ); + nameLayout->addWidget( removeButton ); + connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); + + mEntryView = new TQListView( this ); + mEntryView->addColumn( i18n("Name") ); + mEntryView->addColumn( i18n("Email") ); + mEntryView->addColumn( i18n("Use Preferred") ); + topLayout->addWidget( mEntryView ); + connect(mEntryView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionEntryViewChanged())); + + changeEmailButton = new TQPushButton( i18n("Change Email"), this ); + topLayout->addWidget( changeEmailButton ); + connect( changeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); + + removeEntryButton = new TQPushButton( i18n("Remove Entry"), this ); + topLayout->addWidget( removeEntryButton ); + connect( removeEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); + + addEntryButton = new TQPushButton( i18n("Add Entry"), this ); + topLayout->addWidget( addEntryButton ); + connect( addEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); + + mAddresseeView = new TQListView( this ); + mAddresseeView->addColumn( i18n("Name") ); + mAddresseeView->addColumn( i18n("Preferred Email") ); + topLayout->addWidget( mAddresseeView ); + + + connect(mAddresseeView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionAddresseeViewChanged())); + + mManager = new DistributionListManager( mAddressBook ); + mManager->load(); + + updateAddresseeView(); + updateNameCombo(); + removeButton->setEnabled(!mManager->listNames().isEmpty()); +} + +DistributionListEditor::~DistributionListEditor() +{ + kdDebug(5700) << "~DistributionListEditor()" << endl; + + mManager->save(); + delete mManager; +} + +void DistributionListEditor::slotSelectionEntryViewChanged() +{ + EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); + bool state = (entryItem != 0L); + + changeEmailButton->setEnabled(state); + removeEntryButton->setEnabled(state); +} + +void DistributionListEditor::newList() +{ + bool ok = false; + TQString name = KInputDialog::getText( i18n("New Distribution List"), + i18n("Please enter name:"), + TQString::null, &ok, this ); + if ( !ok ) + return; + + new DistributionList( mManager, name ); + + mNameCombo->insertItem( name ); + removeButton->setEnabled(true); + updateEntryView(); +} + +void DistributionListEditor::removeList() +{ + mManager->remove( mManager->list( mNameCombo->currentText() ) ); + mNameCombo->removeItem( mNameCombo->currentItem() ); + removeButton->setEnabled(!mManager->listNames().isEmpty()); + addEntryButton->setEnabled( !mNameCombo->currentText().isEmpty()); + updateEntryView(); +} + +void DistributionListEditor::addEntry() +{ + AddresseeItem *addresseeItem = + dynamic_cast( mAddresseeView->selectedItem() ); + + if( !addresseeItem ) { + kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; + return; + } + + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) { + kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; + return; + } + + list->insertEntry( addresseeItem->addressee() ); + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditor::removeEntry() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EditEntryItem *entryItem = + dynamic_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + list->removeEntry( entryItem->addressee(), entryItem->email() ); + delete entryItem; +} + +void DistributionListEditor::changeEmail() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EditEntryItem *entryItem = + dynamic_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + TQString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(), + entryItem->email(), this ); + list->removeEntry( entryItem->addressee(), entryItem->email() ); + list->insertEntry( entryItem->addressee(), email ); + + updateEntryView(); +} + +void DistributionListEditor::updateEntryView() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + mEntryView->clear(); + DistributionList::Entry::List entries = list->entries(); + DistributionList::Entry::List::ConstIterator it; + for( it = entries.begin(); it != entries.end(); ++it ) { + new EditEntryItem( mEntryView, (*it).addressee, (*it).email ); + } + EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); + bool state = (entryItem != 0L); + + changeEmailButton->setEnabled(state); + removeEntryButton->setEnabled(state); +} + +void DistributionListEditor::updateAddresseeView() +{ + mAddresseeView->clear(); + + AddressBook::Iterator it; + for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + new AddresseeItem( mAddresseeView, *it ); + } +} + +void DistributionListEditor::updateNameCombo() +{ + mNameCombo->insertStringList( mManager->listNames() ); + + updateEntryView(); +} + +void DistributionListEditor::slotSelectionAddresseeViewChanged() +{ + AddresseeItem *addresseeItem = + dynamic_cast( mAddresseeView->selectedItem() ); + bool state = (addresseeItem != 0L); + addEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); +} diff --git a/tdeabc/distributionlisteditor.h b/tdeabc/distributionlisteditor.h new file mode 100644 index 000000000..faec280e6 --- /dev/null +++ b/tdeabc/distributionlisteditor.h @@ -0,0 +1,86 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_DISTRIBUTIONLISTEDITOR_H +#define KABC_DISTRIBUTIONLISTEDITOR_H + +#include + +#include + +class TQListView; +class TQComboBox; +class TQButtonGroup; + +namespace KABC { + +class AddressBook; +class DistributionListManager; + +class KABC_EXPORT EmailSelectDialog : public KDialogBase +{ + public: + EmailSelectDialog( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + TQString selected(); + + static TQString getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + private: + TQButtonGroup *mButtonGroup; +}; + +/** + @obsolete +*/ +class DistributionListEditor : public TQWidget +{ + Q_OBJECT + public: + DistributionListEditor( AddressBook *, TQWidget *parent ); + virtual ~DistributionListEditor(); + + private slots: + void newList(); + void removeList(); + void addEntry(); + void removeEntry(); + void changeEmail(); + void updateEntryView(); + void updateAddresseeView(); + void updateNameCombo(); + void slotSelectionEntryViewChanged(); + void slotSelectionAddresseeViewChanged(); + + private: + TQComboBox *mNameCombo; + TQListView *mEntryView; + TQListView *mAddresseeView; + + AddressBook *mAddressBook; + DistributionListManager *mManager; + TQPushButton *newButton, *removeButton; + TQPushButton *changeEmailButton,*removeEntryButton,*addEntryButton; +}; + +} + +#endif diff --git a/tdeabc/errorhandler.cpp b/tdeabc/errorhandler.cpp new file mode 100644 index 000000000..d2245e44f --- /dev/null +++ b/tdeabc/errorhandler.cpp @@ -0,0 +1,55 @@ +/* + This file is part of libkabc. + + Copyright (c) 2002 Tobias Koenig + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include + +#include "errorhandler.h" + +using namespace KABC; + +void ConsoleErrorHandler::error( const TQString &msg ) +{ + // no debug area is ok here + kdError() << msg << endl; +} + + +void GUIErrorHandler::error( const TQString &msg ) +{ + KMessageBox::error( 0, msg, i18n( "Error in libkabc" ) ); +} + + +GuiErrorHandler::GuiErrorHandler( TQWidget *parent ) + : mParent( parent ) +{ +} + +void GuiErrorHandler::error( const TQString &msg ) +{ + if (tqApp) + KMessageBox::error( mParent, msg ); +} diff --git a/tdeabc/errorhandler.h b/tdeabc/errorhandler.h new file mode 100644 index 000000000..9a316541d --- /dev/null +++ b/tdeabc/errorhandler.h @@ -0,0 +1,95 @@ +/* + This file is part of libkabc. + + Copyright (c) 2002 Tobias Koenig + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_ERRORHANDLER_H +#define KABC_ERRORHANDLER_H + +#include + +#include + +class TQWidget; + +namespace KABC { + +/** + Abstract class that provides displaying of error messages. + We need this to make libkabc gui independent on the one side + and provide user friendly error messages on the other side. + Use @p ConsoleErrorHandler or @p GuiErrorHandler in your + application or provide your own ErrorHandler. +*/ +class KABC_EXPORT ErrorHandler +{ + public: + /** + Show error message. + */ + virtual void error( const TQString &msg ) = 0; +}; + +/** + This class prints the error messages to stderr via kdError(). +*/ +class KABC_EXPORT ConsoleErrorHandler : public ErrorHandler +{ + public: + virtual void error( const TQString &msg ); +}; + +/** + This class shows messages boxes for every + error message. + + \deprecated Use GuiErrorHandler instead. +*/ +class KABC_EXPORT GUIErrorHandler : public ErrorHandler +{ + public: + virtual void error( const TQString &msg ); +}; + +/** + This class shows messages boxes for every + error message. +*/ +class KABC_EXPORT GuiErrorHandler : public ErrorHandler +{ + public: + /** + Create error handler. + + \param parent Widget which is used as parent for the error dialogs. + */ + GuiErrorHandler( TQWidget *parent ); + + virtual void error( const TQString &msg ); + + private: + TQWidget *mParent; + + class Private; + Private *d; +}; + +} + +#endif diff --git a/tdeabc/field.h b/tdeabc/field.h new file mode 100644 index 000000000..118ce2d51 --- /dev/null +++ b/tdeabc/field.h @@ -0,0 +1,176 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_FIELD_H +#define KABC_FIELD_H + +#include +#include + +#include "addressee.h" + +class TDEConfig; + +namespace KABC { + +class KABC_EXPORT Field +{ + class FieldImpl; + friend class FieldImpl; + +public: + typedef TQValueList List; + + /** + * @li @p All - + * @li @p Frequent - + * @li @p Address - + * @li @p Email - + * @li @p Personal - + * @li @p Organization - + * @li @p CustomCategory - + */ + enum FieldCategory + { + All = 0x0, + Frequent = 0x01, + Address = 0x02, + Email = 0x04, + Personal = 0x08, + Organization = 0x10, + CustomCategory = 0x20 + }; + + /** + * Returns the translated label for this field. + */ + virtual TQString label(); + + /** + * Returns the ored categories the field belongs to. + */ + virtual int category(); + + /** + * Returns the translated label for field category. + */ + static TQString categoryLabel( int category ); + + /** + * Returns a string representation of the value the field has in the given + * Addressee. Returns TQString::null, if it is not possible to convert the + * value to a string. + */ + virtual TQString value( const KABC::Addressee & ); + + /** + * Sets the value of the field in the given Addressee. Returns true on success + * or false, if the given string couldn't be converted to a valid value. + */ + virtual bool setValue( KABC::Addressee &, const TQString & ); + + /** + * Returns a string, that can be used for sorting. + */ + TQString sortKey( const KABC::Addressee & ); + + /** + * Returns, if the field is a user-defined field. + */ + virtual bool isCustom(); + + /** + * Returns, if the field is equal with @a field. + */ + virtual bool equals( Field *field ); + + /** + * Returns a list of all fields. + */ + static Field::List allFields(); + + /** + * Returns a list of the default fields. + */ + static Field::List defaultFields(); + + /** + * Creates a custom field. + * + * @param label The label for this field + * @param category The category of this field + * @param key Unique key for this field + * @param app Unique app name for this field + */ + static Field *createCustomField( const TQString &label, int category, + const TQString &key, const TQString &app ); + + /** + * Delete all fields from list. + */ + static void deleteFields(); + + /** + * Save the field settings to a config file. + * + * @param cfg The config file object + * @param identifier The unique identifier + * @param fields The list of the fields + */ + static void saveFields( TDEConfig *cfg, const TQString &identifier, + const Field::List &fields ); + /** + * This is the same as above, with the difference, that + * the list is stored in TDEGlobal::config() in group "KABCFields". + */ + static void saveFields( const TQString &identifier, + const Field::List &fields ); + + /** + * Load the field settings from a config file. + * + * @param cfg The config file object + * @param identifier The unique identifier + */ + static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier ); + + /** + * This is the same as above, with the difference, that + * the list is loaded from TDEGlobal::config() from group "KABCFields". + */ + static Field::List restoreFields( const TQString &identifier ); + +protected: + static void createField( int id, int category = 0 ); + static void createDefaultField( int id, int category = 0 ); + +private: + Field( FieldImpl * ); + virtual ~Field(); + + FieldImpl *mImpl; + + static Field::List mAllFields; + static Field::List mDefaultFields; + static Field::List mCustomFields; +}; + +} +#endif diff --git a/tdeabc/format.h b/tdeabc/format.h new file mode 100644 index 000000000..ed036673c --- /dev/null +++ b/tdeabc/format.h @@ -0,0 +1,49 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_FORMAT_H +#define KABC_FORMAT_H + +#include + +#include + +namespace KABC { + +class AddressBook; + +/** + @deprecated use FormatPlugin instead +*/ +class KABC_EXPORT_DEPRECATED Format +{ + public: + /** + Load addressbook from file. + */ + virtual bool load( AddressBook *, const TQString &fileName ) = 0; + /** + Save addressbook to file. + */ + virtual bool save( AddressBook *, const TQString &fileName ) = 0; +}; + +} + +#endif diff --git a/tdeabc/formatfactory.cpp b/tdeabc/formatfactory.cpp new file mode 100644 index 000000000..0795957a2 --- /dev/null +++ b/tdeabc/formatfactory.cpp @@ -0,0 +1,168 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include + +#include + +#include "vcardformatplugin.h" + +#include "formatfactory.h" + +using namespace KABC; + +FormatFactory *FormatFactory::mSelf = 0; +static KStaticDeleter factoryDeleter; + +FormatFactory *FormatFactory::self() +{ + kdDebug(5700) << "FormatFactory::self()" << endl; + + if ( !mSelf ) + factoryDeleter.setObject( mSelf, new FormatFactory ); + + return mSelf; +} + +FormatFactory::FormatFactory() +{ + mFormatList.setAutoDelete( true ); + + // dummy entry for default format + FormatInfo *info = new FormatInfo; + info->library = ""; + info->nameLabel = i18n( "vCard" ); + info->descriptionLabel = i18n( "vCard Format" ); + mFormatList.insert( "vcard", info ); + + const TQStringList list = TDEGlobal::dirs()->findAllResources( "data" ,"tdeabc/formats/*.desktop", true, true ); + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + { + KSimpleConfig config( *it, true ); + + if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) + continue; + + info = new FormatInfo; + + config.setGroup( "Plugin" ); + TQString type = config.readEntry( "Type" ); + info->library = config.readEntry( "X-TDE-Library" ); + + config.setGroup( "Misc" ); + info->nameLabel = config.readEntry( "Name" ); + info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) ); + + mFormatList.insert( type, info ); + } +} + +FormatFactory::~FormatFactory() +{ + mFormatList.clear(); +} + +TQStringList FormatFactory::formats() +{ + TQStringList retval; + + // make sure 'vcard' is the first entry + retval << "vcard"; + + TQDictIterator it( mFormatList ); + for ( ; it.current(); ++it ) + if ( it.currentKey() != "vcard" ) + retval << it.currentKey(); + + return retval; +} + +FormatInfo *FormatFactory::info( const TQString &type ) +{ + if ( type.isEmpty() ) + return 0; + else + return mFormatList[ type ]; +} + +FormatPlugin *FormatFactory::format( const TQString& type ) +{ + FormatPlugin *format = 0; + + if ( type.isEmpty() ) + return 0; + + if ( type == "vcard" ) { + format = new VCardFormatPlugin; + format->setType( type ); + format->setNameLabel( i18n( "vCard" ) ); + format->setDescriptionLabel( i18n( "vCard Format" ) ); + return format; + } + + FormatInfo *fi = mFormatList[ type ]; + if (!fi) + return 0; + TQString libName = fi->library; + + KLibrary *library = openLibrary( libName ); + if ( !library ) + return 0; + + void *format_func = library->symbol( "format" ); + + if ( format_func ) { + format = ((FormatPlugin* (*)())format_func)(); + format->setType( type ); + format->setNameLabel( fi->nameLabel ); + format->setDescriptionLabel( fi->descriptionLabel ); + } else { + kdDebug( 5700 ) << "'" << libName << "' is not a format plugin." << endl; + return 0; + } + + return format; +} + + +KLibrary *FormatFactory::openLibrary( const TQString& libName ) +{ + KLibrary *library = 0; + + TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) ); + + if ( path.isEmpty() ) { + kdDebug( 5700 ) << "No format plugin library was found!" << endl; + return 0; + } + + library = KLibLoader::self()->library( TQFile::encodeName( path ) ); + + if ( !library ) { + kdDebug( 5700 ) << "Could not load library '" << libName << "'" << endl; + return 0; + } + + return library; +} diff --git a/tdeabc/formatfactory.h b/tdeabc/formatfactory.h new file mode 100644 index 000000000..ff9da5504 --- /dev/null +++ b/tdeabc/formatfactory.h @@ -0,0 +1,101 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_FORMATFACTORY_H +#define KABC_FORMATFACTORY_H + +#include +#include + +#include +#include + +#include "formatplugin.h" + +namespace KABC { + +struct FormatInfo +{ + TQString library; + TQString nameLabel; + TQString descriptionLabel; +}; + +/** + * Class for loading format plugins. + * + * Example: + * + * \code + * KABC::FormatFactory *factory = KABC::FormatFactory::self(); + * + * TQStringList list = factory->formats(); + * TQStringList::Iterator it; + * for ( it = list.begin(); it != list.end(); ++it ) { + * KABC::FormatPlugin *format = factory->format( (*it) ); + * // do something with format + * } + * \endcode + */ +class KABC_EXPORT FormatFactory +{ + public: + + /** + Destructor. + */ + ~FormatFactory(); + + /** + * Returns the global format factory. + */ + static FormatFactory *self(); + + /** + * Returns a pointer to a format object or a null pointer + * if format type doesn't exist. + * + * @param type The type of the format, returned by formats() + */ + FormatPlugin *format( const TQString &type ); + + /** + * Returns a list of all available format types. + */ + TQStringList formats(); + + /** + * Returns the info structure for a special type. + */ + FormatInfo *info( const TQString &type ); + + protected: + FormatFactory(); + + private: + KLibrary *openLibrary( const TQString& libName ); + + static FormatFactory *mSelf; + + TQDict mFormatList; +}; + +} +#endif diff --git a/tdeabc/formatplugin.h b/tdeabc/formatplugin.h new file mode 100644 index 000000000..33f4beea0 --- /dev/null +++ b/tdeabc/formatplugin.h @@ -0,0 +1,73 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_FORMATPLUGIN_H +#define KABC_FORMATPLUGIN_H + +#include + +#include "plugin.h" +#include "resource.h" + +namespace KABC { + +class AddressBook; +class Addressee; + +/** + * @short Base class for address book formats. + * + * This class provides an abstract interface for ResourceFile and + * ResourceDir formats. + * + * @internal + */ +class KABC_EXPORT FormatPlugin : public Plugin +{ +public: + + /** + * Load single addressee from file. + */ + virtual bool load( Addressee &, TQFile *file ) = 0; + + /** + * Load whole addressbook from file. + */ + virtual bool loadAll( AddressBook *, Resource *, TQFile *file ) = 0; + + /** + * Save a single Addressee to file. + */ + virtual void save( const Addressee &, TQFile *file ) = 0; + + /** + * Save whole addressbook to file. + */ + virtual void saveAll( AddressBook *, Resource *, TQFile *file ) = 0; + + /** + * Checks if given file contains the right format + */ + virtual bool checkFormat( TQFile *file ) const = 0; +}; + +} +#endif diff --git a/tdeabc/formats/CMakeLists.txt b/tdeabc/formats/CMakeLists.txt new file mode 100644 index 000000000..d7a9e0fc9 --- /dev/null +++ b/tdeabc/formats/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES binary.desktop DESTINATION ${DATA_INSTALL_DIR}/tdeabc/formats ) + + +##### kabcformat_binary ######################### + +set( target kabcformat_binary ) + +set( ${target}_SRCS + binaryformat.cpp +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK tdeabc-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/formats/Makefile.am b/tdeabc/formats/Makefile.am new file mode 100644 index 000000000..d769d88d7 --- /dev/null +++ b/tdeabc/formats/Makefile.am @@ -0,0 +1,22 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +kde_module_LTLIBRARIES = kabcformat_binary.la + +kabcformat_binary_la_SOURCES = binaryformat.cpp +kabcformat_binary_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) \ + -no-undefined +kabcformat_binary_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(LIB_TDECORE) +kabcformat_binary_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +# these are the headers for your project +noinst_HEADERS = binaryformat.h + +# let automoc handle all of the meta source files (moc) +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabcformat_binary.pot + +linkdir = $(kde_datadir)/tdeabc/formats +link_DATA = binary.desktop +EXTRA_DIST = $(link_DATA) diff --git a/tdeabc/formats/binary.desktop b/tdeabc/formats/binary.desktop new file mode 100644 index 000000000..993286ad5 --- /dev/null +++ b/tdeabc/formats/binary.desktop @@ -0,0 +1,89 @@ +[Misc] +Name=Binary +Name[af]=Binêre +Name[ar]=ثنائي +Name[az]=İcraçı +Name[be]=Двайковы +Name[bg]=Двоичен +Name[bn]=বাইনারি +Name[br]=Binarel +Name[bs]=Binarno +Name[ca]=Binari +Name[cs]=Binární +Name[csb]=Binarny +Name[cy]=Deuaidd +Name[da]=Binær +Name[de]=Binär +Name[el]=Δυαδικό +Name[eo]=Duuma +Name[es]=Binario +Name[et]=Binaar +Name[eu]=Bitarra +Name[fa]=دوگانی +Name[fi]=Binääri +Name[fr]=Binaire +Name[fy]=Binêr +Name[ga]=Dénártha +Name[gl]=Binário +Name[he]=בינרית +Name[hi]=दà¥à¤µà¤¿à¤šà¤° +Name[hr]=Binarno +Name[hsb]=Binarny +Name[hu]=Bináris +Name[id]=Biner +Name[is]=Tvíunda +Name[it]=Binario +Name[ja]=ãƒã‚¤ãƒŠãƒª +Name[ka]=áƒáƒ áƒáƒ‘ითი +Name[kk]=Бинарлық +Name[km]=គោលពីរ +Name[ko]=ë°”ì´ë„ˆë¦¬ +Name[lb]=Binär +Name[lt]=Dvejetainis +Name[lv]=BinÄrs +Name[mk]=Бинарен +Name[mn]=Бинар +Name[ms]=Binari +Name[mt]=Binarju +Name[nb]=Binær +Name[nds]=Bineer +Name[ne]=बाइनरी +Name[nl]=Binair +Name[nn]=Binær +Name[nso]=Tselapedi +Name[pa]=ਬਾਈਨਰੀ +Name[pl]=Binarny +Name[pt]=Binário +Name[pt_BR]=Binário +Name[ro]=Binar +Name[ru]=Двоичный +Name[rw]=Nyabibiri +Name[se]=Binára +Name[sk]=Binárny +Name[sl]=DvojiÅ¡ko +Name[sq]=Binarë +Name[sr]=Бинарни +Name[sr@Latn]=Binarni +Name[ss]=Lokuhamab ngakubili +Name[sv]=Binär +Name[ta]=இரà¯à®®à®®à¯ +Name[te]=à°¦à±à°µà°¿à°¯à°¾à°¶à°‚ +Name[tg]=Дутартиба +Name[th]=ไบนารี +Name[tr]=İkili +Name[tt]=Binar +Name[uk]=Двійковий +Name[uz]=Binar +Name[uz@cyrillic]=Бинар +Name[ven]=Zwivhili +Name[vi]=Nhị phân +Name[wa]=Binaire +Name[xh]=Ephindwe kabini +Name[zh_CN]=二进制 +Name[zh_HK]=äºŒé€²ä½ +Name[zh_TW]=äºŒé€²ä½ +Name[zu]=Okuhambisana ngambili + +[Plugin] +Type=binary +X-TDE-Library=kabcformat_binary diff --git a/tdeabc/formats/binaryformat.cpp b/tdeabc/formats/binaryformat.cpp new file mode 100644 index 000000000..f37146e57 --- /dev/null +++ b/tdeabc/formats/binaryformat.cpp @@ -0,0 +1,221 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include + +#include "addressbook.h" +#include "addressee.h" +#include "picture.h" +#include "sound.h" + +#include "binaryformat.h" + +#define BINARY_FORMAT_VERSION 1 + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT FormatPlugin *format() + { + return new BinaryFormat; + } +} + +bool BinaryFormat::load( Addressee &addressee, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::load()" << endl; + TQDataStream stream( file ); + + if ( !checkHeader( stream ) ) + return false; + + loadAddressee( addressee, stream ); + + return true; +} + +bool BinaryFormat::loadAll( AddressBook*, Resource *resource, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::loadAll()" << endl; + + TQDataStream stream( file ); + + if ( !checkHeader( stream ) ) + return false; + + TQ_UINT32 entries; + + stream >> entries; + + for ( uint i = 0; i < entries; ++i ) { + Addressee addressee; + loadAddressee( addressee, stream ); + addressee.setResource( resource ); + addressee.setChanged( false ); + resource->insertAddressee( addressee ); + } + + return true; +} + +void BinaryFormat::save( const Addressee &addressee, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::save()" << endl; + + TQDataStream stream( file ); + + writeHeader( stream ); + + TQ_UINT32 entries = 1; + stream << entries; + saveAddressee( addressee, stream ); +} + +void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::saveAll()" << endl; + + TQ_UINT32 counter = 0; + TQDataStream stream( file ); + + writeHeader( stream ); + // set dummy number of entries + stream << counter; + + Resource::Iterator it; + for ( it = resource->begin(); it != resource->end(); ++it ) { + saveAddressee( (*it), stream ); + counter++; + (*it).setChanged( false ); + } + + // set real number of entries + stream.device()->at( 2 * sizeof( TQ_UINT32 ) ); + stream << counter; +} + +bool BinaryFormat::checkFormat( TQFile *file ) const +{ + kdDebug(5700) << "BinaryFormat::checkFormat()" << endl; + + TQDataStream stream( file ); + + return checkHeader( stream ); +} + +bool BinaryFormat::checkHeader( TQDataStream &stream ) const +{ + TQ_UINT32 magic, version; + + stream >> magic >> version; + + TQFile *file = dynamic_cast( stream.device() ); + + if ( !file ) { + kdError() << i18n("Not a file?") << endl; + return false; + } + + if ( magic != 0x2e93e ) { + kdError() << TQString(i18n("File '%1' is not binary format.").arg( file->name() )) << endl; + return false; + } + + if ( version != BINARY_FORMAT_VERSION ) { + kdError() << TQString(i18n("File '%1' is the wrong version.").arg( file->name() )) << endl; + return false; + } + + return true; +} + +void BinaryFormat::writeHeader( TQDataStream &stream ) +{ + TQ_UINT32 magic, version; + + magic = 0x2e93e; + version = BINARY_FORMAT_VERSION; + + stream << magic << version; +} + +void BinaryFormat::loadAddressee( Addressee &addressee, TQDataStream &stream ) +{ + stream >> addressee; +/* + // load pictures + Picture photo = addressee.photo(); + Picture logo = addressee.logo(); + + if ( photo.isIntern() ) { + TQImage img; + if ( !img.load( locateLocal( "data", "tdeabc/photos/" ) + addressee.uid() ) ) + kdDebug(5700) << "No photo available for '" << addressee.uid() << "'." << endl; + + addressee.setPhoto( img ); + } + + if ( logo.isIntern() ) { + TQImage img; + if ( !img.load( locateLocal( "data", "tdeabc/logos/" ) + addressee.uid() ) ) + kdDebug(5700) << "No logo available for '" << addressee.uid() << "'." << endl; + + addressee.setLogo( img ); + } + + // load sound + // TODO: load sound data from file +*/ +} + +void BinaryFormat::saveAddressee( const Addressee &addressee, TQDataStream &stream ) +{ + stream << addressee; +/* + // load pictures + Picture photo = addressee.photo(); + Picture logo = addressee.logo(); + + if ( photo.isIntern() ) { + TQImage img = photo.data(); + TQString fileName = locateLocal( "data", "tdeabc/photos/" ) + addressee.uid(); + + if ( !img.save( fileName, "PNG" ) ) + kdDebug(5700) << "Unable to save photo for '" << addressee.uid() << "'." << endl; + } + + if ( logo.isIntern() ) { + TQImage img = logo.data(); + TQString fileName = locateLocal( "data", "tdeabc/logos/" ) + addressee.uid(); + + if ( !img.save( fileName, "PNG" ) ) + kdDebug(5700) << "Unable to save logo for '" << addressee.uid() << "'." << endl; + } + + // save sound + // TODO: save the sound data to file +*/ +} diff --git a/tdeabc/formats/binaryformat.h b/tdeabc/formats/binaryformat.h new file mode 100644 index 000000000..09efde41a --- /dev/null +++ b/tdeabc/formats/binaryformat.h @@ -0,0 +1,69 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_BINARYFORMAT_H +#define KABC_BINARYFORMAT_H + +#include "formatplugin.h" + +namespace KABC { + +class AddressBook; +class Addressee; + +/** + @short binary file format for addressbook entries. +*/ +class BinaryFormat : public FormatPlugin +{ +public: + /** + * Load single addressee from file. + */ + bool load( Addressee &, TQFile *file ); + + /** + * Load whole addressee from file. + */ + bool loadAll( AddressBook *, Resource *, TQFile *file ); + + /** + * Save single addressee to file. + */ + void save( const Addressee &, TQFile *file ); + + /** + * Save all addressees to file. + */ + void saveAll( AddressBook *, Resource *, TQFile *file ); + + /** + * Check for valid format of a file. + */ + bool checkFormat( TQFile *file ) const; + +private: + void loadAddressee( Addressee &, TQDataStream & ); + void saveAddressee( const Addressee &, TQDataStream & ); + bool checkHeader( TQDataStream & ) const; + void writeHeader( TQDataStream & ); +}; + +} +#endif diff --git a/tdeabc/geo.cpp b/tdeabc/geo.cpp new file mode 100644 index 000000000..44f9851e4 --- /dev/null +++ b/tdeabc/geo.cpp @@ -0,0 +1,109 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "geo.h" + +using namespace KABC; + +Geo::Geo() + : mLatitude( 91 ), mLongitude( 181 ), mValidLat( false ), mValidLong( false ) +{ +} + +Geo::Geo( float latitude, float longitude ) +{ + setLatitude( latitude ); + setLongitude( longitude ); +} + +void Geo::setLatitude( float latitude ) +{ + if ( latitude >= -90 && latitude <= 90 ) { + mLatitude = latitude; + mValidLat = true; + } else { + mLatitude = 91; + mValidLat = false; + } +} + +float Geo::latitude() const +{ + return mLatitude; +} + +void Geo::setLongitude( float longitude) +{ + if ( longitude >= -180 && longitude <= 180 ) { + mLongitude = longitude; + mValidLong = true; + } else { + mLongitude = 181; + mValidLong = false; + } +} + +float Geo::longitude() const +{ + return mLongitude; +} + +bool Geo::isValid() const +{ + return mValidLat && mValidLong; +} + +bool Geo::operator==( const Geo &g ) const +{ + if ( !g.isValid() && !isValid() ) return true; + if ( !g.isValid() || !isValid() ) return false; + if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return true; + return false; +} + +bool Geo::operator!=( const Geo &g ) const +{ + if ( !g.isValid() && !isValid() ) return false; + if ( !g.isValid() || !isValid() ) return true; + if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return false; + return true; +} + +TQString Geo::asString() const +{ + return "(" + TQString::number(mLatitude) + "," + TQString::number(mLongitude) + ")"; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Geo &geo ) +{ + return s << (float)geo.mLatitude << (float)geo.mLongitude; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Geo &geo ) +{ + s >> geo.mLatitude >> geo.mLongitude; + + geo.mValidLat = true; + geo.mValidLong = true; + + return s; +} diff --git a/tdeabc/geo.h b/tdeabc/geo.h new file mode 100644 index 000000000..cac6abaff --- /dev/null +++ b/tdeabc/geo.h @@ -0,0 +1,101 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_GEO_H +#define KABC_GEO_H + +#include + +#include + +namespace KABC { + +/** + @short Geographic position + + This class represents a geographic position. +*/ +class KABC_EXPORT Geo +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); + + public: + /** + Construct invalid geographics position object. + */ + Geo(); + + /** + Construct geographics position object. + + @param latitude Geographical latitude + @param longitude Geographical longitude + */ + Geo( float latitude, float longitude ); + + /** + Sets the latitude. + */ + void setLatitude( float ); + + /** + Returns the latitude. + */ + float latitude() const; + + /** + Sets the longitude. + */ + void setLongitude( float ); + + /** + Returns the longitude. + */ + float longitude() const; + + /** + Returns, if this object contains a valid geographical position. + */ + bool isValid() const; + + bool operator==( const Geo & ) const; + bool operator!=( const Geo & ) const; + + /** + Returns string representation of geographical position. + */ + TQString asString() const; + + private: + float mLatitude; + float mLongitude; + + bool mValid; + bool mValidLat; + bool mValidLong; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); + +} + +#endif diff --git a/tdeabc/kabc_manager.desktop b/tdeabc/kabc_manager.desktop new file mode 100644 index 000000000..0af910f52 --- /dev/null +++ b/tdeabc/kabc_manager.desktop @@ -0,0 +1,76 @@ +[Desktop Entry] +Name=Contacts +Name[af]=Kontakte +Name[ar]=المراسلين +Name[be]=Кантакты +Name[br]=Darempredoù +Name[bs]=Kontakti +Name[ca]=Contactes +Name[cs]=Kontakty +Name[csb]=ÅÄ…czbë +Name[cy]=Cysylltau +Name[da]=Kontakter +Name[de]=Kontakte +Name[el]=Επαφές +Name[eo]=Kontaktoj +Name[es]=Contactos +Name[et]=Kontaktid +Name[eu]=Kontaktuak +Name[fa]=تماسها +Name[fi]=Yhteystiedot +Name[fy]=Kontakten +Name[ga]=Teagmhálacha +Name[gl]=Contactos +Name[he]=×נשי קשר +Name[hi]=समà¥à¤ªà¤°à¥à¤• +Name[hr]=Kontakti +Name[hsb]=Adresy +Name[hu]=Névjegyek +Name[id]=Kontak +Name[is]=Tengiliðir +Name[it]=Contatti +Name[ja]=コンタクト +Name[ka]=კáƒáƒœáƒ¢áƒáƒ¥áƒ¢áƒ”ბი +Name[kk]=Контакттар +Name[km]=ទំនាក់ទំនង +Name[ku]=Tekilî +Name[lb]=Kontakter +Name[lt]=Kontaktai +Name[lv]=Kontakti +Name[mk]=Контакти +Name[ms]=Hubungan +Name[nb]=Kontakter +Name[nds]=Kontakten +Name[ne]=समà¥à¤ªà¤°à¥à¤• +Name[nl]=Contactpersonen +Name[nn]=Kontaktar +Name[pa]=ਸੰਪਰਕ +Name[pl]=Kontakty +Name[pt]=Contactos +Name[pt_BR]=Contatos +Name[ro]=Contacte +Name[ru]=Контакты +Name[rw]=Amaderesi +Name[se]=OktavuoÄ‘at +Name[sk]=Kontakty +Name[sl]=Stiki +Name[sr]=Контакти +Name[sr@Latn]=Kontakti +Name[sv]=Kontakter +Name[ta]=தொடரà¯à®ªà¯à®•ள௠+Name[te]=సంపà±à°°à°¦à°¿à°‚à°ªà±à°²à± +Name[tg]=Ðлоқаҳо +Name[th]=รายชื่อติดต่อ +Name[tr]=BaÄŸlantılar +Name[tt]=Elemtälär +Name[uk]=Контакти +Name[uz]=Aloqalar +Name[uz@cyrillic]=Ðлоқалар +Name[vi]=Liên lạc +Name[zh_CN]=è”系人 +Name[zh_HK]=è¯çµ¡äºº +Name[zh_TW]=è¯çµ¡äºº +Type=Service +ServiceTypes=KResources/Manager + +X-TDE-ResourceFamily=contact diff --git a/tdeabc/key.cpp b/tdeabc/key.cpp new file mode 100644 index 000000000..08d9c6872 --- /dev/null +++ b/tdeabc/key.cpp @@ -0,0 +1,153 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "key.h" + +using namespace KABC; + +Key::Key( const TQString &text, int type ) + : mTextData( text ), mIsBinary( false ), mType( type ) +{ + mId = TDEApplication::randomString(8); +} + +Key::~Key() +{ +} + +bool Key::operator==( const Key &k ) const +{ + if ( mIsBinary != k.mIsBinary ) return false; + if ( mIsBinary ) + if ( mBinaryData != k.mBinaryData ) return false; + else + if ( mTextData != k.mTextData ) return false; + if ( mType != k.mType ) return false; + if ( mCustomTypeString != k.mCustomTypeString ) return false; + + return true; +} + +bool Key::operator!=( const Key &k ) const +{ + return !( k == *this ); +} + +void Key::setId( const TQString &id ) +{ + mId = id; +} + +TQString Key::id() const +{ + return mId; +} + +void Key::setBinaryData( const TQByteArray &binary ) +{ + mBinaryData = binary; + mIsBinary = true; +} + +TQByteArray Key::binaryData() const +{ + return mBinaryData; +} + +void Key::setTextData( const TQString &text ) +{ + mTextData = text; + mIsBinary = false; +} + +TQString Key::textData() const +{ + return mTextData; +} + +bool Key::isBinary() const +{ + return mIsBinary; +} + +void Key::setType( int type ) +{ + mType = type; +} + +void Key::setCustomTypeString( const TQString &custom ) +{ + mCustomTypeString = custom; +} + +int Key::type() const +{ + return mType; +} + +TQString Key::customTypeString() const +{ + return mCustomTypeString; +} + +Key::TypeList Key::typeList() +{ + TypeList list; + list << X509; + list << PGP; + list << Custom; + + return list; +} + +TQString Key::typeLabel( int type ) +{ + switch ( type ) { + case X509: + return i18n( "X509" ); + break; + case PGP: + return i18n( "PGP" ); + break; + case Custom: + return i18n( "Custom" ); + break; + default: + return i18n( "Unknown type" ); + break; + } +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Key &key ) +{ + return s << key.mId << key.mIsBinary << key.mTextData << key.mBinaryData << + key.mCustomTypeString << key.mType; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Key &key ) +{ + s >> key.mId >> key.mIsBinary >> key.mTextData >> key.mBinaryData >> + key.mCustomTypeString >> key.mType; + + return s; +} diff --git a/tdeabc/key.h b/tdeabc/key.h new file mode 100644 index 000000000..08df0264d --- /dev/null +++ b/tdeabc/key.h @@ -0,0 +1,150 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_KEY_H +#define KABC_KEY_H + +#include + +#include + +namespace KABC { + +/** + * @short A class to store an encryption key. + */ +class KABC_EXPORT Key +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); + +public: + typedef TQValueList List; + typedef TQValueList TypeList; + + /** + * Key types + * + * @li X509 - X509 key + * @li PGP - Pretty Good Privacy key + * @li Custom - Custom or IANA conform key + */ + enum Types { + X509, + PGP, + Custom + }; + + /** + * Constructor. + * + * @param text The text data. + * @param type The key type, see Types. + */ + Key( const TQString &text = TQString::null, int type = PGP ); + + /** + * Destructor. + */ + ~Key(); + + bool operator==( const Key & ) const; + bool operator!=( const Key & ) const; + + /** + * Sets the unique identifier. + */ + void setId( const TQString &id ); + + /** + * Returns the unique identifier. + */ + TQString id() const; + + /** + * Sets binary data. + */ + void setBinaryData( const TQByteArray &binary ); + + /** + * Returns the binary data. + */ + TQByteArray binaryData() const; + + /** + * Sets text data. + */ + void setTextData( const TQString &text ); + + /** + * Returns the text data. + */ + TQString textData() const; + + /** + * Returns whether the key contains binary or text data. + */ + bool isBinary() const; + + /** + * Sets the type, see Type. + */ + void setType( int type ); + + /** + * Sets custom type string. + */ + void setCustomTypeString( const TQString &custom ); + + /** + * Returns the type, see Type. + */ + int type() const; + + /** + * Returns the custom type string. + */ + TQString customTypeString() const; + + /** + * Returns a list of all available key types. + */ + static TypeList typeList(); + + /** + * Returns a translated label for a given key type. + */ + static TQString typeLabel( int type ); + +private: + TQByteArray mBinaryData; + TQString mId; + TQString mTextData; + TQString mCustomTypeString; + + int mIsBinary; + int mType; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); + +} +#endif diff --git a/tdeabc/ldapclient.cpp b/tdeabc/ldapclient.cpp new file mode 100644 index 000000000..1c2b2d833 --- /dev/null +++ b/tdeabc/ldapclient.cpp @@ -0,0 +1,427 @@ +/* kldapclient.cpp - LDAP access + * Copyright (C) 2002 Klarälvdalens Datakonsult AB + * + * Author: Steffen Hansen + * + * Ported to KABC by Daniel Molkentin + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ldapclient.h" +#include "ldif.h" +#include "ldapurl.h" + +using namespace KABC; + +class LdapClient::LdapClientPrivate{ +public: + TQString bindDN; + TQString pwdBindDN; + LDIF ldif; +}; + +TQString LdapObject::toString() const +{ + TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); + for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { + TQString attr = it.key(); + for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { + result += TQString::fromUtf8( LDIF::assembleLine( attr, *it2, 76 ) ) + "\n"; + } + } + + return result; +} + +void LdapObject::clear() +{ + dn = TQString::null; + attrs.clear(); +} + +void LdapObject::assign( const LdapObject& that ) +{ + if ( &that != this ) { + dn = that.dn; + attrs = that.attrs; + client = that.client; + } +} + +LdapClient::LdapClient( TQObject* parent, const char* name ) + : TQObject( parent, name ), mJob( 0 ), mActive( false ) +{ + d = new LdapClientPrivate; +} + +LdapClient::~LdapClient() +{ + cancelQuery(); + delete d; d = 0; +} + +void LdapClient::setHost( const TQString& host ) +{ + mHost = host; +} + +void LdapClient::setPort( const TQString& port ) +{ + mPort = port; +} + +void LdapClient::setBase( const TQString& base ) +{ + mBase = base; +} + +void LdapClient::setBindDN( const TQString& bindDN ) +{ + d->bindDN = bindDN; +} + +void LdapClient::setPwdBindDN( const TQString& pwdBindDN ) +{ + d->pwdBindDN = pwdBindDN; +} + +void LdapClient::setAttrs( const TQStringList& attrs ) +{ + mAttrs = attrs; +} + +void LdapClient::startQuery( const TQString& filter ) +{ + cancelQuery(); + LDAPUrl url; + + url.setProtocol( "ldap" ); + url.setUser( d->bindDN ); + url.setPass( d->pwdBindDN ); + url.setHost( mHost ); + url.setPort( mPort.toUInt() ); + url.setDn( mBase ); + url.setAttributes( mAttrs ); + url.setScope( mScope == "one" ? LDAPUrl::One : LDAPUrl::Sub ); + url.setFilter( "("+filter+")" ); + + kdDebug(5700) << "Doing query: " << url.prettyURL() << endl; + + startParseLDIF(); + mActive = true; + mJob = TDEIO::get( url, false, false ); + connect( mJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( mJob, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), + this, TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString& ) ) ); + connect( mJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( slotDone() ) ); +} + +void LdapClient::cancelQuery() +{ + if ( mJob ) { + mJob->kill(); + mJob = 0; + } + + mActive = false; +} + +void LdapClient::slotData( TDEIO::Job*, const TQByteArray& data ) +{ +#ifndef NDEBUG // don't create the QString +// TQString str( data ); +// kdDebug(5700) << "LdapClient: Got \"" << str << "\"\n"; +#endif + parseLDIF( data ); +} + +void LdapClient::slotInfoMessage( TDEIO::Job*, const TQString & ) +{ + //tqDebug("Job said \"%s\"", info.latin1()); +} + +void LdapClient::slotDone() +{ + endParseLDIF(); + mActive = false; +#if 0 + for ( TQValueList::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) { + tqDebug( (*it).toString().latin1() ); + } +#endif + int err = mJob->error(); + if ( err && err != TDEIO::ERR_USER_CANCELED ) { + emit error( TDEIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); + } + emit done(); +} + +void LdapClient::startParseLDIF() +{ + mCurrentObject.clear(); + mLastAttrName = 0; + mLastAttrValue = 0; + mIsBase64 = false; + d->ldif.startParsing(); +} + +void LdapClient::endParseLDIF() +{ +} + +void LdapClient::parseLDIF( const TQByteArray& data ) +{ + if ( data.size() ) { + d->ldif.setLDIF( data ); + } else { + d->ldif.endLDIF(); + } + + LDIF::ParseVal ret; + TQString name; + do { + ret = d->ldif.nextItem(); + switch ( ret ) { + case LDIF::Item: + { + name = d->ldif.attr(); + // Must make a copy! TQByteArray is explicitely shared + TQByteArray value = d->ldif.val().copy(); + mCurrentObject.attrs[ name ].append( value ); + break; + } + case LDIF::EndEntry: + mCurrentObject.dn = d->ldif.dn(); + mCurrentObject.client = this; + emit result( mCurrentObject ); + mCurrentObject.clear(); + break; + default: + break; + } + } while ( ret != LDIF::MoreData ); +} + +TQString LdapClient::bindDN() const +{ + return d->bindDN; +} + +TQString LdapClient::pwdBindDN() const +{ + return d->pwdBindDN; +} + +LdapSearch::LdapSearch() + : mActiveClients( 0 ), mNoLDAPLookup( false ) +{ + if ( !KProtocolInfo::isKnownProtocol( KURL("ldap://localhost") ) ) { + mNoLDAPLookup = true; + return; + } + + // stolen from KAddressBook + TDEConfig config( "kabldaprc", true ); + config.setGroup( "LDAP" ); + int numHosts = config.readUnsignedNumEntry( "NumSelectedHosts"); + if ( !numHosts ) { + mNoLDAPLookup = true; + return; + } else { + for ( int j = 0; j < numHosts; j++ ) { + LdapClient* ldapClient = new LdapClient( this ); + + TQString host = config.readEntry( TQString( "SelectedHost%1" ).arg( j ), "" ).stripWhiteSpace(); + if ( !host.isEmpty() ) + ldapClient->setHost( host ); + + TQString port = TQString::number( config.readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) ) ); + if ( !port.isEmpty() ) + ldapClient->setPort( port ); + + TQString base = config.readEntry( TQString( "SelectedBase%1" ).arg( j ), "" ).stripWhiteSpace(); + if ( !base.isEmpty() ) + ldapClient->setBase( base ); + + TQString bindDN = config.readEntry( TQString( "SelectedBind%1" ).arg( j ) ).stripWhiteSpace(); + if ( !bindDN.isEmpty() ) + ldapClient->setBindDN( bindDN ); + + TQString pwdBindDN = config.readEntry( TQString( "SelectedPwdBind%1" ).arg( j ) ); + if ( !pwdBindDN.isEmpty() ) + ldapClient->setPwdBindDN( pwdBindDN ); + + TQStringList attrs; + attrs << "cn" << "mail" << "givenname" << "sn"; + ldapClient->setAttrs( attrs ); + + connect( ldapClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), + this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); + connect( ldapClient, TQT_SIGNAL( done() ), + this, TQT_SLOT( slotLDAPDone() ) ); + connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ), + this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); + + mClients.append( ldapClient ); + } + } + + connect( &mDataTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDataTimer() ) ); +} + +void LdapSearch::startSearch( const TQString& txt ) +{ + if ( mNoLDAPLookup ) + return; + + cancelSearch(); + + int pos = txt.find( '\"' ); + if( pos >= 0 ) + { + ++pos; + int pos2 = txt.find( '\"', pos ); + if( pos2 >= 0 ) + mSearchText = txt.mid( pos , pos2 - pos ); + else + mSearchText = txt.mid( pos ); + } else + mSearchText = txt; + + TQString filter = TQString( "|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*)" ) + .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); + + TQValueList< LdapClient* >::Iterator it; + for ( it = mClients.begin(); it != mClients.end(); ++it ) { + (*it)->startQuery( filter ); + ++mActiveClients; + } +} + +void LdapSearch::cancelSearch() +{ + TQValueList< LdapClient* >::Iterator it; + for ( it = mClients.begin(); it != mClients.end(); ++it ) + (*it)->cancelQuery(); + + mActiveClients = 0; + mResults.clear(); +} + +void LdapSearch::slotLDAPResult( const KABC::LdapObject& obj ) +{ + mResults.append( obj ); + if ( !mDataTimer.isActive() ) + mDataTimer.start( 500, true ); +} + +void LdapSearch::slotLDAPError( const TQString& ) +{ + slotLDAPDone(); +} + +void LdapSearch::slotLDAPDone() +{ + if ( --mActiveClients > 0 ) + return; + + finish(); +} + +void LdapSearch::slotDataTimer() +{ + TQStringList lst; + LdapResultList reslist; + makeSearchData( lst, reslist ); + if ( !lst.isEmpty() ) + emit searchData( lst ); + if ( !reslist.isEmpty() ) + emit searchData( reslist ); +} + +void LdapSearch::finish() +{ + mDataTimer.stop(); + + slotDataTimer(); // emit final bunch of data + emit searchDone(); +} + +void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) +{ + TQString search_text_upper = mSearchText.upper(); + + TQValueList< KABC::LdapObject >::ConstIterator it1; + for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) { + TQString name, mail, givenname, sn; + + LdapAttrMap::ConstIterator it2; + for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) { + TQString tmp = TQString::fromUtf8( (*it2).first(), (*it2).first().size() ); + if ( it2.key() == "cn" ) + name = tmp; // TODO loop? + else if( it2.key() == "mail" ) + mail = tmp; + else if( it2.key() == "givenName" ) + givenname = tmp; + else if( it2.key() == "sn" ) + sn = tmp; + } + + if( mail.isEmpty()) + continue; // nothing, bad entry + else if ( name.isEmpty() ) + ret.append( mail ); + else { + kdDebug(5700) << "<" << name << "><" << mail << ">" << endl; + ret.append( TQString( "%1 <%2>" ).arg( name ).arg( mail ) ); + } + + LdapResult sr; + sr.clientNumber = mClients.findIndex( (*it1).client ); + sr.name = name; + sr.email = mail; + resList.append( sr ); + } + + mResults.clear(); +} + +bool LdapSearch::isAvailable() const +{ + return !mNoLDAPLookup; +} + + + +#include "ldapclient.moc" diff --git a/tdeabc/ldapclient.h b/tdeabc/ldapclient.h new file mode 100644 index 000000000..f43a644ce --- /dev/null +++ b/tdeabc/ldapclient.h @@ -0,0 +1,248 @@ +/* kldapclient.h - LDAP access + * Copyright (C) 2002 Klarälvdalens Datakonsult AB + * + * Author: Steffen Hansen + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#ifndef KABC_LDAPCLIENT_H +#define KABC_LDAPCLIENT_H + + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace KABC { + +class LdapClient; +typedef TQValueList LdapAttrValue; +typedef TQMap LdapAttrMap; + +/** + * This class is internal. Binary compatibiliy might be broken any time + * without notification. Do not use it. + * + * We mean it! + * + */ +class KABC_EXPORT LdapObject +{ + public: + LdapObject() + : dn( TQString::null ), client( 0 ) {} + explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {} + LdapObject( const LdapObject& that ) { assign( that ); } + + LdapObject& operator=( const LdapObject& that ) + { + assign( that ); + return *this; + } + + TQString toString() const; + + void clear(); + + TQString dn; + LdapAttrMap attrs; + LdapClient* client; + + protected: + void assign( const LdapObject& that ); + + private: + //class LdapObjectPrivate* d; +}; + +/** + * This class is internal. Binary compatibiliy might be broken any time + * without notification. Do not use it. + * + * We mean it! + * + */ +class KABC_EXPORT LdapClient : public TQObject +{ + Q_OBJECT + + public: + LdapClient( TQObject* parent = 0, const char* name = 0 ); + virtual ~LdapClient(); + + /*! returns true if there is a query running */ + bool isActive() const { return mActive; } + + signals: + /*! Emitted when the query is done */ + void done(); + + /*! Emitted in case of error */ + void error( const TQString& ); + + /*! Emitted once for each object returned + * from the query + */ + void result( const KABC::LdapObject& ); + + public slots: + /*! + * Set the name or IP of the LDAP server + */ + void setHost( const TQString& host ); + TQString host() const { return mHost; } + + /*! + * Set the port of the LDAP server + * if using a nonstandard port + */ + void setPort( const TQString& port ); + TQString port() const { return mPort; } + + /*! + * Set the base DN + */ + void setBase( const TQString& base ); + TQString base() const { return mBase; } + + /*! + * Set the bind DN + */ + void setBindDN( const TQString& bindDN ); + TQString bindDN() const; + + /*! + * Set the bind password DN + */ + void setPwdBindDN( const TQString& pwdBindDN ); + TQString pwdBindDN() const; + + /*! Set the attributes that should be + * returned, or an empty list if + * all attributes are wanted + */ + void setAttrs( const TQStringList& attrs ); + TQStringList attrs() const { return mAttrs; } + + void setScope( const TQString scope ) { mScope = scope; } + + /*! + * Start the query with filter filter + */ + void startQuery( const TQString& filter ); + + /*! + * Abort a running query + */ + void cancelQuery(); + + protected slots: + void slotData( TDEIO::Job*, const TQByteArray &data ); + void slotInfoMessage( TDEIO::Job*, const TQString &info ); + void slotDone(); + + protected: + void startParseLDIF(); + void parseLDIF( const TQByteArray& data ); + void endParseLDIF(); + + TQString mHost; + TQString mPort; + TQString mBase; + TQString mScope; + TQStringList mAttrs; + + TQGuardedPtr mJob; + bool mActive; + + LdapObject mCurrentObject; + TQCString mBuf; + TQCString mLastAttrName; + TQCString mLastAttrValue; + bool mIsBase64; + + private: + class LdapClientPrivate; + LdapClientPrivate* d; +}; + +/** + * Structure describing one result returned by a LDAP query + */ +struct LdapResult { + TQString name; ///< full name + TQString email; ///< email + int clientNumber; ///< for sorting +}; +typedef TQValueList LdapResultList; + + +/** + * This class is internal. Binary compatibiliy might be broken any time + * without notification. Do not use it. + * + * We mean it! + * + */ +class KABC_EXPORT LdapSearch : public TQObject +{ + Q_OBJECT + + public: + LdapSearch(); + + void startSearch( const TQString& txt ); + void cancelSearch(); + bool isAvailable() const; + + signals: + /// Results, assembled as "Full Name " + /// (This signal can be emitted many times) + void searchData( const TQStringList& ); + /// Another form for the results, with separate fields + /// (This signal can be emitted many times) + void searchData( const KABC::LdapResultList& ); + void searchDone(); + + private slots: + void slotLDAPResult( const KABC::LdapObject& ); + void slotLDAPError( const TQString& ); + void slotLDAPDone(); + void slotDataTimer(); + + private: + void finish(); + void makeSearchData( TQStringList& ret, LdapResultList& resList ); + TQValueList< LdapClient* > mClients; + TQString mSearchText; + TQTimer mDataTimer; + int mActiveClients; + bool mNoLDAPLookup; + TQValueList< LdapObject > mResults; + + private: + class LdapSearchPrivate* d; +}; + +} +#endif // KABC_LDAPCLIENT_H diff --git a/tdeabc/ldapconfigwidget.cpp b/tdeabc/ldapconfigwidget.cpp new file mode 100644 index 000000000..fa092754e --- /dev/null +++ b/tdeabc/ldapconfigwidget.cpp @@ -0,0 +1,626 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "ldapconfigwidget.h" +#include "ldapconfigwidget.moc" + +using namespace KABC; + +LdapConfigWidget::LdapConfigWidget( TQWidget* parent, + const char* name, WFlags fl ) : TQWidget( parent, name, fl ) +{ + mProg = 0; + mFlags = 0; + mainLayout = new TQGridLayout( this, 12, 4, 0, + KDialog::spacingHint() ); +} + +LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent, + const char* name, WFlags fl ) : TQWidget( parent, name, fl ) +{ + mFlags = flags; + mProg = 0; + mainLayout = new TQGridLayout( this, 12, 4, 0, + KDialog::spacingHint() ); + initWidget(); +} + +LdapConfigWidget::~LdapConfigWidget() +{ +} + +void LdapConfigWidget::initWidget() +{ + TQLabel *label; + + mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0; + mPort = mVer = mTimeLimit = mSizeLimit = 0; + mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = 0; + mEditButton = mQueryMech = 0; + mMech = 0; + int row = 0; + int col; + + if ( mFlags & W_USER ) { + label = new TQLabel( i18n( "User:" ), this ); + mUser = new KLineEdit( this, "kcfg_ldapuser" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mUser, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_BINDDN ) { + label = new TQLabel( i18n( "Bind DN:" ), this ); + mBindDN = new KLineEdit( this, "kcfg_ldapbinddn" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mBindDN, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_REALM ) { + label = new TQLabel( i18n( "Realm:" ), this ); + mRealm = new KLineEdit( this, "kcfg_ldaprealm" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mRealm, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_PASS ) { + label = new TQLabel( i18n( "Password:" ), this ); + mPassword = new KLineEdit( this, "kcfg_ldappassword" ); + mPassword->setEchoMode( KLineEdit::Password ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mPassword, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_HOST ) { + label = new TQLabel( i18n( "Host:" ), this ); + mHost = new KLineEdit( this, "kcfg_ldaphost" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mHost, row, row, 1, 3 ); + row++; + } + + col = 0; + if ( mFlags & W_PORT ) { + label = new TQLabel( i18n( "Port:" ), this ); + mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" ); + mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mPort->setValue( 389 ); + + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mPort, row, col+1 ); + col += 2; + } + + if ( mFlags & W_VER ) { + label = new TQLabel( i18n( "LDAP version:" ), this ); + mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" ); + mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mVer->setValue( 3 ); + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mVer, row, col+1 ); + } + if ( mFlags & ( W_PORT | W_VER ) ) row++; + + col = 0; + if ( mFlags & W_SIZELIMIT ) { + label = new TQLabel( i18n( "Size limit:" ), this ); + mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" ); + mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mSizeLimit->setValue( 0 ); + mSizeLimit->setSpecialValueText( i18n("Default") ); + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mSizeLimit, row, col+1 ); + col += 2; + } + + if ( mFlags & W_TIMELIMIT ) { + label = new TQLabel( i18n( "Time limit:" ), this ); + mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" ); + mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mTimeLimit->setValue( 0 ); + mTimeLimit->setSuffix( i18n(" sec") ); + mTimeLimit->setSpecialValueText( i18n("Default") ); + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mTimeLimit, row, col+1 ); + } + if ( mFlags & ( W_SIZELIMIT | W_TIMELIMIT ) ) row++; + + if ( mFlags & W_DN ) { + label = new TQLabel( i18n( "Distinguished Name", "DN:" ), this ); + mDn = new KLineEdit( this, "kcfg_ldapdn" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mDn, row, row, 1, 1 ); + //without host query doesn't make sense + if ( mHost ) { + TQPushButton *dnquery = new TQPushButton( i18n( "Query Server" ), this ); + connect( dnquery, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryDNClicked() ) ); + mainLayout->addMultiCellWidget( dnquery, row, row, 2, 3 ); + } + row++; + } + + if ( mFlags & W_FILTER ) { + label = new TQLabel( i18n( "Filter:" ), this ); + mFilter = new KLineEdit( this, "kcfg_ldapfilter" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mFilter, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_SECBOX ) { + TQHButtonGroup *btgroup = new TQHButtonGroup( i18n( "Security" ), this ); + mSecNO = new TQRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" ); + mSecTLS = new TQRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" ); + mSecSSL = new TQRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" ); + mainLayout->addMultiCellWidget( btgroup, row, row, 0, 3 ); + + connect( mSecNO, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); + connect( mSecTLS, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); + connect( mSecSSL, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPSPort( ) ) ); + + mSecNO->setChecked( true ); + row++; + } + + if ( mFlags & W_AUTHBOX ) { + + TQButtonGroup *authbox = + new TQButtonGroup( 3, Qt::Horizontal, i18n( "Authentication" ), this ); + + mAnonymous = new TQRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" ); + mSimple = new TQRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" ); + mSASL = new TQRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" ); + + label = new TQLabel( i18n( "SASL mechanism:" ), authbox ); + mMech = new KComboBox( false, authbox, "kcfg_ldapsaslmech" ); + mMech->setEditable( true ); + mMech->insertItem( "DIGEST-MD5" ); + mMech->insertItem( "GSSAPI" ); + mMech->insertItem( "PLAIN" ); + + //without host query doesn't make sense + if ( mHost ) { + mQueryMech = new TQPushButton( i18n( "Query Server" ), authbox ); + connect( mQueryMech, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryMechClicked() ) ); + } + + mainLayout->addMultiCellWidget( authbox, row, row+1, 0, 3 ); + + connect( mAnonymous, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setAnonymous(int) ) ); + connect( mSimple, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSimple(int) ) ); + connect( mSASL, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSASL(int) ) ); + + mAnonymous->setChecked( true ); + } + +} + +void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d ) +{ + LDIF::ParseVal ret; + + if ( d.size() ) { + mLdif.setLDIF( d ); + } else { + mLdif.endLDIF(); + } + do { + ret = mLdif.nextItem(); + if ( ret == LDIF::Item && mLdif.attr().lower() == mAttr ) { + mProg->progressBar()->advance( 1 ); + mQResult.push_back( TQString::fromUtf8( mLdif.val(), mLdif.val().size() ) ); + } + } while ( ret != LDIF::MoreData ); +} + +void LdapConfigWidget::loadResult( TDEIO::Job* job) +{ + int error = job->error(); + if ( error && error != TDEIO::ERR_USER_CANCELED ) + mErrorMsg = job->errorString(); + else + mErrorMsg = ""; + + mCancelled = false; + mProg->close(); +} + +void LdapConfigWidget::sendQuery() +{ + LDAPUrl _url; + + mQResult.clear(); + mCancelled = true; + + _url.setProtocol( ( mSecSSL && mSecSSL->isChecked() ) ? "ldaps" : "ldap" ); + if ( mHost ) _url.setHost( mHost->text() ); + if ( mPort ) _url.setPort( mPort->value() ); + _url.setDn( "" ); + _url.setAttributes( mAttr ); + _url.setScope( LDAPUrl::Base ); + if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); + if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls", "" ); + + kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl; + mLdif.startParsing(); + TDEIO::Job *job = TDEIO::get( _url, true, false ); + job->addMetaData("no-auth-prompt","true"); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadResult( TDEIO::Job* ) ) ); + + if ( mProg == NULL ) + mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); + else + mProg->setLabel( _url.prettyURL() ); + mProg->progressBar()->setValue( 0 ); + mProg->progressBar()->setTotalSteps( 1 ); + mProg->exec(); + if ( mCancelled ) { + kdDebug(5700) << "query cancelled!" << endl; + job->kill( true ); + } else { + if ( !mErrorMsg.isEmpty() ) KMessageBox::error( this, mErrorMsg ); + } +} + +void LdapConfigWidget::mQueryMechClicked() +{ + mAttr = "supportedsaslmechanisms"; + sendQuery(); + if ( !mQResult.isEmpty() ) { + mQResult.sort(); + mMech->clear(); + mMech->insertStringList( mQResult ); + } +} + +void LdapConfigWidget::mQueryDNClicked() +{ + mAttr = "namingcontexts"; + sendQuery(); + if ( !mQResult.isEmpty() ) mDn->setText( mQResult.first() ); +} + +void LdapConfigWidget::setAnonymous( int state ) +{ + if ( state == TQButton::Off ) return; + if ( mUser ) mUser->setEnabled(false); + if ( mPassword ) mPassword->setEnabled(false); + if ( mBindDN ) mBindDN->setEnabled(false); + if ( mRealm ) mRealm->setEnabled(false); + if ( mMech ) mMech->setEnabled(false); + if ( mQueryMech ) mQueryMech->setEnabled(false); +} + +void LdapConfigWidget::setSimple( int state ) +{ + if ( state == TQButton::Off ) return; + if ( mUser ) mUser->setEnabled(true); + if ( mPassword ) mPassword->setEnabled(true); + if ( mBindDN ) mBindDN->setEnabled(false); + if ( mRealm ) mRealm->setEnabled(false); + if ( mMech ) mMech->setEnabled(false); + if ( mQueryMech ) mQueryMech->setEnabled(false); +} + +void LdapConfigWidget::setSASL( int state ) +{ + if ( state == TQButton::Off ) return; + if ( mUser ) mUser->setEnabled(true); + if ( mPassword ) mPassword->setEnabled(true); + if ( mBindDN ) mBindDN->setEnabled(true); + if ( mRealm ) mRealm->setEnabled(true); + if ( mMech ) mMech->setEnabled(true); + if ( mQueryMech ) mQueryMech->setEnabled(true); +} + +void LdapConfigWidget::setLDAPPort() +{ + mPort->setValue( 389 ); +} + +void LdapConfigWidget::setLDAPSPort() +{ + mPort->setValue( 636 ); +} + + +LDAPUrl LdapConfigWidget::url() const +{ + LDAPUrl _url; + if ( mSecSSL && mSecSSL->isChecked() ) + _url.setProtocol( "ldaps" ); + else + _url.setProtocol( "ldap" ); + + if ( mUser ) _url.setUser( mUser->text() ); + if ( mPassword ) _url.setPass( mPassword->text() ); + if ( mHost ) _url.setHost( mHost->text() ); + if ( mPort ) _url.setPort( mPort->value() ); + if ( mDn ) _url.setDn( mDn->text() ); + if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); + if ( mSizeLimit && mSizeLimit->value() != 0 ) + _url.setExtension( "x-sizelimit", TQString::number( mSizeLimit->value() ) ); + if ( mTimeLimit && mTimeLimit->value() != 0 ) + _url.setExtension( "x-timelimit", TQString::number( mTimeLimit->value() ) ); + if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls","" ); + if ( mFilter && !mFilter->text().isEmpty() ) + _url.setFilter( mFilter->text() ); + if ( mSASL && mSASL->isChecked() ) { + _url.setExtension( "x-sasl", "" ); + _url.setExtension( "x-mech", mMech->currentText() ); + if ( mBindDN && !mBindDN->text().isEmpty() ) + _url.setExtension( "bindname", mBindDN->text() ); + if ( mRealm && !mRealm->text().isEmpty() ) + _url.setExtension( "x-realm", mRealm->text() ); + } + return ( _url ); +} + +void LdapConfigWidget::setUser( const TQString &user ) +{ + if ( mUser ) mUser->setText( user ); +} + +TQString LdapConfigWidget::user() const +{ + return ( mUser ? mUser->text() : TQString::null ); +} + +void LdapConfigWidget::setPassword( const TQString &password ) +{ + if ( mPassword ) mPassword->setText( password ); +} + +TQString LdapConfigWidget::password() const +{ + return ( mPassword ? mPassword->text() : TQString::null ); +} + +void LdapConfigWidget::setBindDN( const TQString &binddn ) +{ + if ( mBindDN ) mBindDN->setText( binddn ); +} + +TQString LdapConfigWidget::bindDN() const +{ + return ( mBindDN ? mBindDN->text() : TQString::null ); +} + +void LdapConfigWidget::setRealm( const TQString &realm ) +{ + if ( mRealm ) mRealm->setText( realm ); +} + +TQString LdapConfigWidget::realm() const +{ + return ( mRealm ? mRealm->text() : TQString::null ); +} + +void LdapConfigWidget::setHost( const TQString &host ) +{ + if ( mHost ) mHost->setText( host ); +} + +TQString LdapConfigWidget::host() const +{ + return ( mHost ? mHost->text() : TQString::null ); +} + +void LdapConfigWidget::setPort( int port ) +{ + if ( mPort ) mPort->setValue( port ); +} + +int LdapConfigWidget::port() const +{ + return ( mPort ? mPort->value() : 389 ); +} + +void LdapConfigWidget::setVer( int ver ) +{ + if ( mVer ) mVer->setValue( ver ); +} + +int LdapConfigWidget::ver() const +{ + return ( mVer ? mVer->value() : 3 ); +} + +void LdapConfigWidget::setDn( const TQString &dn ) +{ + if ( mDn ) mDn->setText( dn ); +} + +TQString LdapConfigWidget::dn() const +{ + return ( mDn ? mDn->text() : TQString::null ); +} + +void LdapConfigWidget::setFilter( const TQString &filter ) +{ + if ( mFilter ) mFilter->setText( filter ); +} + +TQString LdapConfigWidget::filter() const +{ + return ( mFilter ? mFilter->text() : TQString::null ); +} + +void LdapConfigWidget::setMech( const TQString &mech ) +{ + if ( mMech == 0 ) return; + if ( !mech.isEmpty() ) { + int i = 0; + while ( i < mMech->count() ) { + if ( mMech->text( i ) == mech ) break; + i++; + } + if ( i == mMech->count() ) mMech->insertItem( mech ); + mMech->setCurrentItem( i ); + } +} + +TQString LdapConfigWidget::mech() const +{ + return ( mMech ? mMech->currentText() : TQString::null ); +} + +void LdapConfigWidget::setSecNO( bool b ) +{ + if ( mSecNO ) mSecNO->setChecked( b ); +} + +bool LdapConfigWidget::isSecNO() const +{ + return ( mSecNO ? mSecNO->isChecked() : true ); +} + +void LdapConfigWidget::setSecTLS( bool b ) +{ + if ( mSecTLS ) mSecTLS->setChecked( b ); +} + +bool LdapConfigWidget::isSecTLS() const +{ + return ( mSecTLS ? mSecTLS->isChecked() : false ); +} + +void LdapConfigWidget::setSecSSL( bool b ) +{ + if ( mSecSSL ) mSecSSL->setChecked( b ); +} + +bool LdapConfigWidget::isSecSSL() const +{ + return ( mSecSSL ? mSecSSL->isChecked() : false ); +} + +void LdapConfigWidget::setAuthAnon( bool b ) +{ + if ( mAnonymous ) mAnonymous->setChecked( b ); +} + +bool LdapConfigWidget::isAuthAnon() const +{ + return ( mAnonymous ? mAnonymous->isChecked() : true ); +} + +void LdapConfigWidget::setAuthSimple( bool b ) +{ + if ( mSimple ) mSimple->setChecked( b ); +} + +bool LdapConfigWidget::isAuthSimple() const +{ + return ( mSimple ? mSimple->isChecked() : false ); +} + +void LdapConfigWidget::setAuthSASL( bool b ) +{ + if ( mSASL ) mSASL->setChecked( b ); +} + +bool LdapConfigWidget::isAuthSASL() const +{ + return ( mSASL ? mSASL->isChecked() : false ); +} + +void LdapConfigWidget::setSizeLimit( int sizelimit ) +{ + if ( mSizeLimit ) mSizeLimit->setValue( sizelimit ); +} + +int LdapConfigWidget::sizeLimit() const +{ + return ( mSizeLimit ? mSizeLimit->value() : 0 ); +} + +void LdapConfigWidget::setTimeLimit( int timelimit ) +{ + if ( mTimeLimit ) mTimeLimit->setValue( timelimit ); +} + +int LdapConfigWidget::timeLimit() const +{ + return ( mTimeLimit ? mTimeLimit->value() : 0 ); +} + +int LdapConfigWidget::flags() const +{ + return mFlags; +} + +void LdapConfigWidget::setFlags( int flags ) +{ + mFlags = flags; + + // First delete all the child widgets. + // FIXME: I hope it's correct + const TQObjectList ch = childrenListObject(); + TQObjectList ch2 = ch; + TQObject *obj; + TQWidget *widget; + + obj = ch2.first(); + while ( obj != 0 ) { + widget = dynamic_cast (obj); + if ( widget && TQT_BASE_OBJECT(widget->parent()) == TQT_BASE_OBJECT(this) ) { + mainLayout->remove( widget ); + delete ( widget ); + } + obj = ch2.next(); + } + // Re-create child widgets according to the new flags + initWidget(); +} diff --git a/tdeabc/ldapconfigwidget.h b/tdeabc/ldapconfigwidget.h new file mode 100644 index 000000000..7071bce10 --- /dev/null +++ b/tdeabc/ldapconfigwidget.h @@ -0,0 +1,300 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LDAPCONFIGWIDGET_H +#define LDAPCONFIGWIDGET_H + +#include +#include +#include + +#include +#include +#include + +class TQGridLayout; +class TQSpinBox; +class TQPushButton; +class TQCheckBox; +class TQRadioButton; +class KComboBox; +class KLineEdit; +class KProgressDialog; + +namespace KABC { + + /** + @short LDAP Configuration widget + + This class can be used to query the user for LDAP connection parameters. + It's TDEConfigXT compatible, using widget names starting with kcfg_ + */ + + class KABC_EXPORT LdapConfigWidget : public TQWidget + { + Q_OBJECT + + TQ_PROPERTY( LCW_Flags flags READ flagsProp WRITE setFlagsProp ) + TQ_PROPERTY( TQString user READ user WRITE setUser ) + TQ_PROPERTY( TQString password READ password WRITE setPassword ) + TQ_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN ) + TQ_PROPERTY( TQString realm READ realm WRITE setRealm ) + TQ_PROPERTY( TQString host READ host WRITE setHost ) + TQ_PROPERTY( int port READ port WRITE setPort ) + TQ_PROPERTY( int ver READ ver WRITE setVer ) + TQ_PROPERTY( TQString dn READ dn WRITE setDn ) + TQ_PROPERTY( TQString filter READ filter WRITE setFilter ) + TQ_PROPERTY( TQString mech READ mech WRITE setMech ) + TQ_PROPERTY( bool secNO READ isSecNO WRITE setSecNO ) + TQ_PROPERTY( bool secSSL READ isSecSSL WRITE setSecSSL ) + TQ_PROPERTY( bool secTLS READ isSecSSL WRITE setSecTLS ) + TQ_PROPERTY( bool authAnon READ isAuthAnon WRITE setAuthAnon ) + TQ_PROPERTY( bool authSimple READ isAuthSimple WRITE setAuthSimple ) + TQ_PROPERTY( bool authSASL READ isAuthSASL WRITE setAuthSASL ) + TQ_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit ) + TQ_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit ) + TQ_SETS ( LCW_Flags ) + + public: + + enum LCW_Flags { + W_USER = 0x1, + W_PASS = 0x2, + W_BINDDN = 0x4, + W_REALM = 0x8, + W_HOST = 0x10, + W_PORT = 0x20, + W_VER = 0x40, + W_DN = 0x80, + W_FILTER = 0x100, + W_SECBOX = 0x400, + W_AUTHBOX = 0x800, + W_TIMELIMIT = 0x1000, + W_SIZELIMIT = 0x2000, + W_ALL = 0xFFFFFFF + }; + + /** Constructs an empty configuration widget. + * You need to call setFlags() after this. + */ + LdapConfigWidget( TQWidget* parent = 0, + const char* name = 0, WFlags fl = 0 ); + /** Constructs a configuration widget */ + LdapConfigWidget( int flags, TQWidget* parent = 0, + const char* name = 0, WFlags fl = 0 ); + /** Destructs a configuration widget */ + virtual ~LdapConfigWidget(); + + /** Sets the user name. Kconfig widget name: kcfg_ldapuser */ + void setUser( const TQString &user ); + /** Gets the user name. Kconfig widget name: kcfg_ldapuser */ + TQString user() const; + + /** Sets the password. Kconfig widget name: kcfg_ldappassword */ + void setPassword( const TQString &password ); + /** Gets the password. Kconfig widget name: kcfg_ldappassword */ + TQString password() const; + + /** + * Sets the bind dn. Useful for SASL proxy auth. + * Kconfig widget name: kcfg_ldapbinddn + */ + void setBindDN( const TQString &binddn ); + /** Gets the bind dn. Kconfig widget name: kcfg_ldapbinddn*/ + TQString bindDN() const; + + /** Sets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ + void setRealm( const TQString &realm ); + /** Gets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ + TQString realm() const; + + /** Sets the host name. Kconfig widget name: kcfg_ldaphost */ + void setHost( const TQString &host ); + /** Gets the host name. Kconfig widget name: kcfg_ldaphost */ + TQString host() const; + + /** Sets the LDAP port. Kconfig widget name: kcfg_ldapport */ + void setPort( int port ); + /** Gets the LDAP port. Kconfig widget name: kcfg_ldapport */ + int port() const; + + /** Sets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ + void setVer( int ver ); + /** Gets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ + int ver() const; + + /** Sets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ + void setDn( const TQString &dn ); + /** Gets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ + TQString dn() const; + + /** Sets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ + void setFilter( const TQString &filter ); + /** Gets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ + TQString filter() const; + + /** Sets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ + void setMech( const TQString &mech ); + /** Gets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ + TQString mech() const; + + /** + * Sets the configuration to no transport security. + * Kconfig widget name: kcfg_ldapnosec + */ + void setSecNO( bool b = true ); + /** + * Returns true if no transport security selected. + * Kconfig widget name: kcfg_ldapnosec + */ + bool isSecNO() const; + + /** + * Sets the configuration to TLS. + * Kconfig widget name: kcfg_ldaptls + */ + void setSecTLS( bool b = true ); + /** + * Returns true if TLS selected. + * Kconfig widget name: kcfg_ldaptls + */ + bool isSecTLS() const; + + /** + * Sets the configuration to SSL. + * Kconfig widget name: kcfg_ldapssl + */ + void setSecSSL( bool b = true ); + /** + * Returns true if SSL selected. + * Kconfig widget name: kcfg_ldapssl + */ + bool isSecSSL() const; + + /** + * Sets the authentication to anonymous. + * Kconfig widget name: kcfg_ldapanon + */ + void setAuthAnon( bool b = true ); + /** + * Returns true if Anonymous authentication selected. + * Kconfig widget name: kcfg_ldapanon + */ + bool isAuthAnon() const; + + /** + * Sets the authentication to simple. + * Kconfig widget name: kcfg_ldapsimple + */ + void setAuthSimple( bool b = true ); + /** + * Returns true if Simple authentication selected. + * Kconfig widget name: kcfg_ldapsimple + */ + bool isAuthSimple() const; + + /** + * Sets the authentication to SASL. + * Kconfig widget name: kcfg_ldapsasl + */ + void setAuthSASL( bool b = true ); + /** + * Returns true if SASL authentication selected. + * Kconfig widget name: kcfg_ldapsasl + */ + bool isAuthSASL() const; + + /** + * Sets the size limit. + * TDEConfig widget name: kcfg_ldapsizelimit + */ + void setSizeLimit( int sizelimit ); + /** + * Returns the size limit. + * TDEConfig widget name: kcfg_ldapsizelimit + */ + int sizeLimit() const; + + /** + * Sets the time limit. + * TDEConfig widget name: kcfg_ldaptimelimit + */ + void setTimeLimit( int timelimit ); + /** + * Returns the time limit. + * TDEConfig widget name: kcfg_ldaptimelimit + */ + int timeLimit() const; + + int flags() const; + void setFlags( int flags ); + inline LCW_Flags flagsProp() const { return (LCW_Flags)flags(); } + inline void setFlagsProp( LCW_Flags flags ) { setFlags((int)flags); } + + /** + * Returns a LDAP Url constructed from the settings given. + * Extensions are filled for use in the LDAP ioslave + */ + KABC::LDAPUrl url() const; + + private slots: + void setLDAPPort(); + void setLDAPSPort(); + void setAnonymous( int state ); + void setSimple( int state ); + void setSASL( int state ); + void mQueryDNClicked(); + void mQueryMechClicked(); + void loadData( TDEIO::Job*, const TQByteArray& ); + void loadResult( TDEIO::Job* ); + private: + + int mFlags; + LDIF mLdif; + TQStringList mQResult; + TQString mAttr; + + KLineEdit *mUser; + KLineEdit *mPassword; + KLineEdit *mHost; + TQSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit; + KLineEdit *mDn, *mBindDN, *mRealm; + KLineEdit *mFilter; + TQRadioButton *mAnonymous,*mSimple,*mSASL; + TQCheckBox *mSubTree; + TQPushButton *mEditButton; + TQPushButton *mQueryMech; + TQRadioButton *mSecNO,*mSecTLS,*mSecSSL; + KComboBox *mMech; + + TQString mErrorMsg; + bool mCancelled; + KProgressDialog *mProg; + + TQGridLayout *mainLayout; + class LDAPConfigWidgetPrivate; + LDAPConfigWidgetPrivate *d; + + void sendQuery(); + void initWidget(); + }; +} + +#endif diff --git a/tdeabc/ldapurl.cpp b/tdeabc/ldapurl.cpp new file mode 100644 index 000000000..9032c16d3 --- /dev/null +++ b/tdeabc/ldapurl.cpp @@ -0,0 +1,201 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "ldapurl.h" + +using namespace KABC; + +LDAPUrl::LDAPUrl() +{ + m_scope = Base; +} + +LDAPUrl::LDAPUrl(const KURL &_url) + : KURL(_url), m_extensions() +{ + m_dn = path(); + if ( !TQDir::isRelativePath(m_dn) ) +#ifdef Q_WS_WIN + m_dn.remove(0,3); // e.g. "c:/" +#else + m_dn.remove(0,1); +#endif + parseQuery(); +} + +void LDAPUrl::setDn( const TQString &dn) +{ + m_dn = dn; + if ( !TQDir::isRelativePath(m_dn) ) +#ifdef Q_WS_WIN + m_dn.remove(0,3); // e.g. "c:/" +#else + m_dn.remove(0,1); +#endif + setPath(m_dn); +} + +bool LDAPUrl::hasExtension( const TQString &key ) const +{ + return m_extensions.contains( key ); +} + +LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const +{ + TQMap::const_iterator it; + + it = m_extensions.find( key ); + if ( it != m_extensions.constEnd() ) + return (*it); + else { + Extension ext; + ext.value = ""; + ext.critical = false; + return ext; + } +} + +TQString LDAPUrl::extension( const TQString &key, bool &critical ) const +{ + Extension ext; + + ext = extension( key ); + critical = ext.critical; + return ext.value; +} + +void LDAPUrl::setExtension( const TQString &key, const LDAPUrl::Extension &ext ) +{ + m_extensions[ key ] = ext; + updateQuery(); +} + +void LDAPUrl::setExtension( const TQString &key, const TQString &value, bool critical ) +{ + Extension ext; + ext.value = value; + ext.critical = critical; + setExtension( key, ext ); +} + +void LDAPUrl::removeExtension( const TQString &key ) +{ + m_extensions.remove( key ); + updateQuery(); +} + +void LDAPUrl::updateQuery() +{ + Extension ext; + TQMap::iterator it; + TQString q = "?"; + + // set the attributes to query + if ( m_attributes.count() > 0 ) q += m_attributes.join(","); + + // set the scope + q += "?"; + switch( m_scope ) { + case Sub: + q += "sub"; + break; + case One: + q += "one"; + break; + case Base: + q += "base"; + break; + } + + // set the filter + q += "?"; + if ( m_filter != "(objectClass=*)" && !m_filter.isEmpty() ) + q += m_filter; + + // set the extensions + q += "?"; + for ( it = m_extensions.begin(); it != m_extensions.end(); ++it ) { + if ( it.data().critical ) q += "!"; + q += it.key(); + if ( !it.data().value.isEmpty() ) + q += "=" + it.data().value; + q += ","; + } + while ( q.endsWith("?") || q.endsWith(",") ) + q.remove( q.length() - 1, 1 ); + + setQuery(q); + kdDebug(5700) << "LDAP URL updateQuery(): " << prettyURL() << endl; +} + +void LDAPUrl::parseQuery() +{ + Extension ext; + TQStringList extensions; + TQString q = query(); + // remove first ? + if (q.startsWith("?")) + q.remove(0,1); + + // split into a list + TQStringList url_items = TQStringList::split("?", q, true); + + m_attributes.clear(); + m_scope = Base; + m_filter = "(objectClass=*)"; + m_extensions.clear(); + + int i = 0; + for ( TQStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) { + switch (i) { + case 0: + m_attributes = TQStringList::split(",", (*it), false); + break; + case 1: + if ( (*it) == "sub" ) m_scope = Sub; else + if ( (*it) == "one") m_scope = One; + break; + case 2: + m_filter = decode_string( *it ); + break; + case 3: + extensions = TQStringList::split(",", (*it), false); + break; + } + } + + TQString name,value; + for ( TQStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) { + ext.critical = false; + name = decode_string( (*it).section('=',0,0) ).lower(); + value = decode_string( (*it).section('=',1) ); + if ( name.startsWith("!") ) { + ext.critical = true; + name.remove(0, 1); + } + kdDebug(5700) << "LDAPUrl extensions name= " << name << " value: " << value << endl; + ext.value = value.replace( "%2", "," ); + setExtension( name, ext ); + } +} diff --git a/tdeabc/ldapurl.h b/tdeabc/ldapurl.h new file mode 100644 index 000000000..0c2693758 --- /dev/null +++ b/tdeabc/ldapurl.h @@ -0,0 +1,110 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _K_LDAPURL_H_ +#define _K_LDAPURL_H_ + +#include +#include +#include + +#include + +namespace KABC { + +/** + * LDAPUrl + + * LDAPUrl implements an RFC 2255 compliant LDAP Url parser, with minimal + * differences. LDAP Urls implemented by this class has the following format: + * ldap[s]://[user[:password]@]hostname[:port]["/" [dn ["?" [attributes] + * ["?" [scope] ["?" [filter] ["?" extensions]]]]]] + */ + + + class KABC_EXPORT LDAPUrl : public KURL + { + public: + + struct Extension { + TQString value; + bool critical; + }; + + typedef enum Scope { Base, One, Sub }; + + /** Constructs an empty KLDAPUrl. */ + LDAPUrl(); + /** Constructs a KLDAPUrl from a KURL. */ + LDAPUrl( const KURL &url ); + + /** + * Returns the dn part of the LDAP Url (same as path(), but slash removed + * from the beginning). + */ + const TQString& dn() const { return m_dn; } + /** Sets the the dn part of the LDAP Url. */ + void setDn( const TQString &dn ); + + /** Returns the attributes part of the LDAP Url */ + const TQStringList &attributes() { return m_attributes; } + /** Sets the attributes part of the LDAP Url */ + void setAttributes( const TQStringList &attributes ) + { m_attributes=attributes; updateQuery(); } + + /** Returns the scope part of the LDAP Url */ + Scope scope() const { return m_scope; } + /** Sets the scope part of the LDAP Url */ + void setScope(Scope scope) { m_scope = scope; updateQuery(); } + + /** Returns the filter part of the LDAP Url */ + const TQString &filter() const { return m_filter; } + /** Sets the filter part of the LDAP Url */ + void setFilter( TQString filter ) { m_filter = filter; updateQuery(); } + + /** Returns if the specified extension exists in the LDAP Url */ + bool hasExtension( const TQString &key ) const; + /** Returns the specified extension */ + Extension extension( const TQString &key ) const; + /** Returns the specified extension */ + TQString extension( const TQString &key, bool &critical ) const; + /** Sets the specified extension key with the value and criticality in ext */ + void setExtension( const TQString &key, const Extension &ext ); + /** Sets the specified extension key with the value and criticality specified */ + void setExtension( const TQString &key, const TQString &value, bool critical = false ); + /** Removes the specified extension */ + void removeExtension( const TQString &key ); + /** Updates the query component from the attributes, scope, filter and extensions */ + void updateQuery(); + + protected: + void parseQuery(); + + private: + + TQMap m_extensions; + TQString m_dn; + TQStringList m_attributes; + Scope m_scope; + TQString m_filter; + }; +} + +#endif diff --git a/tdeabc/ldif.cpp b/tdeabc/ldif.cpp new file mode 100644 index 000000000..408f5223f --- /dev/null +++ b/tdeabc/ldif.cpp @@ -0,0 +1,365 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "ldif.h" + +using namespace KABC; + +LDIF::LDIF() +{ + startParsing(); +} + +LDIF::~LDIF() +{ +} + +TQCString LDIF::assembleLine( const TQString &fieldname, const TQByteArray &value, + uint linelen, bool url ) +{ + bool safe = false; + bool isDn; + TQCString result; + uint i; + + if ( url ) { + result = fieldname.utf8() + ":< " + TQCString( value.data(), value.size()+1 ); + } else { + isDn = fieldname.lower() == "dn"; + //SAFE-INIT-CHAR + if ( value.size() > 0 && value[0] > 0 && value[0] != '\n' && + value[0] != '\r' && value[0] != ':' && value[0] != '<' ) safe = true; + + //SAFE-CHAR + if ( safe ) { + for ( i=1; i < value.size(); i++ ) { + //allow utf-8 in Distinguished Names + if ( ( isDn && value[i] == 0 ) || + ( !isDn && value[i] <= 0 ) || + value[i] == '\r' || value[i] == '\n' ) { + safe = false; + break; + } + } + } + + if ( value.size() == 0 ) safe = true; + + if( safe ) { + result = fieldname.utf8() + ": " + TQCString( value.data(), value.size()+1 ); + } else { + result = fieldname.utf8() + ":: " + KCodecs::base64Encode( value, false ); + } + + if ( linelen > 0 ) { + i = (fieldname.length()+2) > linelen ? fieldname.length()+2 : linelen; + while ( i < result.length() ) { + result.insert( i, "\n " ); + i += linelen+2; + } + } + } + return result; +} + +TQCString LDIF::assembleLine( const TQString &fieldname, const TQCString &value, + uint linelen, bool url ) +{ + TQCString ret; + TQByteArray tmp; + uint valuelen = value.length(); + const char *data = value.data(); + + tmp.setRawData( data, valuelen ); + ret = assembleLine( fieldname, tmp, linelen, url ); + tmp.resetRawData( data, valuelen ); + return ret; + +} + +TQCString LDIF::assembleLine( const TQString &fieldname, const TQString &value, + uint linelen, bool url ) +{ + return assembleLine( fieldname, value.utf8(), linelen, url ); +} + +bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ) +{ + int position; + TQByteArray tmp; + int linelen; + const char *data; + +// kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl; + + position = line.find( ":" ); + if ( position == -1 ) { + // strange: we did not find a fieldname + fieldname = ""; + TQCString str; + str = line.stripWhiteSpace(); + linelen = str.length(); + data = str.data(); + tmp.setRawData( data, linelen ); + value = tmp.copy(); + tmp.resetRawData( data, linelen ); +// kdDebug(5700) << "value : " << value[0] << endl; + return false; + } + + linelen = line.length(); + + if ( linelen > ( position + 1 ) && line[ position + 1 ] == ':' ) { + // String is BASE64 encoded -> decode it now. + fieldname = TQString::fromUtf8( + line.left( position ).stripWhiteSpace() ); + if ( linelen <= ( position + 3 ) ) { + value.resize( 0 ); + return false; + } + data = &line.data()[ position + 3 ]; + tmp.setRawData( data, linelen - position - 3 ); + KCodecs::base64Decode( tmp, value ); + tmp.resetRawData( data, linelen - position - 3 ); + return false; + } + + if ( linelen > ( position + 1 ) && line[ position + 1 ] == '<' ) { + // String is an URL. + fieldname = TQString::fromUtf8( + line.left( position ).stripWhiteSpace() ); + if ( linelen <= ( position + 3 ) ) { + value.resize( 0 ); + return false; + } + data = &line.data()[ position + 3]; + tmp.setRawData( data, linelen - position - 3 ); + value = tmp.copy(); + tmp.resetRawData( data, linelen - position - 3 ); + return true; + } + + fieldname = TQString::fromUtf8(line.left( position ).stripWhiteSpace()); + if ( linelen <= ( position + 2 ) ) { + value.resize( 0 ); + return false; + } + data = &line.data()[ position + 2 ]; + tmp.setRawData( data, linelen - position - 2 ); + value = tmp.copy(); + tmp.resetRawData( data, linelen - position - 2 ); + return false; +} + +bool LDIF::splitControl( const TQCString &line, TQString &oid, bool &critical, + TQByteArray &value ) +{ + TQString tmp; + critical = false; + bool url = splitLine( line, tmp, value ); + + kdDebug(5700) << "splitControl: value: " << TQString(TQString::fromUtf8(value, value.size())) << endl; + if ( tmp.isEmpty() ) { + tmp = TQString::fromUtf8( value, value.size() ); + value.resize( 0 ); + } + if ( tmp.right( 4 ) == "true" ) { + critical = true; + tmp.truncate( tmp.length() - 5 ); + } else if ( tmp.right( 5 ) == "false" ) { + critical = false; + tmp.truncate( tmp.length() - 6 ); + } + oid = tmp; + return url; +} + +LDIF::ParseVal LDIF::processLine() +{ + + if ( mIsComment ) return None; + + ParseVal retval = None; + if ( mLastParseVal == EndEntry ) mEntryType = Entry_None; + + mUrl = splitLine( line, mAttr, mVal ); + + TQString attrLower = mAttr.lower(); + + switch ( mEntryType ) { + case Entry_None: + if ( attrLower == "version" ) { + if ( !mDn.isEmpty() ) retval = Err; + } else if ( attrLower == "dn" ) { + kdDebug(5700) << "ldapentry dn: " << TQString(TQString::fromUtf8( mVal, mVal.size() )) << endl; + mDn = TQString::fromUtf8( mVal, mVal.size() ); + mModType = Mod_None; + retval = NewEntry; + } else if ( attrLower == "changetype" ) { + if ( mDn.isEmpty() ) + retval = Err; + else { + TQString tmpval = TQString::fromUtf8( mVal, mVal.size() ); + kdDebug(5700) << "changetype: " << tmpval << endl; + if ( tmpval == "add" ) mEntryType = Entry_Add; + else if ( tmpval == "delete" ) mEntryType = Entry_Del; + else if ( tmpval == "modrdn" || tmpval == "moddn" ) { + mNewRdn = ""; + mNewSuperior = ""; + mDelOldRdn = true; + mEntryType = Entry_Modrdn; + } + else if ( tmpval == "modify" ) mEntryType = Entry_Mod; + else retval = Err; + } + } else if ( attrLower == "control" ) { + mUrl = splitControl( TQCString( mVal, mVal.size() + 1 ), mOid, mCritical, mVal ); + retval = Control; + } else if ( !mAttr.isEmpty() && mVal.size() > 0 ) { + mEntryType = Entry_Add; + retval = Item; + } + break; + case Entry_Add: + if ( mAttr.isEmpty() && mVal.size() == 0 ) + retval = EndEntry; + else + retval = Item; + break; + case Entry_Del: + if ( mAttr.isEmpty() && mVal.size() == 0 ) + retval = EndEntry; + else + retval = Err; + break; + case Entry_Mod: + if ( mModType == Mod_None ) { + kdDebug(5700) << "tdeio_ldap: new modtype " << mAttr << endl; + if ( mAttr.isEmpty() && mVal.size() == 0 ) { + retval = EndEntry; + } else if ( attrLower == "add" ) { + mModType = Mod_Add; + } else if ( attrLower == "replace" ) { + mModType = Mod_Replace; + mAttr = TQString::fromUtf8( mVal, mVal.size() ); + mVal.resize( 0 ); + retval = Item; + } else if ( attrLower == "delete" ) { + mModType = Mod_Del; + mAttr = TQString::fromUtf8( mVal, mVal.size() ); + mVal.resize( 0 ); + retval = Item; + } else { + retval = Err; + } + } else { + if ( mAttr.isEmpty() ) { + if ( TQString::fromUtf8( mVal, mVal.size() ) == "-" ) { + mModType = Mod_None; + } else if ( mVal.size() == 0 ) { + retval = EndEntry; + } else + retval = Err; + } else + retval = Item; + } + break; + case Entry_Modrdn: + if ( mAttr.isEmpty() && mVal.size() == 0 ) + retval = EndEntry; + else if ( attrLower == "newrdn" ) + mNewRdn = TQString::fromUtf8( mVal, mVal.size() ); + else if ( attrLower == "newsuperior" ) + mNewSuperior = TQString::fromUtf8( mVal, mVal.size() ); + else if ( attrLower == "deleteoldrdn" ) { + if ( mVal.size() > 0 && mVal[0] == '0' ) + mDelOldRdn = false; + else if ( mVal.size() > 0 && mVal[0] == '1' ) + mDelOldRdn = true; + else + retval = Err; + } else + retval = Err; + break; + } + return retval; +} + +LDIF::ParseVal LDIF::nextItem() +{ + ParseVal retval = None; + char c=0; + + while( retval == None ) { + if ( mPos < mLdif.size() ) { + c = mLdif[mPos]; + mPos++; + if ( mIsNewLine && c == '\r' ) continue; //handle \n\r line end + if ( mIsNewLine && ( c == ' ' || c == '\t' ) ) { //line folding + mIsNewLine = false; + continue; + } + if ( mIsNewLine ) { + mIsNewLine = false; + retval = processLine(); + mLastParseVal = retval; + line.resize( 0 ); + mIsComment = ( c == '#' ); + } + if ( c == '\n' || c == '\r' ) { + mLineNo++; + mIsNewLine = true; + continue; + } + } else { + retval = MoreData; + break; + } + + if ( !mIsComment ) line += c; + } + return retval; +} + +void LDIF::endLDIF() +{ + TQByteArray tmp( 3 ); + tmp[ 0 ] = '\n'; + tmp[ 1 ] = '\n'; + tmp[ 2 ] = '\n'; + mLdif = tmp; + mPos = 0; +} + +void LDIF::startParsing() +{ + mPos = mLineNo = 0; + mDelOldRdn = false; + mEntryType = Entry_None; + mModType = Mod_None; + mDn = mNewRdn = mNewSuperior = ""; + line = ""; + mIsNewLine = false; + mIsComment = false; + mLastParseVal = None; +} diff --git a/tdeabc/ldif.h b/tdeabc/ldif.h new file mode 100644 index 000000000..f4da5f4f3 --- /dev/null +++ b/tdeabc/ldif.h @@ -0,0 +1,182 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi Gyorgy + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _K_LDIF_H_ +#define _K_LDIF_H_ + +#include +#include +#include + +#include + +namespace KABC { + + /** + * LDIF + + * LDIF implements an RFC 2849 compliant LDIF parser. LDIF files are used to + * represent directory information on LDAP-based servers, or to describe a set + * of changes which are to be applied to a directory. + */ + + class KABC_EXPORT LDIF + { + public: + + enum ParseVal{ None, NewEntry, EndEntry, Item, Control, Err, MoreData }; + enum EntryType{ Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn }; + enum ModType{ Mod_None, Mod_Add, Mod_Replace, Mod_Del }; + LDIF(); + virtual ~LDIF(); + + /** + * Assembles fieldname and value into a valid LDIF line, BASE64 encodes the + * value if neccessary and optionally splits into more lines. + * @param fieldname The name of the entry. + * @param value The value of the entry. + * @param linelen Maximum length of the lines in the result. + * @param url If true, encode value as url ( use :< ). + */ + static TQCString assembleLine( const TQString &fieldname, + const TQByteArray &value, uint linelen=0, bool url=false ); + /** + * This is the same as the above function, the only difference that + * this accepts TQCString as the value. + */ + static TQCString assembleLine( const TQString &fieldname, + const TQCString &value, uint linelen=0, bool url=false ); + /** + * This is the same as the above function, the only difference that + * this accepts TQString as the value. + */ + static TQCString assembleLine( const TQString &fieldname, + const TQString &value, uint linelen=0, bool url=false ); + + /** + * Splits one line from an LDIF file to attribute and value components. + * @returns true if value is an URL, false otherwise + */ + static bool splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ); + /** + * Splits a control specification (without the "control:" directive) + * @param line is the control directive + * @param oid will contain the OID + * @param critical will contain the criticality of control + * @param value is the control value + */ + static bool splitControl( const TQCString &line, TQString &oid, bool &critical, + TQByteArray &value ); + /** + * Starts the parsing of a new LDIF + */ + void startParsing(); + /** + * Process one LDIF line + */ + ParseVal processLine(); + /** + * Process the LDIF until a complete item can be returned + * @returns NewEntry if a new DN encountered, + * Item if a new item returned, + * Err if the LDIF contains error, + * EndEntry if the parser reached the end of the current entry + * and MoreData if the parser encountered the end of the current chunk of + * the LDIF. If you want to finish the parsing after receiving + * MoreData, then call endLDIF(), so the parser can safely flush + * the current entry. + */ + ParseVal nextItem(); + /** + * Sets a chunk of LDIF. Call before startParsing(), or if nextItem() returned + * MoreData. + */ + void setLDIF( const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; } + /** + * Indicates the end of the LDIF file/stream. Call if nextItem() returned + * MoreData, but actually you don't have more data. + */ + void endLDIF(); + /** + * Returns the requested LDAP operation extracted from the current entry. + */ + EntryType entryType() const { return mEntryType; } + /** + * Returns the LDAP modify request type if entryType() returned Entry_Mod. + */ + int modType() const { return mModType; } + /** + * Returns the Distinguished Name of the current entry. + */ + const TQString& dn() const { return mDn; } + /** + * Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn. + */ + const TQString& newRdn() const { return mNewRdn; } + /** + * Returns the new parent of the entry if modType() returned Entry_Modrdn. + */ + const TQString& newSuperior() const { return mNewSuperior; } + /** + * Returns if the delete of the old RDN is required. + */ + bool delOldRdn() const { return mDelOldRdn; } + /** + * Returns the attribute name. + */ + const TQString& attr() const { return mAttr; } + /** + * Returns the attribute value. + */ + const TQByteArray& val() const { return mVal; } + /** + * Returns if val() is an url + */ + bool isUrl() const { return mUrl; } + /** + * Returns the criticality level when modType() returned Control. + */ + bool critical() const { return mCritical; } + /** + * Returns the OID when modType() returned Control. + */ + const TQString& oid() const { return mOid; } + /** + * Returns the line number which the parser processes. + */ + uint lineNo() const { return mLineNo; } + private: + int mModType; + bool mDelOldRdn, mUrl; + TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid; + TQByteArray mLdif, mVal; + EntryType mEntryType; + + bool mIsNewLine, mIsComment,mCritical; + ParseVal mLastParseVal; + uint mPos,mLineNo; + TQCString line; + + class LDIFPrivate; + LDIFPrivate *d; + }; +} + +#endif diff --git a/tdeabc/ldifconverter.cpp b/tdeabc/ldifconverter.cpp new file mode 100644 index 000000000..dcab83a40 --- /dev/null +++ b/tdeabc/ldifconverter.cpp @@ -0,0 +1,573 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Helge Deller + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +/* + Useful links: + - http://tldp.org/HOWTO/LDAP-Implementation-HOWTO/schemas.html + - http://www.faqs.org/rfcs/rfc2849.html + + Not yet handled items: + - objectclass microsoftaddressbook + - info, + - initials, + - otherfacsimiletelephonenumber, + - otherpager, + - physicaldeliveryofficename, +*/ + +#include +#include +#include +#include + +#include +#include +#include + +#include "addressee.h" +#include "address.h" + +#include "ldif.h" +#include "ldifconverter.h" +#include "vcardconverter.h" + +using namespace KABC; + +/* generate LDIF stream */ + +bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, TQString &str ) +{ + AddresseeList::ConstIterator it; + for ( it = addrList.begin(); it != addrList.end(); ++it ) { + addresseeToLDIF( *it, str ); + } + return true; +} + + + +static void ldif_out( TQTextStream &t, TQString formatStr, TQString value ) +{ + if ( value.isEmpty() ) + return; + + TQCString txt = LDIF::assembleLine( formatStr, value, 72 ); + + // write the string + t << TQString::fromUtf8(txt) << "\n"; +} + +bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str ) +{ + if ( addr.isEmpty() ) + return false; + + TQTextStream t( str, IO_WriteOnly|IO_Append ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + + const Address homeAddr = addr.address( Address::Home ); + const Address workAddr = addr.address( Address::Work ); + + ldif_out( t, "dn", TQString( "cn=%1,mail=%2" ) + .arg( TQString(addr.formattedName()).simplifyWhiteSpace() ) + .arg( addr.preferredEmail() ) ); + ldif_out( t, "givenname", addr.givenName() ); + ldif_out( t, "sn", addr.familyName() ); + ldif_out( t, "cn", TQString(addr.formattedName()).simplifyWhiteSpace() ); + ldif_out( t, "uid", addr.uid() ); + ldif_out( t, "nickname", addr.nickName() ); + ldif_out( t, "xmozillanickname", addr.nickName() ); + + ldif_out( t, "mail", addr.preferredEmail() ); + if ( addr.emails().count() > 1 ) + ldif_out( t, "mozillasecondemail", addr.emails()[ 1 ] ); +//ldif_out( t, "mozilla_AIMScreenName: %1\n", "screen_name" ); + + ldif_out( t, "telephonenumber", addr.phoneNumber( PhoneNumber::Work ).number() ); + ldif_out( t, "facsimiletelephonenumber", addr.phoneNumber( PhoneNumber::Fax ).number() ); + ldif_out( t, "homephone", addr.phoneNumber( PhoneNumber::Home ).number() ); + ldif_out( t, "mobile", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 7 + ldif_out( t, "cellphone", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 4.x + ldif_out( t, "pager", addr.phoneNumber( PhoneNumber::Pager ).number() ); + ldif_out( t, "pagerphone", addr.phoneNumber( PhoneNumber::Pager ).number() ); + + ldif_out( t, "streethomeaddress", homeAddr.street() ); + ldif_out( t, "postalcode", workAddr.postalCode() ); + ldif_out( t, "postofficebox", workAddr.postOfficeBox() ); + + TQStringList streets = TQStringList::split( '\n', homeAddr.street() ); + if ( streets.count() > 0 ) + ldif_out( t, "homepostaladdress", streets[ 0 ] ); // Netscape 7 + if ( streets.count() > 1 ) + ldif_out( t, "mozillahomepostaladdress2", streets[ 1 ] ); // Netscape 7 + ldif_out( t, "mozillahomelocalityname", homeAddr.locality() ); // Netscape 7 + ldif_out( t, "mozillahomestate", homeAddr.region() ); + ldif_out( t, "mozillahomepostalcode", homeAddr.postalCode() ); + ldif_out( t, "mozillahomecountryname", Address::ISOtoCountry(homeAddr.country()) ); + ldif_out( t, "locality", workAddr.locality() ); + ldif_out( t, "streetaddress", workAddr.street() ); // Netscape 4.x + + streets = TQStringList::split( '\n', workAddr.street() ); + if ( streets.count() > 0 ) + ldif_out( t, "postaladdress", streets[ 0 ] ); + if ( streets.count() > 1 ) + ldif_out( t, "mozillapostaladdress2", streets[ 1 ] ); + ldif_out( t, "countryname", Address::ISOtoCountry(workAddr.country()) ); + ldif_out( t, "l", workAddr.locality() ); + ldif_out( t, "c", Address::ISOtoCountry(workAddr.country()) ); + ldif_out( t, "st", workAddr.region() ); + + ldif_out( t, "title", addr.title() ); + ldif_out( t, "vocation", addr.prefix() ); + ldif_out( t, "ou", addr.role() ); + ldif_out( t, "o", addr.organization() ); + ldif_out( t, "organization", addr.organization() ); + ldif_out( t, "organizationname", addr.organization() ); + + // Compatibility with older kabc versions. + if ( !addr.department().isEmpty() ) + ldif_out( t, "department", addr.department() ); + else + ldif_out( t, "department", addr.custom("KADDRESSBOOK", "X-Department") ); + + ldif_out( t, "workurl", addr.url().prettyURL() ); + ldif_out( t, "homeurl", addr.url().prettyURL() ); + ldif_out( t, "description", addr.note() ); + if (addr.revision().isValid()) + ldif_out(t, "modifytimestamp", dateToVCardString( TQT_TQDATETIME_OBJECT(addr.revision())) ); + + t << "objectclass: top\n"; + t << "objectclass: person\n"; + t << "objectclass: organizationalPerson\n"; + + t << "\n"; + + return true; +} + + +/* convert from LDIF stream */ + +bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt ) +{ + if (str.isEmpty()) + return true; + + bool endldif = false, end = false; + LDIF ldif; + LDIF::ParseVal ret; + const char *latinstr = str.latin1(); + int latinstrlen = tqstrlen( latinstr ); + TQByteArray data; + Addressee a; + Address homeAddr, workAddr; + + data.setRawData( latinstr, latinstrlen ); + ldif.setLDIF( data ); + if (!dt.isValid()) + dt = TQDateTime::currentDateTime(); + a.setRevision(dt); + homeAddr = Address( Address::Home ); + workAddr = Address( Address::Work ); + + do { + ret = ldif.nextItem(); + switch ( ret ) { + case LDIF::Item: { + TQString fieldname = ldif.attr().lower(); + TQString value = TQString::fromUtf8( ldif.val(), ldif.val().size() ); + evaluatePair( a, homeAddr, workAddr, fieldname, value ); + break; + } + case LDIF::EndEntry: + // if the new address is not empty, append it + if ( !a.formattedName().isEmpty() || !a.name().isEmpty() || + !a.familyName().isEmpty() ) { + if ( !homeAddr.isEmpty() ) + a.insertAddress( homeAddr ); + if ( !workAddr.isEmpty() ) + a.insertAddress( workAddr ); + addrList.append( a ); + } + a = Addressee(); + a.setRevision(dt); + homeAddr = Address( Address::Home ); + workAddr = Address( Address::Work ); + break; + case LDIF::MoreData: { + if ( endldif ) + end = true; + else { + ldif.endLDIF(); + endldif = true; + break; + } + } + default: + break; + } + } while ( !end ); + + data.resetRawData( latinstr, latinstrlen ); + + return true; +} + +bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, + Address &workAddr, + TQString &fieldname, TQString &value ) +{ + if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! + return false; + + if ( fieldname.startsWith("#") ) { + return true; + } + + if ( fieldname.isEmpty() && !a.note().isEmpty() ) { + // some LDIF export filters are borken and add additional + // comments on stand-alone lines. Just add them to the notes for now. + a.setNote( a.note() + "\n" + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "givenname" ) ) { + a.setGivenName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "xmozillanickname") || + fieldname == TQString::fromLatin1( "nickname") ) { + a.setNickName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "sn" ) ) { + a.setFamilyName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "uid" ) ) { + a.setUid( value ); + return true; + } + if ( fieldname == TQString::fromLatin1( "mail" ) || + fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla + if ( a.emails().findIndex( value ) == -1 ) + a.insertEmail( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "title" ) ) { + a.setTitle( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "vocation" ) ) { + a.setPrefix( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "cn" ) ) { + a.setFormattedName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "o" ) || + fieldname == TQString::fromLatin1( "organization" ) || // Exchange + fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange + a.setOrganization( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "description" ) ) { +addComment: + if ( !a.note().isEmpty() ) + a.setNote( a.note() + "\n" ); + a.setNote( a.note() + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "custom1" ) || + fieldname == TQString::fromLatin1( "custom2" ) || + fieldname == TQString::fromLatin1( "custom3" ) || + fieldname == TQString::fromLatin1( "custom4" ) ) { + goto addComment; + } + + if ( fieldname == TQString::fromLatin1( "homeurl" ) || + fieldname == TQString::fromLatin1( "workurl" ) ) { + if (a.url().isEmpty()) { + a.setUrl( KURL( value ) ); + return true; + } + if ( a.url().prettyURL() == KURL(value).prettyURL() ) + return true; + // TODO: current version of kabc only supports one URL. + // TODO: change this with KDE 4 + } + + if ( fieldname == TQString::fromLatin1( "homephone" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla + fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "street" ) || + fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { + homeAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla + workAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla + workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { + workAddr.setPostalCode( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { + workAddr.setPostOfficeBox( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 + homeAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla + homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla + homeAddr.setLocality( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla + homeAddr.setRegion( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla + homeAddr.setPostalCode( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla + if ( value.length() <= 2 ) + value = Address::ISOtoCountry(value); + homeAddr.setCountry( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "locality" ) ) { + workAddr.setLocality( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x + workAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "countryname" ) || + fieldname == TQString::fromLatin1( "c" ) ) { // mozilla + if ( value.length() <= 2 ) + value = Address::ISOtoCountry(value); + workAddr.setCountry( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla + workAddr.setLocality( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "st" ) ) { + workAddr.setRegion( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "ou" ) ) { + a.setRole( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "department" ) ) { + a.setDepartment( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "member" ) ) { + // this is a mozilla list member (cn=xxx, mail=yyy) + TQStringList list( TQStringList::split( ',', value ) ); + TQString name, email; + + TQStringList::Iterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( (*it).startsWith( "cn=" ) ) + name = (*it).mid( 3 ).stripWhiteSpace(); + if ( (*it).startsWith( "mail=" ) ) + email = (*it).mid( 5 ).stripWhiteSpace(); + } + if ( !name.isEmpty() && !email.isEmpty() ) + email = " <" + email + ">"; + a.insertEmail( name + email ); + a.insertCategory( i18n( "List of Emails" ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { + if (value == TQString::fromLatin1("0Z")) // ignore + return true; + TQDateTime dt = VCardStringToDate( value ); + if ( dt.isValid() ) { + a.setRevision(dt); + return true; + } + } + + if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore + return true; + + kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") + .arg(a.formattedName()).arg(fieldname).arg(value)); + + return true; +} + +/* The following functions are obsoleted. Similar functionality can be found + * in the LDIF class */ + +bool LDIFConverter::parseSingleLine( Addressee &a, Address &homeAddr, + Address &workAddr, TQString &line ) +{ + if ( line.isEmpty() ) + return true; + + TQString fieldname, value; + TQByteArray val; + + LDIF::splitLine( line.latin1(), fieldname, val ); + value = TQString::fromUtf8( val.data(), val.size() ); + return evaluatePair( a, homeAddr, workAddr, fieldname, value); +} + + +bool LDIFConverter::splitLine( TQString &line, TQString &fieldname, TQString &value) +{ + TQByteArray val; + bool ret = LDIF::splitLine( line.latin1(), fieldname, val ); + value = TQString::fromUtf8( val.data(), val.size() ); + return ret; +} + + +TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, bool allowEncode ) +{ + if ( value.isEmpty() ) + return TQString(); + + // append format if not given + if (formatStr.find(':') == -1) + formatStr.append(": %1\n"); + + // check if base64-encoding is needed + bool printable = true; + unsigned int i, len; + len = value.length(); + for (i = 0; i=0) + formatStr.insert(p, ':'); + } + + // generate the new string and split it to 72 chars/line + TQCString txt = TQString(formatStr.arg(value)).utf8(); + + if (allowEncode) { + len = txt.length(); + if (len && txt[len-1] == '\n') + --len; + i = 72; + while (i < len) { + txt.insert(i, "\n "); + i += 72+1; + len += 2; + } + } + + return TQString::fromUtf8(txt); +} + diff --git a/tdeabc/ldifconverter.h b/tdeabc/ldifconverter.h new file mode 100644 index 000000000..a8052a65f --- /dev/null +++ b/tdeabc/ldifconverter.h @@ -0,0 +1,100 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Helge Deller + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 only as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_LDIFCONVERTER_H +#define KABC_LDIFCONVERTER_H + +#include +#include + +#include "addressee.h" +#include "addresseelist.h" + +namespace KABC { + + /** + * A set of functions to convert a string with LDIF information to addressees + * and vice versa. It is useful for addressbook import- and exportfilters + * and might be used to read and write Mozilla and Netscape addresssbooks. + */ + + namespace LDIFConverter { + + /** + * Converts a LDIF string to a list of addressees. + * + * @param str The vcard string. + * @param addrList The addresseelist. + * @param dt The date & time value of the last modification (e.g. file modification time). + * @since 3.2 + */ + KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); + + /** + * Converts a list of addressees to a LDIF string. + * + * @param addrList The addresseelist. + * @param str The LDIF string. + * @since 3.2 + */ + KABC_EXPORT bool addresseeToLDIF( const AddresseeList &addrList, TQString &str ); + + /** + * Converts an addressee to a LDIF string. + * + * @param addr The addressee. + * @param str The LDIF string. + * @since 3.2 + */ + KABC_EXPORT bool addresseeToLDIF( const Addressee &addr, TQString &str ); + + /** + * @deprecated + * Obsoleted - please use LDIF::assembleLine() + * Returns a LDIF compatible string representing a given field/value pair. + * If necessary, the value parameter will be base64encoded and split into multiple. + * This function will return an empty string if the given value is empty. + * + * @param field The LDAP field name or a complete LDIF field string (e.g. "cn" or "cn = %1\n"). + * @param value The value for this field. + * @param allowEncode Set to false if you wish no encoding of the value. + * @since 3.2 + */ + KABC_EXPORT TQString makeLDIFfieldString( TQString field, TQString value, bool allowEncode = true ) KDE_DEPRECATED; + + + + /* internal functions - do not use !! */ + + /** No need for this function anymore - use LDIF::splitLine() + evaluatePair() */ + KABC_EXPORT bool parseSingleLine( Addressee &a, + Address &homeAddr, Address &workAddr, TQString &line ); + + /** No need for this function anymore - use LDIF::splitLine() */ + KABC_EXPORT bool splitLine( TQString &line, TQString &fieldname, TQString &value); + + + KABC_EXPORT bool evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, + TQString &fieldname, TQString &value ); + + } + +} +#endif + diff --git a/tdeabc/lock.cpp b/tdeabc/lock.cpp new file mode 100644 index 000000000..a78cb4c5b --- /dev/null +++ b/tdeabc/lock.cpp @@ -0,0 +1,162 @@ +/* + This file is part of libkabc. + Copyright (c) 2001,2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "lock.h" + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +using namespace KABC; + +Lock::Lock( const TQString &identifier ) + : mIdentifier( identifier ) +{ + mIdentifier.replace( "/", "_" ); +} + +Lock::~Lock() +{ + unlock(); +} + +TQString Lock::locksDir() +{ + return locateLocal( "data", "tdeabc/lock/" ); +} + +bool Lock::readLockFile( const TQString &filename, int &pid, TQString &app ) +{ + TQFile file( filename ); + if ( !file.open( IO_ReadOnly ) ) return false; + + TQTextStream t( &file ); + pid = t.readLine().toInt(); + app = t.readLine(); + + return true; +} + +bool Lock::writeLockFile( const TQString &filename ) +{ + TQFile file( filename ); + if ( !file.open( IO_WriteOnly ) ) return false; + TQTextStream t( &file ); + t << ::getpid() << endl << TQString( TDEGlobal::instance()->instanceName() ); + + return true; +} + +TQString Lock::lockFileName() const +{ + return locksDir() + mIdentifier + ".lock"; +} + +bool Lock::lock() +{ + kdDebug(5700) << "Lock::lock()" << endl; + + TQString lockName = lockFileName(); + kdDebug(5700) << "-- lock name: " << lockName << endl; + + if ( TQFile::exists( lockName ) ) { // check if it is a stale lock file + int pid; + TQString app; + + if ( !readLockFile( lockFileName(), pid, app ) ) { + mError = i18n("Unable to open lock file."); + return false; + } + + int retval = ::kill( pid, 0 ); + if ( retval == -1 && errno == ESRCH ) { // process doesn't exists anymore + TQFile::remove( lockName ); + kdWarning(5700) << "Removed stale lock file from process '" << app << "'" + << endl; + } else { + TQString identifier( mIdentifier ); + identifier.replace( '_', '/' ); + + mError = i18n("The address book '%1' is locked by application '%2'.\nIf you believe this is incorrect, just remove the lock file from '%3'") + .arg( identifier ).arg( app ).arg( locateLocal( "data", "tdeabc/lock/*.lock" ) ); + return false; + } + } + + TQString lockUniqueName; + lockUniqueName = mIdentifier + kapp->randomString( 8 ); + mLockUniqueName = locateLocal( "data", "tdeabc/lock/" + lockUniqueName ); + kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; + + // Create unique file + writeLockFile( mLockUniqueName ); + + // Create lock file + int result = ::link( TQFile::encodeName( mLockUniqueName ), + TQFile::encodeName( lockName ) ); + + if ( result == 0 ) { + mError = ""; + emit locked(); + return true; + } + + // TODO: check stat + + mError = i18n("Error"); + return false; +} + +bool Lock::unlock() +{ + int pid; + TQString app; + if ( readLockFile( lockFileName(), pid, app ) ) { + if ( pid == getpid() ) { + TQFile::remove( lockFileName() ); + TQFile::remove( mLockUniqueName ); + emit unlocked(); + } else { + mError = i18n("Unlock failed. Lock file is owned by other process: %1 (%2)") + .arg( app ).arg( TQString::number( pid ) ); + kdDebug() << "Lock::unlock(): " << mError << endl; + return false; + } + } + + mError = ""; + return true; +} + +TQString Lock::error() const +{ + return mError; +} + +#include "lock.moc" diff --git a/tdeabc/lock.h b/tdeabc/lock.h new file mode 100644 index 000000000..addc2032f --- /dev/null +++ b/tdeabc/lock.h @@ -0,0 +1,88 @@ +/* + This file is part of libkabc. + + Copyright (c) 2001,2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_LOCK_H +#define KABC_LOCK_H + +#include +#include + +#include + +namespace KABC { + +/** + This class provides locking functionality for a file, directory or an + arbitrary string-represented resource. +*/ +class KABC_EXPORT Lock : public TQObject +{ + Q_OBJECT + public: + /** + Constructor. + + @param identifier An identifier for the resource to be locked, e.g. a file + name. + */ + Lock( const TQString &identifier ); + + /** + Destruct lock object. This also removes the lock on the resource. + */ + ~Lock(); + + /** + Lock resource. + */ + virtual bool lock(); + + /** + Unlock resource. + */ + virtual bool unlock(); + + virtual TQString error() const; + + TQString lockFileName() const; + + static bool readLockFile( const TQString &filename, int &pid, TQString &app ); + static bool writeLockFile( const TQString &filename ); + + static TQString locksDir(); + + signals: + void locked(); + void unlocked(); + + private: + TQString mIdentifier; + + TQString mLockUniqueName; + + TQString mError; + + class Private; + Private *d; +}; + +} + +#endif diff --git a/tdeabc/locknull.cpp b/tdeabc/locknull.cpp new file mode 100644 index 000000000..5f3ee06c7 --- /dev/null +++ b/tdeabc/locknull.cpp @@ -0,0 +1,63 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "locknull.h" + +#include +#include + +using namespace KABC; + +LockNull::LockNull( bool allowAccess ) + : Lock( TQString::null ), mAllowAccess( allowAccess ) +{ +} + +LockNull::~LockNull() +{ + unlock(); +} + +bool LockNull::lock() +{ + if ( !mAllowAccess ) return false; + + kdWarning() << "LockNull::lock() force success. Doesn't actually lock." + << endl; + + emit locked(); + + return true; +} + +bool LockNull::unlock() +{ + emit unlocked(); + return true; +} + +TQString LockNull::error() const +{ + if ( mAllowAccess ) + return i18n("LockNull: All locks succeed but no actual locking is done."); + else + return i18n("LockNull: All locks fail."); +} diff --git a/tdeabc/locknull.h b/tdeabc/locknull.h new file mode 100644 index 000000000..dfefe122a --- /dev/null +++ b/tdeabc/locknull.h @@ -0,0 +1,54 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_LOCKNULL_H +#define KABC_LOCKNULL_H + +#include + +#include "lock.h" + +namespace KABC { + +/** + This class provides a lock without actually locking. It can be constructed in + two ways: One that let all locks succeed and one that let all locks fail. +*/ +class KABC_EXPORT LockNull : public Lock +{ + public: + LockNull( bool allowAccess ); + ~LockNull(); + + bool lock(); + bool unlock(); + + TQString error() const; + + private: + bool mAllowAccess; + + class Private; + Private *d; +}; + +} + +#endif diff --git a/tdeabc/phonenumber.cpp b/tdeabc/phonenumber.cpp new file mode 100644 index 000000000..fd2468c73 --- /dev/null +++ b/tdeabc/phonenumber.cpp @@ -0,0 +1,213 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "phonenumber.h" + +using namespace KABC; + +PhoneNumber::PhoneNumber() : + mType( Home ) +{ + init(); +} + +PhoneNumber::PhoneNumber( const TQString &number, int type ) : + mType( type ) +{ + init(); + + validateNumber( number ); +} + +PhoneNumber::~PhoneNumber() +{ +} + +void PhoneNumber::init() +{ + mId = TDEApplication::randomString( 8 ); +} + +void PhoneNumber::validateNumber( const TQString &number ) +{ + mNumber = number; + + // remove line breaks + mNumber = mNumber.replace( '\n', "" ); + mNumber = mNumber.replace( '\r', "" ); +} + +bool PhoneNumber::operator==( const PhoneNumber &p ) const +{ + if ( mNumber != p.mNumber ) return false; + if ( mType != p.mType ) return false; + + return true; +} + +bool PhoneNumber::operator!=( const PhoneNumber &p ) const +{ + return !( p == *this ); +} + +void PhoneNumber::setId( const TQString &id ) +{ + mId = id; +} + +TQString PhoneNumber::id() const +{ + return mId; +} + +void PhoneNumber::setNumber( const TQString &number ) +{ + validateNumber( number ); +} + +TQString PhoneNumber::number() const +{ + return mNumber; +} + +void PhoneNumber::setType( int type ) +{ + mType = type; +} + +int PhoneNumber::type() const +{ + return mType; +} + +TQString PhoneNumber::typeLabel() const +{ + TQString label; + bool first = true; + + const TypeList list = typeList(); + + TypeList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { + label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); + if ( first ) + first = false; + } + } + + return label; +} + +TQString PhoneNumber::label() const +{ + return typeLabel( type() ); +} + +PhoneNumber::TypeList PhoneNumber::typeList() +{ + static TypeList list; + + if ( list.isEmpty() ) { + list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video + << Bbs << Modem << Car << Isdn << Pcs << Pager; + } + + return list; +} + +TQString PhoneNumber::label( int type ) +{ + return typeLabel( type ); +} + +TQString PhoneNumber::typeLabel( int type ) +{ + if ( type & Pref ) + return i18n( "Preferred phone", "Preferred" ); + + switch ( type ) { + case Home: + return i18n("Home phone", "Home"); + break; + case Work: + return i18n("Work phone", "Work"); + break; + case Msg: + return i18n("Messenger"); + break; + case Pref: + return i18n("Preferred Number"); + break; + case Voice: + return i18n("Voice"); + break; + case Fax: + return i18n("Fax"); + break; + case Cell: + return i18n("Mobile Phone", "Mobile" ); + break; + case Video: + return i18n("Video"); + break; + case Bbs: + return i18n("Mailbox"); + break; + case Modem: + return i18n("Modem"); + break; + case Car: + return i18n("Car Phone", "Car" ); + break; + case Isdn: + return i18n("ISDN"); + break; + case Pcs: + return i18n("PCS"); + break; + case Pager: + return i18n("Pager"); + break; + case Home | Fax: + return i18n("Home Fax"); + break; + case Work | Fax: + return i18n("Work Fax"); + break; + default: + return i18n("Other"); + } +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const PhoneNumber &phone ) +{ + return s << phone.mId << phone.mType << phone.mNumber; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, PhoneNumber &phone ) +{ + s >> phone.mId >> phone.mType >> phone.mNumber; + + return s; +} diff --git a/tdeabc/phonenumber.h b/tdeabc/phonenumber.h new file mode 100644 index 000000000..3e6ae0941 --- /dev/null +++ b/tdeabc/phonenumber.h @@ -0,0 +1,161 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_PHONENUMBER_H +#define KABC_PHONENUMBER_H + +#include +#include + +#include + +namespace KABC { + +/** + @short Phonenumber information. + + This class provides phone number information. A phone number is classified by + a type. The following types are available, it's possible to use multiple types + Types for a number by combining them through a logical or. +*/ +class KABC_EXPORT PhoneNumber +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); + + public: + typedef TQValueList List; + typedef TQValueList TypeList; + + /** + @li @p Home - Home number + @li @p Work - Office number + @li @p Msg - Messaging + @li @p Pref - Preferred number + @li @p Voice - Voice + @li @p Fax - Fax machine + @li @p Cell - Cell phone + @li @p Video - Video phone + @li @p Bbs - Mailbox + @li @p Modem - Modem + @li @p Car - Car phone + @li @p Isdn - ISDN connection + @li @p Pcs - Personal Communication Service + @li @p Pager - Pager + */ + enum Types { Home = 1, Work = 2, Msg = 4, Pref = 8, Voice = 16, Fax = 32, + Cell = 64, Video = 128, Bbs = 256, Modem = 512, Car = 1024, + Isdn = 2048, Pcs = 4096, Pager = 8192 }; + + /** + Create an empty phone number object. + */ + PhoneNumber(); + + /** + Create a phonenumber object. + + @param number Number + @param type Type as defined in enum. Multiple types can be + specified by combining them by a logical or. + */ + PhoneNumber( const TQString &number, int type = Home ); + + /** + Destructor. + */ + ~PhoneNumber(); + + bool operator==( const PhoneNumber & ) const; + bool operator!=( const PhoneNumber & ) const; + + /** + Sets the unique identifier. + */ + void setId( const TQString &id ); + + /** + Returns the unique identifier. + */ + TQString id() const; + + /** + Sets the number. + */ + void setNumber( const TQString & ); + + /** + Returns the number. + */ + TQString number() const; + + /** + Sets the type. Multiple types can be specified by combining them by + a logical or. + */ + void setType( int ); + + /** + Returns the type. Can be a multiple types combined by a logical or. + */ + int type() const; + + /** + Returns a translated string of all types the address has. + */ + TQString typeLabel() const; + + /** + Returns the translated label for phone number depending on its type. + */ + TQString label() const; + + /** + Returns a list of all available types + */ + static TypeList typeList(); + + /** + Returns the translated label for phone number type. + */ + static TQString typeLabel( int type ); + + /** + Returns the translated label for phone number type. + @obsolete + */ + static TQString label( int type ); + + private: + void init(); + void validateNumber( const TQString& ); + + TQString mId; + + int mType; + TQString mNumber; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); + +} + +#endif diff --git a/tdeabc/picture.cpp b/tdeabc/picture.cpp new file mode 100644 index 000000000..4ddd3f537 --- /dev/null +++ b/tdeabc/picture.cpp @@ -0,0 +1,120 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "picture.h" + +using namespace KABC; + +Picture::Picture() + : mIntern( false ) +{ +} + +Picture::Picture( const TQString &url ) + : mUrl( url ), mIntern( false ) +{ +} + +Picture::Picture( const TQImage &data ) + : mData( data ), mIntern( true ) +{ +} + +Picture::~Picture() +{ +} + +bool Picture::operator==( const Picture &p ) const +{ + if ( mIntern != p.mIntern ) return false; + + if ( mIntern ) { + if ( mData != p.mData ) + return false; + } else { + if ( mUrl != p.mUrl ) + return false; + } + + return true; +} + +bool Picture::operator!=( const Picture &p ) const +{ + return !( p == *this ); +} + +void Picture::setUrl( const TQString &url ) +{ + mUrl = url; + mIntern = false; +} + +void Picture::setData( const TQImage &data ) +{ + mData = data; + mIntern = true; +} + +void Picture::setType( const TQString &type ) +{ + mType = type; +} + +bool Picture::isIntern() const +{ + return mIntern; +} + +TQString Picture::url() const +{ + return mUrl; +} + +TQImage Picture::data() const +{ + return mData; +} + +TQString Picture::type() const +{ + return mType; +} + +TQString Picture::asString() const +{ + if ( mIntern ) + return "intern picture"; + else + return mUrl; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Picture &picture ) +{ + return s << picture.mIntern << picture.mUrl << picture.mType; +// return s << picture.mIntern << picture.mUrl << picture.mType << picture.mData; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Picture &picture ) +{ + s >> picture.mIntern >> picture.mUrl >> picture.mType; +// s >> picture.mIntern >> picture.mUrl >> picture.mType >> picture.mData; + return s; +} diff --git a/tdeabc/picture.h b/tdeabc/picture.h new file mode 100644 index 000000000..e6ed690c2 --- /dev/null +++ b/tdeabc/picture.h @@ -0,0 +1,128 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_PICTURE_H +#define KABC_PICTURE_H + +#include + +#include + +namespace KABC { + +class KABC_EXPORT Picture +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); + +public: + + /** + * Consturctor. Creates an empty object. + */ + Picture(); + + /** + * Consturctor. + * + * @param url A URL that describes the position of the picture file. + */ + Picture( const TQString &url ); + + /** + * Consturctor. + * + * @param data The raw data of the picture. + */ + Picture( const TQImage &data ); + + /** + * Destructor. + */ + ~Picture(); + + + bool operator==( const Picture & ) const; + bool operator!=( const Picture & ) const; + + /** + * Sets a URL for the location of the picture file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * + * @param url The location URL of the picture file. + */ + void setUrl( const TQString &url ); + + /** + * Sets the raw data of the picture. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param data The raw data of the picture. + */ + void setData( const TQImage &data ); + + /** + * Sets the type of the picture. + */ + void setType( const TQString &type ); + + /** + * Returns whether the picture is described by a URL (extern) or + * by the raw data (intern). + * When this method returns 'true' you can use data() to + * get the raw data. Otherwise you can request the URL of this + * picture by url() and load the raw data from that location. + */ + bool isIntern() const; + + /** + * Returns the location URL of this picture. + */ + TQString url() const; + + /** + * Returns the raw data of this picture. + */ + TQImage data() const; + + /** + * Returns the type of this picture. + */ + TQString type() const; + + /** + * Returns string representation of the picture. + */ + TQString asString() const; + +private: + TQString mUrl; + TQString mType; + TQImage mData; + + int mIntern; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); + +} +#endif diff --git a/tdeabc/plugin.cpp b/tdeabc/plugin.cpp new file mode 100644 index 000000000..a53192559 --- /dev/null +++ b/tdeabc/plugin.cpp @@ -0,0 +1,61 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "plugin.h" + +using namespace KABC; + +Plugin::Plugin() +{ +} + +Plugin::~Plugin() +{ +} + +void Plugin::setType( const TQString& type ) +{ + mType = type; +} + +TQString Plugin::type() const +{ + return mType; +} + +void Plugin::setNameLabel( const TQString& label ) +{ + mNameLabel = label; +} + +TQString Plugin::nameLabel() const +{ + return mNameLabel; +} + +void Plugin::setDescriptionLabel( const TQString& label ) +{ + mDescriptionLabel = label; +} + +TQString Plugin::descriptionLabel() const +{ + return mDescriptionLabel; +} diff --git a/tdeabc/plugin.h b/tdeabc/plugin.h new file mode 100644 index 000000000..0c8e3b338 --- /dev/null +++ b/tdeabc/plugin.h @@ -0,0 +1,52 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_PLUGIN_H +#define KABC_PLUGIN_H + +#include + +#include + +namespace KABC { + +class KABC_EXPORT Plugin +{ +public: + Plugin(); + virtual ~Plugin(); + + virtual void setType( const TQString& type ); + virtual TQString type() const; + + virtual void setNameLabel( const TQString& label ); + virtual TQString nameLabel() const; + + virtual void setDescriptionLabel( const TQString& label ); + virtual TQString descriptionLabel() const; + +private: + TQString mType; + TQString mNameLabel; + TQString mDescriptionLabel; +}; + +} +#endif diff --git a/tdeabc/plugins/CMakeLists.txt b/tdeabc/plugins/CMakeLists.txt new file mode 100644 index 000000000..597486816 --- /dev/null +++ b/tdeabc/plugins/CMakeLists.txt @@ -0,0 +1,15 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( file ) +add_subdirectory( dir ) +add_subdirectory( net ) +add_subdirectory( ldaptdeio ) diff --git a/tdeabc/plugins/Makefile.am b/tdeabc/plugins/Makefile.am new file mode 100644 index 000000000..bdedbec0f --- /dev/null +++ b/tdeabc/plugins/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = file dir net ldaptdeio diff --git a/tdeabc/plugins/dir/CMakeLists.txt b/tdeabc/plugins/dir/CMakeLists.txt new file mode 100644 index 000000000..fd4161342 --- /dev/null +++ b/tdeabc/plugins/dir/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourcedir.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES dir.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_dir (library) ######################## + +set( target kabc_dir ) + +set( ${target}_SRCS + resourcedir.cpp resourcedirconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_dir (module) ######################### + +set( target kabc_dir ) + +set( ${target}_SRCS + resourcedirplugin.cpp +) + +tde_add_kpart( ${target} + SOURCES ${${target}_SRCS} + LINK kabc_dir-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/dir/Makefile.am b/tdeabc/plugins/dir/Makefile.am new file mode 100644 index 000000000..94ddad3cc --- /dev/null +++ b/tdeabc/plugins/dir/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_builddir) $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcedirconfig.h + +lib_LTLIBRARIES = libkabc_dir.la +libkabc_dir_la_SOURCES = resourcedir.cpp resourcedirconfig.cpp +libkabc_dir_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_dir_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDECORE) $(LIB_TDEFILE) $(LIB_TDEUI) +libkabc_dir_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +kde_module_LTLIBRARIES = kabc_dir.la +kabc_dir_la_SOURCES = resourcedirplugin.cpp +kabc_dir_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined +kabc_dir_la_LIBADD = libkabc_dir.la $(LIB_QT) $(LIB_TDECORE) + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_dir.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourcedir.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = dir.desktop + +resourcedirplugin.lo: ../../addressee.h diff --git a/tdeabc/plugins/dir/dir.desktop b/tdeabc/plugins/dir/dir.desktop new file mode 100644 index 000000000..a841040f9 --- /dev/null +++ b/tdeabc/plugins/dir/dir.desktop @@ -0,0 +1,92 @@ +[Desktop Entry] +Name=Directory +Name[af]=Gids +Name[ar]=دليل +Name[az]=CÉ™rgÉ™ +Name[be]=ТÑчка +Name[bn]=ডিরেকà§à¦Ÿà¦°à¦¿ +Name[br]=Renkell +Name[bs]=Direktorij +Name[ca]=Directori +Name[cs]=Adresář +Name[csb]=Katalog +Name[cy]=Cyfeiriadur +Name[da]=Mappe +Name[de]=Verzeichnis +Name[el]=Κατάλογος +Name[eo]=Dosierujo +Name[es]=Directorio +Name[et]=Kataloog +Name[eu]=Direktorioa +Name[fa]=Ùهرست راهنما +Name[fi]=Hakemisto +Name[fo]=Fíluskrá +Name[fr]=Dossier +Name[fy]=Map +Name[ga]=Comhadlann +Name[gl]=Directório +Name[he]=ספריה +Name[hi]=डिरेकà¥à¤Ÿà¥à¤°à¥€ +Name[hr]=Mapa +Name[hsb]=Zapisk +Name[hu]=Könyvtár +Name[id]=Direktori +Name[is]=Mappa +Name[it]=Cartella +Name[ja]=ディレクトリ +Name[ka]=დáƒáƒ¡áƒ¢áƒ +Name[kk]=Каталог +Name[km]=ážáž +Name[ko]=ìžë£Œë°© +Name[ku]=Peldank +Name[lb]=Verzeechnis +Name[lt]=Aplankas +Name[lv]=Direktorija +Name[mk]=Именик +Name[mn]=Лавлах +Name[ms]=Direktori +Name[mt]=Direttorju +Name[nb]=Katalog +Name[nds]=Orner +Name[ne]=डाइरेकà¥à¤Ÿà¤°à¥€ +Name[nl]=Map +Name[nn]=Katalog +Name[nso]=Tshupetso +Name[oc]=Directori +Name[pa]=ਡਾਇਰੈਕਟਰੀ +Name[pl]=Katalog +Name[pt]=Directoria +Name[pt_BR]=Diretório +Name[ro]=Director +Name[ru]=Каталог +Name[rw]=ububiko +Name[se]=Ohcu +Name[sk]=PrieÄinok +Name[sl]=Imenik +Name[sq]=Fioka +Name[sr]=ФаÑцикла +Name[sr@Latn]=Fascikla +Name[ss]=I-directory +Name[sv]=Katalog +Name[ta]=அடைவ௠+Name[te]=డైరకà±à°Ÿà°°à°¿ +Name[tg]=ФеҳраÑÑ‚ +Name[th]=ไดเรà¸à¸—อรี +Name[tr]=Dizin +Name[tt]=Törgäk +Name[uk]=Каталог +Name[uz]=Jild +Name[uz@cyrillic]=Жилд +Name[ven]=Tsumbavhulwo +Name[vi]=Thư mục +Name[wa]=Ridant +Name[xh]=Ulawulo +Name[zh_CN]=目录 +Name[zh_HK]=目錄 +Name[zh_TW]=目錄 +Name[zu]=Uhlu lwamafayela +X-TDE-Library=kabc_dir +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=dir diff --git a/tdeabc/plugins/dir/resourcedir.cpp b/tdeabc/plugins/dir/resourcedir.cpp new file mode 100644 index 000000000..53f178a6d --- /dev/null +++ b/tdeabc/plugins/dir/resourcedir.cpp @@ -0,0 +1,310 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "formatfactory.h" +#include "resourcedirconfig.h" +#include "stdaddressbook.h" +#include "lock.h" + +#include "resourcedir.h" + +using namespace KABC; + +extern "C" +{ + void *init_kabc_dir() + { + return new KRES::PluginFactory(); + } +} + + +ResourceDir::ResourceDir( const TDEConfig *config ) + : Resource( config ), mAsynchronous( false ) +{ + if ( config ) { + init( config->readPathEntry( "FilePath", StdAddressBook::directoryName() ), + config->readEntry( "FileFormat", "vcard" ) ); + } else { + init( StdAddressBook::directoryName(), "vcard" ); + } +} + +ResourceDir::ResourceDir( const TQString &path, const TQString &format ) + : Resource( 0 ), mAsynchronous( false ) +{ + init( path, format ); +} + +void ResourceDir::init( const TQString &path, const TQString &format ) +{ + mFormatName = format; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); + + if ( !mFormat ) { + mFormatName = "vcard"; + mFormat = factory->format( mFormatName ); + } + + mLock = 0; + + connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) ); + + setPath( path ); +} + +ResourceDir::~ResourceDir() +{ + delete mFormat; + mFormat = 0; +} + +void ResourceDir::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + if ( mPath == StdAddressBook::directoryName() ) + config->deleteEntry( "FilePath" ); + else + config->writePathEntry( "FilePath", mPath ); + + config->writeEntry( "FileFormat", mFormatName ); +} + +Ticket *ResourceDir::requestSaveTicket() +{ + kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl; + + if ( !addressBook() ) return 0; + + delete mLock; + mLock = new Lock( mPath ); + + if ( mLock->lock() ) { + addressBook()->emitAddressBookLocked(); + } else { + addressBook()->error( mLock->error() ); + kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock path '" + << mPath << "': " << mLock->error() << endl; + return 0; + } + + return createTicket( this ); +} + +void ResourceDir::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; + + delete mLock; + mLock = 0; +} + +bool ResourceDir::doOpen() +{ + TQDir dir( mPath ); + if ( !dir.exists() ) { // no directory available + return dir.mkdir( dir.path() ); + } else { + TQString testName = dir.entryList( TQDir::Files )[0]; + if ( testName.isNull() || testName.isEmpty() ) // no file in directory + return true; + + TQFile file( mPath + "/" + testName ); + if ( file.open( IO_ReadOnly ) ) + return true; + + if ( file.size() == 0 ) + return true; + + bool ok = mFormat->checkFormat( &file ); + file.close(); + return ok; + } +} + +void ResourceDir::doClose() +{ +} + +bool ResourceDir::load() +{ + kdDebug(5700) << "ResourceDir::load(): '" << mPath << "'" << endl; + + mAsynchronous = false; + + TQDir dir( mPath ); + TQStringList files = dir.entryList( TQDir::Files ); + + TQStringList::Iterator it; + bool ok = true; + for ( it = files.begin(); it != files.end(); ++it ) { + TQFile file( mPath + "/" + (*it) ); + + if ( !file.open( IO_ReadOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); + ok = false; + continue; + } + + if ( !mFormat->loadAll( addressBook(), this, &file ) ) + ok = false; + + file.close(); + } + + return ok; +} + +bool ResourceDir::asyncLoad() +{ + mAsynchronous = true; + + bool ok = load(); + if ( !ok ) + emit loadingError( this, i18n( "Loading resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit loadingFinished( this ); + + return ok; +} + +bool ResourceDir::save( Ticket * ) +{ + kdDebug(5700) << "ResourceDir::save(): '" << mPath << "'" << endl; + + Addressee::Map::Iterator it; + bool ok = true; + + mDirWatch.stopScan(); + + for ( it = mAddrMap.begin(); it != mAddrMap.end(); ++it ) { + if ( !it.data().changed() ) + continue; + + TQFile file( mPath + "/" + (*it).uid() ); + if ( !file.open( IO_WriteOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); + continue; + } + + mFormat->save( *it, &file ); + + // mark as unchanged + (*it).setChanged( false ); + + file.close(); + } + + mDirWatch.startScan(); + + return ok; +} + +bool ResourceDir::asyncSave( Ticket *ticket ) +{ + bool ok = save( ticket ); + if ( !ok ) + emit savingError( this, i18n( "Saving resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit savingFinished( this ); + + return ok; +} + +void ResourceDir::setPath( const TQString &path ) +{ + mDirWatch.stopScan(); + if ( mDirWatch.contains( mPath ) ) + mDirWatch.removeDir( mPath ); + + mPath = path; + mDirWatch.addDir( mPath, true ); + mDirWatch.startScan(); +} + +TQString ResourceDir::path() const +{ + return mPath; +} + +void ResourceDir::setFormat( const TQString &format ) +{ + mFormatName = format; + + if ( mFormat ) + delete mFormat; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +} + +TQString ResourceDir::format() const +{ + return mFormatName; +} + +void ResourceDir::pathChanged() +{ + if ( !addressBook() ) + return; + + clear(); + if ( mAsynchronous ) + asyncLoad(); + else { + load(); + addressBook()->emitAddressBookChanged(); + } +} + +void ResourceDir::removeAddressee( const Addressee& addr ) +{ + TQFile::remove( mPath + "/" + addr.uid() ); + mAddrMap.erase( addr.uid() ); +} + +#include "resourcedir.moc" diff --git a/tdeabc/plugins/dir/resourcedir.h b/tdeabc/plugins/dir/resourcedir.h new file mode 100644 index 000000000..dc3bdbd23 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedir.h @@ -0,0 +1,113 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCEDIR_H +#define KABC_RESOURCEDIR_H + +#include +#include + +#include + +#include + +class TQTimer; + +namespace KABC { + +class FormatPlugin; +class Lock; + +/** + @internal +*/ +class KABC_EXPORT ResourceDir : public Resource +{ + Q_OBJECT + + public: + ResourceDir( const TDEConfig* ); + ResourceDir( const TQString &path, const TQString &type = "vcard" ); + ~ResourceDir(); + + virtual void writeConfig( TDEConfig* ); + + virtual bool doOpen(); + virtual void doClose(); + + virtual Ticket *requestSaveTicket(); + virtual void releaseSaveTicket( Ticket* ); + + virtual bool load(); + virtual bool asyncLoad(); + virtual bool save( Ticket* ticket ); + virtual bool asyncSave( Ticket* ticket ); + + /** + Set path to be used for saving. + */ + void setPath( const TQString & ); + + /** + Return path used for loading and saving the address book. + */ + TQString path() const; + + /** + Set the format by name. + */ + void setFormat( const TQString &format ); + + /** + Returns the format name. + */ + TQString format() const; + + /** + Remove a addressee from its source. + This method is mainly called by KABC::AddressBook. + */ + virtual void removeAddressee( const Addressee& addr ); + + protected slots: + void pathChanged(); + + protected: + void init( const TQString &path, const TQString &format ); + + private: + FormatPlugin *mFormat; + + KDirWatch mDirWatch; + + TQString mPath; + TQString mFormatName; + + Lock *mLock; + + bool mAsynchronous; + + class ResourceDirPrivate; + ResourceDirPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/dir/resourcedirconfig.cpp b/tdeabc/plugins/dir/resourcedirconfig.cpp new file mode 100644 index 000000000..2807872f8 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedirconfig.cpp @@ -0,0 +1,107 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include + +#include "formatfactory.h" +#include "resourcedir.h" +#include "stdaddressbook.h" + +#include "resourcedirconfig.h" + +using namespace KABC; + +ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name ) + : KRES::ConfigWidget( parent, name ) +{ + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, + KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); + mFormatBox = new KComboBox( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mFormatBox, 0, 1 ); + + label = new TQLabel( i18n( "Location:" ), this ); + mFileNameEdit = new KURLRequester( this ); + mFileNameEdit->setMode( KFile::Directory ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mFileNameEdit, 1, 1 ); + + FormatFactory *factory = FormatFactory::self(); + TQStringList formats = factory->formats(); + TQStringList::Iterator it; + for ( it = formats.begin(); it != formats.end(); ++it ) { + FormatInfo *info = factory->info( *it ); + if ( info ) { + mFormatTypes << (*it); + mFormatBox->insertItem( info->nameLabel ); + } + } + + mInEditMode = false; +} + +void ResourceDirConfig::setEditMode( bool value ) +{ + mFormatBox->setEnabled( !value ); + mInEditMode = value; +} + +void ResourceDirConfig::loadSettings( KRES::Resource *res ) +{ + ResourceDir *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; + return; + } + + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + + mFileNameEdit->setURL( resource->path() ); + if ( mFileNameEdit->url().isEmpty() ) + mFileNameEdit->setURL( KABC::StdAddressBook::directoryName() ); +} + +void ResourceDirConfig::saveSettings( KRES::Resource *res ) +{ + ResourceDir *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; + return; + } + + if ( mInEditMode ) + resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); + + resource->setPath( mFileNameEdit->url() ); +} + +#include "resourcedirconfig.moc" diff --git a/tdeabc/plugins/dir/resourcedirconfig.h b/tdeabc/plugins/dir/resourcedirconfig.h new file mode 100644 index 000000000..9df1778d3 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedirconfig.h @@ -0,0 +1,54 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCEDIRCONFIG_H +#define RESOURCEDIRCONFIG_H + +#include +#include + +#include + +namespace KABC { + +class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget +{ + Q_OBJECT + +public: + ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 ); + + void setEditMode( bool value ); + +public slots: + void loadSettings( KRES::Resource* ); + void saveSettings( KRES::Resource* ); + +private: + KComboBox* mFormatBox; + KURLRequester* mFileNameEdit; + + TQStringList mFormatTypes; + + bool mInEditMode; +}; + +} +#endif diff --git a/tdeabc/plugins/dir/resourcedirplugin.cpp b/tdeabc/plugins/dir/resourcedirplugin.cpp new file mode 100644 index 000000000..a2bd6d138 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedirplugin.cpp @@ -0,0 +1,32 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcedir.h" +#include "resourcedirconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_dir() + { + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/evolution/Makefile.am b/tdeabc/plugins/evolution/Makefile.am new file mode 100644 index 000000000..2c22cf376 --- /dev/null +++ b/tdeabc/plugins/evolution/Makefile.am @@ -0,0 +1,19 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourceevo.h dbwrapper.h + +kde_module_LTLIBRARIES = kabc_evo.la + +kabc_evo_la_SOURCES = dbwrapper.cpp resourceevo.cpp + +kabc_evo_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kabc_evo_la_LIBADD = ../../../tdeabc/libkabc.la ../../../tdeui/libtdeui.la -ldb ../../../tdeabc/vcardparser/libvcards.la + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_evolution.pot + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = evolution.desktop diff --git a/tdeabc/plugins/evolution/README b/tdeabc/plugins/evolution/README new file mode 100644 index 000000000..7dfefce00 --- /dev/null +++ b/tdeabc/plugins/evolution/README @@ -0,0 +1,15 @@ +A Resource using DB3 to access the evolution +addressbook make sure the wombat is not running +In future versions I may use bonobo to access it... + + +DESIGN: +The Format vs Resource idea is somehow not applyable to the +Evolution PAS + +Format would be vCard and Resource would be DB3.. +BUT +Format get's a QFile* pointer which is just not usable +with a DB3 +INSTEAD we will use the vCardImpl directly to convert +a string to Addressee \ No newline at end of file diff --git a/tdeabc/plugins/evolution/dbwrapper.cpp b/tdeabc/plugins/evolution/dbwrapper.cpp new file mode 100644 index 000000000..fbdff165a --- /dev/null +++ b/tdeabc/plugins/evolution/dbwrapper.cpp @@ -0,0 +1,187 @@ +#include + +#include + +#include "dbwrapper.h" + + +using namespace Evolution; + +struct DBIterator::Data { + DBWrapper *wrapper; + TQString key; + TQString data; + DBC* cursor; + bool atEnd; +}; + +DBIterator::DBIterator( DBWrapper* wra) { + data = new Data; + data->wrapper = wra; + data->atEnd = false; + data->cursor = 0l; +} +DBIterator::DBIterator( const DBIterator& copy ) { + data = new Data; + data->wrapper = copy.data->wrapper; + data->key = copy.data->key; + data->data = copy.data->data; + data->atEnd = copy.data->atEnd; + if (copy.data->cursor ) + copy.data->cursor->c_dup(copy.data->cursor, &data->cursor, 0 ); + else + data->cursor = 0l; +} +DBIterator::~DBIterator() { + if (data->cursor) + data->cursor->c_close(data->cursor); + delete data; +} +DBIterator& DBIterator::operator=( const DBIterator& rhs ) { + if ( *this == rhs ) + return *this; + if (data->cursor) + data->cursor->c_close(data->cursor); + delete data; + data = new Data; + data->wrapper = rhs.data->wrapper; + data->key = rhs.data->key; + data->data = rhs.data->data; + data->atEnd = rhs.data->atEnd; + if ( rhs.data->cursor ) + rhs.data->cursor->c_dup(rhs.data->cursor, &data->cursor, 0 ); + else + data->cursor = 0l; + + return *this; +} +TQString DBIterator::key()const{ + return data->key; +} +TQString DBIterator::value()const { + return data->data; +} +TQString DBIterator::operator*() { + return data->data; +} +DBIterator& DBIterator::operator++() { + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + if ( data->cursor ) + if ( data->cursor->c_get(data->cursor, &key, &val,DB_NEXT ) != 0 ) + data->atEnd = true; + data->key = TQString::fromUtf8( (char*)key.data, key.size ); + data->data = TQString::fromUtf8( (char*)val.data, val.size ); + return *this; +} +DBIterator& DBIterator::operator--() { + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + if ( data->cursor ) + if ( data->cursor->c_get(data->cursor, &key, &val,DB_PREV ) != 0 ) + data->atEnd = true; + data->key = TQString::fromUtf8( (char*)key.data, key.size ); + data->data = TQString::fromUtf8( (char*)val.data, val.size ); + return *this; +} +bool DBIterator::operator==( const DBIterator& rhs ) { + if ( data->atEnd && data->atEnd == rhs.data->atEnd ) return true; + + return false; +} +bool DBIterator::operator!=( const DBIterator& rhs ) { + return !this->operator==(rhs ); +} +struct DBWrapper::Data { + DB* db; + bool only; +}; +DBWrapper::DBWrapper() { + data = new Data; + (void)db_create(&data->db, NULL, 0 ); + data->only = false; +} +DBWrapper::~DBWrapper() { + data->db->close(data->db, 0 ); + delete data; +} +bool DBWrapper::open( const TQString& file, bool on) { + data->only = on; + return !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 ); +} +bool DBWrapper::save() { + return true; +} +DBIterator DBWrapper::begin() { + DBIterator it(this); + DBC* cursor; + DBT key, val; + int ret; + ret = data->db->cursor(data->db, NULL, &cursor, 0 ); + if (ret ) { + it.data->atEnd = true; + return it; + } + + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + ret = cursor->c_get(cursor, &key, &val, DB_FIRST ); + if (ret ) { + it.data->atEnd = true; + return it; + } + + it.data->cursor = cursor; + it.data->key = TQString::fromUtf8((char*)key.data, key.size ); + it.data->data = TQString::fromUtf8((char*)val.data, val.size ); + + return it; +} +DBIterator DBWrapper::end() { + DBIterator it(this); + it.data->atEnd = true; + + return it; +} +bool DBWrapper::find( const TQString& _key, TQString& _val ) { + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + + TQCString db_key = _key.local8Bit(); + key.data = db_key.data(); + key.size = db_key.size(); + + int ret = data->db->get(data->db, NULL, &key, &val, 0 ); + if (!ret) { + _val = TQString::fromUtf8( (char*)val.data, val.size ); + tqWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data ); + return true; + } + return false; +} +bool DBWrapper::add( const TQString& _key, const TQString& _val ) { + TQCString db_key = _key.local8Bit(); + TQCString db_val = _val.local8Bit(); + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + + key.data = db_key.data(); + key.size = db_key.size(); + val.data = db_val.data(); + val.size = db_val.size(); + + return !data->db->put(data->db, NULL, &key, &val, 0 ); +} +bool DBWrapper::remove( const TQString& _key ) { + TQCString db_key = _key.local8Bit(); + DBT key; + memset(&key, 0, sizeof(key) ); + key.data = db_key.data(); + key.size = db_key.size(); + + return !data->db->del(data->db, NULL, &key, 0 ); +} diff --git a/tdeabc/plugins/evolution/dbwrapper.h b/tdeabc/plugins/evolution/dbwrapper.h new file mode 100644 index 000000000..e5e0a2c33 --- /dev/null +++ b/tdeabc/plugins/evolution/dbwrapper.h @@ -0,0 +1,60 @@ +#ifndef KABC_EVOLUTION_DB_WRAPPER +#define KABC_EVOLUTION_DB_WRAPPER + +#include + +#include +#include + +namespace Evolution { + + class DBWrapper; + class DBIterator { + friend class DBWrapper; + public: + DBIterator( DBWrapper* = 0l ); + ~DBIterator(); + + DBIterator( const DBIterator& ); + DBIterator &operator=( const DBIterator& ); + + TQString key()const; + TQString value()const; + + TQString operator*(); + + DBIterator &operator++(); + DBIterator &operator--(); + + bool operator==( const DBIterator& ); + bool operator!=( const DBIterator& ); + private: + struct Data; + Data* data; + }; + class DBWrapper { + public: + DBWrapper(); + ~DBWrapper(); + + TQString lastError()const; + + bool open( const TQString& file, bool readOnly = false); + bool save(); + DBIterator begin(); + DBIterator end(); + + bool find( const TQString& key, TQString& value ); + bool add( const TQString& key, const TQString& val ); + bool remove( const TQString& key ); + private: + // DBT element( const TQString& ); + struct Data; + Data* data; + + }; + +} + + +#endif diff --git a/tdeabc/plugins/evolution/evolution.desktop b/tdeabc/plugins/evolution/evolution.desktop new file mode 100644 index 000000000..98030e906 --- /dev/null +++ b/tdeabc/plugins/evolution/evolution.desktop @@ -0,0 +1,26 @@ +[Desktop Entry] +Name=Evolution +Name[be]=Ð­Ð²Ð°Ð»ÑŽÑ†Ñ‹Ñ +Name[bn]=ইভোলিউশন +Name[eo]=Evoluo +Name[fa]=اوولوشن +Name[hi]=à¤à¤µà¥‰à¤²à¥à¤¯à¥‚शन +Name[ko]=ì—볼루션 +Name[mn]=Хөгжил +Name[ne]=इभोलà¥à¤¯à¥à¤¸à¤¨ +Name[pa]=à¨à¨µà©‚ਲੇਸ਼ਨ +Name[sr]=Еволуција +Name[sr@Latn]=Evolucija +Name[ta]=படிபà¯à®ªà®Ÿà®¿à®¯à®¾à®© வளரà¯à®šà¯à®šà®¿ +Name[te]=ఎవలà±à°¯à±à°·à°¨à± +Name[th]=เอฟโวลูชัน +Name[tt]=ÜseÅŸ +Name[ven]=Tsikoni +Name[wa]=Evolucion +Name[xh]=Utshintsho lwendawo ngokwenqanawa +Name[zu]=Evolushini +X-TDE-Library=kabc_evo +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=evolution diff --git a/tdeabc/plugins/evolution/resourceevo.cpp b/tdeabc/plugins/evolution/resourceevo.cpp new file mode 100644 index 000000000..e6545f738 --- /dev/null +++ b/tdeabc/plugins/evolution/resourceevo.cpp @@ -0,0 +1,132 @@ +#include + +#include +#include +#include + +#include + +#include + +#include "dbwrapper.h" +#include "resourceevo.h" + +using namespace Evolution; +using namespace KABC; + +class EvolutionFactory : public KRES::PluginFactoryBase +{ + public: + KRES::Resource *resource( const TDEConfig *config ) + { + return new ResourceEvolution( config ); + } + + KRES::ConfigWidget *configWidget( TQWidget * ) + { + return 0; + } +}; + +extern "C" +{ + KDE_EXPORT void *init_kabc_evo() + { + return ( new EvolutionFactory() ); + } +} + +ResourceEvolution::ResourceEvolution( const TDEConfig* conf ) + : Resource( conf ), mWrap(0l) +{ + m_isOpen = false; +} +ResourceEvolution::~ResourceEvolution() { + delete mWrap; +} +bool ResourceEvolution::doOpen() { + mWrap = new DBWrapper; + if (!mWrap->open( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) { + return false; + } + + TQString val; + if (!mWrap->find( "PAS-DB-VERSION", val ) ) + return false; + + if (!val.startsWith("0.2") ) + return false; + + m_isOpen = true; + + return true; +} +void ResourceEvolution::doClose() { + delete mWrap; + mWrap = 0l; + m_isOpen = false; +} +Ticket* ResourceEvolution::requestSaveTicket() { + if ( !addressBook() ) return 0; + return createTicket( this ); +} +/* + * skip the first key + */ + +bool ResourceEvolution::load() { + /* doOpen never get's called :( */ + if (!doOpen()) return false; + if (!mWrap ) return false; // open first! + + DBIterator it = mWrap->begin(); + // skip the "PAS-DB-VERSION" + + for ( ; it != mWrap->end(); ++it ) { + if ( it.key().startsWith("PAS-DB-VERSION") ) + continue; + + tqWarning( "val:%s", it.value().latin1() ); + VCardTool tool; + TQString str = it.value().stripWhiteSpace(); + Addressee::List list = tool.parseVCards( str ); + if (!list.first().isEmpty() ) { + Addressee adr = list.first(); + adr.setResource(this); + addressBook()->insertAddressee( adr ); + } + } + return true; +} +bool ResourceEvolution::save( Ticket* ticket ) { + delete ticket; + if (!m_isOpen ) return false; + + // just delete the summary so evolution will regenerate it + // on next start up + (void)TQFile::remove( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" ); + + + AddressBook::Iterator it; + Addressee::List list; + for ( it = addressBook()->begin(); it !=addressBook()->end(); ++it ) { + if ( (*it).resource() != this || !(*it).changed() ) + continue; + + // remove, convert add set unchanged false + list.clear(); + mWrap->remove( (*it).uid() ); + VCardTool tool; + list.append( (*it) ); + mWrap->add( (*it).uid(), tool.createVCards( list, VCard::v2_1) ); + + (*it).setChanged( false ); + } + + return true; +} +void ResourceEvolution::removeAddressee( const Addressee& rem) { + if (!m_isOpen) return; + + mWrap->remove( rem.uid() ); +} diff --git a/tdeabc/plugins/evolution/resourceevo.h b/tdeabc/plugins/evolution/resourceevo.h new file mode 100644 index 000000000..29e163e1c --- /dev/null +++ b/tdeabc/plugins/evolution/resourceevo.h @@ -0,0 +1,23 @@ +#include "resource.h" + +namespace Evolution { + class DBWrapper; +} + +namespace KABC { + class ResourceEvolution : public Resource { + public: + ResourceEvolution( const TDEConfig* config ); + ~ResourceEvolution(); + + bool doOpen(); + void doClose(); + Ticket* requestSaveTicket(); + bool load(); + bool save( Ticket* ticket ); + void removeAddressee( const Addressee& ); + private: + Evolution::DBWrapper *mWrap; + bool m_isOpen : 1; + }; +} diff --git a/tdeabc/plugins/file/CMakeLists.txt b/tdeabc/plugins/file/CMakeLists.txt new file mode 100644 index 000000000..6c17d2dc7 --- /dev/null +++ b/tdeabc/plugins/file/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourcefile.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES file.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_file (library) ####################### + +set( target kabc_file ) + +set( ${target}_SRCS + resourcefile.cpp resourcefileconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_file (module) ######################## + +set( target kabc_file ) + +set( ${target}_SRCS + resourcefileplugin.cpp +) + +tde_add_kpart( ${target} + SOURCES ${${target}_SRCS} + LINK kabc_file-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/file/Makefile.am b/tdeabc/plugins/file/Makefile.am new file mode 100644 index 000000000..d00ffea3f --- /dev/null +++ b/tdeabc/plugins/file/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcefileconfig.h + +lib_LTLIBRARIES = libkabc_file.la +libkabc_file_la_SOURCES = resourcefile.cpp resourcefileconfig.cpp +libkabc_file_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_file_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEFILE) $(LIB_TDECORE) $(LIB_TDEUI) +libkabc_file_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + + +kde_module_LTLIBRARIES = kabc_file.la +kabc_file_la_SOURCES = resourcefileplugin.cpp +kabc_file_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined +kabc_file_la_LIBADD = libkabc_file.la $(LIB_QT) $(LIB_TDECORE) +kabc_file_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_file.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourcefile.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = file.desktop diff --git a/tdeabc/plugins/file/file.desktop b/tdeabc/plugins/file/file.desktop new file mode 100644 index 000000000..1359dd1c6 --- /dev/null +++ b/tdeabc/plugins/file/file.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Name=File +Name[af]=Lêer +Name[ar]=ملÙÙ‘ +Name[az]=Fayl +Name[be]=Файл +Name[bn]=ফাইল +Name[br]=Restr +Name[bs]=Datoteka +Name[ca]=Fitxer +Name[cs]=Soubor +Name[csb]=Lopk +Name[cy]=Ffeil +Name[da]=Fil +Name[de]=Datei +Name[el]=ΑÏχείο +Name[eo]=Dosiero +Name[es]=Archivo +Name[et]=Fail +Name[eu]=Fitxategia +Name[fa]=پرونده +Name[fi]=Tiedosto +Name[fr]=Fichier +Name[fy]=Triem +Name[ga]=Comhad +Name[gl]=Ficheiro +Name[he]=קובץ +Name[hi]=फ़ाइल +Name[hr]=Datoteka +Name[hsb]=Dataja +Name[hu]=Fájl +Name[id]=Berkas +Name[is]=Skrá +Name[ja]=ファイル +Name[ka]=ფáƒáƒ˜áƒšáƒ˜ +Name[kk]=Файл +Name[km]=ឯកសារ +Name[ko]=íŒŒì¼ +Name[lb]=Datei +Name[lt]=Byla +Name[lv]=Fails +Name[mk]=Датотека +Name[mn]=Файл +Name[ms]=Fail +Name[nb]=Fil +Name[nds]=Datei +Name[ne]=फाइल +Name[nl]=Bestand +Name[nn]=Fil +Name[pa]=ਫਾਇਲ +Name[pl]=Plik +Name[pt]=Ficheiro +Name[pt_BR]=Arquivo +Name[ro]=FiÅŸier +Name[ru]=Файл +Name[rw]=Idosiye +Name[se]=Fiila +Name[sk]=Súbor +Name[sl]=Datoteka +Name[sq]=Skedë +Name[sr]=Фајл +Name[sr@Latn]=Fajl +Name[sv]=Fil +Name[ta]=கோபà¯à®ªà¯ +Name[te]=దసà±à°¤à±à°°à°‚ +Name[tg]=Файл +Name[th]=à¹à¸Ÿà¹‰à¸¡ +Name[tr]=Dosya +Name[tt]=Birem +Name[uk]=Файл +Name[uz]=Fayl +Name[uz@cyrillic]=Файл +Name[vi]=Tập tin +Name[wa]=Fitchî +Name[zh_CN]=文件 +Name[zh_HK]=檔案 +Name[zh_TW]=檔案 +X-TDE-Library=kabc_file +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=file diff --git a/tdeabc/plugins/file/resourcefile.cpp b/tdeabc/plugins/file/resourcefile.cpp new file mode 100644 index 000000000..b29cf33c3 --- /dev/null +++ b/tdeabc/plugins/file/resourcefile.cpp @@ -0,0 +1,395 @@ +/* + This file is part of libkabc. + + Copyright (c) 2001,2003 Cornelius Schumacher + Copyright (c) 2006 Tom Abers + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "formatfactory.h" +#include "resourcefileconfig.h" +#include "stdaddressbook.h" +#include "lock.h" + +#include "resourcefile.h" + +using namespace KABC; + +ResourceFile::ResourceFile( const TDEConfig *config ) + : Resource( config ), mFormat( 0 ), + mAsynchronous( false ) +{ + TQString fileName, formatName; + + if ( config ) { + fileName = config->readPathEntry( "FileName", StdAddressBook::fileName() ); + formatName = config->readEntry( "FileFormat", "vcard" ); + } else { + fileName = StdAddressBook::fileName(); + formatName = "vcard"; + } + + init( fileName, formatName ); +} + +ResourceFile::ResourceFile( const TQString &fileName, + const TQString &formatName ) + : Resource( 0 ), mFormat( 0 ), + mAsynchronous( false ) +{ + init( fileName, formatName ); +} + +void ResourceFile::init( const TQString &fileName, const TQString &formatName ) +{ + mFormatName = formatName; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); + + if ( !mFormat ) { + mFormatName = "vcard"; + mFormat = factory->format( mFormatName ); + } + + connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( fileChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( fileChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( fileChanged() ) ); + + setFileName( fileName ); + + mLock = 0; +} + +ResourceFile::~ResourceFile() +{ + delete mFormat; + mFormat = 0; +} + +void ResourceFile::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + if ( mFileName == StdAddressBook::fileName() ) + config->deleteEntry( "FileName" ); + else + config->writePathEntry( "FileName", mFileName ); + + config->writeEntry( "FileFormat", mFormatName ); +} + +Ticket *ResourceFile::requestSaveTicket() +{ + kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; + + if ( !addressBook() ) return 0; + + delete mLock; + mLock = new Lock( mFileName ); + + if ( mLock->lock() ) { + addressBook()->emitAddressBookLocked(); + } else { + addressBook()->error( mLock->error() ); + kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock file '" + << mFileName << "': " << mLock->error() << endl; + return 0; + } + + return createTicket( this ); +} + +void ResourceFile::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; + + delete mLock; + mLock = 0; + + addressBook()->emitAddressBookUnlocked(); +} + +bool ResourceFile::doOpen() +{ + TQFile file( mFileName ); + + if ( !file.exists() ) { + // try to create the file + bool ok = file.open( IO_WriteOnly ); + if ( ok ) + file.close(); + + return ok; + } else { + TQFileInfo fileInfo( mFileName ); + if ( readOnly() || !fileInfo.isWritable() ) { + if ( !file.open( IO_ReadOnly ) ) + return false; + } else { + if ( !file.open( IO_ReadWrite ) ) + return false; + } + + if ( file.size() == 0 ) { + file.close(); + kdDebug() << "File size is zero. Evaluating backups" << endl; + for (int i=0; i!=20; i++) + { + TQFile backup( mFileName + "__" + TQString::number(i) ); + kdDebug() << "Evaluating" << backup.name() << " size: " << backup.size() << endl; + if ( backup.size() != 0 ) + { + kdDebug() << "Restoring backup " << i << endl; + const TQString src = mFileName + "__" + TQString::number(i); + const TQString dest = mFileName; + + // remove dest + TQFile::remove( dest ); + + // copy src to dest + if ( backup.open( IO_ReadOnly ) ) { + const TQByteArray data = backup.readAll(); + + TQFile out( dest ); + if ( out.open( IO_WriteOnly ) ) { + out.writeBlock( data ); + out.close(); + } + + backup.close(); + } + return true; + } + } + return true; + } + + bool ok = mFormat->checkFormat( &file ); + file.close(); + + return ok; + } +} + +void ResourceFile::doClose() +{ +} + +bool ResourceFile::load() +{ + kdDebug(5700) << "ResourceFile::load(): '" << mFileName << "'" << endl; + + mAsynchronous = false; + + TQFile file( mFileName ); + if ( !file.open( IO_ReadOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) ); + return false; + } + + clear(); + + return mFormat->loadAll( addressBook(), this, &file ); +} + +bool ResourceFile::asyncLoad() +{ + kdDebug(5700) << "ResourceFile::asyncLoad()" << endl; + + mAsynchronous = true; + + bool ok = load(); + + if ( !ok ) + emitLoadingError(); + else + emitLoadingFinished(); + + return true; +} + +bool ResourceFile::save( Ticket * ) +{ + kdDebug(5700) << "ResourceFile::save()" << endl; + + // Only do the logrotate dance when the __0 file is not 0 bytes. + TQFile file( mFileName + "__0" ); + if ( file.size() != 0 ) { + const TQString last = mFileName + "__20"; + kdDebug() << "deleting " << last << endl; + + TQFile::remove( last ); + + for (int i=19; i>=0; i--) + { + const TQString src = mFileName + "__" + TQString::number(i); + const TQString dest = mFileName + "__" + TQString::number(i+1); + kdDebug() << "moving " << src << " -> " << dest << endl; + + // copy src to dest + TQFile in( src ); + if ( in.open( IO_ReadOnly ) ) { + const TQByteArray data = in.readAll(); + + TQFile out( dest ); + if ( out.open( IO_WriteOnly ) ) { + out.writeBlock( data ); + out.close(); + } + + in.close(); + } + + // remove src + TQFile::remove( src ); + } + } else + kdDebug() << "Not starting logrotate __0 is 0 bytes." << endl; + + TQString extension = "__0"; + (void) KSaveFile::backupFile( mFileName, TQString::null /*directory*/, + extension ); + + mDirWatch.stopScan(); + + KSaveFile saveFile( mFileName ); + bool ok = false; + + if ( saveFile.status() == 0 && saveFile.file() ) { + mFormat->saveAll( addressBook(), this, saveFile.file() ); + ok = saveFile.close(); + } + + if ( !ok ) { + saveFile.abort(); + addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); + } + + mDirWatch.startScan(); + + return ok; +} + +bool ResourceFile::asyncSave( Ticket *ticket ) +{ + kdDebug(5700) << "ResourceFile::asyncSave()" << endl; + + bool ok = save( ticket ); + + if ( !ok ) + TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingError() ) ); + else + TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingFinished() ) ); + + return ok; +} + +void ResourceFile::setFileName( const TQString &fileName ) +{ + mDirWatch.stopScan(); + if ( mDirWatch.contains( mFileName ) ) + mDirWatch.removeFile( mFileName ); + + mFileName = fileName; + + mDirWatch.addFile( mFileName ); + mDirWatch.startScan(); +} + +TQString ResourceFile::fileName() const +{ + return mFileName; +} + +void ResourceFile::setFormat( const TQString &format ) +{ + mFormatName = format; + delete mFormat; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +} + +TQString ResourceFile::format() const +{ + return mFormatName; +} + +void ResourceFile::fileChanged() +{ + kdDebug(5700) << "ResourceFile::fileChanged(): " << mFileName << endl; + + if ( !addressBook() ) + return; + + if ( mAsynchronous ) + asyncLoad(); + else { + load(); + kdDebug() << "addressBookChanged() " << endl; + addressBook()->emitAddressBookChanged(); + } +} + +void ResourceFile::removeAddressee( const Addressee &addr ) +{ + TQFile::remove( TQFile::encodeName( locateLocal( "data", "tdeabc/photos/" ) + addr.uid() ) ); + TQFile::remove( TQFile::encodeName( locateLocal( "data", "tdeabc/logos/" ) + addr.uid() ) ); + TQFile::remove( TQFile::encodeName( locateLocal( "data", "tdeabc/sounds/" ) + addr.uid() ) ); + + mAddrMap.erase( addr.uid() ); +} + +void ResourceFile::emitSavingFinished() +{ + emit savingFinished( this ); +} + +void ResourceFile::emitSavingError() +{ + emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mFileName ) ); +} + +void ResourceFile::emitLoadingFinished() +{ + emit loadingFinished( this ); +} + +void ResourceFile::emitLoadingError() +{ + emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mFileName ) ); +} + +#include "resourcefile.moc" diff --git a/tdeabc/plugins/file/resourcefile.h b/tdeabc/plugins/file/resourcefile.h new file mode 100644 index 000000000..a77f55798 --- /dev/null +++ b/tdeabc/plugins/file/resourcefile.h @@ -0,0 +1,162 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCEFILE_H +#define KABC_RESOURCEFILE_H + +#include +#include + +#include + +#include + +namespace KABC { + +class FormatPlugin; +class ResourceConfigWidget; +class Lock; + +/** + This resource allows access to a local file. +*/ +class KABC_EXPORT ResourceFile : public Resource +{ + Q_OBJECT + + public: + /** + Constructor. + + @param cfg The config object where custom resource settings are stored. + */ + ResourceFile( const TDEConfig *cfg ); + + /** + Construct file resource on file @arg fileName using format @arg formatName. + */ + ResourceFile( const TQString &fileName, const TQString &formatName = "vcard" ); + + /** + Destructor. + */ + ~ResourceFile(); + + /** + Writes the config back. + */ + virtual void writeConfig( TDEConfig *cfg ); + + /** + Tries to open the file and checks for the proper format. + This method should be called before load(). + */ + virtual bool doOpen(); + + /** + Closes the file again. + */ + virtual void doClose(); + + /** + Requests a save ticket, that is used by save() + */ + virtual Ticket *requestSaveTicket(); + + virtual void releaseSaveTicket( Ticket* ); + + /** + Loads all addressees from file to the address book. + Returns true if all addressees could be loaded otherwise false. + */ + virtual bool load(); + + virtual bool asyncLoad(); + + /** + Saves all addresses from address book to file. + Returns true if all addressees could be saved otherwise false. + + @param ticket The ticket returned by requestSaveTicket() + */ + virtual bool save( Ticket *ticket ); + + virtual bool asyncSave( Ticket *ticket ); + + /** + Set name of file to be used for saving. + */ + void setFileName( const TQString & ); + + /** + Return name of file used for loading and saving the address book. + */ + TQString fileName() const; + + /** + Sets a new format by name. + */ + void setFormat( const TQString &name ); + + /** + Returns the format name. + */ + TQString format() const; + + /** + Remove a addressee from its source. + This method is mainly called by KABC::AddressBook. + */ + virtual void removeAddressee( const Addressee& addr ); + + private slots: + void emitLoadingFinished(); + void emitLoadingError(); + void emitSavingFinished(); + void emitSavingError(); + + protected slots: + void fileChanged(); + + protected: + void init( const TQString &fileName, const TQString &format ); + + bool lock( const TQString &fileName ); + void unlock( const TQString &fileName ); + + private: + TQString mFileName; + TQString mFormatName; + + FormatPlugin *mFormat; + + Lock *mLock; + + KDirWatch mDirWatch; + + bool mAsynchronous; + + class ResourceFilePrivate; + ResourceFilePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/file/resourcefileconfig.cpp b/tdeabc/plugins/file/resourcefileconfig.cpp new file mode 100644 index 000000000..7c3f4da15 --- /dev/null +++ b/tdeabc/plugins/file/resourcefileconfig.cpp @@ -0,0 +1,118 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include + +#include + +#include "formatfactory.h" +#include "resourcefile.h" +#include "stdaddressbook.h" + +#include "resourcefileconfig.h" + +using namespace KABC; + +ResourceFileConfig::ResourceFileConfig( TQWidget* parent, const char* name ) + : ConfigWidget( parent, name ) +{ + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, + KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); + mFormatBox = new KComboBox( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mFormatBox, 0, 1 ); + + label = new TQLabel( i18n( "Location:" ), this ); + mFileNameEdit = new KURLRequester( this ); + + connect( mFileNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( checkFilePermissions( const TQString & ) ) ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mFileNameEdit, 1, 1 ); + + FormatFactory *factory = FormatFactory::self(); + TQStringList formats = factory->formats(); + TQStringList::Iterator it; + for ( it = formats.begin(); it != formats.end(); ++it ) { + FormatInfo *info = factory->info( *it ); + if ( info ) { + mFormatTypes << (*it); + mFormatBox->insertItem( info->nameLabel ); + } + } + + mInEditMode = false; +} + +void ResourceFileConfig::setEditMode( bool value ) +{ + mFormatBox->setEnabled( !value ); + mInEditMode = value; +} + +void ResourceFileConfig::loadSettings( KRES::Resource *res ) +{ + ResourceFile *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceFileConfig::loadSettings(): cast failed" << endl; + return; + } + + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + + mFileNameEdit->setURL( resource->fileName() ); + if ( mFileNameEdit->url().isEmpty() ) + mFileNameEdit->setURL( KABC::StdAddressBook::fileName() ); +} + +void ResourceFileConfig::saveSettings( KRES::Resource *res ) +{ + ResourceFile *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceFileConfig::saveSettings(): cast failed" << endl; + return; + } + + if ( !mInEditMode ) + resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); + + resource->setFileName( mFileNameEdit->url() ); +} + +void ResourceFileConfig::checkFilePermissions( const TQString& fileName ) +{ + // If file exist but is not writeable... + if ( access( TQFile::encodeName( fileName ), F_OK ) == 0 ) + emit setReadOnly( access( TQFile::encodeName( fileName ), W_OK ) < 0 ); +} + +#include "resourcefileconfig.moc" diff --git a/tdeabc/plugins/file/resourcefileconfig.h b/tdeabc/plugins/file/resourcefileconfig.h new file mode 100644 index 000000000..18c217eda --- /dev/null +++ b/tdeabc/plugins/file/resourcefileconfig.h @@ -0,0 +1,57 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCEFILECONFIG_H +#define RESOURCEFILECONFIG_H + +#include +#include + +#include + +namespace KABC { + +class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget +{ + Q_OBJECT + +public: + ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 ); + + void setEditMode( bool value ); + +public slots: + void loadSettings( KRES::Resource *resource ); + void saveSettings( KRES::Resource *resource ); + +protected slots: + void checkFilePermissions( const TQString& fileName ); + +private: + KComboBox* mFormatBox; + KURLRequester* mFileNameEdit; + bool mInEditMode; + + TQStringList mFormatTypes; +}; + +} + +#endif diff --git a/tdeabc/plugins/file/resourcefileplugin.cpp b/tdeabc/plugins/file/resourcefileplugin.cpp new file mode 100644 index 000000000..4dce19bc0 --- /dev/null +++ b/tdeabc/plugins/file/resourcefileplugin.cpp @@ -0,0 +1,32 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcefile.h" +#include "resourcefileconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_file() + { + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/ldaptdeio/CMakeLists.txt b/tdeabc/plugins/ldaptdeio/CMakeLists.txt new file mode 100644 index 000000000..820f6e017 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefiles +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourceldaptdeio.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES ldaptdeio.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_ldaptdeio ############################## + +set( target kabc_ldaptdeio ) + +set( ${target}_SRCS + resourceldaptdeio.cpp resourceldaptdeioconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_ldaptdeio ############################## + +set( target kabc_ldaptdeio ) + +set( ${target}_SRCS + resourceldaptdeioplugin.cpp +) + +tde_add_kpart( ${target} + SOURCES ${${target}_SRCS} + LINK kabc_ldaptdeio-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/ldaptdeio/Makefile.am b/tdeabc/plugins/ldaptdeio/Makefile.am new file mode 100644 index 000000000..bc81d13d8 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourceldaptdeioconfig.h + +lib_LTLIBRARIES = libkabc_ldaptdeio.la +libkabc_ldaptdeio_la_SOURCES = resourceldaptdeio.cpp resourceldaptdeioconfig.cpp +libkabc_ldaptdeio_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_ldaptdeio_la_LIBADD = $(LIB_KABC) $(LIB_KIO) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEUI) $(LIB_TDECORE) +libkabc_ldaptdeio_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +kde_module_LTLIBRARIES = kabc_ldaptdeio.la +kabc_ldaptdeio_la_SOURCES = resourceldaptdeioplugin.cpp +kabc_ldaptdeio_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kabc_ldaptdeio_la_LIBADD = libkabc_ldaptdeio.la $(LIB_QT) $(LIB_TDECORE) + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_ldaptdeio.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourceldaptdeio.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = ldaptdeio.desktop + +resourceldaptdeioplugin.lo: ../../addressee.h diff --git a/tdeabc/plugins/ldaptdeio/ldaptdeio.desktop b/tdeabc/plugins/ldaptdeio/ldaptdeio.desktop new file mode 100644 index 000000000..9bcd13337 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/ldaptdeio.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=LDAP +Name[bn]=à¦à¦²-ডি-à¦-পি (LDAP) +Name[hi]=à¤à¤²à¤¡à¥€à¤à¤ªà¥€ (LDAP) +Name[te]=à°Žà°²à±à°¡à°¿à°à°ªà°¿ +X-TDE-Library=kabc_ldaptdeio +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=ldaptdeio diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp new file mode 100644 index 000000000..ea1a4294c --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp @@ -0,0 +1,1041 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "resourceldaptdeio.h" +#include "resourceldaptdeioconfig.h" + +using namespace KABC; + +// Hack from Netaccess +void tqt_enter_modal( TQWidget *widget ); +void tqt_leave_modal( TQWidget *widget ); + +class ResourceLDAPTDEIO::ResourceLDAPTDEIOPrivate +{ + public: + LDIF mLdif; + bool mTLS,mSSL,mSubTree; + TQString mResultDn; + Addressee mAddr; + Address mAd; + Resource::Iterator mSaveIt; + bool mSASL; + TQString mMech; + TQString mRealm, mBindDN; + LDAPUrl mLDAPUrl; + int mVer, mSizeLimit, mTimeLimit, mRDNPrefix; + int mError; + int mCachePolicy; + bool mReadOnly; + bool mAutoCache; + TQString mCacheDst; + KTempFile *mTmp; +}; + +ResourceLDAPTDEIO::ResourceLDAPTDEIO( const TDEConfig *config ) + : Resource( config ) +{ + d = new ResourceLDAPTDEIOPrivate; + if ( config ) { + TQMap attrList; + TQStringList attributes = config->readListEntry( "LdapAttributes" ); + for ( uint pos = 0; pos < attributes.count(); pos += 2 ) + mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] ); + + mUser = config->readEntry( "LdapUser" ); + mPassword = KStringHandler::obscure( config->readEntry( "LdapPassword" ) ); + mDn = config->readEntry( "LdapDn" ); + mHost = config->readEntry( "LdapHost" ); + mPort = config->readNumEntry( "LdapPort", 389 ); + mFilter = config->readEntry( "LdapFilter" ); + mAnonymous = config->readBoolEntry( "LdapAnonymous" ); + d->mTLS = config->readBoolEntry( "LdapTLS" ); + d->mSSL = config->readBoolEntry( "LdapSSL" ); + d->mSubTree = config->readBoolEntry( "LdapSubTree" ); + d->mSASL = config->readBoolEntry( "LdapSASL" ); + d->mMech = config->readEntry( "LdapMech" ); + d->mRealm = config->readEntry( "LdapRealm" ); + d->mBindDN = config->readEntry( "LdapBindDN" ); + d->mVer = config->readNumEntry( "LdapVer", 3 ); + d->mTimeLimit = config->readNumEntry( "LdapTimeLimit", 0 ); + d->mSizeLimit = config->readNumEntry( "LdapSizeLimit", 0 ); + d->mRDNPrefix = config->readNumEntry( "LdapRDNPrefix", 0 ); + d->mCachePolicy = config->readNumEntry( "LdapCachePolicy", 0 ); + d->mAutoCache = config->readBoolEntry( "LdapAutoCache", true ); + } else { + mPort = 389; + mAnonymous = true; + mUser = mPassword = mHost = mFilter = mDn = ""; + d->mMech = d->mRealm = d->mBindDN = ""; + d->mTLS = d->mSSL = d->mSubTree = d->mSASL = false; + d->mVer = 3; d->mRDNPrefix = 0; + d->mTimeLimit = d->mSizeLimit = 0; + d->mCachePolicy = Cache_No; + d->mAutoCache = true; + } + d->mCacheDst = TDEGlobal::dirs()->saveLocation("cache", "ldaptdeio") + "/" + + type() + "_" + identifier(); + init(); +} + +ResourceLDAPTDEIO::~ResourceLDAPTDEIO() +{ + delete d; +} + +void ResourceLDAPTDEIO::enter_loop() +{ + TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); + dummy.setFocusPolicy( TQ_NoFocus ); + tqt_enter_modal(&dummy); + tqApp->enter_loop(); + tqt_leave_modal(&dummy); +} + +void ResourceLDAPTDEIO::entries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) +{ + TDEIO::UDSEntryListConstIterator it = list.begin(); + TDEIO::UDSEntryListConstIterator end = list.end(); + for (; it != end; ++it) { + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); + for( ; it2 != (*it).end(); it2++ ) { + if ( (*it2).m_uds == TDEIO::UDS_URL ) { + KURL tmpurl( (*it2).m_str ); + d->mResultDn = tmpurl.path(); + kdDebug(7125) << "findUid(): " << d->mResultDn << endl; + if ( d->mResultDn.startsWith("/") ) d->mResultDn.remove(0,1); + return; + } + } + } +} + +void ResourceLDAPTDEIO::listResult( TDEIO::Job *job) +{ + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) + mErrorMsg = job->errorString(); + else + mErrorMsg = ""; + tqApp->exit_loop(); +} + +TQString ResourceLDAPTDEIO::findUid( const TQString &uid ) +{ + LDAPUrl url( d->mLDAPUrl ); + TDEIO::UDSEntry entry; + + mErrorMsg = d->mResultDn = ""; + + url.setAttributes("dn"); + url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); + url.setExtension( "x-dir", "one" ); + + kdDebug(7125) << "ResourceLDAPTDEIO::findUid() uid: " << uid << " url " << + url.prettyURL() << endl; + + TDEIO::ListJob * listJob = TDEIO::listDir( url, false /* no GUI */ ); + connect( listJob, + TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList& ) ), + TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); + connect( listJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( listResult( TDEIO::Job* ) ) ); + + enter_loop(); + return d->mResultDn; +} + +TQCString ResourceLDAPTDEIO::addEntry( const TQString &attr, const TQString &value, bool mod ) +{ + TQCString tmp; + if ( !attr.isEmpty() ) { + if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n"; + tmp += LDIF::assembleLine( attr, value ) + "\n"; + if ( mod ) tmp += "-\n"; + } + return ( tmp ); +} + +bool ResourceLDAPTDEIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, + const TQString &olddn ) +{ + TQCString tmp; + TQString dn; + TQByteArray data; + bool mod = false; + + if ( olddn.isEmpty() ) { + //insert new entry + switch ( d->mRDNPrefix ) { + case 1: + dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," +mDn; + break; + case 0: + default: + dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," +mDn; + break; + } + } else { + //modify existing entry + mod = true; + if ( olddn.startsWith( mAttributes[ "uid" ] ) ) { + dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," + olddn.section( ',', 1 ); + } else if ( olddn.startsWith( mAttributes[ "commonName" ] ) ) { + dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," + + olddn.section( ',', 1 ); + } else { + dn = olddn; + } + + if ( olddn.lower() != dn.lower() ) { + tmp = LDIF::assembleLine( "dn", olddn ) + "\n"; + tmp += "changetype: modrdn\n"; + tmp += LDIF::assembleLine( "newrdn", dn.section( ',', 0, 0 ) ) + "\n"; + tmp += "deleteoldrdn: 1\n\n"; + } + } + + + tmp += LDIF::assembleLine( "dn", dn ) + "\n"; + if ( mod ) tmp += "changetype: modify\n"; + if ( !mod ) { + tmp += "objectClass: top\n"; + TQStringList obclass = TQStringList::split( ',', mAttributes[ "objectClass" ] ); + for ( TQStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) { + tmp += LDIF::assembleLine( "objectClass", *it ) + "\n"; + } + } + + tmp += addEntry( mAttributes[ "commonName" ], addr.assembledName(), mod ); + tmp += addEntry( mAttributes[ "formattedName" ], addr.formattedName(), mod ); + tmp += addEntry( mAttributes[ "givenName" ], addr.givenName(), mod ); + tmp += addEntry( mAttributes[ "familyName" ], addr.familyName(), mod ); + tmp += addEntry( mAttributes[ "uid" ], addr.uid(), mod ); + + PhoneNumber number; + number = addr.phoneNumber( PhoneNumber::Home ); + tmp += addEntry( mAttributes[ "phoneNumber" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Work ); + tmp += addEntry( mAttributes[ "telephoneNumber" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Fax ); + tmp += addEntry( mAttributes[ "facsimileTelephoneNumber" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Cell ); + tmp += addEntry( mAttributes[ "mobile" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Pager ); + tmp += addEntry( mAttributes[ "pager" ], number.number().utf8(), mod ); + + tmp += addEntry( mAttributes[ "description" ], addr.note(), mod ); + tmp += addEntry( mAttributes[ "title" ], addr.title(), mod ); + tmp += addEntry( mAttributes[ "organization" ], addr.organization(), mod ); + + Address ad = addr.address( Address::Home ); + if ( !ad.isEmpty() ) { + tmp += addEntry( mAttributes[ "street" ], ad.street(), mod ); + tmp += addEntry( mAttributes[ "state" ], ad.region(), mod ); + tmp += addEntry( mAttributes[ "city" ], ad.locality(), mod ); + tmp += addEntry( mAttributes[ "postalcode" ], ad.postalCode(), mod ); + } + + TQStringList emails = addr.emails(); + TQStringList::ConstIterator mailIt = emails.begin(); + + if ( !mAttributes[ "mail" ].isEmpty() ) { + if ( mod ) tmp += + LDIF::assembleLine( "replace", mAttributes[ "mail" ] ) + "\n"; + if ( mailIt != emails.end() ) { + tmp += LDIF::assembleLine( mAttributes[ "mail" ], *mailIt ) + "\n"; + mailIt ++; + } + if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += "-\n"; + } + + if ( !mAttributes[ "mailAlias" ].isEmpty() ) { + if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += + LDIF::assembleLine( "replace", mAttributes[ "mailAlias" ] ) + "\n"; + for ( ; mailIt != emails.end(); ++mailIt ) { + tmp += LDIF::assembleLine( mAttributes[ "mailAlias" ], *mailIt ) + "\n" ; + } + if ( mod ) tmp += "-\n"; + } + + if ( !mAttributes[ "jpegPhoto" ].isEmpty() ) { + TQByteArray pic; + TQBuffer buffer( pic ); + buffer.open( IO_WriteOnly ); + addr.photo().data().save( &buffer, "JPEG" ); + + if ( mod ) tmp += + LDIF::assembleLine( "replace", mAttributes[ "jpegPhoto" ] ) + "\n"; + tmp += LDIF::assembleLine( mAttributes[ "jpegPhoto" ], pic, 76 ) + "\n"; + if ( mod ) tmp += "-\n"; + } + + tmp += "\n"; + kdDebug(7125) << "ldif: " << TQString(TQString::fromUtf8(tmp)) << endl; + ldif = tmp; + return true; +} + +void ResourceLDAPTDEIO::setReadOnly( bool value ) +{ + //save the original readonly flag, because offline using disables writing + d->mReadOnly = true; + Resource::setReadOnly( value ); +} + +void ResourceLDAPTDEIO::init() +{ + if ( mPort == 0 ) mPort = 389; + + /** + If you want to add new attributes, append them here, add a + translation string in the ctor of AttributesDialog and + handle them in the load() method below. + These are the default values + */ + if ( !mAttributes.contains("objectClass") ) + mAttributes.insert( "objectClass", "inetOrgPerson" ); + if ( !mAttributes.contains("commonName") ) + mAttributes.insert( "commonName", "cn" ); + if ( !mAttributes.contains("formattedName") ) + mAttributes.insert( "formattedName", "displayName" ); + if ( !mAttributes.contains("familyName") ) + mAttributes.insert( "familyName", "sn" ); + if ( !mAttributes.contains("givenName") ) + mAttributes.insert( "givenName", "givenName" ); + if ( !mAttributes.contains("mail") ) + mAttributes.insert( "mail", "mail" ); + if ( !mAttributes.contains("mailAlias") ) + mAttributes.insert( "mailAlias", "" ); + if ( !mAttributes.contains("phoneNumber") ) + mAttributes.insert( "phoneNumber", "homePhone" ); + if ( !mAttributes.contains("telephoneNumber") ) + mAttributes.insert( "telephoneNumber", "telephoneNumber" ); + if ( !mAttributes.contains("facsimileTelephoneNumber") ) + mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); + if ( !mAttributes.contains("mobile") ) + mAttributes.insert( "mobile", "mobile" ); + if ( !mAttributes.contains("pager") ) + mAttributes.insert( "pager", "pager" ); + if ( !mAttributes.contains("description") ) + mAttributes.insert( "description", "description" ); + + if ( !mAttributes.contains("title") ) + mAttributes.insert( "title", "title" ); + if ( !mAttributes.contains("street") ) + mAttributes.insert( "street", "street" ); + if ( !mAttributes.contains("state") ) + mAttributes.insert( "state", "st" ); + if ( !mAttributes.contains("city") ) + mAttributes.insert( "city", "l" ); + if ( !mAttributes.contains("organization") ) + mAttributes.insert( "organization", "o" ); + if ( !mAttributes.contains("postalcode") ) + mAttributes.insert( "postalcode", "postalCode" ); + + if ( !mAttributes.contains("uid") ) + mAttributes.insert( "uid", "uid" ); + if ( !mAttributes.contains("jpegPhoto") ) + mAttributes.insert( "jpegPhoto", "jpegPhoto" ); + + d->mLDAPUrl = KURL(); + if ( !mAnonymous ) { + d->mLDAPUrl.setUser( mUser ); + d->mLDAPUrl.setPass( mPassword ); + } + d->mLDAPUrl.setProtocol( d->mSSL ? "ldaps" : "ldap"); + d->mLDAPUrl.setHost( mHost ); + d->mLDAPUrl.setPort( mPort ); + d->mLDAPUrl.setDn( mDn ); + + if (!mAttributes.empty()) { + TQMap::Iterator it; + TQStringList attr; + for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { + if ( !it.data().isEmpty() && it.key() != "objectClass" ) + attr.append( it.data() ); + } + d->mLDAPUrl.setAttributes( attr ); + } + + d->mLDAPUrl.setScope( d->mSubTree ? LDAPUrl::Sub : LDAPUrl::One ); + if ( !mFilter.isEmpty() && mFilter != "(objectClass=*)" ) + d->mLDAPUrl.setFilter( mFilter ); + d->mLDAPUrl.setExtension( "x-dir", "base" ); + if ( d->mTLS ) d->mLDAPUrl.setExtension( "x-tls", "" ); + d->mLDAPUrl.setExtension( "x-ver", TQString::number( d->mVer ) ); + if ( d->mSizeLimit ) + d->mLDAPUrl.setExtension( "x-sizelimit", TQString::number( d->mSizeLimit ) ); + if ( d->mTimeLimit ) + d->mLDAPUrl.setExtension( "x-timelimit", TQString::number( d->mTimeLimit ) ); + if ( d->mSASL ) { + d->mLDAPUrl.setExtension( "x-sasl", "" ); + if ( !d->mBindDN.isEmpty() ) d->mLDAPUrl.setExtension( "bindname", d->mBindDN ); + if ( !d->mMech.isEmpty() ) d->mLDAPUrl.setExtension( "x-mech", d->mMech ); + if ( !d->mRealm.isEmpty() ) d->mLDAPUrl.setExtension( "x-realm", d->mRealm ); + } + + d->mReadOnly = readOnly(); + + kdDebug(7125) << "resource_ldaptdeio url: " << d->mLDAPUrl.prettyURL() << endl; +} + +void ResourceLDAPTDEIO::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + config->writeEntry( "LdapUser", mUser ); + config->writeEntry( "LdapPassword", KStringHandler::obscure( mPassword ) ); + config->writeEntry( "LdapDn", mDn ); + config->writeEntry( "LdapHost", mHost ); + config->writeEntry( "LdapPort", mPort ); + config->writeEntry( "LdapFilter", mFilter ); + config->writeEntry( "LdapAnonymous", mAnonymous ); + config->writeEntry( "LdapTLS", d->mTLS ); + config->writeEntry( "LdapSSL", d->mSSL ); + config->writeEntry( "LdapSubTree", d->mSubTree ); + config->writeEntry( "LdapSASL", d->mSASL ); + config->writeEntry( "LdapMech", d->mMech ); + config->writeEntry( "LdapVer", d->mVer ); + config->writeEntry( "LdapTimeLimit", d->mTimeLimit ); + config->writeEntry( "LdapSizeLimit", d->mSizeLimit ); + config->writeEntry( "LdapRDNPrefix", d->mRDNPrefix ); + config->writeEntry( "LdapRealm", d->mRealm ); + config->writeEntry( "LdapBindDN", d->mBindDN ); + config->writeEntry( "LdapCachePolicy", d->mCachePolicy ); + config->writeEntry( "LdapAutoCache", d->mAutoCache ); + + TQStringList attributes; + TQMap::Iterator it; + for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) + attributes << it.key() << it.data(); + + config->writeEntry( "LdapAttributes", attributes ); +} + +Ticket *ResourceLDAPTDEIO::requestSaveTicket() +{ + if ( !addressBook() ) { + kdDebug(7125) << "no addressbook" << endl; + return 0; + } + + return createTicket( this ); +} + +void ResourceLDAPTDEIO::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; +} + +bool ResourceLDAPTDEIO::doOpen() +{ + return true; +} + +void ResourceLDAPTDEIO::doClose() +{ +} + +void ResourceLDAPTDEIO::createCache() +{ + d->mTmp = NULL; + if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) { + d->mTmp = new KTempFile( d->mCacheDst, "tmp" ); + d->mTmp->setAutoDelete( true ); + } +} + +void ResourceLDAPTDEIO::activateCache() +{ + if ( d->mTmp && d->mError == 0 ) { + d->mTmp->close(); + rename( TQFile::encodeName( d->mTmp->name() ), TQFile::encodeName( d->mCacheDst ) ); + } + if ( d->mTmp ) { + delete d->mTmp; + d->mTmp = 0; + } +} + +TDEIO::Job *ResourceLDAPTDEIO::loadFromCache() +{ + TDEIO::Job *job = NULL; + if ( d->mCachePolicy == Cache_Always || + ( d->mCachePolicy == Cache_NoConnection && + d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) { + + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + //initialize ldif parser + d->mLdif.startParsing(); + + Resource::setReadOnly( true ); + + KURL url( d->mCacheDst ); + job = TDEIO::get( url, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + } + return job; +} + +bool ResourceLDAPTDEIO::load() +{ + kdDebug(7125) << "ResourceLDAPTDEIO::load()" << endl; + TDEIO::Job *job; + + clear(); + //clear the addressee + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + //initialize ldif parser + d->mLdif.startParsing(); + + //set to original settings, offline use will disable writing + Resource::setReadOnly( d->mReadOnly ); + + createCache(); + if ( d->mCachePolicy != Cache_Always ) { + job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); + enter_loop(); + } + + job = loadFromCache(); + if ( job ) { + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); + enter_loop(); + } + if ( mErrorMsg.isEmpty() ) { + kdDebug(7125) << "ResourceLDAPTDEIO load ok!" << endl; + return true; + } else { + kdDebug(7125) << "ResourceLDAPTDEIO load finished with error: " << mErrorMsg << endl; + addressBook()->error( mErrorMsg ); + return false; + } +} + +bool ResourceLDAPTDEIO::asyncLoad() +{ + clear(); + //clear the addressee + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + //initialize ldif parser + d->mLdif.startParsing(); + + Resource::setReadOnly( d->mReadOnly ); + + createCache(); + if ( d->mCachePolicy != Cache_Always ) { + TDEIO::Job *job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( result( TDEIO::Job* ) ) ); + } else { + result( NULL ); + } + return true; +} + +void ResourceLDAPTDEIO::data( TDEIO::Job *, const TQByteArray &data ) +{ + if ( data.size() ) { + d->mLdif.setLDIF( data ); + if ( d->mTmp ) { + d->mTmp->file()->writeBlock( data ); + } + } else { + d->mLdif.endLDIF(); + } + + LDIF::ParseVal ret; + TQString name; + TQByteArray value; + do { + ret = d->mLdif.nextItem(); + switch ( ret ) { + case LDIF::NewEntry: + kdDebug(7125) << "new entry: " << d->mLdif.dn() << endl; + break; + case LDIF::Item: + name = d->mLdif.attr().lower(); + value = d->mLdif.val(); + if ( name == mAttributes[ "commonName" ].lower() ) { + if ( !d->mAddr.formattedName().isEmpty() ) { + TQString fn = d->mAddr.formattedName(); + d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); + d->mAddr.setFormattedName( fn ); + } else + d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "formattedName" ].lower() ) { + d->mAddr.setFormattedName( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "givenName" ].lower() ) { + d->mAddr.setGivenName( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "mail" ].lower() ) { + d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), true ); + } else if ( name == mAttributes[ "mailAlias" ].lower() ) { + d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), false ); + } else if ( name == mAttributes[ "phoneNumber" ].lower() ) { + PhoneNumber phone; + phone.setNumber( TQString::fromUtf8( value, value.size() ) ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "telephoneNumber" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Work ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "facsimileTelephoneNumber" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Fax ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "mobile" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Cell ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "pager" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Pager ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "description" ].lower() ) { + d->mAddr.setNote( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "title" ].lower() ) { + d->mAddr.setTitle( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "street" ].lower() ) { + d->mAd.setStreet( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "state" ].lower() ) { + d->mAd.setRegion( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "city" ].lower() ) { + d->mAd.setLocality( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "postalcode" ].lower() ) { + d->mAd.setPostalCode( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "organization" ].lower() ) { + d->mAddr.setOrganization( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "familyName" ].lower() ) { + d->mAddr.setFamilyName( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "uid" ].lower() ) { + d->mAddr.setUid( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "jpegPhoto" ].lower() ) { + KABC::Picture photo; + TQImage img( value ); + if ( !img.isNull() ) { + photo.setData( img ); + photo.setType( "image/jpeg" ); + d->mAddr.setPhoto( photo ); + } + } + + break; + case LDIF::EndEntry: { + d->mAddr.setResource( this ); + d->mAddr.insertAddress( d->mAd ); + d->mAddr.setChanged( false ); + insertAddressee( d->mAddr ); + //clear the addressee + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + } + break; + default: + break; + } + } while ( ret != LDIF::MoreData ); +} + +void ResourceLDAPTDEIO::loadCacheResult( TDEIO::Job *job ) +{ + mErrorMsg = ""; + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { + mErrorMsg = job->errorString(); + } + if ( !mErrorMsg.isEmpty() ) + emit loadingError( this, mErrorMsg ); + else + emit loadingFinished( this ); +} + +void ResourceLDAPTDEIO::result( TDEIO::Job *job ) +{ + mErrorMsg = ""; + if ( job ) { + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { + mErrorMsg = job->errorString(); + } + } else { + d->mError = 0; + } + activateCache(); + + TDEIO::Job *cjob; + cjob = loadFromCache(); + if ( cjob ) { + connect( cjob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadCacheResult( TDEIO::Job* ) ) ); + } else { + if ( !mErrorMsg.isEmpty() ) + emit loadingError( this, mErrorMsg ); + else + emit loadingFinished( this ); + } +} + +bool ResourceLDAPTDEIO::save( Ticket* ) +{ + kdDebug(7125) << "ResourceLDAPTDEIO save" << endl; + + d->mSaveIt = begin(); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); + enter_loop(); + if ( mErrorMsg.isEmpty() ) { + kdDebug(7125) << "ResourceLDAPTDEIO save ok!" << endl; + return true; + } else { + kdDebug(7125) << "ResourceLDAPTDEIO finished with error: " << mErrorMsg << endl; + addressBook()->error( mErrorMsg ); + return false; + } +} + +bool ResourceLDAPTDEIO::asyncSave( Ticket* ) +{ + kdDebug(7125) << "ResourceLDAPTDEIO asyncSave" << endl; + d->mSaveIt = begin(); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( saveResult( TDEIO::Job* ) ) ); + return true; +} + +void ResourceLDAPTDEIO::syncLoadSaveResult( TDEIO::Job *job ) +{ + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) + mErrorMsg = job->errorString(); + else + mErrorMsg = ""; + activateCache(); + + tqApp->exit_loop(); +} + +void ResourceLDAPTDEIO::saveResult( TDEIO::Job *job ) +{ + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) + emit savingError( this, job->errorString() ); + else + emit savingFinished( this ); +} + +void ResourceLDAPTDEIO::saveData( TDEIO::Job*, TQByteArray& data ) +{ + while ( d->mSaveIt != end() && + !(*d->mSaveIt).changed() ) d->mSaveIt++; + + if ( d->mSaveIt == end() ) { + kdDebug(7125) << "ResourceLDAPTDEIO endData" << endl; + data.resize(0); + return; + } + + kdDebug(7125) << "ResourceLDAPTDEIO saveData: " << (*d->mSaveIt).assembledName() << endl; + + AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) ); +// kdDebug(7125) << "ResourceLDAPTDEIO save LDIF: " << TQString::fromUtf8(data) << endl; + // mark as unchanged + (*d->mSaveIt).setChanged( false ); + + d->mSaveIt++; +} + +void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr ) +{ + TQString dn = findUid( addr.uid() ); + + kdDebug(7125) << "ResourceLDAPTDEIO: removeAddressee: " << dn << endl; + + if ( !mErrorMsg.isEmpty() ) { + addressBook()->error( mErrorMsg ); + return; + } + if ( !dn.isEmpty() ) { + kdDebug(7125) << "ResourceLDAPTDEIO: found uid: " << dn << endl; + LDAPUrl url( d->mLDAPUrl ); + url.setPath( "/" + dn ); + url.setExtension( "x-dir", "base" ); + url.setScope( LDAPUrl::Base ); + if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); + } else { + //maybe it's not saved yet + mAddrMap.erase( addr.uid() ); + } +} + + +void ResourceLDAPTDEIO::setUser( const TQString &user ) +{ + mUser = user; +} + +TQString ResourceLDAPTDEIO::user() const +{ + return mUser; +} + +void ResourceLDAPTDEIO::setPassword( const TQString &password ) +{ + mPassword = password; +} + +TQString ResourceLDAPTDEIO::password() const +{ + return mPassword; +} + +void ResourceLDAPTDEIO::setDn( const TQString &dn ) +{ + mDn = dn; +} + +TQString ResourceLDAPTDEIO::dn() const +{ + return mDn; +} + +void ResourceLDAPTDEIO::setHost( const TQString &host ) +{ + mHost = host; +} + +TQString ResourceLDAPTDEIO::host() const +{ + return mHost; +} + +void ResourceLDAPTDEIO::setPort( int port ) +{ + mPort = port; +} + +int ResourceLDAPTDEIO::port() const +{ + return mPort; +} + +void ResourceLDAPTDEIO::setVer( int ver ) +{ + d->mVer = ver; +} + +int ResourceLDAPTDEIO::ver() const +{ + return d->mVer; +} + +void ResourceLDAPTDEIO::setSizeLimit( int sizelimit ) +{ + d->mSizeLimit = sizelimit; +} + +int ResourceLDAPTDEIO::sizeLimit() +{ + return d->mSizeLimit; +} + +void ResourceLDAPTDEIO::setTimeLimit( int timelimit ) +{ + d->mTimeLimit = timelimit; +} + +int ResourceLDAPTDEIO::timeLimit() +{ + return d->mTimeLimit; +} + +void ResourceLDAPTDEIO::setFilter( const TQString &filter ) +{ + mFilter = filter; +} + +TQString ResourceLDAPTDEIO::filter() const +{ + return mFilter; +} + +void ResourceLDAPTDEIO::setIsAnonymous( bool value ) +{ + mAnonymous = value; +} + +bool ResourceLDAPTDEIO::isAnonymous() const +{ + return mAnonymous; +} + +void ResourceLDAPTDEIO::setIsTLS( bool value ) +{ + d->mTLS = value; +} + +bool ResourceLDAPTDEIO::isTLS() const +{ + return d->mTLS; +} +void ResourceLDAPTDEIO::setIsSSL( bool value ) +{ + d->mSSL = value; +} + +bool ResourceLDAPTDEIO::isSSL() const +{ + return d->mSSL; +} + +void ResourceLDAPTDEIO::setIsSubTree( bool value ) +{ + d->mSubTree = value; +} + +bool ResourceLDAPTDEIO::isSubTree() const +{ + return d->mSubTree; +} + +void ResourceLDAPTDEIO::setAttributes( const TQMap &attributes ) +{ + mAttributes = attributes; +} + +TQMap ResourceLDAPTDEIO::attributes() const +{ + return mAttributes; +} + +void ResourceLDAPTDEIO::setRDNPrefix( int value ) +{ + d->mRDNPrefix = value; +} + +int ResourceLDAPTDEIO::RDNPrefix() const +{ + return d->mRDNPrefix; +} + +void ResourceLDAPTDEIO::setIsSASL( bool value ) +{ + d->mSASL = value; +} + +bool ResourceLDAPTDEIO::isSASL() const +{ + return d->mSASL; +} + +void ResourceLDAPTDEIO::setMech( const TQString &mech ) +{ + d->mMech = mech; +} + +TQString ResourceLDAPTDEIO::mech() const +{ + return d->mMech; +} + +void ResourceLDAPTDEIO::setRealm( const TQString &realm ) +{ + d->mRealm = realm; +} + +TQString ResourceLDAPTDEIO::realm() const +{ + return d->mRealm; +} + +void ResourceLDAPTDEIO::setBindDN( const TQString &binddn ) +{ + d->mBindDN = binddn; +} + +TQString ResourceLDAPTDEIO::bindDN() const +{ + return d->mBindDN; +} + +void ResourceLDAPTDEIO::setCachePolicy( int pol ) +{ + d->mCachePolicy = pol; +} + +int ResourceLDAPTDEIO::cachePolicy() const +{ + return d->mCachePolicy; +} + +void ResourceLDAPTDEIO::setAutoCache( bool value ) +{ + d->mAutoCache = value; +} + +bool ResourceLDAPTDEIO::autoCache() +{ + return d->mAutoCache; +} + +TQString ResourceLDAPTDEIO::cacheDst() const +{ + return d->mCacheDst; +} + + +#include "resourceldaptdeio.moc" diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeio.h b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.h new file mode 100644 index 000000000..bf1b70ec0 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.h @@ -0,0 +1,171 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCELDAP_H +#define KABC_RESOURCELDAP_H + +#include +#include +#include + +class TDEConfig; + +namespace KABC { + +class KABC_EXPORT ResourceLDAPTDEIO : public Resource +{ + Q_OBJECT + + public: + enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always }; + + ResourceLDAPTDEIO( const TDEConfig* ); + virtual ~ResourceLDAPTDEIO(); + /** + * Call this after you used one of the set... methods + */ + virtual void init(); + + virtual void writeConfig( TDEConfig* ); + + virtual bool doOpen(); + virtual void doClose(); + + virtual Ticket *requestSaveTicket(); + virtual void releaseSaveTicket( Ticket* ); + + virtual bool readOnly() const { return Resource::readOnly(); } + virtual void setReadOnly( bool value ); + + virtual bool load(); + virtual bool asyncLoad(); + virtual bool save( Ticket * ticket ); + virtual bool asyncSave( Ticket * ticket ); + + virtual void removeAddressee( const Addressee& addr ); + + void setUser( const TQString &user ); + TQString user() const; + + void setPassword( const TQString &password ); + TQString password() const; + + void setRealm( const TQString &realm ); + TQString realm() const; + + void setBindDN( const TQString &binddn ); + TQString bindDN() const; + + void setDn( const TQString &dn ); + TQString dn() const; + + void setHost( const TQString &host ); + TQString host() const; + + void setPort( int port ); + int port() const; + + void setVer( int ver ); + int ver() const; + + void setSizeLimit( int sizelimit ); + int sizeLimit(); + + void setTimeLimit( int timelimit ); + int timeLimit(); + + void setFilter( const TQString &filter ); + TQString filter() const; + + void setIsAnonymous( bool value ); + bool isAnonymous() const; + + void setAttributes( const TQMap &attributes ); + TQMap attributes() const; + + void setRDNPrefix( int value ); + int RDNPrefix() const; + + void setIsTLS( bool value ); + bool isTLS() const ; + + void setIsSSL( bool value ); + bool isSSL() const; + + void setIsSubTree( bool value ); + bool isSubTree() const ; + + void setIsSASL( bool value ); + bool isSASL() const ; + + void setMech( const TQString &mech ); + TQString mech() const; + + void setCachePolicy( int pol ); + int cachePolicy() const; + + void setAutoCache( bool value ); + bool autoCache(); + + TQString cacheDst() const; + +protected slots: + void entries( TDEIO::Job*, const TDEIO::UDSEntryList& ); + void data( TDEIO::Job*, const TQByteArray& ); + void result( TDEIO::Job* ); + void listResult( TDEIO::Job* ); + void syncLoadSaveResult( TDEIO::Job* ); + void saveResult( TDEIO::Job* ); + void saveData( TDEIO::Job*, TQByteArray& ); + void loadCacheResult( TDEIO::Job* ); + + private: + TQString mUser; + TQString mPassword; + TQString mDn; + TQString mHost; + TQString mFilter; + int mPort; + bool mAnonymous; + TQMap mAttributes; + + KURL mLDAPUrl; + int mGetCounter; //KDE 4: remove + bool mErrorOccured; //KDE 4: remove + TQString mErrorMsg; + TQMap mJobMap; //KDE 4: remove + + TDEIO::Job *loadFromCache(); + void createCache(); + void activateCache(); + void enter_loop(); + TQCString addEntry( const TQString &attr, const TQString &value, bool mod ); + TQString findUid( const TQString &uid ); + bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, + const TQString &olddn ); + + class ResourceLDAPTDEIOPrivate; + ResourceLDAPTDEIOPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp new file mode 100644 index 000000000..a6af7d065 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp @@ -0,0 +1,388 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "resourceldaptdeio.h" + +#include "resourceldaptdeioconfig.h" +#include "resourceldaptdeioconfig.moc" + +using namespace KABC; + +ResourceLDAPTDEIOConfig::ResourceLDAPTDEIOConfig( TQWidget* parent, const char* name ) + : KRES::ConfigWidget( parent, name ) +{ + TQBoxLayout *mainLayout = new TQVBoxLayout( this ); + mainLayout->setAutoAdd( true ); + cfg = new LdapConfigWidget( LdapConfigWidget::W_ALL, this ); + + mSubTree = new TQCheckBox( i18n( "Sub-tree query" ), this ); + TQHBox *box = new TQHBox( this ); + box->setSpacing( KDialog::spacingHint() ); + mEditButton = new TQPushButton( i18n( "Edit Attributes..." ), box ); + mCacheButton = new TQPushButton( i18n( "Offline Use..." ), box ); + + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editAttributes() ) ); + connect( mCacheButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCache() ) ); +} + +void ResourceLDAPTDEIOConfig::loadSettings( KRES::Resource *res ) +{ + ResourceLDAPTDEIO *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceLDAPTDEIOConfig::loadSettings(): cast failed" << endl; + return; + } + + cfg->setUser( resource->user() ); + cfg->setPassword( resource->password() ); + cfg->setRealm( resource->realm() ); + cfg->setBindDN( resource->bindDN() ); + cfg->setHost( resource->host() ); + cfg->setPort( resource->port() ); + cfg->setVer( resource->ver() ); + cfg->setTimeLimit( resource->timeLimit() ); + cfg->setSizeLimit( resource->sizeLimit() ); + cfg->setDn( resource->dn() ); + cfg->setFilter( resource->filter() ); + cfg->setMech( resource->mech() ); + if ( resource->isTLS() ) cfg->setSecTLS(); + else if ( resource->isSSL() ) cfg->setSecSSL(); + else cfg->setSecNO(); + if ( resource->isAnonymous() ) cfg->setAuthAnon(); + else if ( resource->isSASL() ) cfg->setAuthSASL(); + else cfg->setAuthSimple(); + + mSubTree->setChecked( resource->isSubTree() ); + mAttributes = resource->attributes(); + mRDNPrefix = resource->RDNPrefix(); + mCachePolicy = resource->cachePolicy(); + mCacheDst = resource->cacheDst(); + mAutoCache = resource->autoCache(); +} + +void ResourceLDAPTDEIOConfig::saveSettings( KRES::Resource *res ) +{ + ResourceLDAPTDEIO *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceLDAPTDEIOConfig::saveSettings(): cast failed" << endl; + return; + } + + resource->setUser( cfg->user() ); + resource->setPassword( cfg->password() ); + resource->setRealm( cfg->realm() ); + resource->setBindDN( cfg->bindDN() ); + resource->setHost( cfg->host() ); + resource->setPort( cfg->port() ); + resource->setVer( cfg->ver() ); + resource->setTimeLimit( cfg->timeLimit() ); + resource->setSizeLimit( cfg->sizeLimit() ); + resource->setDn( cfg->dn() ); + resource->setFilter( cfg->filter() ); + resource->setIsAnonymous( cfg->isAuthAnon() ); + resource->setIsSASL( cfg->isAuthSASL() ); + resource->setMech( cfg->mech() ); + resource->setIsTLS( cfg->isSecTLS() ); + resource->setIsSSL( cfg->isSecSSL() ); + resource->setIsSubTree( mSubTree->isChecked() ); + resource->setAttributes( mAttributes ); + resource->setRDNPrefix( mRDNPrefix ); + resource->setCachePolicy( mCachePolicy ); + resource->init(); + +} + +void ResourceLDAPTDEIOConfig::editAttributes() +{ + AttributesDialog dlg( mAttributes, mRDNPrefix, this ); + if ( dlg.exec() ) { + mAttributes = dlg.attributes(); + mRDNPrefix = dlg.rdnprefix(); + } +} + +void ResourceLDAPTDEIOConfig::editCache() +{ + LDAPUrl src; + TQStringList attr; + + src = cfg->url(); + src.setScope( mSubTree->isChecked() ? LDAPUrl::Sub : LDAPUrl::One ); + if (!mAttributes.empty()) { + TQMap::Iterator it; + TQStringList attr; + for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { + if ( !it.data().isEmpty() && it.key() != "objectClass" ) + attr.append( it.data() ); + } + src.setAttributes( attr ); + } + src.setExtension( "x-dir", "base" ); + OfflineDialog dlg( mAutoCache, mCachePolicy, src, mCacheDst, this ); + if ( dlg.exec() ) { + mCachePolicy = dlg.cachePolicy(); + mAutoCache = dlg.autoCache(); + } + +} + +AttributesDialog::AttributesDialog( const TQMap &attributes, + int rdnprefix, + TQWidget *parent, const char *name ) + : KDialogBase( Plain, i18n( "Attributes Configuration" ), Ok | Cancel, + Ok, parent, name, true, true ) +{ + mNameDict.setAutoDelete( true ); + mNameDict.insert( "objectClass", new TQString( i18n( "Object classes" ) ) ); + mNameDict.insert( "commonName", new TQString( i18n( "Common name" ) ) ); + mNameDict.insert( "formattedName", new TQString( i18n( "Formatted name" ) ) ); + mNameDict.insert( "familyName", new TQString( i18n( "Family name" ) ) ); + mNameDict.insert( "givenName", new TQString( i18n( "Given name" ) ) ); + mNameDict.insert( "organization", new TQString( i18n( "Organization" ) ) ); + mNameDict.insert( "title", new TQString( i18n( "Title" ) ) ); + mNameDict.insert( "street", new TQString( i18n( "Street" ) ) ); + mNameDict.insert( "state", new TQString( i18n( "State" ) ) ); + mNameDict.insert( "city", new TQString( i18n( "City" ) ) ); + mNameDict.insert( "postalcode", new TQString( i18n( "Postal code" ) ) ); + mNameDict.insert( "mail", new TQString( i18n( "Email" ) ) ); + mNameDict.insert( "mailAlias", new TQString( i18n( "Email alias" ) ) ); + mNameDict.insert( "phoneNumber", new TQString( i18n( "Telephone number" ) ) ); + mNameDict.insert( "telephoneNumber", new TQString( i18n( "Work telephone number" ) ) ); + mNameDict.insert( "facsimileTelephoneNumber", new TQString( i18n( "Fax number" ) ) ); + mNameDict.insert( "mobile", new TQString( i18n( "Cell phone number" ) ) ); + mNameDict.insert( "pager", new TQString( i18n( "Pager" ) ) ); + mNameDict.insert( "description", new TQString( i18n( "Note" ) ) ); + mNameDict.insert( "uid", new TQString( i18n( "UID" ) ) ); + mNameDict.insert( "jpegPhoto", new TQString( i18n( "Photo" ) ) ); + + // default map + mDefaultMap.insert( "objectClass", "inetOrgPerson" ); + mDefaultMap.insert( "commonName", "cn" ); + mDefaultMap.insert( "formattedName", "displayName" ); + mDefaultMap.insert( "familyName", "sn" ); + mDefaultMap.insert( "givenName", "givenName" ); + mDefaultMap.insert( "title", "title" ); + mDefaultMap.insert( "street", "street" ); + mDefaultMap.insert( "state", "st" ); + mDefaultMap.insert( "city", "l" ); + mDefaultMap.insert( "organization", "o" ); + mDefaultMap.insert( "postalcode", "postalCode" ); + mDefaultMap.insert( "mail", "mail" ); + mDefaultMap.insert( "mailAlias", "" ); + mDefaultMap.insert( "phoneNumber", "homePhone" ); + mDefaultMap.insert( "telephoneNumber", "telephoneNumber" ); + mDefaultMap.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); + mDefaultMap.insert( "mobile", "mobile" ); + mDefaultMap.insert( "pager", "pager" ); + mDefaultMap.insert( "description", "description" ); + mDefaultMap.insert( "uid", "uid" ); + mDefaultMap.insert( "jpegPhoto", "jpegPhoto" ); + + // overwrite the default values here + TQMap kolabMap, netscapeMap, evolutionMap, outlookMap; + + // kolab + kolabMap.insert( "formattedName", "display-name" ); + kolabMap.insert( "mailAlias", "mailalias" ); + + // evolution + evolutionMap.insert( "formattedName", "fileAs" ); + + mMapList.append( attributes ); + mMapList.append( kolabMap ); + mMapList.append( netscapeMap ); + mMapList.append( evolutionMap ); + mMapList.append( outlookMap ); + + TQFrame *page = plainPage(); + TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1, + 0, spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Template:" ), page ); + layout->addWidget( label, 0, 0 ); + mMapCombo = new KComboBox( page ); + layout->addWidget( mMapCombo, 0, 1 ); + + mMapCombo->insertItem( i18n( "User Defined" ) ); + mMapCombo->insertItem( i18n( "Kolab" ) ); + mMapCombo->insertItem( i18n( "Netscape" ) ); + mMapCombo->insertItem( i18n( "Evolution" ) ); + mMapCombo->insertItem( i18n( "Outlook" ) ); + connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) ); + + label = new TQLabel( i18n( "RDN prefix attribute:" ), page ); + layout->addWidget( label, 1, 0 ); + mRDNCombo = new KComboBox( page ); + layout->addWidget( mRDNCombo, 1, 1 ); + mRDNCombo->insertItem( i18n( "commonName" ) ); + mRDNCombo->insertItem( i18n( "UID" ) ); + mRDNCombo->setCurrentItem( rdnprefix ); + + TQMap::ConstIterator it; + int i, j = 0; + for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) { + if ( mNameDict[ it.key() ] == 0 ) { + i--; + continue; + } + if ( (uint)(i - 2) == ( mNameDict.count() >> 1 ) ) { + i = 0; + j = 2; + } + kdDebug(7125) << "itkey: " << it.key() << " i: " << i << endl; + label = new TQLabel( *mNameDict[ it.key() ] + ":", page ); + KLineEdit *lineedit = new KLineEdit( page ); + mLineEditDict.insert( it.key(), lineedit ); + lineedit->setText( it.data() ); + label->setBuddy( lineedit ); + layout->addWidget( label, i, j ); + layout->addWidget( lineedit, i, j+1 ); + } + + for ( i = 1; i < mMapCombo->count(); i++ ) { + TQDictIterator it2( mLineEditDict ); + for ( ; it2.current(); ++it2 ) { + if ( mMapList[ i ].contains( it2.currentKey() ) ) { + if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break; + } else { + if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break; + } + } + if ( !it2.current() ) { + mMapCombo->setCurrentItem( i ); + break; + } + } + + TDEAcceleratorManager::manage( this ); +} + +AttributesDialog::~AttributesDialog() +{ +} + +TQMap AttributesDialog::attributes() const +{ + TQMap map; + + TQDictIterator it( mLineEditDict ); + for ( ; it.current(); ++it ) + map.insert( it.currentKey(), it.current()->text() ); + + return map; +} + +int AttributesDialog::rdnprefix() const +{ + return mRDNCombo->currentItem(); +} + +void AttributesDialog::mapChanged( int pos ) +{ + + // apply first the default and than the spezific changes + TQMap::Iterator it; + for ( it = mDefaultMap.begin(); it != mDefaultMap.end(); ++it ) + mLineEditDict[ it.key() ]->setText( it.data() ); + + for ( it = mMapList[ pos ].begin(); it != mMapList[ pos ].end(); ++it ) { + if ( !it.data().isEmpty() ) { + KLineEdit *le = mLineEditDict[ it.key() ]; + if ( le ) le->setText( it.data() ); + } + } +} + +OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, + const TQString &dst, TQWidget *parent, const char *name ) + : KDialogBase( Plain, i18n( "Offline Configuration" ), Ok | Cancel, + Ok, parent, name, true, true ) +{ + TQFrame *page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout( page ); + layout->setAutoAdd( true ); + + mSrc = src; mDst = dst; + mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal, + i18n("Offline Cache Policy"), page ); + + TQRadioButton *bt; + new TQRadioButton( i18n("Do not use offline cache"), mCacheGroup ); + bt = new TQRadioButton( i18n("Use local copy if no connection"), mCacheGroup ); + new TQRadioButton( i18n("Always use local copy"), mCacheGroup ); + mCacheGroup->setButton( cachePolicy ); + + mAutoCache = new TQCheckBox( i18n("Refresh offline cache automatically"), + page ); + mAutoCache->setChecked( autoCache ); + mAutoCache->setEnabled( bt->isChecked() ); + + connect( bt, TQT_SIGNAL(toggled(bool)), mAutoCache, TQT_SLOT(setEnabled(bool)) ); + + TQPushButton *lcache = new TQPushButton( i18n("Load into Cache"), page ); + connect( lcache, TQT_SIGNAL( clicked() ), TQT_SLOT( loadCache() ) ); +} + +OfflineDialog::~OfflineDialog() +{ +} + +bool OfflineDialog::autoCache() const +{ + return mAutoCache->isChecked(); +} + +int OfflineDialog::cachePolicy() const +{ + return mCacheGroup->selectedId(); +} + +void OfflineDialog::loadCache() +{ + if ( TDEIO::NetAccess::download( mSrc, mDst, this ) ) { + KMessageBox::information( this, + i18n("Successfully downloaded directory server contents!") ); + } else { + KMessageBox::error( this, + i18n("An error occurred downloading directory server contents into file %1.").arg(mDst) ); + } +} diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h new file mode 100644 index 000000000..121cf639e --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h @@ -0,0 +1,118 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCELDAPCONFIG_H +#define RESOURCELDAPCONFIG_H + +#include +#include +#include +#include + +#include +#include +#include +#include + + +class TQCheckBox; +class TQPushButton; +class TQSpinBox; +class TQString; + +class KComboBox; +class KLineEdit; + +namespace KABC { + +class KABC_EXPORT ResourceLDAPTDEIOConfig : public KRES::ConfigWidget +{ + Q_OBJECT + + public: + ResourceLDAPTDEIOConfig( TQWidget* parent = 0, const char* name = 0 ); + + public slots: + void loadSettings( KRES::Resource* ); + void saveSettings( KRES::Resource* ); + + private slots: + void editAttributes(); + void editCache(); + private: + TQPushButton *mEditButton, *mCacheButton; + LdapConfigWidget *cfg; + TQCheckBox *mSubTree; + TQMap mAttributes; + int mRDNPrefix, mCachePolicy; + bool mAutoCache; + TQString mCacheDst; +}; + +class AttributesDialog : public KDialogBase +{ + Q_OBJECT + + public: + AttributesDialog( const TQMap &attributes, int rdnprefix, + TQWidget *parent, const char *name = 0 ); + ~AttributesDialog(); + + TQMap attributes() const; + int rdnprefix() const; + + private slots: + void mapChanged( int pos ); + + private: + enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap }; + + KComboBox *mMapCombo, *mRDNCombo; + TQValueList< TQMap > mMapList; + TQMap mDefaultMap; + TQDict mLineEditDict; + TQDict mNameDict; +}; + +class OfflineDialog : public KDialogBase +{ + Q_OBJECT + + public: + OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, + const TQString &dst, TQWidget *parent, const char *name = 0 ); + ~OfflineDialog(); + + int cachePolicy() const; + bool autoCache() const; + + private slots: + void loadCache(); + + private: + KURL mSrc; + TQString mDst; + TQButtonGroup *mCacheGroup; + TQCheckBox *mAutoCache; +}; + +} + +#endif diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp new file mode 100644 index 000000000..6d173eb51 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp @@ -0,0 +1,36 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourceldaptdeio.h" +#include "resourceldaptdeioconfig.h" + +#include +#include + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_ldaptdeio() + { + TDEGlobal::locale()->insertCatalogue("kabc_ldaptdeio"); + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/net/CMakeLists.txt b/tdeabc/plugins/net/CMakeLists.txt new file mode 100644 index 000000000..cc9564995 --- /dev/null +++ b/tdeabc/plugins/net/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourcenet.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES net.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_net (library) ######################## + +set( target kabc_net ) + +set( ${target}_SRCS + resourcenet.cpp resourcenetconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_net (module) ######################### + +set( target kabc_net ) + +set( ${target}_SRCS + resourcenetplugin.cpp +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK kabc_net-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/net/Makefile.am b/tdeabc/plugins/net/Makefile.am new file mode 100644 index 000000000..c2ded1b44 --- /dev/null +++ b/tdeabc/plugins/net/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcenetconfig.h + +lib_LTLIBRARIES = libkabc_net.la +libkabc_net_la_SOURCES = resourcenet.cpp resourcenetconfig.cpp +libkabc_net_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_net_la_LIBADD = $(top_builddir)/tdeabc/libkabc.la $(LIB_KIO) +libkabc_net_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +kde_module_LTLIBRARIES = kabc_net.la +kabc_net_la_SOURCES = resourcenetplugin.cpp +kabc_net_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -L../../../tdecore/.libs/ -ltdecore +kabc_net_la_LIBADD = libkabc_net.la + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_net.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourcenet.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = net.desktop + +resourcenetplugin.lo: ../../addressee.h diff --git a/tdeabc/plugins/net/net.desktop b/tdeabc/plugins/net/net.desktop new file mode 100644 index 000000000..2c72c202d --- /dev/null +++ b/tdeabc/plugins/net/net.desktop @@ -0,0 +1,90 @@ +[Desktop Entry] +Name=Network +Name[af]=Netwerk +Name[ar]=الشبكة +Name[az]=ŞəbÉ™kÉ™ +Name[be]=Сетка +Name[bn]=নেটওয়ারà§à¦• +Name[br]=Rouedad +Name[bs]=Mreža +Name[ca]=Xarxa +Name[cs]=Síť +Name[csb]=Sec +Name[cy]=Rhydwaith +Name[da]=Netværk +Name[de]=Netzwerk +Name[el]=Δίκτυο +Name[eo]=Reto +Name[es]=Red +Name[et]=Võrk +Name[eu]=Sarea +Name[fa]=شبکه +Name[fi]=Verkko +Name[fr]=Réseau +Name[fy]=Netwurk +Name[ga]=Líonra +Name[gl]=Rede +Name[he]=רשת +Name[hi]=नेटवरà¥à¤• +Name[hr]=Mreža +Name[hsb]=Syć +Name[hu]=Hálózat +Name[id]=Jaringan +Name[is]=Net +Name[it]=Rete +Name[ja]=ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ +Name[ka]=ქსელი +Name[kk]=Желі +Name[km]=បណ្ážáž¶áž‰ +Name[ko]=ë„¤íŠ¸ì›Œí¬ +Name[ku]=Tor +Name[lb]=Netzwierk +Name[lt]=Tinklas +Name[lv]=TÄ«kls +Name[mi]=Hao +Name[mk]=Мрежа +Name[mn]=СүлжÑÑ +Name[ms]=Jaringan +Name[nds]=Nettwark +Name[ne]=सञà¥à¤œà¤¾à¤² +Name[nl]=Netwerk +Name[nn]=Nettverk +Name[nso]=Kgokagano +Name[oc]=Resèu +Name[pa]=ਨੈੱਟਵਰਕ +Name[pl]=Sieć +Name[pt]=Rede +Name[pt_BR]=Rede +Name[ro]=ReÅ£ea +Name[ru]=Сеть +Name[rw]=Urusobe +Name[se]=Fierbmi +Name[sk]=SieÅ¥ +Name[sl]=Omrežje +Name[sq]=Rrjeta +Name[sr]=Мрежа +Name[sr@Latn]=Mreža +Name[ss]=Luchungechunge +Name[sv]=Nätverk +Name[ta]=பிணையம௠+Name[te]=కలన జాలం +Name[tg]=Шабака +Name[th]=ระบบเครือข่าย +Name[tr]=AÄŸ +Name[tt]=Çeltär +Name[uk]=Мережа +Name[uz]=Tarmoq +Name[uz@cyrillic]=Tarмоқ +Name[ven]=Vhukwamani +Name[vi]=mạng +Name[wa]=Rantoele +Name[xh]=Umsebenzi womnatha +Name[zh_CN]=网络 +Name[zh_HK]=網絡 +Name[zh_TW]=網路 +Name[zu]=Umsebenzi wokuxhumana okusakazekile +X-TDE-Library=kabc_net +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=net diff --git a/tdeabc/plugins/net/resourcenet.cpp b/tdeabc/plugins/net/resourcenet.cpp new file mode 100644 index 000000000..5a46890d8 --- /dev/null +++ b/tdeabc/plugins/net/resourcenet.cpp @@ -0,0 +1,393 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "formatfactory.h" +#include "resourcenetconfig.h" +#include "stdaddressbook.h" + +#include "resourcenet.h" + +using namespace KABC; + +class ResourceNet::ResourceNetPrivate +{ + public: + TDEIO::Job *mLoadJob; + bool mIsLoading; + + TDEIO::Job *mSaveJob; + bool mIsSaving; + + TQString mLastErrorString; +}; + +ResourceNet::ResourceNet( const TDEConfig *config ) + : Resource( config ), mFormat( 0 ), + mTempFile( 0 ), + d( new ResourceNetPrivate ) +{ + if ( config ) { + init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) ); + } else { + init( KURL(), TQString("vcard").latin1() ); + } +} + +ResourceNet::ResourceNet( const KURL &url, const TQString &format ) + : Resource( 0 ), mFormat( 0 ), + mTempFile( 0 ), + d( new ResourceNetPrivate ) +{ + init( url, format ); +} + +void ResourceNet::init( const KURL &url, const TQString &format ) +{ + d->mLoadJob = 0; + d->mIsLoading = false; + d->mSaveJob = 0; + d->mIsSaving = false; + + mFormatName = format; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); + if ( !mFormat ) { + mFormatName = TQString("vcard").latin1(); + mFormat = factory->format( mFormatName ); + } + + setUrl( url ); +} + +ResourceNet::~ResourceNet() +{ + if ( d->mIsLoading ) + d->mLoadJob->kill(); + if ( d->mIsSaving ) + d->mSaveJob->kill(); + + delete d; + d = 0; + + delete mFormat; + mFormat = 0; + + deleteLocalTempFile(); +} + +void ResourceNet::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + config->writePathEntry( "NetUrl", mUrl.url() ); + config->writeEntry( "NetFormat", mFormatName ); +} + +Ticket *ResourceNet::requestSaveTicket() +{ + kdDebug(5700) << "ResourceNet::requestSaveTicket()" << endl; + + return createTicket( this ); +} + +void ResourceNet::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; +} + +bool ResourceNet::doOpen() +{ + return true; +} + +void ResourceNet::doClose() +{ +} + +bool ResourceNet::load() +{ + TQString tempFile; + + if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) { + addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); + return false; + } + + TQFile file( tempFile ); + if ( !file.open( IO_ReadOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); + TDEIO::NetAccess::removeTempFile( tempFile ); + return false; + } + + bool result = clearAndLoad( &file ); + if ( !result ) + addressBook()->error( i18n( "Problems during parsing file '%1'." ).arg( tempFile ) ); + + TDEIO::NetAccess::removeTempFile( tempFile ); + + return result; +} + +bool ResourceNet::clearAndLoad( TQFile *file ) +{ + clear(); + return mFormat->loadAll( addressBook(), this, file ); +} + +bool ResourceNet::asyncLoad() +{ + if ( d->mIsLoading ) { + abortAsyncLoading(); + } + + if (d->mIsSaving) { + kdWarning(5700) << "Aborted asyncLoad() because we're still asyncSave()ing!" << endl; + return false; + } + + bool ok = createLocalTempFile(); + if ( ok ) + mTempFile->sync(); + ok = mTempFile->close(); + + if ( !ok ) { + emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); + deleteLocalTempFile(); + return false; + } + + KURL dest; + dest.setPath( mTempFile->name() ); + + TDEIO::Scheduler::checkSlaveOnHold( true ); + d->mLoadJob = TDEIO::file_copy( mUrl, dest, -1, true, false, false ); + d->mIsLoading = true; + connect( d->mLoadJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( downloadFinished( TDEIO::Job* ) ) ); + + return true; +} + +void ResourceNet::abortAsyncLoading() +{ + kdDebug(5700) << "ResourceNet::abortAsyncLoading()" << endl; + + if ( d->mLoadJob ) { + d->mLoadJob->kill(); // result not emitted + d->mLoadJob = 0; + } + + deleteLocalTempFile(); + d->mIsLoading = false; +} + +void ResourceNet::abortAsyncSaving() +{ + kdDebug(5700) << "ResourceNet::abortAsyncSaving()" << endl; + + if ( d->mSaveJob ) { + d->mSaveJob->kill(); // result not emitted + d->mSaveJob = 0; + } + + deleteLocalTempFile(); + d->mIsSaving = false; +} + +bool ResourceNet::save( Ticket* ) +{ + kdDebug(5700) << "ResourceNet::save()" << endl; + + if (d->mIsSaving) { + abortAsyncSaving(); + } + + KTempFile tempFile; + tempFile.setAutoDelete( true ); + bool ok = false; + + if ( tempFile.status() == 0 && tempFile.file() ) { + saveToFile( tempFile.file() ); + tempFile.sync(); + ok = tempFile.close(); + } + + if ( !ok ) { + addressBook()->error( i18n( "Unable to save file '%1'." ).arg( tempFile.name() ) ); + return false; + } + + ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); + if ( !ok ) + addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) ); + + return ok; +} + +bool ResourceNet::asyncSave( Ticket* ) +{ + kdDebug(5700) << "ResourceNet::asyncSave()" << endl; + + if (d->mIsSaving) { + abortAsyncSaving(); + } + + if (d->mIsLoading) { + kdWarning(5700) << "Aborted asyncSave() because we're still asyncLoad()ing!" << endl; + return false; + } + + bool ok = createLocalTempFile(); + if ( ok ) { + saveToFile( mTempFile->file() ); + mTempFile->sync(); + ok = mTempFile->close(); + } + + if ( !ok ) { + emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mTempFile->name() ) ); + deleteLocalTempFile(); + return false; + } + + KURL src; + src.setPath( mTempFile->name() ); + + TDEIO::Scheduler::checkSlaveOnHold( true ); + d->mIsSaving = true; + d->mSaveJob = TDEIO::file_copy( src, mUrl, -1, true, false, false ); + connect( d->mSaveJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( uploadFinished( TDEIO::Job* ) ) ); + + return true; +} + +bool ResourceNet::createLocalTempFile() +{ + deleteStaleTempFile(); + mTempFile = new KTempFile(); + mTempFile->setAutoDelete( true ); + return mTempFile->status() == 0; +} + +void ResourceNet::deleteStaleTempFile() +{ + if ( hasTempFile() ) { + kdDebug(5700) << "stale temp file detected " << mTempFile->name() << endl; + deleteLocalTempFile(); + } +} + +void ResourceNet::deleteLocalTempFile() +{ + delete mTempFile; + mTempFile = 0; +} + +void ResourceNet::saveToFile( TQFile *file ) +{ + mFormat->saveAll( addressBook(), this, file ); +} + +void ResourceNet::setUrl( const KURL &url ) +{ + mUrl = url; +} + +KURL ResourceNet::url() const +{ + return mUrl; +} + +void ResourceNet::setFormat( const TQString &name ) +{ + mFormatName = name; + if ( mFormat ) + delete mFormat; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +} + +TQString ResourceNet::format() const +{ + return mFormatName; +} + +void ResourceNet::downloadFinished( TDEIO::Job* ) +{ + kdDebug(5700) << "ResourceNet::downloadFinished()" << endl; + + d->mIsLoading = false; + + if ( !hasTempFile() || mTempFile->status() != 0 ) { + d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" ); + TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) ); + return; + } + + TQFile file( mTempFile->name() ); + if ( file.open( IO_ReadOnly ) ) { + if ( clearAndLoad( &file ) ) + emit loadingFinished( this ); + else + emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mTempFile->name() ) ); + } + else { + emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); + } + + deleteLocalTempFile(); +} + +void ResourceNet::uploadFinished( TDEIO::Job *job ) +{ + kdDebug(5700) << "ResourceFile::uploadFinished()" << endl; + + d->mIsSaving = false; + + if ( job->error() ) + emit savingError( this, job->errorString() ); + else + emit savingFinished( this ); + + deleteLocalTempFile(); +} + +void ResourceNet::signalError() +{ + emit loadingError( this, d->mLastErrorString ); + d->mLastErrorString.truncate( 0 ); +} + +#include "resourcenet.moc" diff --git a/tdeabc/plugins/net/resourcenet.h b/tdeabc/plugins/net/resourcenet.h new file mode 100644 index 000000000..49707081e --- /dev/null +++ b/tdeabc/plugins/net/resourcenet.h @@ -0,0 +1,117 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCENET_H +#define KABC_RESOURCENET_H + +#include + +#include + +#include + +class TQFile; +class TQTimer; +class KTempFile; + +namespace TDEIO { +class Job; +} + +namespace KABC { + +class FormatPlugin; + +/** + @internal +*/ +class KABC_EXPORT ResourceNet : public Resource +{ + Q_OBJECT + + public: + ResourceNet( const TDEConfig* ); + ResourceNet( const KURL &url, const TQString &format ); + ~ResourceNet(); + + virtual void writeConfig( TDEConfig* ); + + virtual bool doOpen(); + virtual void doClose(); + + virtual Ticket *requestSaveTicket(); + virtual void releaseSaveTicket( Ticket* ); + + virtual bool load(); + virtual bool asyncLoad(); + virtual bool save( Ticket* ticket ); + virtual bool asyncSave( Ticket* ticket ); + + /** + Set url of directory to be used for saving. + */ + void setUrl( const KURL & ); + + /** + Return url of directory used for loading and saving the address book. + */ + KURL url() const; + + /** + Sets a new format by name. + */ + void setFormat( const TQString &name ); + + /** + Returns the format name. + */ + TQString format() const; + + protected: + void init( const KURL &url, const TQString &format ); + + private slots: + void downloadFinished( TDEIO::Job* ); + void uploadFinished( TDEIO::Job* ); + void signalError(); + + private: + bool clearAndLoad( TQFile *file ); + void saveToFile( TQFile *file ); + bool hasTempFile() const { return mTempFile != 0; } + void abortAsyncLoading(); + void abortAsyncSaving(); + bool createLocalTempFile(); + void deleteLocalTempFile(); + void deleteStaleTempFile(); + + FormatPlugin *mFormat; + TQString mFormatName; + + KURL mUrl; + KTempFile *mTempFile; + + class ResourceNetPrivate; + ResourceNetPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/net/resourcenetconfig.cpp b/tdeabc/plugins/net/resourcenetconfig.cpp new file mode 100644 index 000000000..8d5903f8b --- /dev/null +++ b/tdeabc/plugins/net/resourcenetconfig.cpp @@ -0,0 +1,102 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include + +#include "formatfactory.h" +#include "resourcenet.h" +#include "stdaddressbook.h" + +#include "resourcenetconfig.h" + +using namespace KABC; + +ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name ) + : ConfigWidget( parent, name ), mInEditMode( false ) +{ + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, + KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); + mFormatBox = new KComboBox( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mFormatBox, 0, 1 ); + + label = new TQLabel( i18n( "Location:" ), this ); + mUrlEdit = new KURLRequester( this ); + mUrlEdit->setMode( KFile::File ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mUrlEdit, 1, 1 ); + + FormatFactory *factory = FormatFactory::self(); + TQStringList formats = factory->formats(); + TQStringList::Iterator it; + for ( it = formats.begin(); it != formats.end(); ++it ) { + FormatInfo *info = factory->info( *it ); + if ( info ) { + mFormatTypes << (*it); + mFormatBox->insertItem( info->nameLabel ); + } + } +} + +void ResourceNetConfig::setEditMode( bool value ) +{ + mFormatBox->setEnabled( !value ); + mInEditMode = value; +} + +void ResourceNetConfig::loadSettings( KRES::Resource *res ) +{ + ResourceNet *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceNetConfig::loadSettings(): cast failed" << endl; + return; + } + + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + + mUrlEdit->setURL( resource->url().url() ); +} + +void ResourceNetConfig::saveSettings( KRES::Resource *res ) +{ + ResourceNet *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceNetConfig::saveSettings(): cast failed" << endl; + return; + } + + if ( !mInEditMode ) + resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); + + resource->setUrl( KURL( mUrlEdit->url() ) ); +} + +#include "resourcenetconfig.moc" diff --git a/tdeabc/plugins/net/resourcenetconfig.h b/tdeabc/plugins/net/resourcenetconfig.h new file mode 100644 index 000000000..3c8986122 --- /dev/null +++ b/tdeabc/plugins/net/resourcenetconfig.h @@ -0,0 +1,53 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCENETCONFIG_H +#define RESOURCENETCONFIG_H + +#include +#include + +#include + +namespace KABC { + +class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget +{ + Q_OBJECT + + public: + ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 ); + + void setEditMode( bool value ); + + public slots: + void loadSettings( KRES::Resource *resource ); + void saveSettings( KRES::Resource *resource ); + + private: + KComboBox* mFormatBox; + KURLRequester* mUrlEdit; + + TQStringList mFormatTypes; + bool mInEditMode; +}; + +} +#endif diff --git a/tdeabc/plugins/net/resourcenetplugin.cpp b/tdeabc/plugins/net/resourcenetplugin.cpp new file mode 100644 index 000000000..189bab051 --- /dev/null +++ b/tdeabc/plugins/net/resourcenetplugin.cpp @@ -0,0 +1,32 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcenet.h" +#include "resourcenetconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_net() + { + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/sql/Makefile.am b/tdeabc/plugins/sql/Makefile.am new file mode 100644 index 000000000..3fa3986ce --- /dev/null +++ b/tdeabc/plugins/sql/Makefile.am @@ -0,0 +1,20 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcesql.h resourcesqlconfig.h + +kde_module_LTLIBRARIES = kabc_sql.la + +kabc_sql_la_SOURCES = resourcesql.cpp resourcesqlconfig.cpp + +kabc_sql_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kabc_sql_la_LIBADD = ../../libkabc.la ../../../tdeui/libtdeui.la + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_sql.pot + +linkdir = $(kde_datadir)/tderesources/contact +link_DATA = sql.desktop +EXTRA_DIST = $(link_DATA) diff --git a/tdeabc/plugins/sql/resourcesql.cpp b/tdeabc/plugins/sql/resourcesql.cpp new file mode 100644 index 000000000..e3744eeec --- /dev/null +++ b/tdeabc/plugins/sql/resourcesql.cpp @@ -0,0 +1,338 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include + +#include "resourcesql.h" +#include "resourcesqlconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_sql() + { + return new KRES::PluginFactory(); + } +} + +ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config ) + : Resource( ab ), mDb( 0 ) +{ + TQString user, password, db, host; + + user = config->readEntry( "SqlUser" ); + password = cryptStr( config->readEntry( "SqlPassword " ) ); + db = config->readEntry( "SqlName" ); + host = config->readEntry( "SqlHost" ); + + init( user, password, db, host ); +} + +ResourceSql::ResourceSql( AddressBook *ab, const TQString &user, + const TQString &password, const TQString &db, const TQString &host ) + : Resource( ab ), mDb( 0 ) +{ + init( user, password, db, host ); +} + +void ResourceSql::init( const TQString &user, const TQString &password, + const TQString &db, const TQString &host ) +{ + mUser = user; + mPassword = password; + mDbName = db; + mHost = host; +} + +Ticket *ResourceSql::requestSaveTicket() +{ + if ( !addressBook() ) { + kdDebug(5700) << "no addressbook" << endl; + return 0; + } + + return createTicket( this ); +} + +bool ResourceSql::open() +{ + TQStringList drivers = TQSqlDatabase::drivers(); + for ( TQStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) { + kdDebug(5700) << "Driver: " << (*it) << endl; + } + + mDb = TQSqlDatabase::addDatabase( "QMYSQL3" ); + + if ( !mDb ) { + kdDebug(5700) << "Error. Unable to connect to database." << endl; + return false; + } + + mDb->setDatabaseName( mDbName ); + mDb->setUserName( mUser ); + mDb->setPassword( mPassword ); + mDb->setHostName( mHost ); + + if ( !mDb->open() ) { + kdDebug(5700) << "Error. Unable to open database '" << mDbName << "'." << endl; + return false; + } + + return true; +} + +void ResourceSql::close() +{ + mDb->close(); +} + +bool ResourceSql::load() +{ + TQSqlQuery query( "select addressId, name, familyName, givenName, " + "additionalName, prefix, suffix, nickname, birthday, " + "mailer, timezone, geo_latitude, geo_longitude, title, " + "role, organization, note, productId, revision, " + "sortString, url from kaddressbook_main_" + mUser ); + + while ( query.next() ) { + TQString addrId = query.value(0).toString(); + + Addressee addr; + addr.setResource( this ); + addr.setUid( addrId ); + addr.setName( query.value(1).toString() ); + addr.setFamilyName( query.value(2).toString() ); + addr.setGivenName( query.value(3).toString() ); + addr.setAdditionalName( query.value(4).toString() ); + addr.setPrefix( query.value(5).toString() ); + addr.setSuffix( query.value(6).toString() ); + addr.setNickName( query.value(7).toString() ); + addr.setBirthday( query.value(8).toDateTime() ); + addr.setMailer( query.value(9).toString() ); + addr.setTimeZone( TimeZone( query.value(10).toInt() ) ); + addr.setGeo( Geo( query.value(11).toDouble(), query.value(12).toDouble() ) ); + addr.setTitle( query.value(13).toString() ); + addr.setRole( query.value(14).toString() ); + addr.setOrganization( query.value(15).toString() ); + addr.setNote( query.value(16).toString() ); + addr.setProductId( query.value(17).toString() ); + addr.setRevision( query.value(18).toDateTime() ); + addr.setSortString( query.value(19).toString() ); + addr.setUrl( query.value(20).toString() ); + + // emails + { + TQSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails " + "where addressId = '" + addrId + "'" ); + while ( emailsQuery.next() ) + addr.insertEmail( emailsQuery.value( 0 ).toString(), + emailsQuery.value( 1 ).toInt() ); + } + + // phones + { + TQSqlQuery phonesQuery( "select number, type from kaddressbook_phones " + "where addressId = '" + addrId + "'" ); + while ( phonesQuery.next() ) + addr.insertPhoneNumber( PhoneNumber( phonesQuery.value( 0 ).toString(), + phonesQuery.value( 1 ).toInt() ) ); + } + + // addresses + { + TQSqlQuery addressesQuery( "select postOfficeBox, extended, street, " + "locality, region, postalCode, country, label, type " + "from kaddressbook_addresses where addressId = '" + addrId + "'" ); + while ( addressesQuery.next() ) { + Address a; + a.setPostOfficeBox( addressesQuery.value(0).toString() ); + a.setExtended( addressesQuery.value(1).toString() ); + a.setStreet( addressesQuery.value(2).toString() ); + a.setLocality( addressesQuery.value(3).toString() ); + a.setRegion( addressesQuery.value(4).toString() ); + a.setPostalCode( addressesQuery.value(5).toString() ); + a.setCountry( addressesQuery.value(6).toString() ); + a.setLabel( addressesQuery.value(7).toString() ); + a.setType( addressesQuery.value(8).toInt() ); + + addr.insertAddress( a ); + } + } + + // categories + { + TQSqlQuery categoriesQuery( "select category from kaddressbook_categories " + "where addressId = '" + addrId + "'" ); + while ( categoriesQuery.next() ) + addr.insertCategory( categoriesQuery.value( 0 ).toString() ); + } + + // customs + { + TQSqlQuery customsQuery( "select app, name, value from kaddressbook_customs " + "where addressId = '" + addrId + "'" ); + while ( customsQuery.next() ) + addr.insertCustom( customsQuery.value( 0 ).toString(), + customsQuery.value( 1 ).toString(), + customsQuery.value( 2 ).toString()); + } + + addressBook()->insertAddressee( addr ); + } + + return true; +} + +bool ResourceSql::save( Ticket * ) +{ + // we have to delete all entries for this user and reinsert them + TQSqlQuery query( "select addressId from kaddressbook_main_" + mUser ); + + while ( query.next() ) { + TQString addrId = query.value( 0 ).toString(); + TQSqlQuery q; + + q.exec( "DELETE FROM kaddressbook_emails WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_phones WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_addresses WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_categories WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_customs WHERE addressId = '" + addrId + "'" ); + + q.exec( "DELETE FROM kaddressbook_main_" + mUser + " WHERE addressId = '" + addrId + "'" ); + } + + // let's start... + AddressBook::Iterator it; + for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { + if ( (*it).resource() != this && (*it).resource() != 0 ) // save only my and new entries + continue; + + TQString uid = (*it).uid(); + + query.exec( "INSERT INTO kaddressbook_main_" + mUser + " VALUES ('" + + (*it).uid() + "','" + + (*it).name() + "','" + + (*it).familyName() + "','" + + (*it).givenName() + "','" + + (*it).additionalName() + "','" + + (*it).prefix() + "','" + + (*it).suffix() + "','" + + (*it).nickName() + "','" + + (*it).birthday().toString( Qt::ISODate ) + "','" + + (*it).mailer() + "','" + + TQString::number( (*it).timeZone().offset() ) + "','" + + TQString::number( (*it).geo().latitude() ) + "','" + + TQString::number( (*it).geo().longitude() ) + "','" + + (*it).title() + "','" + + (*it).role() + "','" + + (*it).organization() + "','" + + (*it).note() + "','" + + (*it).productId() + "','" + + (*it).revision().toString( Qt::ISODate ) + "','" + + (*it).sortString() + "','" + + (*it).url().url() + "')" + ); + + // emails + { + TQStringList emails = (*it).emails(); + TQStringList::ConstIterator it; + bool preferred = true; + for( it = emails.begin(); it != emails.end(); ++it ) { + query.exec("INSERT INTO kaddressbook_emails VALUES ('" + + uid + "','" + + (*it) + "','" + + TQString::number(preferred) + "')"); + preferred = false; + } + } + + // phonenumbers + { + PhoneNumber::List phoneNumberList = (*it).phoneNumbers(); + PhoneNumber::List::ConstIterator it; + for( it = phoneNumberList.begin(); it != phoneNumberList.end(); ++it ) { + query.exec("INSERT INTO kaddressbook_phones VALUES ('" + + uid + "','" + + (*it).number() + "','" + + TQString::number( (*it).type() ) + "')"); + } + } + + // postal addresses + { + Address::List addressList = (*it).addresses(); + Address::List::ConstIterator it; + for( it = addressList.begin(); it != addressList.end(); ++it ) { + query.exec("INSERT INTO kaddressbook_addresses VALUES ('" + + uid + "','" + + (*it).postOfficeBox() + "','" + + (*it).extended() + "','" + + (*it).street() + "','" + + (*it).locality() + "','" + + (*it).region() + "','" + + (*it).postalCode() + "','" + + (*it).country() + "','" + + (*it).label() + "','" + + TQString::number( (*it).type() ) + "')"); + } + } + + // categories + { + TQStringList categories = (*it).categories(); + TQStringList::ConstIterator it; + for( it = categories.begin(); it != categories.end(); ++it ) + query.exec("INSERT INTO kaddressbook_categories VALUES ('" + + uid + "','" + + (*it) + "')"); + } + + // customs + { + TQStringList list = (*it).customs(); + TQStringList::ConstIterator it; + for( it = list.begin(); it != list.end(); ++it ) { + int dashPos = (*it).find( '-' ); + int colonPos = (*it).find( ':' ); + TQString app = (*it).left( dashPos ); + TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 ); + TQString value = (*it).right( (*it).length() - colonPos - 1 ); + + query.exec("INSERT INTO kaddressbook_categories VALUES ('" + + uid + "','" + app + "','" + name + "','" + value + "')"); + } + } + } + + return true; +} + +TQString ResourceSql::identifier() const +{ + return mHost + "_" + mDbName; +} diff --git a/tdeabc/plugins/sql/resourcesql.h b/tdeabc/plugins/sql/resourcesql.h new file mode 100644 index 000000000..770e5b73b --- /dev/null +++ b/tdeabc/plugins/sql/resourcesql.h @@ -0,0 +1,63 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCESQL_H +#define KABC_RESOURCESQL_H + +#include + +#include "addressbook.h" +#include "resource.h" + +class TQSqlDatabase; + +namespace KABC { + +class ResourceSql : public Resource +{ +public: + ResourceSql( AddressBook *ab, const TQString &user, const TQString &password, + const TQString &db, const TQString &host ); + ResourceSql( AddressBook *ab, const TDEConfig * ); + + bool open(); + void close(); + + Ticket *requestSaveTicket(); + + bool load(); + bool save( Ticket * ticket ); + + TQString identifier() const; + +private: + void init(const TQString &user, const TQString &password, + const TQString &db, const TQString &host ); + + TQString mUser; + TQString mPassword; + TQString mDbName; + TQString mHost; + + TQSqlDatabase *mDb; +}; + +} +#endif diff --git a/tdeabc/plugins/sql/resourcesqlconfig.cpp b/tdeabc/plugins/sql/resourcesqlconfig.cpp new file mode 100644 index 000000000..2f5b9d5b7 --- /dev/null +++ b/tdeabc/plugins/sql/resourcesqlconfig.cpp @@ -0,0 +1,95 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include + +#include "resource.h" +#include "resourcesqlconfig.h" + +using namespace KABC; + +ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) + : ResourceConfigWidget( parent, name ) +{ + resize( 290, 170 ); + + TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 ); + + TQLabel *label = new TQLabel( i18n( "Username:" ), this ); + mUser = new KLineEdit( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mUser, 0, 1 ); + + label = new TQLabel( i18n( "Password:" ), this ); + mPassword = new KLineEdit( this ); + mPassword->setEchoMode( KLineEdit::Password ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mPassword, 1, 1 ); + + label = new TQLabel( i18n( "Host:" ), this ); + mHost = new KLineEdit( this ); + + mainLayout->addWidget( label, 2, 0 ); + mainLayout->addWidget( mHost, 2, 1 ); + + label = new TQLabel( i18n( "Port:" ), this ); + TQVBox *box = new TQVBox(this); + mPort = new TQSpinBox(0, 65535, 1, box ); + mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); + mPort->setValue(389); + new TQWidget(box, "dummy"); + + mainLayout->addWidget( label, 3, 0 ); + mainLayout->addWidget( box, 3, 1 ); + + label = new TQLabel( i18n( "Database:" ), this ); + mDbName = new KLineEdit( this ); + + mainLayout->addWidget( label, 4, 0 ); + mainLayout->addWidget( mDbName, 4, 1 ); +} + +void ResourceSqlConfig::loadSettings( TDEConfig *config ) +{ + mUser->setText( config->readEntry( "SqlUser" ) ); + mPassword->setText( KABC::Resource::cryptStr( config->readEntry( "SqlPassword" ) ) ); + mDbName->setText( config->readEntry( "SqlName" ) ); + mHost->setText( config->readEntry( "SqlHost" ) ); + mPort->setValue( config->readNumEntry( "SqlPort" ) ); +} + +void ResourceSqlConfig::saveSettings( TDEConfig *config ) +{ + config->writeEntry( "SqlUser", mUser->text() ); + config->writeEntry( "SqlPassword", KABC::Resource::cryptStr( mPassword->text() ) ); + config->writeEntry( "SqlName", mDbName->text() ); + config->writeEntry( "SqlHost", mHost->text() ); + config->writeEntry( "SqlPort", mPort->value() ); +} + +#include "resourcesqlconfig.moc" diff --git a/tdeabc/plugins/sql/resourcesqlconfig.h b/tdeabc/plugins/sql/resourcesqlconfig.h new file mode 100644 index 000000000..ae2de7d6d --- /dev/null +++ b/tdeabc/plugins/sql/resourcesqlconfig.h @@ -0,0 +1,51 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCESQLCONFIG_H +#define RESOURCESQLCONFIG_H + +#include "resourceconfigwidget.h" + +class KLineEdit; +class TQSpinBox; + +namespace KABC { + +class ResourceSqlConfig : public ResourceConfigWidget +{ + Q_OBJECT + +public: + ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 ); + +public slots: + void loadSettings( TDEConfig *config ); + void saveSettings( TDEConfig *config ); + +private: + KLineEdit* mUser; + KLineEdit* mPassword; + KLineEdit* mDbName; + KLineEdit* mHost; + TQSpinBox* mPort; +}; + +} +#endif diff --git a/tdeabc/plugins/sql/sql.desktop b/tdeabc/plugins/sql/sql.desktop new file mode 100644 index 000000000..4ac553008 --- /dev/null +++ b/tdeabc/plugins/sql/sql.desktop @@ -0,0 +1,10 @@ +[Misc] +Name=SQL +Name[bn]=à¦à¦¸-কিউ-à¦à¦² (SQL) +Name[hi]=à¤à¤¸à¤•à¥à¤¯à¥‚à¤à¤² (SQL) +Name[ss]=I-SQL +Name[te]=à°à°¸à±à°•à±à°¯à±à°Žà°²à± + +[Plugin] +Type=sql +X-TDE-Library=kabc_sql diff --git a/tdeabc/resource.cpp b/tdeabc/resource.cpp new file mode 100644 index 000000000..9613d90b5 --- /dev/null +++ b/tdeabc/resource.cpp @@ -0,0 +1,351 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "resource.h" + +using namespace KABC; + +Ticket::Ticket( Resource *resource ) + : mResource( resource ) +{ +} + +Ticket::~Ticket() +{ +/* FIXME: avoid cycle deletion + if ( mResource ) + mResource->releaseSaveTicket( this ); +*/ +} + +Resource *Ticket::resource() +{ + return mResource; +} + +struct Resource::Iterator::IteratorData +{ + Addressee::Map::Iterator mIt; +}; + +struct Resource::ConstIterator::ConstIteratorData +{ + Addressee::Map::ConstIterator mIt; +}; + +Resource::Iterator::Iterator() +{ + d = new IteratorData; +} + +Resource::Iterator::Iterator( const Resource::Iterator &i ) +{ + d = new IteratorData; + d->mIt = i.d->mIt; +} + +Resource::Iterator &Resource::Iterator::operator=( const Resource::Iterator &i ) +{ + if ( this == &i ) + return *this; + delete d; + + d = new IteratorData; + d->mIt = i.d->mIt; + return *this; +} + +Resource::Iterator::~Iterator() +{ + delete d; +} + +const Addressee &Resource::Iterator::operator*() const +{ + return d->mIt.data(); +} + +Addressee &Resource::Iterator::operator*() +{ + return d->mIt.data(); +} + +Resource::Iterator &Resource::Iterator::operator++() +{ + (d->mIt)++; + return *this; +} + +Resource::Iterator &Resource::Iterator::operator++( int ) +{ + (d->mIt)++; + return *this; +} + +Resource::Iterator &Resource::Iterator::operator--() +{ + (d->mIt)--; + return *this; +} + +Resource::Iterator &Resource::Iterator::operator--( int ) +{ + (d->mIt)--; + return *this; +} + +bool Resource::Iterator::operator==( const Iterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool Resource::Iterator::operator!=( const Iterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + +Resource::ConstIterator::ConstIterator() +{ + d = new ConstIteratorData; +} + +Resource::ConstIterator::ConstIterator( const Resource::ConstIterator &i ) +{ + d = new ConstIteratorData; + d->mIt = i.d->mIt; +} + +Resource::ConstIterator::ConstIterator( const Resource::Iterator &i ) +{ + d = new ConstIteratorData; + d->mIt = i.d->mIt; +} + +Resource::ConstIterator &Resource::ConstIterator::operator=( const Resource::ConstIterator &i ) +{ + if ( this == &i ) + return *this; + delete d; + + d = new ConstIteratorData; + d->mIt = i.d->mIt; + return *this; +} + +Resource::ConstIterator::~ConstIterator() +{ + delete d; +} + +const Addressee &Resource::ConstIterator::operator*() const +{ + return *(d->mIt); +} + +Resource::ConstIterator &Resource::ConstIterator::operator++() +{ + (d->mIt)++; + return *this; +} + +Resource::ConstIterator &Resource::ConstIterator::operator++( int ) +{ + (d->mIt)++; + return *this; +} + +Resource::ConstIterator &Resource::ConstIterator::operator--() +{ + (d->mIt)--; + return *this; +} + +Resource::ConstIterator &Resource::ConstIterator::operator--( int ) +{ + (d->mIt)--; + return *this; +} + +bool Resource::ConstIterator::operator==( const ConstIterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool Resource::ConstIterator::operator!=( const ConstIterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + + +Resource::Resource( const TDEConfig *config ) + : KRES::Resource( config ), mAddressBook( 0 ) +{ +} + +Resource::~Resource() +{ +} + +Resource::Iterator Resource::begin() +{ + Iterator it; + it.d->mIt = mAddrMap.begin(); + + return it; +} + +Resource::ConstIterator Resource::begin() const +{ + ConstIterator it; + it.d->mIt = mAddrMap.constBegin(); + return it; +} + +Resource::Iterator Resource::end() +{ + Iterator it; + it.d->mIt = mAddrMap.end(); + + return it; +} + +Resource::ConstIterator Resource::end() const +{ + ConstIterator it; + it.d->mIt = mAddrMap.constEnd(); + return it; +} + +void Resource::writeConfig( TDEConfig *config ) +{ + KRES::Resource::writeConfig( config ); +} + +void Resource::setAddressBook( AddressBook *ab ) +{ + mAddressBook = ab; +} + +AddressBook *Resource::addressBook() +{ + return mAddressBook; +} + +Ticket *Resource::createTicket( Resource *resource ) +{ + return new Ticket( resource ); +} + +void Resource::insertAddressee( const Addressee &addr ) +{ + mAddrMap.insert( addr.uid(), addr ); +} + +void Resource::removeAddressee( const Addressee &addr ) +{ + mAddrMap.erase( addr.uid() ); +} + +Addressee Resource::findByUid( const TQString &uid ) +{ + Addressee::Map::ConstIterator it = mAddrMap.find( uid ); + + if ( it != mAddrMap.end() ) + return it.data(); + + return Addressee(); +} + +Addressee::List Resource::findByName( const TQString &name ) +{ + Addressee::List results; + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) { + if ( name == (*it).name() ) + results.append( *it ); + } + + return results; +} + +Addressee::List Resource::findByEmail( const TQString &email ) +{ + Addressee::List results; + const TQString lowerEmail = email.lower(); + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) { + const TQStringList mailList = (*it).emails(); + for ( TQStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) { + if ( lowerEmail == (*ite).lower() ) + results.append( *it ); + } + } + + return results; +} + +Addressee::List Resource::findByCategory( const TQString &category ) +{ + Addressee::List results; + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) { + if ( (*it).hasCategory( category) ) { + results.append( *it ); + } + } + + return results; +} + +void Resource::clear() +{ + mAddrMap.clear(); +} + +bool Resource::asyncLoad() +{ + bool ok = load(); + if ( !ok ) + emit loadingError( this, i18n( "Loading resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit loadingFinished( this ); + + return ok; +} + +bool Resource::asyncSave( Ticket *ticket ) { + bool ok = save( ticket ); + if ( !ok ) + emit savingError( this, i18n( "Saving resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit savingFinished( this ); + + return ok; +} + +#include "resource.moc" diff --git a/tdeabc/resource.h b/tdeabc/resource.h new file mode 100644 index 000000000..0f5167e7b --- /dev/null +++ b/tdeabc/resource.h @@ -0,0 +1,319 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCE_H +#define KABC_RESOURCE_H + +#include + +#include "addressbook.h" +#include "plugin.h" + +namespace KABC { + +/** + * @short Helper class for handling coordinated save of address books. + * + * This class is used as helper class for saving address book. + * @see requestSaveTicket(), save(). + */ +class KABC_EXPORT Ticket +{ + friend class Resource; + + public: + ~Ticket(); + + Resource *resource(); + + private: + Ticket( Resource *resource ); + + Resource *mResource; +}; + +/** + * @internal + */ +class KABC_EXPORT Resource : public KRES::Resource +{ + Q_OBJECT + + public: + + /** + @short Resource Iterator + + This class provides an iterator for resource entries. + By default it points to a TQValueList::Iterator, + but you can reimplement this class to fit your own needs. + */ + class KABC_EXPORT Iterator + { + public: + Iterator(); + Iterator( const Iterator & ); + virtual ~Iterator(); + + virtual Iterator &operator=( const Iterator & ); + virtual const Addressee &operator*() const; + virtual Addressee &operator*(); + virtual Iterator &operator++(); + virtual Iterator &operator++( int ); + virtual Iterator &operator--(); + virtual Iterator &operator--( int ); + virtual bool operator==( const Iterator &it ); + virtual bool operator!=( const Iterator &it ); + + struct IteratorData; + IteratorData *d; + }; + + /** + @short Resource Const Iterator + + This class provides a const iterator for resource entries. + */ + class KABC_EXPORT ConstIterator + { + public: + ConstIterator(); + ConstIterator( const ConstIterator & ); + ConstIterator( const Iterator & ); + virtual ~ConstIterator(); + + virtual ConstIterator &operator=( const ConstIterator & ); + virtual const Addressee &operator*() const ; + virtual ConstIterator &operator++(); + virtual ConstIterator &operator++( int ); + virtual ConstIterator &operator--(); + virtual ConstIterator &operator--( int ); + virtual bool operator==( const ConstIterator &it ); + virtual bool operator!=( const ConstIterator &it ); + + struct ConstIteratorData; + ConstIteratorData *d; + }; + + /** + Constructor. + + @param config The config object where the derived classes can + read out their settings. + */ + Resource( const TDEConfig *config ); + + /** + Destructor. + */ + virtual ~Resource(); + + /** + Returns an iterator pointing to the first addressee in the resource. + This iterator equals end() if the resource is empty. + */ + virtual ConstIterator begin() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + virtual Iterator begin(); + + /** + Returns an iterator pointing to the last addressee in the resource. + This iterator equals begin() if the resource is empty. + */ + virtual ConstIterator end() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + virtual Iterator end(); + + /** + Returns a pointer to the addressbook. + */ + AddressBook *addressBook(); + + /** + Writes the resource specific config to file. + */ + virtual void writeConfig( TDEConfig *config ); + + /** + Request a ticket, you have to pass through save() to + allow locking. The resource has to create its locks + in this function. + */ + virtual Ticket *requestSaveTicket() = 0; + + /** + Releases the ticket previousely requested with requestSaveTicket(). + The resource has to remove its locks in this function. + This function is also responsible for deleting the ticket. + */ + virtual void releaseSaveTicket( Ticket* ) = 0; + + /** + Loads all addressees synchronously. + + @returns Whether the loading was successfully. + */ + virtual bool load() = 0; + + /** + Loads all addressees asyncronously. You have to make sure that either + the loadingFinished() or loadingError() signal is emitted from within + this function. + + The default implementation simply calls the synchronous load. + + @return Whether the synchronous part of loading was successfully. + */ + virtual bool asyncLoad(); + + /** + Insert an addressee into the resource. + */ + virtual void insertAddressee( const Addressee& ); + + /** + Removes an addressee from resource. + */ + virtual void removeAddressee( const Addressee& addr ); + + /** + Saves all addressees synchronously. + + @param ticket You have to release the ticket later with + releaseSaveTicket() explicitely. + @return Whether the saving was successfully. + */ + virtual bool save( Ticket *ticket ) = 0; + + /** + Saves all addressees asynchronously. You have to make sure that either + the savingFinished() or savingError() signal is emitted from within + this function. + + The default implementation simply calls the synchronous save. + + @param ticket You have to release the ticket later with + releaseSaveTicket() explicitely. + @return Whether the saving was successfully. + */ + virtual bool asyncSave( Ticket *ticket ); + + /** + Searches an addressee with the specified unique identifier. + + @param uid The unique identifier you are looking for. + @return The addressee with the specified unique identifier or an + empty addressee. + */ + virtual Addressee findByUid( const TQString &uid ); + + /** + Searches all addressees which match the specified name. + + @param name The name you are looking for. + @return A list of all matching addressees. + */ + virtual Addressee::List findByName( const TQString &name ); + + /** + Searches all addressees which match the specified email address. + + @param email The email address you are looking for. + @return A list of all matching addressees. + */ + virtual Addressee::List findByEmail( const TQString &email ); + + /** + Searches all addressees which belongs to the specified category. + + @param category The category you are looking for. + @return A list of all matching addressees. + */ + virtual Addressee::List findByCategory( const TQString &category ); + + /** + Removes all addressees from the resource. + */ + virtual void clear(); + + /** + @internal + + Sets the address book of the resource. + */ + void setAddressBook( AddressBook* ); + + signals: + /** + This signal is emitted when the resource has finished the loading of all + addressees from the backend to the internal cache. + + @param resource The pointer to the resource which emitted this signal. + */ + void loadingFinished( Resource *resource ); + + /** + This signal is emitted when an error occured during loading the + addressees from the backend to the internal cache. + + @param resource The pointer to the resource which emitted this signal. + @param msg A translated error message. + */ + void loadingError( Resource *resource, const TQString &msg ); + + /** + This signal is emitted when the resource has finished the saving of all + addressees from the internal cache to the backend. + + @param resource The pointer to the resource which emitted this signal. + */ + void savingFinished( Resource *resource ); + + /** + This signal is emitted when an error occured during saving the + addressees from the internal cache to the backend. + + @param resource The pointer to the resource which emitted this signal. + @param msg A translated error message. + */ + void savingError( Resource *resource, const TQString &msg ); + + protected: + Ticket *createTicket( Resource * ); + Addressee::Map mAddrMap; + + private: + AddressBook *mAddressBook; + + class ResourcePrivate; + ResourcePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/resourceselectdialog.cpp b/tdeabc/resourceselectdialog.cpp new file mode 100644 index 000000000..92f770ed4 --- /dev/null +++ b/tdeabc/resourceselectdialog.cpp @@ -0,0 +1,111 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include + +#include "resource.h" +#include "addressbook.h" + +#include "resourceselectdialog.h" + +using namespace KABC; + +ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, const char *name ) + : KDialog( parent, name, true ) +{ + setCaption( i18n( "Resource Selection" ) ); + resize( 300, 200 ); + + TQVBoxLayout *mainLayout = new TQVBoxLayout( this ); + mainLayout->setMargin( marginHint() ); + + TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); + groupBox->setTitle( i18n( "Resources" ) ); + + mResourceId = new TDEListBox( groupBox ); + + mainLayout->addWidget( groupBox ); + + mainLayout->addSpacing( 10 ); + + KButtonBox *buttonBox = new KButtonBox( this ); + + buttonBox->addStretch(); + buttonBox->addButton( KStdGuiItem::ok(), TQT_TQOBJECT(this), TQT_SLOT( accept() ) ); + buttonBox->addButton( KStdGuiItem::cancel(), TQT_TQOBJECT(this), TQT_SLOT( reject() ) ); + buttonBox->layout(); + + mainLayout->addWidget( buttonBox ); + + // setup listbox + uint counter = 0; + TQPtrList list = ab->resources(); + for ( uint i = 0; i < list.count(); ++i ) { + Resource *resource = list.at( i ); + if ( resource && !resource->readOnly() ) { + mResourceMap.insert( counter, resource ); + mResourceId->insertItem( resource->resourceName() ); + counter++; + } + } + + mResourceId->setCurrentItem( 0 ); +} + +Resource *ResourceSelectDialog::resource() +{ + if ( mResourceId->currentItem() != -1 ) + return mResourceMap[ mResourceId->currentItem() ]; + else + return 0; +} + +Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent ) +{ + TQPtrList resources = ab->resources(); + if ( resources.count() == 1 ) return resources.first(); + + Resource *found = 0; + Resource *r = resources.first(); + while( r ) { + if ( !r->readOnly() ) { + if ( found ) { + found = 0; + break; + } else { + found = r; + } + } + r = resources.next(); + } + if ( found ) return found; + + ResourceSelectDialog dlg( ab, parent ); + if ( dlg.exec() == KDialog::Accepted ) return dlg.resource(); + else return 0; +} + +#include "resourceselectdialog.moc" diff --git a/tdeabc/resourceselectdialog.h b/tdeabc/resourceselectdialog.h new file mode 100644 index 000000000..f5f2d6984 --- /dev/null +++ b/tdeabc/resourceselectdialog.h @@ -0,0 +1,57 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCESELECTDIALOG_H +#define KABC_RESOURCESELECTDIALOG_H + +#include + +#include +#include + +class TDEListBox; + +namespace KABC { + +class AddressBook; +class Resource; + +/** + This class is @deprecated, use KRES::SelectDialog instead. + */ +class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog +{ + Q_OBJECT + + public: + ResourceSelectDialog( AddressBook *ab, TQWidget *parent = 0, + const char *name = 0); + Resource *resource(); + + static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 ); + + private: + TDEListBox *mResourceId; + TQMap mResourceMap; +}; + +} + +#endif diff --git a/tdeabc/scripts/Makefile.am b/tdeabc/scripts/Makefile.am new file mode 100644 index 000000000..7715fba5c --- /dev/null +++ b/tdeabc/scripts/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = $(srcdir)/makeaddressee \ + $(srcdir)/addressee.src.cpp \ + $(srcdir)/addressee.src.h \ + $(srcdir)/entrylist \ + $(srcdir)/field.src.cpp + diff --git a/tdeabc/scripts/addressee.src.cpp b/tdeabc/scripts/addressee.src.cpp new file mode 100644 index 000000000..7514b4a1d --- /dev/null +++ b/tdeabc/scripts/addressee.src.cpp @@ -0,0 +1,1127 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + Copyright (c) 2003 Carsten Pfeiffer + Copyright (c) 2005 Ingo Kloecker + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include +#include +#include + +#include "addresseehelper.h" +#include "field.h" +#include "resource.h" +#include "sortmode.h" + +#include "addressee.h" + +using namespace KABC; + +static bool matchBinaryPattern( int value, int pattern ); + +template +static bool listEquals( const TQValueList&, const TQValueList& ); +static bool emailsEquals( const TQStringList&, const TQStringList& ); + +KABC::SortMode *Addressee::mSortMode = 0; + +struct Addressee::AddresseeData : public TDEShared +{ + TQString uid; + TQString uri; + --VARIABLES-- + + PhoneNumber::List phoneNumbers; + Address::List addresses; + Key::List keys; + TQStringList emails; + TQStringList categories; + TQStringList custom; + + Resource *resource; + + bool empty :1; + bool changed :1; +}; + +Addressee::AddresseeData* Addressee::shared_null = 0; + +Addressee::AddresseeData* Addressee::makeSharedNull() +{ + Addressee::shared_null = new AddresseeData; + shared_null->_TDEShared_ref(); //just in case (we should add KSD) + shared_null->empty = true; + shared_null->changed = false; + shared_null->resource = 0; + return shared_null; +} + +Addressee::Addressee() +{ + mData = shared_null ? shared_null : makeSharedNull(); +} + +Addressee::~Addressee() +{ +} + +Addressee::Addressee( const Addressee &a ) +{ + mData = a.mData; +} + +Addressee &Addressee::operator=( const Addressee &a ) +{ + if ( this == &a ) + return (*this); + + mData = a.mData; + return (*this); +} + +void Addressee::detach() +{ + if ( mData.data() == shared_null ) { + mData = new AddresseeData; + mData->empty = true; + mData->changed = false; + mData->resource = 0; + mData->uid = TDEApplication::randomString( 10 ); + return; + } else if ( mData.count() == 1 ) return; + + AddresseeData data = *mData; + mData = new AddresseeData( data ); +} + +bool Addressee::operator==( const Addressee &a ) const +{ + if ( uid() != a.uid() ) { + kdDebug(5700) << "uid differs" << endl; + return false; + } + --EQUALSTEST-- + if ( ( mData->url.isValid() || a.mData->url.isValid() ) && + ( mData->url != a.mData->url ) ) { + kdDebug(5700) << "url differs" << endl; + return false; + } + if ( !listEquals( mData->phoneNumbers, a.mData->phoneNumbers ) ) { + kdDebug(5700) << "phoneNumbers differs" << endl; + return false; + } + if ( !listEquals( mData->addresses, a.mData->addresses ) ) { + kdDebug(5700) << "addresses differs" << endl; + return false; + } + if ( !listEquals( mData->keys, a.mData->keys ) ) { + kdDebug(5700) << "keys differs" << endl; + return false; + } + if ( !emailsEquals( mData->emails, a.mData->emails ) ) { + kdDebug(5700) << "emails differs" << endl; + return false; + } + if ( !listEquals( mData->categories, a.mData->categories ) ) { + kdDebug(5700) << "categories differs" << endl; + return false; + } + if ( !listEquals( mData->custom, a.mData->custom ) ) { + kdDebug(5700) << "custom differs" << endl; + return false; + } + + return true; +} + +bool Addressee::operator!=( const Addressee &a ) const +{ + return !( a == *this ); +} + +bool Addressee::isEmpty() const +{ + return mData->empty; +} + +void Addressee::setUid( const TQString &id ) +{ + if ( id == mData->uid ) return; + detach(); + mData->empty = false; + mData->uid = id; +} + +TQString Addressee::uid() const +{ + return mData->uid; +} + +TQString Addressee::uidLabel() +{ + return i18n("Unique Identifier"); +} + +void Addressee::setUri( const TQString &id ) +{ + if ( id == mData->uri ) return; + detach(); + mData->empty = false; + mData->uri = id; +} + +TQString Addressee::uri() const +{ + return mData->uri; +} + +TQString Addressee::uriLabel() +{ + return i18n("Unique Resource Identifier"); +} + +--DEFINITIONS-- + +void Addressee::setNameFromString( const TQString &s ) +{ + TQString str = s; + //remove enclosing quotes from string + if ( str.length() > 1 && s[ 0 ] == '"' && s[ s.length() - 1 ] == '"' ) + str = s.mid( 1, s.length() - 2 ); + + setFormattedName( str ); + setName( str ); + + // clear all name parts + setPrefix( TQString() ); + setGivenName( TQString() ); + setAdditionalName( TQString() ); + setFamilyName( TQString() ); + setSuffix( TQString() ); + + if ( str.isEmpty() ) + return; + + TQString spaceStr = " "; + TQString emptyStr = ""; + AddresseeHelper *helper = AddresseeHelper::self(); + + int i = str.find( ',' ); + if( i < 0 ) { + TQStringList parts = TQStringList::split( spaceStr, str ); + int leftOffset = 0; + int rightOffset = parts.count() - 1; + + TQString suffix; + while ( rightOffset >= 0 ) { + if ( helper->containsSuffix( parts[ rightOffset ] ) ) { + suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); + rightOffset--; + } else + break; + } + setSuffix( suffix ); + + if ( rightOffset < 0 ) + return; + + TQStringList inclusionList; + for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) { + if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) { + inclusionList.prepend( parts[ rightOffset - n ] ); + } else + break; + } + + if ( !inclusionList.isEmpty() ) { + setFamilyName( inclusionList.join( " " ) + spaceStr + parts[ rightOffset ] ); + rightOffset -= inclusionList.count(); + } else { + if ( helper->tradeAsFamilyName() ) + setFamilyName( parts[ rightOffset ] ); + else + setGivenName( parts[ rightOffset ] ); + } + + TQString prefix; + while ( leftOffset < rightOffset ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { + prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } else + break; + } + setPrefix( prefix ); + + if ( leftOffset < rightOffset ) { + setGivenName( parts[ leftOffset ] ); + leftOffset++; + } + + TQString additionalName; + while ( leftOffset < rightOffset ) { + additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } + setAdditionalName( additionalName ); + } else { + TQString part1 = str.left( i ); + TQString part2 = str.mid( i + 1 ); + + TQStringList parts = TQStringList::split( spaceStr, part1 ); + int leftOffset = 0; + int rightOffset = parts.count() - 1; + + if ( parts.count() > 0 ) { + + TQString suffix; + while ( rightOffset >= 0 ) { + if ( helper->containsSuffix( parts[ rightOffset ] ) ) { + suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); + rightOffset--; + } else + break; + } + setSuffix( suffix ); + + if ( rightOffset - 1 >= 0 && helper->containsPrefix( parts[ rightOffset - 1 ].lower() ) ) { + setFamilyName( parts[ rightOffset - 1 ] + spaceStr + parts[ rightOffset ] ); + rightOffset--; + } else + setFamilyName( parts[ rightOffset ] ); + + TQString prefix; + while ( leftOffset < rightOffset ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { + prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } else + break; + } + } else { + setPrefix( "" ); + setFamilyName( "" ); + setSuffix( "" ); + } + + parts = TQStringList::split( spaceStr, part2 ); + + leftOffset = 0; + rightOffset = parts.count(); + + if ( parts.count() > 0 ) { + + TQString prefix; + while ( leftOffset < rightOffset ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { + prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } else + break; + } + setPrefix( prefix ); + + if ( leftOffset < rightOffset ) { + setGivenName( parts[ leftOffset ] ); + leftOffset++; + } + + TQString additionalName; + while ( leftOffset < rightOffset ) { + additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } + setAdditionalName( additionalName ); + } else { + setGivenName( "" ); + setAdditionalName( "" ); + } + } +} + +TQString Addressee::realName() const +{ + TQString n( formattedName() ); + if ( !n.isEmpty() ) + return n; + + n = assembledName(); + if ( !n.isEmpty() ) + return n; + + n = name(); + if ( !n.isEmpty() ) + return n; + + return organization(); +} + +TQString Addressee::assembledName() const +{ + TQString name = prefix() + " " + givenName() + " " + additionalName() + " " + + familyName() + " " + suffix(); + + return name.simplifyWhiteSpace(); +} + +TQString Addressee::fullEmail( const TQString &email ) const +{ + TQString e; + if ( email.isNull() ) { + e = preferredEmail(); + } else { + e = email; + } + if ( e.isEmpty() ) return TQString(); + + TQString text; + if ( realName().isEmpty() ) + text = e; + else { + TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ); + if ( realName().find( needQuotes ) != -1 ) { + TQString name = realName(); + name.replace( "\"", "\\\"" ); + text = "\"" + name + "\" <" + e + ">"; + } else + text = realName() + " <" + e + ">"; + } + + return text; +} + +void Addressee::insertEmail( const TQString &email, bool preferred ) +{ + if ( email.simplifyWhiteSpace().isEmpty() ) + return; + + detach(); + mData->empty = false; + + TQStringList::Iterator it = mData->emails.find( email ); + + if ( it != mData->emails.end() ) { + if ( !preferred || it == mData->emails.begin() ) return; + mData->emails.remove( it ); + mData->emails.prepend( email ); + } else { + if ( preferred ) { + mData->emails.prepend( email ); + } else { + mData->emails.append( email ); + } + } +} + +void Addressee::removeEmail( const TQString &email ) +{ + detach(); + + TQStringList::Iterator it = mData->emails.find( email ); + if ( it == mData->emails.end() ) return; + + mData->emails.remove( it ); +} + +TQString Addressee::preferredEmail() const +{ + if ( mData->emails.count() == 0 ) return TQString(); + else return mData->emails.first(); +} + +TQStringList Addressee::emails() const +{ + return mData->emails; +} +void Addressee::setEmails( const TQStringList& emails ) { + detach(); + + mData->emails = emails; +} +void Addressee::insertPhoneNumber( const PhoneNumber &phoneNumber ) +{ + detach(); + mData->empty = false; + + PhoneNumber::List::Iterator it; + for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { + if ( (*it).id() == phoneNumber.id() ) { + *it = phoneNumber; + return; + } + } + if ( !phoneNumber.number().simplifyWhiteSpace().isEmpty() ) + mData->phoneNumbers.append( phoneNumber ); +} + +void Addressee::removePhoneNumber( const PhoneNumber &phoneNumber ) +{ + detach(); + + PhoneNumber::List::Iterator it; + for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { + if ( (*it).id() == phoneNumber.id() ) { + mData->phoneNumbers.remove( it ); + return; + } + } +} + +PhoneNumber Addressee::phoneNumber( int type ) const +{ + PhoneNumber phoneNumber( "", type ); + PhoneNumber::List::ConstIterator it; + for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + if ( (*it).type() & PhoneNumber::Pref ) + return (*it); + else if ( phoneNumber.number().isEmpty() ) + phoneNumber = (*it); + } + } + + return phoneNumber; +} + +PhoneNumber::List Addressee::phoneNumbers() const +{ + return mData->phoneNumbers; +} + +PhoneNumber::List Addressee::phoneNumbers( int type ) const +{ + PhoneNumber::List list; + + PhoneNumber::List::ConstIterator it; + for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + list.append( *it ); + } + } + return list; +} + +PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const +{ + PhoneNumber::List::ConstIterator it; + for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { + if ( (*it).id() == id ) { + return *it; + } + } + return PhoneNumber(); +} + +void Addressee::insertKey( const Key &key ) +{ + detach(); + mData->empty = false; + + Key::List::Iterator it; + for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { + if ( (*it).id() == key.id() ) { + *it = key; + return; + } + } + mData->keys.append( key ); +} + +void Addressee::removeKey( const Key &key ) +{ + detach(); + + Key::List::Iterator it; + for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { + if ( (*it).id() == key.id() ) { + mData->keys.remove( key ); + return; + } + } +} + +Key Addressee::key( int type, TQString customTypeString ) const +{ + Key::List::ConstIterator it; + for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { + if ( (*it).type() == type ) { + if ( type == Key::Custom ) { + if ( customTypeString.isEmpty() ) { + return *it; + } else { + if ( (*it).customTypeString() == customTypeString ) + return (*it); + } + } else { + return *it; + } + } + } + return Key( TQString(), type ); +} + +void Addressee::setKeys( const Key::List& list ) +{ + detach(); + mData->keys = list; +} + +Key::List Addressee::keys() const +{ + return mData->keys; +} + +Key::List Addressee::keys( int type, TQString customTypeString ) const +{ + Key::List list; + + Key::List::ConstIterator it; + for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { + if ( (*it).type() == type ) { + if ( type == Key::Custom ) { + if ( customTypeString.isEmpty() ) { + list.append( *it ); + } else { + if ( (*it).customTypeString() == customTypeString ) + list.append( *it ); + } + } else { + list.append( *it ); + } + } + } + return list; +} + +Key Addressee::findKey( const TQString &id ) const +{ + Key::List::ConstIterator it; + for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { + if ( (*it).id() == id ) { + return *it; + } + } + return Key(); +} + +TQString Addressee::asString() const +{ + return "Smith, agent Smith..."; +} + +void Addressee::dump() const +{ + kdDebug(5700) << "Addressee {" << endl; + + kdDebug(5700) << " Uid: '" << uid() << "'" << endl; + + --DEBUG-- + + kdDebug(5700) << " Emails {" << endl; + const TQStringList e = emails(); + TQStringList::ConstIterator it; + for( it = e.begin(); it != e.end(); ++it ) { + kdDebug(5700) << " " << (*it) << endl; + } + kdDebug(5700) << " }" << endl; + + kdDebug(5700) << " PhoneNumbers {" << endl; + const PhoneNumber::List p = phoneNumbers(); + PhoneNumber::List::ConstIterator it2; + for( it2 = p.begin(); it2 != p.end(); ++it2 ) { + kdDebug(5700) << " Type: " << int((*it2).type()) << " Number: " << (*it2).number() << endl; + } + kdDebug(5700) << " }" << endl; + + const Address::List a = addresses(); + Address::List::ConstIterator it3; + for( it3 = a.begin(); it3 != a.end(); ++it3 ) { + (*it3).dump(); + } + + kdDebug(5700) << " Keys {" << endl; + const Key::List k = keys(); + Key::List::ConstIterator it4; + for( it4 = k.begin(); it4 != k.end(); ++it4 ) { + kdDebug(5700) << " Type: " << int((*it4).type()) << + " Key: " << (*it4).textData() << + " CustomString: " << (*it4).customTypeString() << endl; + } + kdDebug(5700) << " }" << endl; + + kdDebug(5700) << "}" << endl; +} + + +void Addressee::insertAddress( const Address &address ) +{ + if ( address.isEmpty() ) + return; + + detach(); + mData->empty = false; + + Address::List::Iterator it; + for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { + if ( (*it).id() == address.id() ) { + *it = address; + return; + } + } + + mData->addresses.append( address ); +} + +void Addressee::removeAddress( const Address &address ) +{ + detach(); + + Address::List::Iterator it; + for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { + if ( (*it).id() == address.id() ) { + mData->addresses.remove( it ); + return; + } + } +} + +Address Addressee::address( int type ) const +{ + Address address( type ); + Address::List::ConstIterator it; + for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + if ( (*it).type() & Address::Pref ) + return (*it); + else if ( address.isEmpty() ) + address = (*it); + } + } + + return address; +} + +Address::List Addressee::addresses() const +{ + return mData->addresses; +} + +Address::List Addressee::addresses( int type ) const +{ + Address::List list; + + Address::List::ConstIterator it; + for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + list.append( *it ); + } + } + + return list; +} + +Address Addressee::findAddress( const TQString &id ) const +{ + Address::List::ConstIterator it; + for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { + if ( (*it).id() == id ) { + return *it; + } + } + return Address(); +} + +void Addressee::insertCategory( const TQString &c ) +{ + detach(); + mData->empty = false; + + if ( mData->categories.findIndex( c ) != -1 ) return; + + mData->categories.append( c ); +} + +void Addressee::removeCategory( const TQString &c ) +{ + detach(); + + TQStringList::Iterator it = mData->categories.find( c ); + if ( it == mData->categories.end() ) return; + + mData->categories.remove( it ); +} + +bool Addressee::hasCategory( const TQString &c ) const +{ + return ( mData->categories.findIndex( c ) != -1 ); +} + +void Addressee::setCategories( const TQStringList &c ) +{ + detach(); + mData->empty = false; + + mData->categories = c; +} + +TQStringList Addressee::categories() const +{ + return mData->categories; +} + +void Addressee::insertCustom( const TQString &app, const TQString &name, + const TQString &value ) +{ + if ( value.isEmpty() || name.isEmpty() || app.isEmpty() ) return; + + detach(); + mData->empty = false; + + TQString qualifiedName = app + "-" + name + ":"; + + TQStringList::Iterator it; + for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { + if ( (*it).startsWith( qualifiedName ) ) { + (*it) = qualifiedName + value; + return; + } + } + + mData->custom.append( qualifiedName + value ); +} + +void Addressee::removeCustom( const TQString &app, const TQString &name) +{ + detach(); + + TQString qualifiedName = app + "-" + name + ":"; + + TQStringList::Iterator it; + for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { + if ( (*it).startsWith( qualifiedName ) ) { + mData->custom.remove( it ); + return; + } + } +} + +TQString Addressee::custom( const TQString &app, const TQString &name ) const +{ + TQString qualifiedName = app + "-" + name + ":"; + TQString value; + + TQStringList::ConstIterator it; + for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) { + if ( (*it).startsWith( qualifiedName ) ) { + value = (*it).mid( (*it).find( ":" ) + 1 ); + break; + } + } + + return value; +} + +void Addressee::setCustoms( const TQStringList &l ) +{ + detach(); + mData->empty = false; + + mData->custom = l; +} + +TQStringList Addressee::customs() const +{ + return mData->custom; +} + +void Addressee::parseEmailAddress( const TQString &rawEmail, TQString &fullName, + TQString &email) +{ + // This is a simplified version of KPIM::splitAddress(). + + fullName = ""; + email = ""; + if ( rawEmail.isEmpty() ) + return; // KPIM::AddressEmpty; + + // The code works on 8-bit strings, so convert the input to UTF-8. + TQCString address = rawEmail.utf8(); + + TQCString displayName; + TQCString addrSpec; + TQCString comment; + + // The following is a primitive parser for a mailbox-list (cf. RFC 2822). + // The purpose is to extract a displayable string from the mailboxes. + // Comments in the addr-spec are not handled. No error checking is done. + + enum { TopLevel, InComment, InAngleAddress } context = TopLevel; + bool inQuotedString = false; + int commentLevel = 0; + bool stop = false; + + for ( char* p = address.data(); *p && !stop; ++p ) { + switch ( context ) { + case TopLevel : { + switch ( *p ) { + case '"' : inQuotedString = !inQuotedString; + displayName += *p; + break; + case '(' : if ( !inQuotedString ) { + context = InComment; + commentLevel = 1; + } + else + displayName += *p; + break; + case '<' : if ( !inQuotedString ) { + context = InAngleAddress; + } + else + displayName += *p; + break; + case '\\' : // quoted character + displayName += *p; + ++p; // skip the '\' + if ( *p ) + displayName += *p; + else + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + break; + case ',' : if ( !inQuotedString ) { + //if ( allowMultipleAddresses ) + // stop = true; + //else + // return KPIM::UnexpectedComma; + goto ABORT_PARSING; + } + else + displayName += *p; + break; + default : displayName += *p; + } + break; + } + case InComment : { + switch ( *p ) { + case '(' : ++commentLevel; + comment += *p; + break; + case ')' : --commentLevel; + if ( commentLevel == 0 ) { + context = TopLevel; + comment += ' '; // separate the text of several comments + } + else + comment += *p; + break; + case '\\' : // quoted character + comment += *p; + ++p; // skip the '\' + if ( *p ) + comment += *p; + else + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + break; + default : comment += *p; + } + break; + } + case InAngleAddress : { + switch ( *p ) { + case '"' : inQuotedString = !inQuotedString; + addrSpec += *p; + break; + case '>' : if ( !inQuotedString ) { + context = TopLevel; + } + else + addrSpec += *p; + break; + case '\\' : // quoted character + addrSpec += *p; + ++p; // skip the '\' + if ( *p ) + addrSpec += *p; + else + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + break; + default : addrSpec += *p; + } + break; + } + } // switch ( context ) + } + +ABORT_PARSING: + displayName = displayName.stripWhiteSpace(); + comment = comment.stripWhiteSpace(); + addrSpec = addrSpec.stripWhiteSpace(); + + fullName = TQString::fromUtf8( displayName ); + email = TQString::fromUtf8( addrSpec ); + + // check for errors + if ( inQuotedString ) + return; // KPIM::UnbalancedQuote; + if ( context == InComment ) + return; // KPIM::UnbalancedParens; + if ( context == InAngleAddress ) + return; // KPIM::UnclosedAngleAddr; + + if ( addrSpec.isEmpty() ) { + if ( displayName.isEmpty() ) + return; // KPIM::NoAddressSpec; + else { + //addrSpec = displayName; + //displayName.truncate( 0 ); + // Address of the form "foo@bar" or "foo@bar (Name)". + email = fullName; + fullName = TQString::fromUtf8( comment ); + } + } + + // Check that we do not have any extra characters on the end of the + // strings + unsigned int len = fullName.length(); + if ( fullName[ 0 ] == '"' && fullName[ len - 1 ] == '"' ) + fullName = fullName.mid( 1, len - 2 ); +} + +void Addressee::setResource( Resource *resource ) +{ + detach(); + mData->resource = resource; +} + +Resource *Addressee::resource() const +{ + return mData->resource; +} + +void Addressee::setChanged( bool value ) +{ + detach(); + mData->changed = value; +} + +bool Addressee::changed() const +{ + return mData->changed; +} + +void Addressee::setSortMode( KABC::SortMode *mode ) +{ + mSortMode = mode; +} + +bool Addressee::operator< ( const Addressee &addr ) +{ + if ( !mSortMode ) + return false; + else + return mSortMode->lesser( *this, addr ); +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Addressee &a ) +{ + if (!a.mData) return s; + + s << a.uid(); + + --STREAMOUT-- + s << a.mData->phoneNumbers; + s << a.mData->addresses; + s << a.mData->emails; + s << a.mData->categories; + s << a.mData->custom; + s << a.mData->keys; + return s; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Addressee &a ) +{ + if (!a.mData) + return s; + + a.detach(); + + s >> a.mData->uid; + + --STREAMIN-- + s >> a.mData->phoneNumbers; + s >> a.mData->addresses; + s >> a.mData->emails; + s >> a.mData->categories; + s >> a.mData->custom; + s >> a.mData->keys; + + a.mData->empty = false; + + return s; +} + +bool matchBinaryPattern( int value, int pattern ) +{ + /** + We want to match all telephonnumbers/addresses which have the bits in the + pattern set. More are allowed. + if pattern == 0 we have a special handling, then we want only those with + exactly no bit set. + */ + if ( pattern == 0 ) + return ( value == 0 ); + else + return ( pattern == ( pattern & value ) ); +} + +template +bool listEquals( const TQValueList &list, const TQValueList &pattern ) +{ + if ( list.count() != pattern.count() ) + return false; + + for ( uint i = 0; i < list.count(); ++i ) + if ( pattern.find( list[ i ] ) == pattern.end() ) + return false; + + return true; +} + +bool emailsEquals( const TQStringList &list, const TQStringList &pattern ) +{ + if ( list.count() != pattern.count() ) + return false; + + if ( list.first() != pattern.first() ) + return false; + + TQStringList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) + if ( pattern.find( *it ) == pattern.end() ) + return false; + + return true; +} diff --git a/tdeabc/scripts/addressee.src.h b/tdeabc/scripts/addressee.src.h new file mode 100644 index 000000000..9cadfd41e --- /dev/null +++ b/tdeabc/scripts/addressee.src.h @@ -0,0 +1,407 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEE_H +#define KABC_ADDRESSEE_H + +#include +#include +#include +#include + +#include +#include + +#include "address.h" +#include "agent.h" +#include "geo.h" +#include "key.h" +#include "phonenumber.h" +#include "picture.h" +#include "secrecy.h" +#include "sound.h" +#include "timezone.h" + +namespace KABC { + +class Resource; +class Field; +class SortMode; + +/** + @short address book entry + + This class represents an entry in the address book. + + The data of this class is implicitly shared. You can pass this class by value. + + If you need the name of a field for presenting it to the user you should use + the functions ending in Label(). They return a translated string which can be + used as label for the corresponding field. + + About the name fields: + + givenName() is the first name and familyName() the last name. In some + countries the family name comes first, that's the reason for the + naming. formattedName() is the full name with the correct formatting. + It is used as an override, when the correct formatting can't be generated + from the other name fields automatically. + + realName() returns a fully formatted name(). It uses formattedName, if set, + otherwise it constucts the name from the name fields. As fallback, if + nothing else is set it uses name(). + + name() is the NAME type of RFC2426. It can be used as internal name for the + data enty, but shouldn't be used for displaying the data to the user. + */ +class KABC_EXPORT Addressee +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); + + public: + typedef TQValueList List; + typedef TQMap Map; + + /** + Construct an empty address book entry. + */ + Addressee(); + ~Addressee(); + + Addressee( const Addressee & ); + Addressee &operator=( const Addressee & ); + + bool operator==( const Addressee & ) const; + bool operator!=( const Addressee & ) const; + + /** + Return, if the address book entry is empty. + */ + bool isEmpty() const; + + /** + Set unique identifier. + */ + void setUid( const TQString &uid ); + /** + Return unique identifier. + */ + TQString uid() const; + /** + Return translated label for uid field. + */ + static TQString uidLabel(); + + /** + Set unique resource identifier. + */ + void setUri( const TQString &uid ); + /** + Return unique resource identifier. + */ + TQString uri() const; + /** + Return translated label for uri field. + */ + static TQString uriLabel(); + + --DECLARATIONS-- + /** + Set name fields by parsing the given string and trying to associate the + parts of the string with according fields. This function should probably + be a bit more clever. + */ + void setNameFromString( const TQString & ); + + /** + Return the name of the addressee. This is calculated from all the name + fields. + */ + TQString realName() const; + + /** + Return the name that consists of all name parts. + */ + TQString assembledName() const; + + /** + Return email address including real name. + + @param email Email address to be used to construct the full email string. + If this is TQString::null the preferred email address is used. + */ + TQString fullEmail( const TQString &email=TQString::null ) const; + + /** + Insert an email address. If the email address already exists in this + addressee it is not duplicated. + + @param email Email address + @param preferred Set to true, if this is the preferred email address of + the addressee. + */ + void insertEmail( const TQString &email, bool preferred=false ); + + /** + Remove email address. If the email address doesn't exist, nothing happens. + */ + void removeEmail( const TQString &email ); + + /** + Return preferred email address. This is the first email address or the + last one added with insertEmail() with a set preferred parameter. + */ + TQString preferredEmail() const; + + /** + Return list of all email addresses. + */ + TQStringList emails() const; + + /** + Set the emails to @p list. + The first email address gets the preferred one! + @param list The list of email addresses. + */ + void setEmails( const TQStringList& list); + + /** + Insert a phone number. If a phone number with the same id already exists + in this addressee it is not duplicated. + */ + void insertPhoneNumber( const PhoneNumber &phoneNumber ); + + /** + Remove phone number. If no phone number with the given id exists for this + addresse nothing happens. + */ + void removePhoneNumber( const PhoneNumber &phoneNumber ); + + /** + Return phone number, which matches the given type. + */ + PhoneNumber phoneNumber( int type ) const; + + /** + Return list of all phone numbers. + */ + PhoneNumber::List phoneNumbers() const; + + /** + Return list of phone numbers with a special type. + */ + PhoneNumber::List phoneNumbers( int type ) const; + + /** + Return phone number with the given id. + */ + PhoneNumber findPhoneNumber( const TQString &id ) const; + + /** + Insert a key. If a key with the same id already exists + in this addressee it is not duplicated. + */ + void insertKey( const Key &key ); + + /** + Remove a key. If no key with the given id exists for this + addresse nothing happens. + */ + void removeKey( const Key &key ); + + /** + Return key, which matches the given type. + If @p type == Key::Custom you can specify a string + that should match. If you leave the string empty, the first + key with a custom value is returned. + */ + Key key( int type, TQString customTypeString = TQString::null ) const; + + /** + Return list of all keys. + */ + Key::List keys() const; + + /** + Set the list of keys + @param keys The keys to be set. + */ + void setKeys( const Key::List& keys); + + /** + Return list of keys with a special type. + If @p type == Key::Custom you can specify a string + that should match. If you leave the string empty, all custom + keys will be returned. + */ + Key::List keys( int type, TQString customTypeString = TQString::null ) const; + + /** + Return key with the given id. + */ + Key findKey( const TQString &id ) const; + + /** + Insert an address. If an address with the same id already exists + in this addressee it is not duplicated. + */ + void insertAddress( const Address &address ); + + /** + Remove address. If no address with the given id exists for this + addresse nothing happens. + */ + void removeAddress( const Address &address ); + + /** + Return address, which matches the given type. + */ + Address address( int type ) const; + + /** + Return list of all addresses. + */ + Address::List addresses() const; + + /** + Return list of addresses with a special type. + */ + Address::List addresses( int type ) const; + + /** + Return address with the given id. + */ + Address findAddress( const TQString &id ) const; + + /** + Insert category. If the category already exists it is not duplicated. + */ + void insertCategory( const TQString & ); + + /** + Remove category. + */ + void removeCategory( const TQString & ); + + /** + Return, if addressee has the given category. + */ + bool hasCategory( const TQString & ) const; + + /** + Set categories to given value. + */ + void setCategories( const TQStringList & ); + + /** + Return list of all set categories. + */ + TQStringList categories() const; + + /** + Insert custom entry. The entry is identified by the name of the inserting + application and a unique name. If an entry with the given app and name + already exists its value is replaced with the new given value. + + An empty value isn't allowed (nothing happens if this is called with + any of the three arguments being empty) + */ + void insertCustom( const TQString &app, const TQString &name, + const TQString &value ); + + /** + Remove custom entry. + */ + void removeCustom( const TQString &app, const TQString &name ); + + /** + Return value of custom entry, identified by app and entry name. + */ + TQString custom( const TQString &app, const TQString &name ) const; + + /** + Set all custom entries. + */ + void setCustoms( const TQStringList & ); + + /** + Return list of all custom entries. + */ + TQStringList customs() const; + + /** + Parse full email address. The result is given back in fullName and email. + */ + static void parseEmailAddress( const TQString &rawEmail, TQString &fullName, + TQString &email ); + + /** + Debug output. + */ + void dump() const; + + /** + Returns string representation of the addressee. + */ + TQString asString() const; + + /** + Set resource where the addressee is from. + */ + void setResource( Resource *resource ); + + /** + Return pointer to resource. + */ + Resource *resource() const; + + /** + Mark addressee as changed. + */ + void setChanged( bool value ); + + /** + Return whether the addressee is changed. + */ + bool changed() const; + + static void setSortMode( KABC::SortMode *mode ); + + bool operator< ( const Addressee &addr ); + + private: + void detach(); + + struct AddresseeData; + mutable TDESharedPtr mData; + + private: + static AddresseeData* shared_null; + static AddresseeData* makeSharedNull(); + static KABC::SortMode *mSortMode; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); + +} + +#endif diff --git a/tdeabc/scripts/createisomap.pl b/tdeabc/scripts/createisomap.pl new file mode 100755 index 000000000..897cd4896 --- /dev/null +++ b/tdeabc/scripts/createisomap.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl +# +# Create a translation table countryname->iso-code from the entry.desktop +# files in tdebase/l10n/*/ +# +# USAGE EXAMPLE: +# ./createisomap.pl $TDEDIR/share/locale/l10n > countrytransl.map +# +# Don't laugh at me. I put this together with an old perl book, perl +# being a language I've never used before. + +@entries = <$ARGV[0]/*/entry.desktop>; +chomp @entries; +foreach $entry (@entries) { + local ( $entryiso, @entryfile, @mappings ); + # print "--> $entry\n"; + $entryiso = $entry; + $entryiso =~ s/$ARGV[0]\///; + $entryiso =~ s/\/entry\.desktop//; + # print " $entryiso\n"; + open (IN, $entry); + @entryfile = ; + close IN; + chomp @entryfile; + foreach $entryfileline (@entryfile) { + if ( $entryfileline =~ /^Name.*=(.*)$/ ) { + # push (@mappings, $1 . "\t" . $entryiso ); + print "$1\t$entryiso\n"; + } + } +} + +# add some convenience entries which aren't part of the entry.desktop files + +print "Czech Republic\tcz\n"; diff --git a/tdeabc/scripts/entrylist b/tdeabc/scripts/entrylist new file mode 100644 index 000000000..87c342a06 --- /dev/null +++ b/tdeabc/scripts/entrylist @@ -0,0 +1,82 @@ +# This file describes the fields of an address book entry. +# +# The following comma-separated fields are used: +# +# Control: A generates accessor functions. +# L generates a static function for returning a tranlsated label +# F generates a Field id and object for generic field handling +# E generate an equality test in Addressee::operator==(). +# Field Name : A descriptive name which is shown to the user. +# Comment : A comment helping translators to understand the field name +# Type : C++ type of field. +# Identifier : A string used in code as variable name etc. +# Field Category : Categories the field belongs to (see Field::FieldCategory). +# Output function: Function used to convert type to string for debug output (optional) + +ALE,name,,TQString,name + +ALFE,formatted name,,TQString,formattedName,Frequent + +ALFE,family name,,TQString,familyName,Frequent +ALFE,given name,,TQString,givenName,Frequent +ALFE,additional names,,TQString,additionalName +ALFE,honorific prefixes,,TQString,prefix +ALFE,honorific suffixes,,TQString,suffix + +ALFE,nick name,,TQString,nickName,Personal + +ALFE,birthday,,TQDateTime,birthday,Personal,.toString() + +#Address address +LF,home address street,,TQString,homeAddressStreet,Address|Personal +LF,home address city,,TQString,homeAddressLocality,Address|Personal +LF,home address state,,TQString,homeAddressRegion,Address|Personal +LF,home address zip code,,TQString,homeAddressPostalCode,Address|Personal +LF,home address country,,TQString,homeAddressCountry,Address|Personal +LF,home address label,,TQString,homeAddressLabel,Address|Personal + +LF,business address street,,TQString,businessAddressStreet,Address|Organization +LF,business address city,,TQString,businessAddressLocality,Address|Organization +LF,business address state,,TQString,businessAddressRegion,Address|Organization +LF,business address zip code,,TQString,businessAddressPostalCode,Address|Organization +LF,business address country,,TQString,businessAddressCountry,Address|Organization +LF,business address label,,TQString,businessAddressLabel,Address|Organization + +#phoneNumbers +LF,home phone,,TQString,homePhone,Personal|Frequent +LF,business phone,,TQString,businessPhone,Organization|Frequent +LF,mobile phone,,TQString,mobilePhone,Frequent +LF,home fax,,TQString,homeFax +LF,business fax,,TQString,businessFax +LF,car phone,,TQString,carPhone +LF,ISDN,,TQString,isdn +LF,pager,,TQString,pager + +#emails +LF,email address,,TQString,email,Email|Frequent + +ALFE,mail client,,TQString,mailer,Email + +ALE,time zone,,TimeZone,timeZone,,.asString() +ALE,geographic position,,Geo,geo,,.asString() + +ALFE,title,person,TQString,title,Organization +ALFE,role,person in organization,TQString,role,Organization +ALFE,organization,,TQString,organization,Organization +ALFE,department,,TQString,department,Organization + +ALFE,note,,TQString,note + +ALE,product identifier,,TQString,productId +ALE,revision date,,TQDateTime,revision,,.toString() + +ALE,sort string,,TQString,sortString + +ALF,homepage,,KURL,url,,.url() + +ALE,security class,,Secrecy,secrecy,,.asString() + +ALE,logo,,Picture,logo,,.asString() +ALE,photo,,Picture,photo,,.asString() +ALE,sound,,Sound,sound,,.asString() +ALE,agent,,Agent,agent,,.asString() diff --git a/tdeabc/scripts/field.src.cpp b/tdeabc/scripts/field.src.cpp new file mode 100644 index 000000000..bec318880 --- /dev/null +++ b/tdeabc/scripts/field.src.cpp @@ -0,0 +1,512 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "field.h" +#include "address.h" + +using namespace KABC; + +class Field::FieldImpl +{ + public: + FieldImpl( int fieldId, int category = 0, + const TQString &label = TQString::null, + const TQString &key = TQString::null, + const TQString &app = TQString::null ) + : mFieldId( fieldId ), mCategory( category ), mLabel( label ), + mKey( key ), mApp( app ) {} + + enum FieldId + { + CustomField, + --ENUMS-- + }; + + int fieldId() { return mFieldId; } + int category() { return mCategory; } + + TQString label() { return mLabel; } + TQString key() { return mKey; } + TQString app() { return mApp; } + + private: + int mFieldId; + int mCategory; + + TQString mLabel; + TQString mKey; + TQString mApp; +}; + + +Field::List Field::mAllFields; +Field::List Field::mDefaultFields; +Field::List Field::mCustomFields; + + +Field::Field( FieldImpl *impl ) +{ + mImpl = impl; +} + +Field::~Field() +{ + delete mImpl; +} + +TQString Field::label() +{ + switch ( mImpl->fieldId() ) { + --CASELABEL-- + case FieldImpl::CustomField: + return mImpl->label(); + default: + return i18n("Unknown Field"); + } +} + +int Field::category() +{ + return mImpl->category(); +} + +TQString Field::categoryLabel( int category ) +{ + switch ( category ) { + case All: + return i18n("All"); + case Frequent: + return i18n("Frequent"); + case Address: + return i18n("street/postal","Address"); + case Email: + return i18n("Email"); + case Personal: + return i18n("Personal"); + case Organization: + return i18n("Organization"); + case CustomCategory: + return i18n("Custom"); + default: + return i18n("Undefined"); + } +} + +TQString Field::value( const KABC::Addressee &a ) +{ + switch ( mImpl->fieldId() ) { + --CASEVALUE-- + case FieldImpl::Email: + return a.preferredEmail(); + case FieldImpl::Birthday: + if ( a.birthday().isValid() ) + return a.birthday().date().toString( Qt::ISODate ); + else + return TQString::null; + case FieldImpl::Url: + return a.url().prettyURL(); + case FieldImpl::HomePhone: + { + PhoneNumber::List::ConstIterator it; + + { + // check for preferred number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home | PhoneNumber::Pref ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) + return (*it).number(); + } + + { + // check for normal home number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) + return (*it).number(); + } + + return TQString::null; + } + case FieldImpl::BusinessPhone: + { + PhoneNumber::List::ConstIterator it; + + { + // check for preferred number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work | PhoneNumber::Pref ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) + return (*it).number(); + } + + { + // check for normal work number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) + return (*it).number(); + } + + return TQString::null; + } + case FieldImpl::MobilePhone: + return a.phoneNumber( PhoneNumber::Cell ).number(); + case FieldImpl::HomeFax: + return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); + case FieldImpl::BusinessFax: + return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); + case FieldImpl::CarPhone: + return a.phoneNumber( PhoneNumber::Car ).number(); + case FieldImpl::Isdn: + return a.phoneNumber( PhoneNumber::Isdn ).number(); + case FieldImpl::Pager: + return a.phoneNumber( PhoneNumber::Pager ).number(); + case FieldImpl::HomeAddressStreet: + return a.address( Address::Home ).street(); + case FieldImpl::HomeAddressLocality: + return a.address( Address::Home ).locality(); + case FieldImpl::HomeAddressRegion: + return a.address( Address::Home ).region(); + case FieldImpl::HomeAddressPostalCode: + return a.address( Address::Home ).postalCode(); + case FieldImpl::HomeAddressCountry: + return a.address( Address::Home ).country(); + case FieldImpl::HomeAddressLabel: + return a.address( Address::Home ).label(); + case FieldImpl::BusinessAddressStreet: + return a.address( Address::Work ).street(); + case FieldImpl::BusinessAddressLocality: + return a.address( Address::Work ).locality(); + case FieldImpl::BusinessAddressRegion: + return a.address( Address::Work ).region(); + case FieldImpl::BusinessAddressPostalCode: + return a.address( Address::Work ).postalCode(); + case FieldImpl::BusinessAddressCountry: + return a.address( Address::Work ).country(); + case FieldImpl::BusinessAddressLabel: + return a.address( Address::Work ).label(); + case FieldImpl::CustomField: + return a.custom( mImpl->app(), mImpl->key() ); + default: + return TQString::null; + } +} + +bool Field::setValue( KABC::Addressee &a, const TQString &value ) +{ + switch ( mImpl->fieldId() ) { + --CASESETVALUE-- + case FieldImpl::MobilePhone: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Cell ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::HomeFax: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::BusinessFax: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::CarPhone: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Car ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::Isdn: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Isdn ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::Pager: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Pager ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::HomeAddressStreet: + { + KABC::Address address = a.address( Address::Home ); + address.setStreet( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressLocality: + { + KABC::Address address = a.address( Address::Home ); + address.setLocality( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressRegion: + { + KABC::Address address = a.address( Address::Home ); + address.setRegion( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressPostalCode: + { + KABC::Address address = a.address( Address::Home ); + address.setPostalCode( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressCountry: + { + KABC::Address address = a.address( Address::Home ); + address.setCountry( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressLabel: + { + KABC::Address address = a.address( Address::Home ); + address.setLabel( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressStreet: + { + KABC::Address address = a.address( Address::Work ); + address.setStreet( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressLocality: + { + KABC::Address address = a.address( Address::Work ); + address.setLocality( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressRegion: + { + KABC::Address address = a.address( Address::Work ); + address.setRegion( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressPostalCode: + { + KABC::Address address = a.address( Address::Work ); + address.setPostalCode( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressCountry: + { + KABC::Address address = a.address( Address::Work ); + address.setCountry( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressLabel: + { + KABC::Address address = a.address( Address::Work ); + address.setLabel( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::Birthday: + a.setBirthday( TQT_TQDATE_OBJECT(TQDate::fromString( value, Qt::ISODate )) ); + return true; + case FieldImpl::CustomField: + a.insertCustom( mImpl->app(), mImpl->key(), value ); + return true; + default: + return false; + } +} + +TQString Field::sortKey( const KABC::Addressee &a ) +{ + switch ( mImpl->fieldId() ) { + --CASEVALUE-- + case FieldImpl::Birthday: + if ( a.birthday().isValid() ) { + TQDate date = TQT_TQDATE_OBJECT(a.birthday().date()); + TQString key; + key.sprintf( "%02d-%02d", date.month(), date.day() ); + return key; + } else + return TQString( "00-00" ); + default: + return value( a ).lower(); + } +} + +bool Field::isCustom() +{ + return mImpl->fieldId() == FieldImpl::CustomField; +} + +Field::List Field::allFields() +{ + if ( mAllFields.isEmpty() ) { + --CREATEFIELDS-- + } + + return mAllFields; +} + +Field::List Field::defaultFields() +{ + if ( mDefaultFields.isEmpty() ) { + createDefaultField( FieldImpl::FormattedName ); + createDefaultField( FieldImpl::Email ); + } + + return mDefaultFields; +} + +void Field::createField( int id, int category ) +{ + mAllFields.append( new Field( new FieldImpl( id, category ) ) ); +} + +void Field::createDefaultField( int id, int category ) +{ + mDefaultFields.append( new Field( new FieldImpl( id, category ) ) ); +} + +void Field::deleteFields() +{ + Field::List::ConstIterator it; + + for ( it = mAllFields.constBegin(); it != mAllFields.constEnd(); ++it ) { + delete (*it); + } + mAllFields.clear(); + + for ( it = mDefaultFields.constBegin(); it != mDefaultFields.constEnd(); ++it ) { + delete (*it); + } + mDefaultFields.clear(); + + for ( it = mCustomFields.constBegin(); it != mCustomFields.constEnd(); ++it ) { + delete (*it); + } + mCustomFields.clear(); +} + +void Field::saveFields( const TQString &identifier, + const Field::List &fields ) +{ + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); + + saveFields( cfg, identifier, fields ); +} + +void Field::saveFields( TDEConfig *cfg, const TQString &identifier, + const Field::List &fields ) +{ + TQValueList fieldIds; + + int custom = 0; + Field::List::ConstIterator it; + for( it = fields.begin(); it != fields.end(); ++it ) { + fieldIds.append( (*it)->mImpl->fieldId() ); + if( (*it)->isCustom() ) { + TQStringList customEntry; + customEntry << (*it)->mImpl->label(); + customEntry << (*it)->mImpl->key(); + customEntry << (*it)->mImpl->app(); + cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" + + TQString::number( custom++ ), customEntry ); + } + } + + cfg->writeEntry( identifier, fieldIds ); +} + +Field::List Field::restoreFields( const TQString &identifier ) +{ + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); + + return restoreFields( cfg, identifier ); +} + +Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier ) +{ + const TQValueList fieldIds = cfg->readIntListEntry( identifier ); + + Field::List fields; + + int custom = 0; + TQValueList::ConstIterator it; + for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { + FieldImpl *f = 0; + if ( (*it) == FieldImpl::CustomField ) { + TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" + + identifier + "_" + + TQString::number( custom++ ) ); + f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ], + customEntry[ 1 ], customEntry[ 2 ] ); + } else { + f = new FieldImpl( *it ); + } + fields.append( new Field( f ) ); + } + + return fields; +} + +bool Field::equals( Field *field ) +{ + bool sameId = ( mImpl->fieldId() == field->mImpl->fieldId() ); + + if ( !sameId ) return false; + + if ( mImpl->fieldId() != FieldImpl::CustomField ) return true; + + return mImpl->key() == field->mImpl->key(); +} + +Field *Field::createCustomField( const TQString &label, int category, + const TQString &key, const TQString &app ) +{ + Field *field = new Field( new FieldImpl( FieldImpl::CustomField, + category | CustomCategory, + label, key, app ) ); + mCustomFields.append( field ); + + return field; +} diff --git a/tdeabc/scripts/makeaddressee b/tdeabc/scripts/makeaddressee new file mode 100755 index 000000000..fa955b0bf --- /dev/null +++ b/tdeabc/scripts/makeaddressee @@ -0,0 +1,215 @@ +#!/usr/bin/perl + +my $srcdir; +$srcdir = `dirname $0` || die "Can't determine \$srcdir."; +chomp $srcdir; + +if (!open( ENTRIES, "$srcdir/entrylist" ) ) { + print "Can't open $srcdir/entrylist\n"; + exit 1; +} + + while() { + if (/^#/) { next; } + chop; + @entries = split /,/; + if (!/^.+,(\w+),(\w+)/) { next; } + push @entryCtrl, @entries[0]; + push @entryRealNames, @entries[1]; + push @entryComments, @entries[2]; + push @entryTypes, @entries[3]; + push @entryNames, @entries[4]; + push @entryCategory, @entries[5]; + push @entryDebug, @entries[6]; + } + +close ENTRIES; + +if (!open( H_IN, "$srcdir/addressee.src.h" ) ) { + print "Can't open $srcdir/addressee.src.h\n"; + exit 1; +} +if (!open( H_OUT, ">../addressee.h" ) ) { + print "Can't open addressee.h\n"; + exit 1; +} + print H_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; + + while( ) { + if (/--DECLARATIONS--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print H_OUT " /**\n"; + print H_OUT " Set $entryRealNames[$i].\n"; + print H_OUT " */\n"; + print H_OUT " void set" . ucfirst($entryNames[$i]); + print H_OUT "( const $entryTypes[$i] &$entryNames[$i] );\n"; + + print H_OUT " /**\n"; + print H_OUT " Return $entryRealNames[$i].\n"; + print H_OUT " */\n"; + print H_OUT " $entryTypes[$i] $entryNames[$i]() const;\n"; + } + + if ( $entryCtrl[$i] !~ /L/ ) { next; } + print H_OUT " /**\n"; + print H_OUT " Return translated label for $entryNames[$i] field.\n"; + print H_OUT " */\n"; + print H_OUT " static TQString $entryNames[$i]Label();\n\n"; + } + } else { + print H_OUT; + } + } + +close H_OUT; +close H_IN; + +if (!open( CPP_IN, "$srcdir/addressee.src.cpp" ) ) { + print "Can't open $srcdir/addressee.src.cpp\n"; + exit 1; +} +if (!open( CPP_OUT, ">../addressee.cpp" ) ) { + print "Can't open addressee.cpp\n"; + exit 1; +} + print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; + + while( ) { + if (/--VARIABLES--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + print CPP_OUT " $entryTypes[$i] $entryNames[$i];\n"; + } + } elsif (/--DEFINITIONS--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print CPP_OUT "void Addressee::set" . ucfirst($entryNames[$i]); + print CPP_OUT "( const $entryTypes[$i] &$entryNames[$i] )\n{\n"; + print CPP_OUT " if ( $entryNames[$i] == mData->$entryNames[$i] ) return;\n"; + print CPP_OUT " detach();\n mData->empty = false;\n"; + print CPP_OUT " mData->$entryNames[$i] = $entryNames[$i];\n}\n\n"; + + print CPP_OUT "$entryTypes[$i] Addressee::$entryNames[$i]() const\n{\n"; + print CPP_OUT " return mData->$entryNames[$i];\n}\n\n"; + } + + if ( $entryCtrl[$i] !~ /L/ ) { next; } + @labelwords = split ' ', $entryRealNames[$i]; + for( $j=0; $j < @labelwords; ++$j ) { + $labelwords[$j] = ucfirst $labelwords[$j]; + } + $label = join ' ', @labelwords; + print CPP_OUT "TQString Addressee::$entryNames[$i]Label()\n{\n"; + if ( $entryComments[$i] ) { + print CPP_OUT " return i18n(\"$entryComments[$i]\",\"$label\");\n"; + } else { + print CPP_OUT " return i18n(\"$label\");\n"; + } + print CPP_OUT "}\n\n\n"; + } + } elsif (/--EQUALSTEST--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /E/ ) { + if ( $entryNames[$i] !~ "revision" ) { + if ( $entryTypes[$i] =~ "TQString" ) { + print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] &&\n"; + print CPP_OUT " !( mData->$entryNames[$i].isEmpty() && a.mData->$entryNames[$i].isEmpty() ) ) {\n"; + print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; + print CPP_OUT " return false;\n"; + print CPP_OUT " }\n"; + } else { + print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] ) {\n"; + print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; + print CPP_OUT " return false;\n"; + print CPP_OUT " }\n"; + } + } + } + } + } elsif (/--STREAMOUT--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print CPP_OUT " s << a.mData->$entryNames[$i];\n"; + } + } + } elsif (/--STREAMIN--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print CPP_OUT " s >> a.mData->$entryNames[$i];\n"; + } + } + } elsif (/--DEBUG--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + print CPP_OUT " kdDebug(5700) << \" " . ucfirst($entryNames[$i]); + print CPP_OUT ": '\" << $entryNames[$i]()$entryDebug[$i] << \"'\" << endl;\n"; + } + } else { + print CPP_OUT; + } + } + +close CPP_OUT; +close CPP_IN; + +if (!open( CPP_IN, "$srcdir/field.src.cpp" ) ) { + print "Can't open $srcdir/field.src.cpp\n"; + exit 1; +} +if (!open( CPP_OUT, ">../field.cpp" ) ) { + print "Can't open field.cpp\n"; + exit 1; +} + print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; + + while( ) { + if (/--ENUMS--/) { + $first = 1; + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $first ) { $first = 0; } + else { print CPP_OUT ",\n"; } + print CPP_OUT " " . ucfirst($entryNames[$i]); + } + print CPP_OUT "\n"; + } elsif (/--CASELABEL--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $entryCtrl[$i] !~ /L/ ) { next; } + print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; + print CPP_OUT " return Addressee::$entryNames[$i]Label();\n"; + } + } elsif (/--CASEVALUE--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $entryTypes[$i] ne "TQString" ) { next; } + print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; + print CPP_OUT " return a.$entryNames[$i]();\n"; + } + } elsif (/--CASESETVALUE--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $entryTypes[$i] ne "TQString" ) { next; } + print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; + print CPP_OUT " a.set" . ucfirst($entryNames[$i]) . "( value );\n"; + print CPP_OUT " return true;\n"; + } + } elsif (/--CREATEFIELDS--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /F/ ) { next; } + print CPP_OUT " createField( FieldImpl::" . ucfirst($entryNames[$i]); + if ( $entryCategory[$i] ) { + print CPP_OUT ", $entryCategory[$i]"; + } + print CPP_OUT " );\n"; + } + } else { + print CPP_OUT; + } + } + +close CPP_OUT; +close CPP_IN; diff --git a/tdeabc/secrecy.cpp b/tdeabc/secrecy.cpp new file mode 100644 index 000000000..2725612bc --- /dev/null +++ b/tdeabc/secrecy.cpp @@ -0,0 +1,100 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "secrecy.h" + +using namespace KABC; + +Secrecy::Secrecy( int type ) + : mType( type ) +{ +} + +bool Secrecy::operator==( const Secrecy &s ) const +{ + return ( mType == s.mType ); +} + +bool Secrecy::operator!=( const Secrecy &s ) const +{ + return !( *this == s ); +} + +bool Secrecy::isValid() const +{ + return mType != Invalid; +} + +void Secrecy::setType( int type ) +{ + mType = type; +} + +int Secrecy::type() const +{ + return mType; +} + +Secrecy::TypeList Secrecy::typeList() +{ + static TypeList list; + + if ( list.isEmpty() ) + list << Public << Private << Confidential; + + return list; +} + +TQString Secrecy::typeLabel( int type ) +{ + switch ( type ) { + case Public: + return i18n( "Public" ); + break; + case Private: + return i18n( "Private" ); + break; + case Confidential: + return i18n( "Confidential" ); + break; + default: + return i18n( "Unknown type" ); + break; + } +} + +TQString Secrecy::asString() const +{ + return typeLabel( mType ); +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Secrecy &secrecy ) +{ + return s << secrecy.mType; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Secrecy &secrecy ) +{ + s >> secrecy.mType; + + return s; +} diff --git a/tdeabc/secrecy.h b/tdeabc/secrecy.h new file mode 100644 index 000000000..5cc60b11d --- /dev/null +++ b/tdeabc/secrecy.h @@ -0,0 +1,100 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_SECRECY_H +#define KABC_SECRECY_H + +#include + +#include + +namespace KABC { + +class KABC_EXPORT Secrecy +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Secrecy & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Secrecy & ); + +public: + typedef TQValueList TypeList; + + /** + * Secrecy types + * + * @li Public - for public access + * @li Private - only private access + * @li Confidential - access for confidential persons + */ + enum Types { + Public, + Private, + Confidential, + Invalid + }; + + /** + * Constructor. + * + * @param type The secrecy type, see Types. + */ + Secrecy( int type = Invalid ); + + bool operator==( const Secrecy & ) const; + bool operator!=( const Secrecy & ) const; + + /** + Returns if the Secrecy object has a valid value. + */ + bool isValid() const; + + /** + * Sets the type, see Types. + */ + void setType( int type ); + + /** + * Returns the type, see Types. + */ + int type() const; + + /** + * Returns a list of all available secrecy types. + */ + static TypeList typeList(); + + /** + * Returns a translated label for a given secrecy type. + */ + static TQString typeLabel( int type ); + + /** + * For debug. + */ + TQString asString() const; + +private: + int mType; +}; + +KABC_EXPORT TQDataStream& operator<<( TQDataStream &s, const Secrecy &secrecy ); +KABC_EXPORT TQDataStream& operator>>( TQDataStream &s, Secrecy &secrecy ); + +} +#endif diff --git a/tdeabc/sortmode.cpp b/tdeabc/sortmode.cpp new file mode 100644 index 000000000..efb4a3919 --- /dev/null +++ b/tdeabc/sortmode.cpp @@ -0,0 +1,79 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "sortmode.h" + +using namespace KABC; + +NameSortMode::NameSortMode() + : mNameType( FormattedName ), mAscendingOrder( true ), d( 0 ) +{ + mNameType = FormattedName; +} + +NameSortMode::NameSortMode( NameType type, bool ascending ) + : mNameType( type ), mAscendingOrder( ascending ), d( 0 ) +{ +} + +bool NameSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const +{ + bool lesser = false; + + switch ( mNameType ) { + case FormattedName: + lesser = TQString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0; + break; + case FamilyName: + lesser = TQString::localeAwareCompare( first.familyName(), second.familyName() ) < 0; + break; + case GivenName: + lesser = TQString::localeAwareCompare( first.givenName(), second.givenName() ) < 0; + break; + default: + lesser = false; + break; + } + + if ( !mAscendingOrder ) + lesser = !lesser; + + return lesser; +} + +FieldSortMode::FieldSortMode( KABC::Field *field, bool ascending ) + : mField( field ), mAscendingOrder( ascending ), d( 0 ) +{ +} + +bool FieldSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const +{ + if ( !mField ) + return false; + else { + bool lesser = TQString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0; + if ( !mAscendingOrder ) + lesser = !lesser; + + return lesser; + } +} diff --git a/tdeabc/sortmode.h b/tdeabc/sortmode.h new file mode 100644 index 000000000..f02662b7d --- /dev/null +++ b/tdeabc/sortmode.h @@ -0,0 +1,114 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_SORTMODE_H +#define KABC_SORTMODE_H + +#include + +#include + +namespace KABC { + +/** + @short Sort method for sorting an addressee list. + + This interface should be reimplemented by classes which shall act as + SortModes for KABC::AddresseeList. +*/ +class KABC_EXPORT SortMode +{ + public: + /** + Reimplement this method and return whether the first contact is 'smaller' + than the second. + */ + virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const = 0; +}; + +class KABC_EXPORT NameSortMode : public SortMode +{ + public: + enum NameType + { + FormattedName, + FamilyName, + GivenName + }; + + /** + Constructor. + + Creates a NameSortMethod with FormattedName as name type set. + */ + NameSortMode(); + + /** + Constructor. + + Creates a NameSortMethod with the specified name type. + + @param type The name type. + @param ascending true for ascending sort, false for descending. + */ + NameSortMode( NameType type, bool ascending = true ); + + /** + Returns whether the first contact is 'smaller' then the second. + */ + virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; + + private: + NameType mNameType; + bool mAscendingOrder; + + class NameSortModePrivate; + NameSortModePrivate *d; +}; + +class KABC_EXPORT FieldSortMode : public SortMode +{ + public: + /** + Constructor. + + Creates a FieldSortMethod with the specified field. + + @param field The field. + @param ascending true for ascending sort, false for descending. + */ + FieldSortMode( KABC::Field *field, bool ascending = true ); + + /** + Returns whether the first contact is 'smaller' then the second. + */ + virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; + + private: + KABC::Field *mField; + bool mAscendingOrder; + + class FieldSortModePrivate; + FieldSortModePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/sound.cpp b/tdeabc/sound.cpp new file mode 100644 index 000000000..cf645be83 --- /dev/null +++ b/tdeabc/sound.cpp @@ -0,0 +1,118 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "sound.h" + +#include + +using namespace KABC; + +Sound::Sound() + : mIntern( false ) +{ +} + +Sound::Sound( const TQString &url ) + : mUrl( url ), mIntern( false ) +{ +} + +Sound::Sound( const TQByteArray &data ) + : mData( data ), mIntern( true ) +{ +} + +Sound::~Sound() +{ +} + +bool Sound::operator==( const Sound &s ) const +{ + if ( mIntern != s.mIntern ) return false; + + if ( mIntern ) { + if ( mData != s.mData ) + return false; + } else { + if ( mUrl != s.mUrl ) + return false; + } + + return true; +} + +bool Sound::operator!=( const Sound &s ) const +{ + return !( s == *this ); +} + +void Sound::setUrl( const TQString &url ) +{ + mUrl = url; + mIntern = false; +} + +void Sound::setData( const TQByteArray &data ) +{ + mData = data; + mIntern = true; +} + +bool Sound::isIntern() const +{ + return mIntern; +} + +bool Sound::isEmpty() const +{ + return (!mIntern) && mUrl.isEmpty(); + +} + +TQString Sound::url() const +{ + return mUrl; +} + +TQByteArray Sound::data() const +{ + return mData; +} + +TQString Sound::asString() const +{ + if ( mIntern ) + return "intern sound"; + else + return mUrl; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Sound &sound ) +{ + return s << sound.mIntern << sound.mUrl; +// return s << sound.mIntern << sound.mUrl << sound.mData; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Sound &sound ) +{ + s >> sound.mIntern >> sound.mUrl; +// s >> sound.mIntern >> sound.mUrl >> sound.mData; + return s; +} diff --git a/tdeabc/sound.h b/tdeabc/sound.h new file mode 100644 index 000000000..98dcf320b --- /dev/null +++ b/tdeabc/sound.h @@ -0,0 +1,153 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_SOUND_H +#define KABC_SOUND_H + +#include +#include + +#include + +namespace KABC { + +/** @short Class that holds a Sound clip for a contact. + * + * The sound can be played doing something like this: + * + * \code + * KTempFile tmp; + * if(sound.isIntern()) { + * tmp.file()->tqwriteBlock( sound.data() ); + * tmp.close(); + * KAudioPlayer::play( tmp.name() ); + * } else if(!sound.url().isEmpty()) { + * TQString tmpFile; + * if(!TDEIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) + * { + * KMessageBox::error(0L, + * TDEIO::NetAccess::lastErrorString(), + * i18n("Failed to download sound file"), + * KMessageBox::Notify + * ); + * return; + * } + * KAudioPlayer::play( tmpFile ); + * } + * \endcode + * + * Unfortunetly KAudioPlayer::play is ASync, so to delete the temporary file, the best you can really do is set a timer. + * + */ +class KABC_EXPORT Sound +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); + +public: + + /** + * Consturctor. Creates an empty object. + */ + Sound(); + + /** + * Consturctor. + * + * @param url A URL that describes the position of the sound file. + */ + Sound( const TQString &url ); + + /** + * Consturctor. + * + * @param data The raw data of the sound. + */ + Sound( const TQByteArray &data ); + + /** + * Destructor. + */ + ~Sound(); + + + bool operator==( const Sound & ) const; + bool operator!=( const Sound & ) const; + + /** + * Sets a URL for the location of the sound file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * + * @param url The location URL of the sound file. + */ + void setUrl( const TQString &url ); + + /** + * Test if this sound file has been set. + * Just does: !isIntern() && url.isEmpty() + * @since 3.4 + */ + bool isEmpty() const; + + /** + * Sets the raw data of the sound. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param data The raw data of the sound. + */ + void setData( const TQByteArray &data ); + + /** + * Returns whether the sound is described by a URL (extern) or + * by the raw data (intern). + * When this method returns 'true' you can use data() to + * get the raw data. Otherwise you can request the URL of this + * sound by url() and load the raw data from that location. + */ + bool isIntern() const; + + /** + * Returns the location URL of this sound. + */ + TQString url() const; + + /** + * Returns the raw data of this sound. + */ + TQByteArray data() const; + + /** + * Returns string representation of the sound. + */ + TQString asString() const; + +private: + TQString mUrl; + TQByteArray mData; + + int mIntern; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); + +} +#endif diff --git a/tdeabc/stdaddressbook.cpp b/tdeabc/stdaddressbook.cpp new file mode 100644 index 000000000..3e64645ea --- /dev/null +++ b/tdeabc/stdaddressbook.cpp @@ -0,0 +1,203 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "resource.h" + +#include "stdaddressbook.h" + +using namespace KABC; + +StdAddressBook *StdAddressBook::mSelf = 0; +bool StdAddressBook::mAutomaticSave = true; + +static KStaticDeleter addressBookDeleter; + +TQString StdAddressBook::fileName() +{ + return locateLocal( "data", "tdeabc/std.vcf" ); +} + +TQString StdAddressBook::directoryName() +{ + return locateLocal( "data", "tdeabc/stdvcf" ); +} + +void StdAddressBook::handleCrash() +{ +} + +StdAddressBook *StdAddressBook::self() +{ + if ( !mSelf ) + addressBookDeleter.setObject( mSelf, new StdAddressBook ); + + return mSelf; +} + +StdAddressBook *StdAddressBook::self( bool asynchronous ) +{ + if ( !mSelf ) + addressBookDeleter.setObject( mSelf, new StdAddressBook( asynchronous ) ); + + return mSelf; +} + +StdAddressBook::StdAddressBook() + : AddressBook( "" ) +{ + kdDebug(5700) << "StdAddressBook::StdAddressBook()" << endl; + + init( false ); +} + +StdAddressBook::StdAddressBook( bool asynchronous ) + : AddressBook( "" ) +{ + kdDebug(5700) << "StdAddressBook::StdAddressBook( bool )" << endl; + + init( asynchronous ); +} + +StdAddressBook::~StdAddressBook() +{ + if ( mAutomaticSave ) + saveAll(); +} + +void StdAddressBook::init( bool asynchronous ) +{ + KRES::Manager *manager = resourceManager(); + + KRES::Manager::ActiveIterator it; + for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { + (*it)->setAddressBook( this ); + if ( !(*it)->open() ) { + error( TQString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); + continue; + } + connect( *it, TQT_SIGNAL( loadingFinished( Resource* ) ), + this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); + connect( *it, TQT_SIGNAL( savingFinished( Resource* ) ), + this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); + + connect( *it, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + connect( *it, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); + } + + Resource *res = standardResource(); + if ( !res ) { + res = manager->createResource( "file" ); + if ( res ) + addResource( res ); + else + kdDebug(5700) << "No resource available!!!" << endl; + } + + setStandardResource( res ); + manager->writeConfig(); + + if ( asynchronous ) + asyncLoad(); + else + load(); +} + +bool StdAddressBook::saveAll() +{ + kdDebug(5700) << "StdAddressBook::saveAll()" << endl; + bool ok = true; + + deleteRemovedAddressees(); + + KRES::Manager::ActiveIterator it; + KRES::Manager *manager = resourceManager(); + for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { + if ( !(*it)->readOnly() && (*it)->isOpen() ) { + Ticket *ticket = requestSaveTicket( *it ); + if ( !ticket ) { + error( i18n( "Unable to save to resource '%1'. It is locked." ) + .arg( (*it)->resourceName() ) ); + return false; + } + + if ( !AddressBook::save( ticket ) ) { + ok = false; + releaseSaveTicket( ticket ); + } + } + } + + return ok; +} + +bool StdAddressBook::save() +{ + kdDebug(5700) << "StdAddressBook::save()" << endl; + + if ( mSelf ) + return mSelf->saveAll(); + else + return true; +} + +void StdAddressBook::close() +{ + addressBookDeleter.destructObject(); +} + +void StdAddressBook::setAutomaticSave( bool enable ) +{ + mAutomaticSave = enable; +} + +bool StdAddressBook::automaticSave() +{ + return mAutomaticSave; +} + +// should get const for 4.X +Addressee StdAddressBook::whoAmI() +{ + TDEConfig config( "kabcrc" ); + config.setGroup( "General" ); + + return findByUid( config.readEntry( "WhoAmI" ) ); +} + +void StdAddressBook::setWhoAmI( const Addressee &addr ) +{ + TDEConfig config( "kabcrc" ); + config.setGroup( "General" ); + + config.writeEntry( "WhoAmI", addr.uid() ); +} diff --git a/tdeabc/stdaddressbook.h b/tdeabc/stdaddressbook.h new file mode 100644 index 000000000..935b2bad1 --- /dev/null +++ b/tdeabc/stdaddressbook.h @@ -0,0 +1,153 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_STDADDRESSBOOK_H +#define KABC_STDADDRESSBOOK_H + +#include "addressbook.h" + +namespace KABC { + +/** + Standard KDE address book + + This class provides access to the standard KDE address book shared by all + applications. + + It's implemented as a singleton. Use self() to get the address book + object. On the first self() call the address book also gets loaded. + + Example: + + \code + KABC::AddressBook *ab = KABC::StdAddressBook::self(); + + AddressBook::Ticket *ticket = ab->requestSaveTicket(); + + if ( ticket ) { + KABC::AddressBook::Iterator it; + for ( it = ab->begin(); it != ab->end(); ++it ) { + kdDebug() << "UID=" << (*it).uid() << endl; + + // do some other stuff + } + + KABC::StdAddressBook::save( ticket ); + } + \endcode +*/ +class KABC_EXPORT StdAddressBook : public AddressBook +{ + public: + + /** + Destructor. + */ + ~StdAddressBook(); + + /** + Returns the standard addressbook object. It also loads all resources of + the users standard address book synchronously. + */ + static StdAddressBook *self(); + + /** + This is the same as above, but with specified behaviour of resource loading. + + @param asynchronous When true, the resources are loaded asynchronous, that + means you have the data foremost the addressBookChanged() + signal has been emitted. So connect to this signal when + using this method! + */ + static StdAddressBook *self( bool asynchronous ); + + /** + Saves the standard address book to disk. + + @deprecated Use AddressBook::save( Ticket* ) instead + */ + static bool save() KDE_DEPRECATED; + + /** + @deprecated There is no need to call this function anymore. + */ + static void handleCrash() KDE_DEPRECATED; + + /** + Returns the default file name for vcard-based addressbook + */ + static TQString fileName(); + + /** + Returns the default directory name for vcard-based addressbook + */ + static TQString directoryName(); + + /** + Sets the automatic save property of the address book. + + @param state If true, the address book is saved automatically + at destruction time, otherwise you have to call + AddressBook::save( Ticket* ). + */ + static void setAutomaticSave( bool state ); + + /** + Closes the address book. Depending on automaticSave() it will + save the address book first. + */ + static void close(); + + /** + Returns whether the address book is saved at destruction time. + See also setAutomaticSave(). + */ + static bool automaticSave(); + + /** + Returns the contact, that is associated with the owner of the + address book. This contact should be used by other programs + to access user specific data. + */ + Addressee whoAmI(); + + /** + Sets the users contact. See whoAmI() for more information. + + @param addr The users contact. + */ + void setWhoAmI( const Addressee &addr ); + + protected: + StdAddressBook(); + StdAddressBook( bool asynchronous ); + + void init( bool asynchronous ); + bool saveAll(); + + private: + static StdAddressBook *mSelf; + static bool mAutomaticSave; +}; + +} + +#endif + diff --git a/tdeabc/tdeab2tdeabc.cpp b/tdeabc/tdeab2tdeabc.cpp new file mode 100644 index 000000000..13b433abc --- /dev/null +++ b/tdeabc/tdeab2tdeabc.cpp @@ -0,0 +1,476 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "stdaddressbook.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, + { "quiet", "", 0 }, + { "o", 0, 0 }, + { "override", I18N_NOOP( "Override existing entries" ), "1" }, + TDECmdLineLastOption +}; + +void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) +{ + kdDebug() << "KMAILENTRY: " << kmailEntry << endl; + + TQString entry = kmailEntry.simplifyWhiteSpace(); + if ( entry.isEmpty() ) return; + + TQString email; + TQString name; + TQString comment; + + if ( entry.at( entry.length() -1 ) == ')' ) { + int br = entry.findRev( '(' ); + if ( br >= 0 ) { + comment = entry.mid( br + 1, entry.length() - br - 2 ); + entry.truncate( br ); + if ( entry.at( entry.length() - 1 ).isSpace() ) { + entry.truncate( br - 1 ); + } + } + } + + int posSpace = entry.findRev( ' ' ); + if ( posSpace < 0 ) { + email = entry; + if ( !comment.isEmpty() ) { + name = comment; + comment = ""; + } + } else { + email = entry.mid( posSpace + 1 ); + name = entry.left( posSpace ); + } + + if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { + email = email.mid( 1, email.length() - 2 ); + } + if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { + name = name.mid( 1, name.length() - 2 ); + } + if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { + name = name.mid( 1, name.length() - 2 ); + } + + if ( name.at( name.length() -1 ) == ')' ) { + int br = name.findRev( '(' ); + if ( br >= 0 ) { + comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; + name.truncate( br ); + if ( name.at( name.length() - 1 ).isSpace() ) { + name.truncate( br - 1 ); + } + } + } + + kdDebug() << " EMAIL : " << email << endl; + kdDebug() << " NAME : " << name << endl; + kdDebug() << " COMMENT : " << comment << endl; + + KABC::Addressee::List al = ab->findByEmail( email ); + if ( al.isEmpty() ) { + KABC::Addressee a; + a.setNameFromString( name ); + a.insertEmail( email ); + a.setNote( comment ); + + ab->insertAddressee( a ); + + kdDebug() << "--INSERTED: " << a.realName() << endl; + } +} + +void importKMailAddressBook( KABC::AddressBook *ab ) +{ + TQString fileName = locateLocal( "data", "kmail/addressbook" ); + TQString kmailConfigName = locate( "config", "kmailrc" ); + if ( !kmailConfigName.isEmpty() ) { + TDEConfig cfg( kmailConfigName ); + cfg.setGroup( "Addressbook" ); + fileName = cfg.readPathEntry( "default", fileName ); + } + if ( !TDEStandardDirs::exists( fileName ) ) { + kdDebug(5700) << "Couldn't find KMail addressbook." << endl; + return; + } + + TQFile f( fileName ); + if ( !f.open(IO_ReadOnly) ) { + kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl; + return; + } + + TQStringList kmailEntries; + + TQTextStream t( &f ); + while ( !t.eof() ) { + kmailEntries.append( t.readLine() ); + } + f.close(); + + TQStringList::ConstIterator it; + for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { + if ( (*it).at( 0 ) == '#' ) continue; + bool insideQuote = false; + int end = (*it).length() - 1; + for ( int i = end; i; i-- ) { + if ( (*it).at( i ) == '"' ) { + if ( insideQuote ) + insideQuote = false; + else + insideQuote = true; + } else if ( (*it).at( i ) == ',' && !insideQuote ) { + readKMailEntry( (*it).mid( i + 1, end - i ), ab ); + end = i - 1; + } + } + + readKMailEntry( (*it).mid( 0, end + 1 ), ab ); + } +} + +void readKAddressBookEntries( const TQString &dataString, Addressee &a ) +{ + // Strip "KMail:1.0" prefix and "[EOS]" suffix. + TQString str = dataString.mid( 11, dataString.length() - 24 ); + + TQStringList entries = TQStringList::split( "\n[EOR]\n ", str ); + + Address homeAddress( Address::Home ); + Address businessAddress( Address::Work ); + Address otherAddress; + + TQStringList::ConstIterator it; + for ( it = entries.begin(); it != entries.end(); ++it ) { + int pos = (*it).find( "\n" ); + TQString fieldName = (*it).left( pos ); + TQString fieldValue = (*it).mid( pos + 2 ); + + if ( fieldName == "X-HomeFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home | + PhoneNumber::Fax ) ); + } else if ( fieldName == "X-OtherPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) ); + } else if ( fieldName == "X-PrimaryPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) ); + } else if ( fieldName == "X-BusinessFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work | + PhoneNumber::Fax ) ); + } else if ( fieldName == "X-CarPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) ); + } else if ( fieldName == "X-MobilePhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) ); + } else if ( fieldName == "X-ISDN" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) ); + } else if ( fieldName == "X-OtherFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) ); + } else if ( fieldName == "X-Pager" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) ); + } else if ( fieldName == "X-BusinessPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) ); + } else if ( fieldName == "X-HomePhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) ); + } else if ( fieldName == "X-HomeAddress" ) { + homeAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-HomeAddressStreet" ) { + homeAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-HomeAddressCity" ) { + homeAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-HomeAddressPostalCode" ) { + homeAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-HomeAddressState" ) { + homeAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-HomeAddressCountry" ) { + homeAddress.setCountry( fieldValue ); + } else if ( fieldName == "X-BusinessAddress" ) { + businessAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-BusinessAddressStreet" ) { + businessAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-BusinessAddressCity" ) { + businessAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-BusinessAddressPostalCode" ) { + businessAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-BusinessAddressState" ) { + businessAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-BusinessAddressCountry" ) { + businessAddress.setCountry( fieldValue ); + } else if ( fieldName == "X-OtherAddress" ) { + otherAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-OtherAddressStreet" ) { + otherAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-OtherAddressCity" ) { + otherAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-OtherAddressPostalCode" ) { + otherAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-OtherAddressState" ) { + otherAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-OtherAddressCountry" ) { + otherAddress.setCountry( fieldValue ); + } else if ( fieldName == "NICKNAME" ) { + a.setNickName( fieldValue ); + } else if ( fieldName == "ORG" ) { + a.setOrganization( fieldValue ); + } else if ( fieldName == "ROLE" ) { + a.setRole( fieldValue ); + } else if ( fieldName == "BDAY" ) { + a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) ); + } else if ( fieldName == "WEBPAGE" ) { + a.setUrl( KURL( fieldValue ) ); + } else if ( fieldName == "N" ) { + } else if ( fieldName == "X-FirstName" ) { + } else if ( fieldName == "X-MiddleName" ) { + } else if ( fieldName == "X-LastName" ) { + } else if ( fieldName == "X-Title" ) { + } else if ( fieldName == "X-Suffix" ) { + } else if ( fieldName == "X-FileAs" ) { + } else if ( fieldName == "EMAIL" ) { + a.insertEmail( fieldValue, true ); + } else if ( fieldName == "X-E-mail2" ) { + a.insertEmail( fieldValue ); + } else if ( fieldName == "X-E-mail3" ) { + a.insertEmail( fieldValue ); + } else if ( fieldName == "X-Notes" ) { + } else { + a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue ); + } + } + + if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress ); + if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress ); + if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress ); +} + +void importKab( KABC::AddressBook *ab, bool override, bool quiet ) +{ + TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" ); + fileName += "addressbook.kab"; + if ( !TQFile::exists( fileName ) ) { + if ( !quiet ) { + KMessageBox::error( 0, "" + i18n( "Address book file %1 not found! Make sure the old address book is located there and you have read permission for this file." ) + .arg( fileName ) + "" ); + } + kdDebug(5700) << "No KDE 2 addressbook found." << endl; + return; + } + + kdDebug(5700) << "Converting old-style kab addressbook to " + "new-style kabc addressbook." << endl; + + KabAPI kab( 0 ); + if ( kab.init() != ::AddressBook::NoError ) { + kdDebug(5700) << "Error initing kab" << endl; + exit( 1 ); + } + + KabKey key; + ::AddressBook::Entry entry; + + int num = kab.addressbook()->noOfEntries(); + + kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl; + + for ( int i = 0; i < num; ++i ) { + if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) { + kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl; + continue; + } + if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) { + kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl; + continue; + } + + Addressee a; + + // Convert custom entries + int count = 0; + bool idFound = false; + TQStringList::ConstIterator customIt; + for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { + if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { + a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); + idFound = true; + } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { + readKAddressBookEntries( *customIt, a ); + } else { + a.insertCustom( "tdeab2tdeabc", TQString::number( count++ ), *customIt ); + } + } + if ( idFound ) { + if ( !override ) continue; + } else { + entry.custom << "X-KABC-UID:" + a.uid(); + ::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry ); + if ( error != ::AddressBook::NoError ) { + kdDebug(5700) << "kab.change returned with error " << error << endl; + } else { + kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl; + } + } + + a.setTitle( entry.title ); + a.setFormattedName( entry.fn ); + a.setPrefix( entry.nameprefix ); + a.setGivenName( entry.firstname ); + a.setAdditionalName( entry.middlename ); + a.setFamilyName( entry.lastname ); + a.setBirthday( entry.birthday ); + + TQStringList::ConstIterator emailIt; + for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt ) + a.insertEmail( *emailIt ); + + TQStringList::ConstIterator phoneIt; + for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) { + int kabType = (*phoneIt++).toInt(); + if ( phoneIt == entry.telephone.end() ) break; + TQString number = *phoneIt; + int type = 0; + if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice; + else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice; + else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax; + else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem; + a.insertPhoneNumber( PhoneNumber( number, type ) ); + } + + if ( entry.URLs.count() > 0 ) { + a.setUrl( KURL( entry.URLs.first() ) ); + if ( entry.URLs.count() > 1 ) { + kdWarning() << "More than one URL. Ignoring all but the first." << endl; + } + } + + int noAdr = entry.noOfAddresses(); + for ( int j = 0; j < noAdr; ++j ) { + ::AddressBook::Entry::Address kabAddress; + entry.getAddress( j, kabAddress ); + + Address adr; + + adr.setStreet( kabAddress.address ); + adr.setPostalCode( kabAddress.zip ); + adr.setLocality( kabAddress.town ); + adr.setCountry( kabAddress.country ); + adr.setRegion( kabAddress.state ); + + TQString label; + if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n"; + if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n"; + if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n"; + if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n"; + if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n"; + if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n"; + adr.setLabel( label ); + + a.insertAddress( adr ); + } + + TQString note = entry.comment; + + if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1; + if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2; + if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3; + if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4; + + if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " ); + + TQStringList::ConstIterator talkIt; + for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) { + note += "\nTalk: " + (*talkIt); + } + + a.setNote( note ); + + a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix + + a.setCategories( entry.categories ); + + kdDebug(5700) << "Addressee: " << a.familyName() << endl; + + ab->insertAddressee( a ); + } + + kab.save( true ); +} + +int main( int argc, char **argv ) +{ + TDEAboutData aboutData( "tdeab2tdeabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" ); + aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + bool override = false; + + if ( args->isSet( "override" ) ) { + kdDebug() << "Override existing entries." << endl; + + override = true; + } + + bool quiet = false; + + if ( args->isSet( "quiet" ) ) + quiet = true; + + if ( args->isSet( "disable-autostart" ) ) { + kdDebug() << "Disable autostart." << endl; + + TDEConfig *config = app.config(); + config->setGroup( "Startup" ); + config->writeEntry( "EnableAutostart", false ); + } + + KABC::AddressBook *kabcBook = StdAddressBook::self(); + + importKMailAddressBook( kabcBook ); + + importKab( kabcBook, override, quiet ); + + StdAddressBook::save(); + + kdDebug(5700) << "Saved kabc addressbook to '" << kabcBook->identifier() << "'" << endl; +} + diff --git a/tdeabc/tdeab2tdeabc.desktop b/tdeabc/tdeab2tdeabc.desktop new file mode 100644 index 000000000..ef7641b23 --- /dev/null +++ b/tdeabc/tdeab2tdeabc.desktop @@ -0,0 +1,105 @@ +[Desktop Entry] +Name=tdeab2tdeabc +Name[af]=kab-na-kabc +Name[csb]=Kònwersëjô adresowi knéżczi +Name[eo]=Konvertilo de "kab" al "kabc" +Name[fr]=KAB2KABC +Name[fy]=Kab2kabc +Name[hu]=Kab2kabc +Name[it]=Kab2Kabc +Name[nl]=Kab2kabc +Name[pl]=Konwersja książki adresowej +Name[pt_BR]=Conversão de kab para kabc +Name[ro]=Kab2kabc +Name[sv]=Kab2kabc +Name[te]=కెఎబి2కెఎబిసి +Name[zu]=i-tdeab2tdeabc +Exec=tdeab2tdeabc --disable-autostart --quiet +Icon=misc +Type=Application +Comment=libkab to libkabc conversion tool. +Comment[af]=libkab na libkabc omskakeling program. +Comment[ar]=أداة تحويل libkab إلى libkabc. +Comment[az]=libkab - libkabc dönüşdürmÉ™ vasitÉ™si. +Comment[be]=ІнÑтрумент пераўтварÑÐ½Ð½Ñ libkab у libkabc. +Comment[bg]=Програма за конвертиране на libkab до libkabc. +Comment[bn]=libkab থেকে libtdeabc-তে পরিবরà§à¦¤à¦¨ করার পà§à¦°à§‹à¦—à§à¦°à¦¾à¦®à¥¤ +Comment[bs]=alat za pretvaranje libkab u libkabc. +Comment[ca]=Eina de conversió de libkab a libkabc. +Comment[cs]=PÅ™evod dat z libkab do libkabc. +Comment[csb]=Nôrzãdze do kònwersëji z libkab do libkabc. +Comment[cy]=erfyn trosi libkab i libkabc +Comment[da]=libkab-til-libtdeabc-konverteringsværktøj. +Comment[de]=Konvertierung von libkab in libkabc +Comment[el]=ΕÏγαλείο μετατÏοπής από το libkab στο libkabc. +Comment[eo]=Konvertilo de "libkab" al "libkabc" +Comment[es]=Conversor libkab a libkabc. +Comment[et]=libkab -> libkabc teisendamine +Comment[eu]=libkab-etik libtdeabc-era bihurtzeko tresna. +Comment[fa]=ابزار تبدیل libkab به libcabc. +Comment[fi]=libkab-libkabc -muunnin +Comment[fr]=Outil de conversion de libkab vers libkabc. +Comment[fy]=Konversjeprogramma fan libkab nei libkabc. +Comment[ga]=Uirlis tiontaithe ó libkab go libkabc. +Comment[gl]=Ferramenta de conversión de libkab a libkabc. +Comment[he]=כלי המרה מ־libkab ל־libkabc +Comment[hi]=libkab से libkabc बदलने वाला औजार +Comment[hr]=Alat za pretvaranje iz libkab u libkabc +Comment[hsb]=libkab -> libkabc konwerter +Comment[hu]=libkab -> libkabc konvertáló. +Comment[id]=konverter libkab ke libkabc. +Comment[is]=libkab í libkabc breytingatól. +Comment[it]=Strumento di conversione da libkab a libkabc. +Comment[ja]=libkab ã‹ã‚‰ libkabc ã¸ã®å¤‰æ›ãƒ„ール +Comment[ka]=libkab => libkabc გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ხელსáƒáƒ¬áƒ§áƒ. +Comment[kk]=libkab дегеннен libkabc дегенге айналдыру құралы. +Comment[km]=ឧបករណáŸâ€‹áž”ម្លែង​ពី libkab ទៅ libkabc +Comment[ko]=libkabì„ libkabc로 바꿔주는 연장. +Comment[lb]=libkab op libkabc Konvertéierungs-Hëllefsmëttel. +Comment[lt]=libkab į libkabc konvertavimo įrankis. +Comment[lv]=libkab uz libkabc kovertēšanas rÄ«ks. +Comment[mk]=алатка за претворање од libkab во libkabc. +Comment[mn]=libkab-Ð°Ð°Ñ libtdeabc-руу хөрвүүлÑгч +Comment[ms]=perkakasan penukaran libkab to libkabc. +Comment[mt]=Għodda għall-konverżjoni libkab għal libkabc +Comment[nb]=libkab til libkabc konverteringsverktøy. +Comment[nds]=Warktüüch för't Ümwanneln vun libkab na libkabc. +Comment[ne]=libkab to libkabc रूपानà¥à¤¤à¤°à¤£ उपकरण । +Comment[nl]=Conversieprogramma van libkab naar libkabc. +Comment[nn]=Konverterer libkab til libkabc +Comment[nso]=Sebereka sa phetosetso ya libkab go libkabc +Comment[pa]=libkab ਤੋ libkabc ਤਬਦੀਲੀ ਸੰਦ। +Comment[pl]=NarzÄ™dzie do konwersji z libkab do libkabc. +Comment[pt]=Ferramenta de conversão de libkab para libkabc. +Comment[pt_BR]=Ferramenta de conversão de libkab para libkabc. +Comment[ro]=Utilitar de conversie de la "libkab" la "libkabc". +Comment[ru]=утилита Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ libkab в libkabc. +Comment[rw]=Igikoresho cy'ihindura libkab muri libkabc. +Comment[se]=konverterenreaidu libkab:as libkabc:ai +Comment[sk]=Prevod dát z libkab do libkabc. +Comment[sl]=Orodje za pretvorbo iz libkab v libkabc +Comment[sq]=Vegla për shëndrimin e libkab në libkabc. +Comment[sr]=Ðлат за конверзију из libkab-а у libkabc. +Comment[sr@Latn]=Alat za konverziju iz libkab-a u libkabc. +Comment[ss]=Lithulusi lekutjintja le-libkab kuya ku-libkabc. +Comment[sv]=Konverteringsverktyg frÃ¥n libkab till libkabc +Comment[ta]=libkab இலிரà¯à®¨à¯à®¤à¯ libkabc கà¯à®•௠மாறà¯à®±à¯à®®à¯ கரà¯à®µà®¿. +Comment[te]=libkab à°¨à±à°‚à°šà°¿ libkabc కౠమారà±à°šà± పనిమà±à°Ÿà±à°Ÿà± +Comment[tg]=аÑбоби дигаргунÑози libkab ба libkabc +Comment[th]=เครื่องมือเปลี่ยน libkab เป็น libkabc +Comment[tr]=libkab' tan libkabc' ye dönüştürme aracı +Comment[tt]=libkab-›libkabc äyländerü qoralı. +Comment[uk]=ЗаÑіб Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ libkab до libkabc. +Comment[uz]=libkab'ni libkabc'ga aylantiradigan vosita. +Comment[uz@cyrillic]=libkab'ни libkabc'га айлантирадиган воÑита. +Comment[ven]=Tshishumiswa tsha u shandukisa libkab itshi ya kha libkabc +Comment[vi]=Công cụ chuyển đổi libkab sang libkabc. +Comment[xh]=libkab kwi libkabc isixhobo sokuguqulela. +Comment[zh_CN]=libkab 到 libkabc 的转æ¢å·¥å…·ã€‚ +Comment[zh_HK]=libkab 至 libkabc 的轉æ›å·¥å…· +Comment[zh_TW]=libkab 至 libkabc 轉æ›å·¥å…· +Comment[zu]=Ithuluzi lokuguqula le-libkab kuyaku-libkabc +Terminal=false +NoDisplay=true +X-TDE-autostart-condition=tdeab2tdeabcrc:Startup:EnableAutostart:true +OnlyShowIn=TDE; diff --git a/tdeabc/tests/Makefile.am b/tdeabc/tests/Makefile.am new file mode 100644 index 000000000..201cf746a --- /dev/null +++ b/tdeabc/tests/Makefile.am @@ -0,0 +1,55 @@ +# Make sure $(all_includes) remains last! +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ + -I$(srcdir)/../vcardparser/ -I$(srcdir)/../vcard/include \ + -I$(srcdir)/../vcard/include/generated \ + -I$(srcdir)/../vcardparser $(all_includes) +LDADD = ../libkabc.la + +METASOURCES = AUTO + +check_PROGRAMS = testlock testldapclient + +testlock_LDFLAGS = $(all_libraries) +testlock_SOURCES = testlock.cpp + +testldapclient_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testldapclient_SOURCES = testldapclient.cpp + +EXTRA_PROGRAMS = testkabc testkabcdlg testdistlist bigread bigwrite testdb \ + testaddressee testaddresseelist testaddressfmt kabcargl testaddresslineedit + +testkabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testkabc_SOURCES = testkabc.cpp + +testaddressee_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddressee_SOURCES = testaddressee.cpp + +testaddresseelist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddresseelist_SOURCES = testaddresseelist.cpp + +testaddressfmt_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddressfmt_SOURCES = testaddressfmt.cpp + +testkabcdlg_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testkabcdlg_SOURCES = testkabcdlg.cpp + +testdistlist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testdistlist_SOURCES = testdistlist.cpp + +testaddresslineedit_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddresslineedit_SOURCES = testaddresslineedit.cpp + +bigread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +bigread_LDADD = ../libkabc.la $(top_builddir)/tdeabc/plugins/file/libkabc_file.la +bigread_SOURCES = bigread.cpp + +bigwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +bigwrite_LDADD = ../libkabc.la $(top_builddir)/tdeabc/plugins/file/libkabc_file.la +bigwrite_SOURCES = bigwrite.cpp + +testdb_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testdb_SOURCES = testdb.cpp + +kabcargl_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +kabcargl_SOURCES = kabcargl.cpp + diff --git a/tdeabc/tests/bigread.cpp b/tdeabc/tests/bigread.cpp new file mode 100644 index 000000000..a5022367c --- /dev/null +++ b/tdeabc/tests/bigread.cpp @@ -0,0 +1,65 @@ +#include + +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "vcardformat.h" +#include "plugins/file/resourcefile.h" +#if 0 +#include "resourcesql.h" +#endif + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("bigread","BigReadKabc","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app( false, false ); + + AddressBook ab; + + ResourceFile r( "my.kabc", "vcard2" ); + ab.addResource( &r ); + +#if 0 + ResourceSql rsql( &ab, "root", "kde4ever", "localhost" ); + ab.addResource( &rsql ); +#endif + + struct tms start; + + times( &start ); + +#if 0 + kdDebug() << "utime : " << int( start.tms_utime ) << endl; + kdDebug() << "stime : " << int( start.tms_stime ) << endl; + kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; +#endif + + kdDebug() << "Start load" << endl; + ab.load(); + kdDebug() << "Finished load" << endl; + + struct tms end; + + times( &end ); + +#if 0 + kdDebug() << "utime : " << int( end.tms_utime ) << endl; + kdDebug() << "stime : " << int( end.tms_stime ) << endl; + kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; +#endif + + kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; + kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; + +// ab.dump(); +} diff --git a/tdeabc/tests/bigwrite.cpp b/tdeabc/tests/bigwrite.cpp new file mode 100644 index 000000000..4b9fa7bc3 --- /dev/null +++ b/tdeabc/tests/bigwrite.cpp @@ -0,0 +1,70 @@ +#include + +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "vcardformat.h" +#include "plugins/file/resourcefile.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("bigwrite","BigWriteKabc","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app( false, false ); + + AddressBook ab; + ResourceFile r( "my.kabc", "vcard" ); + ab.addResource( &r ); + + for( int i = 0; i < 5000; ++i ) { + Addressee a; + a.setGivenName( "number" + TQString::number( i ) ); + a.setFamilyName( "Name" ); + a.insertEmail( TQString::number( i ) + "@domain" ); + + ab.insertAddressee( a ); + } + printf( "\n" ); + + Ticket *t = ab.requestSaveTicket( &r ); + if ( t ) { + struct tms start; + + times( &start ); + +#if 0 + kdDebug() << "utime : " << int( start.tms_utime ) << endl; + kdDebug() << "stime : " << int( start.tms_stime ) << endl; + kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; +#endif + + if ( !ab.save( t ) ) { + kdDebug() << "Can't save." << endl; + } + + struct tms end; + + times( &end ); + +#if 0 + kdDebug() << "utime : " << int( end.tms_utime ) << endl; + kdDebug() << "stime : " << int( end.tms_stime ) << endl; + kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; +#endif + + kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; + kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; + + } else { + kdDebug() << "No ticket for save." << endl; + } +} diff --git a/tdeabc/tests/kabcargl.cpp b/tdeabc/tests/kabcargl.cpp new file mode 100644 index 000000000..e38a8a22e --- /dev/null +++ b/tdeabc/tests/kabcargl.cpp @@ -0,0 +1,70 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "stdaddressbook.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("kabcargl","Fix broken pre3.0rc3 format","0.1"); + aboutData.addAuthor("Cornelius Schumacher", 0, "schumacher@kde.org"); + + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app; + + TQString filename = StdAddressBook::fileName(); + + TQFile f( filename ); + if ( !f.open( IO_ReadOnly ) ) { + kdDebug() << "Error opening file '" << filename << "' for reading." << endl; + return 1; + } + + TQTextStream t( &f ); + t.setEncoding(TQTextStream::UnicodeUTF8); + TQString text = t.read(); + f.close(); + + text = TQString::fromUtf8( text.local8Bit() ); + text.replace( "\n", "\r\n" ); + + if ( !f.open( IO_WriteOnly ) ) { + kdDebug() << "Error opening file '" << filename << "' for writing." << endl; + return 1; + } + + TQTextStream t2( &f ); + t2.setEncoding(TQTextStream::UnicodeUTF8); + t2 << text; + f.close(); +} diff --git a/tdeabc/tests/testaddressee.cpp b/tdeabc/tests/testaddressee.cpp new file mode 100644 index 000000000..ef55ae403 --- /dev/null +++ b/tdeabc/tests/testaddressee.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "plugins/file/resourcefile.h" +#include "formats/binaryformat.h" +#include "vcardformat.h" +#include "phonenumber.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "save", "", 0 }, + { "number", "", 0 }, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testaddressee","TestAddressee","0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); + + kdDebug() << "Creating a" << endl; + Addressee a; + + kdDebug() << "tick1" << endl; + a.setGivenName("Hans"); + kdDebug() << "tick2" << endl; + a.setPrefix("Dr."); + + kdDebug() << "Creating b" << endl; + Addressee b( a ); + + kdDebug() << "tack1" << endl; + a.setFamilyName("Wurst"); + kdDebug() << "tack2" << endl; + a.setNickName("hansi"); + + kdDebug() << "Creating c" << endl; + Addressee c = a; + + kdDebug() << "tock1" << endl; + c.setGivenName("Eberhard"); + + a.dump(); + b.dump(); + c.dump(); +} diff --git a/tdeabc/tests/testaddresseelist.cpp b/tdeabc/tests/testaddresseelist.cpp new file mode 100644 index 000000000..f247f1744 --- /dev/null +++ b/tdeabc/tests/testaddresseelist.cpp @@ -0,0 +1,196 @@ +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "addresseelist.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "save", "", 0 }, + { "number", "", 0 }, + TDECmdLineLastOption +}; + +int main(int /*argc*/,char /* **argv*/) +{ +/* TDEAboutData aboutData("testaddresseelist","TestAddresseeList","0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); */ + + kdDebug() << "Creating addressees" << endl; + Addressee a, b, c, d, e, f; + a.setGivenName ("Peter"); + a.setFamilyName("Pan"); + a.setFormattedName("Pan, Peter"); + a.setUid("Asdf"); + b.setGivenName ("Phileas"); + b.setFamilyName("Fogg"); + b.setFormattedName("Fogg, Phileas"); + b.setUid("Rsdf"); + c.setGivenName ("Jim"); + c.setFamilyName("Hawkins"); + c.setFormattedName("Hawkins, Jim"); + c.setUid("Fhwn"); + d.setGivenName ("John"); + d.setFamilyName("Silver"); + d.setPrefix ("Long"); + d.setFormattedName("Long John Silver"); + d.setUid("Z2hk"); + e.setGivenName ("Alice"); + e.setFamilyName("Liddel"); + e.setFormattedName("Liddel, Alice"); + e.setUid("kk45"); + f.setGivenName ("Edmond"); + f.setFamilyName("Dantes"); + f.setFormattedName("Dantes, Edmond"); + f.setUid("78ze"); + + kdDebug() << "Adding to list" << endl; + AddresseeList list; + list.append(a); + list.append(b); + list.append(c); + list.append(d); + list.append(e); + list.append(f); + + list.sortBy(FamilyName); + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Rsdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="kk45" + && (*list.at(4)).uid()=="Asdf" + && (*list.at(5)).uid()=="Z2hk" + ) ) { + kdError() << "SORTING BY FAMILY NAME NOT CORRECT!" << endl; + kdDebug() << "list sorted by family name:" << endl; + list.dump(); + } else { + kdDebug() << "Sorting by family name correct." << endl; + } + list.setReverseSorting(true); + list.sort(); + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Rsdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="kk45" + && (*list.at(1)).uid()=="Asdf" + && (*list.at(0)).uid()=="Z2hk" + ) ) { + kdError() << "REVERSE SORTING BY FAMILY NAME NOT CORRECT!" << endl; + kdDebug() << "list reverse sorted by family name:" << endl; + list.dump(); + } else { + kdDebug() << "Reverse sorting by family name correct." << endl; + } + + list.setReverseSorting(false); + list.sortBy(FormattedName); + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Rsdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="kk45" + && (*list.at(4)).uid()=="Z2hk" + && (*list.at(5)).uid()=="Asdf" + ) ) { + kdError() << "SORTING BY FORMATTED NAME NOT CORRECT!" << endl; + kdDebug() << "list sorted by formatted name:" << endl; + list.dump(); + } else { + kdDebug() << "Sorting by formatted name correct." << endl; + } + list.setReverseSorting(true); + list.sort(); + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Rsdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="kk45" + && (*list.at(1)).uid()=="Z2hk" + && (*list.at(0)).uid()=="Asdf" + ) ) { + kdError() << "REVERSE SORTING BY FORMATTED NAME NOT CORRECT!" << endl; + kdDebug() << "list reverse sorted by formatted name:" << endl; + list.dump(); + } else { + kdDebug() << "Reverse sorting by formatted name correct." << endl; + } + + + list.setReverseSorting(false); + list.sortBy(Uid); + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Asdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="Rsdf" + && (*list.at(4)).uid()=="Z2hk" + && (*list.at(5)).uid()=="kk45" + ) ) { + kdError() << "SORTING BY UID NOT CORRECT!" << endl; + kdDebug() << "list sorted by Uid:" << endl; + list.dump(); + } else { + kdDebug() << "Sorting by Uid correct." << endl; + } + list.setReverseSorting(true); + list.sortBy(Uid); + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Asdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="Rsdf" + && (*list.at(1)).uid()=="Z2hk" + && (*list.at(0)).uid()=="kk45" + ) ) { + kdError() << "REVERSE SORTING BY UID NOT CORRECT!" << endl; + kdDebug() << "list sorted by Uid:" << endl; + list.dump(); + } else { + kdDebug() << "Reverse sorting by Uid correct." << endl; + } + + // zero, one or two entries might give errors in a poor sorting + // implementation + kdDebug() << "sorting empty list" << endl; + AddresseeList list2; + list2.sort(); + + kdDebug() << "sorting one entry list" << endl; + list2.append(a); + list2.sort(); + + kdDebug() << "sorting two entry list" << endl; + list2.append(f); + list2.setReverseSorting(false); + list2.sort(); + if ( !( (*list2.at(0)).uid()=="78ze" + && (*list2.at(1)).uid()=="Asdf" + ) ) { + kdError() << "SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; + kdDebug() << "list sorted by formatted name, two entries:" << endl; + list2.dump(); + } else { + kdDebug() << "Sorting by FormattedName in a two entry list correct." << endl; + } + list2.setReverseSorting(true); + list2.sort(); + if ( !( (*list2.at(1)).uid()=="78ze" + && (*list2.at(0)).uid()=="Asdf" + ) ) { + kdError() << "REVERSE SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; + kdDebug() << "list reverse sorted by formatted name, two entries:" << endl; + list2.dump(); + } else { + kdDebug() << "Reverse sorting by FormattedName in a two entry list correct." << endl; + } + +} + + diff --git a/tdeabc/tests/testaddressfmt.cpp b/tdeabc/tests/testaddressfmt.cpp new file mode 100644 index 000000000..2eb438335 --- /dev/null +++ b/tdeabc/tests/testaddressfmt.cpp @@ -0,0 +1,63 @@ +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "address.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "save", "", 0 }, + { "number", "", 0 }, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testaddressfmt","TestAddressFormat","0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + + Address a; + a.setStreet("Lummerlandstr. 1"); + a.setPostalCode("12345"); + a.setLocality("Lummerstadt"); + a.setCountry ("Germany"); + + Address b; + b.setStreet("457 Foobar Ave"); + b.setPostalCode("1A2B3C"); + b.setLocality("Nervousbreaktown"); + b.setRegion("DC"); + b.setCountry("United States of America"); + + Address c; + c.setStreet("Lummerlandstr. 1"); + c.setPostalCode("12345"); + c.setLocality("Lummerstadt"); + c.setCountry ("Deutschland"); + + Address d; + d.setStreet("Lummerlandstr. 1"); + d.setPostalCode("12345"); + d.setLocality("Lummerstadt"); + d.setCountry (""); + + tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); + tqDebug( a.formattedAddress("Jim Knopf").latin1() ); + tqDebug( "-------------------------------------\nShould have US address formatting, local country formatting\n" ); + tqDebug( b.formattedAddress("Huck Finn").latin1() ); + tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); + tqDebug( c.formattedAddress("Jim Knopf").latin1() ); + tqDebug( "-------------------------------------\nShould have local address formatting, local country formatting\n" ); + tqDebug( d.formattedAddress("Jim Knopf").latin1() ); +} + + diff --git a/tdeabc/tests/testaddresslineedit.cpp b/tdeabc/tests/testaddresslineedit.cpp new file mode 100644 index 000000000..74446f482 --- /dev/null +++ b/tdeabc/tests/testaddresslineedit.cpp @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include + +#include "addresslineedit.h" + +using namespace KABC; + +int main( int argc,char **argv ) +{ + TDEAboutData aboutData( "testaddresslineedit", + I18N_NOOP( "Test Address LineEdit" ), "0.1" ); + TDECmdLineArgs::init( argc, argv, &aboutData ); + + TDEApplication app; + + AddressLineEdit *lineEdit = new AddressLineEdit( 0 ); + + lineEdit->show(); + app.setMainWidget( lineEdit ); + + TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); + + app.exec(); + + delete lineEdit; +} diff --git a/tdeabc/tests/testdb.cpp b/tdeabc/tests/testdb.cpp new file mode 100644 index 000000000..f7ec1d17c --- /dev/null +++ b/tdeabc/tests/testdb.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "vcardformat.h" +#include "resourcesql.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testdb","TestKabcDB","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + +// TDEApplication app( false, false ); + TDEApplication app; + + AddressBook ab; + + ResourceSql r( &ab, "root", "kde4ever", "localhost" ); + if ( ! r.open() ) { + kdDebug() << "Failed to open resource." << endl; + } + + r.load( &ab ); + + r.close(); + + ab.dump(); +} diff --git a/tdeabc/tests/testdistlist.cpp b/tdeabc/tests/testdistlist.cpp new file mode 100644 index 000000000..69a309ff9 --- /dev/null +++ b/tdeabc/tests/testdistlist.cpp @@ -0,0 +1,59 @@ +#include + +#include +#include +#include +#include +#include + +#include "stdaddressbook.h" + +#include "distributionlisteditor.h" +#include "distributionlist.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + {"list ", I18N_NOOP("Show distribution list with name "), 0}, + TDECmdLineLastOption +}; + + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testdistlist",I18N_NOOP("Test Distribution Lists"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if (args->isSet("list")) { + TQString name = args->getOption("list"); + + DistributionListManager *manager = + new DistributionListManager( StdAddressBook::self() ); + manager->load(); + DistributionList *list = manager->list( name ); + if ( !list ) { + kdDebug() << "No list with name '" << name << "'" << endl; + return 1; + } else { + kdDebug() << "RESULT: " << list->emails().join(", ") << endl; + return 0; + } + } + + DistributionListEditor *editor = + new DistributionListEditor( StdAddressBook::self(), 0 ); + + editor->show(); + app.setMainWidget(editor); + + TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); + + app.exec(); + + delete editor; +} diff --git a/tdeabc/tests/testkabc.cpp b/tdeabc/tests/testkabc.cpp new file mode 100644 index 000000000..427262cab --- /dev/null +++ b/tdeabc/tests/testkabc.cpp @@ -0,0 +1,62 @@ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "geo.h" +#include "secrecy.h" +#include "stdaddressbook.h" +#include "timezone.h" +#include "key.h" +#include "agent.h" +#include "vcardconverter.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testkabc",I18N_NOOP("TestKabc"),"0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + + TDEApplication app( false, false ); + AddressBook *ab = StdAddressBook::self(); + +#define READ + +#ifdef READ + AddressBook::Iterator it; + for ( it = ab->begin(); it != ab->end(); ++it ) { + TQString vcard; + VCardConverter converter; + converter.addresseeToVCard( *it, vcard ); + kdDebug() << "card=" << vcard << endl; + } +#else + Addressee addr; + + addr.setGivenName("Tobias"); + addr.setFamilyName("Koenig"); + + + Picture pic; + TQImage img; + img.load("/home/tobias/test.png"); +/* + pic.setData(img); + pic.setType(TQImage::imageFormat("/home/tobias/test.png")); +*/ + pic.setUrl("http://www.mypict.de"); + addr.setLogo( pic ); + + ab->insertAddressee( addr ); + + StdAddressBook::save(); +#endif + + return 0; +} diff --git a/tdeabc/tests/testkabcdlg.cpp b/tdeabc/tests/testkabcdlg.cpp new file mode 100644 index 000000000..aef203d28 --- /dev/null +++ b/tdeabc/tests/testkabcdlg.cpp @@ -0,0 +1,45 @@ +#include + +#include +#include +#include +#include +#include + +#include "addresseedialog.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + {"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0}, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testkabcdlg",I18N_NOOP("TestKabc"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if (args->isSet("multiple")) { + Addressee::List al = AddresseeDialog::getAddressees( 0 ); + Addressee::List::ConstIterator it; + kdDebug() << "Selected Addressees:" << endl; + for( it = al.begin(); it != al.end(); ++it ) { + kdDebug() << " " << (*it).fullEmail() << endl; + } + } else { + Addressee a = AddresseeDialog::getAddressee( 0 ); + + if ( !a.isEmpty() ) { + kdDebug() << "Selected Addressee:" << endl; + a.dump(); + } else { + kdDebug() << "No Addressee selected." << endl; + } + } +} diff --git a/tdeabc/tests/testldapclient.cpp b/tdeabc/tests/testldapclient.cpp new file mode 100644 index 000000000..df9fd6226 --- /dev/null +++ b/tdeabc/tests/testldapclient.cpp @@ -0,0 +1,161 @@ +/* This file is part of the KDE project + Copyright (C) 2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testldapclient.h" + +#include +#include +#include + +#include + +#include +#include + +int main(int argc, char *argv[]) +{ + TDEApplication::disableAutoDcopRegistration(); + TDECmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0); + TDEApplication app; + + TestLDAPClient test; + test.setup(); + test.runAll(); + test.cleanup(); + kdDebug() << "All tests OK." << endl; + return 0; +} + +void TestLDAPClient::setup() +{ +} + +void TestLDAPClient::runAll() +{ + testIntevation(); +} + +bool TestLDAPClient::check(const TQString& txt, TQString a, TQString b) +{ + if (a.isEmpty()) + a = TQString::null; + if (b.isEmpty()) + b = TQString::null; + if (a == b) { + kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; + } + else { + kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; + cleanup(); + exit(1); + } + return true; +} + +void TestLDAPClient::cleanup() +{ + mClient = 0; +} + +void TestLDAPClient::testIntevation() +{ + kdDebug() << k_funcinfo << endl; + mClient = new LdapClient( this ); + + mClient->setHost( "ca.intevation.de" ); + mClient->setPort( "389" ); + mClient->setBase( "o=Intevation GmbH,c=de" ); + + // Same list as in kaddressbook's ldapsearchdialog + TQStringList attrs; + attrs << "l" << "Company" << "co" << "department" << "description" << "mail" << "facsimileTelephoneNumber" << "cn" << "homePhone" << "mobile" << "o" << "pager" << "postalAddress" << "st" << "street" << "title" << "uid" << "telephoneNumber" << "postalCode" << "objectClass"; + // the list from ldapclient.cpp + //attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass"; + mClient->setAttrs( attrs ); + + // Taken from LdapSearch + //TQString mSearchText = TQString::fromUtf8( "Till" ); + //TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" ) + // .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); + + // For some reason a fromUtf8 broke the search for me (no results). + // But this certainly looks fishy, it might break on non-utf8 systems. + TQString filter = "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(|(cn=*Ägypten MDK*)(sn=*Ägypten MDK*))"; + + connect( mClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), + this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); + connect( mClient, TQT_SIGNAL( done() ), + this, TQT_SLOT( slotLDAPDone() ) ); + connect( mClient, TQT_SIGNAL( error( const TQString& ) ), + this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); + mClient->startQuery( filter ); + kapp->eventLoop()->enterLoop(); + delete mClient; mClient = 0; +} + +// from kaddressbook... ugly though... +static TQString asUtf8( const TQByteArray &val ) +{ + if ( val.isEmpty() ) + return TQString::null; + + const char *data = val.data(); + + //TQString::fromUtf8() bug workaround + if ( data[ val.size() - 1 ] == '\0' ) + return TQString::fromUtf8( data, val.size() - 1 ); + else + return TQString::fromUtf8( data, val.size() ); +} + +static TQString join( const KABC::LdapAttrValue& lst, const TQString& sep ) +{ + TQString res; + bool already = false; + for ( KABC::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + if ( already ) + res += sep; + already = TRUE; + res += asUtf8( *it ); + } + return res; +} + +void TestLDAPClient::slotLDAPResult( const KABC::LdapObject& obj ) +{ + TQString cn = join( obj.attrs[ "cn" ], ", " ); + kdDebug() << " cn:" << cn << endl; + assert( !obj.attrs[ "mail" ].isEmpty() ); + TQString mail = join( obj.attrs[ "mail" ], ", " ); + kdDebug() << " mail:" << mail << endl; + assert( mail.contains( '@' ) ); +} + +void TestLDAPClient::slotLDAPError( const TQString& err ) +{ + kdDebug() << k_funcinfo << err << endl; + ::exit( 1 ); +} + +void TestLDAPClient::slotLDAPDone() +{ + kdDebug() << k_funcinfo << endl; + kapp->eventLoop()->exitLoop(); +} + +#include "testldapclient.moc" diff --git a/tdeabc/tests/testldapclient.h b/tdeabc/tests/testldapclient.h new file mode 100644 index 000000000..1995914c3 --- /dev/null +++ b/tdeabc/tests/testldapclient.h @@ -0,0 +1,51 @@ +/* This file is part of the KDE project + Copyright (C) 2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TESTLDAPCLIENT_H +#define TESTLDAPCLIENT_H + +#include + +#include "../ldapclient.h" +typedef KABC::LdapClient LdapClient; + +class TestLDAPClient : public TQObject +{ + Q_OBJECT + +public: + TestLDAPClient() {} + void setup(); + void runAll(); + void cleanup(); + + // tests + void testIntevation(); + +private slots: + void slotLDAPResult( const KABC::LdapObject& ); + void slotLDAPError( const TQString& ); + void slotLDAPDone(); + +private: + bool check(const TQString& txt, TQString a, TQString b); + + LdapClient* mClient; +}; + +#endif diff --git a/tdeabc/tests/testlock.cpp b/tdeabc/tests/testlock.cpp new file mode 100644 index 000000000..3ebd724bb --- /dev/null +++ b/tdeabc/tests/testlock.cpp @@ -0,0 +1,206 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testlock.h" + +#include "stdaddressbook.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +using namespace KABC; + +LockWidget::LockWidget( const TQString &identifier ) +{ + TQVBoxLayout *topLayout = new TQVBoxLayout( this ); + topLayout->setMargin( KDialog::marginHint() ); + topLayout->setSpacing( KDialog::spacingHint() ); + + if ( identifier.isEmpty() ) { + mLock = 0; + } else { + mLock = new Lock( identifier ); + + int pid = getpid(); + + TQLabel *pidLabel = new TQLabel( "Process ID: " + TQString::number( pid ), + this ); + topLayout->addWidget( pidLabel ); + + TQHBoxLayout *identifierLayout = new TQHBoxLayout( topLayout ); + + TQLabel *resourceLabel = new TQLabel( "Identifier:", this ); + identifierLayout->addWidget( resourceLabel ); + + TQLabel *resourceIdentifier = new TQLabel( identifier, this ); + identifierLayout->addWidget( resourceIdentifier ); + + mStatus = new TQLabel( "Status: Unlocked", this ); + topLayout->addWidget( mStatus ); + + TQPushButton *button = new TQPushButton( "Lock", this ); + topLayout->addWidget( button ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( lock() ) ); + + button = new TQPushButton( "Unlock", this ); + topLayout->addWidget( button ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( unlock() ) ); + } + + mLockView = new TQListView( this ); + topLayout->addWidget( mLockView ); + mLockView->addColumn( "Lock File" ); + mLockView->addColumn( "PID" ); + mLockView->addColumn( "Locking App" ); + + updateLockView(); + + TQPushButton *quitButton = new TQPushButton( "Quit", this ); + topLayout->addWidget( quitButton ); + connect( quitButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) ); + + KDirWatch *watch = KDirWatch::self(); + connect( watch, TQT_SIGNAL( dirty( const TQString & ) ), + TQT_SLOT( updateLockView() ) ); + connect( watch, TQT_SIGNAL( created( const TQString & ) ), + TQT_SLOT( updateLockView() ) ); + connect( watch, TQT_SIGNAL( deleted( const TQString & ) ), + TQT_SLOT( updateLockView() ) ); + watch->addDir( Lock::locksDir() ); + watch->startScan(); +} + +LockWidget::~LockWidget() +{ + delete mLock; +} + +void LockWidget::updateLockView() +{ + mLockView->clear(); + + TQDir dir( Lock::locksDir() ); + + TQStringList files = dir.entryList( "*.lock" ); + + TQStringList::ConstIterator it; + for( it = files.begin(); it != files.end(); ++it ) { + if ( *it == "." || *it == ".." ) continue; + + TQString app; + int pid; + if ( !Lock::readLockFile( dir.filePath( *it ), pid, app ) ) { + kdWarning() << "Unable to open lock file '" << *it << "'" << endl; + } else { + new TQListViewItem( mLockView, *it, TQString::number( pid ), app ); + } + } +} + +void LockWidget::lock() +{ + if ( !mLock->lock() ) { + KMessageBox::sorry( this, mLock->error() ); + } else { + mStatus->setText( "Status: Locked" ); + } +} + +void LockWidget::unlock() +{ + if ( !mLock->unlock() ) { + KMessageBox::sorry( this, mLock->error() ); + } else { + mStatus->setText( "Status: Unlocked" ); + } +} + + +static const TDECmdLineOptions options[] = +{ + { "a", 0, 0 }, + { "addressbook", "Standard address book", 0 }, + { "d", 0, 0 }, + { "diraddressbook", "Standard address book directory resource", 0 }, + { "+identifier", "Identifier of resource to be locked, e.g. filename", 0 }, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testlock",I18N_NOOP("Test libkabc Lock"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TQString identifier; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if ( args->count() == 1 ) { + identifier = args->arg( 0 ); + } else if ( args->count() != 0 ) { + std::cerr << "Usage: testlock " << std::endl; + return 1; + } + + if ( args->isSet( "addressbook" ) ) { + if ( args->count() == 1 ) { + std::cerr << "Ignoring resource identifier" << std::endl; + } + identifier = StdAddressBook::fileName(); + } + + if ( args->isSet( "diraddressbook" ) ) { + if ( args->count() == 1 ) { + std::cerr << "Ignoring resource identifier" << std::endl; + } + identifier = StdAddressBook::directoryName(); + } + + LockWidget mainWidget( identifier ); + + kapp->setMainWidget( &mainWidget ); + mainWidget.show(); + + return app.exec(); +} + +#include "testlock.moc" diff --git a/tdeabc/tests/testlock.h b/tdeabc/tests/testlock.h new file mode 100644 index 000000000..a94d4e8c6 --- /dev/null +++ b/tdeabc/tests/testlock.h @@ -0,0 +1,51 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_TESTLOCK_H +#define KABC_TESTLOCK_H + +#include "lock.h" + +#include + +class TQLabel; +class TQListView; + +class KABC_EXPORT LockWidget : public TQWidget +{ + Q_OBJECT + public: + LockWidget( const TQString &identifier ); + ~LockWidget(); + + protected slots: + void lock(); + void unlock(); + + void updateLockView(); + + private: + KABC::Lock *mLock; + + TQLabel *mStatus; + TQListView *mLockView; +}; + +#endif diff --git a/tdeabc/timezone.cpp b/tdeabc/timezone.cpp new file mode 100644 index 000000000..59a184c6d --- /dev/null +++ b/tdeabc/timezone.cpp @@ -0,0 +1,85 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "timezone.h" + +using namespace KABC; + +TimeZone::TimeZone() : + mOffset( 0 ), mValid( false ) +{ +} + +TimeZone::TimeZone( int offset ) : + mOffset( offset ), mValid( true ) +{ +} + +void TimeZone::setOffset( int offset ) +{ + mOffset = offset; + mValid = true; +} + +int TimeZone::offset() const +{ + return mOffset; +} + +bool TimeZone::isValid() const +{ + return mValid; +} + +bool TimeZone::operator==( const TimeZone &t ) const +{ + if ( !t.isValid() && !isValid() ) return true; + if ( !t.isValid() || !isValid() ) return false; + if ( t.mOffset == mOffset ) return true; + return false; +} + +bool TimeZone::operator!=( const TimeZone &t ) const +{ + if ( !t.isValid() && !isValid() ) return false; + if ( !t.isValid() || !isValid() ) return true; + if ( t.mOffset != mOffset ) return true; + return false; +} + +TQString TimeZone::asString() const +{ + return TQString::number( mOffset ); +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const TimeZone &zone ) +{ + return s << zone.mOffset; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, TimeZone &zone ) +{ + s >> zone.mOffset; + zone.mValid = true; + + return s; +} diff --git a/tdeabc/timezone.h b/tdeabc/timezone.h new file mode 100644 index 000000000..8705797fb --- /dev/null +++ b/tdeabc/timezone.h @@ -0,0 +1,89 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_TIMEZONE_H +#define KABC_TIMEZONE_H + +#include + +#include + +namespace KABC { + +/** + * @short Time zone information. + * + * This class stores information about a time zone. + */ +class KABC_EXPORT TimeZone +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); + +public: + + /** + * Construct invalid time zone. + */ + TimeZone(); + + /** + * Construct time zone. + * + * @param offset Offset in minutes relative to UTC. + */ + TimeZone( int offset ); + + /** + * Set time zone offset relative to UTC. + * + * @param offset Offset in minutes. + */ + void setOffset( int offset ); + + /** + * Return offset in minutes relative to UTC. + */ + int offset() const; + + /** + * Return, if this time zone object is valid. + */ + bool isValid() const; + + bool operator==( const TimeZone & ) const; + bool operator!=( const TimeZone & ) const; + + /** + * Return string representation of time zone offset. + */ + TQString asString() const; + +private: + int mOffset; // Offset in minutes + + bool mValid; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); + +} +#endif diff --git a/tdeabc/vcard/AdrParam.cpp b/tdeabc/vcard/AdrParam.cpp new file mode 100644 index 000000000..5ad56f4fb --- /dev/null +++ b/tdeabc/vcard/AdrParam.cpp @@ -0,0 +1,126 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +using namespace VCARD; + +AdrParam::AdrParam() + : Param() +{ +} + +AdrParam::AdrParam(const AdrParam & x) + : Param(x), + adrTypeList_ (x.adrTypeList_) +{ +} + +AdrParam::AdrParam(const TQCString & s) + : Param(s) +{ +} + + AdrParam & +AdrParam::operator = (AdrParam & x) +{ + if (*this == x) return *this; + + adrTypeList_ = x.adrTypeList(); + textParam_ = x.textParam(); + + Param::operator = (x); + return *this; +} + + AdrParam & +AdrParam::operator = (const TQCString & s) +{ + Param::operator = (s); + + adrTypeList_.clear(); + textParam_.truncate(0); + + return *this; +} + + bool +AdrParam::operator == (AdrParam & x) +{ + parse(); + + if (!x.textParam().isEmpty()) + return (x.textParam_ == textParam_); + + if (x.adrTypeList().count() != adrTypeList_.count()) + return false; + + TQStrListIterator it(x.adrTypeList_); + + for (; it.current(); ++it) + if (!adrTypeList_.find(it.current())) + return false; + + return true; +} + +AdrParam::~AdrParam() +{ +} + + void +AdrParam::_parse() +{ + adrTypeList_.clear(); + + if (strRep_.left(4) != "TYPE") { + textParam_ = strRep_; + return; + } + + if (!strRep_.contains('=')) + return; + + RTokenise(strRep_, ",", adrTypeList_); +} + + void +AdrParam::_assemble() +{ + if (!textParam_.isEmpty()) { + strRep_ = textParam_; + return; + } + + TQStrListIterator it(adrTypeList_); + + for (; it.current(); ++it) { + + strRep_ += it.current(); + + if (it.current() != adrTypeList_.last()) + strRep_ += ','; + } +} diff --git a/tdeabc/vcard/AdrValue.cpp b/tdeabc/vcard/AdrValue.cpp new file mode 100644 index 000000000..535ba6980 --- /dev/null +++ b/tdeabc/vcard/AdrValue.cpp @@ -0,0 +1,140 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include +#include + +using namespace VCARD; + +AdrValue::AdrValue() + : Value() +{ +} + +AdrValue::AdrValue(const AdrValue & x) + : Value(x), + poBox_ (x.poBox_), + extAddress_ (x.extAddress_), + street_ (x.street_), + locality_ (x.locality_), + region_ (x.region_), + postCode_ (x.postCode_), + countryName_ (x.countryName_) +{ +} + +AdrValue::AdrValue(const TQCString & s) + : Value(s) +{ +} + + AdrValue & +AdrValue::operator = (AdrValue & x) +{ + if (*this == x) return *this; + + poBox_ = x.poBox_; + extAddress_ = x.extAddress_; + street_ = x.street_; + locality_ = x.locality_; + region_ = x.region_; + postCode_ = x.postCode_; + countryName_ = x.countryName_; + + Value::operator = (x); + return *this; +} + + AdrValue & +AdrValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +AdrValue::operator == (AdrValue & x) +{ + parse(); + x.parse(); + + return ( + poBox_ == x.poBox_ && + extAddress_ == x.extAddress_ && + street_ == x.street_ && + locality_ == x.locality_ && + region_ == x.region_ && + postCode_ == x.postCode_ && + countryName_ == x.countryName_); +} + +AdrValue::~AdrValue() +{ +} + + AdrValue * +AdrValue::clone() +{ + return new AdrValue( *this ); +} + + void +AdrValue::_parse() +{ + vDebug("AdrValue::_parse()"); + + TQStrList l; + RTokenise(strRep_, ";", l); + + for (unsigned int i = 0; i < l.count(); i++) { + + switch (i) { + + case 0: poBox_ = l.at(0); break; + case 1: extAddress_ = l.at(1); break; + case 2: street_ = l.at(2); break; + case 3: locality_ = l.at(3); break; + case 4: region_ = l.at(4); break; + case 5: postCode_ = l.at(5); break; + case 6: countryName_ = l.at(6); break; + default: break; + } + } +} + + void +AdrValue::_assemble() +{ + vDebug("AdrValue::_assemble"); + + strRep_ = poBox_; + strRep_ += ";" + extAddress_; + strRep_ += ";" + street_; + strRep_ += ";" + locality_; + strRep_ += ";" + region_; + strRep_ += ";" + postCode_; + strRep_ += ";" + countryName_; +} + diff --git a/tdeabc/vcard/AgentParam.cpp b/tdeabc/vcard/AgentParam.cpp new file mode 100644 index 000000000..9e4531b02 --- /dev/null +++ b/tdeabc/vcard/AgentParam.cpp @@ -0,0 +1,103 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +AgentParam::AgentParam() + : Param() +{ +} + +AgentParam::AgentParam(const AgentParam & x) + : Param(x), + refer_ (x.refer_), + uri_ (x.uri_) +{ +} + +AgentParam::AgentParam(const TQCString & s) + : Param(s) +{ +} + + AgentParam & +AgentParam::operator = (AgentParam & x) +{ + if (*this == x) return *this; + + refer_ = x.refer_; + uri_ = x.uri_; + + Param::operator = (x); + return *this; +} + + AgentParam & +AgentParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +AgentParam::operator == (AgentParam & x) +{ + parse(); + + if (refer_) + return (x.refer() && uri_ == x.uri_); + + return !x.refer(); +} + +AgentParam::~AgentParam() +{ +} + + void +AgentParam::_parse() +{ + if (strRep_.isEmpty()) { + refer_ = false; + return; + } + + refer_ = true; + uri_ = strRep_; +} + + void +AgentParam::_assemble() +{ + if (!refer_) { + strRep_.truncate(0); + return; + } + + strRep_ = uri_.asString(); + return; +} diff --git a/tdeabc/vcard/AgentValue.cpp b/tdeabc/vcard/AgentValue.cpp new file mode 100644 index 000000000..7d356f8d7 --- /dev/null +++ b/tdeabc/vcard/AgentValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +AgentValue::AgentValue() + : Value() +{ +} + +AgentValue::AgentValue(const AgentValue & x) + : Value(x) +{ +} + +AgentValue::AgentValue(const TQCString & s) + : Value(s) +{ +} + + AgentValue & +AgentValue::operator = (AgentValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + AgentValue & +AgentValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +AgentValue::operator == (AgentValue & x) +{ + x.parse(); + return false; +} + +AgentValue::~AgentValue() +{ +} + + void +AgentValue::_parse() +{ +} + + void +AgentValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/CMakeLists.txt b/tdeabc/vcard/CMakeLists.txt new file mode 100644 index 000000000..8ad988434 --- /dev/null +++ b/tdeabc/vcard/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/generated + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdecore +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### vcard ##################################### + +set( target vcard ) + +set( ${target}_SRCS + vCard-all.cpp +) + +tde_add_library( ${target} SHARED + SOURCES ${${target}_SRCS} + VERSION 0.0.0 + LINK tdecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/tdeabc/vcard/ClassValue.cpp b/tdeabc/vcard/ClassValue.cpp new file mode 100644 index 000000000..21417f87b --- /dev/null +++ b/tdeabc/vcard/ClassValue.cpp @@ -0,0 +1,120 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +ClassValue::ClassValue() + : Value() +{ +} + +ClassValue::ClassValue(const ClassValue & x) + : Value(x), + classType_(x.classType_) +{ +} + +ClassValue::ClassValue(const TQCString & s) + : Value(s) +{ +} + + ClassValue & +ClassValue::operator = (ClassValue & x) +{ + if (*this == x) return *this; + x.parse(); + + classType_ = x.classType_; + + Value::operator = (x); + return *this; +} + + ClassValue & +ClassValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +ClassValue::operator == (ClassValue & x) +{ + x.parse(); + return ( classType_ == x.classType_ ); +} + +ClassValue::~ClassValue() +{ +} + + ClassValue * +ClassValue::clone() +{ + return new ClassValue( *this ); +} + + void +ClassValue::_parse() +{ + if (tqstricmp(strRep_, "PUBLIC") == 0) + classType_ = Public; + + else if (tqstricmp(strRep_, "PRIVATE") == 0) + classType_ = Private; + + else if (tqstricmp(strRep_, "CONFIDENTIAL") == 0) + classType_ = Confidential; + + else classType_ = Other; +} + + void +ClassValue::_assemble() +{ + switch (classType_) { + + case Public: + strRep_ = "PUBLIC"; + break; + + case Private: + strRep_ = "PRIVATE"; + break; + + case Confidential: + strRep_ = "CONFIDENTIAL"; + break; + + default: + break; + } +} + diff --git a/tdeabc/vcard/ContentLine.cpp b/tdeabc/vcard/ContentLine.cpp new file mode 100644 index 000000000..52bcdf4f5 --- /dev/null +++ b/tdeabc/vcard/ContentLine.cpp @@ -0,0 +1,302 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +using namespace VCARD; + +ContentLine::ContentLine() + : Entity(), + value_(0), + paramType_( ParamUnknown ), + valueType_( ValueUnknown ), + entityType_( EntityUnknown ) +{ +} + +ContentLine::ContentLine(const ContentLine & x) + : Entity(x), + group_ (x.group_), + name_ (x.name_), + paramList_(x.paramList_), + value_(x.value_->clone()), + paramType_( x.paramType_ ), + valueType_( x.valueType_ ), + entityType_( x.entityType_ ) +{ +} + +ContentLine::ContentLine(const TQCString & s) + : Entity(s), + value_(0), + paramType_( ParamUnknown ), + valueType_( ValueUnknown ), + entityType_( EntityUnknown ) +{ +} + + ContentLine & +ContentLine::operator = (ContentLine & x) +{ + if (*this == x) return *this; + + paramList_ = x.paramList(); + value_ = x.value_->clone(); + + Entity::operator = (x); + return *this; +} + + ContentLine & +ContentLine::operator = (const TQCString & s) +{ + Entity::operator = (s); + delete value_; + value_ = 0; + return *this; +} + + bool +ContentLine::operator == (ContentLine & x) +{ + x.parse(); + + TQPtrListIterator it(x.paramList()); + + if (!paramList_.find(it.current())) + return false; + + return true; +} + +ContentLine::~ContentLine() +{ + delete value_; + value_ = 0; +} + + void +ContentLine::_parse() +{ + vDebug("parse"); + + // Unqote newlines + strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" ); + + int split = strRep_.find(':'); + + if (split == -1) { // invalid content line + vDebug("No ':'"); + return; + } + + TQCString firstPart(strRep_.left(split)); + TQCString valuePart(strRep_.mid(split + 1)); + + split = firstPart.find('.'); + + if (split != -1) { + group_ = firstPart.left(split); + firstPart = firstPart.mid(split + 1); + } + + vDebug("Group == " + group_); + vDebug("firstPart == " + firstPart); + vDebug("valuePart == " + valuePart); + + // Now we have the group, the name and param list together and the value. + + TQStrList l; + + RTokenise(firstPart, ";", l); + + if (l.count() == 0) {// invalid - no name ! + vDebug("No name for this content line !"); + return; + } + + name_ = l.at(0); + + // Now we have the name, so the rest of 'l' is the params. + // Remove the name part. + l.remove(0u); + + entityType_ = EntityNameToEntityType(name_); + paramType_ = EntityTypeToParamType(entityType_); + + unsigned int i = 0; + + // For each parameter, create a new parameter of the correct type. + + TQStrListIterator it(l); + + for (; it.current(); ++it, i++) { + + TQCString str = *it; + + split = str.find("="); + if (split < 0 ) { + vDebug("No '=' in parameter."); + continue; + } + + TQCString paraName = str.left(split); + TQCString paraValue = str.mid(split + 1); + + TQStrList paraValues; + RTokenise(paraValue, ",", paraValues); + + TQStrListIterator it2( paraValues ); + + for(; it2.current(); ++it2) { + + Param *p = new Param; + p->setName( paraName ); + p->setValue( *it2 ); + + paramList_.append(p); + } + } + + // Create a new value of the correct type. + + valueType_ = EntityTypeToValueType(entityType_); + +// kdDebug(5710) << "valueType: " << valueType_ << endl; + + switch (valueType_) { + + case ValueSound: value_ = new SoundValue; break; + case ValueAgent: value_ = new AgentValue; break; + case ValueAddress: value_ = new AdrValue; break; + case ValueTel: value_ = new TelValue; break; + case ValueTextBin: value_ = new TextBinValue; break; + case ValueOrg: value_ = new OrgValue; break; + case ValueN: value_ = new NValue; break; + case ValueUTC: value_ = new UTCValue; break; + case ValueURI: value_ = new URIValue; break; + case ValueClass: value_ = new ClassValue; break; + case ValueFloat: value_ = new FloatValue; break; + case ValueImage: value_ = new ImageValue; break; + case ValueDate: value_ = new DateValue; break; + case ValueTextList: value_ = new TextListValue; break; + case ValueGeo: value_ = new GeoValue; break; + case ValueText: + case ValueUnknown: + default: value_ = new TextValue; break; + } + + *value_ = valuePart; +} + + void +ContentLine::_assemble() +{ + vDebug("Assemble (argl) - my name is \"" + name_ + "\""); + strRep_.truncate(0); + + TQCString line; + + if (!group_.isEmpty()) + line += group_ + '.'; + + line += name_; + + vDebug("Adding parameters"); + ParamListIterator it(paramList_); + + for (; it.current(); ++it) + line += ";" + it.current()->asString(); + + vDebug("Adding value"); + if (value_ != 0) + line += ":" + value_->asString(); + else { + vDebug("No value"); + } + + // Quote newlines + line = line.replace( TQRegExp( "\n" ), "\\n" ); + + // Fold lines longer than 72 chars + const int maxLen = 72; + uint cursor = 0; + while( line.length() > ( cursor + 1 ) * maxLen ) { + strRep_ += line.mid( cursor * maxLen, maxLen ); + strRep_ += "\r\n "; + ++cursor; + } + strRep_ += line.mid( cursor * maxLen ); +} + + void +ContentLine::clear() +{ + group_.truncate(0); + name_.truncate(0); + paramList_.clear(); + delete value_; + value_ = 0; + paramType_ = ParamUnknown; + valueType_ = ValueUnknown; + entityType_ = EntityUnknown; +} diff --git a/tdeabc/vcard/DateParam.cpp b/tdeabc/vcard/DateParam.cpp new file mode 100644 index 000000000..ffaf4b3f6 --- /dev/null +++ b/tdeabc/vcard/DateParam.cpp @@ -0,0 +1,82 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +DateParam::DateParam() + : Param() +{ +} + +DateParam::DateParam(const DateParam & x) + : Param(x) +{ +} + +DateParam::DateParam(const TQCString & s) + : Param(s) +{ +} + + DateParam & +DateParam::operator = (DateParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + DateParam & +DateParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +DateParam::operator == (DateParam & x) +{ + x.parse(); + + return false; +} + +DateParam::~DateParam() +{ +} + + void +DateParam::_parse() +{ +} + + void +DateParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/DateValue.cpp b/tdeabc/vcard/DateValue.cpp new file mode 100644 index 000000000..9f578a158 --- /dev/null +++ b/tdeabc/vcard/DateValue.cpp @@ -0,0 +1,434 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include +#include +#include + +using namespace VCARD; + +DateValue::DateValue() + : Value() +{ + vDebug("DateValue::DateValue()"); +} + +DateValue::DateValue( + unsigned int year, + unsigned int month, + unsigned int day, + unsigned int hour, + unsigned int minute, + unsigned int second, + double secFrac, + bool zonePositive, + unsigned int zoneHour, + unsigned int zoneMinute) + : Value (), + year_ (year), + month_ (month), + day_ (day), + hour_ (hour), + minute_ (minute), + second_ (second), + zoneHour_ (zoneHour), + zoneMinute_ (zoneMinute), + secFrac_ (secFrac), + zonePositive_ (zonePositive), + hasTime_(true) +{ + parsed_ = true; + assembled_ = false; +} + +DateValue::DateValue(const TQDate & d) + : Value (), + year_ (d.year()), + month_ (d.month()), + day_ (d.day()), + hasTime_(false) +{ + parsed_ = true; + assembled_ = false; +} + +DateValue::DateValue(const TQDateTime & d) + : Value (), + year_ (d.date().year()), + month_ (d.date().month()), + day_ (d.date().day()), + hour_ (d.time().hour()), + minute_ (d.time().minute()), + second_ (d.time().second()), + hasTime_(true) +{ + parsed_ = true; + assembled_ = false; +} + +DateValue::DateValue(const DateValue & x) + : Value(x) +{ + year_ = x.year_; + month_ = x.month_; + day_ = x.day_; + hour_ = x.hour_; + minute_ = x.minute_; + second_ = x.second_; + zoneHour_ = x.zoneHour_; + zoneMinute_ = x.zoneMinute_; + secFrac_ = x.secFrac_; + hasTime_ = x.hasTime_; +} + +DateValue::DateValue(const TQCString & s) + : Value(s) +{ +} + + DateValue & +DateValue::operator = (DateValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + DateValue & +DateValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +DateValue::operator == (DateValue & x) +{ + x.parse(); + return false; +} + +DateValue::~DateValue() +{ +} + + DateValue * +DateValue::clone() +{ + return new DateValue( *this ); +} + + void +DateValue::_parse() +{ + vDebug("DateValue::_parse()"); + + // date = date-full-year ["-"] date-month ["-"] date-mday + // time = time-hour [":"] time-minute [":"] time-second [":"] + // [time-secfrac] [time-zone] + + int timeSep = strRep_.find('T'); + + TQCString dateStr; + TQCString timeStr; + + if (timeSep == -1) { + + dateStr = strRep_; + vDebug("Has date string \"" + dateStr + "\""); + + } else { + + dateStr = strRep_.left(timeSep); + vDebug("Has date string \"" + dateStr + "\""); + + timeStr = strRep_.mid(timeSep + 1); + vDebug("Has time string \"" + timeStr + "\""); + } + + /////////////////////////////////////////////////////////////// DATE + + dateStr.replace(TQRegExp("-"), ""); + + kdDebug(5710) << "dateStr: " << dateStr << endl; + + year_ = dateStr.left(4).toInt(); + month_ = dateStr.mid(4, 2).toInt(); + day_ = dateStr.right(2).toInt(); + + if (timeSep == -1) { + hasTime_ = false; + return; // No time, done. + } + else + hasTime_ = true; + + /////////////////////////////////////////////////////////////// TIME + + /////////////////////////////////////////////////////////////// ZONE + + int zoneSep = timeStr.find('Z'); + + if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { + + TQCString zoneStr(timeStr.mid(zoneSep + 1)); + vDebug("zoneStr == " + zoneStr); + + zonePositive_ = (zoneStr[0] == '+'); + zoneHour_ = zoneStr.mid(1, 2).toInt(); + zoneMinute_ = zoneStr.right(2).toInt(); + + timeStr.remove(zoneSep, timeStr.length() - zoneSep); + } + + //////////////////////////////////////////////////// SECOND FRACTION + + int secFracSep = timeStr.findRev(','); + + if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. + TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); + secFrac_ = quirkafleeg.toDouble(); + } + + /////////////////////////////////////////////////////////////// HMS + + timeStr.replace(TQRegExp(":"), ""); + + hour_ = timeStr.left(2).toInt(); + minute_ = timeStr.mid(2, 2).toInt(); + second_ = timeStr.mid(4, 2).toInt(); +} + + void +DateValue::_assemble() +{ + vDebug("DateValue::_assemble"); + + TQCString year; + TQCString month; + TQCString day; + + year.setNum( year_ ); + month.setNum( month_ ); + day.setNum( day_ ); + + if ( month.length() < 2 ) month.prepend( "0" ); + if ( day.length() < 2 ) day.prepend( "0" ); + + strRep_ = year + '-' + month + '-' + day; + + if ( hasTime_ ) { + TQCString hour; + TQCString minute; + TQCString second; + + hour.setNum( hour_ ); + minute.setNum( minute_ ); + second.setNum( second_ ); + + if ( hour.length() < 2 ) hour.prepend( "0" ); + if ( minute.length() < 2 ) minute.prepend( "0" ); + if ( second.length() < 2 ) second.prepend( "0" ); + + strRep_ += 'T' + hour + ':' + minute + ':' + second + 'Z'; + } +} + + unsigned int +DateValue::year() +{ + parse(); + return year_; +} + + unsigned int +DateValue::month() +{ + parse(); + return month_; +} + + unsigned int +DateValue::day() +{ + parse(); + return day_; +} + unsigned int +DateValue::hour() +{ + parse(); + return hour_; +} + + unsigned int +DateValue::minute() +{ + parse(); + return minute_; +} + + unsigned int +DateValue::second() +{ + parse(); + return second_; +} + + double +DateValue::secondFraction() +{ + parse(); + return secFrac_; +} + + bool +DateValue::zonePositive() +{ + parse(); + return zonePositive_; +} + + unsigned int +DateValue::zoneHour() +{ + parse(); + return zoneHour_; +} + + unsigned int +DateValue::zoneMinute() +{ + parse(); + return zoneMinute_; +} + + void +DateValue::setYear(unsigned int i) +{ + year_ = i; + assembled_ = false; +} + + void +DateValue::setMonth(unsigned int i) +{ + month_ = i; + assembled_ = false; +} + + void +DateValue::setDay(unsigned int i) +{ + day_ = i; + assembled_ = false; +} + + void +DateValue::setHour(unsigned int i) +{ + hour_ = i; + assembled_ = false; +} + + void +DateValue::setMinute(unsigned int i) +{ + minute_ = i; + assembled_ = false; +} + + void +DateValue::setSecond(unsigned int i) +{ + second_ = i; + assembled_ = false; +} + + void +DateValue::setSecondFraction(double d) +{ + secFrac_ = d; + assembled_ = false; +} + + void +DateValue::setZonePositive(bool b) +{ + zonePositive_ = b; + assembled_ = false; +} + + void +DateValue::setZoneHour(unsigned int i) +{ + zoneHour_ = i; + assembled_ = false; +} + + void +DateValue::setZoneMinute(unsigned int i) +{ + zoneMinute_ = i; + assembled_ = false; +} + + TQDate +DateValue::qdate() +{ + parse(); + TQDate d(year_, month_, day_); + return d; +} + + TQTime +DateValue::qtime() +{ + parse(); + TQTime t(hour_, minute_, second_); +// t.setMs(1 / secFrac_); + return t; +} + + TQDateTime +DateValue::qdt() +{ + parse(); + TQDateTime dt; + dt.setDate(qdate()); + dt.setTime(qtime()); + return dt; +} + + bool +DateValue::hasTime() +{ + parse(); + return hasTime_; +} + diff --git a/tdeabc/vcard/EmailParam.cpp b/tdeabc/vcard/EmailParam.cpp new file mode 100644 index 000000000..7daf19ccc --- /dev/null +++ b/tdeabc/vcard/EmailParam.cpp @@ -0,0 +1,116 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +using namespace VCARD; + +EmailParam::EmailParam() + : Param() +{ + vDebug("ctor"); +} + +EmailParam::EmailParam(const EmailParam & x) + : Param(x), + emailType_ (x.emailType_), + pref_ (x.pref_) +{ +} + +EmailParam::EmailParam(const TQCString & s) + : Param(s) +{ +} + + EmailParam & +EmailParam::operator = (EmailParam & x) +{ + if (*this == x) return *this; + + emailType_ = x.emailType(); + pref_ = x.pref_; + + Param::operator = (x); + return *this; +} + + EmailParam & +EmailParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +EmailParam::operator == (EmailParam & x) +{ + parse(); + + if (pref_) + return (x.pref_ && x.emailType() == emailType_); + + return !x.pref(); +} + +EmailParam::~EmailParam() +{ +} + + void +EmailParam::_parse() +{ +#if 0 + Param::parseToList(); + + SubParamListIterator it(subParamList_); + + pref_ = true; + emailType_ = ""; + + for (; it.current(); ++it) { + + if (tqstricmp(it.current()->name(), "TYPE") == 0) { + emailType_ = it.current()->value(); + continue; + } + + if (tqstricmp(it.current()->name(), "PREF") == 0) { + pref_ = true; + } + } +#endif +} + + void +EmailParam::_assemble() +{ + strRep_ = "TYPE="; + strRep_ += emailType_; + + if (pref_) + strRep_ += ",PREF"; +} + diff --git a/tdeabc/vcard/Entity.cpp b/tdeabc/vcard/Entity.cpp new file mode 100644 index 000000000..5eaf6a1d0 --- /dev/null +++ b/tdeabc/vcard/Entity.cpp @@ -0,0 +1,134 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +using namespace VCARD; + +Entity::Entity() + : parsed_ (false), + assembled_ (true) +{ + // empty +} + +Entity::Entity(const Entity & e) + : strRep_ (e.strRep_), + parsed_ (e.parsed_), + assembled_ (e.assembled_) +{ + // empty +} + +Entity::Entity(const TQCString & s) + : strRep_ (s), + parsed_ (false), + assembled_ (true) +{ + // empty +} + + Entity & +Entity::operator = (const Entity & e) +{ + if (this == &e) return *this; + + strRep_ = e.strRep_; + parsed_ = e.parsed_; + assembled_ = e.assembled_; + + return *this; +} + + Entity & +Entity::operator = (const TQCString & s) +{ + strRep_ = s; + parsed_ = false; + assembled_ = true; + + return *this; +} + + bool +Entity::operator == (Entity & e) +{ + return asString() == e.asString(); +} + + bool +Entity::operator != (Entity & e) +{ + return !(*this == e); +} + + bool +Entity::operator == (const TQCString & s) +{ + return asString() == s; +} + + bool +Entity::operator != (const TQCString & s) +{ + return !(*this == s); +} + +Entity::~Entity() +{ + // empty +} + + TQCString +Entity::asString() +{ +// vDebug("Entity::asString()"); + assemble(); + + return strRep_; +} + + void +Entity::parse() +{ +// vDebug( "Entity::parse()" ); + + if (!parsed_) _parse(); + + parsed_ = true; + assembled_ = false; +} + + void +Entity::assemble() +{ +// vDebug( "Entity::assemble()" ); + + if (assembled_) return; + + parse(); + _assemble(); + + assembled_ = true; +} + diff --git a/tdeabc/vcard/Enum.cpp b/tdeabc/vcard/Enum.cpp new file mode 100644 index 000000000..bcb48f98a --- /dev/null +++ b/tdeabc/vcard/Enum.cpp @@ -0,0 +1,490 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include + +#include + +using namespace VCARD; + +// There are 31 possible types, not including extensions. +// URI is a custom field designed to store the upstream URI for each contact +// in order to handle certain limited CardDAV systems such as Zimbra + const TQCString +VCARD::paramNames [] = +{ + "NAME", + "PROFILE", + "SOURCE", + "FN", + "N", + "NICKNAME", + "PHOTO", + "BDAY", + "ADR", + "LABEL", + "TEL", + "EMAIL", + "MAILER", + "TZ", + "GEO", + "TITLE", + "ROLE", + "LOGO", + "AGENT", + "ORG", + "CATEGORIES", + "NOTE", + "PRODID", + "REV", + "SORT-STRING", + "SOUND", + "UID", + "URL", + "VERSION", + "CLASS", + "KEY", + "URI" +}; + + const ParamType +VCARD::paramTypesTable[] = { + ParamNone, // NAME + ParamNone, // PROFILE + ParamSource, // SOURCE + ParamText, // FN + ParamText, // N + ParamText, // NICKNAME + ParamImage, // PHOTO (inline/refer) + ParamDate, // BDAY ("VALUE = "date-time/date) + ParamAddrText, // ADR (adr-param/text-param) + ParamAddrText, // LABEL (adr-param/text-param) + ParamTel, // TEL + ParamEmail, // EMAIL + ParamText, // MAILER + ParamNone, // TZ + ParamNone, // GEO + ParamText, // TITLE + ParamText, // ROLE + ParamImage, // LOGO + ParamAgent, // AGENT + ParamText, // ORG + ParamText, // CATEGORIES + ParamText, // NOTE + ParamNone, // PRODID + ParamDate, // REV + ParamText, // SORT-STRING + ParamSound, // SOUND + ParamNone, // UID + ParamNone, // URL + ParamNone, // VERSION + ParamNone, // CLASS + ParamTextBin, // KEY + ParamTextNS, // X + ParamNone // URI +}; + + ParamType +VCARD::EntityTypeToParamType(EntityType e) +{ + ParamType t(ParamUnknown); + + switch (e) { + + //---------------------------------------------------------------// + case EntityAgent: t = ParamAgent; break; + //---------------------------------------------------------------// + case EntitySound: t = ParamSound; break; + //---------------------------------------------------------------// + case EntitySource: t = ParamSource; break; + //---------------------------------------------------------------// + case EntityTelephone: t = ParamTel; break; + //---------------------------------------------------------------// + case EntityEmail: t = ParamEmail; break; + //---------------------------------------------------------------// + case EntityKey: t = ParamTextBin; break; + //---------------------------------------------------------------// + case EntityExtension: t = ParamTextNS; break; + //---------------------------------------------------------------// + case EntityAddress: + case EntityLabel: t = ParamAddrText; break; + //---------------------------------------------------------------// + case EntityBirthday: + case EntityRevision: t = ParamDate; break; + //---------------------------------------------------------------// + case EntityPhoto: + case EntityLogo: t = ParamImage; break; + //---------------------------------------------------------------// + case EntityOrganisation: + case EntityTitle: + case EntityRole: + case EntityFullName: + case EntityMailer: + case EntityN: + case EntitySortString: + case EntityNickname: + case EntityCategories: + case EntityNote: t = ParamText; break; + //---------------------------------------------------------------// + case EntityProductID: + case EntityTimeZone: + case EntityUID: + case EntityURL: + case EntityClass: + case EntityGeo: + case EntityName: + case EntityVersion: + case EntityProfile: + case EntityURI: + default: t = ParamNone; break; + //---------------------------------------------------------------// + + } + + return t; +} + + ValueType +VCARD::EntityTypeToValueType(EntityType e) +{ + ValueType t(ValueUnknown); + + switch (e) { + + //---------------------------------------------------------------// + case EntitySound: t = ValueSound; break; + //---------------------------------------------------------------// + case EntityAgent: t = ValueAgent; break; + //---------------------------------------------------------------// + case EntityAddress: t = ValueAddress; break; + //---------------------------------------------------------------// + case EntityTelephone: t = ValueTel; break; + //---------------------------------------------------------------// + case EntityKey: t = ValueTextBin; break; + //---------------------------------------------------------------// + case EntityOrganisation: t = ValueOrg; break; + //---------------------------------------------------------------// + case EntityN: t = ValueN; break; + //---------------------------------------------------------------// + case EntityTimeZone: t = ValueUTC; break; + //---------------------------------------------------------------// + case EntityClass: t = ValueClass; break; + //---------------------------------------------------------------// + case EntityGeo: t = ValueGeo; break; + //---------------------------------------------------------------// + case EntitySource: + case EntityURL: t = ValueURI; break; + //---------------------------------------------------------------// + case EntityPhoto: + case EntityLogo: t = ValueImage; break; + //---------------------------------------------------------------// + case EntityBirthday: + case EntityRevision: t = ValueDate; break; + //---------------------------------------------------------------// + case EntityCategories: + case EntityNickname: t = ValueTextList; break; + //---------------------------------------------------------------// + case EntityLabel: + case EntityExtension: + case EntityEmail: + case EntityTitle: + case EntityRole: + case EntityFullName: + case EntityMailer: + case EntityProductID: + case EntityName: + case EntitySortString: + case EntityVersion: + case EntityProfile: + case EntityUID: + case EntityNote: + case EntityURI: + default: t = ValueText; break; + //---------------------------------------------------------------// + + } + + return t; +} + + TQCString +VCARD::EntityTypeToParamName(EntityType e) +{ + if ( e > EntityUnknown ) e = EntityUnknown; + return paramNames[ int( e ) ]; +} + + EntityType +VCARD::EntityNameToEntityType(const TQCString & s) +{ + if (s.isEmpty()) return EntityUnknown; + + EntityType t(EntityUnknown); + + switch (s[0]) { + + case 'A': + if (s == "ADR") + t = EntityAddress; + else if (s == "AGENT") + t = EntityAgent; + break; + + case 'B': + if (s == "BDAY") + t = EntityBirthday; + break; + + case 'C': + if (s == "CATEGORIES") + t = EntityCategories; + else if (s == "CLASS") + t = EntityClass; + break; + + case 'E': + if (s == "EMAIL") + t = EntityEmail; + break; + + case 'F': + if (s == "FN") + t = EntityFullName; + break; + + case 'G': + if (s == "GEO") + t = EntityGeo; + break; + + case 'K': + if (s == "KEY") + t = EntityKey; + break; + + case 'L': + if (s == "LABEL") + t = EntityLabel; + else if (s == "LOGO") + t = EntityLogo; + break; + + case 'M': + if (s == "MAILER") + t = EntityMailer; + break; + + case 'N': + if (s == "N") + t = EntityN; + else if (s == "NAME") + t = EntityName; + else if (s == "NICKNAME") + t = EntityNickname; + else if (s == "NOTE") + t = EntityNote; + break; + + case 'O': + if (s == "ORG") + t = EntityOrganisation; + break; + + case 'P': + if (s == "PHOTO") + t = EntityPhoto; + else if (s == "PRODID") + t = EntityProductID; + else if (s == "PROFILE") + t = EntityProfile; + break; + + case 'R': + if (s == "REV") + t = EntityRevision; + else if (s == "ROLE") + t = EntityRole; + break; + + case 'S': + if (s == "SORT-STRING") + t = EntitySortString; + else if (s == "SOUND") + t = EntitySound; + else if (s == "SOURCE") + t = EntitySource; + break; + + case 'T': + if (s == "TEL") + t = EntityTelephone; + else if (s == "TITLE") + t = EntityTitle; + else if (s == "TZ") + t = EntityTimeZone; + break; + + case 'U': + if (s == "UID") + t = EntityUID; + else if (s == "URL") + t = EntityURL; + else if (s == "URI") + t = EntityURI; + case 'V': + if (s == "VERSION") + t = EntityVersion; + break; + + case 'X': + if (s.left(2) == "X-") + t = EntityExtension; + break; + + default: + + t = EntityUnknown; + } + + return t; +} + +// The copyright notice below refers to the base64 codec functions used below, +// which are modified from the original sources. + +/* + * Original version Copyright 1988 by The Leland Stanford Junior University + * Copyright 1998 by the University of Washington + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notices appear in all copies and that both the + * above copyright notices and this permission notice appear in supporting + * documentation, and that the name of the University of Washington or The + * Leland Stanford Junior University not be used in advertising or publicity + * pertaining to distribution of the software without specific, written prior + * permission. This software is made available "as is", and + * THE UNIVERSITY OF WASHINGTON AND THE LELAND STANFORD JUNIOR UNIVERSITY + * DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE, + * INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF + * WASHINGTON OR THE LELAND STANFORD JUNIOR UNIVERSITY BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +static char B64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +// the mime base64 disctionary used for decoding +static signed char b64dec[] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30 + -1, -1, -1,-19, -1, -1, -1,-16, -4, -4, // 40 -19 == '+' -16 == '/' + -4, -4, -4, -4, -4, -4, -4, -4, -1, -1, // 50 -4 == '0' + -1, 0, -1, -1, -1, 65, 65, 65, 65, 65, // 60 0 == '=' 65 == 'A' + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 70 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 80 + 65, -1, -1, -1, -1, -1, -1, 71, 71, 71, // 90 71 == 'a' + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 100 + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 110 + 71, 71, 71, -1, -1, -1, -1, -1, -1, -1, // 120 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 130 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 140 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 150 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 160 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 170 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 180 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 190 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 200 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 210 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 220 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 230 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 240 + -1, -1, -1, -1, -1, -1, -1 // 250 +}; + + char * +VCARD::decodeBase64(const char * s, unsigned long srcl, unsigned long & len) +{ + register unsigned char c; + register unsigned long e(0); + len = 0; + unsigned const char * src = (unsigned const char *)s; + char * ret = new char[srcl + (srcl / 4 + 1)]; + register char *d = ret; + while (srcl--) { // Critical loop + c = *src++; + int dec = b64dec[c]; + if (dec == -1) continue; + if (c == '=') { + switch (e++) { + case 3: e = 0; break; + case 2: if (*src == '=') break; + default: delete [] ret; ret = 0; return 0; break; + } + continue; + } + c -= dec; + if (e == 0) { *d = c << 2; ++e; continue; } + switch (e) { + case 1: *d |= c >> 4; *++d = c << 4; break; + case 2: *d |= c >> 2; *++d = c << 6; break; + case 3: *d++ |= c; e = 0; continue; break; + } + ++e; + } + len = d - (char *)ret; + return ret; +} + + + char * +VCARD::encodeBase64(const char * src, unsigned long srcl, unsigned long & destl) +{ + register const unsigned char *s = (unsigned char *)src; + register unsigned long i = ((srcl + 2) / 3) * 4; + destl = i += 2 * ((i / 60) + 1); + i = 0; + char * ret = new char[destl]; + register unsigned char *d((unsigned char *)ret); + while (srcl != 0) { // Critical loop + *d++ = B64[s[0] >> 2]; + *d++ = B64[((s[0] << 4) + (--srcl == 0 ? 0 : s[1] >> 4)) & 0x3f]; + *d++ = srcl == 0 ? '=' : + B64[((s[1] << 2) + (--srcl == 0 ? 0 : s[2] >> 6)) & 0x3f]; + *d++ = srcl == 0 ? '=' : B64[s[2] & 0x3f]; + if (srcl != 0) srcl--; + if (++i == 15) { i = 0; *d++ = '\r'; *d++ = '\n'; } + s += 3; + } + *d = '\r'; *++d = '\n'; *++d = '\0'; + return ret; +} + diff --git a/tdeabc/vcard/FloatValue.cpp b/tdeabc/vcard/FloatValue.cpp new file mode 100644 index 000000000..ac1f2c6b5 --- /dev/null +++ b/tdeabc/vcard/FloatValue.cpp @@ -0,0 +1,120 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +FloatValue::FloatValue() + : Value() +{ +} + +FloatValue::FloatValue(float f) + : Value (), + value_ (f) +{ + parsed_ = true; +} + +FloatValue::FloatValue(const FloatValue & x) + : Value(x) +{ + value_ = x.value_; +} + +FloatValue::FloatValue(const TQCString & s) + : Value(s) +{ +} + + FloatValue & +FloatValue::operator = (FloatValue & x) +{ + if (*this == x) return *this; + + x.parse(); + value_ = x.value_; + + Value::operator = (x); + return *this; +} + + FloatValue & +FloatValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +FloatValue::operator == (FloatValue & x) +{ + x.parse(); + return (value_ == x.value_); +} + +FloatValue::~FloatValue() +{ +} + + void +FloatValue::_parse() +{ + bool negative(false); + + if (strRep_[0] == '-' || strRep_[1] == '+') { + + if (strRep_[0] == '-') + negative = true; + + strRep_.remove(0, 1); + } + + value_ = strRep_.toFloat(); + if (negative) + value_ = -value_; +} + + void +FloatValue::_assemble() +{ + strRep_ = TQCString().setNum(value_); +} + + float +FloatValue::value() +{ + parse(); + return value_; +} + + void +FloatValue::setValue(float f) +{ + parsed_ = true; + value_ = f; +} + diff --git a/tdeabc/vcard/GeoValue.cpp b/tdeabc/vcard/GeoValue.cpp new file mode 100644 index 000000000..2bac28c1e --- /dev/null +++ b/tdeabc/vcard/GeoValue.cpp @@ -0,0 +1,100 @@ +/* + This file is part of libvcard. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +GeoValue::GeoValue() + : Value() +{ +} + +GeoValue::GeoValue(const GeoValue & x) + : Value(x), latitude_(x.latitude_), longitude_(x.longitude_) +{ +} + +GeoValue::GeoValue(const TQCString & s) + : Value(s) +{ +} + + GeoValue & +GeoValue::operator = (GeoValue & x) +{ + if (*this == x) return *this; + + latitude_ = x.latitude_; + longitude_ = x.longitude_; + + Value::operator = (x); + return *this; +} + + GeoValue & +GeoValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +GeoValue::operator == (GeoValue & x) +{ + x.parse(); + + if ( latitude_ != x.latitude_ ) return false; + if ( longitude_ != x.longitude_ ) return false; + + return true; +} + +GeoValue::~GeoValue() +{ +} + + GeoValue * +GeoValue::clone() +{ + return new GeoValue( *this ); +} + + void +GeoValue::_parse() +{ + int semiColon = strRep_.find( ";" ); + + if ( semiColon == -1 ) // invalid + return; + + latitude_ = strRep_.left( semiColon ).toFloat(); + longitude_ = strRep_.mid( semiColon + 1, strRep_.length() - semiColon ).toFloat(); +} + + void +GeoValue::_assemble() +{ + strRep_.sprintf( "%.6f;%.6f", latitude_, longitude_ ); +} diff --git a/tdeabc/vcard/ImageParam.cpp b/tdeabc/vcard/ImageParam.cpp new file mode 100644 index 000000000..69611eeab --- /dev/null +++ b/tdeabc/vcard/ImageParam.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +ImageParam::ImageParam() + : Param() +{ +} + +ImageParam::ImageParam(const ImageParam & x) + : Param(x) +{ +} + +ImageParam::ImageParam(const TQCString & s) + : Param(s) +{ +} + + ImageParam & +ImageParam::operator = (ImageParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + ImageParam & +ImageParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +ImageParam::operator == (ImageParam & x) +{ + x.parse(); + return false; +} + +ImageParam::~ImageParam() +{ +} + + void +ImageParam::_parse() +{ +} + + void +ImageParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/ImageValue.cpp b/tdeabc/vcard/ImageValue.cpp new file mode 100644 index 000000000..5d8d29bb7 --- /dev/null +++ b/tdeabc/vcard/ImageValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +ImageValue::ImageValue() + : Value() +{ +} + +ImageValue::ImageValue(const ImageValue & x) + : Value(x) +{ +} + +ImageValue::ImageValue(const TQCString & s) + : Value(s) +{ +} + + ImageValue & +ImageValue::operator = (ImageValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + ImageValue & +ImageValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +ImageValue::operator == (ImageValue & x) +{ + x.parse(); + return false; +} + +ImageValue::~ImageValue() +{ +} + + void +ImageValue::_parse() +{ +} + + void +ImageValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/ImgValue.cpp b/tdeabc/vcard/ImgValue.cpp new file mode 100644 index 000000000..42889acd8 --- /dev/null +++ b/tdeabc/vcard/ImgValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +ImgValue::ImgValue() + : Value() +{ +} + +ImgValue::ImgValue(const ImgValue & x) + : Value(x) +{ +} + +ImgValue::ImgValue(const TQCString & s) + : Value(s) +{ +} + + ImgValue & +ImgValue::operator = (ImgValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + ImgValue & +ImgValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +ImgValue::operator == (ImgValue & x) +{ + x.parse(); + return false; +} + +ImgValue::~ImgValue() +{ +} + + void +ImgValue::_parse() +{ +} + + void +ImgValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/LangValue.cpp b/tdeabc/vcard/LangValue.cpp new file mode 100644 index 000000000..f7e5a759e --- /dev/null +++ b/tdeabc/vcard/LangValue.cpp @@ -0,0 +1,127 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +LangValue::LangValue() + : Value() +{ +} + +LangValue::LangValue(const LangValue & x) + : Value(x) +{ +} + +LangValue::LangValue(const TQCString & s) + : Value(s) +{ +} + + LangValue & +LangValue::operator = (LangValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + LangValue & +LangValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +LangValue::operator == (LangValue & x) +{ + x.parse(); + return false; +} + +LangValue::~LangValue() +{ +} + + void +LangValue::_parse() +{ + TQStrList l; + RTokenise(strRep_, "-", l); + + if (l.count() == 0) return; + + primary_ = l.at(0); + + l.remove(0u); + + subtags_ = l; +} + + void +LangValue::_assemble() +{ + strRep_ = primary_; + + TQStrListIterator it(subtags_); + + for (; it.current(); ++it) + strRep_ += TQCString('-') + it.current(); +} + + TQCString +LangValue::primary() +{ + parse(); + return primary_; +} + + TQStrList +LangValue::subtags() +{ + parse(); + return subtags_; +} + + void +LangValue::setPrimary(const TQCString & s) +{ + parse(); + primary_ = s; +} + + void +LangValue::setSubTags(const TQStrList & l) +{ + parse(); + subtags_ = l; +} + diff --git a/tdeabc/vcard/Makefile.am b/tdeabc/vcard/Makefile.am new file mode 100644 index 000000000..e8a33c3a9 --- /dev/null +++ b/tdeabc/vcard/Makefile.am @@ -0,0 +1,21 @@ +INCLUDES = \ + -I$(srcdir)/include \ + -I$(srcdir)/include/generated \ + $(all_includes) + +### KDE 4.0: either make noinst or rename to something like libkvcard +lib_LTLIBRARIES = libvcard.la + +libvcard_la_SOURCES = vCard-all.cpp +libvcard_la_LDFLAGS = $(all_libraries) +libvcard_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) + +check_PROGRAMS = testwrite testread + +testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testwrite_LDADD = libvcard.la +testwrite_SOURCES = testwrite.cpp + +testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testread_LDADD = libvcard.la +testread_SOURCES = testread.cpp diff --git a/tdeabc/vcard/NValue.cpp b/tdeabc/vcard/NValue.cpp new file mode 100644 index 000000000..e63268134 --- /dev/null +++ b/tdeabc/vcard/NValue.cpp @@ -0,0 +1,128 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include +#include +#include + +using namespace VCARD; + +NValue::NValue() + : Value() +{ + vDebug("ctor"); +} + +NValue::NValue(const NValue & x) + : Value(x), + family_ (x.family_), + given_ (x.given_), + middle_ (x.middle_), + prefix_ (x.prefix_), + suffix_ (x.suffix_) +{ +} + +NValue::NValue(const TQCString & s) + : Value(s) +{ + vDebug("ctor"); +} + + NValue & +NValue::operator = (NValue & x) +{ + if (*this == x) return *this; + + family_ = x.family_; + given_ = x.given_; + middle_ = x.middle_; + prefix_ = x.prefix_; + suffix_ = x.suffix_; + + Value::operator = (x); + return *this; +} + + NValue & +NValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +NValue::operator == (NValue & x) +{ + x.parse(); + + return ( + family_ == x.family_ && + given_ == x.given_ && + middle_ == x.middle_ && + prefix_ == x.prefix_ && + suffix_ == x.suffix_); +} + +NValue::~NValue() +{ +} + + NValue * +NValue::clone() +{ + return new NValue( *this ); +} + + void +NValue::_parse() +{ + TQStrList l; + RTokenise(strRep_, ";", l); + + for (unsigned int i = 0; i < l.count(); i++) { + + switch (i) { + case 0: family_ = l.at(0); break; + case 1: given_ = l.at(1); break; + case 2: middle_ = l.at(2); break; + case 3: prefix_ = l.at(3); break; + case 4: suffix_ = l.at(4); break; + default: break; + } + } +} + + void +NValue::_assemble() +{ + strRep_ = family_; + strRep_ += ";" + given_; + strRep_ += ";" + middle_; + strRep_ += ";" + prefix_; + strRep_ += ";" + suffix_; +} + diff --git a/tdeabc/vcard/OrgValue.cpp b/tdeabc/vcard/OrgValue.cpp new file mode 100644 index 000000000..94ca18243 --- /dev/null +++ b/tdeabc/vcard/OrgValue.cpp @@ -0,0 +1,107 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +OrgValue::OrgValue() + : Value() +{ +} + +OrgValue::OrgValue(const OrgValue & x) + : Value(x) +{ +} + +OrgValue::OrgValue(const TQCString & s) + : Value(s) +{ +} + + OrgValue & +OrgValue::operator = (OrgValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + OrgValue & +OrgValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +OrgValue::operator == (OrgValue & x) +{ + x.parse(); + return false; +} + +OrgValue::~OrgValue() +{ +} + + void +OrgValue::_parse() +{ + RTokenise(strRep_, ";", valueList_); +} + + void +OrgValue::_assemble() +{ + bool first(true); + + TQStrListIterator it(valueList_); + + for (; it.current(); ++it) { + if (!first) strRep_ += ';'; + strRep_ += it.current(); + first = false; + } +} + + unsigned int +OrgValue::numValues() +{ + parse(); + return valueList_.count(); +} + + TQCString +OrgValue::value(unsigned int i) +{ + parse(); + return valueList_.at(i); +} + diff --git a/tdeabc/vcard/Param.cpp b/tdeabc/vcard/Param.cpp new file mode 100644 index 000000000..8c5ad9e2c --- /dev/null +++ b/tdeabc/vcard/Param.cpp @@ -0,0 +1,129 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +Param::Param() + : Entity(), + name_(""), + value_("") +{ +} + +Param::Param(const Param & x) + : Entity(x), + name_(x.name_), + value_(x.value_) +{ +} + +Param::Param(const TQCString & s) + : Entity(s), + name_(""), + value_("") +{ +} + + Param & +Param::operator = (Param & x) +{ + if (*this == x) return *this; + + Entity::operator = (x); + name_ = x.name_; + value_ = x.value_; + + return *this; +} + + Param & +Param::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +Param::operator == (Param & x) +{ + x.parse(); + return false; +} + +Param::~Param() +{ +} + + void +Param::_parse() +{ +} + + void +Param::_assemble() +{ + strRep_ = name_ + "=" + value_; +} + +Param::Param(const TQCString &name, const TQCString &value) + : Entity(), + name_(name), + value_(value) +{ + parsed_ = true; + assembled_ = false; +} + + void +Param::setName(const TQCString & name) +{ + name_ = name; + + assembled_ = false; +} + + void +Param::setValue(const TQCString & value) +{ + value_ = value; + + assembled_ = false; +} + + TQCString +Param::name() +{ + return name_; +} + + TQCString +Param::value() +{ + return value_; +} diff --git a/tdeabc/vcard/PhoneNumberValue.cpp b/tdeabc/vcard/PhoneNumberValue.cpp new file mode 100644 index 000000000..02a1266fe --- /dev/null +++ b/tdeabc/vcard/PhoneNumberValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +PhoneNumberValue::PhoneNumberValue() + : Value() +{ +} + +PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) + : Value(x) +{ +} + +PhoneNumberValue::PhoneNumberValue(const TQCString & s) + : Value(s) +{ +} + + PhoneNumberValue & +PhoneNumberValue::operator = (PhoneNumberValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + PhoneNumberValue & +PhoneNumberValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +PhoneNumberValue::operator == (PhoneNumberValue & x) +{ + x.parse(); + return false; +} + +PhoneNumberValue::~PhoneNumberValue() +{ +} + + void +PhoneNumberValue::_parse() +{ +} + + void +PhoneNumberValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/README b/tdeabc/vcard/README new file mode 100644 index 000000000..18a9daf4a --- /dev/null +++ b/tdeabc/vcard/README @@ -0,0 +1,15 @@ +libvcard (C) 1999 Rik Hemsley +Written for the KDE project. + +This software is licensed under the MIT license. + +A vCard 3.0 parser based on the same principles that librmm (from Empath) uses. + +It's small and very fast due to parsing and assembly of object being lazy. + +There is a base64 codec declared in Enum.h + +Feedback welcome. + +Rik + diff --git a/tdeabc/vcard/RToken.cpp b/tdeabc/vcard/RToken.cpp new file mode 100644 index 000000000..582a9e1c7 --- /dev/null +++ b/tdeabc/vcard/RToken.cpp @@ -0,0 +1,88 @@ +/* + + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include +#include + +namespace VCARD +{ + + TQ_UINT32 +RTokenise(const char * str, const char * delim, TQStrList & l) +{ + // FIXME no stderr ! + l.clear(); + + if (!delim || !str || strlen(delim) == 0 || strlen(str) == 0) return 0; + + char * len = (char *)(str + strlen(str)); // End of string. + + register char * rstart = new char[strlen(str) + 1]; + register char * r = rstart; + + + register const char * i = str; // Cursor. + + while (i <= len) { + + if (*i == '\\') { // Escaped chars go straight through. + *r++ = *i++; + if (i <= len) + *r++ = *i++; + continue; + } + + if (strchr(delim, *i) != 0) { + // We hit a delimiter. If we have some text, make a new token. + // This has the effect that multiple delimiters are collapsed. + // cs: We mustn't collapse multiple delimiters, otherwise we + // lose empty fields. + *r = '\0'; +// if (r != rstart) { + l.append(rstart); +// } + r = rstart; + ++i; + continue; + } + + *r++ = *i++; + } + + // Catch last token +// if (r != rstart) { + *r = '\0'; + l.append(rstart); +// } + + r = 0; + + delete [] rstart; + + return l.count(); +} + +} diff --git a/tdeabc/vcard/SoundValue.cpp b/tdeabc/vcard/SoundValue.cpp new file mode 100644 index 000000000..5be75d358 --- /dev/null +++ b/tdeabc/vcard/SoundValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +SoundValue::SoundValue() + : Value() +{ +} + +SoundValue::SoundValue(const SoundValue & x) + : Value(x) +{ +} + +SoundValue::SoundValue(const TQCString & s) + : Value(s) +{ +} + + SoundValue & +SoundValue::operator = (SoundValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + SoundValue & +SoundValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +SoundValue::operator == (SoundValue & x) +{ + x.parse(); + return false; +} + +SoundValue::~SoundValue() +{ +} + + void +SoundValue::_parse() +{ +} + + void +SoundValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/SourceParam.cpp b/tdeabc/vcard/SourceParam.cpp new file mode 100644 index 000000000..6a0e772ac --- /dev/null +++ b/tdeabc/vcard/SourceParam.cpp @@ -0,0 +1,112 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +SourceParam::SourceParam() + : Param(), + type_(SourceParam::TypeUnknown) +{ +} + +SourceParam::SourceParam(const SourceParam & x) + : Param(x), + type_ (x.type_), + par_ (x.par_), + val_ (x.val_) +{ +} + +SourceParam::SourceParam(const TQCString & s) + : Param(s), + type_(SourceParam::TypeUnknown) +{ +} + + SourceParam & +SourceParam::operator = (SourceParam & x) +{ + if (*this == x) return *this; + type_ = x.type(); + par_ = x.par(); + val_ = x.val(); + + Param::operator = (x); + return *this; +} + + SourceParam & +SourceParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +SourceParam::operator == (SourceParam & x) +{ + x.parse(); + return false; +} + +SourceParam::~SourceParam() +{ +} + + void +SourceParam::_parse() +{ + int i = strRep_.find('='); + if (i == -1) // Invalid + return; + + par_ = strRep_.left(i); + val_ = strRep_.right(strRep_.length() - i - 1); + + if (tqstricmp(par_, "VALUE") == 0 && tqstricmp(val_, "uri") == 0) + type_ = TypeValue; + else if (tqstricmp(par_, "CONTEXT") == 0 && tqstricmp(val_, "word") == 0) + type_ = TypeContext; + else if (tqstrnicmp(par_, "X-", 2) == 0) { + type_ = TypeX; + } + else type_ = TypeUnknown; + +} + + void +SourceParam::_assemble() +{ + if (type_ == TypeValue) + strRep_ = "VALUE=uri"; + else if (type_ == TypeContext) + strRep_ = "CONTEXT=word"; + else if (type_ == TypeX) + strRep_ = par_ + "=" + val_; + else strRep_ = ""; +} + diff --git a/tdeabc/vcard/TelParam.cpp b/tdeabc/vcard/TelParam.cpp new file mode 100644 index 000000000..072b1dc81 --- /dev/null +++ b/tdeabc/vcard/TelParam.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TelParam::TelParam() + : Param() +{ +} + +TelParam::TelParam(const TelParam & x) + : Param(x) +{ +} + +TelParam::TelParam(const TQCString & s) + : Param(s) +{ +} + + TelParam & +TelParam::operator = (TelParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + TelParam & +TelParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +TelParam::operator == (TelParam & x) +{ + x.parse(); + return false; +} + +TelParam::~TelParam() +{ +} + + void +TelParam::_parse() +{ +} + + void +TelParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/TelValue.cpp b/tdeabc/vcard/TelValue.cpp new file mode 100644 index 000000000..c9c1b85aa --- /dev/null +++ b/tdeabc/vcard/TelValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TelValue::TelValue() + : Value() +{ +} + +TelValue::TelValue(const TelValue & x) + : Value(x) +{ +} + +TelValue::TelValue(const TQCString & s) + : Value(s) +{ +} + + TelValue & +TelValue::operator = (TelValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + TelValue & +TelValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TelValue::operator == (TelValue & x) +{ + x.parse(); + return false; +} + +TelValue::~TelValue() +{ +} + + void +TelValue::_parse() +{ +} + + void +TelValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/TextBinParam.cpp b/tdeabc/vcard/TextBinParam.cpp new file mode 100644 index 000000000..4e0ebadff --- /dev/null +++ b/tdeabc/vcard/TextBinParam.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TextBinParam::TextBinParam() + : Param() +{ +} + +TextBinParam::TextBinParam(const TextBinParam & x) + : Param(x) +{ +} + +TextBinParam::TextBinParam(const TQCString & s) + : Param(s) +{ +} + + TextBinParam & +TextBinParam::operator = (TextBinParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + TextBinParam & +TextBinParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +TextBinParam::operator == (TextBinParam & x) +{ + x.parse(); + return false; +} + +TextBinParam::~TextBinParam() +{ +} + + void +TextBinParam::_parse() +{ +} + + void +TextBinParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/TextBinValue.cpp b/tdeabc/vcard/TextBinValue.cpp new file mode 100644 index 000000000..e7da0b7c6 --- /dev/null +++ b/tdeabc/vcard/TextBinValue.cpp @@ -0,0 +1,104 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include + +using namespace VCARD; + +TextBinValue::TextBinValue() + : Value() +{ +} + +TextBinValue::TextBinValue(const TextBinValue & x) + : Value(x) +{ + mIsBinary_ = x.mIsBinary_; + mData_ = x.mData_; + mUrl_ = x.mUrl_; +} + +TextBinValue::TextBinValue(const TQCString & s) + : Value(s) +{ +} + + TextBinValue & +TextBinValue::operator = (TextBinValue & x) +{ + if (*this == x) return *this; + + mIsBinary_ = x.mIsBinary_; + mData_ = x.mData_; + mUrl_ = x.mUrl_; + + Value::operator = (x); + return *this; +} + + TextBinValue & +TextBinValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TextBinValue::operator == (TextBinValue & x) +{ + x.parse(); + + if ( mIsBinary_ != x.mIsBinary_ ) return false; + if ( mData_ != x.mData_ ) return false; + if ( mUrl_ != x.mUrl_ ) return false; + + return true; +} + +TextBinValue::~TextBinValue() +{ +} + + TextBinValue * +TextBinValue::clone() +{ + return new TextBinValue( *this ); +} + + void +TextBinValue::_parse() +{ +} + + void +TextBinValue::_assemble() +{ + if ( mIsBinary_ ) { + strRep_ = KCodecs::base64Encode( mData_ ); + } else + strRep_ = mUrl_.utf8(); +} + diff --git a/tdeabc/vcard/TextListValue.cpp b/tdeabc/vcard/TextListValue.cpp new file mode 100644 index 000000000..2bec2e181 --- /dev/null +++ b/tdeabc/vcard/TextListValue.cpp @@ -0,0 +1,107 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +TextListValue::TextListValue() + : Value() +{ +} + +TextListValue::TextListValue(const TextListValue & x) + : Value(x) +{ +} + +TextListValue::TextListValue(const TQCString & s) + : Value(s) +{ +} + + TextListValue & +TextListValue::operator = (TextListValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + TextListValue & +TextListValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TextListValue::operator == (TextListValue & x) +{ + x.parse(); + return false; +} + +TextListValue::~TextListValue() +{ +} + + void +TextListValue::_parse() +{ + RTokenise(strRep_, ";", valueList_); +} + + void +TextListValue::_assemble() +{ + bool first(true); + + TQStrListIterator it(valueList_); + + for (; it.current(); ++it) { + if (!first) strRep_ += ';'; + strRep_ += it.current(); + first = false; + } +} + + unsigned int +TextListValue::numValues() +{ + parse(); + return valueList_.count(); +} + + TQCString +TextListValue::value(unsigned int i) +{ + parse(); + return valueList_.at(i); +} + diff --git a/tdeabc/vcard/TextParam.cpp b/tdeabc/vcard/TextParam.cpp new file mode 100644 index 000000000..b353483ec --- /dev/null +++ b/tdeabc/vcard/TextParam.cpp @@ -0,0 +1,82 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TextParam::TextParam() + : Param() +{ +} + +TextParam::TextParam(const TextParam & x) + : Param(x) +{ +} + +TextParam::TextParam(const TQCString & s) + : Param(s) +{ +} + + TextParam & +TextParam::operator = (TextParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + TextParam & +TextParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +TextParam::operator == (TextParam & x) +{ + x.parse(); + + return false; +} + +TextParam::~TextParam() +{ +} + + void +TextParam::_parse() +{ +} + + void +TextParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/TextValue.cpp b/tdeabc/vcard/TextValue.cpp new file mode 100644 index 000000000..cf8e0673f --- /dev/null +++ b/tdeabc/vcard/TextValue.cpp @@ -0,0 +1,86 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TextValue::TextValue() + : Value() +{ +} + +TextValue::TextValue(const TextValue & x) + : Value(x) +{ +} + +TextValue::TextValue(const TQCString & s) + : Value(s) +{ +} + + TextValue & +TextValue::operator = (TextValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + TextValue & +TextValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TextValue::operator == (TextValue & x) +{ + return strRep_ == x.strRep_; +} + +TextValue::~TextValue() +{ +} + + TextValue * +TextValue::clone() +{ + return new TextValue( *this ); +} + + void +TextValue::_parse() +{ +} + + void +TextValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/URIValue.cpp b/tdeabc/vcard/URIValue.cpp new file mode 100644 index 000000000..bba8db0fa --- /dev/null +++ b/tdeabc/vcard/URIValue.cpp @@ -0,0 +1,133 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +URIValue::URIValue() + : Value() +{ +} + +URIValue::URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart) + : Value(), + scheme_ (scheme), + schemeSpecificPart_ (schemeSpecificPart) +{ + parsed_ = true; +} + +URIValue::URIValue(const URIValue & x) + : Value (x), + scheme_ (x.scheme_), + schemeSpecificPart_ (x.schemeSpecificPart_) +{ +} + +URIValue::URIValue(const TQCString & s) + : Value(s) +{ +} + + URIValue & +URIValue::operator = (URIValue & x) +{ + if (*this == x) return *this; + + scheme_ = x.scheme_; + schemeSpecificPart_ = x.schemeSpecificPart_; + + Value::operator = (x); + return *this; +} + + URIValue & +URIValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +URIValue::operator == (URIValue & x) +{ + x.parse(); + return ( + (scheme_ == x.scheme_) && + (schemeSpecificPart_ == x.schemeSpecificPart_)); + + return false; +} + +URIValue::~URIValue() +{ +} + + void +URIValue::_parse() +{ + int split = strRep_.find(':'); + if (split == -1) + return; + + scheme_ = strRep_.left(split); + schemeSpecificPart_ = strRep_.mid(split + 1); +} + + void +URIValue::_assemble() +{ + strRep_ = scheme_ + ':' + schemeSpecificPart_; +} + + TQCString +URIValue::scheme() +{ + parse(); + return scheme_; +} + + TQCString +URIValue::schemeSpecificPart() +{ + parse(); + return schemeSpecificPart_; +} + + void +URIValue::setScheme(const TQCString & s) +{ + parse(); + scheme_ = s; +} + + void +URIValue::setSchemeSpecificPart(const TQCString & s) +{ + parse(); + schemeSpecificPart_ = s; +} + diff --git a/tdeabc/vcard/UTCValue.cpp b/tdeabc/vcard/UTCValue.cpp new file mode 100644 index 000000000..30473661f --- /dev/null +++ b/tdeabc/vcard/UTCValue.cpp @@ -0,0 +1,110 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +UTCValue::UTCValue() + : Value() +{ +} + +UTCValue::UTCValue(const UTCValue & x) + : Value(x), positive_(x.positive_), hour_(x.hour_), minute_(x.minute_) + +{ +} + +UTCValue::UTCValue(const TQCString & s) + : Value(s) +{ +} + + UTCValue & +UTCValue::operator = (UTCValue & x) +{ + if (*this == x) return *this; + + positive_ = x.positive_; + hour_ = x.hour_; + minute_ = x.minute_; + + Value::operator = (x); + return *this; +} + + UTCValue & +UTCValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +UTCValue::operator == (UTCValue & x) +{ + x.parse(); + + if (positive_ != x.positive_) return false; + if (hour_ != x.hour_) return false; + if (minute_ != x.minute_) return false; + + return true; +} + +UTCValue::~UTCValue() +{ +} + + UTCValue * +UTCValue::clone() +{ + return new UTCValue( *this ); +} + + void +UTCValue::_parse() +{ + if ( strRep_.isEmpty() ) + return; + + positive_ = ( strRep_[0] == '+' ); + + int colon = strRep_.find( ':' ); + + if ( colon == -1 ) // Not valid. + return; + + hour_ = strRep_.mid( 1, 2 ).toInt(); + minute_ = strRep_.right( 2 ).toInt(); +} + + void +UTCValue::_assemble() +{ + strRep_.sprintf( "%c%.2i:%.2i", (positive_ ? '+' : '-'), hour_, minute_ ); +} + diff --git a/tdeabc/vcard/VCard.cpp b/tdeabc/vcard/VCard.cpp new file mode 100644 index 000000000..eb3f57f6e --- /dev/null +++ b/tdeabc/vcard/VCard.cpp @@ -0,0 +1,283 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include + +#include +#include +#include +#include + +#include + +using namespace VCARD; + +VCard::VCard() + : Entity() +{ + contentLineList_.setAutoDelete( true ); +} + +VCard::VCard(const VCard & x) + : Entity(x), + group_(x.group_), + contentLineList_(x.contentLineList_) +{ +} + +VCard::VCard(const TQCString & s) + : Entity(s) +{ +} + + VCard & +VCard::operator = (VCard & x) +{ + if (*this == x) return *this; + + group_ = x.group(); + contentLineList_ = x.contentLineList_; + + Entity::operator = (x); + return *this; +} + + VCard & +VCard::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +VCard::operator == (VCard & x) +{ + x.parse(); + return false; +} + +VCard::~VCard() +{ +} + + void +VCard::_parse() +{ + vDebug("parse() called"); + TQStrList l; + + RTokenise(strRep_, "\r\n", l); + + if (l.count() < 3) { // Invalid VCARD ! + vDebug("Invalid vcard"); + return; + } + + // Get the first line + TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace(); + + vDebug("Begin line == \"" + beginLine + "\""); + + // Remove extra blank lines + while (TQCString(l.last()).isEmpty()) + l.remove(l.last()); + + // Now we know this is the last line + TQCString endLine = l.last(); + + // Trash the first and last lines as we have seen them. + l.remove(0u); + l.remove(l.last()); + + /////////////////////////////////////////////////////////////// + // FIRST LINE + + int split = beginLine.find(':'); + + if (split == -1) { // invalid, no BEGIN + vDebug("No split"); + return; + } + + TQCString firstPart(beginLine.left(split)); + TQCString valuePart(beginLine.mid(split + 1)); + + split = firstPart.find('.'); + + if (split != -1) { + group_ = firstPart.left(split); + firstPart = firstPart.right(firstPart.length() - split - 1); + } + + if (tqstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN ! + vDebug("No BEGIN"); + return; + } + + if (tqstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard ! + vDebug("No VCARD"); + return; + } + + /////////////////////////////////////////////////////////////// + // CONTENT LINES + // + vDebug("Content lines"); + + // Handle folded lines. + + TQStrList refolded; + + TQStrListIterator it(l); + + TQCString cur; + + for (; it.current(); ++it) { + + cur = it.current(); + + ++it; + + while ( + it.current() && + it.current()[0] == ' ' && + strlen(it.current()) != 1) + { + cur += it.current() + 1; + ++it; + } + + --it; + + refolded.append(cur); + } + + TQStrListIterator it2(refolded); + + for (; it2.current(); ++it2) { + + vDebug("New contentline using \"" + TQCString(it2.current()) + "\""); + ContentLine * cl = new ContentLine(it2.current()); + + cl->parse(); + + contentLineList_.append(cl); + } + + /////////////////////////////////////////////////////////////// + // LAST LINE + + split = endLine.find(':'); + + if (split == -1) // invalid, no END + return; + + firstPart = endLine.left(split); + valuePart = endLine.right(firstPart.length() - split - 1); + + split = firstPart.find('.'); + + if (split != -1) { + group_ = firstPart.left(split); + firstPart = firstPart.right(firstPart.length() - split - 1); + } + + if (tqstricmp(firstPart, "END") != 0) // No END ! + return; + + if (tqstricmp(valuePart, "VCARD") != 0) // Not a vcard ! + return; +} + + void +VCard::_assemble() +{ + vDebug("Assembling vcard"); + strRep_ = "BEGIN:VCARD\r\n"; + strRep_ += "VERSION:3.0\r\n"; + + TQPtrListIterator it(contentLineList_); + + for (; it.current(); ++it) + strRep_ += it.current()->asString() + "\r\n"; + + strRep_ += "END:VCARD\r\n"; +} + + bool +VCard::has(EntityType t) +{ + parse(); + return contentLine(t) == 0 ? false : true; +} + + bool +VCard::has(const TQCString & s) +{ + parse(); + return contentLine(s) == 0 ? false : true; +} + + void +VCard::add(const ContentLine & cl) +{ + parse(); + ContentLine * c = new ContentLine(cl); + contentLineList_.append(c); +} + + void +VCard::add(const TQCString & s) +{ + parse(); + ContentLine * c = new ContentLine(s); + contentLineList_.append(c); +} + + ContentLine * +VCard::contentLine(EntityType t) +{ + parse(); + TQPtrListIterator it(contentLineList_); + + for (; it.current(); ++it) + if (it.current()->entityType() == t) + return it.current(); + + return 0; +} + + ContentLine * +VCard::contentLine(const TQCString & s) +{ + parse(); + TQPtrListIterator it(contentLineList_); + + for (; it.current(); ++it) + if (it.current()->entityType() == EntityNameToEntityType(s)) + return it.current(); + + return 0; +} + diff --git a/tdeabc/vcard/VCardEntity.cpp b/tdeabc/vcard/VCardEntity.cpp new file mode 100644 index 000000000..1f8cea5b1 --- /dev/null +++ b/tdeabc/vcard/VCardEntity.cpp @@ -0,0 +1,119 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include + +using namespace VCARD; + +VCardEntity::VCardEntity() + : Entity() +{ +} + +VCardEntity::VCardEntity(const VCardEntity & x) + : Entity(x) +{ +} + +VCardEntity::VCardEntity(const TQCString & s) + : Entity(s) +{ +} + + VCardEntity & +VCardEntity::operator = (VCardEntity & x) +{ + if (*this == x) return *this; + + Entity::operator = (x); + return *this; +} + + VCardEntity & +VCardEntity::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +VCardEntity::operator == (VCardEntity & x) +{ + x.parse(); + return false; +} + +VCardEntity::~VCardEntity() +{ +} + + void +VCardEntity::_parse() +{ + vDebug("parse"); + TQCString s(strRep_); + + int i = s.find(TQRegExp("BEGIN:VCARD", false)); + + while (i != -1) { + + i = s.find(TQRegExp("BEGIN:VCARD", false), 11); + + TQCString cardStr(s.left(i)); + + VCard * v = new VCard(cardStr); + + cardList_.append(v); + + v->parse(); + + s.remove(0, i); + } +} + + void +VCardEntity::_assemble() +{ + VCardListIterator it(cardList_); + + for (; it.current(); ++it) + strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. +} + + VCardList & +VCardEntity::cardList() +{ + parse(); + return cardList_; +} + + void +VCardEntity::setCardList(const VCardList & l) +{ + parse(); + cardList_ = l; +} + diff --git a/tdeabc/vcard/Value.cpp b/tdeabc/vcard/Value.cpp new file mode 100644 index 000000000..c95c0712b --- /dev/null +++ b/tdeabc/vcard/Value.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include + +using namespace VCARD; + +Value::Value() + : Entity() +{ +} + +Value::Value(const Value & x) + : Entity(x) +{ +} + +Value::Value(const TQCString & s) + : Entity(s) +{ +} + + Value & +Value::operator = (Value & x) +{ + if (*this == x) return *this; + + Entity::operator = (x); + return *this; +} + + Value & +Value::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +Value::operator == (Value & x) +{ + x.parse(); + return false; +} + +Value::~Value() +{ +} + + void +Value::_parse() +{ +} + + void +Value::_assemble() +{ + vDebug("Value::_assemble()"); +} + diff --git a/tdeabc/vcard/include/VCard.h b/tdeabc/vcard/include/VCard.h new file mode 100644 index 000000000..17b50e8f2 --- /dev/null +++ b/tdeabc/vcard/include/VCard.h @@ -0,0 +1,43 @@ +#ifndef VCARD_H +#define VCARD_H + +#include "VCardAdrParam.h" +#include "VCardAdrValue.h" +#include "VCardAgentParam.h" +#include "VCardAgentValue.h" +#include "VCardClassValue.h" +#include "VCardContentLine.h" +#include "VCardDateParam.h" +#include "VCardDateValue.h" +#include "VCardDefines.h" +#include "VCardEmailParam.h" +#include "VCardEntity.h" +#include "VCardEnum.h" +#include "VCardFloatValue.h" +#include "VCardGeoValue.h" +#include "VCardGroup.h" +#include "VCardImageParam.h" +#include "VCardImageValue.h" +#include "VCardImgValue.h" +#include "VCardLangValue.h" +#include "VCardNValue.h" +#include "VCardOrgValue.h" +#include "VCardParam.h" +#include "VCardPhoneNumberValue.h" +#include "VCardRToken.h" +#include "VCardSoundValue.h" +#include "VCardSourceParam.h" +#include "VCardTelParam.h" +#include "VCardTelValue.h" +#include "VCardTextBinParam.h" +#include "VCardTextBinValue.h" +#include "VCardTextListValue.h" +#include "VCardTextParam.h" +#include "VCardTextValue.h" +#include "VCardURIValue.h" +#include "VCardUTCValue.h" +#include "VCardVCard.h" +#include "VCardVCardEntity.h" +#include "VCardValue.h" + +#endif diff --git a/tdeabc/vcard/include/VCardAdrParam.h b/tdeabc/vcard/include/VCardAdrParam.h new file mode 100644 index 000000000..d40165f4a --- /dev/null +++ b/tdeabc/vcard/include/VCardAdrParam.h @@ -0,0 +1,64 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ADRPARAM_H +#define ADRPARAM_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AdrParam : public Param +{ + +#include "AdrParam-generated.h" + + TQStrList adrTypeList() + { parse(); return adrTypeList_; } + + TQCString textParam() + { parse(); return textParam_; } + + void setAdrTypeList(const TQStrList & l) + { adrTypeList_ = l; assembled_ = false; } + + void setTextParam(const TQCString & s) + { textParam_ = s; assembled_ = false; } + + enum AdrType { + AdrDom, AdrIntl, AdrPostal, AdrParcel, AdrHome, AdrWork, AdrPref, + AdrIANA, AdrX + }; + + private: + + TQStrList adrTypeList_; + TQCString textParam_; +}; +} + +#endif diff --git a/tdeabc/vcard/include/VCardAdrValue.h b/tdeabc/vcard/include/VCardAdrValue.h new file mode 100644 index 000000000..94ed93aee --- /dev/null +++ b/tdeabc/vcard/include/VCardAdrValue.h @@ -0,0 +1,83 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ADRVALUE_H +#define ADRVALUE_H + +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AdrValue : public Value +{ + +#include "AdrValue-generated.h" + + AdrValue *clone(); + + void setPOBox(const TQCString & s) + { poBox_ = s; assembled_ = false; } + + void setExtAddress(const TQCString & s) + { extAddress_ = s; assembled_ = false; } + + void setStreet(const TQCString & s) + { street_ = s; assembled_ = false; } + + void setLocality(const TQCString & s) + { locality_ = s; assembled_ = false; } + + void setRegion(const TQCString & s) + { region_ = s; assembled_ = false; } + + void setPostCode(const TQCString & s) + { postCode_ = s; assembled_ = false; } + + void setCountryName(const TQCString & s) + { countryName_ = s; assembled_ = false; } + + TQCString poBox() { parse(); return poBox_; } + TQCString extAddress() { parse(); return extAddress_; } + TQCString street() { parse(); return street_; } + TQCString locality() { parse(); return locality_; } + TQCString region() { parse(); return region_; } + TQCString postCode() { parse(); return postCode_; } + TQCString countryName() { parse(); return countryName_; } + + private: + + TQCString poBox_; + TQCString extAddress_; + TQCString street_; + TQCString locality_; + TQCString region_; + TQCString postCode_; + TQCString countryName_; +}; + +} + +#endif + diff --git a/tdeabc/vcard/include/VCardAgentParam.h b/tdeabc/vcard/include/VCardAgentParam.h new file mode 100644 index 000000000..90c3bd528 --- /dev/null +++ b/tdeabc/vcard/include/VCardAgentParam.h @@ -0,0 +1,60 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef AGENTPARAM_H +#define AGENTPARAM_H + +#include + +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AgentParam : public Param +{ + +#include "AgentParam-generated.h" + + bool refer() + { parse(); return refer_; } + + URIValue uri() + { parse(); return uri_; } + + void setRefer(bool b) + { refer_ = b; assembled_ = false; } + + void setURI(const TQCString & s) + { uri_ = s; assembled_ = false; } + + private: + + bool refer_; + URIValue uri_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardAgentValue.h b/tdeabc/vcard/include/VCardAgentValue.h new file mode 100644 index 000000000..dd68145c9 --- /dev/null +++ b/tdeabc/vcard/include/VCardAgentValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef AGENTVALUE_H +#define AGENTVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AgentValue : public Value +{ + +#include "AgentValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardClassValue.h b/tdeabc/vcard/include/VCardClassValue.h new file mode 100644 index 000000000..5de79167b --- /dev/null +++ b/tdeabc/vcard/include/VCardClassValue.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef CLASSVALUE_H +#define CLASSVALUE_H + +#include + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ClassValue : public Value +{ + +#include "ClassValue-generated.h" + + enum ClassType { + Public, Private, Confidential, Other + }; + + ClassValue *clone(); + + void setType( int type ) { classType_ = type; assembled_ = false; parsed_ = true; } + int type() { parse(); return classType_; } + + private: + int classType_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardContentLine.h b/tdeabc/vcard/include/VCardContentLine.h new file mode 100644 index 000000000..ea59444a0 --- /dev/null +++ b/tdeabc/vcard/include/VCardContentLine.h @@ -0,0 +1,77 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef CONTENTLINE_H +#define CONTENTLINE_H + +#include + +#include "VCardEnum.h" +#include "VCardEntity.h" +#include "VCardParam.h" +#include "VCardValue.h" + +namespace VCARD +{ + +class KVCARD_EXPORT ContentLine : public Entity +{ + +#include "ContentLine-generated.h" + + TQCString group() { parse(); return group_; } + TQCString name() { parse(); return name_; } + Value * value() { parse(); return value_; } + ParamList paramList() { parse(); return paramList_; } + ParamType paramType() { parse(); return paramType_; } + ValueType valueType() { parse(); return valueType_; } + EntityType entityType() { parse(); return entityType_; } + + void setGroup (const TQCString & s) + { group_ = s; assembled_ = false; } + + void setName (const TQCString & s) + { name_ = s; assembled_ = false; } + + void setValue (Value *s) + { value_ = s; assembled_ = false; } + + void setParamList (const ParamList & l) + { paramList_ = l; assembled_ = false; } + + void clear (); + + private: + + TQCString group_; + TQCString name_; + TQPtrList paramList_; + Value * value_; + + ParamType paramType_; + ValueType valueType_; + EntityType entityType_; +}; +} + +#endif diff --git a/tdeabc/vcard/include/VCardDateParam.h b/tdeabc/vcard/include/VCardDateParam.h new file mode 100644 index 000000000..410eae6b7 --- /dev/null +++ b/tdeabc/vcard/include/VCardDateParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef DATEPARAM_H +#define DATEPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT DateParam : public Param +{ + +#include "DateParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardDateValue.h b/tdeabc/vcard/include/VCardDateValue.h new file mode 100644 index 000000000..4f2e2fe7f --- /dev/null +++ b/tdeabc/vcard/include/VCardDateValue.h @@ -0,0 +1,99 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef DATEVALUE_H +#define DATEVALUE_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT DateValue : public Value +{ +#include "DateValue-generated.h" + + DateValue( + unsigned int year, + unsigned int month, + unsigned int day, + unsigned int hour = 0, + unsigned int minute = 0, + unsigned int second = 0, + double secFrac = 0, + bool zonePositive = true, + unsigned int zoneHour = 0, + unsigned int zoneMinute = 0); + + DateValue(const TQDate &); + DateValue(const TQDateTime &); + + DateValue *clone(); + + bool hasTime(); + + unsigned int year(); + unsigned int month(); + unsigned int day(); + unsigned int hour(); + unsigned int minute(); + unsigned int second(); + double secondFraction(); + bool zonePositive(); + unsigned int zoneHour(); + unsigned int zoneMinute(); + + void setYear (unsigned int); + void setMonth (unsigned int); + void setDay (unsigned int); + void setHour (unsigned int); + void setMinute (unsigned int); + void setSecond (unsigned int); + void setSecondFraction (double); + void setZonePositive (bool); + void setZoneHour (unsigned int); + void setZoneMinute (unsigned int); + + TQDate qdate(); + TQTime qtime(); + TQDateTime qdt(); + + private: + + unsigned int year_, month_, day_, + hour_, minute_, second_, + zoneHour_, zoneMinute_; + + double secFrac_; + + bool zonePositive_; + + bool hasTime_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardDefines.h b/tdeabc/vcard/include/VCardDefines.h new file mode 100644 index 000000000..e778bc24f --- /dev/null +++ b/tdeabc/vcard/include/VCardDefines.h @@ -0,0 +1,52 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VCARD_DEFINES_H +#define VCARD_DEFINES_H + +#include + +#ifdef VCARD_DEBUG +#define vDebug(a) kdDebug(5710) << a << endl; +#else +#define vDebug(a) +#endif + +#if 0 +#ifndef NDEBUG +# include +# include +# ifdef __GNUG__ +# define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ + << __LINE__ << "): " << TQCString((a)).data() << endl; +# else +# define vDebug(a) cerr << className() << ": " \ + << TQCString((a)).data() << endl; +# endif +#else +# define vDebug(a) +#endif +#endif + +#endif // Included this file + diff --git a/tdeabc/vcard/include/VCardEmailParam.h b/tdeabc/vcard/include/VCardEmailParam.h new file mode 100644 index 000000000..1fe558afd --- /dev/null +++ b/tdeabc/vcard/include/VCardEmailParam.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef EMAILPARAM_H +#define EMAILPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT EmailParam : public Param +{ + +#include "EmailParam-generated.h" + + TQCString emailType() { parse(); return emailType_; } + bool pref() { parse(); return pref_; } + + void setEmailType(const TQCString & s) + { emailType_ = s; assembled_ = false; } + + void setPref(bool b) + { pref_ = b; assembled_ = false; } + + private: + + TQCString emailType_; + bool pref_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardEntity.h b/tdeabc/vcard/include/VCardEntity.h new file mode 100644 index 000000000..e87c5f1a6 --- /dev/null +++ b/tdeabc/vcard/include/VCardEntity.h @@ -0,0 +1,68 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ENTITY_H +#define ENTITY_H + +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Entity +{ + public: + + Entity(); + Entity(const Entity & e); + Entity(const TQCString & s); + + virtual Entity & operator = (const Entity & e); + virtual Entity & operator = (const TQCString & s); + + virtual bool operator == (Entity & e); + virtual bool operator != (Entity & e); + virtual bool operator == (const TQCString & s); + virtual bool operator != (const TQCString & s); + + virtual ~Entity(); + + TQCString asString(); + + virtual void parse(); + virtual void assemble(); + + virtual void _parse() = 0; + virtual void _assemble() = 0; + + protected: + + TQCString strRep_; + bool parsed_; + bool assembled_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardEnum.h b/tdeabc/vcard/include/VCardEnum.h new file mode 100644 index 000000000..4552ccdbc --- /dev/null +++ b/tdeabc/vcard/include/VCardEnum.h @@ -0,0 +1,123 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ENUM_H +#define ENUM_H + +#include + +#include + +namespace VCARD +{ + +extern const TQCString paramNames []; + +enum EntityType { + EntityName, + EntityProfile, + EntitySource, + EntityFullName, + EntityN, + EntityNickname, + EntityPhoto, + EntityBirthday, + EntityAddress, + EntityLabel, + EntityTelephone, + EntityEmail, + EntityMailer, + EntityTimeZone, + EntityGeo, + EntityTitle, + EntityRole, + EntityLogo, + EntityAgent, + EntityOrganisation, + EntityCategories, + EntityNote, + EntityProductID, + EntityRevision, + EntitySortString, + EntitySound, + EntityUID, + EntityURI, + EntityURL, + EntityVersion, + EntityClass, + EntityKey, + EntityExtension, + EntityUnknown +}; + +enum ValueType { + ValueSound, + ValueAgent, + ValueAddress, + ValueTel, + ValueTextBin, + ValueOrg, + ValueN, + ValueUTC, + ValueURI, + ValueClass, + ValueFloat, + ValueImage, + ValueDate, + ValueTextList, + ValueText, + ValueGeo, + ValueUnknown +}; + +enum ParamType { + ParamUnknown, + ParamNone, + ParamSource, + ParamText, + ParamImage, + ParamDate, + ParamAddrText, + ParamTel, + ParamEmail, + ParamMailer, + ParamAgent, + ParamTextBin, + ParamTextNS, + ParamSound +}; + +extern const ParamType paramTypesTable[]; + +KVCARD_EXPORT ParamType EntityTypeToParamType(EntityType); +KVCARD_EXPORT ValueType EntityTypeToValueType(EntityType); +KVCARD_EXPORT TQCString EntityTypeToParamName(EntityType); +KVCARD_EXPORT EntityType EntityNameToEntityType(const TQCString &); + +KVCARD_EXPORT char * encodeBase64(const char *, unsigned long, unsigned long &); +KVCARD_EXPORT char * decodeBase64(const char *, unsigned long, unsigned long &); + +} + +#endif + diff --git a/tdeabc/vcard/include/VCardFloatValue.h b/tdeabc/vcard/include/VCardFloatValue.h new file mode 100644 index 000000000..45a6823be --- /dev/null +++ b/tdeabc/vcard/include/VCardFloatValue.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef FLOATVALUE_H +#define FLOATVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT FloatValue : public Value +{ + +#include "FloatValue-generated.h" + + FloatValue(float); + + float value(); + void setValue(float); + + private: + + float value_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardGeoValue.h b/tdeabc/vcard/include/VCardGeoValue.h new file mode 100644 index 000000000..4228587a4 --- /dev/null +++ b/tdeabc/vcard/include/VCardGeoValue.h @@ -0,0 +1,49 @@ +/* + This file is part of libvcard. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef GEOVALUE_H +#define GEOVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT GeoValue : public Value +{ + +#include "GeoValue-generated.h" + + GeoValue *clone(); + + void setLatitude( float lat ) { latitude_ = lat; assembled_ = false; } + void setLongitude( float lon ) { longitude_ = lon; assembled_ = false; } + + float latitude() { parse(); return latitude_; } + float longitude() { parse(); return longitude_; } + + private: + float latitude_; + float longitude_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardGroup.h b/tdeabc/vcard/include/VCardGroup.h new file mode 100644 index 000000000..ce884f100 --- /dev/null +++ b/tdeabc/vcard/include/VCardGroup.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GROUP_H +#define GROUP_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Group : public Entity +{ +#include "Group-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardImageParam.h b/tdeabc/vcard/include/VCardImageParam.h new file mode 100644 index 000000000..10ab8a3f5 --- /dev/null +++ b/tdeabc/vcard/include/VCardImageParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef IMGPARAM_H +#define IMGPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ImageParam : public Param +{ + +#include "ImageParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardImageValue.h b/tdeabc/vcard/include/VCardImageValue.h new file mode 100644 index 000000000..45fbcad9c --- /dev/null +++ b/tdeabc/vcard/include/VCardImageValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef IMAGEVALUE_H +#define IMAGEVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ImageValue : public Value +{ + +#include "ImageValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardImgValue.h b/tdeabc/vcard/include/VCardImgValue.h new file mode 100644 index 000000000..7d4bbfa2d --- /dev/null +++ b/tdeabc/vcard/include/VCardImgValue.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef IMGVALUE_H +#define IMGVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ImgValue : public Value +{ +#include "ImgValue-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardLangValue.h b/tdeabc/vcard/include/VCardLangValue.h new file mode 100644 index 000000000..7767d52fa --- /dev/null +++ b/tdeabc/vcard/include/VCardLangValue.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef LANGVALUE_H +#define LANGVALUE_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT LangValue : public Value +{ +#include "LangValue-generated.h" + + TQCString primary(); + TQStrList subtags(); + + void setPrimary(const TQCString &); + void setSubTags(const TQStrList &); + + TQCString primary_; + TQStrList subtags_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardNValue.h b/tdeabc/vcard/include/VCardNValue.h new file mode 100644 index 000000000..9db37fbbc --- /dev/null +++ b/tdeabc/vcard/include/VCardNValue.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef NVALUE_H +#define NVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT NValue : public Value +{ +#include "NValue-generated.h" + NValue *clone(); + + TQCString family() { parse(); return family_; } + TQCString given() { parse(); return given_; } + TQCString middle() { parse(); return middle_; } + TQCString prefix() { parse(); return prefix_; } + TQCString suffix() { parse(); return suffix_; } + + void setFamily (const TQCString & s) { family_ = s; assembled_ = false; } + void setGiven (const TQCString & s) { given_ = s; assembled_ = false; } + void setMiddle (const TQCString & s) { middle_ = s; assembled_ = false; } + void setPrefix (const TQCString & s) { prefix_ = s; assembled_ = false; } + void setSuffix (const TQCString & s) { suffix_ = s; assembled_ = false; } + + private: + + TQCString family_, given_, middle_, prefix_, suffix_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardOrgValue.h b/tdeabc/vcard/include/VCardOrgValue.h new file mode 100644 index 000000000..a2bd803e5 --- /dev/null +++ b/tdeabc/vcard/include/VCardOrgValue.h @@ -0,0 +1,50 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ORGVALUE_H +#define ORGVALUE_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT OrgValue : public Value +{ + +#include "OrgValue-generated.h" + + unsigned int numValues(); + TQCString value(unsigned int); + + private: + + TQStrList valueList_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardParam.h b/tdeabc/vcard/include/VCardParam.h new file mode 100644 index 000000000..93d70f06b --- /dev/null +++ b/tdeabc/vcard/include/VCardParam.h @@ -0,0 +1,59 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef PARAM_H +#define PARAM_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Param : public Entity +{ + +#include "Param-generated.h" + + Param(const TQCString &name, const TQCString &value); + + void setName(const TQCString &); + void setValue(const TQCString &); + + TQCString name(); + TQCString value(); + + private: + + TQCString name_; + TQCString value_; +}; + +typedef TQPtrList ParamList; +typedef TQPtrListIterator ParamListIterator; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardPhoneNumberValue.h b/tdeabc/vcard/include/VCardPhoneNumberValue.h new file mode 100644 index 000000000..3f9e106ca --- /dev/null +++ b/tdeabc/vcard/include/VCardPhoneNumberValue.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef PHONENUMBERVALUE_H +#define PHONENUMBERVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT PhoneNumberValue : public Value +{ +#include "PhoneNumberValue-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardRToken.h b/tdeabc/vcard/include/VCardRToken.h new file mode 100644 index 000000000..17a3943d3 --- /dev/null +++ b/tdeabc/vcard/include/VCardRToken.h @@ -0,0 +1,40 @@ +/* + + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef RTOKEN_H +#define RTOKEN_H + +#include + +#include + +namespace VCARD +{ + +KVCARD_EXPORT TQ_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l); + +} + +#endif + diff --git a/tdeabc/vcard/include/VCardSndValue.h b/tdeabc/vcard/include/VCardSndValue.h new file mode 100644 index 000000000..09a3a8238 --- /dev/null +++ b/tdeabc/vcard/include/VCardSndValue.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SNDVALUE_H +#define SNDVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT SndValue : public Value +{ +#include "SndValue-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardSoundValue.h b/tdeabc/vcard/include/VCardSoundValue.h new file mode 100644 index 000000000..61858f058 --- /dev/null +++ b/tdeabc/vcard/include/VCardSoundValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SOUNDVALUE_H +#define SOUNDVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT SoundValue : public Value +{ + +#include "SoundValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardSourceParam.h b/tdeabc/vcard/include/VCardSourceParam.h new file mode 100644 index 000000000..1d9d03d47 --- /dev/null +++ b/tdeabc/vcard/include/VCardSourceParam.h @@ -0,0 +1,58 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SOURCEPARAM_H +#define SOURCEPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT SourceParam : public Param +{ + +#include "SourceParam-generated.h" + + enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX }; + + SourceParamType type() { parse(); return type_;} + TQCString par() { parse(); return par_; } + TQCString val() { parse(); return val_; } + + void setType(SourceParamType t) { type_ = t; assembled_ = false; } + void setPar(const TQCString & s) { par_ = s; assembled_ = false; } + void setVal(const TQCString & s) { val_ = s; assembled_ = false; } + + private: + + SourceParamType type_; + // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" + TQCString par_, val_; // Sub-parameter, value +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTelParam.h b/tdeabc/vcard/include/VCardTelParam.h new file mode 100644 index 000000000..9eea5da2f --- /dev/null +++ b/tdeabc/vcard/include/VCardTelParam.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TELPARAM_H +#define TELPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TelParam : public Param +{ +#include "TelParam-generated.h" + + enum TelType { + TelHome, TelWork, TelPref, TelVoice, TelFex, TelMsg, TelCell, + TelPager, TelBBS, TelModem, TelCar, TelISDN, TelVideo, TelPCS, + TelIANA, TelX + }; + + private: + + TQPtrList types_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTelValue.h b/tdeabc/vcard/include/VCardTelValue.h new file mode 100644 index 000000000..043a45aa9 --- /dev/null +++ b/tdeabc/vcard/include/VCardTelValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TELVALUE_H +#define TELVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TelValue : public Value +{ + +#include "TelValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextBinParam.h b/tdeabc/vcard/include/VCardTextBinParam.h new file mode 100644 index 000000000..5a681ad48 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextBinParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTBINPARAM_H +#define TEXTBINPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextBinParam : public Param +{ + +#include "TextBinParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextBinValue.h b/tdeabc/vcard/include/VCardTextBinValue.h new file mode 100644 index 000000000..316fa7832 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextBinValue.h @@ -0,0 +1,67 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTBINVALUE_H +#define TEXTBINVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextBinValue : public Value +{ + +#include "TextBinValue-generated.h" + + TextBinValue *clone(); + + bool isBinary() { parse(); return mIsBinary_; } + TQByteArray data() { parse(); return mData_; } + TQString url() { parse(); return mUrl_; } + + void setData( const TQByteArray &data ) + { + mData_ = data; + mIsBinary_ = true; + assembled_ = false; + } + + void setUrl( const TQString &url ) + { + mUrl_ = url; + mIsBinary_ = false; + assembled_ = false; + } + + private: + int mIsBinary_; + TQByteArray mData_; + TQString mUrl_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextListValue.h b/tdeabc/vcard/include/VCardTextListValue.h new file mode 100644 index 000000000..53760c75a --- /dev/null +++ b/tdeabc/vcard/include/VCardTextListValue.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTLISTVALUE_H +#define TEXTLISTVALUE_H + +#include + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextListValue : public Value +{ + +#include "TextListValue-generated.h" + + unsigned int numValues(); + TQCString value(unsigned int); + + private: + + TQStrList valueList_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextParam.h b/tdeabc/vcard/include/VCardTextParam.h new file mode 100644 index 000000000..d593c0578 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTPARAM_H +#define TEXTPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextParam : public Param +{ + +#include "TextParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextValue.h b/tdeabc/vcard/include/VCardTextValue.h new file mode 100644 index 000000000..66eed32a8 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextValue.h @@ -0,0 +1,41 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTVALUE_H +#define TEXTVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextValue : public Value +{ +#include "TextValue-generated.h" + + TextValue *clone(); +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardURIValue.h b/tdeabc/vcard/include/VCardURIValue.h new file mode 100644 index 000000000..696887774 --- /dev/null +++ b/tdeabc/vcard/include/VCardURIValue.h @@ -0,0 +1,52 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef URIVALUE_H +#define URIVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT URIValue : public Value +{ +#include "URIValue-generated.h" + + URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart); + + TQCString scheme(); + TQCString schemeSpecificPart(); + + void setScheme (const TQCString &); + void setSchemeSpecificPart (const TQCString &); + + private: + + TQCString scheme_; + TQCString schemeSpecificPart_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardUTCValue.h b/tdeabc/vcard/include/VCardUTCValue.h new file mode 100644 index 000000000..cb09ccf00 --- /dev/null +++ b/tdeabc/vcard/include/VCardUTCValue.h @@ -0,0 +1,58 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef UTCVALUE_H +#define UTCVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT UTCValue : public Value +{ + +#include "UTCValue-generated.h" + + UTCValue *clone(); + + void setPositive( int p ) { positive_ = p; assembled_ = false; } + void setHour( int h ) { hour_ = h; assembled_ = false; } + void setMinute( int m ) { minute_ = m; assembled_ = false; } + + bool positive() { parse(); return positive_; } + unsigned int hour() { parse(); return hour_; } + unsigned int minute() { parse(); return minute_; } + + private: + + bool positive_; + unsigned int hour_; + unsigned int minute_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardVCard.h b/tdeabc/vcard/include/VCardVCard.h new file mode 100644 index 000000000..53563e8c0 --- /dev/null +++ b/tdeabc/vcard/include/VCardVCard.h @@ -0,0 +1,63 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VCARD_VCARD_H +#define VCARD_VCARD_H + +#include +#include + +#include +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT VCard : public Entity +{ + +#include "VCard-generated.h" + + bool has(EntityType); + bool has(const TQCString &); + + void add(const ContentLine &); + void add(const TQCString &); + + ContentLine * contentLine(EntityType); + ContentLine * contentLine(const TQCString &); + + TQCString group() { parse(); return group_; } + + TQPtrList contentLineList() { parse(); return contentLineList_; } + + private: + + TQCString group_; + TQPtrList contentLineList_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardVCardEntity.h b/tdeabc/vcard/include/VCardVCardEntity.h new file mode 100644 index 000000000..422790c22 --- /dev/null +++ b/tdeabc/vcard/include/VCardVCardEntity.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VCARD_ENTITY_H +#define VCARD_ENTITY_H + +#include +#include + +#include +#include +#include + +namespace VCARD +{ + +typedef TQPtrList VCardList; +typedef TQPtrListIterator VCardListIterator; + +class KVCARD_EXPORT VCardEntity : public Entity +{ + +#include "VCardEntity-generated.h" + + void setCardList(const VCardList & l); + VCardList & cardList(); + + private: + + VCardList cardList_; + +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardValue.h b/tdeabc/vcard/include/VCardValue.h new file mode 100644 index 000000000..3c167d70a --- /dev/null +++ b/tdeabc/vcard/include/VCardValue.h @@ -0,0 +1,46 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VALUE_H +#define VALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Value : public Entity +{ +#include "Value-generated.h" + + virtual Value *clone() { return new Value( *this ); } +}; + +typedef TQPtrList ValueList; +typedef TQPtrListIterator ValueListIterator; + +} + +#endif diff --git a/tdeabc/vcard/include/generated/AdrParam-generated.h b/tdeabc/vcard/include/generated/AdrParam-generated.h new file mode 100644 index 000000000..1afdcd36a --- /dev/null +++ b/tdeabc/vcard/include/generated/AdrParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AdrParam(); +AdrParam(const AdrParam&); +AdrParam(const TQCString&); +AdrParam & operator = (AdrParam&); +AdrParam & operator = (const TQCString&); +bool operator ==(AdrParam&); +bool operator !=(AdrParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AdrParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AdrParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AdrParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/AdrValue-generated.h b/tdeabc/vcard/include/generated/AdrValue-generated.h new file mode 100644 index 000000000..9882d1186 --- /dev/null +++ b/tdeabc/vcard/include/generated/AdrValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AdrValue(); +AdrValue(const AdrValue&); +AdrValue(const TQCString&); +AdrValue & operator = (AdrValue&); +AdrValue & operator = (const TQCString&); +bool operator ==(AdrValue&); +bool operator !=(AdrValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AdrValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AdrValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AdrValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/AgentParam-generated.h b/tdeabc/vcard/include/generated/AgentParam-generated.h new file mode 100644 index 000000000..07b87d106 --- /dev/null +++ b/tdeabc/vcard/include/generated/AgentParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AgentParam(); +AgentParam(const AgentParam&); +AgentParam(const TQCString&); +AgentParam & operator = (AgentParam&); +AgentParam & operator = (const TQCString&); +bool operator ==(AgentParam&); +bool operator !=(AgentParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AgentParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AgentParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AgentParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/AgentValue-generated.h b/tdeabc/vcard/include/generated/AgentValue-generated.h new file mode 100644 index 000000000..e2866bb8f --- /dev/null +++ b/tdeabc/vcard/include/generated/AgentValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AgentValue(); +AgentValue(const AgentValue&); +AgentValue(const TQCString&); +AgentValue & operator = (AgentValue&); +AgentValue & operator = (const TQCString&); +bool operator ==(AgentValue&); +bool operator !=(AgentValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AgentValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AgentValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AgentValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ClassValue-generated.h b/tdeabc/vcard/include/generated/ClassValue-generated.h new file mode 100644 index 000000000..e10c65568 --- /dev/null +++ b/tdeabc/vcard/include/generated/ClassValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ClassValue(); +ClassValue(const ClassValue&); +ClassValue(const TQCString&); +ClassValue & operator = (ClassValue&); +ClassValue & operator = (const TQCString&); +bool operator ==(ClassValue&); +bool operator !=(ClassValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ClassValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ClassValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ClassValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ContentLine-generated.h b/tdeabc/vcard/include/generated/ContentLine-generated.h new file mode 100644 index 000000000..ad2ac7649 --- /dev/null +++ b/tdeabc/vcard/include/generated/ContentLine-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ContentLine(); +ContentLine(const ContentLine&); +ContentLine(const TQCString&); +ContentLine & operator = (ContentLine&); +ContentLine & operator = (const TQCString&); +bool operator ==(ContentLine&); +bool operator !=(ContentLine& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ContentLine a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ContentLine(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ContentLine"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/DateParam-generated.h b/tdeabc/vcard/include/generated/DateParam-generated.h new file mode 100644 index 000000000..75e7ad72d --- /dev/null +++ b/tdeabc/vcard/include/generated/DateParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +DateParam(); +DateParam(const DateParam&); +DateParam(const TQCString&); +DateParam & operator = (DateParam&); +DateParam & operator = (const TQCString&); +bool operator ==(DateParam&); +bool operator !=(DateParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {DateParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~DateParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "DateParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/DateValue-generated.h b/tdeabc/vcard/include/generated/DateValue-generated.h new file mode 100644 index 000000000..cf0eb40d8 --- /dev/null +++ b/tdeabc/vcard/include/generated/DateValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +DateValue(); +DateValue(const DateValue&); +DateValue(const TQCString&); +DateValue & operator = (DateValue&); +DateValue & operator = (const TQCString&); +bool operator ==(DateValue&); +bool operator !=(DateValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {DateValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~DateValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "DateValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/EmailParam-generated.h b/tdeabc/vcard/include/generated/EmailParam-generated.h new file mode 100644 index 000000000..46ae1f80f --- /dev/null +++ b/tdeabc/vcard/include/generated/EmailParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +EmailParam(); +EmailParam(const EmailParam&); +EmailParam(const TQCString&); +EmailParam & operator = (EmailParam&); +EmailParam & operator = (const TQCString&); +bool operator ==(EmailParam&); +bool operator !=(EmailParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {EmailParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~EmailParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "EmailParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/FloatValue-generated.h b/tdeabc/vcard/include/generated/FloatValue-generated.h new file mode 100644 index 000000000..155f52ae1 --- /dev/null +++ b/tdeabc/vcard/include/generated/FloatValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +FloatValue(); +FloatValue(const FloatValue&); +FloatValue(const TQCString&); +FloatValue & operator = (FloatValue&); +FloatValue & operator = (const TQCString&); +bool operator ==(FloatValue&); +bool operator !=(FloatValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {FloatValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~FloatValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "FloatValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/GeoValue-generated.h b/tdeabc/vcard/include/generated/GeoValue-generated.h new file mode 100644 index 000000000..b525e8c21 --- /dev/null +++ b/tdeabc/vcard/include/generated/GeoValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +GeoValue(); +GeoValue(const GeoValue&); +GeoValue(const TQCString&); +GeoValue & operator = (GeoValue&); +GeoValue & operator = (const TQCString&); +bool operator ==(GeoValue&); +bool operator !=(GeoValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {GeoValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~GeoValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "GeoValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Group-generated.h b/tdeabc/vcard/include/generated/Group-generated.h new file mode 100644 index 000000000..38e1c2a3a --- /dev/null +++ b/tdeabc/vcard/include/generated/Group-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +Group(); +Group(const Group&); +Group(const TQCString&); +Group & operator = (Group&); +Group & operator = (const TQCString&); +bool operator ==(Group&); +bool operator !=(Group& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {Group a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~Group(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "Group"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImageParam-generated.h b/tdeabc/vcard/include/generated/ImageParam-generated.h new file mode 100644 index 000000000..78a5a97cf --- /dev/null +++ b/tdeabc/vcard/include/generated/ImageParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImageParam(); +ImageParam(const ImageParam&); +ImageParam(const TQCString&); +ImageParam & operator = (ImageParam&); +ImageParam & operator = (const TQCString&); +bool operator ==(ImageParam&); +bool operator !=(ImageParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImageParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImageParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ImageParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImageValue-generated.h b/tdeabc/vcard/include/generated/ImageValue-generated.h new file mode 100644 index 000000000..882081fbc --- /dev/null +++ b/tdeabc/vcard/include/generated/ImageValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImageValue(); +ImageValue(const ImageValue&); +ImageValue(const TQCString&); +ImageValue & operator = (ImageValue&); +ImageValue & operator = (const TQCString&); +bool operator ==(ImageValue&); +bool operator !=(ImageValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImageValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImageValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ImageValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImgParam-generated.h b/tdeabc/vcard/include/generated/ImgParam-generated.h new file mode 100644 index 000000000..04132c857 --- /dev/null +++ b/tdeabc/vcard/include/generated/ImgParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImgParam(); +ImgParam(const ImgParam&); +ImgParam(const TQCString&); +ImgParam & operator = (ImgParam&); +ImgParam & operator = (const TQCString&); +bool operator ==(ImgParam&); +bool operator !=(ImgParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImgParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImgParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +virtual const char * className() const { return "ImgParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImgValue-generated.h b/tdeabc/vcard/include/generated/ImgValue-generated.h new file mode 100644 index 000000000..0774de9bf --- /dev/null +++ b/tdeabc/vcard/include/generated/ImgValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImgValue(); +ImgValue(const ImgValue&); +ImgValue(const TQCString&); +ImgValue & operator = (ImgValue&); +ImgValue & operator = (const TQCString&); +bool operator ==(ImgValue&); +bool operator !=(ImgValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImgValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImgValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +virtual const char * className() const { return "ImgValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/LangValue-generated.h b/tdeabc/vcard/include/generated/LangValue-generated.h new file mode 100644 index 000000000..c4930c59e --- /dev/null +++ b/tdeabc/vcard/include/generated/LangValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +LangValue(); +LangValue(const LangValue&); +LangValue(const TQCString&); +LangValue & operator = (LangValue&); +LangValue & operator = (const TQCString&); +bool operator ==(LangValue&); +bool operator !=(LangValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {LangValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~LangValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "LangValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/NValue-generated.h b/tdeabc/vcard/include/generated/NValue-generated.h new file mode 100644 index 000000000..d78715ec0 --- /dev/null +++ b/tdeabc/vcard/include/generated/NValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +NValue(); +NValue(const NValue&); +NValue(const TQCString&); +NValue & operator = (NValue&); +NValue & operator = (const TQCString&); +bool operator ==(NValue&); +bool operator !=(NValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {NValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~NValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "NValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Name-generated.h b/tdeabc/vcard/include/generated/Name-generated.h new file mode 100644 index 000000000..17d56e680 --- /dev/null +++ b/tdeabc/vcard/include/generated/Name-generated.h @@ -0,0 +1,22 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +V_Name(); +V_Name(const V_Name&); +V_Name(const TQCString&); +V_Name & operator = (V_Name&); +V_Name & operator = (const TQCString&); +bool operator ==(V_Name&); +bool operator !=(V_Name& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {V_Name a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~V_Name(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/OrgValue-generated.h b/tdeabc/vcard/include/generated/OrgValue-generated.h new file mode 100644 index 000000000..661ecf5a3 --- /dev/null +++ b/tdeabc/vcard/include/generated/OrgValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +OrgValue(); +OrgValue(const OrgValue&); +OrgValue(const TQCString&); +OrgValue & operator = (OrgValue&); +OrgValue & operator = (const TQCString&); +bool operator ==(OrgValue&); +bool operator !=(OrgValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {OrgValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~OrgValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "OrgValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Param-generated.h b/tdeabc/vcard/include/generated/Param-generated.h new file mode 100644 index 000000000..bf63e7166 --- /dev/null +++ b/tdeabc/vcard/include/generated/Param-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +Param(); +Param(const Param&); +Param(const TQCString&); +Param & operator = (Param&); +Param & operator = (const TQCString&); +bool operator ==(Param&); +bool operator !=(Param& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {Param a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~Param(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "Param"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ParamName-generated.h b/tdeabc/vcard/include/generated/ParamName-generated.h new file mode 100644 index 000000000..60b1e12d5 --- /dev/null +++ b/tdeabc/vcard/include/generated/ParamName-generated.h @@ -0,0 +1,22 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +V_ParamName(); +V_ParamName(const V_ParamName&); +V_ParamName(const TQCString&); +V_ParamName & operator = (V_ParamName&); +V_ParamName & operator = (const TQCString&); +bool operator ==(V_ParamName&); +bool operator !=(V_ParamName& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {V_ParamName a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~V_ParamName(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ParamValue-generated.h b/tdeabc/vcard/include/generated/ParamValue-generated.h new file mode 100644 index 000000000..f31a166c6 --- /dev/null +++ b/tdeabc/vcard/include/generated/ParamValue-generated.h @@ -0,0 +1,22 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +V_ParamValue(); +V_ParamValue(const V_ParamValue&); +V_ParamValue(const TQCString&); +V_ParamValue & operator = (V_ParamValue&); +V_ParamValue & operator = (const TQCString&); +bool operator ==(V_ParamValue&); +bool operator !=(V_ParamValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {V_ParamValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~V_ParamValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/PhoneNumberValue-generated.h b/tdeabc/vcard/include/generated/PhoneNumberValue-generated.h new file mode 100644 index 000000000..f0eb6b4f4 --- /dev/null +++ b/tdeabc/vcard/include/generated/PhoneNumberValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +PhoneNumberValue(); +PhoneNumberValue(const PhoneNumberValue&); +PhoneNumberValue(const TQCString&); +PhoneNumberValue & operator = (PhoneNumberValue&); +PhoneNumberValue & operator = (const TQCString&); +bool operator ==(PhoneNumberValue&); +bool operator !=(PhoneNumberValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {PhoneNumberValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~PhoneNumberValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "PhoneNumberValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/SoundValue-generated.h b/tdeabc/vcard/include/generated/SoundValue-generated.h new file mode 100644 index 000000000..64081be0b --- /dev/null +++ b/tdeabc/vcard/include/generated/SoundValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +SoundValue(); +SoundValue(const SoundValue&); +SoundValue(const TQCString&); +SoundValue & operator = (SoundValue&); +SoundValue & operator = (const TQCString&); +bool operator ==(SoundValue&); +bool operator !=(SoundValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {SoundValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~SoundValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "SoundValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/SourceParam-generated.h b/tdeabc/vcard/include/generated/SourceParam-generated.h new file mode 100644 index 000000000..e3b13bca1 --- /dev/null +++ b/tdeabc/vcard/include/generated/SourceParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +SourceParam(); +SourceParam(const SourceParam&); +SourceParam(const TQCString&); +SourceParam & operator = (SourceParam&); +SourceParam & operator = (const TQCString&); +bool operator ==(SourceParam&); +bool operator !=(SourceParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {SourceParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~SourceParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "SourceParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TelParam-generated.h b/tdeabc/vcard/include/generated/TelParam-generated.h new file mode 100644 index 000000000..9f8f24270 --- /dev/null +++ b/tdeabc/vcard/include/generated/TelParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TelParam(); +TelParam(const TelParam&); +TelParam(const TQCString&); +TelParam & operator = (TelParam&); +TelParam & operator = (const TQCString&); +bool operator ==(TelParam&); +bool operator !=(TelParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TelParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TelParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TelParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TelValue-generated.h b/tdeabc/vcard/include/generated/TelValue-generated.h new file mode 100644 index 000000000..600da7727 --- /dev/null +++ b/tdeabc/vcard/include/generated/TelValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TelValue(); +TelValue(const TelValue&); +TelValue(const TQCString&); +TelValue & operator = (TelValue&); +TelValue & operator = (const TQCString&); +bool operator ==(TelValue&); +bool operator !=(TelValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TelValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TelValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TelValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextBinParam-generated.h b/tdeabc/vcard/include/generated/TextBinParam-generated.h new file mode 100644 index 000000000..37dc56e55 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextBinParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextBinParam(); +TextBinParam(const TextBinParam&); +TextBinParam(const TQCString&); +TextBinParam & operator = (TextBinParam&); +TextBinParam & operator = (const TQCString&); +bool operator ==(TextBinParam&); +bool operator !=(TextBinParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextBinParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextBinParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextBinParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextBinValue-generated.h b/tdeabc/vcard/include/generated/TextBinValue-generated.h new file mode 100644 index 000000000..4c9580421 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextBinValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextBinValue(); +TextBinValue(const TextBinValue&); +TextBinValue(const TQCString&); +TextBinValue & operator = (TextBinValue&); +TextBinValue & operator = (const TQCString&); +bool operator ==(TextBinValue&); +bool operator !=(TextBinValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextBinValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextBinValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextBinValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextListValue-generated.h b/tdeabc/vcard/include/generated/TextListValue-generated.h new file mode 100644 index 000000000..8babb0d9f --- /dev/null +++ b/tdeabc/vcard/include/generated/TextListValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextListValue(); +TextListValue(const TextListValue&); +TextListValue(const TQCString&); +TextListValue & operator = (TextListValue&); +TextListValue & operator = (const TQCString&); +bool operator ==(TextListValue&); +bool operator !=(TextListValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextListValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextListValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextListValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextNSParam-generated.h b/tdeabc/vcard/include/generated/TextNSParam-generated.h new file mode 100644 index 000000000..bd8e74b07 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextNSParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextNSParam(); +TextNSParam(const TextNSParam&); +TextNSParam(const TQCString&); +TextNSParam & operator = (TextNSParam&); +TextNSParam & operator = (const TQCString&); +bool operator ==(TextNSParam&); +bool operator !=(TextNSParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextNSParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextNSParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextNSParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextParam-generated.h b/tdeabc/vcard/include/generated/TextParam-generated.h new file mode 100644 index 000000000..54ae611a5 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextParam(); +TextParam(const TextParam&); +TextParam(const TQCString&); +TextParam & operator = (TextParam&); +TextParam & operator = (const TQCString&); +bool operator ==(TextParam&); +bool operator !=(TextParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextValue-generated.h b/tdeabc/vcard/include/generated/TextValue-generated.h new file mode 100644 index 000000000..5b56b54a7 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextValue(); +TextValue(const TextValue&); +TextValue(const TQCString&); +TextValue & operator = (TextValue&); +TextValue & operator = (const TQCString&); +bool operator ==(TextValue&); +bool operator !=(TextValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/URIValue-generated.h b/tdeabc/vcard/include/generated/URIValue-generated.h new file mode 100644 index 000000000..5a691e6d6 --- /dev/null +++ b/tdeabc/vcard/include/generated/URIValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +URIValue(); +URIValue(const URIValue&); +URIValue(const TQCString&); +URIValue & operator = (URIValue&); +URIValue & operator = (const TQCString&); +bool operator ==(URIValue&); +bool operator !=(URIValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {URIValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~URIValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "URIValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/UTCValue-generated.h b/tdeabc/vcard/include/generated/UTCValue-generated.h new file mode 100644 index 000000000..0c6edfb46 --- /dev/null +++ b/tdeabc/vcard/include/generated/UTCValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +UTCValue(); +UTCValue(const UTCValue&); +UTCValue(const TQCString&); +UTCValue & operator = (UTCValue&); +UTCValue & operator = (const TQCString&); +bool operator ==(UTCValue&); +bool operator !=(UTCValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {UTCValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~UTCValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "UTCValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/VCard-generated.h b/tdeabc/vcard/include/generated/VCard-generated.h new file mode 100644 index 000000000..4f36d11da --- /dev/null +++ b/tdeabc/vcard/include/generated/VCard-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +VCard(); +VCard(const VCard&); +VCard(const TQCString&); +VCard & operator = (VCard&); +VCard & operator = (const TQCString&); +bool operator ==(VCard&); +bool operator !=(VCard& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {VCard a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~VCard(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "VCard"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/VCardEntity-generated.h b/tdeabc/vcard/include/generated/VCardEntity-generated.h new file mode 100644 index 000000000..4e973e62a --- /dev/null +++ b/tdeabc/vcard/include/generated/VCardEntity-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +VCardEntity(); +VCardEntity(const VCardEntity&); +VCardEntity(const TQCString&); +VCardEntity & operator = (VCardEntity&); +VCardEntity & operator = (const TQCString&); +bool operator ==(VCardEntity&); +bool operator !=(VCardEntity& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {VCardEntity a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~VCardEntity(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "VCardEntity"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Value-generated.h b/tdeabc/vcard/include/generated/Value-generated.h new file mode 100644 index 000000000..935d137b6 --- /dev/null +++ b/tdeabc/vcard/include/generated/Value-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +Value(); +Value(const Value&); +Value(const TQCString&); +Value & operator = (Value&); +Value & operator = (const TQCString&); +bool operator ==(Value&); +bool operator !=(Value& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {Value a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~Value(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "Value"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/generate b/tdeabc/vcard/include/generated/generate new file mode 100755 index 000000000..926dbf136 --- /dev/null +++ b/tdeabc/vcard/include/generated/generate @@ -0,0 +1,2 @@ +#!/bin/sh +cat headerBodies | awk -f generateHeaders.awk diff --git a/tdeabc/vcard/include/generated/generateHeaders.awk b/tdeabc/vcard/include/generated/generateHeaders.awk new file mode 100755 index 000000000..471db11b4 --- /dev/null +++ b/tdeabc/vcard/include/generated/generateHeaders.awk @@ -0,0 +1,41 @@ +#!/bin/awk -f + +{ + outfile = $1 "-generated.h" + name = $1 + + OFS="" + + print "// XXX Automatically generated. DO NOT EDIT! XXX //\n" > outfile + print "// WARNING! All changes made in this file will be lost!\n" > outfile + + if ($2 == "v") { pre = "virtual " } else { pre = "" } + + print "public:" >> outfile + print name "();" >> outfile + print name "(const " name "&);" >> outfile + print name "(const QCString&);" >> outfile + print pre name " & operator = (" name "&);" >> outfile + print pre name " & operator = (const QCString&);" >> outfile + print pre "bool operator ==(" name "&);" >> outfile + print pre "bool operator !=(" name "& x) {return !(*this==x);}" \ + >> outfile + print pre "bool operator ==(const QCString& s) {" name " a(s);" \ + "return(*this==a);} " >> outfile + print pre "bool operator != (const QCString& s) {return !(*this == s);}\n" \ + >> outfile + print "virtual ~" name "();" >> outfile + print pre "void parse() " \ + "{if(!parsed_) _parse();parsed_=true;assembled_=false;}\n" \ + >> outfile + print pre "void assemble() " \ + "{if(assembled_) return;parse();_assemble();assembled_=true;}\n" \ + >> outfile + print pre "void _parse();" >> outfile + print pre "void _assemble();" >> outfile + print pre "const char * className() const { return \"" name "\"; }" \ + >> outfile + + print "\n// End of automatically generated code //" >> outfile +} + diff --git a/tdeabc/vcard/include/generated/headerBodies b/tdeabc/vcard/include/generated/headerBodies new file mode 100644 index 000000000..5e77b2b5e --- /dev/null +++ b/tdeabc/vcard/include/generated/headerBodies @@ -0,0 +1,34 @@ +AdrParam Param +AdrValue Value +AgentParam Param +ContentLine Entity +DateParam Param +DateValue Value +EmailParam Param +GeoValue Value +Group Entity +ImageParam Param +ImageValue Value +LangValue Value +NValue Value +Param Entity +PhoneNumberValue Value +SourceParam Param +TelParam Param +TextParam Param +TextNSParam Param +TextValue Value +TextBinParam Param +URIValue Value +VCard Entity +VCardEntity Entity +Value Entity +SoundValue Value +AgentValue Value +TelValue Value +TextBinValue Value +OrgValue Value +UTCValue Value +ClassValue Value +FloatValue Value +TextListValue Value diff --git a/tdeabc/vcard/testread.cpp b/tdeabc/vcard/testread.cpp new file mode 100644 index 000000000..3a33c7d54 --- /dev/null +++ b/tdeabc/vcard/testread.cpp @@ -0,0 +1,129 @@ +#include +#include +#include + +#include +#include + +#include + +using namespace std; + +int main(int argc, char * argv[]) +{ + if (argc != 2) { + cerr << "Usage: " << argv[0] << " " << endl; + exit(1); + } + + TQFile f(argv[1]); + + TQCString str; + + if (!f.open(IO_ReadOnly)) { + cerr << "Couldn't open file \"" << argv[1] << endl; + exit(1); + } + + TQTextStream t(&f); + + while (!t.eof()) + str += t.readLine().utf8() + '\n'; + + using namespace VCARD; + + // Iterate through all vCards in the file. + + cout << "--------- begin ----------" << endl; + cout << str.data(); + cout << "--------- end ----------" << endl; + + VCardEntity e(str); + + VCardListIterator it(e.cardList()); + + for (; it.current(); ++it) { + + cerr << "****************** VCARD ********************" << endl; + + // Create a vcard using the string representation. + VCard & v (*it.current()); + + if (v.has(EntityEmail)) { + cerr << "Email parameter found" << endl; + + TQCString s = v.contentLine(EntityEmail)->value()->asString(); + + cerr << "Email value == " << s << endl; + } + + if (v.has(EntityNickname)) { + cerr << "Nickname parameter found" << endl; + + cerr << "Nickname value == " << + v.contentLine(EntityNickname)->value()->asString() << + endl; + } + + if (v.has(EntityRevision)) { + + cerr << "Revision parameter found" << endl; + + DateValue * d = + (DateValue *) + v.contentLine(EntityRevision)->value(); + + assert(d != 0); + + cerr << "Revision date: " << endl; + cerr << "Day : " << d->day() << endl; + cerr << "Month : " << d->month() << endl; + cerr << "Year : " << d->year() << endl; + + if (d->hasTime()) { + cerr << "Revision date has a time component" << endl; + cerr << "Revision time: " << endl; + cerr << "Hour : " << d->hour() << endl; + cerr << "Minute : " << d->minute() << endl; + cerr << "Second : " << d->second() << endl; + + } + else cerr << "Revision date does NOT have a time component" << endl; + } + + if (v.has(EntityURL)) { + cerr << "URL Parameter found" << endl; + + cerr << "URL Value == " << + v.contentLine(EntityURL)->value()->asString() << + endl; + + URIValue * urlVal = + (URIValue *)v.contentLine(EntityURL)->value(); + + assert(urlVal != 0); + + cerr << "URL scheme == " << + urlVal->scheme() << endl; + + cerr << "URL scheme specific part == " << + urlVal->schemeSpecificPart() << endl; + } + + if (v.has(EntityN)) { + cerr << "N Parameter found" << endl; + + NValue * n = + (NValue *)(v.contentLine(EntityN)->value()); + + cerr << "Family name == " << n->family() << endl; + cerr << "Given name == " << n->given() << endl; + cerr << "Middle name == " << n->middle() << endl; + cerr << "Prefix == " << n->prefix() << endl; + cerr << "Suffix == " << n->suffix() << endl; + } + + cerr << "***************** END VCARD ******************" << endl; + } +} + diff --git a/tdeabc/vcard/testwrite.cpp b/tdeabc/vcard/testwrite.cpp new file mode 100644 index 000000000..42b76c80f --- /dev/null +++ b/tdeabc/vcard/testwrite.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include + +#include + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app; + + kdDebug() << "Test Write VCard" << endl; + + using namespace VCARD; + + VCard v; + + ContentLine cl1; + cl1.setName(EntityTypeToParamName(EntityName)); + cl1.setValue(new TextValue("Hans Wurst")); + v.add(cl1); + + ContentLine cl2; + cl2.setName(EntityTypeToParamName(EntityTelephone)); + cl2.setValue(new TelValue("12345")); + ParamList p; + p.append( new TelParam("home") ); + p.append( new TelParam("fax") ); + cl2.setParamList( p ); + v.add(cl2); + + TQCString str = v.asString(); + + kdDebug() << "--- VCard begin ---" << endl + << str + << "--- VCard end ---" << endl; +} diff --git a/tdeabc/vcard/vCard-all.cpp b/tdeabc/vcard/vCard-all.cpp new file mode 100644 index 000000000..07bbcd2bb --- /dev/null +++ b/tdeabc/vcard/vCard-all.cpp @@ -0,0 +1,37 @@ +#include "AdrParam.cpp" +#include "AdrValue.cpp" +#include "AgentParam.cpp" +#include "AgentValue.cpp" +#include "ClassValue.cpp" +#include "ContentLine.cpp" +#include "DateParam.cpp" +#include "DateValue.cpp" +#include "EmailParam.cpp" +#include "Entity.cpp" +#include "Enum.cpp" +#include "FloatValue.cpp" +#include "GeoValue.cpp" +#include "ImageParam.cpp" +#include "ImageValue.cpp" +#include "ImgValue.cpp" +#include "LangValue.cpp" +#include "NValue.cpp" +#include "OrgValue.cpp" +#include "Param.cpp" +#include "PhoneNumberValue.cpp" +#include "RToken.cpp" +#include "SoundValue.cpp" +#include "SourceParam.cpp" +#include "TelParam.cpp" +#include "TelValue.cpp" +#include "TextBinParam.cpp" +#include "TextBinValue.cpp" +#include "TextListValue.cpp" +#include "TextParam.cpp" +#include "TextValue.cpp" +#include "URIValue.cpp" +#include "UTCValue.cpp" +#include "VCard.cpp" +#include "VCardEntity.cpp" +#include "Value.cpp" + diff --git a/tdeabc/vcard21parser.cpp b/tdeabc/vcard21parser.cpp new file mode 100644 index 000000000..8a3bfcaea --- /dev/null +++ b/tdeabc/vcard21parser.cpp @@ -0,0 +1,608 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Mark Westcott + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "vcard21parser.h" +#include "vcardconverter.h" + +using namespace KABC; + +bool VCardLineX::isValid() const +{ + // Invalid: if it is "begin:vcard" or "end:vcard" + if ( name == VCARD_BEGIN_N || name == VCARD_END_N ) + return false; + + if ( name[0] == 'x' && name[1] == '-' ) // A custom x- line + return true; + + // This is long but it makes it a bit faster (and saves me from using + // a tree which is probably the ideal situation, but a bit memory heavy) + switch( name[0] ) { + case 'a': + if ( name == VCARD_ADR && qualified && + (qualifiers.contains(VCARD_ADR_DOM) || + qualifiers.contains(VCARD_ADR_INTL) || + qualifiers.contains(VCARD_ADR_POSTAL) || + qualifiers.contains(VCARD_ADR_HOME) || + qualifiers.contains(VCARD_ADR_WORK) || + qualifiers.contains(VCARD_ADR_PREF) + ) ) + return true; + + if ( name == VCARD_AGENT ) + return true; + break; + + case 'b': + if ( name == VCARD_BDAY ) + return true; + break; + + case 'c': + if ( name == VCARD_CATEGORIES ) + return true; + if ( name == VCARD_CLASS && qualified && + (qualifiers.contains(VCARD_CLASS_PUBLIC) || + qualifiers.contains(VCARD_CLASS_PRIVATE) || + qualifiers.contains(VCARD_CLASS_CONFIDENTIAL) + ) ) + return true; + break; + + case 'e': + if ( name == VCARD_EMAIL && qualified && + (qualifiers.contains(VCARD_EMAIL_INTERNET) || + qualifiers.contains(VCARD_EMAIL_PREF) || + qualifiers.contains(VCARD_EMAIL_X400) + ) ) + return true; + break; + + case 'f': + if ( name == VCARD_FN ) + return true; + break; + + case 'g': + if ( name == VCARD_GEO ) + return true; + break; + + case 'k': + if ( name == VCARD_KEY && qualified && + (qualifiers.contains(VCARD_KEY_X509) || + qualifiers.contains(VCARD_KEY_PGP) + ) ) + return true; + break; + + case 'l': + if ( name == VCARD_LABEL ) + return true; + if ( name == VCARD_LOGO ) + return true; + break; + + case 'm': + if ( name == VCARD_MAILER ) + return true; + break; + + case 'n': + if ( name == VCARD_N ) + return true; + if ( name == VCARD_NAME ) + return true; + if ( name == VCARD_NICKNAME ) + return true; + if ( name == VCARD_NOTE ) + return true; + break; + + case 'o': + if ( name == VCARD_ORG ) + return true; + break; + + case 'p': + if ( name == VCARD_PHOTO ) + return true; + if ( name == VCARD_PROFILE ) + return true; + if ( name == VCARD_PRODID ) + return true; + break; + + case 'r': + if ( name == VCARD_ROLE ) + return true; + if ( name == VCARD_REV ) + return true; + break; + + case 's': + if ( name == VCARD_SOURCE ) + return true; + if ( name == VCARD_SOUND ) + return true; + break; + + case 't': + if ( name == VCARD_TEL && qualified && + (qualifiers.contains(VCARD_TEL_HOME) || + qualifiers.contains(VCARD_TEL_WORK) || + qualifiers.contains(VCARD_TEL_PREF) || + qualifiers.contains(VCARD_TEL_VOICE) || + qualifiers.contains(VCARD_TEL_FAX) || + qualifiers.contains(VCARD_TEL_MSG) || + qualifiers.contains(VCARD_TEL_CELL) || + qualifiers.contains(VCARD_TEL_PAGER) || + qualifiers.contains(VCARD_TEL_BBS) || + qualifiers.contains(VCARD_TEL_MODEM) || + qualifiers.contains(VCARD_TEL_CAR) || + qualifiers.contains(VCARD_TEL_ISDN) || + qualifiers.contains(VCARD_TEL_VIDEO) || + qualifiers.contains(VCARD_TEL_PCS) + ) ) + return true; + if ( name == VCARD_TZ ) + return true; + if ( name == VCARD_TITLE ) + return true; + break; + + case 'u': + if ( name == VCARD_URL ) + return true; + if ( name == VCARD_UID ) + return true; + break; + + case 'v': + if ( name == VCARD_VERSION ) + return true; + break; + default: + break; + } + + return false; +} + + +VCard21Parser::VCard21Parser() +{ +} + +VCard21Parser::~VCard21Parser() +{ +} + +void VCard21Parser::readFromString(KABC::AddressBook *addressbook, const TQString &data) +{ + KABC::Addressee mAddressee = readFromString(data); + addressbook->insertAddressee(mAddressee); +} + +KABC::Addressee VCard21Parser::readFromString( const TQString &data) +{ + KABC::Addressee addressee; + VCard21ParserImpl *vCard = VCard21ParserImpl::parseVCard(data); + TQString tmpStr; + + // Check if parsing failed + if (vCard == 0) + { + kdDebug() << "Parsing failed" << endl; + return addressee; + } + //set the addressees name and formated name + TQStringList tmpList = vCard->getValues(VCARD_N); + TQString formattedName = ""; + if (tmpList.count() > 0) + addressee.setFamilyName(tmpList[0]); + if (tmpList.count() > 1) + addressee.setGivenName(tmpList[1]); + if (tmpList.count() > 2) + addressee.setAdditionalName(tmpList[2]); + if (tmpList.count() > 3) + addressee.setPrefix(tmpList[3]); + if (tmpList.count() > 4) + addressee.setSuffix(tmpList[4]); + + tmpStr = (vCard->getValue(VCARD_FN)); + if (!tmpStr.isEmpty()) + addressee.setFormattedName(tmpStr); + + //set the addressee's nick name + tmpStr = vCard->getValue(VCARD_NICKNAME); + addressee.setNickName(tmpStr); + //set the addressee's organization + tmpStr = vCard->getValue(VCARD_ORG); + addressee.setOrganization(tmpStr); + //set the addressee's title + tmpStr = vCard->getValue(VCARD_TITLE); + addressee.setTitle(tmpStr); + //set the addressee's email - we can only deal with two. The preferenced one and one other. + tmpStr = vCard->getValue(VCARD_EMAIL, VCARD_EMAIL_INTERNET); + addressee.insertEmail(tmpStr, false); + tmpStr = vCard->getValue(VCARD_EMAIL,VCARD_EMAIL_PREF); + addressee.insertEmail(tmpStr, true); + //set the addressee's url + tmpStr = vCard->getValue(VCARD_URL); + if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_WORK); + if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_HOME); + if (!tmpStr.isEmpty()) { + addressee.setUrl(KURL(tmpStr)); + } + + //set the addressee's birthday + tmpStr = vCard->getValue(VCARD_BDAY); + addressee.setBirthday(VCardStringToDate(tmpStr)); + + //set the addressee's phone numbers + for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { + if ( (*i).name == VCARD_TEL ) { + int type = 0; + if ( (*i).qualified ) { + if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) + type |= PhoneNumber::Home; + if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) + type |= PhoneNumber::Work; + if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) + type |= PhoneNumber::Pref; + // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) + // type |= PhoneNumber::Voice; + if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) + type |= PhoneNumber::Fax; + if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) + type |= PhoneNumber::Msg; + if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) + type |= PhoneNumber::Cell; + if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) + type |= PhoneNumber::Pager; + if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) + type |= PhoneNumber::Bbs; + if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) + type |= PhoneNumber::Modem; + if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) + type |= PhoneNumber::Car; + if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) + type |= PhoneNumber::Isdn; + if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) + type |= PhoneNumber::Video; + if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) + type |= PhoneNumber::Pcs; + } + addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); + } + } + + //set the addressee's addresses + for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { + if ( (*i).name == VCARD_ADR ) { + int type = 0; + if ( (*i).qualified ) { + if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) + type |= Address::Dom; + if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) + type |= Address::Intl; + if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) + type |= Address::Postal; + if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) + type |= Address::Parcel; + if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) + type |= Address::Home; + if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) + type |= Address::Work; + if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) + type |= Address::Pref; + } + addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); + } + } + + //set the addressee's delivery label + tmpStr = vCard->getValue(VCARD_LABEL); + if (!tmpStr.isEmpty()) { + tmpStr.replace("\r\n","\n"); + Address tmpAddress; + tmpAddress.setLabel(tmpStr); + addressee.insertAddress(tmpAddress); + } + + //set the addressee's notes + tmpStr = vCard->getValue(VCARD_NOTE); + tmpStr.replace("\r\n","\n"); + addressee.setNote(tmpStr); + + //set the addressee's timezone + tmpStr = vCard->getValue(VCARD_TZ); + TimeZone tmpZone(tmpStr.toInt()); + addressee.setTimeZone(tmpZone); + + //set the addressee's geographical position + tmpList = vCard->getValues(VCARD_GEO); + if (tmpList.count()==2) + { + tmpStr = tmpList[0]; + float glat = tmpStr.toFloat(); + tmpStr = tmpList[1]; + float glong = tmpStr.toFloat(); + Geo tmpGeo(glat,glong); + addressee.setGeo(tmpGeo); + } + + //set the last revision date + tmpStr = vCard->getValue(VCARD_REV); + addressee.setRevision(VCardStringToDate(tmpStr)); + + //set the role of the addressee + tmpStr = vCard->getValue(VCARD_ROLE); + addressee.setRole(tmpStr); + + delete vCard; + + return addressee; +} + + + +KABC::Address VCard21Parser::readAddressFromQStringList ( const TQStringList &data, const int type ) +{ + KABC::Address mAddress; + mAddress.setType( type ); + + if ( data.count() > 0 ) + mAddress.setPostOfficeBox( data[0] ); + if ( data.count() > 1 ) + mAddress.setExtended( data[1] ); + if ( data.count() > 2 ) + mAddress.setStreet( data[2] ); + if ( data.count() > 3 ) + mAddress.setLocality( data[3] ); + if ( data.count() > 4 ) + mAddress.setRegion( data[4] ); + if ( data.count() > 5 ) + mAddress.setPostalCode( data[5] ); + if ( data.count() > 6 ) + mAddress.setCountry( data[6] ); + + return mAddress; +} + + +VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err ) +{ + int _err = 0; + int _state = VC_STATE_BEGIN; + + TQValueList *vcdata; + TQValueList lines; + + vcdata = new TQValueList; + + lines = TQStringList::split( TQRegExp( "[\x0d\x0a]" ), vc ); + + // for each line in the vCard + for ( TQStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) { + VCardLineX _vcl; + + // take spaces off the end - ugly but necessary hack + for ( int g = (*j).length()-1; g > 0 && (*j)[g].isSpace(); --g ) + (*j)[g] = 0; + + // first token: + // verify state, update if necessary + if ( _state & VC_STATE_BEGIN) { + if ( !tqstricmp( (*j).latin1(), VCARD_BEGIN ) ) { + _state = VC_STATE_BODY; + continue; + } else { + _err = VC_ERR_NO_BEGIN; + break; + } + } else if ( _state & VC_STATE_BODY ) { + if ( !tqstricmp( (*j).latin1(), VCARD_END ) ) { + _state |= VC_STATE_END; + break; + } + + // split into two tokens + int colon = (*j).find( ':' ); + if ( colon < 0 ) { + _err = VC_ERR_INVALID_LINE; + break; + } + + TQString key = (*j).left( colon ); + TQString value = (*j).mid( colon + 1 ); + + // check for qualifiers and + // set name, qualified, qualifier(s) + TQStringList keyTokens = TQStringList::split( ';', key ); + bool qp = false, first_pass = true; + bool b64 = false; + + if ( keyTokens.count() > 0 ) { + _vcl.qualified = false; + _vcl.name = keyTokens[ 0 ].lower(); + + for ( TQStringList::Iterator z = keyTokens.begin(); z != keyTokens.end(); ++z ) { + TQString zz = (*z).lower(); + if ( zz == VCARD_QUOTED_PRINTABLE || zz == VCARD_ENCODING_QUOTED_PRINTABLE ) { + qp = true; + } else if ( zz == VCARD_BASE64 ) { + b64 = true; + } else if ( !first_pass ) { + _vcl.qualified = true; + _vcl.qualifiers.append( zz ); + } + first_pass = false; + } + } else { + _err = VC_ERR_INVALID_LINE; + } + + if ( _err != 0 ) + break; + + if ( _vcl.name == VCARD_VERSION ) + _state |= VC_STATE_HAVE_VERSION; + + if ( _vcl.name == VCARD_N || _vcl.name == VCARD_FN ) + _state |= VC_STATE_HAVE_N; + + // second token: + // split into tokens by ; + // add to parameters vector + if ( b64 ) { + if ( value[ value.length() - 1 ] != '=' ) + do { + value += *( ++j ); + } while ( (*j)[ (*j).length() - 1 ] != '=' ); + } else { + if ( qp ) { // join any split lines + while ( value[ value.length() - 1 ] == '=' ) { + value.remove( value.length() - 1, 1 ); + value.append(*( ++j )); + } + } + _vcl.parameters = TQStringList::split( ';', value, true ); + if ( qp ) { // decode the quoted printable + for ( TQStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) + *z = KCodecs::quotedPrintableDecode( TQCString((*z).latin1()) ); + } + } + } else { + _err = VC_ERR_INTERNAL; + break; + } + + // validate VCardLineX + if ( !_vcl.isValid() ) { + _err = VC_ERR_INVALID_LINE; + break; + } + + // add to vector + vcdata->append( _vcl ); + } + + // errors to check at the last minute (exit state related) + if ( _err == 0 ) { + if ( !( _state & VC_STATE_END ) ) // we have to have an end!! + _err = VC_ERR_NO_END; + + if ( !( _state & VC_STATE_HAVE_N ) || // we have to have the mandatories! + !( _state & VC_STATE_HAVE_VERSION ) ) + _err = VC_ERR_MISSING_MANDATORY; + } + + // set the error message if we can, and only return an object + // if the vCard was valid. + if ( err ) + *err = _err; + + if ( _err != 0 ) { + delete vcdata; + return 0; + } + + return new VCard21ParserImpl( vcdata ); +} + +VCard21ParserImpl::VCard21ParserImpl() + : _vcdata( 0 ) +{ +} + +VCard21ParserImpl::VCard21ParserImpl(TQValueList *_vcd) + : _vcdata(_vcd) +{ +} + +VCard21ParserImpl::~VCard21ParserImpl() +{ + delete _vcdata; + _vcdata = 0; +} + +TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& qualifier) +{ + TQString failed; + const TQString lowname = name.lower(); + const TQString lowqualifier = qualifier.lower(); + + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { + if ((*i).parameters.count() > 0) + return (*i).parameters[0]; + else return failed; + } + } + return failed; +} + + +TQString VCard21ParserImpl::getValue(const TQString& name) +{ + TQString failed; + const TQString lowname = name.lower(); + + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && !(*i).qualified) { + if ((*i).parameters.count() > 0) + return (*i).parameters[0]; + else return failed; + } + } + return failed; +} + + +TQStringList VCard21ParserImpl::getValues(const TQString& name) +{ + const TQString lowname = name.lower(); + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && !(*i).qualified) + return (*i).parameters; + } + // failed. + return TQStringList(); +} + +TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& qualifier) +{ + const TQString lowname = name.lower(); + const TQString lowqualifier = qualifier.lower(); + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) + return (*i).parameters; + } + // failed. + return TQStringList(); +} + + diff --git a/tdeabc/vcard21parser.h b/tdeabc/vcard21parser.h new file mode 100644 index 000000000..0eb66fa93 --- /dev/null +++ b/tdeabc/vcard21parser.h @@ -0,0 +1,221 @@ +/* + This file is part of libkabc. + + Copyright (c) 2002 Mark Westcott + Copyright (c) 2000 George Staikos + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARD21FORMAT_H +#define KABC_VCARD21FORMAT_H + +#include +#include +#include +#include +#include +#include + +#include "addressee.h" +#include "addressbook.h" +#include "phonenumber.h" + + +#define VCARD_BEGIN "begin:vcard" +#define VCARD_END "end:vcard" +#define VCARD_BEGIN_N "begin" +#define VCARD_END_N "end" +#define VCARD_VERSION "version" + +#define VCARD_FN "fn" +#define VCARD_N "n" + +// optional +#define VCARD_NAME "name" +#define VCARD_NICKNAME "nickname" +#define VCARD_PHOTO "photo" +#define VCARD_BDAY "bday" +#define VCARD_ADR "adr" + +// types +#define VCARD_ADR_DOM "dom" +#define VCARD_ADR_INTL "intl" +#define VCARD_ADR_POSTAL "postal" +#define VCARD_ADR_PARCEL "parcel" +#define VCARD_ADR_HOME "home" +#define VCARD_ADR_WORK "work" +#define VCARD_ADR_PREF "pref" +// values +#define VCARD_ADR_POBOX "PO Box" +#define VCARD_ADR_EXTADR "Extended Address" +#define VCARD_ADR_STREET "Street" +#define VCARD_ADR_LOCALITY "Locality" +#define VCARD_ADR_REGION "Region" +#define VCARD_ADR_POSTCODE "Postal Code" +#define VCARD_ADR_COUNTRY "Country Name" +#define VCARD_LABEL "label" +#define VCARD_PROFILE "profile" +#define VCARD_SOURCE "source" +#define VCARD_TEL "tel" +// types +#define VCARD_TEL_HOME "home" +#define VCARD_TEL_WORK "work" +#define VCARD_TEL_PREF "pref" +#define VCARD_TEL_VOICE "voice" +#define VCARD_TEL_FAX "fax" +#define VCARD_TEL_MSG "msg" +#define VCARD_TEL_CELL "cell" +#define VCARD_TEL_PAGER "pager" +#define VCARD_TEL_BBS "bbs" +#define VCARD_TEL_MODEM "modem" +#define VCARD_TEL_CAR "car" +#define VCARD_TEL_ISDN "isdn" +#define VCARD_TEL_VIDEO "video" +#define VCARD_TEL_PCS "pcs" +#define VCARD_EMAIL "email" +// types +#define VCARD_EMAIL_PREF "pref" +#define VCARD_EMAIL_INTERNET "internet" +#define VCARD_EMAIL_X400 "x400" +#define VCARD_TZ "tz" +#define VCARD_GEO "geo" +#define VCARD_MAILER "mailer" +#define VCARD_TITLE "title" +#define VCARD_ROLE "role" +#define VCARD_LOGO "logo" +#define VCARD_AGENT "agent" +#define VCARD_ORG "org" +#define VCARD_CATEGORIES "categories" +#define VCARD_NOTE "note" +#define VCARD_PRODID "prodid" +#define VCARD_REV "rev" +#define VCARD_SOUND "sound" +#define VCARD_UID "uid" +#define VCARD_URL "url" +#define VCARD_CLASS "class" +#define VCARD_CLASS_PUBLIC "public" +#define VCARD_CLASS_PRIVATE "private" +#define VCARD_CLASS_CONFIDENTIAL "confidential" +#define VCARD_KEY "key" +// types +#define VCARD_KEY_X509 "x509" +#define VCARD_KEY_PGP "pgp" + +#define VCARD_QUOTED_PRINTABLE "quoted-printable" +// this one is a temporary hack until we support TYPE=VALUE +#define VCARD_ENCODING_QUOTED_PRINTABLE "encoding=quoted-printable" +#define VCARD_BASE64 "base64" + +#define VC_STATE_BEGIN 1 +#define VC_STATE_BODY 2 +#define VC_STATE_END 4 +#define VC_STATE_HAVE_N 8 +#define VC_STATE_HAVE_VERSION 16 + +#define VC_ERR_NO_BEGIN 1 +#define VC_ERR_NO_END 2 +#define VC_ERR_INVALID_LINE 3 +#define VC_ERR_INTERNAL 4 +#define VC_ERR_INVALID_NAME 5 +#define VC_ERR_MISSING_MANDATORY 6 + +namespace KABC { + +class AddressBook; + +/** + @deprecated use VCardConverter instead. + */ +class KABC_EXPORT_DEPRECATED VCard21Parser +{ +public: + + /** + * Constructor. + */ + VCard21Parser(); + + /** + * Destructor. + */ + virtual ~VCard21Parser(); + + /** + * Parses a string in vcard2.1 format and saves the single addressees + * to the address book. + * + * @param ab The address book. + * @param str The vcard string. + */ + void readFromString( KABC::AddressBook *ab, const TQString &str ); + + /** + * FIXME: we need a writeToString method + * TQString writeToString (KABC::AddressBook *); + */ + + /** + * Parses a string in vcard2.1 format and returns the inherent addressee. + */ + KABC::Addressee readFromString( const TQString &data); + + /** + * Helper method to store a address. + * + * @param data A string list, that is filled with 'street', 'house number' ... + * @param type The type of the returned address. + */ + static KABC::Address readAddressFromQStringList (const TQStringList &data, const int type); +}; + +} + +/** + * @short Helper class + */ +class KABC_EXPORT VCardLineX +{ +public: + TQString name; + bool qualified; + TQValueList qualifiers; + TQValueList parameters; + bool isValid() const; +}; + +/** + * @short Helper class + */ +class KABC_EXPORT VCard21ParserImpl +{ + friend class VCardLineX; + +public: + VCard21ParserImpl(); + virtual ~VCard21ParserImpl(); + static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = NULL); + TQString getValue(const TQString& name, const TQString& qualifier); + TQString getValue(const TQString& name); + TQStringList getValues(const TQString& name, const TQString& qualifier); + TQStringList getValues(const TQString& name); + + TQValueList *_vcdata; + +private: + VCard21ParserImpl (TQValueList *_vcd); +}; + +#endif diff --git a/tdeabc/vcardconverter.cpp b/tdeabc/vcardconverter.cpp new file mode 100644 index 000000000..d575b019c --- /dev/null +++ b/tdeabc/vcardconverter.cpp @@ -0,0 +1,129 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcard21parser.h" +#include "vcardformatimpl.h" +#include "vcardtool.h" + +#include "vcardconverter.h" + +using namespace KABC; + +struct VCardConverter::VCardConverterData +{ + VCard21Parser vcard21parser; + VCardFormatImpl vcard30parser; +}; + +VCardConverter::VCardConverter() + : d( new VCardConverterData ) +{ +} + +VCardConverter::~VCardConverter() +{ + delete d; + d = 0; +} + +TQString VCardConverter::createVCard( const Addressee &addr, Version version ) +{ + Addressee::List list; + list.append( addr ); + + return createVCards( list, version ); +} + +TQString VCardConverter::createVCards( Addressee::List list, Version version ) +{ + VCardTool tool; + + return tool.createVCards( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) ); +} + +Addressee VCardConverter::parseVCard( const TQString& vcard ) +{ + Addressee::List list = parseVCards( vcard ); + + return list[ 0 ]; +} + +Addressee::List VCardConverter::parseVCards( const TQString& vcard ) +{ + VCardTool tool; + + return tool.parseVCards( vcard ); +} + +// ---------------------------- deprecated stuff ---------------------------- // + +bool VCardConverter::vCardToAddressee( const TQString &str, Addressee &addr, Version version ) +{ + if ( version == v2_1 ) { + addr = d->vcard21parser.readFromString( str ); + return true; + } + + if ( version == v3_0 ) + return d->vcard30parser.readFromString( str, addr ); + + return false; +} + +bool VCardConverter::addresseeToVCard( const Addressee &addr, TQString &str, Version version ) +{ + if ( version == v2_1 ) + return false; + + if ( version == v3_0 ) + return d->vcard30parser.writeToString( addr, str ); + + return false; +} + + +/* Helper functions */ + +TQString KABC::dateToVCardString( const TQDateTime &dateTime ) +{ + return dateTime.toString("yyyyMMddThhmmssZ"); +} + +TQString KABC::dateToVCardString( const TQDate &date ) +{ + return date.toString("yyyyMMdd"); +} + +TQDateTime KABC::VCardStringToDate( const TQString &dateString ) +{ + TQDate date; + TQTime time; + TQString d( dateString ); + + d = d.remove('-').remove(':'); + + if (d.length()>=8) + date = TQDate( d.mid(0,4).toUInt(), d.mid(4,2).toUInt(), d.mid(6,2).toUInt() ); + if (d.length()>9 && d[8].upper()=='T') + time = TQTime( d.mid(9,2).toUInt(), d.mid(11,2).toUInt(), d.mid(13,2).toUInt() ); + + return TQDateTime( date, time ); +} + diff --git a/tdeabc/vcardconverter.h b/tdeabc/vcardconverter.h new file mode 100644 index 000000000..ab09279f2 --- /dev/null +++ b/tdeabc/vcardconverter.h @@ -0,0 +1,163 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDCONVERTER_H +#define KABC_VCARDCONVERTER_H + +#include + +#include "addressee.h" + +namespace KABC { + +/** + @short Class to converting contact objects into vCard format and vice versa. + + This class implements reading and writing of contact using from/to the + vCard format. Currently vCard version 2.1 and 3.0 is supported. + + Example: + + \code + + TQFile file( "myfile.vcf" ); + file.open( IO_ReadOnly ); + + TQString data = file.readAll(); + + VCardConverter converter; + Addressee::List list = converter.parseVCards( data ); + + // print formatted name of first contact + tqDebug( "name=%s", list[ 0 ].formattedName().latin1() ); + + \endcode +*/ +class KABC_EXPORT VCardConverter +{ + public: + + /** + @li v2_1 - VCard format version 2.1 + @li v3_0 - VCard format version 3.0 + */ + enum Version + { + v2_1, + v3_0 + }; + + /** + Constructor. + */ + VCardConverter(); + + /** + Destructor. + */ + ~VCardConverter(); + + /** + Creates a string in vCard format which contains the given + contact. + + @param addr The contact object + @param version The version of the generated vCard format + */ + TQString createVCard( const Addressee &addr, Version version = v3_0 ); + + /** + Creates a string in vCard format which contains the given + list of contact. + + @param list The list of contact objects + @param version The version of the generated vCard format + */ + // FIXME: Add error handling + TQString createVCards( Addressee::List list, Version version = v3_0 ); + + // FIXME: Add "createVCards( AddressBook * )" + + /** + Parses a string in vCard format and returns the first contact. + */ + Addressee parseVCard( const TQString& vcard ); + + /** + Parses a string in vCard format and returns a list of contact objects. + */ + // FIXME: Add error handling + Addressee::List parseVCards( const TQString& vcard ); + + // FIXME: Add "bool parseVCards( AddressBook *, const TQString &vcard )" + + /** + @deprecated + */ + bool vCardToAddressee( const TQString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED; + + /** + @deprecated + */ + bool addresseeToVCard( const Addressee&, TQString&, Version version = v3_0 ) KDE_DEPRECATED; + + private: + /** + Split a string and replaces escaped separators on the fly with + unescaped ones. + */ + TQStringList splitString( const TQChar &sep, const TQString &value ); + + struct VCardConverterData; + VCardConverterData *d; +}; + + +/** + Helper functions + */ + +/** + * Converts a TQDateTime to a date string as it is used in VCard and LDIF files. + * The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z") + * @param dateTime date and time to be converted + * @since 3.2 + */ +KABC_EXPORT TQString dateToVCardString( const TQDateTime &dateTime ); + +/** + * Converts a TQDate to a short date string as it is used in VCard and LDIF files. + * The return value is in the form "yyyyMMdd" (e.g. "20031201") + * @param date date to be converted + * @since 3.2 + */ +KABC_EXPORT TQString dateToVCardString( const TQDate &date ); + +/** + * Converts a date string as it is used in VCard and LDIF files to a TQDateTime value. + * If the date string does not contain a time value, it will be returned as 00:00:00. + * (e.g. "20031201T120000" will return a TQDateTime for 2003-12-01 at 12:00) + * @param dateString string representing the date and time. + * @since 3.2 + */ +KABC_EXPORT TQDateTime VCardStringToDate( const TQString &dateString ); + +} +#endif diff --git a/tdeabc/vcardformat.cpp b/tdeabc/vcardformat.cpp new file mode 100644 index 000000000..147aa4259 --- /dev/null +++ b/tdeabc/vcardformat.cpp @@ -0,0 +1,59 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardformatimpl.h" + +#include "vcardformat.h" + +using namespace KABC; + +VCardFormat::VCardFormat() +{ + mImpl = new VCardFormatImpl; +} + +VCardFormat::~VCardFormat() +{ + delete mImpl; +} + +bool VCardFormat::load( AddressBook *addressBook, const TQString &fileName ) +{ + TQFile f( fileName ); + if ( !f.open( IO_ReadOnly ) ) return false; + + bool result = mImpl->loadAll( addressBook, 0, &f ); + + f.close(); + + return result; +} + +bool VCardFormat::save( AddressBook *addressBook, const TQString &fileName ) +{ + TQFile f( fileName ); + if ( !f.open( IO_WriteOnly ) ) return false; + + mImpl->saveAll( addressBook, 0, &f ); + + f.close(); + + return true; +} diff --git a/tdeabc/vcardformat.h b/tdeabc/vcardformat.h new file mode 100644 index 000000000..8194056cb --- /dev/null +++ b/tdeabc/vcardformat.h @@ -0,0 +1,49 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_VCARDFORMAT_H +#define KABC_VCARDFORMAT_H + +#include + +#include "format.h" + +namespace KABC { + +class AddressBook; +class VCardFormatImpl; + +/** + @deprecated use VCardFormatPlugin instead. + */ +class KABC_EXPORT_DEPRECATED VCardFormat : public Format { + public: + VCardFormat(); + virtual ~VCardFormat(); + + bool load( AddressBook *, const TQString &fileName ); + bool save( AddressBook *, const TQString &fileName ); + + private: + VCardFormatImpl *mImpl; +}; + +} + +#endif diff --git a/tdeabc/vcardformatimpl.cpp b/tdeabc/vcardformatimpl.cpp new file mode 100644 index 000000000..c0d39bb95 --- /dev/null +++ b/tdeabc/vcardformatimpl.cpp @@ -0,0 +1,1001 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include +#include + +#include +#include +#include +#include + +#include + +#include "addressbook.h" +#include "vcardformatimpl.h" + +using namespace KABC; +using namespace VCARD; + +bool VCardFormatImpl::load( Addressee &addressee, TQFile *file ) +{ + kdDebug(5700) << "VCardFormat::load()" << endl; + + TQByteArray fdata = file->readAll(); + TQCString data(fdata.data(), fdata.size()+1); + + VCardEntity e( data ); + + VCardListIterator it( e.cardList() ); + + if ( it.current() ) { + VCARD::VCard v(*it.current()); + loadAddressee( addressee, v ); + return true; + } + + return false; +} + +bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, TQFile *file ) +{ + kdDebug(5700) << "VCardFormat::loadAll()" << endl; + + TQByteArray fdata = file->readAll(); + TQCString data(fdata.data(), fdata.size()+1); + + VCardEntity e( data ); + + VCardListIterator it( e.cardList() ); + + for (; it.current(); ++it) { + VCARD::VCard v(*it.current()); + Addressee addressee; + loadAddressee( addressee, v ); + addressee.setResource( resource ); + addressBook->insertAddressee( addressee ); + } + + return true; +} + +void VCardFormatImpl::save( const Addressee &addressee, TQFile *file ) +{ + VCardEntity vcards; + VCardList vcardlist; + vcardlist.setAutoDelete( true ); + + VCARD::VCard *v = new VCARD::VCard; + + saveAddressee( addressee, v, false ); + + vcardlist.append( v ); + vcards.setCardList( vcardlist ); + + TQCString vcardData = vcards.asString(); + file->writeBlock( (const char*)vcardData, vcardData.length() ); +} + +void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, TQFile *file ) +{ + VCardEntity vcards; + VCardList vcardlist; + vcardlist.setAutoDelete( true ); + + AddressBook::Iterator it; + for ( it = ab->begin(); it != ab->end(); ++it ) { + if ( (*it).resource() == resource ) { + VCARD::VCard *v = new VCARD::VCard; + saveAddressee( (*it), v, false ); + (*it).setChanged( false ); + vcardlist.append( v ); + } + } + + vcards.setCardList( vcardlist ); + + TQCString vcardData = vcards.asString(); + file->writeBlock( (const char*)vcardData, vcardData.length() ); +} + +bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v ) +{ + TQPtrList contentLines = v.contentLineList(); + ContentLine *cl; + + for( cl = contentLines.first(); cl; cl = contentLines.next() ) { + TQCString n = cl->name(); + if ( n.left( 2 ) == "X-" ) { + n = n.mid( 2 ); + int posDash = n.find( "-" ); + addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ), + TQString::fromUtf8( n.mid( posDash + 1 ) ), + TQString::fromUtf8( cl->value()->asString() ) ); + continue; + } + + EntityType type = cl->entityType(); + switch( type ) { + + case EntityUID: + addressee.setUid( readTextValue( cl ) ); + break; + + case EntityURI: + addressee.setUri( readTextValue( cl ) ); + break; + + case EntityEmail: + addressee.insertEmail( readTextValue( cl ) ); + break; + + case EntityName: + addressee.setName( readTextValue( cl ) ); + break; + + case EntityFullName: + addressee.setFormattedName( readTextValue( cl ) ); + break; + + case EntityURL: + addressee.setUrl( KURL( readTextValue( cl ) ) ); + break; + + case EntityNickname: + addressee.setNickName( readTextValue( cl ) ); + break; + + case EntityLabel: + // not yet supported by kabc + break; + + case EntityMailer: + addressee.setMailer( readTextValue( cl ) ); + break; + + case EntityTitle: + addressee.setTitle( readTextValue( cl ) ); + break; + + case EntityRole: + addressee.setRole( readTextValue( cl ) ); + break; + + case EntityOrganisation: + addressee.setOrganization( readTextValue( cl ) ); + break; + + case EntityNote: + addressee.setNote( readTextValue( cl ) ); + break; + + case EntityProductID: + addressee.setProductId( readTextValue( cl ) ); + break; + + case EntitySortString: + addressee.setSortString( readTextValue( cl ) ); + break; + + case EntityN: + readNValue( cl, addressee ); + break; + + case EntityAddress: + addressee.insertAddress( readAddressValue( cl ) ); + break; + + case EntityTelephone: + addressee.insertPhoneNumber( readTelephoneValue( cl ) ); + break; + + case EntityCategories: + addressee.setCategories( TQStringList::split( ",", readTextValue( cl ) ) ); + break; + + case EntityBirthday: + addressee.setBirthday( readDateValue( cl ) ); + break; + + case EntityRevision: + addressee.setRevision( readDateTimeValue( cl ) ); + break; + + case EntityGeo: + addressee.setGeo( readGeoValue( cl ) ); + break; + + case EntityTimeZone: + addressee.setTimeZone( readUTCValue( cl ) ); + break; + + case EntityVersion: + break; + + case EntityClass: + addressee.setSecrecy( readClassValue( cl ) ); + break; + + case EntityKey: + addressee.insertKey( readKeyValue( cl ) ); + break; + + case EntityPhoto: + addressee.setPhoto( readPictureValue( cl, EntityPhoto, addressee ) ); + break; + + case EntityLogo: + addressee.setLogo( readPictureValue( cl, EntityLogo, addressee ) ); + break; + + case EntityAgent: + addressee.setAgent( readAgentValue( cl ) ); + break; + + case EntitySound: + addressee.setSound( readSoundValue( cl, addressee ) ); + break; + + default: + kdDebug(5700) << "VCardFormat::load(): Unsupported entity: " + << int( type ) << ": " << cl->asString() << endl; + break; + } + } + + for( cl = contentLines.first(); cl; cl = contentLines.next() ) { + EntityType type = cl->entityType(); + if ( type == EntityLabel ) { + int type = readAddressParam( cl ); + Address address = addressee.address( type ); + if ( address.isEmpty() ) + address.setType( type ); + + address.setLabel( TQString::fromUtf8( cl->value()->asString() ) ); + addressee.insertAddress( address ); + } + } + + return true; +} + +void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v, bool intern ) +{ + ContentLine cl; + TQString value; + + addTextValue( v, EntityName, addressee.name() ); + addTextValue( v, EntityUID, addressee.uid() ); + addTextValue( v, EntityURI, addressee.uri() ); + addTextValue( v, EntityFullName, addressee.formattedName() ); + + TQStringList emails = addressee.emails(); + TQStringList::ConstIterator it4; + for( it4 = emails.begin(); it4 != emails.end(); ++it4 ) { + addTextValue( v, EntityEmail, *it4 ); + } + + TQStringList customs = addressee.customs(); + TQStringList::ConstIterator it5; + for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { + addCustomValue( v, *it5 ); + } + + addTextValue( v, EntityURL, addressee.url().url() ); + + addNValue( v, addressee ); + + addTextValue( v, EntityNickname, addressee.nickName() ); + addTextValue( v, EntityMailer, addressee.mailer() ); + addTextValue( v, EntityTitle, addressee.title() ); + addTextValue( v, EntityRole, addressee.role() ); + addTextValue( v, EntityOrganisation, addressee.organization() ); + addTextValue( v, EntityNote, addressee.note() ); + addTextValue( v, EntityProductID, addressee.productId() ); + addTextValue( v, EntitySortString, addressee.sortString() ); + + Address::List addresses = addressee.addresses(); + Address::List::ConstIterator it3; + for( it3 = addresses.begin(); it3 != addresses.end(); ++it3 ) { + addAddressValue( v, *it3 ); + addLabelValue( v, *it3 ); + } + + PhoneNumber::List phoneNumbers = addressee.phoneNumbers(); + PhoneNumber::List::ConstIterator it2; + for( it2 = phoneNumbers.begin(); it2 != phoneNumbers.end(); ++it2 ) { + addTelephoneValue( v, *it2 ); + } + + Key::List keys = addressee.keys(); + Key::List::ConstIterator it6; + for( it6 = keys.begin(); it6 != keys.end(); ++it6 ) { + addKeyValue( v, *it6 ); + } + + addTextValue( v, EntityCategories, addressee.categories().join(",") ); + + addDateValue( v, EntityBirthday, TQT_TQDATE_OBJECT(addressee.birthday().date()) ); + addDateTimeValue( v, EntityRevision, TQT_TQDATETIME_OBJECT(addressee.revision()) ); + addGeoValue( v, addressee.geo() ); + addUTCValue( v, addressee.timeZone() ); + + addClassValue( v, addressee.secrecy() ); + + addPictureValue( v, EntityPhoto, addressee.photo(), addressee, intern ); + addPictureValue( v, EntityLogo, addressee.logo(), addressee, intern ); + + addAgentValue( v, addressee.agent() ); + + addSoundValue( v, addressee.sound(), addressee, intern ); +} + +void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt ) +{ + if ( txt.isEmpty() ) return; + + ContentLine cl; + cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() ); + TQString value = txt.mid( txt.find( ":" ) + 1 ); + if ( value.isEmpty() ) + return; + cl.setValue( new TextValue( value.utf8() ) ); + v->add(cl); +} + +void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const TQString &txt ) +{ + if ( txt.isEmpty() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + cl.setValue( new TextValue( txt.utf8() ) ); + v->add(cl); +} + +void VCardFormatImpl::addDateValue( VCARD::VCard *vcard, EntityType type, + const TQDate &date ) +{ + if ( !date.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + + DateValue *v = new DateValue( date ); + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addDateTimeValue( VCARD::VCard *vcard, EntityType type, + const TQDateTime &dateTime ) +{ + if ( !dateTime.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + + DateValue *v = new DateValue( dateTime ); + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addAddressValue( VCARD::VCard *vcard, const Address &a ) +{ + if ( a.isEmpty() ) + return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityAddress ) ); + + AdrValue *v = new AdrValue; + v->setPOBox( a.postOfficeBox().utf8() ); + v->setExtAddress( a.extended().utf8() ); + v->setStreet( a.street().utf8() ); + v->setLocality( a.locality().utf8() ); + v->setRegion( a.region().utf8() ); + v->setPostCode( a.postalCode().utf8() ); + v->setCountryName( a.country().utf8() ); + cl.setValue( v ); + + addAddressParam( &cl, a.type() ); + + vcard->add( cl ); +} + +void VCardFormatImpl::addLabelValue( VCARD::VCard *vcard, const Address &a ) +{ + if ( a.label().isEmpty() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityLabel ) ); + cl.setValue( new TextValue( a.label().utf8() ) ); + + addAddressParam( &cl, a.type() ); + + vcard->add( cl ); +} + +void VCardFormatImpl::addAddressParam( ContentLine *cl, int type ) +{ + ParamList params; + if ( type & Address::Dom ) params.append( new Param( "TYPE", "dom" ) ); + if ( type & Address::Intl ) params.append( new Param( "TYPE", "intl" ) ); + if ( type & Address::Parcel ) params.append( new Param( "TYPE", "parcel" ) ); + if ( type & Address::Postal ) params.append( new Param( "TYPE", "postal" ) ); + if ( type & Address::Work ) params.append( new Param( "TYPE", "work" ) ); + if ( type & Address::Home ) params.append( new Param( "TYPE", "home" ) ); + if ( type & Address::Pref ) params.append( new Param( "TYPE", "pref" ) ); + cl->setParamList( params ); +} + +void VCardFormatImpl::addGeoValue( VCARD::VCard *vcard, const Geo &geo ) +{ + if ( !geo.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityGeo ) ); + + GeoValue *v = new GeoValue; + v->setLatitude( geo.latitude() ); + v->setLongitude( geo.longitude() ); + + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addUTCValue( VCARD::VCard *vcard, const TimeZone &tz ) +{ + if ( !tz.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityTimeZone ) ); + + UTCValue *v = new UTCValue; + + v->setPositive( tz.offset() >= 0 ); + v->setHour( (tz.offset() / 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); + v->setMinute( (tz.offset() % 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); + + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addClassValue( VCARD::VCard *vcard, const Secrecy &secrecy ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityClass ) ); + + ClassValue *v = new ClassValue; + switch ( secrecy.type() ) { + case Secrecy::Public: + v->setType( (int)ClassValue::Public ); + break; + case Secrecy::Private: + v->setType( (int)ClassValue::Private ); + break; + case Secrecy::Confidential: + v->setType( (int)ClassValue::Confidential ); + break; + } + + cl.setValue( v ); + vcard->add(cl); +} + + +Address VCardFormatImpl::readAddressValue( ContentLine *cl ) +{ + Address a; + AdrValue *v = (AdrValue *)cl->value(); + a.setPostOfficeBox( TQString::fromUtf8( v->poBox() ) ); + a.setExtended( TQString::fromUtf8( v->extAddress() ) ); + a.setStreet( TQString::fromUtf8( v->street() ) ); + a.setLocality( TQString::fromUtf8( v->locality() ) ); + a.setRegion( TQString::fromUtf8( v->region() ) ); + a.setPostalCode( TQString::fromUtf8( v->postCode() ) ); + a.setCountry( TQString::fromUtf8( v->countryName() ) ); + + a.setType( readAddressParam( cl ) ); + + return a; +} + +int VCardFormatImpl::readAddressParam( ContentLine *cl ) +{ + int type = 0; + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "TYPE" ) { + if ( (*it)->value() == "dom" ) type |= Address::Dom; + else if ( (*it)->value() == "intl" ) type |= Address::Intl; + else if ( (*it)->value() == "parcel" ) type |= Address::Parcel; + else if ( (*it)->value() == "postal" ) type |= Address::Postal; + else if ( (*it)->value() == "work" ) type |= Address::Work; + else if ( (*it)->value() == "home" ) type |= Address::Home; + else if ( (*it)->value() == "pref" ) type |= Address::Pref; + } + } + return type; +} + +void VCardFormatImpl::addNValue( VCARD::VCard *vcard, const Addressee &a ) +{ + ContentLine cl; + cl.setName(EntityTypeToParamName( EntityN ) ); + NValue *v = new NValue; + v->setFamily( TQString(a.familyName()).utf8() ); + v->setGiven( TQString(a.givenName()).utf8() ); + v->setMiddle( TQString(a.additionalName()).utf8() ); + v->setPrefix( TQString(a.prefix()).utf8() ); + v->setSuffix( TQString(a.suffix()).utf8() ); + + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::readNValue( ContentLine *cl, Addressee &a ) +{ + NValue *v = (NValue *)cl->value(); + a.setFamilyName( TQString::fromUtf8( v->family() ) ); + a.setGivenName( TQString::fromUtf8( v->given() ) ); + a.setAdditionalName( TQString::fromUtf8( v->middle() ) ); + a.setPrefix( TQString::fromUtf8( v->prefix() ) ); + a.setSuffix( TQString::fromUtf8( v->suffix() ) ); +} + +void VCardFormatImpl::addTelephoneValue( VCARD::VCard *v, const PhoneNumber &p ) +{ + if ( p.number().isEmpty() ) + return; + + ContentLine cl; + cl.setName(EntityTypeToParamName(EntityTelephone)); + cl.setValue(new TelValue( p.number().utf8() )); + + ParamList params; + if( p.type() & PhoneNumber::Home ) params.append( new Param( "TYPE", "home" ) ); + if( p.type() & PhoneNumber::Work ) params.append( new Param( "TYPE", "work" ) ); + if( p.type() & PhoneNumber::Msg ) params.append( new Param( "TYPE", "msg" ) ); + if( p.type() & PhoneNumber::Pref ) params.append( new Param( "TYPE", "pref" ) ); + if( p.type() & PhoneNumber::Voice ) params.append( new Param( "TYPE", "voice" ) ); + if( p.type() & PhoneNumber::Fax ) params.append( new Param( "TYPE", "fax" ) ); + if( p.type() & PhoneNumber::Cell ) params.append( new Param( "TYPE", "cell" ) ); + if( p.type() & PhoneNumber::Video ) params.append( new Param( "TYPE", "video" ) ); + if( p.type() & PhoneNumber::Bbs ) params.append( new Param( "TYPE", "bbs" ) ); + if( p.type() & PhoneNumber::Modem ) params.append( new Param( "TYPE", "modem" ) ); + if( p.type() & PhoneNumber::Car ) params.append( new Param( "TYPE", "car" ) ); + if( p.type() & PhoneNumber::Isdn ) params.append( new Param( "TYPE", "isdn" ) ); + if( p.type() & PhoneNumber::Pcs ) params.append( new Param( "TYPE", "pcs" ) ); + if( p.type() & PhoneNumber::Pager ) params.append( new Param( "TYPE", "pager" ) ); + cl.setParamList( params ); + + v->add(cl); +} + +PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) +{ + PhoneNumber p; + TelValue *value = (TelValue *)cl->value(); + p.setNumber( TQString::fromUtf8( value->asString() ) ); + + int type = 0; + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "TYPE" ) { + if ( (*it)->value() == "home" ) type |= PhoneNumber::Home; + else if ( (*it)->value() == "work" ) type |= PhoneNumber::Work; + else if ( (*it)->value() == "msg" ) type |= PhoneNumber::Msg; + else if ( (*it)->value() == "pref" ) type |= PhoneNumber::Pref; + else if ( (*it)->value() == "voice" ) type |= PhoneNumber::Voice; + else if ( (*it)->value() == "fax" ) type |= PhoneNumber::Fax; + else if ( (*it)->value() == "cell" ) type |= PhoneNumber::Cell; + else if ( (*it)->value() == "video" ) type |= PhoneNumber::Video; + else if ( (*it)->value() == "bbs" ) type |= PhoneNumber::Bbs; + else if ( (*it)->value() == "modem" ) type |= PhoneNumber::Modem; + else if ( (*it)->value() == "car" ) type |= PhoneNumber::Car; + else if ( (*it)->value() == "isdn" ) type |= PhoneNumber::Isdn; + else if ( (*it)->value() == "pcs" ) type |= PhoneNumber::Pcs; + else if ( (*it)->value() == "pager" ) type |= PhoneNumber::Pager; + } + } + p.setType( type ); + + return p; +} + +TQString VCardFormatImpl::readTextValue( ContentLine *cl ) +{ + VCARD::Value *value = cl->value(); + if ( value ) { + return TQString::fromUtf8( value->asString() ); + } else { + kdDebug(5700) << "No value: " << cl->asString() << endl; + return TQString::null; + } +} + +TQDate VCardFormatImpl::readDateValue( ContentLine *cl ) +{ + DateValue *dateValue = (DateValue *)cl->value(); + if ( dateValue ) + return dateValue->qdate(); + else + return TQDate(); +} + +TQDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl ) +{ + DateValue *dateValue = (DateValue *)cl->value(); + if ( dateValue ) + return dateValue->qdt(); + else + return TQDateTime(); +} + +Geo VCardFormatImpl::readGeoValue( ContentLine *cl ) +{ + GeoValue *geoValue = (GeoValue *)cl->value(); + if ( geoValue ) { + Geo geo( geoValue->latitude(), geoValue->longitude() ); + return geo; + } else + return Geo(); +} + +TimeZone VCardFormatImpl::readUTCValue( ContentLine *cl ) +{ + UTCValue *utcValue = (UTCValue *)cl->value(); + if ( utcValue ) { + TimeZone tz; + tz.setOffset(((utcValue->hour()*60)+utcValue->minute())*(utcValue->positive() ? 1 : -1)); + return tz; + } else + return TimeZone(); +} + +Secrecy VCardFormatImpl::readClassValue( ContentLine *cl ) +{ + ClassValue *classValue = (ClassValue *)cl->value(); + if ( classValue ) { + Secrecy secrecy; + switch ( classValue->type() ) { + case ClassValue::Public: + secrecy.setType( Secrecy::Public ); + break; + case ClassValue::Private: + secrecy.setType( Secrecy::Private ); + break; + case ClassValue::Confidential: + secrecy.setType( Secrecy::Confidential ); + break; + } + + return secrecy; + } else + return Secrecy(); +} + +void VCardFormatImpl::addKeyValue( VCARD::VCard *vcard, const Key &key ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityKey ) ); + + ParamList params; + if ( key.isBinary() ) { + cl.setValue( new TextValue( KCodecs::base64Encode( key.binaryData() ) ) ); + params.append( new Param( "ENCODING", "b" ) ); + } else { + cl.setValue( new TextValue( key.textData().utf8() ) ); + } + + switch ( key.type() ) { + case Key::X509: + params.append( new Param( "TYPE", "X509" ) ); + break; + case Key::PGP: + params.append( new Param( "TYPE", "PGP" ) ); + break; + case Key::Custom: + params.append( new Param( "TYPE", key.customTypeString().utf8() ) ); + break; + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Key VCardFormatImpl::readKeyValue( VCARD::ContentLine *cl ) +{ + Key key; + bool isBinary = false; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) + isBinary = true; + if ( (*it)->name() == "TYPE" ) { + if ( (*it)->value().isEmpty() ) + continue; + if ( (*it)->value() == "X509" ) + key.setType( Key::X509 ); + else if ( (*it)->value() == "PGP" ) + key.setType( Key::PGP ); + else { + key.setType( Key::Custom ); + key.setCustomTypeString( TQString::fromUtf8( (*it)->value() ) ); + } + } + } + + + if ( isBinary ) { + TQByteArray data; + KCodecs::base64Decode( v->asString().stripWhiteSpace(), data ); + key.setBinaryData( data ); + } else { + key.setTextData( TQString::fromUtf8( v->asString() ) ); + } + + return key; +} + + +void VCardFormatImpl::addAgentValue( VCARD::VCard *vcard, const Agent &agent ) +{ + if ( agent.isIntern() && !agent.addressee() ) + return; + + if ( !agent.isIntern() && agent.url().isEmpty() ) + return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityAgent ) ); + + ParamList params; + if ( agent.isIntern() ) { + TQString vstr; + Addressee *addr = agent.addressee(); + if ( addr ) { + writeToString( (*addr), vstr ); + vstr.replace( ":", "\\:" ); + vstr.replace( ",", "\\," ); + vstr.replace( ";", "\\;" ); + vstr.replace( "\r\n", "\\n" ); + cl.setValue( new TextValue( vstr.utf8() ) ); + } else + return; + } else { + cl.setValue( new TextValue( agent.url().utf8() ) ); + params.append( new Param( "VALUE", "uri" ) ); + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl ) +{ + Agent agent; + bool isIntern = true; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "VALUE" && (*it)->value() == "uri" ) + isIntern = false; + } + + if ( isIntern ) { + TQString vstr = TQString::fromUtf8( v->asString() ); + vstr.replace( "\\n", "\r\n" ); + vstr.replace( "\\:", ":" ); + vstr.replace( "\\,", "," ); + vstr.replace( "\\;", ";" ); + Addressee *addr = new Addressee; + readFromString( vstr, *addr ); + agent.setAddressee( addr ); + } else { + agent.setUrl( TQString::fromUtf8( v->asString() ) ); + } + + return agent; +} + +void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType type, const Picture &pic, const Addressee &addr, bool intern ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + + if ( pic.isIntern() && pic.data().isNull() ) + return; + + if ( !pic.isIntern() && pic.url().isEmpty() ) + return; + + ParamList params; + if ( pic.isIntern() ) { + TQImage img = pic.data(); + if ( intern ) { // only for vCard export we really write the data inline + TQByteArray data; + TQDataStream s( data, IO_WriteOnly ); + s.setVersion( 4 ); // to produce valid png files + s << img; + cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); + } else { // save picture in cache + TQString dir; + if ( type == EntityPhoto ) + dir = "photos"; + if ( type == EntityLogo ) + dir = "logos"; + + img.save( locateLocal( "data", "tdeabc/" + dir + "/" + addr.uid() ), pic.type().utf8() ); + cl.setValue( new TextValue( "" ) ); + } + params.append( new Param( "ENCODING", "b" ) ); + if ( !pic.type().isEmpty() ) + params.append( new Param( "TYPE", pic.type().utf8() ) ); + } else { + cl.setValue( new TextValue( pic.url().utf8() ) ); + params.append( new Param( "VALUE", "uri" ) ); + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::EntityType type, const Addressee &addr ) +{ + Picture pic; + bool isInline = false; + TQString picType; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) + isInline = true; + if ( (*it)->name() == "TYPE" && !(*it)->value().isEmpty() ) + picType = TQString::fromUtf8( (*it)->value() ); + } + + if ( isInline ) { + TQImage img; + if ( v->asString() == "" ) { // no picture inline stored => picture is in cache + TQString dir; + if ( type == EntityPhoto ) + dir = "photos"; + if ( type == EntityLogo ) + dir = "logos"; + + img.load( locateLocal( "data", "tdeabc/" + dir + "/" + addr.uid() ) ); + } else { + TQByteArray data; + KCodecs::base64Decode( v->asString(), data ); + img.loadFromData( data ); + } + pic.setData( img ); + pic.setType( picType ); + } else { + pic.setUrl( TQString::fromUtf8( v->asString() ) ); + } + + return pic; +} + +void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, const Addressee &addr, bool intern ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( EntitySound ) ); + + if ( sound.isIntern() && sound.data().isNull() ) + return; + + if ( !sound.isIntern() && sound.url().isEmpty() ) + return; + + ParamList params; + if ( sound.isIntern() ) { + TQByteArray data = sound.data(); + if ( intern ) { // only for vCard export we really write the data inline + cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); + } else { // save sound in cache + TQFile file( locateLocal( "data", "tdeabc/sounds/" + addr.uid() ) ); + if ( file.open( IO_WriteOnly ) ) { + file.writeBlock( data ); + } + cl.setValue( new TextValue( "" ) ); + } + params.append( new Param( "ENCODING", "b" ) ); + } else { + cl.setValue( new TextValue( sound.url().utf8() ) ); + params.append( new Param( "VALUE", "uri" ) ); + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &addr ) +{ + Sound sound; + bool isInline = false; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) + isInline = true; + } + + if ( isInline ) { + TQByteArray data; + if ( v->asString() == "" ) { // no sound inline stored => sound is in cache + TQFile file( locateLocal( "data", "tdeabc/sounds/" + addr.uid() ) ); + if ( file.open( IO_ReadOnly ) ) { + data = file.readAll(); + file.close(); + } + } else { + KCodecs::base64Decode( v->asString(), data ); + } + sound.setData( data ); + } else { + sound.setUrl( TQString::fromUtf8( v->asString() ) ); + } + + return sound; +} + +bool VCardFormatImpl::readFromString( const TQString &vcard, Addressee &addressee ) +{ + VCardEntity e( vcard.utf8() ); + VCardListIterator it( e.cardList() ); + + if ( it.current() ) { + VCARD::VCard v(*it.current()); + loadAddressee( addressee, v ); + return true; + } + + return false; +} + +bool VCardFormatImpl::writeToString( const Addressee &addressee, TQString &vcard ) +{ + VCardEntity vcards; + VCardList vcardlist; + vcardlist.setAutoDelete( true ); + + VCARD::VCard *v = new VCARD::VCard; + + saveAddressee( addressee, v, true ); + + vcardlist.append( v ); + vcards.setCardList( vcardlist ); + vcard = TQString::fromUtf8( vcards.asString() ); + + return true; +} diff --git a/tdeabc/vcardformatimpl.h b/tdeabc/vcardformatimpl.h new file mode 100644 index 000000000..78c466a86 --- /dev/null +++ b/tdeabc/vcardformatimpl.h @@ -0,0 +1,106 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDFORMATIMPL_H +#define KABC_VCARDFORMATIMPL_H + +#include +#include + +#include "address.h" +#include "addressee.h" + +#ifdef __CYGWIN__ +#include +#else +#include +#endif + +namespace KABC { + +class AddressBook; + +/** + @deprecated use VCardFormatPlugin instead. + */ +class KABC_EXPORT_DEPRECATED VCardFormatImpl +{ + public: + bool load( Addressee &, TQFile *file ); + bool loadAll( AddressBook *, Resource *, TQFile *file ); + void save( const Addressee &, TQFile *file ); + void saveAll( AddressBook *, Resource *, TQFile *file ); + + bool readFromString( const TQString &vcard, Addressee &addr ); + bool writeToString( const Addressee &addressee, TQString &vcard ); + + protected: + bool loadAddressee( Addressee &, VCARD::VCard & ); + void saveAddressee( const Addressee &, VCARD::VCard *, bool intern ); + + void addTextValue (VCARD::VCard *, VCARD::EntityType, const TQString & ); + TQString readTextValue( VCARD::ContentLine * ); + + void addDateValue( VCARD::VCard *, VCARD::EntityType, const TQDate & ); + TQDate readDateValue( VCARD::ContentLine * ); + + void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const TQDateTime & ); + TQDateTime readDateTimeValue( VCARD::ContentLine * ); + + void addAddressValue( VCARD::VCard *, const Address & ); + Address readAddressValue( VCARD::ContentLine * ); + + void addLabelValue( VCARD::VCard *, const Address & ); + + void addTelephoneValue( VCARD::VCard *, const PhoneNumber & ); + PhoneNumber readTelephoneValue( VCARD::ContentLine * ); + + void addNValue( VCARD::VCard *, const Addressee & ); + void readNValue( VCARD::ContentLine *, Addressee & ); + + void addCustomValue( VCARD::VCard *, const TQString & ); + + void addAddressParam( VCARD::ContentLine *, int ); + int readAddressParam( VCARD::ContentLine * ); + + void addGeoValue( VCARD::VCard *, const Geo & ); + Geo readGeoValue( VCARD::ContentLine * ); + + void addUTCValue( VCARD::VCard *, const TimeZone & ); + TimeZone readUTCValue( VCARD::ContentLine * ); + + void addClassValue( VCARD::VCard *, const Secrecy & ); + Secrecy readClassValue( VCARD::ContentLine * ); + + void addKeyValue( VCARD::VCard *, const Key & ); + Key readKeyValue( VCARD::ContentLine * ); + + void addPictureValue( VCARD::VCard *, VCARD::EntityType, const Picture &, const Addressee &, bool ); + Picture readPictureValue( VCARD::ContentLine *, VCARD::EntityType, const Addressee &addr ); + + void addSoundValue( VCARD::VCard *, const Sound &, const Addressee &, bool ); + Sound readSoundValue( VCARD::ContentLine *, const Addressee &addr ); + + void addAgentValue( VCARD::VCard *, const Agent & ); + Agent readAgentValue( VCARD::ContentLine * ); +}; + +} +#endif diff --git a/tdeabc/vcardformatplugin.cpp b/tdeabc/vcardformatplugin.cpp new file mode 100644 index 000000000..6194cd0fe --- /dev/null +++ b/tdeabc/vcardformatplugin.cpp @@ -0,0 +1,120 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "address.h" +#include "addressee.h" +#include "vcardconverter.h" + +#include "vcardformatplugin.h" + +using namespace KABC; + +VCardFormatPlugin::VCardFormatPlugin() +{ +} + +VCardFormatPlugin::~VCardFormatPlugin() +{ +} + +bool VCardFormatPlugin::load( Addressee &addressee, TQFile *file ) +{ + TQString data; + + TQTextStream t( file ); + t.setEncoding( TQTextStream::Latin1 ); + data = t.read(); + + VCardConverter converter; + Addressee::List l = converter.parseVCards( data ); + + if ( ! l.first().isEmpty() ) { + addressee = l.first(); + return true; + } + + return false; +} + +bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, TQFile *file ) +{ + TQString data; + + TQTextStream t( file ); + t.setEncoding( TQTextStream::Latin1 ); + data = t.read(); + + VCardConverter converter; + + Addressee::List l = converter.parseVCards( data ); + + Addressee::List::iterator itr; + for ( itr = l.begin(); itr != l.end(); ++itr) { + Addressee addressee = *itr; + addressee.setResource( resource ); + addressee.setChanged( false ); + resource->insertAddressee( addressee ); + } + + return true; +} + +void VCardFormatPlugin::save( const Addressee &addressee, TQFile *file ) +{ + VCardConverter converter ; + Addressee::List vcardlist; + + + vcardlist.append( addressee ); + + TQTextStream t( file ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + t << converter.createVCards( vcardlist ); +} + +void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, TQFile *file ) +{ + VCardConverter converter; + Addressee::List vcardlist; + + Resource::Iterator it; + for ( it = resource->begin(); it != resource->end(); ++it ) { + (*it).setChanged( false ); + vcardlist.append( *it ); + } + + TQTextStream t( file ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + t << converter.createVCards( vcardlist ); +} + +bool VCardFormatPlugin::checkFormat( TQFile *file ) const +{ + TQString line; + + file->readLine( line, 1024 ); + line = line.stripWhiteSpace(); + if ( line == "BEGIN:VCARD" ) + return true; + else + return false; +} diff --git a/tdeabc/vcardformatplugin.h b/tdeabc/vcardformatplugin.h new file mode 100644 index 000000000..5ac7e49c2 --- /dev/null +++ b/tdeabc/vcardformatplugin.h @@ -0,0 +1,56 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDFORMATPLUGIN_H +#define KABC_VCARDFORMATPLUGIN_H + +#include "formatplugin.h" + +namespace KABC { + +class AddressBook; +class Addressee; + +/** + @short Interface of vCard backend for address book. + + This class implements the file format interface of address book entries for + the vCard format. +*/ +class KABC_EXPORT VCardFormatPlugin : public FormatPlugin +{ + public: + VCardFormatPlugin(); + virtual ~VCardFormatPlugin(); + + bool load( Addressee &, TQFile *file ); + bool loadAll( AddressBook *, Resource *, TQFile *file ); + void save( const Addressee &, TQFile *file ); + void saveAll( AddressBook *, Resource *, TQFile *file ); + + bool checkFormat( TQFile *file ) const; + + private: + struct VCardFormatPrivate; + VCardFormatPrivate *d; +}; + +} +#endif diff --git a/tdeabc/vcardparser/CMakeLists.txt b/tdeabc/vcardparser/CMakeLists.txt new file mode 100644 index 000000000..2c6fa112a --- /dev/null +++ b/tdeabc/vcardparser/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdecore +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + vcard.h vcardline.h vcardparser.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### vcards #################################### + +set( target vcards ) + +set( ${target}_SRCS + vcard.cpp vcardline.cpp vcardparser.cpp +) + +tde_add_library( ${target} STATIC_PIC + SOURCES ${${target}_SRCS} +) diff --git a/tdeabc/vcardparser/Makefile.am b/tdeabc/vcardparser/Makefile.am new file mode 100644 index 000000000..a855c9756 --- /dev/null +++ b/tdeabc/vcardparser/Makefile.am @@ -0,0 +1,31 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) + +noinst_LTLIBRARIES = libvcards.la +libvcards_la_SOURCES = vcard.cpp vcardline.cpp vcardparser.cpp + +vcardsincludedir = $(includedir)/kabc +vcardsinclude_HEADERS = vcard.h vcardline.h vcardparser.h + +check_PROGRAMS = testread testwrite testread2 + +testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testread_LDADD = libvcards.la $(top_builddir)/tdeabc/libkabc.la +testread_SOURCES = testread.cpp + +testread2_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testread2_LDADD = libvcards.la $(top_builddir)/tdeabc/libkabc.la +testread2_SOURCES = testread2.cpp testutils.cpp + +testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testwrite_LDADD = libvcards.la $(top_builddir)/tdeabc/libkabc.la +testwrite_SOURCES = testwrite.cpp + +TESTFILES = vcard1.vcf vcard2.vcf vcard3.vcf vcard4.vcf vcard6.vcf vcard7.vcf + +check-local: testread + rm -f FAILED; \ + for i in $(TESTFILES); \ + do perl $(top_srcdir)/tdeabc/vcardparser/checkvcard.pl \ + $(top_srcdir)/tdeabc/vcardparser/tests/$$i; \ + done; \ + [ ! -e FAILED ] diff --git a/tdeabc/vcardparser/README.testing b/tdeabc/vcardparser/README.testing new file mode 100644 index 000000000..a7794931d --- /dev/null +++ b/tdeabc/vcardparser/README.testing @@ -0,0 +1,15 @@ +For testing the vcardparser there are some test files and a small testsuite +automatically checking for regressions. The tests directory contains some vCard +files and correpsonding reference output files (with an additional ".ref" +suffix). For running the geression test do "make check". This will compile some +test programs, parse the test files, write them out as vCard again and compare +the output to the reference file. The check fails, if there are unexpected +differences and shows which lines differed. + +For creating a new test put a vCard file to be parsed into the tests directory. +Create a reference file by running "testread" on the test file. It will put out +the parsed data as vCard again on stdout. Carefully check the output, manually +correct any errors and save the result as reference file in the tests directory. +Now add the filename to the TESTFILES variable in Makefile.am and run "make +check". If the check fails adapt the reference file or fix the bugs in the +parser, whatever is appropriate. diff --git a/tdeabc/vcardparser/checkvcard.pl b/tdeabc/vcardparser/checkvcard.pl new file mode 100755 index 000000000..67160ea4a --- /dev/null +++ b/tdeabc/vcardparser/checkvcard.pl @@ -0,0 +1,75 @@ +#!/usr/bin/perl + +if ( @ARGV != 1 ) { + print STDERR "Missing arg: filename\n"; + exit 1; +} + +$file = $ARGV[0]; + +if ( !open( IN, "$file" ) ) { + print STDERR "Unable to open '$file'\n"; + exit 1; +} + +while( ) { + if (/^VERSION:(.*)$/ ) { + $version = $1; + if ( $version eq "2.1" ) { $options = "--vcard21"; } + } +} + +close IN; + +$ref = "$file.ref"; + +if ( !open( REF, "$ref" ) ) { + print STDERR "Unable to open $ref\n"; + exit 1; +} + +while( ) { + push @ref, $_; +} + +close REF; + +if ( !open( READ, "./testread $file $options 2> /dev/null |" ) ) { + print STDERR "Unable to open testread\n"; + exit 1; +} + +print "Checking '$file':\n"; + +$gotsomething = 0; +$error = 0; +$i = 0; +while( ) { + $gotsomething = 1; + $out = $_; + $ref = @ref[$i++]; + + if ( $out ne $ref ) { + if ( $ref =~ /^UID/ && $out =~ /^UID/ ) { next; } + $error++; + print " Expected : $ref"; + print " Parser output : $out"; + } +} + +close READ; + +if ( $gotsomething == 0 ) { + print "\n FAILED: testread didn't output anything\n"; + system "touch FAILED"; + exit 1; +} +if ( $error > 0 ) { + print "\n FAILED: $error errors found.\n"; + system "touch FAILED"; + exit 1; +} else { + print " OK\n"; +} + +exit 0; diff --git a/tdeabc/vcardparser/testread.cpp b/tdeabc/vcardparser/testread.cpp new file mode 100644 index 000000000..fd3524b56 --- /dev/null +++ b/tdeabc/vcardparser/testread.cpp @@ -0,0 +1,89 @@ +/* + This file is part of libkabc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "vcardconverter.h" +#include "vcard.h" + +static const TDECmdLineOptions options[] = +{ + {"vcard21", I18N_NOOP("vCard 2.1"), 0}, + {"+inputfile", I18N_NOOP("Input file"), 0}, + TDECmdLineLastOption +}; + +int main( int argc, char **argv ) +{ + TDEApplication::disableAutoDcopRegistration(); + + TDEAboutData aboutData( "testread", "vCard test reader", "0.1" ); + aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app( false, false ); + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + if ( args->count() != 1 ) { + std::cerr << "Missing argument" << std::endl; + return 1; + } + + TQString inputFile( args->arg( 0 ) ); + + TQFile file( inputFile ); + if ( !file.open( IO_ReadOnly ) ) { + tqDebug( "Unable to open file '%s' for reading!", file.name().latin1() ); + return 1; + } + + TQString text; + + TQTextStream s( &file ); + s.setEncoding( TQTextStream::Latin1 ); + text = s.read(); + file.close(); + + KABC::VCardConverter converter; + KABC::Addressee::List list = converter.parseVCards( text ); + + if ( args->isSet( "vcard21" ) ) { + text = converter.createVCards( list, KABC::VCardConverter::v2_1 ); // uses version 2.1 + } else { + text = converter.createVCards( list ); // uses version 3.0 + } + + std::cout << text.utf8(); + + return 0; +} diff --git a/tdeabc/vcardparser/testread2.cpp b/tdeabc/vcardparser/testread2.cpp new file mode 100644 index 000000000..ea278602c --- /dev/null +++ b/tdeabc/vcardparser/testread2.cpp @@ -0,0 +1,42 @@ +#include "testutils.h" +#include +#include +#include + +using namespace KABC; + +int +main() +{ + Addressee::List l = vCardsAsAddresseeList(); + TQString vcards = vCardsAsText(); + + VCardConverter vct; + + Addressee::List parsed = vct.parseVCards( vcards ); + + if ( l.size() != parsed.size() ) { + kdDebug()<<"\tSize - FAILED : "< +#include +#include + +using namespace KABC; + +Addressee +vcard1() +{ + Addressee addr; + + addr.setName( "Frank Dawson" ); + addr.setOrganization( "Lotus Development Corporation" ); + addr.setUrl( KURL( "http://home.earthlink.net/~fdawson") ); + addr.insertEmail( "fdawson@earthlink.net" ); + addr.insertEmail( "Frank_Dawson@Lotus.com", true ); + addr.insertPhoneNumber( PhoneNumber("+1-919-676-9515",PhoneNumber::Voice|PhoneNumber::Msg + |PhoneNumber::Work ) ); + addr.insertPhoneNumber( PhoneNumber("+1-919-676-9564",PhoneNumber::Fax |PhoneNumber::Work )); + Address a( Address::Work | Address::Postal | Address::Parcel ); + a.setStreet( "6544 Battleford Drive" ); + a.setLocality( "Raleigh" ); + a.setRegion( "NC" ); + a.setPostalCode( "27613-3502" ); + a.setCountry( "U.S.A." ); + addr.insertAddress( a ); + return addr; +} + +Addressee +vcard2() +{ + Addressee addr; + + addr.setName( "Tim Howes" ); + addr.setOrganization( "Netscape Communications Corp." ); + addr.insertEmail( "howes@netscape.com" ); + addr.insertPhoneNumber( PhoneNumber("+1-415-937-3419",PhoneNumber::Voice|PhoneNumber::Msg + |PhoneNumber::Work) ); + addr.insertPhoneNumber( PhoneNumber("+1-415-528-4164",PhoneNumber::Fax |PhoneNumber::Work) ); + Address a( Address::Work ); + a.setStreet( "501 E. Middlefield Rd." ); + a.setLocality( "Mountain View" ); + a.setRegion( "CA" ); + a.setPostalCode( "94043" ); + a.setCountry( "U.S.A." ); + addr.insertAddress( a ); + return addr; +} + +Addressee +vcard3() +{ + Addressee addr; + + addr.setName( "ian geiser" ); + addr.setOrganization( "Source eXtreme" ); + addr.insertEmail( "geiseri@yahoo.com" ); + addr.setTitle( "VP of Engineering" ); + return addr; +} + + +QString +vcardAsText( const TQString& location ) +{ + TQString line; + TQFile file( location ); + if ( file.open( IO_ReadOnly ) ) { + TQTextStream stream( &file ); + if ( !stream.eof() ) { + line = stream.read(); + } + file.close(); + } + return line; +} + +Addressee::List +vCardsAsAddresseeList() +{ + Addressee::List l; + + l.append( vcard1() ); + l.append( vcard2() ); + l.append( vcard3() ); + + return l; +} + +QString +vCardsAsText() +{ + TQString vcards = vcardAsText( "tests/vcard1.vcf" ); + vcards += vcardAsText( "tests/vcard2.vcf" ); + vcards += vcardAsText( "tests/vcard3.vcf" ); + + return vcards; +} diff --git a/tdeabc/vcardparser/testutils.h b/tdeabc/vcardparser/testutils.h new file mode 100644 index 000000000..c8218b7ba --- /dev/null +++ b/tdeabc/vcardparser/testutils.h @@ -0,0 +1,14 @@ +#ifndef TESTUTILS_H +#define TESTUTILS_H + +#include +#include + +KABC::Addressee vcard1(); +KABC::Addressee vcard2(); +KABC::Addressee vcard3(); +KABC::Addressee::List vCardsAsAddresseeList(); +TQString vCardAsText( const TQString& location ); +TQString vCardsAsText(); + +#endif diff --git a/tdeabc/vcardparser/testwrite.cpp b/tdeabc/vcardparser/testwrite.cpp new file mode 100644 index 000000000..e40ffe4d0 --- /dev/null +++ b/tdeabc/vcardparser/testwrite.cpp @@ -0,0 +1,134 @@ +/* + This file is part of libkabc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "vcardconverter.h" + +int main( int argc, char **argv ) +{ + TDEAboutData aboutData( "testwrite", "vCard test writer", "0.1" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + + TDEApplication app( false, false ); + + + KABC::Addressee addressee; + + addressee.setNameFromString( "Mr. Tobias Koenig Jr." ); + addressee.setNickName( "tokoe" ); + addressee.setBirthday( TQDate( 1982, 7, 19 ) ); + addressee.setMailer( "mutt1.2" ); + addressee.setTimeZone( KABC::TimeZone( +2 ) ); + + KABC::Geo geo; + geo.setLatitude( 30 ); + geo.setLongitude( 51 ); + addressee.setGeo( geo ); + + addressee.setTitle( "nerd" ); + addressee.setRole( "Maintainer" ); + addressee.setOrganization( "KDE" ); + addressee.setNote( "nerver\ntouch a running system" ); + addressee.setProductId( "testId" ); + addressee.setRevision( TQDateTime::currentDateTime() ); + addressee.setSortString( "koenig" ); + addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); + addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); +/* + TQImage img; + img.load( "testimg.png", "PNG" ); + KABC::Picture photo; + photo.setData( img ); + addressee.setPhoto( photo ); + + TQImage img2; + img2.load( "testimg.png", "PNG" ); + KABC::Picture logo; + logo.setData( img2 ); + addressee.setLogo( logo ); + + TQFile soundFile( "testsound.wav" ); + soundFile.open( IO_ReadOnly ); + TQByteArray data = soundFile.readAll(); + soundFile.close(); + KABC::Sound sound; + sound.setData( data ); + addressee.setSound( sound ); +*/ + addressee.insertEmail( "tokoe@kde.org", true ); + addressee.insertEmail( "tokoe82@yahoo.de", true ); + + KABC::PhoneNumber phone1( "3541523475", KABC::PhoneNumber::Pref | KABC::PhoneNumber::Home ); + KABC::PhoneNumber phone2( "+46745673475", KABC::PhoneNumber::Work ); + addressee.insertPhoneNumber( phone1 ); + addressee.insertPhoneNumber( phone2 ); + + KABC::Key key( "secret key", KABC::Key::X509 ); + addressee.insertKey( key ); + + TQStringList categories; + categories << "Friends" << "School" << "KDE"; + addressee.setCategories( categories ); + + KABC::Address a( KABC::Address::Work | KABC::Address::Postal | KABC::Address::Parcel ); + a.setStreet( "6544 Battleford Drive" ); + a.setLocality( "Raleigh" ); + a.setRegion( "NC" ); + a.setPostalCode( "27613-3502" ); + a.setCountry( "U.S.A." ); + addressee.insertAddress( a ); + + addressee.insertCustom( "1hsdf", "ertuer", "iurt" ); + addressee.insertCustom( "2hsdf", "ertuer", "iurt" ); + addressee.insertCustom( "3hsdf", "ertuer", "iurt" ); + + KABC::Addressee::List list; + for ( int i = 0; i < 1000; ++i ) { + KABC::Addressee addr = addressee; + addr.setUid( TQString::number( i ) ); + list.append( addr ); + } + + KABC::VCardConverter converter; + TQString txt = converter.createVCards( list ); + + TQFile file( "out.vcf" ); + file.open( IO_WriteOnly ); + + TQTextStream s( &file ); + s.setEncoding( TQTextStream::UnicodeUTF8 ); + s << txt; + file.close(); + + return 0; +} diff --git a/tdeabc/vcardparser/vcard.cpp b/tdeabc/vcardparser/vcard.cpp new file mode 100644 index 000000000..30a8e1c49 --- /dev/null +++ b/tdeabc/vcardparser/vcard.cpp @@ -0,0 +1,109 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcard.h" + +using namespace KABC; + +VCard::VCard() +{ +} + +VCard::VCard( const VCard& vcard ) +{ + mLineMap = vcard.mLineMap; +} + +VCard::~VCard() +{ +} + +VCard& VCard::operator=( const VCard& vcard ) +{ + if ( &vcard == this ) + return *this; + + mLineMap = vcard.mLineMap; + + return *this; +} + +void VCard::clear() +{ + mLineMap.clear(); +} + +TQStringList VCard::identifiers() const +{ + return mLineMap.keys(); +} + +void VCard::addLine( const VCardLine& line ) +{ + mLineMap[ line.identifier() ].append( line ); +} + +VCardLine::List VCard::lines( const TQString& identifier ) const +{ + LineMap::ConstIterator it = mLineMap.find( identifier ); + if ( it == mLineMap.end() ) + return VCardLine::List(); + + return *it; +} + +VCardLine VCard::line( const TQString& identifier ) const +{ + LineMap::ConstIterator it = mLineMap.find( identifier ); + if ( it == mLineMap.end() ) + return VCardLine(); + + if ( (*it).isEmpty() ) + return VCardLine(); + else + return (*it).first(); +} + +void VCard::setVersion( Version version ) +{ + mLineMap.erase( "VERSION" ); + + VCardLine line; + line.setIdentifier( "VERSION" ); + if ( version == v2_1 ) + line.setIdentifier( "2.1" ); + else if ( version == v3_0 ) + line.setIdentifier( "3.0" ); + + mLineMap[ "VERSION" ].append( line ); +} + +VCard::Version VCard::version() const +{ + LineMap::ConstIterator versionEntry = mLineMap.find( "VERSION" ); + if ( versionEntry == mLineMap.end() ) + return v3_0; + + VCardLine line = ( *versionEntry )[ 0 ]; + if ( line.value() == "2.1" ) + return v2_1; + else + return v3_0; +} diff --git a/tdeabc/vcardparser/vcard.h b/tdeabc/vcardparser/vcard.h new file mode 100644 index 000000000..6afeeda26 --- /dev/null +++ b/tdeabc/vcardparser/vcard.h @@ -0,0 +1,91 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDPARSER_VCARD_H +#define VCARDPARSER_VCARD_H + +#include "vcardline.h" +#include +#include +#include + +namespace KABC { + +class VCard +{ + public: + typedef TQValueList List; + typedef TQMap< TQString, VCardLine::List > LineMap; + + enum Version { v2_1, v3_0 }; + + VCard(); + VCard( const VCard& ); + + ~VCard(); + + VCard& operator=( const VCard& ); + + /** + * Removes all lines from the vCard. + */ + void clear(); + + /** + * Returns a list of all identifiers that exists in the + * vCard. + */ + TQStringList identifiers() const; + + /** + * Adds a VCardLine to the VCard + */ + void addLine( const VCardLine& line ); + + /** + * Returns all lines of the vcard with a special identifier. + */ + VCardLine::List lines( const TQString& identifier ) const; + + /** + * Returns only the first line of the vcard with a special identifier. + */ + VCardLine line( const TQString& identifier ) const; + + /** + * Set the version of the vCard. + */ + void setVersion( Version version ); + + /** + * Returns the version of this vCard. + */ + Version version() const; + + private: + LineMap mLineMap; + + class VCardPrivate; + VCardPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/vcardparser/vcardline.cpp b/tdeabc/vcardparser/vcardline.cpp new file mode 100644 index 000000000..6680cf7d0 --- /dev/null +++ b/tdeabc/vcardparser/vcardline.cpp @@ -0,0 +1,151 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardline.h" + +using namespace KABC; + +class VCardLine::VCardLinePrivate +{ + public: + TQString mGroup; +}; + +VCardLine::VCardLine() + : d( 0 ) +{ +} + +VCardLine::VCardLine( const TQString &identifier ) + : d( 0 ) +{ + mIdentifier = identifier; +} + +VCardLine::VCardLine( const TQString &identifier, const TQVariant &value ) + : d( 0 ) +{ + mIdentifier = identifier; + mValue = value; +} + +VCardLine::VCardLine( const VCardLine& line ) + : d( 0 ) +{ + mParamMap = line.mParamMap; + mValue = line.mValue; + mIdentifier = line.mIdentifier; +} + +VCardLine::~VCardLine() +{ + delete d; + d = 0; +} + +VCardLine& VCardLine::operator=( const VCardLine& line ) +{ + if ( &line == this ) + return *this; + + mParamMap = line.mParamMap; + mValue = line.mValue; + mIdentifier = line.mIdentifier; + + return *this; +} + +void VCardLine::setIdentifier( const TQString& identifier ) +{ + mIdentifier = identifier; +} + +TQString VCardLine::identifier() const +{ + return mIdentifier; +} + +void VCardLine::setValue( const TQVariant& value ) +{ + mValue = value; +} + +TQVariant VCardLine::value() const +{ + return mValue; +} + +void VCardLine::setGroup( const TQString& group ) +{ + if ( !d ) + d = new VCardLinePrivate(); + + d->mGroup = group; +} + +TQString VCardLine::group() const +{ + if ( d ) + return d->mGroup; + else + return TQString(); +} + +bool VCardLine::hasGroup() const +{ + if ( !d ) + return false; + else + return d->mGroup.isEmpty(); +} + +TQStringList VCardLine::parameterList() const +{ + return mParamMap.keys(); +} + +void VCardLine::addParameter( const TQString& param, const TQString& value ) +{ + TQStringList &list = mParamMap[ param ]; + if ( list.findIndex( value ) == -1 ) // not included yet + list.append( value ); +} + +TQStringList VCardLine::parameters( const TQString& param ) const +{ + ParamMap::ConstIterator it = mParamMap.find( param ); + if ( it == mParamMap.end() ) + return TQStringList(); + else + return *it; +} + +TQString VCardLine::parameter( const TQString& param ) const +{ + ParamMap::ConstIterator it = mParamMap.find( param ); + if ( it == mParamMap.end() ) + return TQString::null; + else { + if ( (*it).isEmpty() ) + return TQString::null; + else + return (*it).first(); + } +} diff --git a/tdeabc/vcardparser/vcardline.h b/tdeabc/vcardparser/vcardline.h new file mode 100644 index 000000000..92fe743f6 --- /dev/null +++ b/tdeabc/vcardparser/vcardline.h @@ -0,0 +1,115 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDLINE_H +#define VCARDLINE_H + +#include +#include +#include +#include +#include + +namespace KABC { + +class VCardLine +{ + public: + typedef TQValueList List; + typedef TQMap ParamMap; + + VCardLine(); + VCardLine( const TQString &identifier ); + VCardLine( const TQString &identifier, const TQVariant &value ); + VCardLine( const VCardLine& ); + + ~VCardLine(); + + VCardLine& operator=( const VCardLine& ); + + /** + * Sets the identifier of this line e.g. UID, FN, CLASS + */ + void setIdentifier( const TQString& identifier ); + + /** + * Returns the identifier of this line. + */ + TQString identifier() const; + + /** + * Sets the value of of this line. + */ + void setValue( const TQVariant& value ); + + /** + * Returns the value of this line. + */ + TQVariant value() const; + + /** + * Sets the group the line belongs to. + */ + void setGroup( const TQString& group ); + + /** + * Returns the group the line belongs to. + */ + TQString group() const; + + /** + * Returns whether the line belongs to a group. + */ + bool hasGroup() const; + + /** + * Returns all parameters. + */ + TQStringList parameterList() const; + + /** + * Add a new parameter to the line. + */ + void addParameter( const TQString& param, const TQString& value ); + + /** + * Returns the values of a special parameter. + * You can get a list of all parameters with paramList(). + */ + TQStringList parameters( const TQString& param ) const; + + /** + * Returns only the first value of a special parameter. + * You can get a list of all parameters with paramList(). + */ + TQString parameter( const TQString& param ) const; + + private: + ParamMap mParamMap; + TQString mIdentifier; + TQVariant mValue; + + class VCardLinePrivate; + VCardLinePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/vcardparser/vcardparser.cpp b/tdeabc/vcardparser/vcardparser.cpp new file mode 100644 index 000000000..aed9ebd39 --- /dev/null +++ b/tdeabc/vcardparser/vcardparser.cpp @@ -0,0 +1,297 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include + +#include "vcardparser.h" + +#define FOLD_WIDTH 75 + +using namespace KABC; + +static TQString backslash( "\\\\" ); +static TQString comma( "\\," ); +static TQString newline( "\\n" ); +static TQString cr( "\\r" ); + +static void addEscapes( TQString &str ) +{ + str.replace( '\\', backslash ); + str.replace( ',', comma ); + str.replace( '\r', cr ); + str.replace( '\n', newline ); +} + +static void removeEscapes( TQString &str ) +{ + str.replace( cr, "\\r" ); + str.replace( newline, "\n" ); + str.replace( comma, "," ); + str.replace( backslash, "\\" ); +} + +VCardParser::VCardParser() +{ +} + +VCardParser::~VCardParser() +{ +} + +VCard::List VCardParser::parseVCards( const TQString& text ) +{ + static TQRegExp sep( "[\x0d\x0a]" ); + + VCard currentVCard; + VCard::List vCardList; + TQString currentLine; + + const TQStringList lines = TQStringList::split( sep, text ); + TQStringList::ConstIterator it; + + bool inVCard = false; + TQStringList::ConstIterator linesEnd( lines.end() ); + for ( it = lines.begin(); it != linesEnd; ++it ) { + + if ( (*it).isEmpty() ) // empty line + continue; + + if ( (*it)[ 0 ] == ' ' || (*it)[ 0 ] == '\t' ) { // folded line => append to previous + currentLine += TQString( *it ).remove( 0, 1 ); + continue; + } else { + if ( inVCard && !currentLine.isEmpty() ) { // now parse the line + int colon = currentLine.find( ':' ); + if ( colon == -1 ) { // invalid line + currentLine = (*it); + continue; + } + + VCardLine vCardLine; + const TQString key = currentLine.left( colon ).stripWhiteSpace(); + TQString value = currentLine.mid( colon + 1 ); + + TQStringList params = TQStringList::split( ';', key ); + + // check for group + if ( params[0].find( '.' ) != -1 ) { + const TQStringList groupList = TQStringList::split( '.', params[0] ); + vCardLine.setGroup( groupList[0] ); + vCardLine.setIdentifier( groupList[1] ); + } else + vCardLine.setIdentifier( params[0] ); + + if ( params.count() > 1 ) { // find all parameters + TQStringList::ConstIterator paramIt = params.begin(); + for ( ++paramIt; paramIt != params.end(); ++paramIt ) { + TQStringList pair = TQStringList::split( '=', *paramIt ); + if ( pair.size() == 1 ) { + // correct the 2.1 'standard' + if ( pair[0].lower() == "quoted-printable" ) { + pair[0] = "encoding"; + pair[1] = "quoted-printable"; + } else if ( pair[0].lower() == "base64" ) { + pair[0] = "encoding"; + pair[1] = "base64"; + } else { + pair.prepend( "type" ); + } + } + // This is pretty much a faster pair[1].contains( ',' )... + if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format + const TQStringList args = TQStringList::split( ',', pair[ 1 ] ); + TQStringList::ConstIterator argIt; + for ( argIt = args.begin(); argIt != args.end(); ++argIt ) + vCardLine.addParameter( pair[0].lower(), *argIt ); + } else + vCardLine.addParameter( pair[0].lower(), pair[1] ); + } + } + + removeEscapes( value ); + + TQByteArray output; + bool wasBase64Encoded = false; + + params = vCardLine.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data + TQByteArray input; + input = TQCString(value.latin1()); + if ( vCardLine.parameter( "encoding" ).lower() == "b" || + vCardLine.parameter( "encoding" ).lower() == "base64" ) { + KCodecs::base64Decode( input, output ); + wasBase64Encoded = true; + } + else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) { + // join any qp-folded lines + while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) { + value = value.remove( value.length() - 1, 1 ) + (*it); + ++it; + } + input = TQCString(value.latin1()); + KCodecs::quotedPrintableDecode( input, output ); + } + } else { + output = TQCString(value.latin1()); + } + + if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data + TQTextCodec *codec = + TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() ); + if ( codec ) { + vCardLine.setValue( codec->toUnicode( output ) ); + } else { + vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); + } + } else if ( wasBase64Encoded ) { + vCardLine.setValue( output ); + } else { // if charset not given, assume it's in UTF-8 (as used in previous KDE versions) + vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); + } + + currentVCard.addLine( vCardLine ); + } + + // we do not save the start and end tag as vcardline + if ( (*it).lower().startsWith( "begin:vcard" ) ) { + inVCard = true; + currentLine.setLength( 0 ); + currentVCard.clear(); // flush vcard + continue; + } + + if ( (*it).lower().startsWith( "end:vcard" ) ) { + inVCard = false; + vCardList.append( currentVCard ); + currentLine.setLength( 0 ); + currentVCard.clear(); // flush vcard + continue; + } + + currentLine = (*it); + } + } + + return vCardList; +} + +TQString VCardParser::createVCards( const VCard::List& list ) +{ + TQString text; + TQString textLine; + TQString encodingType; + TQStringList idents; + TQStringList params; + TQStringList values; + TQStringList::ConstIterator identIt; + TQStringList::Iterator paramIt; + TQStringList::ConstIterator valueIt; + + VCardLine::List lines; + VCardLine::List::ConstIterator lineIt; + VCard::List::ConstIterator cardIt; + + bool hasEncoding; + + text.reserve( list.size() * 300 ); // reserve memory to be more efficient + + // iterate over the cards + VCard::List::ConstIterator listEnd( list.end() ); + for ( cardIt = list.begin(); cardIt != listEnd; ++cardIt ) { + text.append( "BEGIN:VCARD\r\n" ); + + idents = (*cardIt).identifiers(); + for ( identIt = idents.constBegin(); identIt != idents.constEnd(); ++identIt ) { + lines = (*cardIt).lines( (*identIt) ); + + // iterate over the lines + for ( lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt ) { + if ( !(*lineIt).value().asString().isEmpty() ) { + if ((*lineIt).identifier() != TQString("URI")) { + if ( (*lineIt).hasGroup() ) + textLine = (*lineIt).group() + "." + (*lineIt).identifier(); + else + textLine = (*lineIt).identifier(); + + params = (*lineIt).parameterList(); + hasEncoding = false; + if ( params.count() > 0 ) { // we have parameters + for ( paramIt = params.begin(); paramIt != params.end(); ++paramIt ) { + if ( (*paramIt) == "encoding" ) { + hasEncoding = true; + encodingType = (*lineIt).parameter( "encoding" ).lower(); + } + + values = (*lineIt).parameters( *paramIt ); + for ( valueIt = values.constBegin(); valueIt != values.constEnd(); ++valueIt ) { + textLine.append( ";" + (*paramIt).upper() ); + if ( !(*valueIt).isEmpty() ) + textLine.append( "=" + (*valueIt) ); + } + } + } + + if ( hasEncoding ) { // have to encode the data + TQByteArray input, output; + if ( encodingType == "b" ) { + input = (*lineIt).value().toByteArray(); + KCodecs::base64Encode( input, output ); + } else if ( encodingType == "quoted-printable" ) { + input = (*lineIt).value().toString().utf8(); + input.resize( input.size() - 1 ); // strip \0 + KCodecs::quotedPrintableEncode( input, output, false ); + } + + TQString value( output ); + addEscapes( value ); + textLine.append( ":" + value ); + } else { + TQString value( (*lineIt).value().asString() ); + addEscapes( value ); + textLine.append( ":" + value ); + } + + if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line + for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) + text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" ); + } else + text.append( textLine + "\r\n" ); + } + else { + // URIs can be full of weird symbols, etc. so bypass all checks + textLine = (*lineIt).identifier(); + TQString value( (*lineIt).value().asString() ); + addEscapes( value ); + textLine.append( ":" + value ); + text.append( textLine + "\r\n" ); + } + } + } + } + + text.append( "END:VCARD\r\n" ); + text.append( "\r\n" ); + } + + return text; +} diff --git a/tdeabc/vcardparser/vcardparser.h b/tdeabc/vcardparser/vcardparser.h new file mode 100644 index 000000000..da5fdd46e --- /dev/null +++ b/tdeabc/vcardparser/vcardparser.h @@ -0,0 +1,44 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDPARSER_H +#define VCARDPARSER_H + +#include "vcard.h" + +namespace KABC { + +class VCardParser +{ + public: + VCardParser(); + ~VCardParser(); + + static VCard::List parseVCards( const TQString& text ); + static TQString createVCards( const VCard::List& list ); + + private: + class VCardParserPrivate; + VCardParserPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/vcardtool.cpp b/tdeabc/vcardtool.cpp new file mode 100644 index 000000000..295360a03 --- /dev/null +++ b/tdeabc/vcardtool.cpp @@ -0,0 +1,896 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "agent.h" +#include "key.h" +#include "picture.h" +#include "secrecy.h" +#include "sound.h" + +#include "vcardtool.h" + +using namespace KABC; + +static bool needsEncoding( const TQString &value ) +{ + uint length = value.length(); + for ( uint i = 0; i < length; ++i ) { + char c = value.at( i ).latin1(); + if ( (c < 33 || c > 126) && c != ' ' && c != '=' ) + return true; + } + + return false; +} + +VCardTool::VCardTool() +{ + mAddressTypeMap.insert( "dom", Address::Dom ); + mAddressTypeMap.insert( "intl", Address::Intl ); + mAddressTypeMap.insert( "postal", Address::Postal ); + mAddressTypeMap.insert( "parcel", Address::Parcel ); + mAddressTypeMap.insert( "home", Address::Home ); + mAddressTypeMap.insert( "work", Address::Work ); + mAddressTypeMap.insert( "pref", Address::Pref ); + + mPhoneTypeMap.insert( "HOME", PhoneNumber::Home ); + mPhoneTypeMap.insert( "WORK", PhoneNumber::Work ); + mPhoneTypeMap.insert( "MSG", PhoneNumber::Msg ); + mPhoneTypeMap.insert( "PREF", PhoneNumber::Pref ); + mPhoneTypeMap.insert( "VOICE", PhoneNumber::Voice ); + mPhoneTypeMap.insert( "FAX", PhoneNumber::Fax ); + mPhoneTypeMap.insert( "CELL", PhoneNumber::Cell ); + mPhoneTypeMap.insert( "VIDEO", PhoneNumber::Video ); + mPhoneTypeMap.insert( "BBS", PhoneNumber::Bbs ); + mPhoneTypeMap.insert( "MODEM", PhoneNumber::Modem ); + mPhoneTypeMap.insert( "CAR", PhoneNumber::Car ); + mPhoneTypeMap.insert( "ISDN", PhoneNumber::Isdn ); + mPhoneTypeMap.insert( "PCS", PhoneNumber::Pcs ); + mPhoneTypeMap.insert( "PAGER", PhoneNumber::Pager ); +} + +VCardTool::~VCardTool() +{ +} + +// TODO: make list a const& +TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) +{ + VCard::List vCardList; + + Addressee::List::ConstIterator addrIt; + Addressee::List::ConstIterator listEnd( list.constEnd() ); + for ( addrIt = list.constBegin(); addrIt != listEnd; ++addrIt ) { + VCard card; + TQStringList::ConstIterator strIt; + + // ADR + LABEL + const Address::List addresses = (*addrIt).addresses(); + for ( Address::List::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { + TQStringList address; + + bool isEmpty = ( (*it).postOfficeBox().isEmpty() && + (*it).extended().isEmpty() && + (*it).street().isEmpty() && + (*it).locality().isEmpty() && + (*it).region().isEmpty() && + (*it).postalCode().isEmpty() && + (*it).country().isEmpty() ); + + address.append( (*it).postOfficeBox().replace( ';', "\\;" ) ); + address.append( (*it).extended().replace( ';', "\\;" ) ); + address.append( (*it).street().replace( ';', "\\;" ) ); + address.append( (*it).locality().replace( ';', "\\;" ) ); + address.append( (*it).region().replace( ';', "\\;" ) ); + address.append( (*it).postalCode().replace( ';', "\\;" ) ); + address.append( (*it).country().replace( ';', "\\;" ) ); + + VCardLine adrLine( "ADR", address.join( ";" ) ); + if ( version == VCard::v2_1 && needsEncoding( address.join( ";" ) ) ) { + adrLine.addParameter( "charset", "UTF-8" ); + adrLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + + VCardLine labelLine( "LABEL", (*it).label() ); + if ( version == VCard::v2_1 && needsEncoding( (*it).label() ) ) { + labelLine.addParameter( "charset", "UTF-8" ); + labelLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + + bool hasLabel = !(*it).label().isEmpty(); + TQMap::ConstIterator typeIt; + for ( typeIt = mAddressTypeMap.constBegin(); typeIt != mAddressTypeMap.constEnd(); ++typeIt ) { + if ( typeIt.data() & (*it).type() ) { + adrLine.addParameter( "TYPE", typeIt.key() ); + if ( hasLabel ) + labelLine.addParameter( "TYPE", typeIt.key() ); + } + } + + if ( !isEmpty ) + card.addLine( adrLine ); + if ( hasLabel ) + card.addLine( labelLine ); + } + + // AGENT + card.addLine( createAgent( version, (*addrIt).agent() ) ); + + // BDAY + card.addLine( VCardLine( "BDAY", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).birthday()) ) ) ); + + // CATEGORIES + if ( version == VCard::v3_0 ) { + TQStringList categories = (*addrIt).categories(); + TQStringList::Iterator catIt; + for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) + (*catIt).replace( ',', "\\," ); + + VCardLine catLine( "CATEGORIES", categories.join( "," ) ); + if ( version == VCard::v2_1 && needsEncoding( categories.join( "," ) ) ) { + catLine.addParameter( "charset", "UTF-8" ); + catLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + + card.addLine( catLine ); + } + + // CLASS + if ( version == VCard::v3_0 ) { + card.addLine( createSecrecy( (*addrIt).secrecy() ) ); + } + + // EMAIL + const TQStringList emails = (*addrIt).emails(); + bool pref = true; + for ( strIt = emails.begin(); strIt != emails.end(); ++strIt ) { + VCardLine line( "EMAIL", *strIt ); + if ( pref == true && emails.count() > 1 ) { + line.addParameter( "TYPE", "PREF" ); + pref = false; + } + card.addLine( line ); + } + + // FN + VCardLine fnLine( "FN", TQString((*addrIt).formattedName()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).formattedName() ) ) { + fnLine.addParameter( "charset", "UTF-8" ); + fnLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( fnLine ); + + // GEO + Geo geo = (*addrIt).geo(); + if ( geo.isValid() ) { + TQString str; + str.sprintf( "%.6f;%.6f", geo.latitude(), geo.longitude() ); + card.addLine( VCardLine( "GEO", str ) ); + } + + // KEY + const Key::List keys = (*addrIt).keys(); + Key::List::ConstIterator keyIt; + for ( keyIt = keys.begin(); keyIt != keys.end(); ++keyIt ) + card.addLine( createKey( *keyIt ) ); + + // LOGO + card.addLine( createPicture( "LOGO", (*addrIt).logo() ) ); + + // MAILER + VCardLine mailerLine( "MAILER", TQString((*addrIt).mailer()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).mailer() ) ) { + mailerLine.addParameter( "charset", "UTF-8" ); + mailerLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( mailerLine ); + + // N + TQStringList name; + name.append( (*addrIt).familyName().replace( ';', "\\;" ) ); + name.append( (*addrIt).givenName().replace( ';', "\\;" ) ); + name.append( (*addrIt).additionalName().replace( ';', "\\;" ) ); + name.append( (*addrIt).prefix().replace( ';', "\\;" ) ); + name.append( (*addrIt).suffix().replace( ';', "\\;" ) ); + + VCardLine nLine( "N", name.join( ";" ) ); + if ( version == VCard::v2_1 && needsEncoding( name.join( ";" ) ) ) { + nLine.addParameter( "charset", "UTF-8" ); + nLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( nLine ); + + // NAME + VCardLine nameLine( "NAME", TQString((*addrIt).name()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).name() ) ) { + nameLine.addParameter( "charset", "UTF-8" ); + nameLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( nameLine ); + + // NICKNAME + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "NICKNAME", TQString((*addrIt).nickName()) ) ); + + // NOTE + VCardLine noteLine( "NOTE", TQString((*addrIt).note()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).note() ) ) { + noteLine.addParameter( "charset", "UTF-8" ); + noteLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( noteLine ); + + // ORG + TQStringList organization; + organization.append( ( *addrIt ).organization().replace( ';', "\\;" ) ); + if ( !( *addrIt ).department().isEmpty() ) + organization.append( ( *addrIt ).department().replace( ';', "\\;" ) ); + VCardLine orgLine( "ORG", organization.join( ";" ) ); + if ( version == VCard::v2_1 && needsEncoding( organization.join( ";" ) ) ) { + orgLine.addParameter( "charset", "UTF-8" ); + orgLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( orgLine ); + + // PHOTO + card.addLine( createPicture( "PHOTO", (*addrIt).photo() ) ); + + // PROID + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "PRODID", TQString((*addrIt).productId()) ) ); + + // REV + card.addLine( VCardLine( "REV", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).revision()) ) ) ); + + // ROLE + VCardLine roleLine( "ROLE", TQString((*addrIt).role()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).role() ) ) { + roleLine.addParameter( "charset", "UTF-8" ); + roleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( roleLine ); + + // SORT-STRING + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "SORT-STRING", TQString((*addrIt).sortString()) ) ); + + // SOUND + card.addLine( createSound( (*addrIt).sound() ) ); + + // TEL + const PhoneNumber::List phoneNumbers = (*addrIt).phoneNumbers(); + PhoneNumber::List::ConstIterator phoneIt; + for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) { + VCardLine line( "TEL", (*phoneIt).number() ); + + TQMap::ConstIterator typeIt; + for ( typeIt = mPhoneTypeMap.constBegin(); typeIt != mPhoneTypeMap.constEnd(); ++typeIt ) { + if ( typeIt.data() & (*phoneIt).type() ) + line.addParameter( "TYPE", typeIt.key() ); + } + + card.addLine( line ); + } + + // TITLE + VCardLine titleLine( "TITLE", TQString((*addrIt).title()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).title() ) ) { + titleLine.addParameter( "charset", "UTF-8" ); + titleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( titleLine ); + + // TZ + TimeZone timeZone = (*addrIt).timeZone(); + if ( timeZone.isValid() ) { + TQString str; + + int neg = 1; + if ( timeZone.offset() < 0 ) + neg = -1; + + str.sprintf( "%c%02d:%02d", ( timeZone.offset() >= 0 ? '+' : '-' ), + ( timeZone.offset() / 60 ) * neg, + ( timeZone.offset() % 60 ) * neg ); + + card.addLine( VCardLine( "TZ", str ) ); + } + + // UID + card.addLine( VCardLine( "UID", (*addrIt).uid() ) ); + + // UID + card.addLine( VCardLine( "URI", (*addrIt).uri() ) ); + + // URL + card.addLine( VCardLine( "URL", (*addrIt).url().url() ) ); + + // VERSION + if ( version == VCard::v2_1 ) + card.addLine( VCardLine( "VERSION", "2.1" ) ); + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "VERSION", "3.0" ) ); + + // X- + const TQStringList customs = (*addrIt).customs(); + for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) { + TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) ); + TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 ); + if ( value.isEmpty() ) + continue; + + VCardLine line( identifier, value ); + if ( version == VCard::v2_1 && needsEncoding( value ) ) { + line.addParameter( "charset", "UTF-8" ); + line.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( line ); + } + + vCardList.append( card ); + } + + return VCardParser::createVCards( vCardList ); +} + +Addressee::List VCardTool::parseVCards( const TQString& vcard ) +{ + static const TQChar semicolonSep( ';' ); + static const TQChar commaSep( ',' ); + TQString identifier; + + Addressee::List addrList; + const VCard::List vCardList = VCardParser::parseVCards( vcard ); + + VCard::List::ConstIterator cardIt; + VCard::List::ConstIterator listEnd( vCardList.end() ); + for ( cardIt = vCardList.begin(); cardIt != listEnd; ++cardIt ) { + Addressee addr; + + const TQStringList idents = (*cardIt).identifiers(); + TQStringList::ConstIterator identIt; + TQStringList::ConstIterator identEnd( idents.end() ); + for ( identIt = idents.begin(); identIt != identEnd; ++identIt ) { + const VCardLine::List lines = (*cardIt).lines( (*identIt) ); + VCardLine::List::ConstIterator lineIt; + + // iterate over the lines + for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { + identifier = (*lineIt).identifier().lower(); + // ADR + if ( identifier == "adr" ) { + Address address; + const TQStringList addrParts = splitString( semicolonSep, (*lineIt).value().asString() ); + if ( addrParts.count() > 0 ) + address.setPostOfficeBox( addrParts[ 0 ] ); + if ( addrParts.count() > 1 ) + address.setExtended( addrParts[ 1 ] ); + if ( addrParts.count() > 2 ) + address.setStreet( addrParts[ 2 ] ); + if ( addrParts.count() > 3 ) + address.setLocality( addrParts[ 3 ] ); + if ( addrParts.count() > 4 ) + address.setRegion( addrParts[ 4 ] ); + if ( addrParts.count() > 5 ) + address.setPostalCode( addrParts[ 5 ] ); + if ( addrParts.count() > 6 ) + address.setCountry( addrParts[ 6 ] ); + + int type = 0; + + const TQStringList types = (*lineIt).parameters( "type" ); + for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) + type += mAddressTypeMap[ (*it).lower() ]; + + address.setType( type ); + addr.insertAddress( address ); + } + + // AGENT + else if ( identifier == "agent" ) + addr.setAgent( parseAgent( *lineIt ) ); + + // BDAY + else if ( identifier == "bday" ) + addr.setBirthday( parseDateTime( (*lineIt).value().asString() ) ); + + // CATEGORIES + else if ( identifier == "categories" ) { + const TQStringList categories = splitString( commaSep, (*lineIt).value().asString() ); + addr.setCategories( categories ); + } + + // CLASS + else if ( identifier == "class" ) + addr.setSecrecy( parseSecrecy( *lineIt ) ); + + // EMAIL + else if ( identifier == "email" ) { + const TQStringList types = (*lineIt).parameters( "type" ); + addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 ); + } + + // FN + else if ( identifier == "fn" ) + addr.setFormattedName( (*lineIt).value().asString() ); + + // GEO + else if ( identifier == "geo" ) { + Geo geo; + + const TQStringList geoParts = TQStringList::split( ';', (*lineIt).value().asString(), true ); + geo.setLatitude( geoParts[ 0 ].toFloat() ); + geo.setLongitude( geoParts[ 1 ].toFloat() ); + + addr.setGeo( geo ); + } + + // KEY + else if ( identifier == "key" ) + addr.insertKey( parseKey( *lineIt ) ); + + // LABEL + else if ( identifier == "label" ) { + int type = 0; + + const TQStringList types = (*lineIt).parameters( "type" ); + for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) + type += mAddressTypeMap[ (*it).lower() ]; + + bool available = false; + KABC::Address::List addressList = addr.addresses(); + KABC::Address::List::Iterator it; + for ( it = addressList.begin(); it != addressList.end(); ++it ) { + if ( (*it).type() == type ) { + (*it).setLabel( (*lineIt).value().asString() ); + addr.insertAddress( *it ); + available = true; + break; + } + } + + if ( !available ) { // a standalone LABEL tag + KABC::Address address( type ); + address.setLabel( (*lineIt).value().asString() ); + addr.insertAddress( address ); + } + } + + // LOGO + else if ( identifier == "logo" ) + addr.setLogo( parsePicture( *lineIt ) ); + + // MAILER + else if ( identifier == "mailer" ) + addr.setMailer( (*lineIt).value().asString() ); + + // N + else if ( identifier == "n" ) { + const TQStringList nameParts = splitString( semicolonSep, (*lineIt).value().asString() ); + if ( nameParts.count() > 0 ) + addr.setFamilyName( nameParts[ 0 ] ); + if ( nameParts.count() > 1 ) + addr.setGivenName( nameParts[ 1 ] ); + if ( nameParts.count() > 2 ) + addr.setAdditionalName( nameParts[ 2 ] ); + if ( nameParts.count() > 3 ) + addr.setPrefix( nameParts[ 3 ] ); + if ( nameParts.count() > 4 ) + addr.setSuffix( nameParts[ 4 ] ); + } + + // NAME + else if ( identifier == "name" ) + addr.setName( (*lineIt).value().asString() ); + + // NICKNAME + else if ( identifier == "nickname" ) + addr.setNickName( (*lineIt).value().asString() ); + + // NOTE + else if ( identifier == "note" ) + addr.setNote( (*lineIt).value().asString() ); + + // ORGANIZATION + else if ( identifier == "org" ) { + const TQStringList orgParts = splitString( semicolonSep, (*lineIt).value().asString() ); + if ( orgParts.count() > 0 ) + addr.setOrganization( orgParts[ 0 ] ); + if ( orgParts.count() > 1 ) + addr.setDepartment( orgParts[ 1 ] ); + } + + // PHOTO + else if ( identifier == "photo" ) + addr.setPhoto( parsePicture( *lineIt ) ); + + // PROID + else if ( identifier == "prodid" ) + addr.setProductId( (*lineIt).value().asString() ); + + // REV + else if ( identifier == "rev" ) + addr.setRevision( parseDateTime( (*lineIt).value().asString() ) ); + + // ROLE + else if ( identifier == "role" ) + addr.setRole( (*lineIt).value().asString() ); + + // SORT-STRING + else if ( identifier == "sort-string" ) + addr.setSortString( (*lineIt).value().asString() ); + + // SOUND + else if ( identifier == "sound" ) + addr.setSound( parseSound( *lineIt ) ); + + // TEL + else if ( identifier == "tel" ) { + PhoneNumber phone; + phone.setNumber( (*lineIt).value().asString() ); + + int type = 0; + + const TQStringList types = (*lineIt).parameters( "type" ); + for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) + type += mPhoneTypeMap[(*it).upper()]; + + phone.setType( type ); + + addr.insertPhoneNumber( phone ); + } + + // TITLE + else if ( identifier == "title" ) + addr.setTitle( (*lineIt).value().asString() ); + + // TZ + else if ( identifier == "tz" ) { + TimeZone tz; + const TQString date = (*lineIt).value().asString(); + + int hours = date.mid( 1, 2).toInt(); + int minutes = date.mid( 4, 2 ).toInt(); + int offset = ( hours * 60 ) + minutes; + offset = offset * ( date[ 0 ] == '+' ? 1 : -1 ); + + tz.setOffset( offset ); + addr.setTimeZone( tz ); + } + + // UID + else if ( identifier == "uid" ) + addr.setUid( (*lineIt).value().asString() ); + + // URI + else if ( identifier == "uri" ) + addr.setUri( (*lineIt).value().asString() ); + + // URL + else if ( identifier == "url" ) + addr.setUrl( KURL( (*lineIt).value().asString() ) ); + + // X- + else if ( identifier.startsWith( "x-" ) ) { + const TQString key = (*lineIt).identifier().mid( 2 ); + int dash = key.find( "-" ); + addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() ); + } + } + } + + addrList.append( addr ); + } + + return addrList; +} + +TQDateTime VCardTool::parseDateTime( const TQString &str ) +{ + TQDateTime dateTime; + + if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd) + dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(), + str.mid( 6, 2 ).toInt() ) ); + + if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss + dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), + str.mid( 17, 2 ).toInt() ) ); + + } else { // is extended format yyyy-mm-dd + dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(), + str.mid( 8, 2 ).toInt() ) ); + + if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss + dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), + str.mid( 17, 2 ).toInt() ) ); + } + + return dateTime; +} + +TQString VCardTool::createDateTime( const TQDateTime &dateTime ) +{ + TQString str; + + if ( dateTime.date().isValid() ) { + str.sprintf( "%4d-%02d-%02d", dateTime.date().year(), dateTime.date().month(), + dateTime.date().day() ); + if ( dateTime.time().isValid() ) { + TQString tmp; + tmp.sprintf( "T%02d:%02d:%02dZ", dateTime.time().hour(), dateTime.time().minute(), + dateTime.time().second() ); + str += tmp; + } + } + + return str; +} + +Picture VCardTool::parsePicture( const VCardLine &line ) +{ + Picture pic; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) { + TQImage img; + img.loadFromData( line.value().asByteArray() ); + pic.setData( img ); + } else if ( params.findIndex( "value" ) != -1 ) { + if ( line.parameter( "value" ).lower() == "uri" ) + pic.setUrl( line.value().asString() ); + } + + if ( params.findIndex( "type" ) != -1 ) + pic.setType( line.parameter( "type" ) ); + + return pic; +} + +VCardLine VCardTool::createPicture( const TQString &identifier, const Picture &pic ) +{ + VCardLine line( identifier ); + + if ( pic.isIntern() ) { + if ( !pic.data().isNull() ) { + TQByteArray input; + TQBuffer buffer( input ); + buffer.open( IO_WriteOnly ); + + TQImageIO iio( &buffer, "JPEG" ); + iio.setImage( pic.data() ); + iio.setQuality( 100 ); + iio.write(); + + line.setValue( input ); + line.addParameter( "encoding", "b" ); + line.addParameter( "type", "image/jpeg" ); + } + } else if ( !pic.url().isEmpty() ) { + line.setValue( pic.url() ); + line.addParameter( "value", "URI" ); + } + + return line; +} + +Sound VCardTool::parseSound( const VCardLine &line ) +{ + Sound snd; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) + snd.setData( line.value().asByteArray() ); + else if ( params.findIndex( "value" ) != -1 ) { + if ( line.parameter( "value" ).lower() == "uri" ) + snd.setUrl( line.value().asString() ); + } + +/* TODO: support sound types + if ( params.contains( "type" ) ) + snd.setType( line.parameter( "type" ) ); +*/ + + return snd; +} + +VCardLine VCardTool::createSound( const Sound &snd ) +{ + VCardLine line( "SOUND" ); + + if ( snd.isIntern() ) { + if ( !snd.data().isEmpty() ) { + line.setValue( snd.data() ); + line.addParameter( "encoding", "b" ); + // TODO: need to store sound type!!! + } + } else if ( !snd.url().isEmpty() ) { + line.setValue( snd.url() ); + line.addParameter( "value", "URI" ); + } + + return line; +} + +Key VCardTool::parseKey( const VCardLine &line ) +{ + Key key; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) + key.setBinaryData( line.value().asByteArray() ); + else + key.setTextData( line.value().asString() ); + + if ( params.findIndex( "type" ) != -1 ) { + if ( line.parameter( "type" ).lower() == "x509" ) + key.setType( Key::X509 ); + else if ( line.parameter( "type" ).lower() == "pgp" ) + key.setType( Key::PGP ); + else { + key.setType( Key::Custom ); + key.setCustomTypeString( line.parameter( "type" ) ); + } + } + + return key; +} + +VCardLine VCardTool::createKey( const Key &key ) +{ + VCardLine line( "KEY" ); + + if ( key.isBinary() ) { + if ( !key.binaryData().isEmpty() ) { + line.setValue( key.binaryData() ); + line.addParameter( "encoding", "b" ); + } + } else if ( !key.textData().isEmpty() ) + line.setValue( key.textData() ); + + if ( key.type() == Key::X509 ) + line.addParameter( "type", "X509" ); + else if ( key.type() == Key::PGP ) + line.addParameter( "type", "PGP" ); + else if ( key.type() == Key::Custom ) + line.addParameter( "type", key.customTypeString() ); + + return line; +} + +Secrecy VCardTool::parseSecrecy( const VCardLine &line ) +{ + Secrecy secrecy; + + if ( line.value().asString().lower() == "public" ) + secrecy.setType( Secrecy::Public ); + if ( line.value().asString().lower() == "private" ) + secrecy.setType( Secrecy::Private ); + if ( line.value().asString().lower() == "confidential" ) + secrecy.setType( Secrecy::Confidential ); + + return secrecy; +} + +VCardLine VCardTool::createSecrecy( const Secrecy &secrecy ) +{ + VCardLine line( "CLASS" ); + + int type = secrecy.type(); + + if ( type == Secrecy::Public ) + line.setValue( "PUBLIC" ); + else if ( type == Secrecy::Private ) + line.setValue( "PRIVATE" ); + else if ( type == Secrecy::Confidential ) + line.setValue( "CONFIDENTIAL" ); + + return line; +} + +Agent VCardTool::parseAgent( const VCardLine &line ) +{ + Agent agent; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "value" ) != -1 ) { + if ( line.parameter( "value" ).lower() == "uri" ) + agent.setUrl( line.value().asString() ); + } else { + TQString str = line.value().asString(); + str.replace( "\\n", "\r\n" ); + str.replace( "\\N", "\r\n" ); + str.replace( "\\;", ";" ); + str.replace( "\\:", ":" ); + str.replace( "\\,", "," ); + + const Addressee::List list = parseVCards( str ); + if ( list.count() > 0 ) { + Addressee *addr = new Addressee; + *addr = list[ 0 ]; + agent.setAddressee( addr ); + } + } + + return agent; +} + +VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent ) +{ + VCardLine line( "AGENT" ); + + if ( agent.isIntern() ) { + if ( agent.addressee() != 0 ) { + Addressee::List list; + list.append( *agent.addressee() ); + + TQString str = createVCards( list, version ); + str.replace( "\r\n", "\\n" ); + str.replace( ";", "\\;" ); + str.replace( ":", "\\:" ); + str.replace( ",", "\\," ); + line.setValue( str ); + } + } else if ( !agent.url().isEmpty() ) { + line.setValue( agent.url() ); + line.addParameter( "value", "URI" ); + } + + return line; +} + +TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str ) +{ + TQStringList list; + TQString value( str ); + + int start = 0; + int pos = value.find( sep, start ); + + while ( pos != -1 ) { + if ( value[ pos - 1 ] != '\\' ) { + if ( pos > start && pos <= (int)value.length() ) + list << value.mid( start, pos - start ); + else + list << TQString::null; + + start = pos + 1; + pos = value.find( sep, start ); + } else { + if ( pos != 0 ) { + value.replace( pos - 1, 2, sep ); + pos = value.find( sep, pos ); + } else + pos = value.find( sep, pos + 1 ); + } + } + + int l = value.length() - 1; + if ( value.mid( start, l - start + 1 ).length() > 0 ) + list << value.mid( start, l - start + 1 ); + else + list << TQString::null; + + return list; +} diff --git a/tdeabc/vcardtool.h b/tdeabc/vcardtool.h new file mode 100644 index 000000000..fbf959613 --- /dev/null +++ b/tdeabc/vcardtool.h @@ -0,0 +1,88 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDTOOL_H +#define KABC_VCARDTOOL_H + +#include "addressee.h" +#include "vcardparser.h" + +class TQDateTime; + +namespace KABC { + +class Agent; +class Key; +class Picture; +class Secrecy; +class Sound; + +class KABC_EXPORT VCardTool +{ + public: + VCardTool(); + ~VCardTool(); + + /** + Creates a string that contains the addressees from the list in + the vCard format. + */ + TQString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 ); + + /** + Parses the string and returns a list of addressee objects. + */ + Addressee::List parseVCards( const TQString& vcard ); + + private: + /** + Split a string and replaces escaped separators on the fly with + unescaped ones. + */ + TQStringList splitString( const TQChar &sep, const TQString &value ); + + TQDateTime parseDateTime( const TQString &str ); + TQString createDateTime( const TQDateTime &dateTime ); + + Picture parsePicture( const VCardLine &line ); + VCardLine createPicture( const TQString &identifier, const Picture &pic ); + + Sound parseSound( const VCardLine &line ); + VCardLine createSound( const Sound &snd ); + + Key parseKey( const VCardLine &line ); + VCardLine createKey( const Key &key ); + + Secrecy parseSecrecy( const VCardLine &line ); + VCardLine createSecrecy( const Secrecy &secrecy ); + + Agent parseAgent( const VCardLine &line ); + VCardLine createAgent( VCard::Version version, const Agent &agent ); + + TQMap mAddressTypeMap; + TQMap mPhoneTypeMap; + + class VCardToolPrivate; + VCardToolPrivate *d; +}; + +} + +#endif diff --git a/tdecert/tdecertpart.cc b/tdecert/tdecertpart.cc index 7c84f31d1..9a50e6e29 100644 --- a/tdecert/tdecertpart.cc +++ b/tdecert/tdecertpart.cc @@ -24,14 +24,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdecmshell/main.cpp b/tdecmshell/main.cpp index 3d54abc45..72f3c66f2 100644 --- a/tdecmshell/main.cpp +++ b/tdecmshell/main.cpp @@ -37,12 +37,12 @@ #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include "main.h" #include "main.moc" diff --git a/tdeconf_update/tdeconf_update.cpp b/tdeconf_update/tdeconf_update.cpp index 458b3b523..814e68a16 100644 --- a/tdeconf_update/tdeconf_update.cpp +++ b/tdeconf_update/tdeconf_update.cpp @@ -30,13 +30,13 @@ #include #include -#include +#include #include -#include +#include #include #include #include -#include +#include static TDECmdLineOptions options[] = { diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt index 850bb10f2..b8f512873 100644 --- a/tdecore/CMakeLists.txt +++ b/tdecore/CMakeLists.txt @@ -74,19 +74,19 @@ install( FILES kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h kapp.h tdeapplication.h kuniqueapp.h kuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h kprocctrl.h - klocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h + tdelocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h kregexp.h kcompletion.h kstringhandler.h kstddirs.h - kstandarddirs.h kglobal.h kglobalsettings.h ksharedptr.h + kstandarddirs.h tdeglobal.h tdeglobalsettings.h ksharedptr.h kallocator.h kvmallocator.h kcrash.h krfcdate.h kinstance.h - kpalette.h kipc.h klibloader.h ktempfile.h ksavefile.h + kpalette.h kipc.h klibloader.h tdetempfile.h ksavefile.h krandomsequence.h knotifyclient.h kiconeffect.h kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h kextsock.h kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h tdesycoca.h - tdesycocaentry.h tdesycocatype.h kxmessages.h kstartupinfo.h + tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc ktypelist.h ksortablevaluelist.h kdebugclasses.h kclipboard.h kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h @@ -123,15 +123,15 @@ set( ${target}_SRCS libintl.cpp tdeapplication.cpp kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp kstandarddirs.cpp - ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp klocale.cpp + ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp kiconloader.cpp twin.cpp twinmodule.cpp krootprop.cpp kcharsets.cpp kckey.cpp tdeshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp tdeaccelaction.cpp tdeshortcutmenu.cpp tdeaccelbase.cpp tdeaccel.cpp kglobalaccel_x11.cpp kglobalaccel.cpp tdestdaccel.cpp tdeshortcutlist.cpp - kcrash.cpp kurl.cpp kregexp.cpp kglobal.cpp kglobalsettings.cpp + kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp - kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp ktempfile.cpp + kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp kuniqueapplication.cpp tdeaccelmanager.cpp ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp @@ -139,7 +139,7 @@ set( ${target}_SRCS kextsock.cpp netsupp.cpp kprocio.cpp kbufferedio.cpp kpixmapprovider.cpp kurldrag.cpp kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c tdesycoca.cpp tdesycocadict.cpp tdesycoca.skel - tdesycocafactory.cpp kxmessages.cpp kstartupinfo.cpp + tdesycocafactory.cpp kxmessages.cpp tdestartupinfo.cpp kcatalogue.cpp kasyncio.cpp tdemultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp tdeversion.cpp kdebugdcopiface.cpp diff --git a/tdecore/MAINTAINERS b/tdecore/MAINTAINERS index e4a9ad80d..ae94ecd7c 100644 --- a/tdecore/MAINTAINERS +++ b/tdecore/MAINTAINERS @@ -27,10 +27,10 @@ kcrash.cpp Waldo Bastian kdcoppropertyproxy.cpp kdebug.cpp Stephan Kulow kdesktopfile.cpp -kglobal.cpp Stephan Kulow +tdeglobal.cpp Stephan Kulow kglobalaccel.cpp Ellis Whitehead kglobalaccel_x11.cpp Ellis Whitehead -kglobalsettings.cpp David Faure +tdeglobalsettings.cpp David Faure kiconeffect.cpp kiconloader.cpp kicontheme.cpp @@ -41,7 +41,7 @@ kkeynative_x11.cpp Ellis Whitehead kkeysequence.cpp Ellis Whitehead kkeysequence_emb.cpp Ellis Whitehead klibloader.cpp -klocale.cpp Hans Petter Bieker +tdelocale.cpp Hans Petter Bieker kmdcodec.cpp kmimesourcefactory.cpp tdemultipledrag.cpp David Faure @@ -60,14 +60,14 @@ tdeshortcut.cpp Ellis Whitehead ksimpleconfig.cpp Waldo Bastian ksocks.cpp kstandarddirs.cpp Waldo Bastian -kstartupinfo.cpp Lubos Lunak +tdestartupinfo.cpp Lubos Lunak kstaticdeleter.cpp Stephan Kulow tdestdaccel.cpp Ellis Whitehead kstringhandler.cpp tdesycoca.cpp Waldo Bastian tdesycocadict.cpp Waldo Bastian tdesycocafactory.cpp Waldo Bastian -ktempfile.cpp Waldo Bastian +tdetempfile.cpp Waldo Bastian kuniqueapplication.cpp Waldo Bastian kurl.cpp Waldo Bastian kurldrag.cpp David Faure diff --git a/tdecore/Makefile.am b/tdecore/Makefile.am index ae5048ed9..c04ee4c6d 100644 --- a/tdecore/Makefile.am +++ b/tdecore/Makefile.am @@ -41,19 +41,19 @@ include_HEADERS = tdeconfig.h tdeconfigskeleton.h \ tdeconfigbase.h kdesktopfile.h kurl.h ksock.h tdeaboutdata.h \ tdecmdlineargs.h tdeconfigbackend.h kapp.h tdeapplication.h kuniqueapp.h \ kuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h \ - kprocctrl.h klocale.h kicontheme.h kiconloader.h kdebug.h \ + kprocctrl.h tdelocale.h kicontheme.h kiconloader.h kdebug.h \ twinmodule.h twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h \ kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h \ kregexp.h kcompletion.h kstringhandler.h \ - kstddirs.h kstandarddirs.h kglobal.h kglobalsettings.h ksharedptr.h \ + kstddirs.h kstandarddirs.h tdeglobal.h tdeglobalsettings.h ksharedptr.h \ kallocator.h kvmallocator.h kcrash.h krfcdate.h \ - kinstance.h kpalette.h kipc.h klibloader.h ktempfile.h ksavefile.h \ + kinstance.h kpalette.h kipc.h klibloader.h tdetempfile.h ksavefile.h \ krandomsequence.h knotifyclient.h kiconeffect.h \ kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h \ netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h \ kextsock.h kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h \ kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h \ - tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h kstartupinfo.h \ + tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h \ klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc \ ktypelist.h ksortablevaluelist.h kdebugclasses.h kclipboard.h \ kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h \ @@ -93,14 +93,14 @@ libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \ kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp \ tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp \ kstandarddirs.cpp ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp \ - klocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \ + tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \ kiconloader.cpp twin.cpp twinmodule.cpp krootprop.cpp kcharsets.cpp \ kckey.cpp tdeshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp \ tdeaccelaction.cpp tdeshortcutmenu.cpp tdeaccelbase.cpp tdeaccel.cpp \ kglobalaccel_x11.cpp kglobalaccel.cpp tdestdaccel.cpp tdeshortcutlist.cpp \ - kcrash.cpp kurl.cpp kregexp.cpp kglobal.cpp kglobalsettings.cpp \ + kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp \ kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp \ - kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp ktempfile.cpp \ + kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp \ kuniqueapplication.cpp tdeaccelmanager.cpp \ ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp \ tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \ @@ -109,7 +109,7 @@ libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \ kpixmapprovider.cpp kurldrag.cpp \ kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c \ tdesycoca.cpp tdesycocadict.cpp tdesycocafactory.cpp tdesycoca.skel \ - kxmessages.cpp kstartupinfo.cpp kcatalogue.cpp kasyncio.cpp \ + kxmessages.cpp tdestartupinfo.cpp kcatalogue.cpp kasyncio.cpp \ tdemultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp \ kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp \ tdeversion.cpp kdebugdcopiface.cpp kdebugdcopiface.skel \ diff --git a/tdecore/kappdcopiface.cpp b/tdecore/kappdcopiface.cpp index 31bc8dd5b..ed6e26163 100644 --- a/tdecore/kappdcopiface.cpp +++ b/tdecore/kappdcopiface.cpp @@ -20,7 +20,7 @@ #include "kappdcopiface.h" #include #include -#include +#include #include diff --git a/tdecore/kapplication_win.cpp b/tdecore/kapplication_win.cpp index 940bc379e..38bafaef8 100644 --- a/tdecore/kapplication_win.cpp +++ b/tdecore/kapplication_win.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include "kcheckaccelerators.h" diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp index 39331e170..20d00d181 100644 --- a/tdecore/kcalendarsystem.cpp +++ b/tdecore/kcalendarsystem.cpp @@ -22,10 +22,10 @@ // systems. // Also default gregorian and factory classes -#include +#include #include "kcalendarsystem.h" -#include "klocale.h" +#include "tdelocale.h" class KCalendarSystemPrivate { diff --git a/tdecore/kcalendarsystemgregorian.cpp b/tdecore/kcalendarsystemgregorian.cpp index ead1aca66..9d4d14661 100644 --- a/tdecore/kcalendarsystemgregorian.cpp +++ b/tdecore/kcalendarsystemgregorian.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "kcalendarsystemgregorian.h" diff --git a/tdecore/kcalendarsystemhebrew.cpp b/tdecore/kcalendarsystemhebrew.cpp index a0db927f4..2f0aa111a 100644 --- a/tdecore/kcalendarsystemhebrew.cpp +++ b/tdecore/kcalendarsystemhebrew.cpp @@ -21,7 +21,7 @@ // Derived hebrew kde calendar class -#include +#include #include #include "kcalendarsystemhebrew.h" diff --git a/tdecore/kcalendarsystemhijri.cpp b/tdecore/kcalendarsystemhijri.cpp index 8c9fac471..cc66805e0 100644 --- a/tdecore/kcalendarsystemhijri.cpp +++ b/tdecore/kcalendarsystemhijri.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include "kcalendarsystemhijri.h" diff --git a/tdecore/kcalendarsystemjalali.cpp b/tdecore/kcalendarsystemjalali.cpp index 559ebb39c..631693e45 100644 --- a/tdecore/kcalendarsystemjalali.cpp +++ b/tdecore/kcalendarsystemjalali.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp index fa623b693..23786c53e 100644 --- a/tdecore/kcharsets.cpp +++ b/tdecore/kcharsets.cpp @@ -22,8 +22,8 @@ #include "kentities.c" #include -#include -#include +#include +#include #include #include diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index b7e113f4b..306591e67 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -41,9 +41,9 @@ #include #include -#include +#include #include -#include +#include /* diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index 54d051486..8ab23cccc 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "kclipboard.h" diff --git a/tdecore/kcompletion.cpp b/tdecore/kcompletion.cpp index a5349b3ee..4a80d85df 100644 --- a/tdecore/kcompletion.cpp +++ b/tdecore/kcompletion.cpp @@ -20,9 +20,9 @@ #include #include -#include +#include #include -#include +#include #include diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index e6d7f5314..2bce648fb 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -28,7 +28,7 @@ #include #include "tdelibs_export.h" -#include +#include #include #include diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp index 2eed7c282..08abe75c7 100644 --- a/tdecore/kcrash.cpp +++ b/tdecore/kcrash.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index b6e742489..5653a9a03 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -184,7 +184,7 @@ 5602 kontact (plugins) 5650 tderesources 5700 kabc -5710 kabc/vcard +5710 tdeabc/vcard 5720 kaddressbook 5800 libkcal 5850 korganizer diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index 062864fca..656edf6f9 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -28,12 +28,12 @@ #include "kdebugdcopiface.h" #include "tdeapplication.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kinstance.h" #include "kstandarddirs.h" #include -#include +#include #include #include #include diff --git a/tdecore/kdebugrc b/tdecore/kdebugrc index e1317ddfb..dbf3ed53f 100644 --- a/tdecore/kdebugrc +++ b/tdecore/kdebugrc @@ -96,7 +96,7 @@ InfoOutput=4 [5400] InfoOutput=4 -# kabc/vcard +# tdeabc/vcard [5710] InfoOutput=4 diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp index a5a57cdd8..b385eeb18 100644 --- a/tdecore/kdesktopfile.cpp +++ b/tdecore/kdesktopfile.cpp @@ -35,7 +35,7 @@ #include "kstandarddirs.h" #include "kmountpoint.h" #include "kcatalogue.h" -#include "klocale.h" +#include "tdelocale.h" #include "kdesktopfile.h" #include "kdesktopfile.moc" diff --git a/tdecore/kdetcompmgr.cpp b/tdecore/kdetcompmgr.cpp index d78d76b34..964cd49be 100644 --- a/tdecore/kdetcompmgr.cpp +++ b/tdecore/kdetcompmgr.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/kgenericfactory.h b/tdecore/kgenericfactory.h index 426b29ef1..7f2b7b453 100644 --- a/tdecore/kgenericfactory.h +++ b/tdecore/kgenericfactory.h @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include #include /* @internal */ diff --git a/tdecore/kglobal.cpp b/tdecore/kglobal.cpp index 965a537a3..f8639d526 100644 --- a/tdecore/kglobal.cpp +++ b/tdecore/kglobal.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ /* -* kglobal.cpp -- Implementation of class TDEGlobal. +* tdeglobal.cpp -- Implementation of class TDEGlobal. * Author: Sirtaj Singh Kang * Version: $Id$ * Generated: Sat May 1 02:08:43 EST 1999 @@ -25,13 +25,13 @@ #include #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include #include #include #include -#include +#include #include #include #include diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp index 6af97065d..746721e40 100644 --- a/tdecore/kglobalaccel.cpp +++ b/tdecore/kglobalaccel.cpp @@ -32,7 +32,7 @@ #include "tdeaccelbase.h" #include #include -#include +#include //---------------------------------------------------- diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index a103c4652..c0c6329c7 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ #include "config.h" -#include "kglobalsettings.h" +#include "tdeglobalsettings.h" #include #include @@ -40,12 +40,12 @@ static QRgb qt_colorref2qrgb(COLORREF col) #endif #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index e865a1317..c1a4a8ca5 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include #include "kiconeffect.h" diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp index be44a921f..e81293986 100644 --- a/tdecore/kiconloader.cpp +++ b/tdecore/kiconloader.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdecore/kiconloader.h b/tdecore/kiconloader.h index 0c7e67a26..434a3d976 100644 --- a/tdecore/kiconloader.h +++ b/tdecore/kiconloader.h @@ -27,7 +27,7 @@ #undef TDEIconLoaderXStatus #endif -#include +#include #include #include diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp index 9d5d2b7d0..544eefe01 100644 --- a/tdecore/kicontheme.cpp +++ b/tdecore/kicontheme.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp index cf0b35791..6760c95a0 100644 --- a/tdecore/kinstance.cpp +++ b/tdecore/kinstance.cpp @@ -21,7 +21,7 @@ #include #include "tdeconfig.h" -#include "klocale.h" +#include "tdelocale.h" #include "kcharsets.h" #include "kiconloader.h" #include "tdehardwaredevices.h" @@ -29,7 +29,7 @@ #include "tdeaboutdata.h" #include "kstandarddirs.h" #include "kdebug.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kmimesourcefactory.h" #include diff --git a/tdecore/kkeynative_x11.cpp b/tdecore/kkeynative_x11.cpp index 64635acc3..a44305dad 100644 --- a/tdecore/kkeynative_x11.cpp +++ b/tdecore/kkeynative_x11.cpp @@ -32,7 +32,7 @@ #include #include "kckey.h" #include -#include +#include #ifdef Q_WS_X11 #define XK_MISCELLANY diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index cd4abb6fb..64bfe383d 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -33,8 +33,8 @@ #include #include -#include -#include +#include +#include #ifdef Q_WS_X11 # define XK_MISCELLANY diff --git a/tdecore/klibloader.cpp b/tdecore/klibloader.cpp index f7e63c215..aed2c06af 100644 --- a/tdecore/klibloader.cpp +++ b/tdecore/klibloader.cpp @@ -29,7 +29,7 @@ #include "klibloader.h" #include "kstandarddirs.h" #include "kdebug.h" -#include "klocale.h" +#include "tdelocale.h" #include "ltdl.h" diff --git a/tdecore/klibloader.h b/tdecore/klibloader.h index 3e8f9ff45..d9e632184 100644 --- a/tdecore/klibloader.h +++ b/tdecore/klibloader.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include // For backwards compatibility diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index 3e169ba03..4402dd183 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -33,7 +33,7 @@ #include #include "kcatalogue.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "ksimpleconfig.h" #include "kinstance.h" @@ -41,7 +41,7 @@ #include "kdebug.h" #include "kcalendarsystem.h" #include "kcalendarsystemfactory.h" -#include "klocale.h" +#include "tdelocale.h" #ifdef Q_WS_WIN #include diff --git a/tdecore/klocale.h b/tdecore/klocale.h index 65a21d13d..94cf704f1 100644 --- a/tdecore/klocale.h +++ b/tdecore/klocale.h @@ -39,7 +39,7 @@ class KCatalogue; class KCalendarSystem; /** - * \file klocale.h + * \file tdelocale.h */ #ifndef I18N_NOOP diff --git a/tdecore/klockfile.cpp b/tdecore/klockfile.cpp index ee09a06c8..1f4f8337e 100644 --- a/tdecore/klockfile.cpp +++ b/tdecore/klockfile.cpp @@ -39,8 +39,8 @@ #include #include #include -#include -#include +#include +#include // TODO: http://www.spinnaker.de/linux/nfs-locking.html // TODO: Make regression test diff --git a/tdecore/kmimesourcefactory.cpp b/tdecore/kmimesourcefactory.cpp index f08cb249a..8ed02941e 100644 --- a/tdecore/kmimesourcefactory.cpp +++ b/tdecore/kmimesourcefactory.cpp @@ -19,7 +19,7 @@ */ #include -#include +#include #include #include diff --git a/tdecore/kmimesourcefactory.h b/tdecore/kmimesourcefactory.h index 16302dfe4..8292cda42 100644 --- a/tdecore/kmimesourcefactory.h +++ b/tdecore/kmimesourcefactory.h @@ -23,7 +23,7 @@ #define KMIMESOURCEFACTORY_H #include -#include +#include class KMimeSourceFactoryPrivate; class TDEInstance; diff --git a/tdecore/kpalette.cpp b/tdecore/kpalette.cpp index c06184221..7335e8e14 100644 --- a/tdecore/kpalette.cpp +++ b/tdecore/kpalette.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/kprotocolinfo_tdecore.cpp b/tdecore/kprotocolinfo_tdecore.cpp index 8cc5091c5..86a9a6fcc 100644 --- a/tdecore/kprotocolinfo_tdecore.cpp +++ b/tdecore/kprotocolinfo_tdecore.cpp @@ -26,7 +26,7 @@ #include "kprotocolinfofactory.h" #include -#include +#include #include #include #include diff --git a/tdecore/kprotocolinfofactory.cpp b/tdecore/kprotocolinfofactory.cpp index 4daab08dd..115a44f25 100644 --- a/tdecore/kprotocolinfofactory.cpp +++ b/tdecore/kprotocolinfofactory.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include #include diff --git a/tdecore/krootprop.cpp b/tdecore/krootprop.cpp index bb15462dd..c717a1823 100644 --- a/tdecore/krootprop.cpp +++ b/tdecore/krootprop.cpp @@ -23,8 +23,8 @@ #ifdef Q_WS_X11 // not needed anyway :-) #include "krootprop.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kcharsets.h" #include "tdeapplication.h" #include diff --git a/tdecore/ksavefile.h b/tdecore/ksavefile.h index e035115a9..282652dea 100644 --- a/tdecore/ksavefile.h +++ b/tdecore/ksavefile.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include class KSaveFilePrivate; diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/ksimpleconfig.cpp index 55cf7485b..dc359f17e 100644 --- a/tdecore/ksimpleconfig.cpp +++ b/tdecore/ksimpleconfig.cpp @@ -31,7 +31,7 @@ #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "tdeconfigbackend.h" diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index f39a94221..835566268 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/ksockaddr.cpp b/tdecore/ksockaddr.cpp index cd2f9c93c..a645b3aa9 100644 --- a/tdecore/ksockaddr.cpp +++ b/tdecore/ksockaddr.cpp @@ -38,7 +38,7 @@ #include #include "kdebug.h" -#include "klocale.h" +#include "tdelocale.h" //#include "kextsock.h" #ifndef HAVE_STRUCT_SOCKADDR_IN6 diff --git a/tdecore/ksocks.cpp b/tdecore/ksocks.cpp index 95e36dc15..a6ecc37d2 100644 --- a/tdecore/ksocks.cpp +++ b/tdecore/ksocks.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include "klibloader.h" #include diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h index 7eb654f42..7cdf44e37 100644 --- a/tdecore/kstandarddirs.h +++ b/tdecore/kstandarddirs.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include class TDEConfig; class TDEStandardDirsPrivate; diff --git a/tdecore/kstartupinfo.cpp b/tdecore/kstartupinfo.cpp index a472de5fd..3d798cdc1 100644 --- a/tdecore/kstartupinfo.cpp +++ b/tdecore/kstartupinfo.cpp @@ -45,7 +45,7 @@ DEALINGS IN THE SOFTWARE. #define QT_CLEAN_NAMESPACE #endif -#include "kstartupinfo.h" +#include "tdestartupinfo.h" #include #include @@ -1525,5 +1525,5 @@ static TQString escape_str( const TQString& str_P ) return ret; } -#include "kstartupinfo.moc" +#include "tdestartupinfo.moc" #endif diff --git a/tdecore/kstartupinfo.h b/tdecore/kstartupinfo.h index dcc80f978..3f8310f6b 100644 --- a/tdecore/kstartupinfo.h +++ b/tdecore/kstartupinfo.h @@ -49,7 +49,7 @@ class TDEStartupInfoPrivate; * * This class can be used to send information about started application, * change the information and receive this information. For detailed - * description, see tdelibs/tdecore/README.kstartupinfo. + * description, see tdelibs/tdecore/README.tdestartupinfo. * * You usually don't need to use this class for sending the notification * information, as KDE libraries should do this when an application is diff --git a/tdecore/kstaticdeleter.h b/tdecore/kstaticdeleter.h index dd759adf7..b6967268c 100644 --- a/tdecore/kstaticdeleter.h +++ b/tdecore/kstaticdeleter.h @@ -23,7 +23,7 @@ #ifndef _KSTATIC_DELETER_H_ #define _KSTATIC_DELETER_H_ -#include +#include /** * Static deleters are used to manage static resources. They can register diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp index c562c539f..b19c5b875 100644 --- a/tdecore/kstringhandler.cpp +++ b/tdecore/kstringhandler.cpp @@ -18,7 +18,7 @@ */ #include "kstringhandler.h" -#include "kglobal.h" +#include "tdeglobal.h" static void parsePythonRange( const TQCString &range, uint &start, uint &end ) { diff --git a/tdecore/ktempdir.cpp b/tdecore/ktempdir.cpp index 53cc83f99..d16d2e185 100644 --- a/tdecore/ktempdir.cpp +++ b/tdecore/ktempdir.cpp @@ -47,7 +47,7 @@ #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include "tdeapplication.h" #include "kinstance.h" #include "ktempdir.h" diff --git a/tdecore/ktempfile.cpp b/tdecore/ktempfile.cpp index 973e14070..805d315a1 100644 --- a/tdecore/ktempfile.cpp +++ b/tdecore/ktempfile.cpp @@ -48,10 +48,10 @@ #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include "tdeapplication.h" #include "kinstance.h" -#include "ktempfile.h" +#include "tdetempfile.h" #include "kstandarddirs.h" #include "kde_file.h" #include "kdebug.h" diff --git a/tdecore/ktimezones.cpp b/tdecore/ktimezones.cpp index 6b21e0392..3436cdabb 100644 --- a/tdecore/ktimezones.cpp +++ b/tdecore/ktimezones.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/kuniqueapplication.cpp b/tdecore/kuniqueapplication.cpp index 964c7c8c7..0a3a0962a 100644 --- a/tdecore/kuniqueapplication.cpp +++ b/tdecore/kuniqueapplication.cpp @@ -40,7 +40,7 @@ #if defined Q_WS_X11 #include -#include +#include #endif #include diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp index 9479029a9..2079c050b 100644 --- a/tdecore/kurl.cpp +++ b/tdecore/kurl.cpp @@ -27,7 +27,7 @@ // KDE_QT_ONLY is first used for dcop/client (e.g. marshalling) #ifndef KDE_QT_ONLY #include -#include +#include #include #include #endif diff --git a/tdecore/kurldrag.cpp b/tdecore/kurldrag.cpp index 20aa6388e..5e64d09b2 100644 --- a/tdecore/kurldrag.cpp +++ b/tdecore/kurldrag.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include class KURLDragPrivate diff --git a/tdecore/kvmallocator.cpp b/tdecore/kvmallocator.cpp index 996d55791..3b887eeee 100644 --- a/tdecore/kvmallocator.cpp +++ b/tdecore/kvmallocator.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include "kvmallocator.h" diff --git a/tdecore/netsupp.cpp b/tdecore/netsupp.cpp index c7e968c16..0c072752c 100644 --- a/tdecore/netsupp.cpp +++ b/tdecore/netsupp.cpp @@ -37,7 +37,7 @@ #include "config.h" #include "kdebug.h" -#include "klocale.h" +#include "tdelocale.h" #ifndef IN6_IS_ADDR_V4MAPPED #define NEED_IN6_TESTS diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index 1c32e80ec..b9ac605c0 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -54,7 +54,7 @@ #endif // KDE -#include +#include // Us #include "kresolver.h" diff --git a/tdecore/network/kresolverstandardworkers.cpp b/tdecore/network/kresolverstandardworkers.cpp index cde24f752..96519d1aa 100644 --- a/tdecore/network/kresolverstandardworkers.cpp +++ b/tdecore/network/kresolverstandardworkers.cpp @@ -44,7 +44,7 @@ #include #include "kdebug.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "tdeapplication.h" diff --git a/tdecore/network/tdesocketaddress.cpp b/tdecore/network/tdesocketaddress.cpp index ff97699c8..a6da5f7c0 100644 --- a/tdecore/network/tdesocketaddress.cpp +++ b/tdecore/network/tdesocketaddress.cpp @@ -36,7 +36,7 @@ #include #include -#include "klocale.h" +#include "tdelocale.h" #include "tdesocketaddress.h" #include "netsupp.h" diff --git a/tdecore/network/tdesocketbase.cpp b/tdecore/network/tdesocketbase.cpp index 0eb31bbc1..66decb15d 100644 --- a/tdecore/network/tdesocketbase.cpp +++ b/tdecore/network/tdesocketbase.cpp @@ -24,7 +24,7 @@ #include #include -#include "klocale.h" +#include "tdelocale.h" #include "tdesocketbase.h" #include "tdesocketdevice.h" diff --git a/tdecore/networkbackends/network-manager/network-manager_p.h b/tdecore/networkbackends/network-manager/network-manager_p.h index 474f628bb..0e1fe4de8 100644 --- a/tdecore/networkbackends/network-manager/network-manager_p.h +++ b/tdecore/networkbackends/network-manager/network-manager_p.h @@ -27,7 +27,7 @@ /* TDE headers */ #include -#include +#include /* TQDbus headers */ #include diff --git a/tdecore/tde-config.cpp.cmake b/tdecore/tde-config.cpp.cmake index 98481cefe..36e752f33 100644 --- a/tdecore/tde-config.cpp.cmake +++ b/tdecore/tde-config.cpp.cmake @@ -1,11 +1,11 @@ // -*- c++ -*- #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdecore/tde-config.cpp.in b/tdecore/tde-config.cpp.in index ac49e5c41..f86e5f5db 100644 --- a/tdecore/tde-config.cpp.in +++ b/tdecore/tde-config.cpp.in @@ -1,11 +1,11 @@ // -*- c++ -*- #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdecore/tdeaboutdata.h b/tdecore/tdeaboutdata.h index d5addac0a..db76287f2 100644 --- a/tdecore/tdeaboutdata.h +++ b/tdecore/tdeaboutdata.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #ifndef _KABOUTDATA_H_ #define _KABOUTDATA_H_ diff --git a/tdecore/tdeaccel.cpp b/tdecore/tdeaccel.cpp index e019baafc..5430c2529 100644 --- a/tdecore/tdeaccel.cpp +++ b/tdecore/tdeaccel.cpp @@ -29,7 +29,7 @@ #include "tdeaccelbase.h" #include #include -#include +#include #include #include "tdeaccelprivate.h" diff --git a/tdecore/tdeaccelaction.cpp b/tdecore/tdeaccelaction.cpp index 93f17ae25..89d8efaa2 100644 --- a/tdecore/tdeaccelaction.cpp +++ b/tdecore/tdeaccelaction.cpp @@ -28,9 +28,9 @@ #include #include "kckey.h" #include -#include +#include #include -#include +#include #include //--------------------------------------------------------------------- diff --git a/tdecore/tdeaccelbase.cpp b/tdecore/tdeaccelbase.cpp index 434801f61..6673cabb4 100644 --- a/tdecore/tdeaccelbase.cpp +++ b/tdecore/tdeaccelbase.cpp @@ -29,10 +29,10 @@ #include #include "kckey.h" #include -#include +#include #include #include "kkeyserver.h" -#include +#include #include "tdeshortcutmenu.h" //--------------------------------------------------------------------- diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp index 24c77826b..58b010e4e 100644 --- a/tdecore/tdeapplication.cpp +++ b/tdecore/tdeapplication.cpp @@ -61,10 +61,10 @@ #include #endif -#include +#include #include #include -#include +#include #include #include #include @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include #include @@ -89,7 +89,7 @@ #include #if defined Q_WS_X11 -#include +#include #endif #include diff --git a/tdecore/tdecmdlineargs.cpp b/tdecore/tdecmdlineargs.cpp index ad24467e2..46d1b9f4a 100644 --- a/tdecore/tdecmdlineargs.cpp +++ b/tdecore/tdecmdlineargs.cpp @@ -37,9 +37,9 @@ #include "tdecmdlineargs.h" #include -#include +#include #include -#include +#include #include #include diff --git a/tdecore/tdeconfig.cpp b/tdecore/tdeconfig.cpp index 35c5b73bc..68307dc85 100644 --- a/tdecore/tdeconfig.cpp +++ b/tdecore/tdeconfig.cpp @@ -36,7 +36,7 @@ #include "tdeconfigbackend.h" #include "tdeconfig.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "kstaticdeleter.h" #include diff --git a/tdecore/tdeconfig_compiler/example/autoexample.cpp b/tdecore/tdeconfig_compiler/example/autoexample.cpp index e25219787..6085fa6eb 100644 --- a/tdecore/tdeconfig_compiler/example/autoexample.cpp +++ b/tdecore/tdeconfig_compiler/example/autoexample.cpp @@ -27,9 +27,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdecore/tdeconfig_compiler/example/example.cpp b/tdecore/tdeconfig_compiler/example/example.cpp index c08339d4a..157570d98 100644 --- a/tdecore/tdeconfig_compiler/example/example.cpp +++ b/tdecore/tdeconfig_compiler/example/example.cpp @@ -24,9 +24,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp index 753bae532..207a78402 100644 --- a/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp +++ b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -1151,7 +1151,7 @@ int main( int argc, char **argv ) if ( headerIncludes.count() > 0 ) h << endl; if ( !singleton && cfgFileNameArg && parameters.isEmpty() ) - h << "#include " << endl; + h << "#include " << endl; h << "#include " << endl; h << "#include " << endl << endl; @@ -1421,7 +1421,7 @@ int main( int argc, char **argv ) cpp << "#include \"" << headerFileName << "\"" << endl << endl; - if ( setUserTexts ) cpp << "#include " << endl << endl; + if ( setUserTexts ) cpp << "#include " << endl << endl; // Header required by singleton implementation if ( singleton ) diff --git a/tdecore/tdeconfig_compiler/tests/test2.cpp.ref b/tdecore/tdeconfig_compiler/tests/test2.cpp.ref index cc3f67b5e..e66c5b9da 100644 --- a/tdecore/tdeconfig_compiler/tests/test2.cpp.ref +++ b/tdecore/tdeconfig_compiler/tests/test2.cpp.ref @@ -3,7 +3,7 @@ #include "test2.h" -#include +#include Test2::Test2( ) : MyPrefs( TQString::fromLatin1( "korganizerrc" ) ) diff --git a/tdecore/tdeconfig_compiler/tests/test8a.h.ref b/tdecore/tdeconfig_compiler/tests/test8a.h.ref index 88686ca1b..a1e5b7e37 100644 --- a/tdecore/tdeconfig_compiler/tests/test8a.h.ref +++ b/tdecore/tdeconfig_compiler/tests/test8a.h.ref @@ -3,7 +3,7 @@ #ifndef TEST8A_H #define TEST8A_H -#include +#include #include #include diff --git a/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref b/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref index 5aad12fe8..b3fde4334 100644 --- a/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref +++ b/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref @@ -3,7 +3,7 @@ #include "test_dpointer.h" -#include +#include #include diff --git a/tdecore/tdeconfigbackend.cpp b/tdecore/tdeconfigbackend.cpp index d050a2efe..6d5197ff7 100644 --- a/tdecore/tdeconfigbackend.cpp +++ b/tdecore/tdeconfigbackend.cpp @@ -42,9 +42,9 @@ #include "tdeconfigbackend.h" #include "tdeconfigbase.h" #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdecore/tdeconfigbackend.h b/tdecore/tdeconfigbackend.h index 71ba15288..83c8047bc 100644 --- a/tdecore/tdeconfigbackend.h +++ b/tdecore/tdeconfigbackend.h @@ -25,7 +25,7 @@ #include "tdeconfigdata.h" #include #include -#include +#include #include "tdelibs_export.h" class TQFile; diff --git a/tdecore/tdeconfigbase.cpp b/tdecore/tdeconfigbase.cpp index 668a688d8..a3b15185b 100644 --- a/tdecore/tdeconfigbase.cpp +++ b/tdecore/tdeconfigbase.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include "tdeconfigbase.h" diff --git a/tdecore/tdeconfigdialogmanager.cpp b/tdecore/tdeconfigdialogmanager.cpp index dfabefb59..9578c05c1 100644 --- a/tdecore/tdeconfigdialogmanager.cpp +++ b/tdecore/tdeconfigdialogmanager.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include diff --git a/tdecore/tdeconfigskeleton.cpp b/tdecore/tdeconfigskeleton.cpp index 1abaf388b..45a4b4112 100644 --- a/tdecore/tdeconfigskeleton.cpp +++ b/tdecore/tdeconfigskeleton.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include "kstringhandler.h" diff --git a/tdecore/tdeconfigskeleton.h b/tdecore/tdeconfigskeleton.h index ccbf4529b..b260db1e8 100644 --- a/tdecore/tdeconfigskeleton.h +++ b/tdecore/tdeconfigskeleton.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include /** * @short Class for storing a preferences setting diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index 263bc5507..60f3efde9 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -23,10 +23,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp index 2705343f7..2682aa991 100644 --- a/tdecore/tdenetworkconnections.cpp +++ b/tdecore/tdenetworkconnections.cpp @@ -23,7 +23,7 @@ #include -#include +#include // #define DEBUG_SIGNAL_QUEUE 1 diff --git a/tdecore/tdeshortcut.cpp b/tdecore/tdeshortcut.cpp index 33797b0bc..bae897e98 100644 --- a/tdecore/tdeshortcut.cpp +++ b/tdecore/tdeshortcut.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include //---------------------------------------------------- diff --git a/tdecore/tdeshortcutlist.cpp b/tdecore/tdeshortcutlist.cpp index 645e69565..ffacd001c 100644 --- a/tdecore/tdeshortcutlist.cpp +++ b/tdecore/tdeshortcutlist.cpp @@ -5,7 +5,7 @@ #include "tdeaccelaction.h" #include #include -#include +#include #include #include #include diff --git a/tdecore/tdeshortcutmenu.cpp b/tdecore/tdeshortcutmenu.cpp index 91061a734..c035c0df9 100644 --- a/tdecore/tdeshortcutmenu.cpp +++ b/tdecore/tdeshortcutmenu.cpp @@ -23,7 +23,7 @@ #include "tdeaccelaction.h" #include -#include +#include #include "tdeshortcutmenu.h" //#include diff --git a/tdecore/tdestdaccel.cpp b/tdecore/tdestdaccel.cpp index f91d2ee66..ba3e64ca5 100644 --- a/tdecore/tdestdaccel.cpp +++ b/tdecore/tdestdaccel.cpp @@ -25,8 +25,8 @@ #include "tdeaccelbase.h" #include #include -#include -#include +#include +#include #include #include diff --git a/tdecore/tdesycoca.cpp b/tdecore/tdesycoca.cpp index 16914c0bc..8f5ede967 100644 --- a/tdecore/tdesycoca.cpp +++ b/tdecore/tdesycoca.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am index 2911d3ab8..a831eb65c 100644 --- a/tdecore/tests/Makefile.am +++ b/tdecore/tests/Makefile.am @@ -41,7 +41,7 @@ LDADD = ../libtdecore.la tdeconfigtestgui_SOURCES = tdeconfigtestgui.cpp kdebugtest_SOURCES = kdebugtest.cpp klocaletest_SOURCES = klocaletest.cpp -#klocaletest2_SOURCES = klocaletest2.cpp klocale.cpp libintl.cpp kcatalogue.cpp +#klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp #kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp kurltest_SOURCES = kurltest.cpp diff --git a/tdecore/tests/kapptest.cpp b/tdecore/tests/kapptest.cpp index 0952f292c..6a3abace9 100644 --- a/tdecore/tests/kapptest.cpp +++ b/tdecore/tests/kapptest.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include int diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp index 12c9010e2..7dc2cc6d7 100644 --- a/tdecore/tests/kcalendartest.cpp +++ b/tdecore/tests/kcalendartest.cpp @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include class TDELocale; diff --git a/tdecore/tests/kcmdlineargstest.cpp b/tdecore/tests/kcmdlineargstest.cpp index 8148e4208..5213e443f 100644 --- a/tdecore/tests/kcmdlineargstest.cpp +++ b/tdecore/tests/kcmdlineargstest.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/tdecore/tests/kglobaltest.cpp b/tdecore/tests/kglobaltest.cpp index eaab091f9..852e2ba34 100644 --- a/tdecore/tests/kglobaltest.cpp +++ b/tdecore/tests/kglobaltest.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 0647a10d3..36f301d6c 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -11,9 +11,9 @@ #include #include -#include -#include -#include "klocale.h" +#include +#include +#include "tdelocale.h" #include #include #include diff --git a/tdecore/tests/kmdcodectest.cpp b/tdecore/tests/kmdcodectest.cpp index bd3162f52..571d3f10b 100644 --- a/tdecore/tests/kmdcodectest.cpp +++ b/tdecore/tests/kmdcodectest.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp index 6ef0fe5e5..94358a8f1 100644 --- a/tdecore/tests/krfcdatetest.cpp +++ b/tdecore/tests/krfcdatetest.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp index 01a9c4c3a..a1ce8f86b 100644 --- a/tdecore/tests/ksocktest.cpp +++ b/tdecore/tests/ksocktest.cpp @@ -17,7 +17,7 @@ */ #include "kuniqueapplication.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kdebug.h" #include "ksock.h" #include "ksockaddr.h" diff --git a/tdecore/tests/ktempfiletest.cpp b/tdecore/tests/ktempfiletest.cpp index 20cd6b36d..5c2354fff 100644 --- a/tdecore/tests/ktempfiletest.cpp +++ b/tdecore/tests/ktempfiletest.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ -#include "ktempfile.h" +#include "tdetempfile.h" #include "tdeapplication.h" #include "kstandarddirs.h" #include diff --git a/tdecore/tests/kuniqueapptest.cpp b/tdecore/tests/kuniqueapptest.cpp index 60ac98b5a..13b8ca534 100644 --- a/tdecore/tests/kuniqueapptest.cpp +++ b/tdecore/tests/kuniqueapptest.cpp @@ -17,7 +17,7 @@ */ #include "kuniqueapplication.h" -#include "kglobalsettings.h" +#include "tdeglobalsettings.h" #include #include diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp index 6694d0d80..0f57dd97c 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdecore/tests/startserviceby.cpp b/tdecore/tests/startserviceby.cpp index 20fc95f34..67c535cec 100644 --- a/tdecore/tests/startserviceby.cpp +++ b/tdecore/tests/startserviceby.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include int diff --git a/tdecore/tests/testqtargs.cpp b/tdecore/tests/testqtargs.cpp index 8383f930e..d69b3f6f4 100644 --- a/tdecore/tests/testqtargs.cpp +++ b/tdecore/tests/testqtargs.cpp @@ -46,7 +46,7 @@ application palette (light and dark shades are\ncalculated)."), 0}, #include #include #include -#include +#include static const TDECmdLineOptions options[] = { diff --git a/tdecore/twin.cpp b/tdecore/twin.cpp index 93352dacc..e96c25011 100644 --- a/tdecore/twin.cpp +++ b/tdecore/twin.cpp @@ -37,16 +37,16 @@ #include "twin.h" #include "tdeapplication.h" -#include +#include #include #include #include -#include +#include #include #include #ifdef Q_WS_X11 -#include +#include #include #include diff --git a/tdecore/twinmodule.cpp b/tdecore/twinmodule.cpp index 27b8b0cdd..a37370e58 100644 --- a/tdecore/twinmodule.cpp +++ b/tdecore/twinmodule.cpp @@ -30,7 +30,7 @@ #include "kdebug.h" #include #include -#include +#include #include #include "netwm.h" diff --git a/tdefile-plugins/elf/tdefile_elf.cpp b/tdefile-plugins/elf/tdefile_elf.cpp index cad269713..7308a40d1 100644 --- a/tdefile-plugins/elf/tdefile_elf.cpp +++ b/tdefile-plugins/elf/tdefile_elf.cpp @@ -21,7 +21,7 @@ #include "tdefile_elf.h" #include -#include +#include #include #include #include diff --git a/tdehtml/css/csshelper.cpp b/tdehtml/css/csshelper.cpp index 02b5b3d39..a6ea9c38b 100644 --- a/tdehtml/css/csshelper.cpp +++ b/tdehtml/css/csshelper.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "rendering/render_style.h" diff --git a/tdehtml/css/cssparser.cpp b/tdehtml/css/cssparser.cpp index b33151b59..8b11c78d2 100644 --- a/tdehtml/css/cssparser.cpp +++ b/tdehtml/css/cssparser.cpp @@ -26,7 +26,7 @@ #define YYDEBUG 0 #include -#include +#include #include #include "cssparser.h" diff --git a/tdehtml/css/cssstyleselector.cpp b/tdehtml/css/cssstyleselector.cpp index 2a1fb5477..79f8ba251 100644 --- a/tdehtml/css/cssstyleselector.cpp +++ b/tdehtml/css/cssstyleselector.cpp @@ -57,7 +57,7 @@ using namespace DOM; #include #include -#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp index f1b2b430d..b7bd23de3 100644 --- a/tdehtml/ecma/kjs_debugwin.cpp +++ b/tdehtml/ecma/kjs_debugwin.cpp @@ -41,17 +41,17 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_html.cpp b/tdehtml/ecma/kjs_html.cpp index 8a63ba943..abd059e75 100644 --- a/tdehtml/ecma/kjs_html.cpp +++ b/tdehtml/ecma/kjs_html.cpp @@ -56,9 +56,9 @@ #include "rendering/render_frames.h" #include "rendering/render_layer.h" -#include "kmessagebox.h" +#include "tdemessagebox.h" #include -#include +#include #include diff --git a/tdehtml/ecma/kjs_mozilla.cpp b/tdehtml/ecma/kjs_mozilla.cpp index 6fc7688dd..d26aabb5e 100644 --- a/tdehtml/ecma/kjs_mozilla.cpp +++ b/tdehtml/ecma/kjs_mozilla.cpp @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include #include "kjs_mozilla.h" diff --git a/tdehtml/ecma/kjs_navigator.cpp b/tdehtml/ecma/kjs_navigator.cpp index 03bc22987..296290744 100644 --- a/tdehtml/ecma/kjs_navigator.cpp +++ b/tdehtml/ecma/kjs_navigator.cpp @@ -21,13 +21,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_proxy.cpp b/tdehtml/ecma/kjs_proxy.cpp index 578cd30f0..bdd7183fe 100644 --- a/tdehtml/ecma/kjs_proxy.cpp +++ b/tdehtml/ecma/kjs_proxy.cpp @@ -38,10 +38,10 @@ #include "xml/dom_nodeimpl.h" #include "tdehtmlpart_p.h" #include -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_window.cpp b/tdehtml/ecma/kjs_window.cpp index 1d38de27e..554781cb9 100644 --- a/tdehtml/ecma/kjs_window.cpp +++ b/tdehtml/ecma/kjs_window.cpp @@ -36,9 +36,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ #ifndef KONQ_EMBEDDED #include #endif -#include +#include #include #include #include diff --git a/tdehtml/html/dtd.cpp b/tdehtml/html/dtd.cpp index accc8b855..d3ea86d51 100644 --- a/tdehtml/html/dtd.cpp +++ b/tdehtml/html/dtd.cpp @@ -26,7 +26,7 @@ using namespace DOM; #include -#include +#include // priority of tags. Closing tags of higher priority close tags of lower // priority. diff --git a/tdehtml/html/html_documentimpl.cpp b/tdehtml/html/html_documentimpl.cpp index e4f090973..52ada7a7b 100644 --- a/tdehtml/html/html_documentimpl.cpp +++ b/tdehtml/html/html_documentimpl.cpp @@ -47,9 +47,9 @@ #include #include #include -#include +#include #include -#include +#include #include "css/cssproperties.h" #include "css/cssstyleselector.h" diff --git a/tdehtml/html/html_elementimpl.cpp b/tdehtml/html/html_elementimpl.cpp index 1153e8b7f..fc116caf3 100644 --- a/tdehtml/html/html_elementimpl.cpp +++ b/tdehtml/html/html_elementimpl.cpp @@ -50,7 +50,7 @@ #include "xml/dom2_eventsimpl.h" #include -#include +#include #include "html_elementimpl.h" using namespace DOM; diff --git a/tdehtml/html/html_formimpl.cpp b/tdehtml/html/html_formimpl.cpp index 372904e0e..6fae233dd 100644 --- a/tdehtml/html/html_formimpl.cpp +++ b/tdehtml/html/html_formimpl.cpp @@ -47,12 +47,12 @@ #include "rendering/render_form.h" #include -#include +#include #include #include -#include +#include #include -#include +#include #ifndef TDEHTML_NO_WALLET #include #endif diff --git a/tdehtml/html/html_imageimpl.cpp b/tdehtml/html/html_imageimpl.cpp index b1972aad4..a006b3bd0 100644 --- a/tdehtml/html/html_imageimpl.cpp +++ b/tdehtml/html/html_imageimpl.cpp @@ -29,7 +29,7 @@ #include "tdehtml_part.h" #include -#include +#include #include #include "rendering/render_image.h" diff --git a/tdehtml/html/html_tableimpl.cpp b/tdehtml/html/html_tableimpl.cpp index 71fe14773..f14ad8583 100644 --- a/tdehtml/html/html_tableimpl.cpp +++ b/tdehtml/html/html_tableimpl.cpp @@ -43,7 +43,7 @@ #include "rendering/render_table.h" #include -#include +#include using namespace tdehtml; using namespace DOM; diff --git a/tdehtml/html/htmlparser.cpp b/tdehtml/html/htmlparser.cpp index f7cc1daaf..31d3d4c17 100644 --- a/tdehtml/html/htmlparser.cpp +++ b/tdehtml/html/htmlparser.cpp @@ -56,7 +56,7 @@ #include "html/htmlparser.h" #include -#include +#include using namespace DOM; using namespace tdehtml; diff --git a/tdehtml/html/htmltokenizer.cpp b/tdehtml/html/htmltokenizer.cpp index 62d3ffab6..292d1773d 100644 --- a/tdehtml/html/htmltokenizer.cpp +++ b/tdehtml/html/htmltokenizer.cpp @@ -50,7 +50,7 @@ #include "css/csshelper.h" #include "ecma/kjs_proxy.h" #include -#include +#include #include #include #include diff --git a/tdehtml/java/kjavaapplet.cpp b/tdehtml/java/kjavaapplet.cpp index 70a39afbc..a28e541e2 100644 --- a/tdehtml/java/kjavaapplet.cpp +++ b/tdehtml/java/kjavaapplet.cpp @@ -22,7 +22,7 @@ #include "kjavaappletwidget.h" #include "kjavaappletcontext.h" -#include +#include #include #include diff --git a/tdehtml/java/kjavaappletcontext.cpp b/tdehtml/java/kjavaappletcontext.cpp index 76914a5dc..b644b67ca 100644 --- a/tdehtml/java/kjavaappletcontext.cpp +++ b/tdehtml/java/kjavaappletcontext.cpp @@ -23,8 +23,8 @@ #include "kjavaappletserver.h" #include "kjavaprocess.h" #include "kjavaapplet.h" -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/java/kjavaappletserver.cpp b/tdehtml/java/kjavaappletserver.cpp index 5d108ffcf..952fe143b 100644 --- a/tdehtml/java/kjavaappletserver.cpp +++ b/tdehtml/java/kjavaappletserver.cpp @@ -27,13 +27,13 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/java/kjavaappletviewer.cpp b/tdehtml/java/kjavaappletviewer.cpp index 5d5b47fbf..f80690aa9 100644 --- a/tdehtml/java/kjavaappletviewer.cpp +++ b/tdehtml/java/kjavaappletviewer.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/java/kjavaappletwidget.cpp b/tdehtml/java/kjavaappletwidget.cpp index c096261cd..a1f5b8f11 100644 --- a/tdehtml/java/kjavaappletwidget.cpp +++ b/tdehtml/java/kjavaappletwidget.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include diff --git a/tdehtml/java/kjavaprocess.cpp b/tdehtml/java/kjavaprocess.cpp index 1ff68dd74..6b505c343 100644 --- a/tdehtml/java/kjavaprocess.cpp +++ b/tdehtml/java/kjavaprocess.cpp @@ -22,7 +22,7 @@ #include "kjavaprocess.h" #include -#include +#include #include #include diff --git a/tdehtml/misc/arena.cpp b/tdehtml/misc/arena.cpp index cfbce24ab..e2513ba36 100644 --- a/tdehtml/misc/arena.cpp +++ b/tdehtml/misc/arena.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "arena.h" #ifdef HAVE_GETPAGESIZE diff --git a/tdehtml/misc/decoder.cpp b/tdehtml/misc/decoder.cpp index 6000aa9cf..28c8a5e9d 100644 --- a/tdehtml/misc/decoder.cpp +++ b/tdehtml/misc/decoder.cpp @@ -39,12 +39,12 @@ using namespace tdehtml; #include #include -#include +#include #include #include #include -#include +#include diff --git a/tdehtml/misc/htmlhashes.cpp b/tdehtml/misc/htmlhashes.cpp index e073f0964..376007819 100644 --- a/tdehtml/misc/htmlhashes.cpp +++ b/tdehtml/misc/htmlhashes.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include "htmlhashes.h" #include "htmltags.c" diff --git a/tdehtml/misc/htmltags.h b/tdehtml/misc/htmltags.h index d8fbb3236..bf9a8ded8 100644 --- a/tdehtml/misc/htmltags.h +++ b/tdehtml/misc/htmltags.h @@ -5,7 +5,7 @@ #define TDEHTML_TAGS_H #include "dom/dom_string.h" -#include +#include KDE_NO_EXPORT const char* getTagName(unsigned short id); diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp index 0edcc34ea..b8b94cd6b 100644 --- a/tdehtml/misc/knsplugininstaller.cpp +++ b/tdehtml/misc/knsplugininstaller.cpp @@ -24,11 +24,11 @@ #include "knsplugininstaller.moc" #include -#include +#include #include -#include +#include #include -#include +#include #include #include diff --git a/tdehtml/misc/loader.cpp b/tdehtml/misc/loader.cpp index b7f42aa29..7621b5e4f 100644 --- a/tdehtml/misc/loader.cpp +++ b/tdehtml/misc/loader.cpp @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include #include @@ -71,7 +71,7 @@ #ifdef IMAGE_TITLES #include #include -#include +#include #endif #include "html/html_documentimpl.h" diff --git a/tdehtml/misc/loader_jpeg.cpp b/tdehtml/misc/loader_jpeg.cpp index 72816817f..9ee5378f9 100644 --- a/tdehtml/misc/loader_jpeg.cpp +++ b/tdehtml/misc/loader_jpeg.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include extern "C" { #define XMD_H diff --git a/tdehtml/misc/maketags b/tdehtml/misc/maketags index b2b472892..8a6abf0ed 100644 --- a/tdehtml/misc/maketags +++ b/tdehtml/misc/maketags @@ -41,7 +41,7 @@ print header < +#include KDE_NO_EXPORT const char* getTagName(unsigned short id); diff --git a/tdehtml/rendering/font.cpp b/tdehtml/rendering/font.cpp index b7632fc8d..c70073940 100644 --- a/tdehtml/rendering/font.cpp +++ b/tdehtml/rendering/font.cpp @@ -33,7 +33,7 @@ #include "tdehtml_settings.h" #include -#include +#include #include #include diff --git a/tdehtml/rendering/render_applet.cpp b/tdehtml/rendering/render_applet.cpp index d14a93553..eb9762897 100644 --- a/tdehtml/rendering/render_applet.cpp +++ b/tdehtml/rendering/render_applet.cpp @@ -20,7 +20,7 @@ * */ #include -#include +#include #include diff --git a/tdehtml/rendering/render_body.cpp b/tdehtml/rendering/render_body.cpp index 80a613000..820b1b872 100644 --- a/tdehtml/rendering/render_body.cpp +++ b/tdehtml/rendering/render_body.cpp @@ -25,7 +25,7 @@ #include "xml/dom_docimpl.h" #include "tdehtmlview.h" -#include +#include #include using namespace tdehtml; diff --git a/tdehtml/rendering/render_box.cpp b/tdehtml/rendering/render_box.cpp index d138d3ee2..85e1f6665 100644 --- a/tdehtml/rendering/render_box.cpp +++ b/tdehtml/rendering/render_box.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include diff --git a/tdehtml/rendering/render_canvas.cpp b/tdehtml/rendering/render_canvas.cpp index a3dc548b2..862f374b2 100644 --- a/tdehtml/rendering/render_canvas.cpp +++ b/tdehtml/rendering/render_canvas.cpp @@ -29,7 +29,7 @@ #include "tdehtmlview.h" #include "tdehtml_part.h" #include -#include +#include using namespace tdehtml; diff --git a/tdehtml/rendering/render_flow.cpp b/tdehtml/rendering/render_flow.cpp index 272ceb2db..a535b218e 100644 --- a/tdehtml/rendering/render_flow.cpp +++ b/tdehtml/rendering/render_flow.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "rendering/render_flow.h" #include "rendering/render_text.h" diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 89f38a7b2..9d302bfc8 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -30,8 +30,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/rendering/render_frames.cpp b/tdehtml/rendering/render_frames.cpp index 12d0d75ec..68c66495a 100644 --- a/tdehtml/rendering/render_frames.cpp +++ b/tdehtml/rendering/render_frames.cpp @@ -39,9 +39,9 @@ #include "misc/knsplugininstaller.h" #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdehtml/rendering/render_image.cpp b/tdehtml/rendering/render_image.cpp index b41911e3a..ad8f18bb3 100644 --- a/tdehtml/rendering/render_image.cpp +++ b/tdehtml/rendering/render_image.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include "css/csshelper.h" #include "misc/helper.h" diff --git a/tdehtml/rendering/render_inline.cpp b/tdehtml/rendering/render_inline.cpp index aee43a817..15bc1b0df 100644 --- a/tdehtml/rendering/render_inline.cpp +++ b/tdehtml/rendering/render_inline.cpp @@ -23,7 +23,7 @@ * */ -#include +#include #include "rendering/render_arena.h" #include "rendering/render_inline.h" diff --git a/tdehtml/rendering/render_line.cpp b/tdehtml/rendering/render_line.cpp index b518d3a43..d8bc8d0e2 100644 --- a/tdehtml/rendering/render_line.cpp +++ b/tdehtml/rendering/render_line.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "rendering/render_flow.h" #include "rendering/render_text.h" diff --git a/tdehtml/rendering/render_list.cpp b/tdehtml/rendering/render_list.cpp index 5af983a72..cc9ba4e5b 100644 --- a/tdehtml/rendering/render_list.cpp +++ b/tdehtml/rendering/render_list.cpp @@ -35,7 +35,7 @@ #include "xml/dom_docimpl.h" #include -#include +#include #include //#define BOX_DEBUG diff --git a/tdehtml/rendering/render_object.cpp b/tdehtml/rendering/render_object.cpp index 1d16057a2..a979e1dc1 100644 --- a/tdehtml/rendering/render_object.cpp +++ b/tdehtml/rendering/render_object.cpp @@ -45,7 +45,7 @@ #include "misc/loader.h" #include -#include +#include #include #include "tdehtmlview.h" #include diff --git a/tdehtml/rendering/render_object.h b/tdehtml/rendering/render_object.h index 8d066201c..bf120ff84 100644 --- a/tdehtml/rendering/render_object.h +++ b/tdehtml/rendering/render_object.h @@ -32,7 +32,7 @@ #include #include -#include +#include #include "xml/dom_docimpl.h" #include "misc/tdehtmllayout.h" diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp index 5a96d06f0..2d991c3a2 100644 --- a/tdehtml/rendering/render_replaced.cpp +++ b/tdehtml/rendering/render_replaced.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdehtml/rendering/render_table.cpp b/tdehtml/rendering/render_table.cpp index 8a75c73f2..9f2cc3366 100644 --- a/tdehtml/rendering/render_table.cpp +++ b/tdehtml/rendering/render_table.cpp @@ -40,7 +40,7 @@ #include "rendering/render_line.h" #include "xml/dom_docimpl.h" -#include +#include #include #include diff --git a/tdehtml/rendering/render_text.cpp b/tdehtml/rendering/render_text.cpp index d125b04c6..411f3f221 100644 --- a/tdehtml/rendering/render_text.cpp +++ b/tdehtml/rendering/render_text.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/rendering/table_layout.cpp b/tdehtml/rendering/table_layout.cpp index eb8153331..97a6a4c91 100644 --- a/tdehtml/rendering/table_layout.cpp +++ b/tdehtml/rendering/table_layout.cpp @@ -23,7 +23,7 @@ #include "table_layout.h" #include "render_table.h" -#include +#include using namespace tdehtml; diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp index 3cc65676d..b7dfb8a42 100644 --- a/tdehtml/tdehtml_ext.cpp +++ b/tdehtml/tdehtml_ext.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/tdehtml_factory.cpp b/tdehtml/tdehtml_factory.cpp index b52476ea1..4094030c6 100644 --- a/tdehtml/tdehtml_factory.cpp +++ b/tdehtml/tdehtml_factory.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include diff --git a/tdehtml/tdehtml_pagecache.cpp b/tdehtml/tdehtml_pagecache.cpp index c2e0a89e1..319dd8162 100644 --- a/tdehtml/tdehtml_pagecache.cpp +++ b/tdehtml/tdehtml_pagecache.cpp @@ -21,7 +21,7 @@ #include "tdehtml_pagecache.h" #include -#include +#include #include #include diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index c4bba759c..28b15c7d1 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -78,18 +78,18 @@ using namespace DOM; #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/tdehtml_printsettings.cpp b/tdehtml/tdehtml_printsettings.cpp index 251c3403f..19fe7bdbf 100644 --- a/tdehtml/tdehtml_printsettings.cpp +++ b/tdehtml/tdehtml_printsettings.cpp @@ -19,7 +19,7 @@ #include "tdehtml_printsettings.h" -#include +#include #include #include #include diff --git a/tdehtml/tdehtml_run.cpp b/tdehtml/tdehtml_run.cpp index 2a5fd1861..499616cce 100644 --- a/tdehtml/tdehtml_run.cpp +++ b/tdehtml/tdehtml_run.cpp @@ -24,7 +24,7 @@ #include "tdehtml_run.h" #include #include -#include +#include #include "tdehtml_ext.h" #include diff --git a/tdehtml/tdehtml_settings.cc b/tdehtml/tdehtml_settings.cc index 8e36f5891..7f799e311 100644 --- a/tdehtml/tdehtml_settings.cc +++ b/tdehtml/tdehtml_settings.cc @@ -21,14 +21,14 @@ #include "tdehtml_settings.h" #include "tdehtmldefaults.h" -#include +#include #include -#include -#include +#include +#include #include #include #include -#include +#include /** * @internal diff --git a/tdehtml/tdehtmlimage.cpp b/tdehtml/tdehtmlimage.cpp index bf05d8495..31311cb3d 100644 --- a/tdehtml/tdehtmlimage.cpp +++ b/tdehtml/tdehtmlimage.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include K_EXPORT_COMPONENT_FACTORY( tdehtmlimagefactory /*NOT the part name, see Makefile.am*/, TDEHTMLImageFactory ) diff --git a/tdehtml/tdehtmlview.cpp b/tdehtml/tdehtmlview.cpp index 010075f2a..16b274cbd 100644 --- a/tdehtml/tdehtmlview.cpp +++ b/tdehtml/tdehtmlview.cpp @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/tdemultipart/tdemultipart.cpp b/tdehtml/tdemultipart/tdemultipart.cpp index dd864d65b..201f1ef60 100644 --- a/tdehtml/tdemultipart/tdemultipart.cpp +++ b/tdehtml/tdemultipart/tdemultipart.cpp @@ -22,11 +22,11 @@ #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp index 028fadc36..62842e086 100644 --- a/tdehtml/test_regression.cpp +++ b/tdehtml/test_regression.cpp @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdehtml/xml/dom_docimpl.cpp b/tdehtml/xml/dom_docimpl.cpp index 47836b41e..423a2a51e 100644 --- a/tdehtml/xml/dom_docimpl.cpp +++ b/tdehtml/xml/dom_docimpl.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include "rendering/counter_tree.h" @@ -60,7 +60,7 @@ #include "tdehtmlview.h" #include "tdehtml_part.h" -#include +#include #include #include #include "tdehtml_settings.h" diff --git a/tdehtml/xml/dom_nodeimpl.cpp b/tdehtml/xml/dom_nodeimpl.cpp index ac8ca630e..7e2e1bc5f 100644 --- a/tdehtml/xml/dom_nodeimpl.cpp +++ b/tdehtml/xml/dom_nodeimpl.cpp @@ -33,7 +33,7 @@ #include "xml/dom_nodeimpl.h" #include "xml/dom_restyler.h" -#include +#include #include #include "rendering/render_text.h" diff --git a/tdehtml/xml/xml_tokenizer.cpp b/tdehtml/xml/xml_tokenizer.cpp index 44f90673f..2ee90097b 100644 --- a/tdehtml/xml/xml_tokenizer.cpp +++ b/tdehtml/xml/xml_tokenizer.cpp @@ -36,7 +36,7 @@ #include "tdehtml_part.h" #include #include -#include +#include using namespace DOM; using namespace tdehtml; diff --git a/tdeio/bookmarks/kbookmark.cc b/tdeio/bookmarks/kbookmark.cc index e6bef2e02..8bbaa5e43 100644 --- a/tdeio/bookmarks/kbookmark.cc +++ b/tdeio/bookmarks/kbookmark.cc @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkexporter.cc b/tdeio/bookmarks/kbookmarkexporter.cc index 30c52bdb8..ee33612a2 100644 --- a/tdeio/bookmarks/kbookmarkexporter.cc +++ b/tdeio/bookmarks/kbookmarkexporter.cc @@ -24,7 +24,7 @@ #include #include -#include +#include #include "kbookmarkmanager.h" #include "kbookmarkexporter.h" diff --git a/tdeio/bookmarks/kbookmarkimporter.cc b/tdeio/bookmarks/kbookmarkimporter.cc index 366802905..513f89b40 100644 --- a/tdeio/bookmarks/kbookmarkimporter.cc +++ b/tdeio/bookmarks/kbookmarkimporter.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_crash.cc b/tdeio/bookmarks/kbookmarkimporter_crash.cc index 0443b3b1c..9b0cacf25 100644 --- a/tdeio/bookmarks/kbookmarkimporter_crash.cc +++ b/tdeio/bookmarks/kbookmarkimporter_crash.cc @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_ie.cc b/tdeio/bookmarks/kbookmarkimporter_ie.cc index 092ebe596..d588517a3 100644 --- a/tdeio/bookmarks/kbookmarkimporter_ie.cc +++ b/tdeio/bookmarks/kbookmarkimporter_ie.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_kde1.cc b/tdeio/bookmarks/kbookmarkimporter_kde1.cc index 6aca22b84..95937f890 100644 --- a/tdeio/bookmarks/kbookmarkimporter_kde1.cc +++ b/tdeio/bookmarks/kbookmarkimporter_kde1.cc @@ -21,7 +21,7 @@ #include "kbookmarkimporter_kde1.h" #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_ns.cc b/tdeio/bookmarks/kbookmarkimporter_ns.cc index 8ce06a79b..29960ce51 100644 --- a/tdeio/bookmarks/kbookmarkimporter_ns.cc +++ b/tdeio/bookmarks/kbookmarkimporter_ns.cc @@ -25,7 +25,7 @@ #include "kbookmarkmanager.h" #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_opera.cc b/tdeio/bookmarks/kbookmarkimporter_opera.cc index 57b5d6208..0609c7a3b 100644 --- a/tdeio/bookmarks/kbookmarkimporter_opera.cc +++ b/tdeio/bookmarks/kbookmarkimporter_opera.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/bookmarks/kbookmarkmanager.cc b/tdeio/bookmarks/kbookmarkmanager.cc index 205d879ab..60d4f2932 100644 --- a/tdeio/bookmarks/kbookmarkmanager.cc +++ b/tdeio/bookmarks/kbookmarkmanager.cc @@ -29,9 +29,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkmenu.cc b/tdeio/bookmarks/kbookmarkmenu.cc index 0468bcd5a..e1b00bc40 100644 --- a/tdeio/bookmarks/kbookmarkmenu.cc +++ b/tdeio/bookmarks/kbookmarkmenu.cc @@ -32,8 +32,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkmenu.h b/tdeio/bookmarks/kbookmarkmenu.h index 0c1ebb27c..aeed441b0 100644 --- a/tdeio/bookmarks/kbookmarkmenu.h +++ b/tdeio/bookmarks/kbookmarkmenu.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include "kbookmark.h" diff --git a/tdeio/bookmarks/kbookmarkmenu_p.h b/tdeio/bookmarks/kbookmarkmenu_p.h index fc34e9029..b47af8ebf 100644 --- a/tdeio/bookmarks/kbookmarkmenu_p.h +++ b/tdeio/bookmarks/kbookmarkmenu_p.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include "kbookmark.h" diff --git a/tdeio/httpfilter/httpfilter.cc b/tdeio/httpfilter/httpfilter.cc index 21086d613..0f6a45790 100644 --- a/tdeio/httpfilter/httpfilter.cc +++ b/tdeio/httpfilter/httpfilter.cc @@ -19,7 +19,7 @@ #include -#include +#include #include "httpfilter.h" diff --git a/tdeio/kpasswdserver/kpasswdserver.cpp b/tdeio/kpasswdserver/kpasswdserver.cpp index 4986eb45a..cf4e0530c 100644 --- a/tdeio/kpasswdserver/kpasswdserver.cpp +++ b/tdeio/kpasswdserver/kpasswdserver.cpp @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/kssl/kssl.cc b/tdeio/kssl/kssl.cc index 66cc503d5..874da6aa6 100644 --- a/tdeio/kssl/kssl.cc +++ b/tdeio/kssl/kssl.cc @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #define sk_dup d->kossl->sk_dup diff --git a/tdeio/kssl/ksslcertdlg.cc b/tdeio/kssl/ksslcertdlg.cc index ea3c29556..26550e715 100644 --- a/tdeio/kssl/ksslcertdlg.cc +++ b/tdeio/kssl/ksslcertdlg.cc @@ -30,9 +30,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeio/kssl/ksslcertificate.cc b/tdeio/kssl/ksslcertificate.cc index e7310ccdc..1f95c3912 100644 --- a/tdeio/kssl/ksslcertificate.cc +++ b/tdeio/kssl/ksslcertificate.cc @@ -37,9 +37,9 @@ #include #include -#include +#include #include -#include +#include #include diff --git a/tdeio/kssl/ksslinfodlg.cc b/tdeio/kssl/ksslinfodlg.cc index 03a1300e8..7567b8595 100644 --- a/tdeio/kssl/ksslinfodlg.cc +++ b/tdeio/kssl/ksslinfodlg.cc @@ -31,11 +31,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeio/kssl/ksslkeygen.cc b/tdeio/kssl/ksslkeygen.cc index 93d6d2da4..654444994 100644 --- a/tdeio/kssl/ksslkeygen.cc +++ b/tdeio/kssl/ksslkeygen.cc @@ -25,12 +25,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include diff --git a/tdeio/kssl/ksslpemcallback.cc b/tdeio/kssl/ksslpemcallback.cc index 2dfbb9146..207949a0c 100644 --- a/tdeio/kssl/ksslpemcallback.cc +++ b/tdeio/kssl/ksslpemcallback.cc @@ -23,7 +23,7 @@ #endif #include -#include +#include #include "ksslpemcallback.h" int KSSLPemCallback(char *buf, int size, int rwflag, void *userdata) { diff --git a/tdeio/kssl/ksslpkcs12.cc b/tdeio/kssl/ksslpkcs12.cc index b8b23cf1c..9521e907b 100644 --- a/tdeio/kssl/ksslpkcs12.cc +++ b/tdeio/kssl/ksslpkcs12.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/kssl/ksslpkcs7.cc b/tdeio/kssl/ksslpkcs7.cc index 8db0000f0..cb66eb468 100644 --- a/tdeio/kssl/ksslpkcs7.cc +++ b/tdeio/kssl/ksslpkcs7.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/kssl/ksslsettings.cc b/tdeio/kssl/ksslsettings.cc index 9895a702b..fbf10b476 100644 --- a/tdeio/kssl/ksslsettings.cc +++ b/tdeio/kssl/ksslsettings.cc @@ -33,7 +33,7 @@ #include #include "ksslsettings.h" -#include +#include #include #include diff --git a/tdeio/kssl/ksslutils.cc b/tdeio/kssl/ksslutils.cc index 80651757f..444e5dd4a 100644 --- a/tdeio/kssl/ksslutils.cc +++ b/tdeio/kssl/ksslutils.cc @@ -22,8 +22,8 @@ #include "ksslutils.h" #include -#include -#include +#include +#include #include #include "kopenssl.h" diff --git a/tdeio/misc/kpac/discovery.cpp b/tdeio/misc/kpac/discovery.cpp index 4f33d1389..533c4fcca 100644 --- a/tdeio/misc/kpac/discovery.cpp +++ b/tdeio/misc/kpac/discovery.cpp @@ -41,7 +41,7 @@ #include -#include +#include #include #include diff --git a/tdeio/misc/kpac/downloader.cpp b/tdeio/misc/kpac/downloader.cpp index c94cc9b72..483e836cb 100644 --- a/tdeio/misc/kpac/downloader.cpp +++ b/tdeio/misc/kpac/downloader.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include "downloader.moc" diff --git a/tdeio/misc/kpac/proxyscout.cpp b/tdeio/misc/kpac/proxyscout.cpp index a010d328e..dfb682005 100644 --- a/tdeio/misc/kpac/proxyscout.cpp +++ b/tdeio/misc/kpac/proxyscout.cpp @@ -23,9 +23,9 @@ #include #include -#include +#include #include -#include +#include #include "proxyscout.moc" #include "discovery.h" diff --git a/tdeio/misc/kssld/kssld.cpp b/tdeio/misc/kssld/kssld.cpp index d41041636..d47845bbb 100644 --- a/tdeio/misc/kssld/kssld.cpp +++ b/tdeio/misc/kssld/kssld.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/misc/tdefile/fileprops.cpp b/tdeio/misc/tdefile/fileprops.cpp index df210fa4d..aa6590ef5 100644 --- a/tdeio/misc/tdefile/fileprops.cpp +++ b/tdeio/misc/tdefile/fileprops.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "fileprops.h" diff --git a/tdeio/misc/tdemailservice.cpp b/tdeio/misc/tdemailservice.cpp index 2d256c5c9..23066d633 100644 --- a/tdeio/misc/tdemailservice.cpp +++ b/tdeio/misc/tdemailservice.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include #include static const TDECmdLineOptions options[] = diff --git a/tdeio/misc/tdesendbugmail/main.cpp b/tdeio/misc/tdesendbugmail/main.cpp index aaffd3b65..32465039d 100644 --- a/tdeio/misc/tdesendbugmail/main.cpp +++ b/tdeio/misc/tdesendbugmail/main.cpp @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/misc/tdetelnetservice.cpp b/tdeio/misc/tdetelnetservice.cpp index 99260d8d0..bf175bdc9 100644 --- a/tdeio/misc/tdetelnetservice.cpp +++ b/tdeio/misc/tdetelnetservice.cpp @@ -22,10 +22,10 @@ // $Id$ #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/misc/tdewalletd/tdewalletd.cpp b/tdeio/misc/tdewalletd/tdewalletd.cpp index 364197b72..126f0ce2b 100644 --- a/tdeio/misc/tdewalletd/tdewalletd.cpp +++ b/tdeio/misc/tdewalletd/tdewalletd.cpp @@ -32,9 +32,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeio/misc/tdewalletd/tdewalletwizard.ui b/tdeio/misc/tdewalletd/tdewalletwizard.ui index aa3a1c09d..c31062c2a 100644 --- a/tdeio/misc/tdewalletd/tdewalletwizard.ui +++ b/tdeio/misc/tdewalletd/tdewalletwizard.ui @@ -531,7 +531,7 @@ tqcheckbox.h - klocale.h + tdelocale.h tdewalletwizard.ui.h diff --git a/tdeio/misc/uiserver.cpp b/tdeio/misc/uiserver.cpp index 107b57c64..c23628eae 100644 --- a/tdeio/misc/uiserver.cpp +++ b/tdeio/misc/uiserver.cpp @@ -31,12 +31,12 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/CMakeLists.txt b/tdeio/tdefile/CMakeLists.txt index a69cad536..ed0350999 100644 --- a/tdeio/tdefile/CMakeLists.txt +++ b/tdeio/tdefile/CMakeLists.txt @@ -31,7 +31,7 @@ include_directories( install( FILES tdefiledialog.h kencodingfiledialog.h - kdiroperator.h tdefileview.h tdefilefiltercombo.h + tdediroperator.h tdefileview.h tdefilefiltercombo.h tdefiledetailview.h kcombiview.h kdiskfreesp.h tdefileiconview.h tderecentdocument.h kurlrequester.h tdefilepreview.h tdefile.h @@ -56,7 +56,7 @@ set( target tdefile ) set( ${target}_SRCS tdefilefiltercombo.cpp tdefileview.cpp tdefileiconview.cpp - tderecentdocument.cpp tdefiledialog.cpp kdiroperator.cpp + tderecentdocument.cpp tdefiledialog.cpp tdediroperator.cpp tdefiledetailview.cpp kcombiview.cpp kurlrequester.cpp tdefilepreview.cpp kurlcombobox.cpp kurlrequesterdlg.cpp kopenwith.cpp kpropertiesdialog.cpp kicondialog.cpp diff --git a/tdeio/tdefile/ChangeLog b/tdeio/tdefile/ChangeLog index ccfb45ab5..229f9f2f8 100644 --- a/tdeio/tdefile/ChangeLog +++ b/tdeio/tdefile/ChangeLog @@ -1,6 +1,6 @@ Sat Feb 26 00:26:55 2000 Carsten Pfeiffer - * kdiroperator.cpp: + * tdediroperator.cpp: lottsa changes, e.g. action handling more clear now. fixed completed item not clearning the previous selection @@ -17,7 +17,7 @@ Sat Feb 26 00:26:55 2000 Carsten Pfeiffer Sun Feb 20 01:50:44 2000 Carsten Pfeiffer - * kdiroperator.*, tdefiledialog.* (saveConfig): + * tdediroperator.*, tdefiledialog.* (saveConfig): implemented loading, saving and applying configuration * tdefiledialog.cpp (setURL): @@ -37,7 +37,7 @@ Thu Feb 17 19:09:54 2000 Carsten Pfeiffer Added KDirComboBox and replaced the directory combobox with it. It even does something now :) Items need to be indented tho. - * tdefilereader.cpp, kdiroperator.{cpp,h}: + * tdefilereader.cpp, tdediroperator.{cpp,h}: fixed showHidden default Tue Feb 15 14:21:41 2000 Carsten Pfeiffer @@ -60,7 +60,7 @@ Tue Feb 15 14:21:41 2000 Carsten Pfeiffer added static methods for multiselection added getOpenURL(), getOpenURLs and getSaveURL() - * kdiroperator.cpp (setSorting): + * tdediroperator.cpp (setSorting): added setSorting() and sorting() to keep sorting when switching views a few cosmetic and TDEAction changes @@ -86,7 +86,7 @@ Fri Feb 11 12:17:59 2000 Carsten Pfeiffer Thu Feb 10 17:06:36 2000 Carsten Pfeiffer - * kdiroperator.cpp (connectView): + * tdediroperator.cpp (connectView): - Now that TDEToggleAction is fixed, I can commit the new stuff: Offer Actions for all the common functionality, i.e. sorting, setting the view, home(), cdUp(), back, forward, etc. @@ -107,7 +107,7 @@ Thu Feb 10 17:06:36 2000 Carsten Pfeiffer Thu Feb 10 12:59:29 2000 Carsten Pfeiffer - * kdiroperator.cpp (insertNewFiles): + * tdediroperator.cpp (insertNewFiles): aahhh, finally fixed that infinite loop in KFileView::mergeLists clear the view before calling view->addItemList( currentContents ); @@ -173,7 +173,7 @@ Sat Jan 29 15:33:37 2000 Carsten Pfeiffer * tdefileviewitem.cpp: - added time_t mTime() to enable sorting by modification time - * kdiroperator.cpp: + * tdediroperator.cpp: - offer sorting options in popupmenu - use checkAccess before creating directories. I guess this will again change when the new kio will be used, tho. diff --git a/tdeio/tdefile/Makefile.am b/tdeio/tdefile/Makefile.am index 4e6b76ce1..857e843c5 100644 --- a/tdeio/tdefile/Makefile.am +++ b/tdeio/tdefile/Makefile.am @@ -27,7 +27,7 @@ METASOURCES = AUTO #SUBDIRS = . acl_prop_page include_HEADERS = tdefiledialog.h kencodingfiledialog.h\ - kdiroperator.h tdefileview.h tdefilefiltercombo.h \ + tdediroperator.h tdefileview.h tdefilefiltercombo.h \ tdefiledetailview.h kcombiview.h kdiskfreesp.h \ tdefileiconview.h tderecentdocument.h \ kurlrequester.h tdefilepreview.h tdefile.h \ @@ -44,7 +44,7 @@ noinst_HEADERS = config-tdefile.h tderecentdirs.h kmetaprops.h \ libtdefile_la_SOURCES = \ tdefilefiltercombo.cpp \ tdefileview.cpp tdefileiconview.cpp \ - tderecentdocument.cpp tdefiledialog.cpp kdiroperator.cpp \ + tderecentdocument.cpp tdefiledialog.cpp tdediroperator.cpp \ tdefiledetailview.cpp kcombiview.cpp kurlrequester.cpp \ tdefilepreview.cpp kurlcombobox.cpp kurlrequesterdlg.cpp \ kopenwith.cpp kpropertiesdialog.cpp kicondialog.cpp kdirsize.cpp \ diff --git a/tdeio/tdefile/kacleditwidget.cpp b/tdeio/tdefile/kacleditwidget.cpp index 01eb8bcb8..7e8e3dae2 100644 --- a/tdeio/tdefile/kacleditwidget.cpp +++ b/tdeio/tdefile/kacleditwidget.cpp @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kcombiview.cpp b/tdeio/tdefile/kcombiview.cpp index 13830ab01..4c4f0cb06 100644 --- a/tdeio/tdefile/kcombiview.cpp +++ b/tdeio/tdefile/kcombiview.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include diff --git a/tdeio/tdefile/kcombiview.h b/tdeio/tdefile/kcombiview.h index 995b80ffc..af3680571 100644 --- a/tdeio/tdefile/kcombiview.h +++ b/tdeio/tdefile/kcombiview.h @@ -23,7 +23,7 @@ #define _KCOMBIVIEW_H #include -#include +#include #include #include diff --git a/tdeio/tdefile/kcustommenueditor.cpp b/tdeio/tdefile/kcustommenueditor.cpp index 65455aef0..b59108071 100644 --- a/tdeio/tdefile/kcustommenueditor.cpp +++ b/tdeio/tdefile/kcustommenueditor.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/kdiroperator.cpp b/tdeio/tdefile/kdiroperator.cpp index 1ae03daec..dc44aa8ba 100644 --- a/tdeio/tdefile/kdiroperator.cpp +++ b/tdeio/tdefile/kdiroperator.cpp @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ #include "config-tdefile.h" #include "kcombiview.h" -#include "kdiroperator.h" +#include "tdediroperator.h" #include "tdefiledetailview.h" #include "tdefileiconview.h" #include "tdefilepreview.h" @@ -1737,4 +1737,4 @@ TQString KDirOperator::viewConfigGroup() const void KDirOperator::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "kdiroperator.moc" +#include "tdediroperator.moc" diff --git a/tdeio/tdefile/kdirselectdialog.cpp b/tdeio/tdefile/kdirselectdialog.cpp index 39959229d..5027f631c 100644 --- a/tdeio/tdefile/kdirselectdialog.cpp +++ b/tdeio/tdefile/kdirselectdialog.cpp @@ -29,9 +29,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "tdefiletreeview.h" #include "kdirselectdialog.h" diff --git a/tdeio/tdefile/kdirsize.cpp b/tdeio/tdefile/kdirsize.cpp index c2ea4079a..b2d48b4bf 100644 --- a/tdeio/tdefile/kdirsize.cpp +++ b/tdeio/tdefile/kdirsize.cpp @@ -19,7 +19,7 @@ #include "kdirsize.h" #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kencodingfiledialog.cpp b/tdeio/tdefile/kencodingfiledialog.cpp index a49210642..d2d588a4e 100644 --- a/tdeio/tdefile/kencodingfiledialog.cpp +++ b/tdeio/tdefile/kencodingfiledialog.cpp @@ -24,11 +24,11 @@ #include "kencodingfiledialog.h" #include #include -#include -#include +#include +#include #include #include -#include +#include #include struct KEncodingFileDialogPrivate diff --git a/tdeio/tdefile/kicondialog.cpp b/tdeio/tdefile/kicondialog.cpp index 9d7975e2b..154f9e89d 100644 --- a/tdeio/tdefile/kicondialog.cpp +++ b/tdeio/tdefile/kicondialog.cpp @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/kimagefilepreview.cpp b/tdeio/tdefile/kimagefilepreview.cpp index a1ce7d6b3..f96be72fc 100644 --- a/tdeio/tdefile/kimagefilepreview.cpp +++ b/tdeio/tdefile/kimagefilepreview.cpp @@ -16,12 +16,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kmetaprops.cpp b/tdeio/tdefile/kmetaprops.cpp index ce6201177..21c75e0ce 100644 --- a/tdeio/tdefile/kmetaprops.cpp +++ b/tdeio/tdefile/kmetaprops.cpp @@ -23,9 +23,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/tdeio/tdefile/knotifydialog.cpp b/tdeio/tdefile/knotifydialog.cpp index f23ac78e4..8397a5e74 100644 --- a/tdeio/tdefile/knotifydialog.cpp +++ b/tdeio/tdefile/knotifydialog.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/knotifydialog.h b/tdeio/tdefile/knotifydialog.h index f31815e34..c8b5b21ac 100644 --- a/tdeio/tdefile/knotifydialog.h +++ b/tdeio/tdefile/knotifydialog.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "knotifywidgetbase.h" diff --git a/tdeio/tdefile/kopenwith.cpp b/tdeio/tdefile/kopenwith.cpp index 5a855de21..5db8b79d9 100644 --- a/tdeio/tdefile/kopenwith.cpp +++ b/tdeio/tdefile/kopenwith.cpp @@ -39,9 +39,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kpreviewprops.cpp b/tdeio/tdefile/kpreviewprops.cpp index a053d5627..c45330893 100644 --- a/tdeio/tdefile/kpreviewprops.cpp +++ b/tdeio/tdefile/kpreviewprops.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include class KPreviewPropsPlugin::KPreviewPropsPluginPrivate { diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index 389115a3c..87d3926b3 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -96,9 +96,9 @@ extern "C" { #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -109,7 +109,7 @@ extern "C" { #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp index 46b096c2b..2aa79353f 100644 --- a/tdeio/tdefile/kurlbar.cpp +++ b/tdeio/tdefile/kurlbar.cpp @@ -33,12 +33,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kurlcombobox.cpp b/tdeio/tdefile/kurlcombobox.cpp index 150e64b34..66fe8efb8 100644 --- a/tdeio/tdefile/kurlcombobox.cpp +++ b/tdeio/tdefile/kurlcombobox.cpp @@ -20,9 +20,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdefile/kurlrequester.cpp b/tdeio/tdefile/kurlrequester.cpp index 9a76a69a6..7ecfd543d 100644 --- a/tdeio/tdefile/kurlrequester.cpp +++ b/tdeio/tdefile/kurlrequester.cpp @@ -30,10 +30,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kurlrequesterdlg.cpp b/tdeio/tdefile/kurlrequesterdlg.cpp index d1e9ec109..1a040a656 100644 --- a/tdeio/tdefile/kurlrequesterdlg.cpp +++ b/tdeio/tdefile/kurlrequesterdlg.cpp @@ -28,10 +28,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefiledetailview.cpp b/tdeio/tdefile/tdefiledetailview.cpp index b3c44250e..e267bdb60 100644 --- a/tdeio/tdefile/tdefiledetailview.cpp +++ b/tdeio/tdefile/tdefiledetailview.cpp @@ -27,11 +27,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdefile/tdefiledialog.cpp b/tdeio/tdefile/tdefiledialog.cpp index 8db764724..03bc17757 100644 --- a/tdeio/tdefile/tdefiledialog.cpp +++ b/tdeio/tdefile/tdefiledialog.cpp @@ -50,16 +50,16 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -83,7 +83,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/tdefile/tdefilefiltercombo.cpp b/tdeio/tdefile/tdefilefiltercombo.cpp index cd7bd54d3..ed41f8f82 100644 --- a/tdeio/tdefile/tdefilefiltercombo.cpp +++ b/tdeio/tdefile/tdefilefiltercombo.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefileiconview.cpp b/tdeio/tdefile/tdefileiconview.cpp index 131485273..92bbeba41 100644 --- a/tdeio/tdefile/tdefileiconview.cpp +++ b/tdeio/tdefile/tdefileiconview.cpp @@ -31,10 +31,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdefile/tdefilemetainfowidget.cpp b/tdeio/tdefile/tdefilemetainfowidget.cpp index dea9ea353..50fef856b 100644 --- a/tdeio/tdefile/tdefilemetainfowidget.cpp +++ b/tdeio/tdefile/tdefilemetainfowidget.cpp @@ -21,7 +21,7 @@ #include "tdefilemetainfowidget.h" #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefilepreview.cpp b/tdeio/tdefile/tdefilepreview.cpp index 57543ea8c..acec61475 100644 --- a/tdeio/tdefile/tdefilepreview.cpp +++ b/tdeio/tdefile/tdefilepreview.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include diff --git a/tdeio/tdefile/tdefilesharedlg.cpp b/tdeio/tdefile/tdefilesharedlg.cpp index 6204fa6bb..a2fb01c2c 100644 --- a/tdeio/tdefile/tdefilesharedlg.cpp +++ b/tdeio/tdefile/tdefilesharedlg.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -39,7 +39,7 @@ #include #include #include -#include +#include class KFileSharePropsPlugin::Private { diff --git a/tdeio/tdefile/tdefilespeedbar.cpp b/tdeio/tdefile/tdefilespeedbar.cpp index defcb2157..6f3365a5f 100644 --- a/tdeio/tdefile/tdefilespeedbar.cpp +++ b/tdeio/tdefile/tdefilespeedbar.cpp @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefiletreeview.cpp b/tdeio/tdefile/tdefiletreeview.cpp index 6138b3863..cb7432423 100644 --- a/tdeio/tdefile/tdefiletreeview.cpp +++ b/tdeio/tdefile/tdefiletreeview.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefileview.cpp b/tdeio/tdefile/tdefileview.cpp index 63c973723..f171975d8 100644 --- a/tdeio/tdefile/tdefileview.cpp +++ b/tdeio/tdefile/tdefileview.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include "config-tdefile.h" diff --git a/tdeio/tdefile/tderecentdirs.cpp b/tdeio/tdefile/tderecentdirs.cpp index 12c2b6477..0548261dd 100644 --- a/tdeio/tdefile/tderecentdirs.cpp +++ b/tdeio/tdefile/tderecentdirs.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #define MAX_DIR_HISTORY 3 diff --git a/tdeio/tdefile/tests/kcustommenueditortest.cpp b/tdeio/tdefile/tests/kcustommenueditortest.cpp index 3d95b6c9f..9e2189406 100644 --- a/tdeio/tdefile/tests/kcustommenueditortest.cpp +++ b/tdeio/tdefile/tests/kcustommenueditortest.cpp @@ -1,6 +1,6 @@ #include "kcustommenueditor.h" #include -#include +#include #include int main(int argc, char** argv) diff --git a/tdeio/tdefile/tests/kdirselectdialogtest.cpp b/tdeio/tdefile/tests/kdirselectdialogtest.cpp index 0c2209d31..c1178c3bc 100644 --- a/tdeio/tdefile/tests/kdirselectdialogtest.cpp +++ b/tdeio/tdefile/tests/kdirselectdialogtest.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include int main( int argc, char **argv ) diff --git a/tdeio/tdefile/tests/kfdtest.cpp b/tdeio/tdefile/tests/kfdtest.cpp index baf82725f..ce7127d9e 100644 --- a/tdeio/tdefile/tests/kfdtest.cpp +++ b/tdeio/tdefile/tests/kfdtest.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name ) diff --git a/tdeio/tdefile/tests/kfstest.cpp b/tdeio/tdefile/tests/kfstest.cpp index c57e3678e..ada8d825e 100644 --- a/tdeio/tdefile/tests/kfstest.cpp +++ b/tdeio/tdefile/tests/kfstest.cpp @@ -30,12 +30,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp index 529d12dda..9ff0199dc 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/CMakeLists.txt b/tdeio/tdeio/CMakeLists.txt index 8aaf395b6..e2b96ebb1 100644 --- a/tdeio/tdeio/CMakeLists.txt +++ b/tdeio/tdeio/CMakeLists.txt @@ -41,8 +41,8 @@ install( FILES kurlcompletion.h kshellcompletion.h tdefileitem.h tdefileshare.h ksambashare.h knfsshare.h kdirlister.h kservicegroup.h kimageio.h kdirnotify.h kdirnotify_stub.h - kurlpixmapprovider.h kprotocolinfo.h kprotocolmanager.h - kfilterbase.h kfilterdev.h kemailsettings.h kscan.h + kurlpixmapprovider.h kprotocolinfo.h tdeprotocolmanager.h + kfilterbase.h kfilterdev.h tdeemailsettings.h kscan.h kdatatool.h karchive.h tdefilefilter.h tdefilemetainfo.h renamedlgplugin.h kmimetyperesolver.h kdcopservicestarter.h kremoteencoding.h kmimetypechooser.h @@ -71,7 +71,7 @@ install( FILES set( target tdeiocore ) set( ${target}_SRCS - authinfo.cpp kshred.cpp kprotocolmanager.cpp slave.cpp + authinfo.cpp kshred.cpp tdeprotocolmanager.cpp slave.cpp slaveinterface.cpp observer.stub sessiondata.cpp scheduler.cpp connection.cpp job.cpp global.cpp slaveconfig.cpp kurlpixmapprovider.cpp netaccess.cpp @@ -79,7 +79,7 @@ set( ${target}_SRCS slavebase.cpp passdlg.cpp forwardingslavebase.cpp progressbase.cpp defaultprogress.cpp statusbarprogress.cpp kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp - observer.cpp ../misc/uiserver.stub observer.skel kemailsettings.cpp + observer.cpp ../misc/uiserver.stub observer.skel tdeemailsettings.cpp kprotocolinfo.cpp renamedlg.cpp skipdlg.cpp kremoteencoding.cpp kmimetypechooser.cpp ) diff --git a/tdeio/tdeio/Makefile.am b/tdeio/tdeio/Makefile.am index f0766f5c8..587cfe511 100644 --- a/tdeio/tdeio/Makefile.am +++ b/tdeio/tdeio/Makefile.am @@ -53,8 +53,8 @@ include_HEADERS = \ kshellcompletion.h tdefileitem.h tdefileshare.h ksambashare.h knfsshare.h \ kdirlister.h kservicegroup.h \ kimageio.h kdirnotify.h kdirnotify_stub.h \ - kurlpixmapprovider.h kprotocolinfo.h kprotocolmanager.h \ - kfilterbase.h kfilterdev.h kemailsettings.h kscan.h kdatatool.h \ + kurlpixmapprovider.h kprotocolinfo.h tdeprotocolmanager.h \ + kfilterbase.h kfilterdev.h tdeemailsettings.h kscan.h kdatatool.h \ karchive.h tdefilefilter.h tdefilemetainfo.h renamedlgplugin.h \ kmimetyperesolver.h kdcopservicestarter.h kremoteencoding.h \ kmimetypechooser.h @@ -67,7 +67,7 @@ include_HEADERS += kacl.h libtdeiocore_la_SOURCES = authinfo.cpp \ kshred.cpp \ - kprotocolmanager.cpp \ + tdeprotocolmanager.cpp \ slave.cpp slaveinterface.cpp observer.stub \ sessiondata.cpp scheduler.cpp \ connection.cpp \ @@ -81,7 +81,7 @@ libtdeiocore_la_SOURCES = authinfo.cpp \ statusbarprogress.cpp \ kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp \ observer.cpp uiserver.stub observer.skel \ - kemailsettings.cpp \ + tdeemailsettings.cpp \ kprotocolinfo.cpp \ renamedlg.cpp skipdlg.cpp kremoteencoding.cpp \ kmimetypechooser.cpp diff --git a/tdeio/tdeio/chmodjob.cpp b/tdeio/tdeio/chmodjob.cpp index 434466d77..24a5c247d 100644 --- a/tdeio/tdeio/chmodjob.cpp +++ b/tdeio/tdeio/chmodjob.cpp @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include "tdeio/job.h" #include "tdeio/chmodjob.h" diff --git a/tdeio/tdeio/dataslave.cpp b/tdeio/tdeio/dataslave.cpp index 528368ba5..a5b6bdf69 100644 --- a/tdeio/tdeio/dataslave.cpp +++ b/tdeio/tdeio/dataslave.cpp @@ -23,7 +23,7 @@ #include "dataslave.h" #include "dataprotocol.h" -#include +#include #include #include diff --git a/tdeio/tdeio/defaultprogress.cpp b/tdeio/tdeio/defaultprogress.cpp index 4293e752e..5db9c5a0c 100644 --- a/tdeio/tdeio/defaultprogress.cpp +++ b/tdeio/tdeio/defaultprogress.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/global.cpp b/tdeio/tdeio/global.cpp index e4bfec5f6..8dce8a5f4 100644 --- a/tdeio/tdeio/global.cpp +++ b/tdeio/tdeio/global.cpp @@ -33,9 +33,9 @@ #include "tdeio/job.h" #include -#include -#include -#include +#include +#include +#include #include #ifdef HAVE_VOLMGT diff --git a/tdeio/tdeio/job.cpp b/tdeio/tdeio/job.cpp index a4e731451..7f8b9bda3 100644 --- a/tdeio/tdeio/job.cpp +++ b/tdeio/tdeio/job.cpp @@ -42,12 +42,12 @@ extern "C" { #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -60,14 +60,14 @@ extern "C" { #include "kdirwatch.h" #include "kmimemagic.h" #include "kprotocolinfo.h" -#include "kprotocolmanager.h" +#include "tdeprotocolmanager.h" #include "tdeio/observer.h" #include "kssl/ksslcsessioncache.h" #include -#include +#include #include #ifdef Q_OS_UNIX diff --git a/tdeio/tdeio/kdcopservicestarter.cpp b/tdeio/tdeio/kdcopservicestarter.cpp index c859cce2b..8a7a67632 100644 --- a/tdeio/tdeio/kdcopservicestarter.cpp +++ b/tdeio/tdeio/kdcopservicestarter.cpp @@ -22,7 +22,7 @@ #include "kservice.h" #include #include -#include +#include #include static KStaticDeleter dss_sd; diff --git a/tdeio/tdeio/kdirlister.cpp b/tdeio/tdeio/kdirlister.cpp index 669766ab5..b0027588d 100644 --- a/tdeio/tdeio/kdirlister.cpp +++ b/tdeio/tdeio/kdirlister.cpp @@ -28,11 +28,11 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/tdeio/tdeio/kdirwatch.cpp b/tdeio/tdeio/kdirwatch.cpp index 63c89b9d7..01b4e0876 100644 --- a/tdeio/tdeio/kdirwatch.cpp +++ b/tdeio/tdeio/kdirwatch.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kemailsettings.cpp b/tdeio/tdeio/kemailsettings.cpp index 296455253..bd46d8708 100644 --- a/tdeio/tdeio/kemailsettings.cpp +++ b/tdeio/tdeio/kemailsettings.cpp @@ -26,10 +26,10 @@ * $Id$ */ -#include "kemailsettings.h" +#include "tdeemailsettings.h" #include -#include +#include #include class KEMailSettingsPrivate { diff --git a/tdeio/tdeio/kimageio.cpp b/tdeio/tdeio/kimageio.cpp index f9de08376..d3768d297 100644 --- a/tdeio/tdeio/kimageio.cpp +++ b/tdeio/tdeio/kimageio.cpp @@ -20,9 +20,9 @@ #include #include "kimageio.h" #include "kimageiofactory.h" -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kmessageboxwrapper.h b/tdeio/tdeio/kmessageboxwrapper.h index c55060549..524eafa74 100644 --- a/tdeio/tdeio/kmessageboxwrapper.h +++ b/tdeio/tdeio/kmessageboxwrapper.h @@ -18,7 +18,7 @@ #ifndef KMESSAGEBOXWRAPPER_H #define KMESSAGEBOXWRAPPER_H -#include +#include #include #include diff --git a/tdeio/tdeio/kmimetype.cpp b/tdeio/tdeio/kmimetype.cpp index 8129b31f9..636c04eea 100644 --- a/tdeio/tdeio/kmimetype.cpp +++ b/tdeio/tdeio/kmimetype.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kmimetypechooser.cpp b/tdeio/tdeio/kmimetypechooser.cpp index 95dfada9c..ffc9a4c78 100644 --- a/tdeio/tdeio/kmimetypechooser.cpp +++ b/tdeio/tdeio/kmimetypechooser.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kprotocolinfo.cpp b/tdeio/tdeio/kprotocolinfo.cpp index 9523b70cb..bf11060e4 100644 --- a/tdeio/tdeio/kprotocolinfo.cpp +++ b/tdeio/tdeio/kprotocolinfo.cpp @@ -24,7 +24,7 @@ #include "kprotocolinfo.h" #include "kprotocolinfofactory.h" -#include "kprotocolmanager.h" +#include "tdeprotocolmanager.h" // Most of this class is implemented in tdecore/kprotocolinfo_tdecore.cpp // This file only contains a few static class-functions that depend on diff --git a/tdeio/tdeio/kprotocolmanager.cpp b/tdeio/tdeio/kprotocolmanager.cpp index 7ed06376b..65ad393a3 100644 --- a/tdeio/tdeio/kprotocolmanager.cpp +++ b/tdeio/tdeio/kprotocolmanager.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -34,7 +34,7 @@ #include #include -#include "kprotocolmanager.h" +#include "tdeprotocolmanager.h" class KProtocolManagerPrivate diff --git a/tdeio/tdeio/krun.cpp b/tdeio/tdeio/krun.cpp index 8547802d6..d92e3ca11 100644 --- a/tdeio/tdeio/krun.cpp +++ b/tdeio/tdeio/krun.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/krun.h b/tdeio/tdeio/krun.h index 40fd36416..6e5604f7a 100644 --- a/tdeio/tdeio/krun.h +++ b/tdeio/tdeio/krun.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include class TDEProcess; class KService; diff --git a/tdeio/tdeio/kscan.cpp b/tdeio/tdeio/kscan.cpp index 7b00f08a9..b49459771 100644 --- a/tdeio/tdeio/kscan.cpp +++ b/tdeio/tdeio/kscan.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include "kscan.h" diff --git a/tdeio/tdeio/kservice.cpp b/tdeio/tdeio/kservice.cpp index 13be78bea..c9a6fdae2 100644 --- a/tdeio/tdeio/kservice.cpp +++ b/tdeio/tdeio/kservice.cpp @@ -40,9 +40,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kservicefactory.cpp b/tdeio/tdeio/kservicefactory.cpp index f4646fa75..abd6ec61e 100644 --- a/tdeio/tdeio/kservicefactory.cpp +++ b/tdeio/tdeio/kservicefactory.cpp @@ -24,9 +24,9 @@ #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kservicegroup.cpp b/tdeio/tdeio/kservicegroup.cpp index 2e27c99b0..4cb3b8dac 100644 --- a/tdeio/tdeio/kservicegroup.cpp +++ b/tdeio/tdeio/kservicegroup.cpp @@ -19,9 +19,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kservicegroupfactory.cpp b/tdeio/tdeio/kservicegroupfactory.cpp index 56ec0c07f..3caf9c027 100644 --- a/tdeio/tdeio/kservicegroupfactory.cpp +++ b/tdeio/tdeio/kservicegroupfactory.cpp @@ -24,9 +24,9 @@ #include -#include +#include #include -#include +#include #include KServiceGroupFactory::KServiceGroupFactory() diff --git a/tdeio/tdeio/kshred.cpp b/tdeio/tdeio/kshred.cpp index 470f9a03e..0bc01c20a 100644 --- a/tdeio/tdeio/kshred.cpp +++ b/tdeio/tdeio/kshred.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kshred.h" #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/ktar.cpp b/tdeio/tdeio/ktar.cpp index 9bde2873a..cb5bba1fa 100644 --- a/tdeio/tdeio/ktar.cpp +++ b/tdeio/tdeio/ktar.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kurlcompletion.cpp b/tdeio/tdeio/kurlcompletion.cpp index e9ce26908..441d453ac 100644 --- a/tdeio/tdeio/kurlcompletion.cpp +++ b/tdeio/tdeio/kurlcompletion.cpp @@ -47,8 +47,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeio/tdeio/kuserprofile.cpp b/tdeio/tdeio/kuserprofile.cpp index 124f7f8f8..a9bdc40c1 100644 --- a/tdeio/tdeio/kuserprofile.cpp +++ b/tdeio/tdeio/kuserprofile.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/netaccess.cpp b/tdeio/tdeio/netaccess.cpp index dd3a1bdc8..cbab6684e 100644 --- a/tdeio/tdeio/netaccess.cpp +++ b/tdeio/tdeio/netaccess.cpp @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/observer.cpp b/tdeio/tdeio/observer.cpp index dfd847b04..2309c2142 100644 --- a/tdeio/tdeio/observer.cpp +++ b/tdeio/tdeio/observer.cpp @@ -34,12 +34,12 @@ #include "passdlg.h" #include "slavebase.h" #include "observer_stub.h" -#include +#include #include #include #include #include -#include +#include using namespace TDEIO; diff --git a/tdeio/tdeio/passdlg.cpp b/tdeio/tdeio/passdlg.cpp index 942d16c64..91fba050d 100644 --- a/tdeio/tdeio/passdlg.cpp +++ b/tdeio/tdeio/passdlg.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include using namespace TDEIO; diff --git a/tdeio/tdeio/paste.cpp b/tdeio/tdeio/paste.cpp index fd24f9a0d..42fff5ba2 100644 --- a/tdeio/tdeio/paste.cpp +++ b/tdeio/tdeio/paste.cpp @@ -24,16 +24,16 @@ #include "tdeio/netaccess.h" #include "tdeio/observer.h" #include "tdeio/renamedlg.h" -#include "tdeio/kprotocolmanager.h" +#include "tdeio/tdeprotocolmanager.h" #include #include #include -#include +#include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdeio/pastedialog.cpp b/tdeio/tdeio/pastedialog.cpp index 0252baff1..d95cc7e88 100644 --- a/tdeio/tdeio/pastedialog.cpp +++ b/tdeio/tdeio/pastedialog.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/previewjob.cpp b/tdeio/tdeio/previewjob.cpp index c51ba154d..5e3148619 100644 --- a/tdeio/tdeio/previewjob.cpp +++ b/tdeio/tdeio/previewjob.cpp @@ -43,10 +43,10 @@ #include // Do not remove, needed for correct bool serialization #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/renamedlg.cpp b/tdeio/tdeio/renamedlg.cpp index 06b12d129..715f73c42 100644 --- a/tdeio/tdeio/renamedlg.cpp +++ b/tdeio/tdeio/renamedlg.cpp @@ -30,15 +30,15 @@ #include #include -#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/scheduler.cpp b/tdeio/tdeio/scheduler.cpp index 01bcde298..3935a91cf 100644 --- a/tdeio/tdeio/scheduler.cpp +++ b/tdeio/tdeio/scheduler.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/sessiondata.cpp b/tdeio/tdeio/sessiondata.cpp index 99c6a26f3..4e4dd14ac 100644 --- a/tdeio/tdeio/sessiondata.cpp +++ b/tdeio/tdeio/sessiondata.cpp @@ -23,11 +23,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/skipdlg.cpp b/tdeio/tdeio/skipdlg.cpp index 6cd924136..5871bbd09 100644 --- a/tdeio/tdeio/skipdlg.cpp +++ b/tdeio/tdeio/skipdlg.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/slave.cpp b/tdeio/tdeio/slave.cpp index e66a719df..b4a7c8f2a 100644 --- a/tdeio/tdeio/slave.cpp +++ b/tdeio/tdeio/slave.cpp @@ -35,11 +35,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ #include "tdeio/slave.h" #include "tdeio/kservice.h" #include -#include +#include #include #ifdef HAVE_PATHS_H diff --git a/tdeio/tdeio/slavebase.cpp b/tdeio/tdeio/slavebase.cpp index 29a8e0c48..76bbc232d 100644 --- a/tdeio/tdeio/slavebase.cpp +++ b/tdeio/tdeio/slavebase.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include "kremoteencoding.h" diff --git a/tdeio/tdeio/slaveconfig.cpp b/tdeio/tdeio/slaveconfig.cpp index e81146e76..af1b7b793 100644 --- a/tdeio/tdeio/slaveconfig.cpp +++ b/tdeio/tdeio/slaveconfig.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "slaveconfig.h" diff --git a/tdeio/tdeio/statusbarprogress.cpp b/tdeio/tdeio/statusbarprogress.cpp index e0497e391..d7ef698c4 100644 --- a/tdeio/tdeio/statusbarprogress.cpp +++ b/tdeio/tdeio/statusbarprogress.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/tcpslavebase.cpp b/tdeio/tdeio/tcpslavebase.cpp index 2a4aff68e..a0d9c86cb 100644 --- a/tdeio/tdeio/tcpslavebase.cpp +++ b/tdeio/tdeio/tcpslavebase.cpp @@ -43,19 +43,19 @@ #include #include #include -#include +#include #ifndef Q_WS_WIN //temporary #include #endif -#include +#include #include #include #include #include -#include +#include #include #include "tdeio/tcpslavebase.h" diff --git a/tdeio/tdeio/tdefilefilter.cpp b/tdeio/tdeio/tdefilefilter.cpp index 310b86221..c1663c2e8 100644 --- a/tdeio/tdeio/tdefilefilter.cpp +++ b/tdeio/tdeio/tdefilefilter.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include "tdefilefilter.h" diff --git a/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index 3d09e6877..378cd5f0a 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -41,11 +41,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/tdefilemetainfo.cpp b/tdeio/tdeio/tdefilemetainfo.cpp index 796a48305..c1389695d 100644 --- a/tdeio/tdeio/tdefilemetainfo.cpp +++ b/tdeio/tdeio/tdefilemetainfo.cpp @@ -32,7 +32,7 @@ #include #include #include // needed for serialization of bool -#include +#include #include #include "tdefilemetainfo.h" diff --git a/tdeio/tdeio/tdefileshare.cpp b/tdeio/tdeio/tdefileshare.cpp index 16e281c16..dc3f8c05a 100644 --- a/tdeio/tdeio/tdefileshare.cpp +++ b/tdeio/tdeio/tdefileshare.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeioexec/main.cpp b/tdeio/tdeioexec/main.cpp index eb615344b..f6324afa5 100644 --- a/tdeio/tdeioexec/main.cpp +++ b/tdeio/tdeioexec/main.cpp @@ -29,16 +29,16 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tests/kiopassdlgtest.cpp b/tdeio/tests/kiopassdlgtest.cpp index 3dd4d7294..ba429e67a 100644 --- a/tdeio/tests/kiopassdlgtest.cpp +++ b/tdeio/tests/kiopassdlgtest.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include #include #include "passdlg.h" diff --git a/tdeio/tests/kpropsdlgtest.cpp b/tdeio/tests/kpropsdlgtest.cpp index 638a60ec2..527077eb0 100644 --- a/tdeio/tests/kpropsdlgtest.cpp +++ b/tdeio/tests/kpropsdlgtest.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/tdeio/tests/kprotocolinfotest.cpp b/tdeio/tests/kprotocolinfotest.cpp index 646249678..9b5242d65 100644 --- a/tdeio/tests/kprotocolinfotest.cpp +++ b/tdeio/tests/kprotocolinfotest.cpp @@ -17,9 +17,9 @@ */ #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tests/tdeioslavetest.cpp b/tdeio/tests/tdeioslavetest.cpp index ecc5e4af5..3cc22d8e2 100644 --- a/tdeio/tests/tdeioslavetest.cpp +++ b/tdeio/tests/tdeioslavetest.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeioslave/file/file.cc b/tdeioslave/file/file.cc index 477db8754..1caeaef3e 100644 --- a/tdeioslave/file/file.cc +++ b/tdeioslave/file/file.cc @@ -75,8 +75,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include "file.h" @@ -93,7 +93,7 @@ #include #include #include -#include +#include #include using namespace TDEIO; diff --git a/tdeioslave/ftp/ftp.cc b/tdeioslave/ftp/ftp.cc index 5b582d376..cf358ce39 100644 --- a/tdeioslave/ftp/ftp.cc +++ b/tdeioslave/ftp/ftp.cc @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeioslave/http/http.cc b/tdeioslave/http/http.cc index 539cc4dc5..a492221d5 100644 --- a/tdeioslave/http/http.cc +++ b/tdeioslave/http/http.cc @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeioslave/http/http_cache_cleaner.cpp b/tdeioslave/http/http_cache_cleaner.cpp index af9ede123..aaf94d25a 100644 --- a/tdeioslave/http/http_cache_cleaner.cpp +++ b/tdeioslave/http/http_cache_cleaner.cpp @@ -33,12 +33,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include -#include +#include #include #include -#include +#include #include diff --git a/tdeioslave/http/kcookiejar/kcookiewin.cpp b/tdeioslave/http/kcookiejar/kcookiewin.cpp index 3b845a104..faa9cdc65 100644 --- a/tdeioslave/http/kcookiejar/kcookiewin.cpp +++ b/tdeioslave/http/kcookiejar/kcookiewin.cpp @@ -58,8 +58,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeioslave/http/kcookiejar/main.cpp b/tdeioslave/http/kcookiejar/main.cpp index 59d912524..414afb41f 100644 --- a/tdeioslave/http/kcookiejar/main.cpp +++ b/tdeioslave/http/kcookiejar/main.cpp @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include static const char description[] = diff --git a/tdeioslave/metainfo/metainfo.cpp b/tdeioslave/metainfo/metainfo.cpp index 54f7acc3a..389a9182e 100644 --- a/tdeioslave/metainfo/metainfo.cpp +++ b/tdeioslave/metainfo/metainfo.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include "metainfo.h" diff --git a/tdelfeditor/tdelfeditor.cpp b/tdelfeditor/tdelfeditor.cpp index 99af949ed..1db2a3d8b 100644 --- a/tdelfeditor/tdelfeditor.cpp +++ b/tdelfeditor/tdelfeditor.cpp @@ -42,7 +42,7 @@ extern "C" { #include #include -#include +#include #include #include #include diff --git a/tdemdi/tdemdi/dockcontainer.cpp b/tdemdi/tdemdi/dockcontainer.cpp index 88bfa020d..be7c00929 100644 --- a/tdemdi/tdemdi/dockcontainer.cpp +++ b/tdemdi/tdemdi/dockcontainer.cpp @@ -29,13 +29,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include //TODO: Well, this is already defined in tdeui/kdockwidget.cpp static const char* const tdemdi_not_close_xpm[]={ diff --git a/tdemdi/tdemdi/guiclient.cpp b/tdemdi/tdemdi/guiclient.cpp index 255150289..9201df7b3 100644 --- a/tdemdi/tdemdi/guiclient.cpp +++ b/tdemdi/tdemdi/guiclient.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdemdi/tdemdi/mainwindow.cpp b/tdemdi/tdemdi/mainwindow.cpp index 4d477fc9c..411d11771 100644 --- a/tdemdi/tdemdi/mainwindow.cpp +++ b/tdemdi/tdemdi/mainwindow.cpp @@ -51,12 +51,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include "dockcontainer.h" diff --git a/tdemdi/tdemdi/mainwindow.h b/tdemdi/tdemdi/mainwindow.h index e8ae6e9fc..0c333a151 100644 --- a/tdemdi/tdemdi/mainwindow.h +++ b/tdemdi/tdemdi/mainwindow.h @@ -43,7 +43,7 @@ #define _KMDI_MAINWINDOW_H_ #include -#include +#include #include #include diff --git a/tdemdi/tdemdichildarea.cpp b/tdemdi/tdemdichildarea.cpp index 9370bbbe7..29b0b3d2d 100644 --- a/tdemdi/tdemdichildarea.cpp +++ b/tdemdi/tdemdichildarea.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdemdi/tdemdichildfrm.cpp b/tdemdi/tdemdichildfrm.cpp index cbc4f4b29..40ced6ffb 100644 --- a/tdemdi/tdemdichildfrm.cpp +++ b/tdemdi/tdemdichildfrm.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include ////////////////////////////////////////////////////////////////////////////// diff --git a/tdemdi/tdemdichildfrmcaption.cpp b/tdemdi/tdemdichildfrmcaption.cpp index cc1a4a187..e8e91ea94 100644 --- a/tdemdi/tdemdichildfrmcaption.cpp +++ b/tdemdi/tdemdichildfrmcaption.cpp @@ -38,7 +38,7 @@ #include "tdemdichildfrm.h" #include "tdemdichildarea.h" #include "tdemdimainfrm.h" -#include +#include #include #ifdef Q_WS_WIN diff --git a/tdemdi/tdemdichildview.cpp b/tdemdi/tdemdichildview.cpp index 1c3f521f7..4d0aa4166 100644 --- a/tdemdi/tdemdichildview.cpp +++ b/tdemdi/tdemdichildview.cpp @@ -39,7 +39,7 @@ #include "tdemdichildfrm.h" #include "tdemdidefines.h" #include -#include +#include #include //============ KMdiChildView ============// diff --git a/tdemdi/tdemdidockcontainer.cpp b/tdemdi/tdemdidockcontainer.cpp index ba0ba0de0..d6771b597 100644 --- a/tdemdi/tdemdidockcontainer.cpp +++ b/tdemdi/tdemdidockcontainer.cpp @@ -28,13 +28,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include //TODO: Well, this is already defined in tdeui/kdockwidget.cpp static const char* const tdemdi_not_close_xpm[] = diff --git a/tdemdi/tdemdiguiclient.cpp b/tdemdi/tdemdiguiclient.cpp index 1c43b8039..0a66ea6ff 100644 --- a/tdemdi/tdemdiguiclient.cpp +++ b/tdemdi/tdemdiguiclient.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdemdi/tdemdimainfrm.cpp b/tdemdi/tdemdimainfrm.cpp index 3c9f7c442..f21cc384b 100644 --- a/tdemdi/tdemdimainfrm.cpp +++ b/tdemdi/tdemdimainfrm.cpp @@ -43,12 +43,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/tdemdi/tdemdimainfrm.h b/tdemdi/tdemdimainfrm.h index 720324ad5..c73fa5af1 100644 --- a/tdemdi/tdemdimainfrm.h +++ b/tdemdi/tdemdimainfrm.h @@ -32,7 +32,7 @@ #define _KMDIMAINFRM_H_ #include -#include +#include #include #include diff --git a/tdeparts/browserextension.cpp b/tdeparts/browserextension.cpp index 630e4cb5a..85bfa4a94 100644 --- a/tdeparts/browserextension.cpp +++ b/tdeparts/browserextension.cpp @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeparts/browserrun.cpp b/tdeparts/browserrun.cpp index 34f4c21c9..3abd01524 100644 --- a/tdeparts/browserrun.cpp +++ b/tdeparts/browserrun.cpp @@ -17,15 +17,15 @@ */ #include "browserrun.h" -#include +#include #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeparts/factory.cpp b/tdeparts/factory.cpp index a3985fd05..485bd9a36 100644 --- a/tdeparts/factory.cpp +++ b/tdeparts/factory.cpp @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/tdeparts/part.cpp b/tdeparts/part.cpp index 9372adc08..954fc83d5 100644 --- a/tdeparts/part.cpp +++ b/tdeparts/part.cpp @@ -33,9 +33,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeparts/partmanager.cpp b/tdeparts/partmanager.cpp index 1af0f1ee3..0f6f59561 100644 --- a/tdeparts/partmanager.cpp +++ b/tdeparts/partmanager.cpp @@ -22,7 +22,7 @@ #include "partmanager.h" #include #include -#include +#include #include #include diff --git a/tdeparts/plugin.cpp b/tdeparts/plugin.cpp index e1469ad1c..378db4a27 100644 --- a/tdeparts/plugin.cpp +++ b/tdeparts/plugin.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeparts/tests/example.cpp b/tdeparts/tests/example.cpp index 403fda062..c8fb77b29 100644 --- a/tdeparts/tests/example.cpp +++ b/tdeparts/tests/example.cpp @@ -10,9 +10,9 @@ #include #include #include -#include +#include #include -#include +#include Shell::Shell() { diff --git a/tdeparts/tests/ghostview.cpp b/tdeparts/tests/ghostview.cpp index 72b165e65..d83ec8f41 100644 --- a/tdeparts/tests/ghostview.cpp +++ b/tdeparts/tests/ghostview.cpp @@ -2,9 +2,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeparts/tests/normalktm.cpp b/tdeparts/tests/normalktm.cpp index 664d6c7ec..92e46254e 100644 --- a/tdeparts/tests/normalktm.cpp +++ b/tdeparts/tests/normalktm.cpp @@ -10,11 +10,11 @@ #include #include #include -#include +#include #include -#include +#include -#include +#include Shell::Shell() { diff --git a/tdeparts/tests/notepad.cpp b/tdeparts/tests/notepad.cpp index 81ff2c1f2..ad81b91b3 100644 --- a/tdeparts/tests/notepad.cpp +++ b/tdeparts/tests/notepad.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeparts/tests/parts.cpp b/tdeparts/tests/parts.cpp index 408e73280..ebfd9c9f1 100644 --- a/tdeparts/tests/parts.cpp +++ b/tdeparts/tests/parts.cpp @@ -14,9 +14,9 @@ #include #include #include -#include +#include #include -#include +#include Part1::Part1( TQObject *parent, TQWidget * parentWidget ) : KParts::ReadOnlyPart( parent, "Part1" ) diff --git a/tdeparts/tests/plugin_spellcheck.cpp b/tdeparts/tests/plugin_spellcheck.cpp index 73d5b7986..d7cf06eac 100644 --- a/tdeparts/tests/plugin_spellcheck.cpp +++ b/tdeparts/tests/plugin_spellcheck.cpp @@ -3,8 +3,8 @@ #include "plugin_spellcheck.h" #include #include -#include -#include +#include +#include #include PluginSpellCheck::PluginSpellCheck( TQObject* parent, const char* name, diff --git a/tdeprint/cups/cupsaddsmb2.cpp b/tdeprint/cups/cupsaddsmb2.cpp index 685ce6e7e..256f5ee23 100644 --- a/tdeprint/cups/cupsaddsmb2.cpp +++ b/tdeprint/cups/cupsaddsmb2.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/cups/cupsdconf2/addressdialog.cpp b/tdeprint/cups/cupsdconf2/addressdialog.cpp index fab6a6fba..83b4d0813 100644 --- a/tdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/tdeprint/cups/cupsdconf2/addressdialog.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include AddressDialog::AddressDialog(TQWidget *parent, const char *name) : KDialogBase(Swallow, i18n("ACL Address"), Ok|Cancel, Ok, parent, name, true, true) diff --git a/tdeprint/cups/cupsdconf2/browsedialog.cpp b/tdeprint/cups/cupsdconf2/browsedialog.cpp index b337eb883..3268c72bc 100644 --- a/tdeprint/cups/cupsdconf2/browsedialog.cpp +++ b/tdeprint/cups/cupsdconf2/browsedialog.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include BrowseDialog::BrowseDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true) diff --git a/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp index 4b056cdb0..e66048b73 100644 --- a/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include CupsdBrowsingPage::CupsdBrowsingPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdcomment.cpp b/tdeprint/cups/cupsdconf2/cupsdcomment.cpp index d17c8bd0c..8a788cad3 100644 --- a/tdeprint/cups/cupsdconf2/cupsdcomment.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdcomment.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include TQString Comment::comment() diff --git a/tdeprint/cups/cupsdconf2/cupsdconf.cpp b/tdeprint/cups/cupsdconf2/cupsdconf.cpp index 102ead1c8..2c5610411 100644 --- a/tdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/cupsddialog.cpp b/tdeprint/cups/cupsdconf2/cupsddialog.cpp index c9b219112..22a3b2d54 100644 --- a/tdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -33,11 +33,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/cupsdconf2/cupsddirpage.cpp b/tdeprint/cups/cupsdconf2/cupsddirpage.cpp index 268465a76..282657255 100644 --- a/tdeprint/cups/cupsdconf2/cupsddirpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddirpage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include CupsdDirPage::CupsdDirPage(TQWidget *parent, const char *name) : CupsdPage(parent, name) diff --git a/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp b/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp index 79c8a9401..e9cb1a0ad 100644 --- a/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include CupsdFilterPage::CupsdFilterPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp b/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp index f12f82f1e..49fdecc7c 100644 --- a/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include CupsdJobsPage::CupsdJobsPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp b/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp index 00972e368..22128b39c 100644 --- a/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include CupsdLogPage::CupsdLogPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp b/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp index 9edca5868..e939c151f 100644 --- a/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include CupsdNetworkPage::CupsdNetworkPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp b/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp index d11851c60..6d6061264 100644 --- a/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp @@ -28,9 +28,9 @@ #include #include -#include +#include #include -#include +#include CupsdSecurityPage::CupsdSecurityPage(TQWidget *parent, const char *name) : CupsdPage(parent, name) diff --git a/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp b/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp index cfd731430..e89356af9 100644 --- a/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include int findComboItem(TQComboBox *cb, const TQString& str) { diff --git a/tdeprint/cups/cupsdconf2/cupsdsplash.cpp b/tdeprint/cups/cupsdconf2/cupsdsplash.cpp index a058299f0..c28329e67 100644 --- a/tdeprint/cups/cupsdconf2/cupsdsplash.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdsplash.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include CupsdSplash::CupsdSplash(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/editlist.cpp b/tdeprint/cups/cupsdconf2/editlist.cpp index 3e3fa80e2..936dee212 100644 --- a/tdeprint/cups/cupsdconf2/editlist.cpp +++ b/tdeprint/cups/cupsdconf2/editlist.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/locationdialog.cpp b/tdeprint/cups/cupsdconf2/locationdialog.cpp index 3896f7845..0754ae573 100644 --- a/tdeprint/cups/cupsdconf2/locationdialog.cpp +++ b/tdeprint/cups/cupsdconf2/locationdialog.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include LocationDialog::LocationDialog(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/main.cpp b/tdeprint/cups/cupsdconf2/main.cpp index abc81477c..78b0e1edf 100644 --- a/tdeprint/cups/cupsdconf2/main.cpp +++ b/tdeprint/cups/cupsdconf2/main.cpp @@ -20,7 +20,7 @@ #include "cupsddialog.h" #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/portdialog.cpp b/tdeprint/cups/cupsdconf2/portdialog.cpp index 18cade9fc..f758d5d1e 100644 --- a/tdeprint/cups/cupsdconf2/portdialog.cpp +++ b/tdeprint/cups/cupsdconf2/portdialog.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include PortDialog::PortDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true) diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index 628e8d40c..0992e2935 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/sizewidget.cpp b/tdeprint/cups/cupsdconf2/sizewidget.cpp index 742702e48..eaa39152f 100644 --- a/tdeprint/cups/cupsdconf2/sizewidget.cpp +++ b/tdeprint/cups/cupsdconf2/sizewidget.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include SizeWidget::SizeWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ) diff --git a/tdeprint/cups/cupsinfos.cpp b/tdeprint/cups/cupsinfos.cpp index 330429583..f6d392bd9 100644 --- a/tdeprint/cups/cupsinfos.cpp +++ b/tdeprint/cups/cupsinfos.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/ippreportdlg.cpp b/tdeprint/cups/ippreportdlg.cpp index 1e07789ac..ed56804bc 100644 --- a/tdeprint/cups/ippreportdlg.cpp +++ b/tdeprint/cups/ippreportdlg.cpp @@ -21,9 +21,9 @@ #include "ipprequest.h" #include "kprinter.h" -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/ipprequest.cpp b/tdeprint/cups/ipprequest.cpp index 4edaefb58..ebbefefe9 100644 --- a/tdeprint/cups/ipprequest.cpp +++ b/tdeprint/cups/ipprequest.cpp @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/cups/kmconfigcups.cpp b/tdeprint/cups/kmconfigcups.cpp index 1b0ccdaea..6bc9ec155 100644 --- a/tdeprint/cups/kmconfigcups.cpp +++ b/tdeprint/cups/kmconfigcups.cpp @@ -20,7 +20,7 @@ #include "kmconfigcups.h" #include "kmcupsconfigwidget.h" -#include +#include #include #include diff --git a/tdeprint/cups/kmconfigcupsdir.cpp b/tdeprint/cups/kmconfigcupsdir.cpp index 6f16f5dfa..10a455226 100644 --- a/tdeprint/cups/kmconfigcupsdir.cpp +++ b/tdeprint/cups/kmconfigcupsdir.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmcupsconfigwidget.cpp b/tdeprint/cups/kmcupsconfigwidget.cpp index a62583b1b..f93c1a4b3 100644 --- a/tdeprint/cups/kmcupsconfigwidget.cpp +++ b/tdeprint/cups/kmcupsconfigwidget.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmcupsfactory.cpp b/tdeprint/cups/kmcupsfactory.cpp index 47384eab6..f42bc449e 100644 --- a/tdeprint/cups/kmcupsfactory.cpp +++ b/tdeprint/cups/kmcupsfactory.cpp @@ -22,7 +22,7 @@ #include "kmcupsuimanager.h" #include "kcupsprinterimpl.h" -#include +#include #include typedef K_TYPELIST_4( KMCupsManager, KMCupsJobManager, KMCupsUiManager, KCupsPrinterImpl ) Products; diff --git a/tdeprint/cups/kmcupsjobmanager.cpp b/tdeprint/cups/kmcupsjobmanager.cpp index b7284d1ad..fa208e551 100644 --- a/tdeprint/cups/kmcupsjobmanager.cpp +++ b/tdeprint/cups/kmcupsjobmanager.cpp @@ -32,7 +32,7 @@ #include "kpcopiespage.h" #include "kptagspage.h" -#include +#include #include #include diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index cd472eefa..eaf5070b8 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -42,12 +42,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmcupsuimanager.cpp b/tdeprint/cups/kmcupsuimanager.cpp index 60e683b84..03b85bb0a 100644 --- a/tdeprint/cups/kmcupsuimanager.cpp +++ b/tdeprint/cups/kmcupsuimanager.cpp @@ -55,10 +55,10 @@ #include #include -#include +#include #include #include -#include +#include #include "config.h" diff --git a/tdeprint/cups/kmpropbanners.cpp b/tdeprint/cups/kmpropbanners.cpp index 22098cdff..602af7f6d 100644 --- a/tdeprint/cups/kmpropbanners.cpp +++ b/tdeprint/cups/kmpropbanners.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include KMPropBanners::KMPropBanners(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/cups/kmpropquota.cpp b/tdeprint/cups/kmpropquota.cpp index 9df6cbcb2..773e667e9 100644 --- a/tdeprint/cups/kmpropquota.cpp +++ b/tdeprint/cups/kmpropquota.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include // some forward declarations (see kmwquota.cpp) const char* unitKeyword(int); diff --git a/tdeprint/cups/kmpropusers.cpp b/tdeprint/cups/kmpropusers.cpp index 0f67205b0..2a2147aed 100644 --- a/tdeprint/cups/kmpropusers.cpp +++ b/tdeprint/cups/kmpropusers.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropUsers::KMPropUsers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/cups/kmwbanners.cpp b/tdeprint/cups/kmwbanners.cpp index c221f69d7..86f1347fb 100644 --- a/tdeprint/cups/kmwbanners.cpp +++ b/tdeprint/cups/kmwbanners.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include TQStringList defaultBanners() { diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp index 05b1b2cfa..15d4f8180 100644 --- a/tdeprint/cups/kmwfax.cpp +++ b/tdeprint/cups/kmwfax.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kmwipp.cpp b/tdeprint/cups/kmwipp.cpp index cb9dedd6c..a8ec8d425 100644 --- a/tdeprint/cups/kmwipp.cpp +++ b/tdeprint/cups/kmwipp.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kmwippprinter.cpp b/tdeprint/cups/kmwippprinter.cpp index e80478f61..f7a4f0593 100644 --- a/tdeprint/cups/kmwippprinter.cpp +++ b/tdeprint/cups/kmwippprinter.cpp @@ -29,12 +29,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp index c3f48ad27..237d74fd1 100644 --- a/tdeprint/cups/kmwippselect.cpp +++ b/tdeprint/cups/kmwippselect.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kmwother.cpp b/tdeprint/cups/kmwother.cpp index 4e640d536..497fa03c3 100644 --- a/tdeprint/cups/kmwother.cpp +++ b/tdeprint/cups/kmwother.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmwquota.cpp b/tdeprint/cups/kmwquota.cpp index 67245fb20..5085913d0 100644 --- a/tdeprint/cups/kmwquota.cpp +++ b/tdeprint/cups/kmwquota.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #ifdef HAVE_LIMITS_H #include diff --git a/tdeprint/cups/kmwusers.cpp b/tdeprint/cups/kmwusers.cpp index 714f6f4d4..eed7c08af 100644 --- a/tdeprint/cups/kmwusers.cpp +++ b/tdeprint/cups/kmwusers.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include KMWUsers::KMWUsers(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/kphpgl2page.cpp b/tdeprint/cups/kphpgl2page.cpp index 67ad61aec..f804b249d 100644 --- a/tdeprint/cups/kphpgl2page.cpp +++ b/tdeprint/cups/kphpgl2page.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include KPHpgl2Page::KPHpgl2Page(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/kpimagepage.cpp b/tdeprint/cups/kpimagepage.cpp index 669bab190..8d23fe3e0 100644 --- a/tdeprint/cups/kpimagepage.cpp +++ b/tdeprint/cups/kpimagepage.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kpschedulepage.cpp b/tdeprint/cups/kpschedulepage.cpp index f778139dc..d7f13c8a4 100644 --- a/tdeprint/cups/kpschedulepage.cpp +++ b/tdeprint/cups/kpschedulepage.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kptagspage.cpp b/tdeprint/cups/kptagspage.cpp index a5d465683..db134d9ba 100644 --- a/tdeprint/cups/kptagspage.cpp +++ b/tdeprint/cups/kptagspage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include KPTagsPage::KPTagsPage(bool ro, TQWidget *parent, const char *name) : KPrintDialogPage(parent, name) diff --git a/tdeprint/cups/kptextpage.cpp b/tdeprint/cups/kptextpage.cpp index eb8bc3553..955434da4 100644 --- a/tdeprint/cups/kptextpage.cpp +++ b/tdeprint/cups/kptextpage.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/driver.cpp b/tdeprint/driver.cpp index abc468f7a..6afc75d0f 100644 --- a/tdeprint/driver.cpp +++ b/tdeprint/driver.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/driverview.cpp b/tdeprint/driverview.cpp index 02c7be610..fece6c40c 100644 --- a/tdeprint/driverview.cpp +++ b/tdeprint/driverview.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include DrListView::DrListView(TQWidget *parent, const char *name) : TDEListView(parent,name) diff --git a/tdeprint/droptionview.cpp b/tdeprint/droptionview.cpp index 1ec954251..77a910b0c 100644 --- a/tdeprint/droptionview.cpp +++ b/tdeprint/droptionview.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include OptionBaseView::OptionBaseView(TQWidget *parent, const char *name) : TQWidget(parent,name) diff --git a/tdeprint/ext/kextprinterimpl.cpp b/tdeprint/ext/kextprinterimpl.cpp index 8959aa3e8..7923ea729 100644 --- a/tdeprint/ext/kextprinterimpl.cpp +++ b/tdeprint/ext/kextprinterimpl.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include KExtPrinterImpl::KExtPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) : KPrinterImpl(parent,name) diff --git a/tdeprint/ext/kmextmanager.cpp b/tdeprint/ext/kmextmanager.cpp index 598dd6648..abc832d6f 100644 --- a/tdeprint/ext/kmextmanager.cpp +++ b/tdeprint/ext/kmextmanager.cpp @@ -20,7 +20,7 @@ #include "kmextmanager.h" #include "kmprinter.h" -#include +#include KMExtManager::KMExtManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMManager(parent,name) diff --git a/tdeprint/ext/kmextuimanager.cpp b/tdeprint/ext/kmextuimanager.cpp index 2fa200848..ee1c4e186 100644 --- a/tdeprint/ext/kmextuimanager.cpp +++ b/tdeprint/ext/kmextuimanager.cpp @@ -21,7 +21,7 @@ #include "kpqtpage.h" #include "kprinterpropertydialog.h" -#include +#include KMExtUiManager::KMExtUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/foomatic/kfoomaticprinterimpl.cpp b/tdeprint/foomatic/kfoomaticprinterimpl.cpp index aacf6be8d..dd694b31b 100644 --- a/tdeprint/foomatic/kfoomaticprinterimpl.cpp +++ b/tdeprint/foomatic/kfoomaticprinterimpl.cpp @@ -21,7 +21,7 @@ #include "kprinter.h" #include -#include +#include KFoomaticPrinterImpl::KFoomaticPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) : KPrinterImpl(parent,name) diff --git a/tdeprint/foomatic/kmfoomaticmanager.cpp b/tdeprint/foomatic/kmfoomaticmanager.cpp index 19e8401d8..e1e741003 100644 --- a/tdeprint/foomatic/kmfoomaticmanager.cpp +++ b/tdeprint/foomatic/kmfoomaticmanager.cpp @@ -22,7 +22,7 @@ #include "driver.h" #include -#include +#include #include #include diff --git a/tdeprint/foomatic2loader.cpp b/tdeprint/foomatic2loader.cpp index 6add13378..0d0637c90 100644 --- a/tdeprint/foomatic2loader.cpp +++ b/tdeprint/foomatic2loader.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include void tdeprint_foomatic2scanner_init( TQIODevice* ); void tdeprint_foomatic2scanner_terminate(); diff --git a/tdeprint/kmfactory.cpp b/tdeprint/kmfactory.cpp index 09a2cf45a..16ec56c32 100644 --- a/tdeprint/kmfactory.cpp +++ b/tdeprint/kmfactory.cpp @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/kmjob.cpp b/tdeprint/kmjob.cpp index 7ff1efb95..2b42506f5 100644 --- a/tdeprint/kmjob.cpp +++ b/tdeprint/kmjob.cpp @@ -19,7 +19,7 @@ #include "kmjob.h" -#include +#include KMJob::KMJob() : KMObject() diff --git a/tdeprint/kmmanager.cpp b/tdeprint/kmmanager.cpp index ca9b1036f..d43239fd7 100644 --- a/tdeprint/kmmanager.cpp +++ b/tdeprint/kmmanager.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/kmprinter.cpp b/tdeprint/kmprinter.cpp index 22fc9d970..c7676e382 100644 --- a/tdeprint/kmprinter.cpp +++ b/tdeprint/kmprinter.cpp @@ -21,7 +21,7 @@ #include "kprinter.h" #include "driver.h" -#include +#include #include KMPrinter::KMPrinter() diff --git a/tdeprint/kmspecialmanager.cpp b/tdeprint/kmspecialmanager.cpp index 84e120e77..910de4931 100644 --- a/tdeprint/kmspecialmanager.cpp +++ b/tdeprint/kmspecialmanager.cpp @@ -26,9 +26,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/kmuimanager.cpp b/tdeprint/kmuimanager.cpp index 962653dd2..4dd6966d3 100644 --- a/tdeprint/kmuimanager.cpp +++ b/tdeprint/kmuimanager.cpp @@ -36,7 +36,7 @@ #include "kxmlcommand.h" #include "kpposterpage.h" -#include +#include #include KMUiManager::KMUiManager(TQObject *parent, const char *name) diff --git a/tdeprint/kmvirtualmanager.cpp b/tdeprint/kmvirtualmanager.cpp index b13637904..dabad3093 100644 --- a/tdeprint/kmvirtualmanager.cpp +++ b/tdeprint/kmvirtualmanager.cpp @@ -28,11 +28,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include diff --git a/tdeprint/kpcopiespage.cpp b/tdeprint/kpcopiespage.cpp index d804cc9f2..10eb6e204 100644 --- a/tdeprint/kpcopiespage.cpp +++ b/tdeprint/kpcopiespage.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/kpdriverpage.cpp b/tdeprint/kpdriverpage.cpp index 18cfeb207..2bea47bc8 100644 --- a/tdeprint/kpdriverpage.cpp +++ b/tdeprint/kpdriverpage.cpp @@ -22,7 +22,7 @@ #include "driver.h" #include -#include +#include KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, TQWidget *parent, const char *name) : KPrintDialogPage(p,d,parent,name) diff --git a/tdeprint/kpfileselectpage.cpp b/tdeprint/kpfileselectpage.cpp index 6847ade2b..8b20386bd 100644 --- a/tdeprint/kpfileselectpage.cpp +++ b/tdeprint/kpfileselectpage.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name) diff --git a/tdeprint/kpfilterpage.cpp b/tdeprint/kpfilterpage.cpp index 4704abb15..6f46085ee 100644 --- a/tdeprint/kpfilterpage.cpp +++ b/tdeprint/kpfilterpage.cpp @@ -27,9 +27,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/kpgeneralpage.cpp b/tdeprint/kpgeneralpage.cpp index ea1ec61e3..821290704 100644 --- a/tdeprint/kpgeneralpage.cpp +++ b/tdeprint/kpgeneralpage.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include // Some ID's #define ORIENT_PORTRAIT_ID 0 diff --git a/tdeprint/kpmarginpage.cpp b/tdeprint/kpmarginpage.cpp index ab70211c8..78b9ca6ef 100644 --- a/tdeprint/kpmarginpage.cpp +++ b/tdeprint/kpmarginpage.cpp @@ -31,9 +31,9 @@ #include #include -#include +#include #include -#include +#include KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent, const char *name) : KPrintDialogPage(0, driver, parent, name) diff --git a/tdeprint/kpposterpage.cpp b/tdeprint/kpposterpage.cpp index f719e251b..9c0a42501 100644 --- a/tdeprint/kpposterpage.cpp +++ b/tdeprint/kpposterpage.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/kpqtpage.cpp b/tdeprint/kpqtpage.cpp index 11b5a6574..c0ca5656e 100644 --- a/tdeprint/kpqtpage.cpp +++ b/tdeprint/kpqtpage.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #define ORIENT_PORTRAIT_ID 0 diff --git a/tdeprint/kprintaction.cpp b/tdeprint/kprintaction.cpp index cc94fe3c8..4a4aac597 100644 --- a/tdeprint/kprintaction.cpp +++ b/tdeprint/kprintaction.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include class KPrintAction::KPrintActionPrivate { diff --git a/tdeprint/kprintdialog.cpp b/tdeprint/kprintdialog.cpp index 312146855..d881971ff 100644 --- a/tdeprint/kprintdialog.cpp +++ b/tdeprint/kprintdialog.cpp @@ -46,18 +46,18 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/kprinter.cpp b/tdeprint/kprinter.cpp index 95cfc1733..4b9a1c98f 100644 --- a/tdeprint/kprinter.cpp +++ b/tdeprint/kprinter.cpp @@ -35,15 +35,15 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include -#include +#include static void dumpOptions(const TQMap& opts); static void reportError(KPrinter*); diff --git a/tdeprint/kprinterimpl.cpp b/tdeprint/kprinterimpl.cpp index ac79220f5..edd380009 100644 --- a/tdeprint/kprinterimpl.cpp +++ b/tdeprint/kprinterimpl.cpp @@ -32,14 +32,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include diff --git a/tdeprint/kprinterpropertydialog.cpp b/tdeprint/kprinterpropertydialog.cpp index 1128a7d3a..c120ba843 100644 --- a/tdeprint/kprinterpropertydialog.cpp +++ b/tdeprint/kprinterpropertydialog.cpp @@ -25,9 +25,9 @@ #include "kmprinter.h" #include "driver.h" -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index 0311f543d..623a7f934 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/kprintprocess.cpp b/tdeprint/kprintprocess.cpp index ec93fcce6..89ef5e2ca 100644 --- a/tdeprint/kprintprocess.cpp +++ b/tdeprint/kprintprocess.cpp @@ -19,7 +19,7 @@ #include "kprintprocess.h" #include -#include +#include #include KPrintProcess::KPrintProcess() diff --git a/tdeprint/kxmlcommand.cpp b/tdeprint/kxmlcommand.cpp index f2dcb99ce..2d5712674 100644 --- a/tdeprint/kxmlcommand.cpp +++ b/tdeprint/kxmlcommand.cpp @@ -30,13 +30,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include static void setOptionText(DrBase *opt, const TQString& s) { diff --git a/tdeprint/lpd/klpdprinterimpl.cpp b/tdeprint/lpd/klpdprinterimpl.cpp index e81b3a8cd..3647f0b38 100644 --- a/tdeprint/lpd/klpdprinterimpl.cpp +++ b/tdeprint/lpd/klpdprinterimpl.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include KLpdPrinterImpl::KLpdPrinterImpl(TQObject *parent, const char *name) : KPrinterImpl(parent,name) diff --git a/tdeprint/lpd/kmlpdmanager.cpp b/tdeprint/lpd/kmlpdmanager.cpp index 23c0422d0..e72733f89 100644 --- a/tdeprint/lpd/kmlpdmanager.cpp +++ b/tdeprint/lpd/kmlpdmanager.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/lpd/kmlpduimanager.cpp b/tdeprint/lpd/kmlpduimanager.cpp index fad3fcd58..173c03b2b 100644 --- a/tdeprint/lpd/kmlpduimanager.cpp +++ b/tdeprint/lpd/kmlpduimanager.cpp @@ -27,7 +27,7 @@ #include "kmpropdriver.h" #include -#include +#include KMLpdUiManager::KMLpdUiManager(TQObject *parent, const char *name) : KMUiManager(parent,name) diff --git a/tdeprint/lpd/lpdtools.cpp b/tdeprint/lpd/lpdtools.cpp index 5131b33f3..54f19c405 100644 --- a/tdeprint/lpd/lpdtools.cpp +++ b/tdeprint/lpd/lpdtools.cpp @@ -22,7 +22,7 @@ #include "kmprinter.h" #include -#include +#include static const char *pt_pagesize[] = { "ledger", I18N_NOOP("Ledger"), diff --git a/tdeprint/lpdunix/klpdunixprinterimpl.cpp b/tdeprint/lpdunix/klpdunixprinterimpl.cpp index 4237bda59..e628a1c41 100644 --- a/tdeprint/lpdunix/klpdunixprinterimpl.cpp +++ b/tdeprint/lpdunix/klpdunixprinterimpl.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include KLpdUnixPrinterImpl::KLpdUnixPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) diff --git a/tdeprint/lpdunix/kmlpdunixmanager.cpp b/tdeprint/lpdunix/kmlpdunixmanager.cpp index 232a49eb0..7a291f6df 100644 --- a/tdeprint/lpdunix/kmlpdunixmanager.cpp +++ b/tdeprint/lpdunix/kmlpdunixmanager.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpdunix/kmlpdunixuimanager.cpp b/tdeprint/lpdunix/kmlpdunixuimanager.cpp index 686dfecbb..b7f059f1a 100644 --- a/tdeprint/lpdunix/kmlpdunixuimanager.cpp +++ b/tdeprint/lpdunix/kmlpdunixuimanager.cpp @@ -21,7 +21,7 @@ #include "kpqtpage.h" #include "kprinterpropertydialog.h" -#include +#include KMLpdUnixUiManager::KMLpdUnixUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/lpr/apshandler.cpp b/tdeprint/lpr/apshandler.cpp index 3d144644a..acb0e0c2d 100644 --- a/tdeprint/lpr/apshandler.cpp +++ b/tdeprint/lpr/apshandler.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/editentrydialog.cpp b/tdeprint/lpr/editentrydialog.cpp index 3977f12f8..9a8f9caa2 100644 --- a/tdeprint/lpr/editentrydialog.cpp +++ b/tdeprint/lpr/editentrydialog.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const char *name) diff --git a/tdeprint/lpr/kmconfiglpr.cpp b/tdeprint/lpr/kmconfiglpr.cpp index 8a6988188..fed1dd17d 100644 --- a/tdeprint/lpr/kmconfiglpr.cpp +++ b/tdeprint/lpr/kmconfiglpr.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name) diff --git a/tdeprint/lpr/kmlprjobmanager.cpp b/tdeprint/lpr/kmlprjobmanager.cpp index 851663664..0738d17c1 100644 --- a/tdeprint/lpr/kmlprjobmanager.cpp +++ b/tdeprint/lpr/kmlprjobmanager.cpp @@ -25,7 +25,7 @@ #include "lprsettings.h" #include -#include +#include KMLprJobManager::KMLprJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMJobManager(parent, name) diff --git a/tdeprint/lpr/kmlprmanager.cpp b/tdeprint/lpr/kmlprmanager.cpp index 157105e60..046f082f7 100644 --- a/tdeprint/lpr/kmlprmanager.cpp +++ b/tdeprint/lpr/kmlprmanager.cpp @@ -30,13 +30,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/kmlpruimanager.cpp b/tdeprint/lpr/kmlpruimanager.cpp index 655309e0c..b7d23bb42 100644 --- a/tdeprint/lpr/kmlpruimanager.cpp +++ b/tdeprint/lpr/kmlpruimanager.cpp @@ -29,7 +29,7 @@ #include "kmwbackend.h" #include "kmconfiglpr.h" -#include +#include KMLprUiManager::KMLprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/lpr/lpchelper.cpp b/tdeprint/lpr/lpchelper.cpp index f72901865..b366537e5 100644 --- a/tdeprint/lpr/lpchelper.cpp +++ b/tdeprint/lpr/lpchelper.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/lprhandler.cpp b/tdeprint/lpr/lprhandler.cpp index fcb838bb9..767b55382 100644 --- a/tdeprint/lpr/lprhandler.cpp +++ b/tdeprint/lpr/lprhandler.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include diff --git a/tdeprint/lpr/lprngtoolhandler.cpp b/tdeprint/lpr/lprngtoolhandler.cpp index d3e283123..960f5adb8 100644 --- a/tdeprint/lpr/lprngtoolhandler.cpp +++ b/tdeprint/lpr/lprngtoolhandler.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/matichandler.cpp b/tdeprint/lpr/matichandler.cpp index e1242c5fc..826867cd2 100644 --- a/tdeprint/lpr/matichandler.cpp +++ b/tdeprint/lpr/matichandler.cpp @@ -29,7 +29,7 @@ #include "util.h" #include "foomatic2loader.h" -#include +#include #include #include #include diff --git a/tdeprint/management/kaddprinterwizard.cpp b/tdeprint/management/kaddprinterwizard.cpp index 256b85011..466c75853 100644 --- a/tdeprint/management/kaddprinterwizard.cpp +++ b/tdeprint/management/kaddprinterwizard.cpp @@ -1,9 +1,9 @@ #include "kmmanager.h" #include #include -#include -#include -#include +#include +#include +#include static TDECmdLineOptions options[] = { diff --git a/tdeprint/management/kmconfigcommand.cpp b/tdeprint/management/kmconfigcommand.cpp index 32fb7db11..4cf33998f 100644 --- a/tdeprint/management/kmconfigcommand.cpp +++ b/tdeprint/management/kmconfigcommand.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include KMConfigCommand::KMConfigCommand(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmconfigdialog.cpp b/tdeprint/management/kmconfigdialog.cpp index 6f0e76e19..50eabe9b1 100644 --- a/tdeprint/management/kmconfigdialog.cpp +++ b/tdeprint/management/kmconfigdialog.cpp @@ -30,7 +30,7 @@ #include "kmconfigjobs.h" #include -#include +#include #include #include diff --git a/tdeprint/management/kmconfigfilter.cpp b/tdeprint/management/kmconfigfilter.cpp index 21cbc418e..b7be0a1e6 100644 --- a/tdeprint/management/kmconfigfilter.cpp +++ b/tdeprint/management/kmconfigfilter.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmconfigfonts.cpp b/tdeprint/management/kmconfigfonts.cpp index 54ebdb87c..890a42045 100644 --- a/tdeprint/management/kmconfigfonts.cpp +++ b/tdeprint/management/kmconfigfonts.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmconfiggeneral.cpp b/tdeprint/management/kmconfiggeneral.cpp index b7c0a1522..635667cec 100644 --- a/tdeprint/management/kmconfiggeneral.cpp +++ b/tdeprint/management/kmconfiggeneral.cpp @@ -26,13 +26,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmconfigjobs.cpp b/tdeprint/management/kmconfigjobs.cpp index 667b40381..c31e525be 100644 --- a/tdeprint/management/kmconfigjobs.cpp +++ b/tdeprint/management/kmconfigjobs.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmconfigpreview.cpp b/tdeprint/management/kmconfigpreview.cpp index 3d084f735..2fdcbcb4b 100644 --- a/tdeprint/management/kmconfigpreview.cpp +++ b/tdeprint/management/kmconfigpreview.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmdbcreator.cpp b/tdeprint/management/kmdbcreator.cpp index 2297d4034..6154ebea2 100644 --- a/tdeprint/management/kmdbcreator.cpp +++ b/tdeprint/management/kmdbcreator.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmdriverdb.cpp b/tdeprint/management/kmdriverdb.cpp index 9eb28cf87..5a172281b 100644 --- a/tdeprint/management/kmdriverdb.cpp +++ b/tdeprint/management/kmdriverdb.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include KMDriverDB* KMDriverDB::m_self = 0; diff --git a/tdeprint/management/kmdriverdbwidget.cpp b/tdeprint/management/kmdriverdbwidget.cpp index 42d573e71..50297bdca 100644 --- a/tdeprint/management/kmdriverdbwidget.cpp +++ b/tdeprint/management/kmdriverdbwidget.cpp @@ -28,12 +28,12 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmdriverdialog.cpp b/tdeprint/management/kmdriverdialog.cpp index ef37e333c..c43017cc7 100644 --- a/tdeprint/management/kmdriverdialog.cpp +++ b/tdeprint/management/kmdriverdialog.cpp @@ -20,8 +20,8 @@ #include "kmdriverdialog.h" #include "driverview.h" -#include -#include +#include +#include KMDriverDialog::KMDriverDialog(TQWidget *parent, const char *name) : KDialogBase(KDialogBase::Swallow,i18n("Configure"),KDialogBase::Ok|KDialogBase::Cancel,KDialogBase::Ok,parent,name,true,false) diff --git a/tdeprint/management/kminfopage.cpp b/tdeprint/management/kminfopage.cpp index 9987ccb4c..bae2b6ad6 100644 --- a/tdeprint/management/kminfopage.cpp +++ b/tdeprint/management/kminfopage.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/management/kminstancepage.cpp b/tdeprint/management/kminstancepage.cpp index 8c263bb48..0cadf3dba 100644 --- a/tdeprint/management/kminstancepage.cpp +++ b/tdeprint/management/kminstancepage.cpp @@ -30,10 +30,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index 741e69378..98e9595f9 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/management/kmjobviewer.cpp @@ -33,15 +33,15 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmlistview.cpp b/tdeprint/management/kmlistview.cpp index 10741d7fe..806cc0d9f 100644 --- a/tdeprint/management/kmlistview.cpp +++ b/tdeprint/management/kmlistview.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp index 5e68f3726..4aba92dad 100644 --- a/tdeprint/management/kmmainview.cpp +++ b/tdeprint/management/kmmainview.cpp @@ -36,15 +36,15 @@ #include "messagewindow.h" #include -#include +#include #include #include #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmpages.cpp b/tdeprint/management/kmpages.cpp index 4f0f1f4f7..d0c413966 100644 --- a/tdeprint/management/kmpages.cpp +++ b/tdeprint/management/kmpages.cpp @@ -23,7 +23,7 @@ #include "kmpropertypage.h" #include "kminstancepage.h" -#include +#include #include #include diff --git a/tdeprint/management/kmprinterview.cpp b/tdeprint/management/kmprinterview.cpp index 6d7edb707..d311f75c3 100644 --- a/tdeprint/management/kmprinterview.cpp +++ b/tdeprint/management/kmprinterview.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include KMPrinterView::KMPrinterView(TQWidget *parent, const char *name) : TQWidgetStack(parent,name), m_type(KMPrinterView::Icons) diff --git a/tdeprint/management/kmpropbackend.cpp b/tdeprint/management/kmpropbackend.cpp index 98004d2ed..00aac2b40 100644 --- a/tdeprint/management/kmpropbackend.cpp +++ b/tdeprint/management/kmpropbackend.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropBackend::KMPropBackend(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropcontainer.cpp b/tdeprint/management/kmpropcontainer.cpp index 9c7808199..c94838098 100644 --- a/tdeprint/management/kmpropcontainer.cpp +++ b/tdeprint/management/kmpropcontainer.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmpropdriver.cpp b/tdeprint/management/kmpropdriver.cpp index 55daf0ed5..6f20494fc 100644 --- a/tdeprint/management/kmpropdriver.cpp +++ b/tdeprint/management/kmpropdriver.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropDriver::KMPropDriver(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropgeneral.cpp b/tdeprint/management/kmpropgeneral.cpp index c55603da9..6b24b0466 100644 --- a/tdeprint/management/kmpropgeneral.cpp +++ b/tdeprint/management/kmpropgeneral.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropmembers.cpp b/tdeprint/management/kmpropmembers.cpp index 26671eed8..7fc4155a0 100644 --- a/tdeprint/management/kmpropmembers.cpp +++ b/tdeprint/management/kmpropmembers.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropMembers::KMPropMembers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropwidget.cpp b/tdeprint/management/kmpropwidget.cpp index ae8b03cbf..50c1a75e8 100644 --- a/tdeprint/management/kmpropwidget.cpp +++ b/tdeprint/management/kmpropwidget.cpp @@ -23,8 +23,8 @@ #include "kmmanager.h" #include "kmtimer.h" -#include -#include +#include +#include KMPropWidget::KMPropWidget(TQWidget *parent, const char *name) : TQWidget(parent,name) diff --git a/tdeprint/management/kmspecialprinterdlg.cpp b/tdeprint/management/kmspecialprinterdlg.cpp index 2d2a245c7..7c4c0173d 100644 --- a/tdeprint/management/kmspecialprinterdlg.cpp +++ b/tdeprint/management/kmspecialprinterdlg.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/management/kmwbackend.cpp b/tdeprint/management/kmwbackend.cpp index 6fd8cf2dc..b2e8fdcd4 100644 --- a/tdeprint/management/kmwbackend.cpp +++ b/tdeprint/management/kmwbackend.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmwclass.cpp b/tdeprint/management/kmwclass.cpp index aee060e5f..e04467632 100644 --- a/tdeprint/management/kmwclass.cpp +++ b/tdeprint/management/kmwclass.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include KMWClass::KMWClass(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwdriver.cpp b/tdeprint/management/kmwdriver.cpp index 58793c192..9876c0420 100644 --- a/tdeprint/management/kmwdriver.cpp +++ b/tdeprint/management/kmwdriver.cpp @@ -24,7 +24,7 @@ #include "kmdriverdb.h" #include -#include +#include KMWDriver::KMWDriver(TQWidget *parent, const char *name) : KMWizardPage(parent,name) diff --git a/tdeprint/management/kmwdriverselect.cpp b/tdeprint/management/kmwdriverselect.cpp index f60dcface..cc52f1015 100644 --- a/tdeprint/management/kmwdriverselect.cpp +++ b/tdeprint/management/kmwdriverselect.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name) : KMWizardPage(parent,name) diff --git a/tdeprint/management/kmwdrivertest.cpp b/tdeprint/management/kmwdrivertest.cpp index cb46a45a0..73871988a 100644 --- a/tdeprint/management/kmwdrivertest.cpp +++ b/tdeprint/management/kmwdrivertest.cpp @@ -28,9 +28,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/management/kmwend.cpp b/tdeprint/management/kmwend.cpp index 2881b4ea0..4ad564cf6 100644 --- a/tdeprint/management/kmwend.cpp +++ b/tdeprint/management/kmwend.cpp @@ -23,7 +23,7 @@ #include "util.h" #include -#include +#include #include KMWEnd::KMWEnd(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwfile.cpp b/tdeprint/management/kmwfile.cpp index f3b54dcdc..58a61e8e4 100644 --- a/tdeprint/management/kmwfile.cpp +++ b/tdeprint/management/kmwfile.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include KMWFile::KMWFile(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwinfopage.cpp b/tdeprint/management/kmwinfopage.cpp index fd9e92697..175ff7e74 100644 --- a/tdeprint/management/kmwinfopage.cpp +++ b/tdeprint/management/kmwinfopage.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include KMWInfoPage::KMWInfoPage(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwizard.cpp b/tdeprint/management/kmwizard.cpp index 5bb86967a..bc894c478 100644 --- a/tdeprint/management/kmwizard.cpp +++ b/tdeprint/management/kmwizard.cpp @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmwlocal.cpp b/tdeprint/management/kmwlocal.cpp index ea79563ec..424e40100 100644 --- a/tdeprint/management/kmwlocal.cpp +++ b/tdeprint/management/kmwlocal.cpp @@ -23,13 +23,13 @@ #include "kmfactory.h" #include "kmmanager.h" -#include +#include #include #include #include #include #include -#include +#include #include KMWLocal::KMWLocal(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwlpd.cpp b/tdeprint/management/kmwlpd.cpp index 352a075c5..3c4794ad1 100644 --- a/tdeprint/management/kmwlpd.cpp +++ b/tdeprint/management/kmwlpd.cpp @@ -23,11 +23,11 @@ #include "kmprinter.h" #include -#include +#include #include #include #include -#include +#include #include static bool checkLpdQueue(const char *host, const char *queue); diff --git a/tdeprint/management/kmwname.cpp b/tdeprint/management/kmwname.cpp index fe567f7bb..e8378371a 100644 --- a/tdeprint/management/kmwname.cpp +++ b/tdeprint/management/kmwname.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include KMWName::KMWName(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwpassword.cpp b/tdeprint/management/kmwpassword.cpp index 8490a179c..3cd71aadd 100644 --- a/tdeprint/management/kmwpassword.cpp +++ b/tdeprint/management/kmwpassword.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmwsmb.cpp b/tdeprint/management/kmwsmb.cpp index e76240cf8..836a7fb15 100644 --- a/tdeprint/management/kmwsmb.cpp +++ b/tdeprint/management/kmwsmb.cpp @@ -23,7 +23,7 @@ #include "kmprinter.h" #include "util.h" -#include +#include #include #include #include diff --git a/tdeprint/management/kmwsocket.cpp b/tdeprint/management/kmwsocket.cpp index 6b8f4aae9..a3fb71b3d 100644 --- a/tdeprint/management/kmwsocket.cpp +++ b/tdeprint/management/kmwsocket.cpp @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/management/kmwsocketutil.cpp b/tdeprint/management/kmwsocketutil.cpp index a4f23959a..02b0a6b69 100644 --- a/tdeprint/management/kmwsocketutil.cpp +++ b/tdeprint/management/kmwsocketutil.cpp @@ -27,13 +27,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/tdeprint/management/kxmlcommanddlg.cpp b/tdeprint/management/kxmlcommanddlg.cpp index 2080149d9..9b165e432 100644 --- a/tdeprint/management/kxmlcommanddlg.cpp +++ b/tdeprint/management/kxmlcommanddlg.cpp @@ -38,13 +38,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kxmlcommandselector.cpp b/tdeprint/management/kxmlcommandselector.cpp index 67627fb53..08722cf6e 100644 --- a/tdeprint/management/kxmlcommandselector.cpp +++ b/tdeprint/management/kxmlcommandselector.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/networkscanner.cpp b/tdeprint/management/networkscanner.cpp index 1943f9354..ee4e7dbc7 100644 --- a/tdeprint/management/networkscanner.cpp +++ b/tdeprint/management/networkscanner.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/smbview.cpp b/tdeprint/management/smbview.cpp index 10ac359f9..f5977bfb0 100644 --- a/tdeprint/management/smbview.cpp +++ b/tdeprint/management/smbview.cpp @@ -20,14 +20,14 @@ #include "smbview.h" #include -#include +#include #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/management/tdeprint_management_module.cpp b/tdeprint/management/tdeprint_management_module.cpp index d15ef791f..89d315c0f 100644 --- a/tdeprint/management/tdeprint_management_module.cpp +++ b/tdeprint/management/tdeprint_management_module.cpp @@ -26,9 +26,9 @@ #include "kmprinter.h" #include "kmmainview.h" -#include +#include #include -#include +#include extern "C" { diff --git a/tdeprint/marginpreview.cpp b/tdeprint/marginpreview.cpp index 2a5e21e59..45f70b7f1 100644 --- a/tdeprint/marginpreview.cpp +++ b/tdeprint/marginpreview.cpp @@ -19,7 +19,7 @@ #include "marginpreview.h" -#include +#include #include #include #include diff --git a/tdeprint/marginwidget.cpp b/tdeprint/marginwidget.cpp index 3ec1872f2..c483be123 100644 --- a/tdeprint/marginwidget.cpp +++ b/tdeprint/marginwidget.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include MarginWidget::MarginWidget(TQWidget *parent, const char* name, bool allowMetricUnit) : TQWidget(parent, name), m_default(4, 0), m_pagesize( 2 ) diff --git a/tdeprint/plugincombobox.cpp b/tdeprint/plugincombobox.cpp index 9ccfc8074..b2a686f6e 100644 --- a/tdeprint/plugincombobox.cpp +++ b/tdeprint/plugincombobox.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include PluginComboBox::PluginComboBox(TQWidget *parent, const char *name) diff --git a/tdeprint/posterpreview.cpp b/tdeprint/posterpreview.cpp index b76c0181a..0839af3d7 100644 --- a/tdeprint/posterpreview.cpp +++ b/tdeprint/posterpreview.cpp @@ -25,9 +25,9 @@ #include #include #include -#include +#include #include -#include +#include PosterPreview::PosterPreview( TQWidget *parent, const char *name ) : TQFrame( parent, name ) diff --git a/tdeprint/ppdloader.cpp b/tdeprint/ppdloader.cpp index dcf272b0a..b829e2e17 100644 --- a/tdeprint/ppdloader.cpp +++ b/tdeprint/ppdloader.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/printerfilter.cpp b/tdeprint/printerfilter.cpp index d1889dd1c..4fc362350 100644 --- a/tdeprint/printerfilter.cpp +++ b/tdeprint/printerfilter.cpp @@ -22,7 +22,7 @@ #include "kmfactory.h" #include -#include +#include #include PrinterFilter::PrinterFilter(TQObject *parent, const char *name) diff --git a/tdeprint/rlpr/kmconfigproxy.cpp b/tdeprint/rlpr/kmconfigproxy.cpp index 78513dad3..d41adcdee 100644 --- a/tdeprint/rlpr/kmconfigproxy.cpp +++ b/tdeprint/rlpr/kmconfigproxy.cpp @@ -21,7 +21,7 @@ #include "kmproxywidget.h" #include -#include +#include KMConfigProxy::KMConfigProxy(TQWidget *parent) : KMConfigPage(parent,"Proxy") diff --git a/tdeprint/rlpr/kmproprlpr.cpp b/tdeprint/rlpr/kmproprlpr.cpp index 62fe97827..08713a784 100644 --- a/tdeprint/rlpr/kmproprlpr.cpp +++ b/tdeprint/rlpr/kmproprlpr.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropRlpr::KMPropRlpr(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/rlpr/kmproxywidget.cpp b/tdeprint/rlpr/kmproxywidget.cpp index a2a3e6a85..870da43c4 100644 --- a/tdeprint/rlpr/kmproxywidget.cpp +++ b/tdeprint/rlpr/kmproxywidget.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/rlpr/kmrlprmanager.cpp b/tdeprint/rlpr/kmrlprmanager.cpp index c6704ed09..7b8ceac2d 100644 --- a/tdeprint/rlpr/kmrlprmanager.cpp +++ b/tdeprint/rlpr/kmrlprmanager.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include KMRlprManager::KMRlprManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMManager(parent,name) diff --git a/tdeprint/rlpr/kmrlpruimanager.cpp b/tdeprint/rlpr/kmrlpruimanager.cpp index 9bae2cdc4..fa6383962 100644 --- a/tdeprint/rlpr/kmrlpruimanager.cpp +++ b/tdeprint/rlpr/kmrlpruimanager.cpp @@ -26,7 +26,7 @@ #include "kmproprlpr.h" #include "kmconfigproxy.h" -#include +#include KMRlprUiManager::KMRlprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/rlpr/kmwrlpr.cpp b/tdeprint/rlpr/kmwrlpr.cpp index 79682b91a..056cba1f0 100644 --- a/tdeprint/rlpr/kmwrlpr.cpp +++ b/tdeprint/rlpr/kmwrlpr.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include static TQListViewItem* rlpr_findChild(TQListViewItem *c, const TQString& txt) diff --git a/tdeprint/rlpr/krlprprinterimpl.cpp b/tdeprint/rlpr/krlprprinterimpl.cpp index 8ca1c6569..4ef5ebe1e 100644 --- a/tdeprint/rlpr/krlprprinterimpl.cpp +++ b/tdeprint/rlpr/krlprprinterimpl.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include KRlprPrinterImpl::KRlprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) : KPrinterImpl(parent,name) diff --git a/tdeprint/tdefilelist.cpp b/tdeprint/tdefilelist.cpp index 19ffb481b..bf2fb3d12 100644 --- a/tdeprint/tdefilelist.cpp +++ b/tdeprint/tdefilelist.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/tdeprintd.cpp b/tdeprint/tdeprintd.cpp index 5080cc40c..9b7b6c955 100644 --- a/tdeprint/tdeprintd.cpp +++ b/tdeprint/tdeprintd.cpp @@ -21,9 +21,9 @@ #include "kprintprocess.h" #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/tests/helpwindow.cpp b/tdeprint/tests/helpwindow.cpp index 11cf22fd2..54d160c73 100644 --- a/tdeprint/tests/helpwindow.cpp +++ b/tdeprint/tests/helpwindow.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/tools/escputil/escpwidget.cpp b/tdeprint/tools/escputil/escpwidget.cpp index de54f2de1..9afff64ac 100644 --- a/tdeprint/tools/escputil/escpwidget.cpp +++ b/tdeprint/tools/escputil/escpwidget.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/util.h b/tdeprint/util.h index dafcdaa90..75811aee6 100644 --- a/tdeprint/util.h +++ b/tdeprint/util.h @@ -23,7 +23,7 @@ #include "kprinter.h" #include #include -#include +#include KURL smbToUrl(const TQString& work, const TQString& server, const TQString& printer); void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& printer); diff --git a/tderandr/ktimerdialog.cpp b/tderandr/ktimerdialog.cpp index 0be416be7..eba497372 100644 --- a/tderandr/ktimerdialog.cpp +++ b/tderandr/ktimerdialog.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include "ktimerdialog.h" diff --git a/tderandr/libtderandr.cc b/tderandr/libtderandr.cc index 976b156ac..fe9461715 100644 --- a/tderandr/libtderandr.cc +++ b/tderandr/libtderandr.cc @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tderandr/randr.cpp b/tderandr/randr.cpp index 68bfc2e68..59fd0e8ae 100644 --- a/tderandr/randr.cpp +++ b/tderandr/randr.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tderesources/configdialog.cpp b/tderesources/configdialog.cpp index b6d29dcd3..4eb528835 100644 --- a/tderesources/configdialog.cpp +++ b/tderesources/configdialog.cpp @@ -21,9 +21,9 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include -#include +#include #include #include diff --git a/tderesources/configpage.cpp b/tderesources/configpage.cpp index e70332c71..8378707e6 100644 --- a/tderesources/configpage.cpp +++ b/tderesources/configpage.cpp @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tderesources/factory.cpp b/tderesources/factory.cpp index 09140e7b7..eea2d3673 100644 --- a/tderesources/factory.cpp +++ b/tderesources/factory.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include #include #include diff --git a/tderesources/kcmtderesources.cpp b/tderesources/kcmtderesources.cpp index 1b779fabd..c3d5ae09e 100644 --- a/tderesources/kcmtderesources.cpp +++ b/tderesources/kcmtderesources.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include "configpage.h" diff --git a/tderesources/resource.cpp b/tderesources/resource.cpp index 41c08767e..e6fc4ebbd 100644 --- a/tderesources/resource.cpp +++ b/tderesources/resource.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "resource.h" using namespace KRES; diff --git a/tderesources/selectdialog.cpp b/tderesources/selectdialog.cpp index c50bd36fd..c8009ae47 100644 --- a/tderesources/selectdialog.cpp +++ b/tderesources/selectdialog.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdersync/rsyncconfigdialog.cpp b/tdersync/rsyncconfigdialog.cpp index 78df9e335..675044140 100644 --- a/tdersync/rsyncconfigdialog.cpp +++ b/tdersync/rsyncconfigdialog.cpp @@ -71,13 +71,13 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdersync/tdersync.h b/tdersync/tdersync.h index a4908fe63..b57c350a4 100644 --- a/tdersync/tdersync.h +++ b/tdersync/tdersync.h @@ -49,14 +49,14 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdespell2/settings.cpp b/tdespell2/settings.cpp index 57535b85c..a23fb062f 100644 --- a/tdespell2/settings.cpp +++ b/tdespell2/settings.cpp @@ -23,8 +23,8 @@ #include "broker.h" -#include -#include +#include +#include #include #include diff --git a/tdespell2/ui/configdialog.cpp b/tdespell2/ui/configdialog.cpp index 56e39ca2b..288d62a29 100644 --- a/tdespell2/ui/configdialog.cpp +++ b/tdespell2/ui/configdialog.cpp @@ -21,7 +21,7 @@ #include "configdialog.h" #include "configwidget.h" -#include +#include #include diff --git a/tdespell2/ui/configwidget.cpp b/tdespell2/ui/configwidget.cpp index 6d98955ae..2317f7307 100644 --- a/tdespell2/ui/configwidget.cpp +++ b/tdespell2/ui/configwidget.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/tdespell2/ui/dialog.cpp b/tdespell2/ui/dialog.cpp index a0ff36c01..0c45f3cd1 100644 --- a/tdespell2/ui/dialog.cpp +++ b/tdespell2/ui/dialog.cpp @@ -28,7 +28,7 @@ #include "settings.h" #include -#include +#include #include #include diff --git a/tdesu/ssh.cpp b/tdesu/ssh.cpp index f45b38e7e..c23ca459b 100644 --- a/tdesu/ssh.cpp +++ b/tdesu/ssh.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "ssh.h" diff --git a/tdesu/su.cpp b/tdesu/su.cpp index d75970dd8..e29288ab9 100644 --- a/tdesu/su.cpp +++ b/tdesu/su.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "su.h" diff --git a/tdeui/CMakeLists.txt b/tdeui/CMakeLists.txt index 85d2fc9b4..8cff8df1c 100644 --- a/tdeui/CMakeLists.txt +++ b/tdeui/CMakeLists.txt @@ -43,7 +43,7 @@ install( FILES kcolordialog.h tdeselect.h kdatepik.h kdatepicker.h kdatetbl.h tdefontdialog.h tdepopupmenu.h tdefontrequester.h ktabctl.h kstatusbar.h - tdemainwindow.h tdemainwindowiface.h tdetoolbar.h kmenubar.h + tdemainwindow.h tdemainwindowiface.h tdetoolbar.h tdemenubar.h knuminput.h kseparator.h klineedit.h krestrictedline.h kcolorbutton.h kcolorbtn.h ksystemtray.h kdockwindow.h kbuttonbox.h @@ -54,7 +54,7 @@ install( FILES kcharselect.h kcolordrag.h qxembed.h knumvalidator.h kdialog.h kdialogbase.h kjanuswidget.h tdeaboutdialog.h - kauthicon.h kmessagebox.h ksharedpixmap.h + kauthicon.h tdemessagebox.h ksharedpixmap.h kdualcolorbtn.h kdualcolorbutton.h tdetoolbarbutton.h tdetoolbarradiogroup.h ktextbrowser.h tdeaction.h tdeactioncollection.h tdeactionclasses.h khelpmenu.h kswitchlanguagedialog.h @@ -103,7 +103,7 @@ set( ${target}_SRCS qxembed.cpp ksharedpixmap.cpp kpixmapio.cpp tdepopupmenu.cpp tdetoolbar.cpp tdeaction.cpp kstdaction.cpp tdeactioncollection.cpp tdeactionclasses.cpp - kurllabel.cpp kmenubar.cpp kinputdialog.cpp + kurllabel.cpp tdemenubar.cpp kinputdialog.cpp knuminput.cpp klineedit.cpp tdelistview.cpp kprogress.cpp kprogressbox.cpp kcolordialog.cpp tdeselect.cpp kdatepicker.cpp kdatetbl.cpp tdefontrequester.cpp tdefontdialog.cpp ktabctl.cpp @@ -118,7 +118,7 @@ set( ${target}_SRCS kcharselect.cpp kcolordrag.cpp knumvalidator.cpp kdialog.cpp kdialogbase.cpp kjanuswidget.cpp tdeaboutdialog.cpp - kauthicon.cpp kmessagebox.cpp kdualcolorbutton.cpp + kauthicon.cpp tdemessagebox.cpp kdualcolorbutton.cpp tdetoolbarradiogroup.cpp tdetoolbarbutton.cpp ktextbrowser.cpp khelpmenu.cpp kswitchlanguagedialog.cpp kcmenumngr.cpp kpanelmenu.cpp diff --git a/tdeui/MAINTAINERS b/tdeui/MAINTAINERS index f4e2165fb..2caa911a2 100644 --- a/tdeui/MAINTAINERS +++ b/tdeui/MAINTAINERS @@ -54,8 +54,8 @@ tdelistbox.cpp tdelistview.cpp tdemainwindow.cpp tdemainwindowiface.cpp -kmenubar.cpp -kmessagebox.cpp Waldo Bastian +tdemenubar.cpp +tdemessagebox.cpp Waldo Bastian knuminput.cpp Dirk Mueller knumvalidator.cpp kpanelapplet.cpp diff --git a/tdeui/Makefile.am b/tdeui/Makefile.am index 26a9423cd..eac8cde0e 100644 --- a/tdeui/Makefile.am +++ b/tdeui/Makefile.am @@ -40,7 +40,7 @@ include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ kcolordialog.h tdeselect.h \ kdatepik.h kdatepicker.h kdatetbl.h tdefontdialog.h tdepopupmenu.h \ tdefontrequester.h ktabctl.h kstatusbar.h \ - tdemainwindow.h tdemainwindowiface.h tdetoolbar.h kmenubar.h \ + tdemainwindow.h tdemainwindowiface.h tdetoolbar.h tdemenubar.h \ knuminput.h kseparator.h klineedit.h \ krestrictedline.h kcolorbutton.h kcolorbtn.h \ ksystemtray.h kdockwindow.h kbuttonbox.h \ @@ -51,7 +51,7 @@ include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ kcharselect.h kcolordrag.h qxembed.h \ knumvalidator.h kdialog.h kdialogbase.h \ kjanuswidget.h tdeaboutdialog.h \ - kauthicon.h kmessagebox.h ksharedpixmap.h \ + kauthicon.h tdemessagebox.h ksharedpixmap.h \ kdualcolorbtn.h kdualcolorbutton.h tdetoolbarbutton.h \ tdetoolbarradiogroup.h ktextbrowser.h \ tdeaction.h tdeactioncollection.h tdeactionclasses.h khelpmenu.h kswitchlanguagedialog.h \ @@ -84,7 +84,7 @@ libtdeui_la_SOURCES = \ qxembed.cpp ksharedpixmap.cpp kpixmapio.cpp \ tdepopupmenu.cpp tdetoolbar.cpp tdeaction.cpp kstdaction.cpp \ tdeactioncollection.cpp tdeactionclasses.cpp \ - kurllabel.cpp kmenubar.cpp kinputdialog.cpp \ + kurllabel.cpp tdemenubar.cpp kinputdialog.cpp \ knuminput.cpp klineedit.cpp tdelistview.cpp kprogress.cpp \ kprogressbox.cpp kcolordialog.cpp tdeselect.cpp kdatepicker.cpp \ kdatetbl.cpp tdefontrequester.cpp tdefontdialog.cpp ktabctl.cpp \ @@ -99,7 +99,7 @@ libtdeui_la_SOURCES = \ kcharselect.cpp kcolordrag.cpp \ knumvalidator.cpp kdialog.cpp kdialogbase.cpp \ kjanuswidget.cpp tdeaboutdialog.cpp \ - kauthicon.cpp kmessagebox.cpp kdualcolorbutton.cpp \ + kauthicon.cpp tdemessagebox.cpp kdualcolorbutton.cpp \ tdetoolbarradiogroup.cpp tdetoolbarbutton.cpp \ ktextbrowser.cpp khelpmenu.cpp kswitchlanguagedialog.cpp \ kcmenumngr.cpp kpanelmenu.cpp \ diff --git a/tdeui/kauthicon.cpp b/tdeui/kauthicon.cpp index d4c18a114..d45217d9b 100644 --- a/tdeui/kauthicon.cpp +++ b/tdeui/kauthicon.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "kauthicon.h" diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index 91c6aa66c..3e49e112c 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -50,7 +50,7 @@ #include "kdepackages.h" #include #include -#include +#include #include #include diff --git a/tdeui/kbuttonbox.cpp b/tdeui/kbuttonbox.cpp index 6351c512d..faa26e95e 100644 --- a/tdeui/kbuttonbox.cpp +++ b/tdeui/kbuttonbox.cpp @@ -50,7 +50,7 @@ */ #include "kbuttonbox.moc" -#include +#include #include #include #include diff --git a/tdeui/kcharselect.cpp b/tdeui/kcharselect.cpp index a623b3efa..5561e5883 100644 --- a/tdeui/kcharselect.cpp +++ b/tdeui/kcharselect.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include class KCharSelect::KCharSelectPrivate { diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index b0f261890..60e250575 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -21,7 +21,7 @@ #include #include #include "kcmenumngr.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "tdeconfig.h" #include "tdeshortcut.h" diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index 993530497..5a42406a0 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "kcolordialog.h" #include "kcolorbutton.h" diff --git a/tdeui/kcolorcombo.cpp b/tdeui/kcolorcombo.cpp index 7e9353cf4..87d5de32a 100644 --- a/tdeui/kcolorcombo.cpp +++ b/tdeui/kcolorcombo.cpp @@ -46,12 +46,12 @@ #include #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index 29292f960..458fb50a8 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -47,13 +47,13 @@ #include #include -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 3ddb4390b..cfef5fd5b 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kcommand.cpp b/tdeui/kcommand.cpp index e039a03ca..994d1262e 100644 --- a/tdeui/kcommand.cpp +++ b/tdeui/kcommand.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include KCommand::~KCommand() diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 3cc224f4a..17f523d86 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 98d72030d..99f1ce4af 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -32,10 +32,10 @@ #include #include "kdatepicker.h" -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index 542f89f08..56edf9a5c 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -33,11 +33,11 @@ // dateSelected(TQDate) #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeui/kdatewidget.cpp b/tdeui/kdatewidget.cpp index 2f240a256..e9185a9c1 100644 --- a/tdeui/kdatewidget.cpp +++ b/tdeui/kdatewidget.cpp @@ -23,8 +23,8 @@ #include #include "knuminput.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kcalendarsystem.h" //#include "kdatepicker.h" #include "kdialog.h" diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index f6b2b8b56..86f7f7476 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 6656d6803..890f79179 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -34,11 +34,11 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index a761f43c6..bf99c6801 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -34,13 +34,13 @@ #ifndef NO_KDE2 #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include "config.h" #ifdef Q_WS_X11 diff --git a/tdeui/kdualcolorbutton.cpp b/tdeui/kdualcolorbutton.cpp index f0cd5cae1..532e4aaaa 100644 --- a/tdeui/kdualcolorbutton.cpp +++ b/tdeui/kdualcolorbutton.cpp @@ -21,7 +21,7 @@ #include "kcolordrag.h" #include "dcolorarrow.xbm" #include "dcolorreset.xpm" -#include +#include #include #include #include diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index 37cee99fb..a550a7af1 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/keditcl2.cpp b/tdeui/keditcl2.cpp index a7db92555..4749a471f 100644 --- a/tdeui/keditcl2.cpp +++ b/tdeui/keditcl2.cpp @@ -34,9 +34,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 1a31bbaa4..6f22b091a 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index e1abdc875..639b22926 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -33,11 +33,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kguiitem.h b/tdeui/kguiitem.h index bb1233de3..538275f3d 100644 --- a/tdeui/kguiitem.h +++ b/tdeui/kguiitem.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include /** * @short An abstract class for GUI data such as ToolTip and Icon. diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 41fa063c2..08755b860 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index bcf9550b4..7273cbe13 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -27,8 +27,8 @@ #include "kwordwrap.h" #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/kiconviewsearchline.cpp b/tdeui/kiconviewsearchline.cpp index 33df94a6a..7082fc910 100644 --- a/tdeui/kiconviewsearchline.cpp +++ b/tdeui/kiconviewsearchline.cpp @@ -27,7 +27,7 @@ #include "kiconviewsearchline.h" #include -#include +#include #include #include diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index e9dd9df85..c3a8838e9 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -35,9 +35,9 @@ #include #include // Access to some static members -#include -#include -#include +#include +#include +#include #include #include #include "kjanuswidget.h" diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index 24191aa45..9b530b751 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "config.h" #ifdef Q_WS_X11 diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 7faad35c4..35fe0e45f 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -42,12 +42,12 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index a1c05aaab..588746ec1 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/klineeditdlg.cpp b/tdeui/klineeditdlg.cpp index ca4fd8266..8fc0a9a4f 100644 --- a/tdeui/klineeditdlg.cpp +++ b/tdeui/klineeditdlg.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index 71158370b..0a5fe0188 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -33,10 +33,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include #include @@ -568,4 +568,4 @@ void KMenuBar::drawContents( TQPainter* p ) void KMenuBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "kmenubar.moc" +#include "tdemenubar.moc" diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index 5684c6484..3208e94d8 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -37,13 +37,13 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #ifdef Q_WS_X11 #include diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp index f6c3d9dd7..40f87da29 100644 --- a/tdeui/knuminput.cpp +++ b/tdeui/knuminput.cpp @@ -44,8 +44,8 @@ #include #include -#include -#include +#include +#include #include #include "kdialog.h" diff --git a/tdeui/knumvalidator.cpp b/tdeui/knumvalidator.cpp index ce5c66842..6cf486ad1 100644 --- a/tdeui/knumvalidator.cpp +++ b/tdeui/knumvalidator.cpp @@ -26,8 +26,8 @@ #include #include "knumvalidator.h" -#include -#include +#include +#include #include /////////////////////////////////////////////////////////////// diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index 184e83422..287208b66 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include +#include #include #include diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 302b4e679..64904c581 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -34,12 +34,12 @@ #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeui/kpassivepopup.cpp b/tdeui/kpassivepopup.cpp index 8892ce153..ba3459b45 100644 --- a/tdeui/kpassivepopup.cpp +++ b/tdeui/kpassivepopup.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "config.h" #ifdef Q_WS_X11 diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index 7ce3a1be2..02054aad3 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/tdeui/kpixmapregionselectordialog.cpp b/tdeui/kpixmapregionselectordialog.cpp index c394af0f3..8228cd2f1 100644 --- a/tdeui/kpixmapregionselectordialog.cpp +++ b/tdeui/kpixmapregionselectordialog.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent, diff --git a/tdeui/kpixmapregionselectorwidget.cpp b/tdeui/kpixmapregionselectorwidget.cpp index bd82cae72..21ac875db 100644 --- a/tdeui/kpixmapregionselectorwidget.cpp +++ b/tdeui/kpixmapregionselectorwidget.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kprogress.cpp b/tdeui/kprogress.cpp index 3f0186e3d..8fb050a11 100644 --- a/tdeui/kprogress.cpp +++ b/tdeui/kprogress.cpp @@ -35,7 +35,7 @@ #include "kprogress.h" #include -#include +#include #include KProgress::KProgress(TQWidget *parent, const char *name, WFlags f) diff --git a/tdeui/kprogressbox.cpp b/tdeui/kprogressbox.cpp index 6dda25a33..2472207f4 100644 --- a/tdeui/kprogressbox.cpp +++ b/tdeui/kprogressbox.cpp @@ -38,7 +38,7 @@ #include "kprogressbox.h" #include -#include +#include #include struct KProgressBoxDialog::KProgressBoxDialogPrivate diff --git a/tdeui/kpushbutton.cpp b/tdeui/kpushbutton.cpp index e92fe8583..6f994dbe3 100644 --- a/tdeui/kpushbutton.cpp +++ b/tdeui/kpushbutton.cpp @@ -25,9 +25,9 @@ #include "config.h" -#include +#include #include -#include +#include #include #include diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index d27ae07ca..a9958dea9 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index 997de84b3..40cbb8ee4 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -25,7 +25,7 @@ #include "kscrollview.h" #include #include -#include +#include struct KScrollView::KScrollViewPrivate { KScrollViewPrivate() : dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false) {} diff --git a/tdeui/ksplashscreen.cpp b/tdeui/ksplashscreen.cpp index a45a579bb..82234bd94 100644 --- a/tdeui/ksplashscreen.cpp +++ b/tdeui/ksplashscreen.cpp @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include #include diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index 134d7f1a5..daa22f46b 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include KStatusBarLabel::KStatusBarLabel( const TQString& text, int _id, diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index 8dd874a9d..652534601 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -25,9 +25,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include "kstdaction_p.h" diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h index a5449d8e7..4a8fee92e 100644 --- a/tdeui/kstdaction_p.h +++ b/tdeui/kstdaction_p.h @@ -19,7 +19,7 @@ #ifndef _KSTDACTION_PRIVATE_H_ #define _KSTDACTION_PRIVATE_H_ -#include +#include #include namespace KStdAction diff --git a/tdeui/kstdguiitem.cpp b/tdeui/kstdguiitem.cpp index 78f3fd6f6..80bf54bce 100644 --- a/tdeui/kstdguiitem.cpp +++ b/tdeui/kstdguiitem.cpp @@ -19,7 +19,7 @@ #include "kstdguiitem.h" #include -#include +#include #include KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum ) diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index c9bb7552a..c82ffb83d 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index ba938382b..f7627621c 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -26,10 +26,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index fcd0389da..5004d4bf1 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -20,12 +20,12 @@ #include "config.h" #include "tdeaction.h" -#include "kmessagebox.h" +#include "tdemessagebox.h" #include "tdeshortcut.h" #include "ksystemtray.h" #include "tdepopupmenu.h" #include "tdeapplication.h" -#include "klocale.h" +#include "tdelocale.h" #include "tdeaboutdata.h" #ifdef Q_WS_X11 diff --git a/tdeui/ksystemtray.h b/tdeui/ksystemtray.h index 711515985..f7e81c9b1 100644 --- a/tdeui/ksystemtray.h +++ b/tdeui/ksystemtray.h @@ -18,7 +18,7 @@ #ifndef KSYSTEMTRAY_H #define KSYSTEMTRAY_H -#include +#include #include class TDEActionCollection; diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp index 2e2fbe301..911162f14 100644 --- a/tdeui/ktabbar.cpp +++ b/tdeui/ktabbar.cpp @@ -26,9 +26,9 @@ #include #include -#include +#include #include -#include +#include #include "ktabbar.h" #include "ktabwidget.h" diff --git a/tdeui/ktextbrowser.cpp b/tdeui/ktextbrowser.cpp index b17e38067..a4b716db7 100644 --- a/tdeui/ktextbrowser.cpp +++ b/tdeui/ktextbrowser.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index fb0e607fa..445540099 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -26,10 +26,10 @@ #include #include #include -#include +#include #include #include -#include +#include class KTextEdit::KTextEditPrivate { diff --git a/tdeui/ktimezonewidget.cpp b/tdeui/ktimezonewidget.cpp index c7046231f..f6488847f 100644 --- a/tdeui/ktimezonewidget.cpp +++ b/tdeui/ktimezonewidget.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 44f710fb9..b3e7d832b 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -37,16 +37,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include -#include +#include #include #include #include #include #include #include -#include +#include #ifdef Q_WS_X11 #include diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index 0a95a2c70..749b4f5b5 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include "kurllabel.h" diff --git a/tdeui/kwhatsthismanager.cpp b/tdeui/kwhatsthismanager.cpp index bcf48438c..46643f6f0 100644 --- a/tdeui/kwhatsthismanager.cpp +++ b/tdeui/kwhatsthismanager.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include KWhatsThisManager *KWhatsThisManager::s_instance = 0; diff --git a/tdeui/kwizard.cpp b/tdeui/kwizard.cpp index 0e378dbf2..b8fa1e88a 100644 --- a/tdeui/kwizard.cpp +++ b/tdeui/kwizard.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include "kwizard.h" diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index 6fd472ad5..ff4083779 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -20,14 +20,14 @@ #include "tdeapplication.h" #include "kxmlguibuilder.h" -#include "kmenubar.h" +#include "tdemenubar.h" #include "tdepopupmenu.h" #include "tdetoolbar.h" #include "kstatusbar.h" #include "tdemainwindow.h" #include "tdeaction.h" -#include "kglobalsettings.h" -#include +#include "tdeglobalsettings.h" +#include #include #include #include diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 0a2aae41d..87015bfd5 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kxmlguifactory_p.cpp b/tdeui/kxmlguifactory_p.cpp index ffe9ffab1..699f9579d 100644 --- a/tdeui/kxmlguifactory_p.cpp +++ b/tdeui/kxmlguifactory_p.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/tdeui/tdeaboutapplication.cpp b/tdeui/tdeaboutapplication.cpp index 08ee46450..ef9efb181 100644 --- a/tdeui/tdeaboutapplication.cpp +++ b/tdeui/tdeaboutapplication.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include "ktextedit.h" diff --git a/tdeui/tdeaboutdialog.cpp b/tdeui/tdeaboutdialog.cpp index b46c0b959..895247161 100644 --- a/tdeui/tdeaboutdialog.cpp +++ b/tdeui/tdeaboutdialog.cpp @@ -32,9 +32,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeui/tdeabouttde.cpp b/tdeui/tdeabouttde.cpp index 0e7078af4..d5f45c85a 100644 --- a/tdeui/tdeabouttde.cpp +++ b/tdeui/tdeabouttde.cpp @@ -22,7 +22,7 @@ // I (espen) prefer that header files are included alphabetically #include #include -#include +#include #include diff --git a/tdeui/tdeaction.cpp b/tdeui/tdeaction.cpp index d817a5ba4..6f29ab848 100644 --- a/tdeui/tdeaction.cpp +++ b/tdeui/tdeaction.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/tdeactionclasses.cpp b/tdeui/tdeactionclasses.cpp index 1fc963887..4b589f166 100644 --- a/tdeui/tdeactionclasses.cpp +++ b/tdeui/tdeactionclasses.cpp @@ -47,9 +47,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeui/tdeactionselector.cpp b/tdeui/tdeactionselector.cpp index 3ef22a45f..c3c7329b8 100644 --- a/tdeui/tdeactionselector.cpp +++ b/tdeui/tdeactionselector.cpp @@ -19,7 +19,7 @@ #include "tdeactionselector.h" -#include +#include #include #include // for spacingHint() #include diff --git a/tdeui/tdecmodule.cpp b/tdeui/tdecmodule.cpp index 4e6ce943f..c6b7d3726 100644 --- a/tdeui/tdecmodule.cpp +++ b/tdeui/tdecmodule.cpp @@ -27,9 +27,9 @@ #include #include #include -#include +#include #include -#include +#include #include "tdecmodule.h" #include "tdecmodule.moc" diff --git a/tdeui/tdecompletionbox.cpp b/tdeui/tdecompletionbox.cpp index 53a8c71fb..96c9c1794 100644 --- a/tdeui/tdecompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "tdecompletionbox.h" diff --git a/tdeui/tdeconfigdialog.cpp b/tdeui/tdeconfigdialog.cpp index c8e848fa3..df43defc5 100644 --- a/tdeui/tdeconfigdialog.cpp +++ b/tdeui/tdeconfigdialog.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeui/tdefontcombo.cpp b/tdeui/tdefontcombo.cpp index fc9ae830b..cb250385f 100644 --- a/tdeui/tdefontcombo.cpp +++ b/tdeui/tdefontcombo.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "tdefontcombo.h" diff --git a/tdeui/tdefontdialog.cpp b/tdeui/tdefontdialog.cpp index 15c687e13..75f4599e0 100644 --- a/tdeui/tdefontdialog.cpp +++ b/tdeui/tdefontdialog.cpp @@ -45,11 +45,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeui/tdefontrequester.cpp b/tdeui/tdefontrequester.cpp index 64eba5701..459938d12 100644 --- a/tdeui/tdefontrequester.cpp +++ b/tdeui/tdefontrequester.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name, bool onlyFixed ) : TQWidget( parent, name ), diff --git a/tdeui/tdelistbox.cpp b/tdeui/tdelistbox.cpp index 9f7c23688..0e4c5d520 100644 --- a/tdeui/tdelistbox.cpp +++ b/tdeui/tdelistbox.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include #include diff --git a/tdeui/tdelistview.cpp b/tdeui/tdelistview.cpp index 020f18679..4750a7138 100644 --- a/tdeui/tdelistview.cpp +++ b/tdeui/tdelistview.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/tdelistviewsearchline.cpp b/tdeui/tdelistviewsearchline.cpp index 20d78add2..b74b4d1c1 100644 --- a/tdeui/tdelistviewsearchline.cpp +++ b/tdeui/tdelistviewsearchline.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tdemainwindow.cpp b/tdeui/tdemainwindow.cpp index 01b6a09e0..ba9c51556 100644 --- a/tdeui/tdemainwindow.cpp +++ b/tdeui/tdemainwindow.cpp @@ -40,13 +40,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #if defined Q_WS_X11 diff --git a/tdeui/tdeshortcutdialog.cpp b/tdeui/tdeshortcutdialog.cpp index fe3593b7e..35a7706c7 100644 --- a/tdeui/tdeshortcutdialog.cpp +++ b/tdeui/tdeshortcutdialog.cpp @@ -55,10 +55,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeui/tdespell.cpp b/tdeui/tdespell.cpp index 629013121..031011f0a 100644 --- a/tdeui/tdespell.cpp +++ b/tdeui/tdespell.cpp @@ -38,9 +38,9 @@ #include #include -#include +#include #include -#include +#include #include "tdespell.h" #include "tdespelldlg.h" #include diff --git a/tdeui/tdespelldlg.cpp b/tdeui/tdespelldlg.cpp index 280ddf861..9e8206505 100644 --- a/tdeui/tdespelldlg.cpp +++ b/tdeui/tdespelldlg.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/tdetoolbar.cpp b/tdeui/tdetoolbar.cpp index a095f1493..a3ced3a19 100644 --- a/tdeui/tdetoolbar.cpp +++ b/tdeui/tdetoolbar.cpp @@ -46,11 +46,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeui/tdetoolbar.h b/tdeui/tdetoolbar.h index 37e22c9bb..857673f28 100644 --- a/tdeui/tdetoolbar.h +++ b/tdeui/tdetoolbar.h @@ -33,7 +33,7 @@ #include #include -#include +#include class TQDomElement; class TQSize; diff --git a/tdeui/tdetoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index 608c31a32..abf23ffc7 100644 --- a/tdeui/tdetoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -40,8 +40,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/tdetoolbarbutton.h b/tdeui/tdetoolbarbutton.h index 49e906e6e..c73c1145a 100644 --- a/tdeui/tdetoolbarbutton.h +++ b/tdeui/tdetoolbarbutton.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include class TDEToolBar; class TDEToolBarButtonPrivate; diff --git a/tdeui/tdetoolbarhandler.cpp b/tdeui/tdetoolbarhandler.cpp index 4242a119e..da621fadd 100644 --- a/tdeui/tdetoolbarhandler.cpp +++ b/tdeui/tdetoolbarhandler.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index c96d6a4eb..c3b6d1ddc 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/tests/kaboutdialogtest.cpp b/tdeui/tests/kaboutdialogtest.cpp index c3be2de25..e0680b52f 100644 --- a/tdeui/tests/kaboutdialogtest.cpp +++ b/tdeui/tests/kaboutdialogtest.cpp @@ -12,7 +12,7 @@ // #include #include #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kcharselecttest.cpp b/tdeui/tests/kcharselecttest.cpp index ccd6cd10a..5ee4ee381 100644 --- a/tdeui/tests/kcharselecttest.cpp +++ b/tdeui/tests/kcharselecttest.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "kcharselect.h" int main (int argc,char **argv) diff --git a/tdeui/tests/kcolordlgtest.cpp b/tdeui/tests/kcolordlgtest.cpp index f45df0de7..dbe39484c 100644 --- a/tdeui/tests/kcolordlgtest.cpp +++ b/tdeui/tests/kcolordlgtest.cpp @@ -20,7 +20,7 @@ #include #include "kcolordialog.h" #include -#include +#include int main( int argc, char *argv[] ) { diff --git a/tdeui/tests/kcomboboxtest.cpp b/tdeui/tests/kcomboboxtest.cpp index 225c80c0f..d2b59a4c2 100644 --- a/tdeui/tests/kcomboboxtest.cpp +++ b/tdeui/tests/kcomboboxtest.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tests/kcompletiontest.cpp b/tdeui/tests/kcompletiontest.cpp index 12e3835dc..261534465 100644 --- a/tdeui/tests/kcompletiontest.cpp +++ b/tdeui/tests/kcompletiontest.cpp @@ -1,4 +1,4 @@ -#include +#include /**************************************************************************** ** Form implementation generated from reading ui file './kcompletiontest.ui' ** diff --git a/tdeui/tests/kdatepicktest.cpp b/tdeui/tests/kdatepicktest.cpp index abcfeb24a..8bdab90a4 100644 --- a/tdeui/tests/kdatepicktest.cpp +++ b/tdeui/tests/kdatepicktest.cpp @@ -1,7 +1,7 @@ #include "kdatepicker.h" #include #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kdatetimewidgettest.cpp b/tdeui/tests/kdatetimewidgettest.cpp index 721f86492..f94a2a9f7 100644 --- a/tdeui/tests/kdatetimewidgettest.cpp +++ b/tdeui/tests/kdatetimewidgettest.cpp @@ -1,6 +1,6 @@ #include "kdatetimewidget.h" #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kdatewidgettest.cpp b/tdeui/tests/kdatewidgettest.cpp index 11fb243f3..22340b4c9 100644 --- a/tdeui/tests/kdatewidgettest.cpp +++ b/tdeui/tests/kdatewidgettest.cpp @@ -1,7 +1,7 @@ #include "kdatewidget.h" #include #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kdockwidgettest.cpp b/tdeui/tests/kdockwidgettest.cpp index 683d42acd..aacac19a0 100644 --- a/tdeui/tests/kdockwidgettest.cpp +++ b/tdeui/tests/kdockwidgettest.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tests/kdualcolortest.cpp b/tdeui/tests/kdualcolortest.cpp index e52d6e671..512bfc610 100644 --- a/tdeui/tests/kdualcolortest.cpp +++ b/tdeui/tests/kdualcolortest.cpp @@ -1,7 +1,7 @@ #include "kdualcolortest.h" #include #include -#include +#include #include #include diff --git a/tdeui/tests/klineedittest.cpp b/tdeui/tests/klineedittest.cpp index 793988968..20e9b6ca8 100644 --- a/tdeui/tests/klineedittest.cpp +++ b/tdeui/tests/klineedittest.cpp @@ -9,9 +9,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include "klineedittest.h" diff --git a/tdeui/tests/kmessageboxtest.cpp b/tdeui/tests/kmessageboxtest.cpp index ce333edee..2a56a7ead 100644 --- a/tdeui/tests/kmessageboxtest.cpp +++ b/tdeui/tests/kmessageboxtest.cpp @@ -1,4 +1,4 @@ -#include "kmessagebox.h" +#include "tdemessagebox.h" #include #include @@ -10,7 +10,7 @@ #include #include -#include +#include class ExampleWidget : public QLabel { diff --git a/tdeui/tests/kstatusbartest.cpp b/tdeui/tests/kstatusbartest.cpp index 82c03e271..0a8c6d10c 100644 --- a/tdeui/tests/kstatusbartest.cpp +++ b/tdeui/tests/kstatusbartest.cpp @@ -12,7 +12,7 @@ #include "kstatusbar.h" #include #include -#include +#include #include "kstatusbartest.h" testWindow::testWindow (TQWidget *, const char *name) diff --git a/tdeui/tests/kstatusbartest.h b/tdeui/tests/kstatusbartest.h index 34dd6df81..712f24352 100644 --- a/tdeui/tests/kstatusbartest.h +++ b/tdeui/tests/kstatusbartest.h @@ -1,7 +1,7 @@ #ifndef test_kstatusbar_h #define test_kstatusbar_h -#include +#include #include #include #include diff --git a/tdeui/tests/ktimewidgettest.cpp b/tdeui/tests/ktimewidgettest.cpp index bbff45648..731dc3219 100644 --- a/tdeui/tests/ktimewidgettest.cpp +++ b/tdeui/tests/ktimewidgettest.cpp @@ -1,6 +1,6 @@ #include "ktimewidget.h" #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/tdemainwindowtest.cpp b/tdeui/tests/tdemainwindowtest.cpp index c8ace159e..b19818d4c 100644 --- a/tdeui/tests/tdemainwindowtest.cpp +++ b/tdeui/tests/tdemainwindowtest.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "tdemainwindowtest.h" diff --git a/tdeui/tests/twindowtest.cpp b/tdeui/tests/twindowtest.cpp index 3823ab46f..77e01d289 100644 --- a/tdeui/tests/twindowtest.cpp +++ b/tdeui/tests/twindowtest.cpp @@ -13,14 +13,14 @@ #include #include #include -#include +#include #include #include #include #include #include "twindowtest.h" -#include +#include //#include diff --git a/tdeui/tests/twindowtest.h b/tdeui/tests/twindowtest.h index 83a0d75bf..d1d9d460e 100644 --- a/tdeui/tests/twindowtest.h +++ b/tdeui/tests/twindowtest.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index 7ca8fda3f..bc2df2f66 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include diff --git a/tdeunittest/modrunner.cpp b/tdeunittest/modrunner.cpp index 4caa2d609..350778f6c 100644 --- a/tdeunittest/modrunner.cpp +++ b/tdeunittest/modrunner.cpp @@ -24,11 +24,11 @@ */ #include -#include +#include #include #include #include -#include +#include #include "runner.h" diff --git a/tdeunittest/runner.cpp b/tdeunittest/runner.cpp index 6a961fecd..c63b6ed6c 100644 --- a/tdeunittest/runner.cpp +++ b/tdeunittest/runner.cpp @@ -35,7 +35,7 @@ using namespace std; #include #include -#include +#include #include #include "runner.h" diff --git a/tdeunittest/tester.h b/tdeunittest/tester.h index 332381ec8..b0ce3e685 100644 --- a/tdeunittest/tester.h +++ b/tdeunittest/tester.h @@ -138,7 +138,7 @@ SampleTest - 1 test passed, 1 test failed * #include * #include * #include - * #include + * #include * #include * * static const char description[] = I18N_NOOP("SampleTests"); diff --git a/tdeutils/kcmultidialog.cpp b/tdeutils/kcmultidialog.cpp index 9bb067ca0..6a074040b 100644 --- a/tdeutils/kcmultidialog.cpp +++ b/tdeutils/kcmultidialog.cpp @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeutils/kcmultidialog.h b/tdeutils/kcmultidialog.h index 46dde98fb..ca6d2d6c7 100644 --- a/tdeutils/kcmultidialog.h +++ b/tdeutils/kcmultidialog.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include class TDECModuleProxy; diff --git a/tdeutils/kfind.cpp b/tdeutils/kfind.cpp index 99ef317b6..74fb46e9a 100644 --- a/tdeutils/kfind.cpp +++ b/tdeutils/kfind.cpp @@ -22,8 +22,8 @@ #include "kfind.h" #include "kfinddialog.h" #include -#include -#include +#include +#include #include #include #include diff --git a/tdeutils/kfinddialog.cpp b/tdeutils/kfinddialog.cpp index d9a5284e1..718fdca2f 100644 --- a/tdeutils/kfinddialog.cpp +++ b/tdeutils/kfinddialog.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeutils/kplugininfo.cpp b/tdeutils/kplugininfo.cpp index cb93b2600..9ea0eb2bc 100644 --- a/tdeutils/kplugininfo.cpp +++ b/tdeutils/kplugininfo.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeutils/kpluginselector.cpp b/tdeutils/kpluginselector.cpp index 5747df7c4..9fe08b027 100644 --- a/tdeutils/kpluginselector.cpp +++ b/tdeutils/kpluginselector.cpp @@ -35,12 +35,12 @@ #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeutils/kreplace.cpp b/tdeutils/kreplace.cpp index 0aad733da..98e3ce93c 100644 --- a/tdeutils/kreplace.cpp +++ b/tdeutils/kreplace.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include "kreplace.h" #include "kreplacedialog.h" #include diff --git a/tdeutils/kreplacedialog.cpp b/tdeutils/kreplacedialog.cpp index 88c006b4d..d8e74af44 100644 --- a/tdeutils/kreplacedialog.cpp +++ b/tdeutils/kreplacedialog.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include /** diff --git a/tdeutils/ksettings/componentsdialog.cpp b/tdeutils/ksettings/componentsdialog.cpp index 50ad97a03..f60613bce 100644 --- a/tdeutils/ksettings/componentsdialog.cpp +++ b/tdeutils/ksettings/componentsdialog.cpp @@ -18,7 +18,7 @@ */ #include "ksettings/componentsdialog.h" -#include +#include #include #include #include diff --git a/tdeutils/ksettings/dialog.cpp b/tdeutils/ksettings/dialog.cpp index 49918b5e7..e74b9ac48 100644 --- a/tdeutils/ksettings/dialog.cpp +++ b/tdeutils/ksettings/dialog.cpp @@ -21,7 +21,7 @@ #include -#include +#include #include #include #include diff --git a/tdeutils/tdecmodulecontainer.cpp b/tdeutils/tdecmodulecontainer.cpp index c379a9857..004ceb78a 100644 --- a/tdeutils/tdecmodulecontainer.cpp +++ b/tdeutils/tdecmodulecontainer.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeutils/tdecmoduleinfo.cpp b/tdeutils/tdecmoduleinfo.cpp index 3a7fdfd63..4869bb1ef 100644 --- a/tdeutils/tdecmoduleinfo.cpp +++ b/tdeutils/tdecmoduleinfo.cpp @@ -25,9 +25,9 @@ #include #include -#include +#include #include -#include +#include #include "tdecmoduleinfo.h" diff --git a/tdeutils/tdecmoduleloader.cpp b/tdeutils/tdecmoduleloader.cpp index 73f92379f..ced28ae7a 100644 --- a/tdeutils/tdecmoduleloader.cpp +++ b/tdeutils/tdecmoduleloader.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include "tdecmoduleloader.h" diff --git a/tdeutils/tdecmoduleproxy.cpp b/tdeutils/tdecmoduleproxy.cpp index 2d3150935..eeac43b02 100644 --- a/tdeutils/tdecmoduleproxy.cpp +++ b/tdeutils/tdecmoduleproxy.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdewallet/backend/tdewalletbackend.cc b/tdewallet/backend/tdewalletbackend.cc index 9871b9d7b..17fecae0c 100644 --- a/tdewallet/backend/tdewalletbackend.cc +++ b/tdewallet/backend/tdewalletbackend.cc @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdewallet/tests/tdewalletasync.cpp b/tdewallet/tests/tdewalletasync.cpp index 7668b90a7..75d475b97 100644 --- a/tdewallet/tests/tdewalletasync.cpp +++ b/tdewallet/tests/tdewalletasync.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdewallet/tests/tdewalletboth.cpp b/tdewallet/tests/tdewalletboth.cpp index a5ba26711..efeeebc98 100644 --- a/tdewallet/tests/tdewalletboth.cpp +++ b/tdewallet/tests/tdewalletboth.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdewallet/tests/tdewalletsync.cpp b/tdewallet/tests/tdewalletsync.cpp index 4774e289e..9ee39e4d4 100644 --- a/tdewallet/tests/tdewalletsync.cpp +++ b/tdewallet/tests/tdewalletsync.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/win/pro_files/kabc/kabc.pro b/win/pro_files/kabc/kabc.pro index 7e38e3c7d..b3eae05b4 100644 --- a/win/pro_files/kabc/kabc.pro +++ b/win/pro_files/kabc/kabc.pro @@ -8,8 +8,8 @@ LIBS += $$KDELIBDESTDIR\tdecore$$KDELIB_SUFFIX $$KDELIBDESTDIR\tdeui$$KDELIB_SUF $$KDELIBDESTDIR\tderesources$$KDELIB_SUFFIX $$KDELIBDESTDIR\dcop$$KDELIB_SUFFIX \ $$KDELIBDESTDIR\kio$$KDELIB_SUFFIX $$KDELIBDESTDIR\kvcard$$KDELIB_SUFFIX -INCLUDEPATH += $(KDELIBS)/kabc/vcard/include $(KDELIBS)/kabc/vcard/include/generated \ - $(KDELIBS)/kabc/vcardparser +INCLUDEPATH += $(KDELIBS)/tdeabc/vcard/include $(KDELIBS)/tdeabc/vcard/include/generated \ + $(KDELIBS)/tdeabc/vcardparser system( bash kmoc ) system( bash kdcopidl ) diff --git a/win/pro_files/kabc/vcard/vcard.pro b/win/pro_files/kabc/vcard/vcard.pro index 8dedc015e..e2de8e6d7 100644 --- a/win/pro_files/kabc/vcard/vcard.pro +++ b/win/pro_files/kabc/vcard/vcard.pro @@ -7,8 +7,8 @@ DEFINES += MAKE_KVCARD_LIB LIBS += $$KDELIBDESTDIR\tdecore$$KDELIB_SUFFIX -INCLUDEPATH += $(KDELIBS)/kabc/vcard/include $(KDELIBS)/kabc/vcard/include/generated \ - $(KDELIBS)/kabc/vcardparser +INCLUDEPATH += $(KDELIBS)/tdeabc/vcard/include $(KDELIBS)/tdeabc/vcard/include/generated \ + $(KDELIBS)/tdeabc/vcardparser system( bash kmoc ) system( bash kdcopidl ) diff --git a/win/pro_files/kio/kio.pro b/win/pro_files/kio/kio.pro index da790d7d1..dc16d76b8 100644 --- a/win/pro_files/kio/kio.pro +++ b/win/pro_files/kio/kio.pro @@ -46,7 +46,7 @@ tdeio/kdcopservicestarter.cpp \ tdeio/kdirlister.cpp \ tdeio/kdirnotify.cpp \ tdeio/kdirwatch.cpp \ -tdeio/kemailsettings.cpp \ +tdeio/tdeemailsettings.cpp \ tdeio/tdefilefilter.cpp \ tdeio/tdefileitem.cpp \ tdeio/tdefilemetainfo.cpp \ @@ -59,7 +59,7 @@ tdeio/kmimetype.cpp \ tdeio/kmimetypechooser.cpp \ tdeio/knfsshare.cpp \ tdeio/kprotocolinfo.cpp \ -tdeio/kprotocolmanager.cpp \ +tdeio/tdeprotocolmanager.cpp \ tdeio/kremoteencoding.cpp \ tdeio/krun.cpp \ tdeio/ksambashare.cpp \ @@ -118,7 +118,7 @@ bookmarks/kbookmarkmenu.cc \ \ tdefile/kcombiview.cpp \ tdefile/kcustommenueditor.cpp \ -tdefile/kdiroperator.cpp \ +tdefile/tdediroperator.cpp \ tdefile/kdirselectdialog.cpp \ tdefile/kdirsize.cpp \ tdefile/kdiskfreesp.cpp \ diff --git a/win/pro_files/tdecore/tdecore.pro b/win/pro_files/tdecore/tdecore.pro index 7e564a250..fbc415726 100644 --- a/win/pro_files/tdecore/tdecore.pro +++ b/win/pro_files/tdecore/tdecore.pro @@ -49,9 +49,9 @@ kstandarddirs.cpp \ tdeconfig.cpp \ tdeconfigdialogmanager.cpp \ kcharsets.cpp \ -kglobal.cpp \ +tdeglobal.cpp \ kdebug.cpp \ -ktempfile.cpp \ +tdetempfile.cpp \ ktempdir.cpp \ ksavefile.cpp \ tdeconfigbackend.cpp \ @@ -70,11 +70,11 @@ tdeshortcutmenu.cpp \ tdeshortcutlist.cpp \ kinstance.cpp \ tdeversion.cpp \ -klocale.cpp \ +tdelocale.cpp \ kicontheme.cpp \ kiconloader.cpp \ kiconeffect.cpp \ -kglobalsettings.cpp \ +tdeglobalsettings.cpp \ kckey.cpp \ kglobalaccel.cpp \ kglobalaccel_win.cpp \ @@ -120,7 +120,7 @@ kqiodevicegzip_p.cpp #network/tdesocketdevice.cpp \ #network/ksockssocketdevice.cpp -#kstartupinfo.cpp \ +#tdestartupinfo.cpp \ #todo: kextsock.cpp \ #todo: ksock.cpp \ #todo: ksocks.cpp \ diff --git a/win/pro_files/tdeui/tdeui.pro b/win/pro_files/tdeui/tdeui.pro index b5a506f8b..aa1065c7d 100644 --- a/win/pro_files/tdeui/tdeui.pro +++ b/win/pro_files/tdeui/tdeui.pro @@ -71,7 +71,7 @@ tdelistview.cpp \ tdelistviewsearchline.cpp \ tdemainwindowiface.cpp \ tdemainwindow.cpp \ -kmenubar.cpp \ +tdemenubar.cpp \ knuminput.cpp \ knumvalidator.cpp \ kpanelapplet.cpp \ @@ -132,7 +132,7 @@ exists( kmessagebox_win.cpp ) { SOURCES += kmessagebox_win.cpp } !exists( kmessagebox_win.cpp ) { - SOURCES += kmessagebox.cpp + SOURCES += tdemessagebox.cpp } # generated: diff --git a/win/tools/build_tdelibs_dbg b/win/tools/build_tdelibs_dbg index 3fcfe0c20..79f3b0f32 100644 --- a/win/tools/build_tdelibs_dbg +++ b/win/tools/build_tdelibs_dbg @@ -48,7 +48,7 @@ tdecore \ tdeui \ kio \ tderesources \ -kabc/vcard \ +tdeabc/vcard \ kabc \ tdeutils \ tdeparts \ diff --git a/win/tools/build_tdelibs_rel b/win/tools/build_tdelibs_rel index 399dcadda..2fe77ef36 100644 --- a/win/tools/build_tdelibs_rel +++ b/win/tools/build_tdelibs_rel @@ -48,7 +48,7 @@ tdeui \ kstyles/thinkeramik/widget-engine \ kio \ tderesources \ -kabc/vcard \ +tdeabc/vcard \ kabc \ tdeutils \ tdeparts \ -- cgit v1.2.3